Skip to content

Commit

Permalink
Add new environment for model backwards compatibility tests
Browse files Browse the repository at this point in the history
which uses latest dependences except for sklearn (which breaks compatibility otherwise)
  • Loading branch information
opcode81 committed Aug 12, 2024
1 parent bd0b9f0 commit 456e71a
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.to

[tox]
envlist = py, py_latest_dependencies, docs, report
envlist = py, py_latest_dependencies, py_backwardscompat, docs, report
isolated_build = True

[testenv:py]
Expand Down Expand Up @@ -33,17 +33,36 @@ deps =
-rrequirements_geoanalytics.txt
-rrequirements_tensorflow.txt

# NOTE: notebooks are not executed here again (the build would become very slow) so they are not tested with
# latest dependencies. Hopefully, this is not a problem
# This environment tests the latest dependencies
[testenv:py_latest_dependencies]
commands =
pytest
; NOTE: notebooks are not executed here again (the build would become very slow) so they are not tested with
; latest dependencies. Hopefully, this is not a problem
deps =
pytest
; NOTE: For some reason including this into setup.py makes things slow locally, fail silently on gitlab
; and lead to non-ending builds (2.5h+) on github. This dependency should be installable with pip install sensai[torch] though...
pytorch-lightning>=1.1
; no pinned requirements included, so relaxed versions created in by setup.py apply
; no pinned requirements included, so relaxed versions created by setup.py apply
extras =
full

# Special environment to test backward compatibility of persisted models, where we test with the latest
# dependencies except sklearn, which we must keep at an older version to ensure compatibility
# (because sklearn does break compatibility!)
[testenv:py_backwardscompat]
commands =
; We test only backward compatibility in this environment, so we do not need to run the full test suite
pytest tests/backwardscompat
deps =
pytest
; NOTE: For some reason including this into setup.py makes things slow locally, fail silently on gitlab
; and lead to non-ending builds (2.5h+) on github. This dependency should be installable with pip install sensai[torch] though...
pytorch-lightning>=1.1
; No pinned requirements included except sklearn, so relaxed versions created by setup.py apply.
; We use sklearn version 1.0.2, because it is the latest version that is still compatible with the lowest version we support.
scikit-learn==1.0.2
extras =
full

Expand Down

0 comments on commit 456e71a

Please sign in to comment.