Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stricter testing #331

Merged
merged 5 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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