ci(commit): add optional dependencies to the pixi environment - #2822
ci(commit): add optional dependencies to the pixi environment#2822jdhughes-dev wants to merge 3 commits into
Conversation
The test job runs in the MODFLOW 6 pixi environment and installs FloPy with --no-deps, so none of the optional extras are present and every test guarded by requires_pkg() for them is skipped. h5py gates the four node mapping save and load tests, which have never run on a pull request. pymetis and scikit-learn gate the remaining skipped tests and are left for a follow-up.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2822 +/- ##
===========================================
+ Coverage 55.5% 73.6% +18.0%
===========================================
Files 644 659 +15
Lines 124135 132188 +8053
===========================================
+ Hits 68947 97321 +28374
+ Misses 55188 34867 -20321 🚀 New features to boost your workflow:
|
The h5py and netcdf4 wheels each bundle their own HDF5 library, and on windows the wrong one is loaded, so importing h5py fails with a DLL load error. The error is an ImportError rather than a ModuleNotFoundError, which requires_pkg() does not catch, so the whole of test_model_splitter.py failed to collect. Install h5py on linux and macOS only.
|
Windows failed on the first attempt: the
Worth noting separately: |
wpbonelli
left a comment
There was a problem hiding this comment.
I think the windows failures are pypi/conda inconsistencies. the pixi env has hdf5 the library as a transitive conda dependency and then we install h5py from pypi.
Instead of tacking on pypi dependencies here we might as well just add these few to the mf6 pixi env, I think.
Suggested in modflowpy/flopy#2822 (comment). Close #352
Installing h5py from pypi into an environment that already carries the HDF5 library from conda loaded the wrong library on windows, so add the optional dependencies FloPy tests need with pixi instead. conda-forge builds pymetis for windows, which pypi does not, so the metis tests run on all three platforms.
|
Good call, that is the cause. Switched to |
The
Testjob runs in the MODFLOW 6 pixi environment and installs FloPy with--no-deps,so none of the
optionalextras are present and every test guarded byrequires_pkg()forthem is skipped on a pull request.
from pypi, so they are consistent with the libraries already there
splitting tests, none of which have run on a pull request
three platforms