Skip to content

Conversation

@aphearin
Copy link
Contributor

@aphearin aphearin commented Dec 22, 2025

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.txt installed into my conda environment. So I originally submitted a trivial PR into main just 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 of diffmahnet. That is the failure I originally expected before I realized that test_main_branch.yaml pip installs diffmahnet as an exernal library. So the newly added test_latest_releases.yaml will now only pass once diffmahnet is implemented within diffhalos, rather than as an external library.

A couple of other minor things to note:

  1. The flowjax library is not on conda-forge. That means we cannot define a self-contained conda environment in which diffhalos runs, which is unfortunate. I think we can continue to ignore this issue for purposes of the initial release of diffhalos. But in the longer term, we should either see about getting conda-forge support for flowjax, or otherwise migrate to a different library for our normalizing flows.
  2. I notice that our only use of scipy is to support the option to use a latin hypercube rather than a stratified grid as the quasi monte carlo algorith. Since scipy is a heavy dependency to require, probably this one single use-case is not enough to warrant elevating scipy to a required dependency. So long as the stratified grid is serving our purposes, maybe we just drop support for latin hypercube sampling altogether?

@aphearin aphearin changed the title Modify readme Add workflows testing against minimal dependencies Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants