Pixi dependency management#301
Open
sbrandstaeter wants to merge 202 commits into
Open
Conversation
…code checks from pre-commit hooks to code quality checks
sbrandstaeter
commented
May 28, 2026
|
|
||
| [tool.coverage.run] | ||
| source = ["queens"] | ||
| source = ["src"] |
Member
Author
There was a problem hiding this comment.
This change is related to https://github.com/queens-py/queens/pull/301/changes#r3316698721
It had no impact on the coverage right now, but might stabilise the measurement.
|
|
||
| NOTEBOOK_PATH = "tutorials/1_grid_iterator_rosenbrock.ipynb" | ||
|
|
||
| pytestmark = markers_for_notebook(NOTEBOOK_PATH) |
Member
Author
There was a problem hiding this comment.
This is the standard module level marker definition: https://docs.pytest.org/en/stable/example/markers.html#marking-whole-classes-or-modules
I agree that it is unusual, but pytest works this way and needs the global variable.
| 1000, | ||
| _one_dim_converged_reference_values(), | ||
| (2, 4, 0, 8), | ||
| marks=pytest.mark.convergence_tests, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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