Skip to content

Commit

Permalink
Merge pull request #331 from tovrstra/stricter-testing
Browse files Browse the repository at this point in the history
Stricter testing
  • Loading branch information
tovrstra authored Jun 11, 2024
2 parents c7a7469 + 3c2f49f commit df4c5ab
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
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'}}
# Ensure changes to these dependencies are reflected
# in pyproject.toml and docs/install.rst
run: pip install numpy==1.22 scipy==1.11 attrs==21.3.0
- name: Install development version
run: pip install -e .[dev]
- name: Run Pytest
Expand Down
6 changes: 5 additions & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ Latest PyPI version
Python 3 (>=3.9) must be installed before you can install IOData.
In addition, IOData has the following dependencies:

..
Ensure changes to these dependencies are reflected
in pyproject.toml and .github/workfloews/pytest.yaml
- numpy >= 1.22: https://numpy.org/
- scipy >= 1.8: https://scipy.org/
- scipy >= 1.11: https://scipy.org/
- attrs >= 21.3.0: https://www.attrs.org/en/stable/index.html

Normally, you don't need to install these dependencies manually. They will be
Expand Down
3 changes: 2 additions & 1 deletion iodata/overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
def factorial2(n: Union[int, NDArray[int]]) -> Union[int, NDArray[int]]:
"""Modifcied scipy.special.factorial2 that returns 1 when the input is -1.
This is a temporary workaround while we wait for Scipy's update.
The future implementation of factorial2 in SciPy will not return
the correct result for n=-1 (for our purposes).
To learn more, see https://github.com/scipy/scipy/issues/18409.
This function only supports integer (array) arguments,
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ classifiers = [
"Topic :: Scientific/Engineering :: Chemistry",
]
dependencies = [
# Ensure changes to these dependencies are reflected
# in .github/workfloews/pytest.yaml and docs/install.rst
"numpy>=1.22",
"scipy>=1.8",
"scipy>=1.11",
"attrs>=21.3.0",
]
dynamic = ["version"]
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 df4c5ab

Please sign in to comment.