Skip to content

Commit

Permalink
Stricter testing
Browse files Browse the repository at this point in the history
- When testing with the old Python version (3.9 at the moment),
  the oldest supported versions of the dependencies are installed.
- The option `-W error` is added to pytest, so that it fails in case of a warning.
  • Loading branch information
tovrstra committed Jun 8, 2024
1 parent c7a7469 commit fc63221
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install oldest versions of supported dependencies
if: ${{ matrix.python-version == "3.9"}}
# Changes to these dependencies must be updated
# in pyproject.toml and docs/install.rst
run: pip install numpy==1.22 scipy==1.8 attrs==21.3.0
- name: Install development version
run: pip install -e .[dev]
- name: Run Pytest
Expand Down
4 changes: 4 additions & 0 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Latest PyPI version
Python 3 (>=3.9) must be installed before you can install IOData.
In addition, IOData has the following dependencies:

..
Changes to these dependencies must be updated
in pyproject.toml and .github/workfloews/pytest.yaml
- numpy >= 1.22: https://numpy.org/
- scipy >= 1.8: https://scipy.org/
- attrs >= 21.3.0: https://www.attrs.org/en/stable/index.html
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ classifiers = [
"Topic :: Scientific/Engineering :: Chemistry",
]
dependencies = [
# Changes to these dependencies must be updated
# in .github/workfloews/pytest.yaml and docs/install.rst
"numpy>=1.22",
"scipy>=1.8",
"attrs>=21.3.0",
Expand All @@ -47,7 +49,7 @@ Source = "https://github.com/theochem/iodata/"
iodata-convert = "iodata.__main__:main"

[tool.pytest.ini_options]
addopts = "-n auto"
addopts = "-n auto -W error"

[tool.setuptools]
packages = ["iodata"]
Expand Down

0 comments on commit fc63221

Please sign in to comment.