Skip to content

Commit

Permalink
ENH: Relax the Python package version requirements
Browse files Browse the repository at this point in the history
Relax the Python package version requirements: use `>=` so that newer
package version can be used. Especially relevant for the package to work
with newer Python versions.

Add a test case to the GHA workflow to test the minimum required
versions.
  • Loading branch information
jhlegarreta committed Sep 27, 2023
1 parent e1b19a0 commit b6f230e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ['3.8']
requires: ['minimal', 'latest']

steps:
- name: Check out repository
Expand All @@ -24,6 +25,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set min. dependencies
if: matrix.requires == 'minimal'
run: |
python -c "req = open('requirements.txt').read().replace(' >= ', ' == ') ; open('requirements.txt', 'w').write(req)"
python -c "req = open('setup.py').read().replace(' >= ', ' == ') ; open('setup.py', 'w').write(req)"
# - name: Cache pip
# uses: actions/cache@v2
# id: cache
Expand Down
20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cython==0.29.*
joblib==1.1.*
matplotlib==3.6.*
nibabel==3.0.*
numpy==1.20.*
pandas==2.0.3
setuptools==44.0.*
scipy==1.4.*
statsmodels==0.10.*
vtk==9.1.*
cython>=0.29.0
joblib>=1.1.0
matplotlib>=3.6.0
nibabel>=3.0.0
numpy>=1.20.0
pandas>=2.0.3
setuptools>=44.0.0
scipy>=1.4.0
statsmodels>=0.10.0
vtk>=9.1.0
xlrd
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def build_extensions(self):
external_dependencies.append(dependency)


setup_requires = ['cython==0.29.*', 'numpy==1.20.*']
setup_requires = ['cython>=0.29.0', 'numpy>=1.20.0']
setup(
name='WhiteMatterAnalysis',
version='0.3.0',
Expand Down

0 comments on commit b6f230e

Please sign in to comment.