Pixi dependency management#301
Conversation
|
One comment from my side: I have not yet found the time to check all the changes, but I used the new |
leahaeusel
left a comment
There was a problem hiding this comment.
I finally managed to finish the review. Just a few minor things are left to do, and then we should be ready to finally merge this beast 💪
The root directory is only needed in the testsuite and in one tutorial. Since test_utils will not be published within a whl file also testing the wheel against this should now work as the tests code must come from the same root as they are also not published.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdd436d0cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary of big changes:
pixifor dependency management (keep backward compatibility to pip and conda)Minor changes
pip-licensesto check licenses of all production dependencies (also transitive dependencies)Description and Context:
What and Why?
This PR moves the project to pixi as the main dependency and environment manager.
pixigives us a modern workflow for mixed Conda/PyPI environments:uvunder the hoodAt the same time, this setup does not force users to adopt
pixi. QUEENS can still be used through standard Python packaging workflows such aspip install -e ., and pure-PyPI workflows usinguvremain possible. Even so, I strongly recommend tryingpixi: it is easy to use and very fast.Reminder:
One major reason for this change is that we should bump the dependencies' versions
This is also done with this PR. Starting with switching to Python 3.12.
The new versions will also require several changes and adaptations to the tests.
One adaptation that was already done is the switch to
pip-licensesfor checking the licenses of QUEENS' dependencies including transitive dependencies (dependencies of direct dependencies).What Changed Compared To
mainThis branch introduces:
pixiworkspace-based dependency and environment managementpixi.lock-based reproducible environment workflowWhy We Now Have Duplicate Dependency Definitions
A central part of this setup is that dependencies are now defined in two forms:
project.dependenciesdependency-groupsproject.optional-dependenciespixidependency definitions:tool.pixi.dependenciestool.pixi.pypi-dependenciestool.pixi.feature.*This duplication is intentional.
The PEP-style declarations are needed for standard Python packaging metadata and pure-PyPI workflows.
The
pixideclarations are needed to drive mixed Conda/PyPI environment resolution efficiently and reproducibly.To make sure these two views do not diverge, this PR adds automated integrity checks in:
CI / Workflow Improvements
The pipeline now:
pyproject.tomlchanges would require a lockfile updatepixi.lockis staleThis gives us much better guardrails around environment reproducibility.
What Is Still Missing
One thing not fully supported yet, but straightforward to add, is a pure Conda environment-management workflow for users who want to stay entirely in Conda-style tooling.
The natural path for that is:
This should be added next.
Possible Next Steps
Short Usage Tutorials
1. Using
pixiInstall pixi, then from the repository root:
Do the following once (per environment):
Useful environments currently include:
defaultalldevThen you to for example run the test suite
Open a shell in an environment:
Refresh the lockfile after dependency changes:
Use the lockfile strictly:
2. Pure PyPI Workflows
These remain supported.
2.1
pip installThis is the classic editable-install workflow.
2.2
uvThis is a good option for a fast pure-PyPI workflow.
3. Conda via Pixi Export
This is the intended future direction for Conda-only usage.
The idea is:
That support is not the main path yet, but it can be added next.
Open points
introduce and test "pure" conda environmentextract GitHub action to run QUEENS tests for specific markers (reduce code duplication)Follow-ups
queens = {path = "./", editable=True}(alternatively: pixi adds--no-depsfeature)Related Issues and Pull Requests
Interested Parties