diff --git a/.github/workflows/run-tox.yml b/.github/workflows/run-tox.yml index 9e83924e..57fe4547 100644 --- a/.github/workflows/run-tox.yml +++ b/.github/workflows/run-tox.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index e17aa64a..e817824f 100644 --- a/setup.py +++ b/setup.py @@ -22,10 +22,10 @@ reqs = [ "jsonschema>=3.0.1", - "matplotlib>=1.3.1", - "morphio>=3.0,<4.0", + "matplotlib>=3.2.1", + "morphio>=3.3.3,<4.0", "neurom>=3.0,<4.0", - "numpy>=1.15.0", + "numpy>=1.20.0", "scipy>=1.6", "tmd>=2.2.0", ] @@ -40,15 +40,14 @@ test_reqs = [ "diameter-synthesis>=0.5.0", - "dictdiffer", - "mock", - "morph-tool>=0.1.12", - "numpy>=1.22", - "pytest", - "pytest-cov", - "pytest-html", - "pytest-xdist", - "tqdm", + "dictdiffer>=0.5", + "mock>=3", + "morph-tool>=2.9", + "pytest>=6", + "pytest-cov>=3", + "pytest-html>=2", + "pytest-xdist>=2", + "tqdm>=4.8.4", ] setup( @@ -82,6 +81,8 @@ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering :: Bio-Informatics", ], include_package_data=True, diff --git a/tox.ini b/tox.ini index 3c011f97..f57d9749 100644 --- a/tox.ini +++ b/tox.ini @@ -7,31 +7,39 @@ envlist = check-packaging lint docs - py{38,39} + py38-min_versions + py{38,39,310,311} coverage minversion = 3.18 [testenv] -extras = test +extras = + test setenv = COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}} passenv = PIP_EXTRA_INDEX_URL -commands = pytest \ - -n {env:PYTEST_NPROCS:'auto'} \ - --basetemp={envtmpdir} \ - --cov={[base]name} \ - --cov-branch \ - --cov-fail-under=97 \ - --no-cov-on-fail \ - --cov-report term-missing \ - --cov-report html:reports/coverage-{envname} \ - --cov-report xml:reports/coverage-{envname}.xml \ - --html reports/pytest-{envname}.html \ - --junit-xml=reports/pytest-{envname}.xml \ - --self-contained-html \ - {posargs} +deps = + min_versions: Requirements-Builder +commands = + min_versions: requirements-builder --level=min --extras=test -o {envtmpdir}/requirements_min.txt setup.py + min_versions: pip install -r {envtmpdir}/requirements_min.txt + min_versions: pip freeze + pytest \ + -n {env:PYTEST_NPROCS:4} \ + --basetemp={envtmpdir} \ + --cov={[base]name} \ + --cov-branch \ + --cov-fail-under=97 \ + --no-cov-on-fail \ + --cov-report term-missing \ + --cov-report html:reports/coverage-{envname} \ + --cov-report xml:reports/coverage-{envname}.xml \ + --html reports/pytest-{envname}.html \ + --junit-xml=reports/pytest-{envname}.xml \ + --self-contained-html \ + {posargs} [testenv:coverage] skip_install = true @@ -81,5 +89,7 @@ commands = [gh-actions] python = - 3.8: py38, check-packaging, lint + 3.8: py38, py38-min_versions, lint 3.9: py39, docs, coverage + 3.10: py310, check-packaging + 3.11: py311