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

CI: Test with minimal versions of dependencies and add support for py310 and py311 #53

Merged
merged 1 commit into from
Jan 27, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/run-tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 13 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand All @@ -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(
Expand Down Expand Up @@ -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,
Expand Down
44 changes: 27 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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