Add workflows testing against minimal dependencies #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR brings in a new CI workflow that runs pytest in an environment in which only our core dependencies are present.
I noticed that I was unable to run the code locally, even though I had all the libraries defined in
requirements.txtinstalled into my conda environment. So I originally submitted a trivial PR intomainjust to check whether our CI was passing, which it was not, although the reason appears to be a failing assert statement, nothing to do with our dependency chain.When I checked our pytest workflow, I noticed that we are pip installing several libraries beyond what appears in
requirements.txt, and so I set up a separate CI workflow that contains only the minimal libraries that should be needed in order for our code to run. This new workflow also fails due to an ImportError ofdiffmahnet. That is the failure I originally expected before I realized thattest_main_branch.yamlpip installsdiffmahnetas an exernal library. So the newly addedtest_latest_releases.yamlwill now only pass oncediffmahnetis implemented withindiffhalos, rather than as an external library.A couple of other minor things to note:
flowjaxlibrary is not onconda-forge. That means we cannot define a self-contained conda environment in whichdiffhalosruns, which is unfortunate. I think we can continue to ignore this issue for purposes of the initial release ofdiffhalos. But in the longer term, we should either see about getting conda-forge support forflowjax, or otherwise migrate to a different library for our normalizing flows.scipyis to support the option to use a latin hypercube rather than a stratified grid as the quasi monte carlo algorith. Sincescipyis a heavy dependency to require, probably this one single use-case is not enough to warrant elevatingscipyto a required dependency. So long as the stratified grid is serving our purposes, maybe we just drop support for latin hypercube sampling altogether?