Skip to content

Use pixi for dev and docs dependency management - #2197

Open
brynpickering wants to merge 1 commit into
masterfrom
feat/pixi-dev-env
Open

brynpickering wants to merge 1 commit into
masterfrom
feat/pixi-dev-env

Conversation

@brynpickering

Copy link
Copy Markdown
Collaborator

Update to using pixi for the development environments. It adds some marginal overhead but with the benefit of access to non-python libs. I noticed on building the docs that I needed the cairo lib and had to point to a brew install to make it work.

Another benefit is being able to emulate CI steps more fully locally via pixi tasks. There is a CI task in the pixi.toml that is invoked in the CI but can also be run locally without having to think about all the steps involved.

PyPSA itself is installed into the dev environment using uv as an editable python dependency, alongside its pure python dependencies. It remains possible to install and run locally with uv and pip if desired (just not the dev/docs env).

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in docs.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes docs/release-notes.md of the upcoming release is included.
  • PR description is written by me. Any potentially verbose AI-generated content is marked (see Contributing guidelines).
  • I consent to the release of this PR's code under the MIT license.

@fneum
fneum requested a review from lkstrp November 24, 2026 08:48

@lkstrp lkstrp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am quite against this. The overhead is not marginal. And in the evolving world leading to worktrees and sandboxes its a problem for nearly no benefit. See stats below.

Next to that, the CI is here no longer testing the built wheel. Also the master is not testing fresh dependencies anymore. With pixi.toml we have two sources of truth next to pyproject.toml...

My counter proposal is here: PyPSA/reusable-github-workflows#4

uv pixi Δ
Cold setup (empty cache) 37.0 s 46.6 s +26%
Warm setup (per worktree) 2.1 s 4.2 s 2x
Re-sync, nothing changed 113 ms 212 ms 2x
run overhead 55 ms 213 ms 4x
Cache + Python 1.5 GB 2.0 GB +33%
Per extra worktree 6.5 MB ~130 MB ~20x
3 worktrees total ~1.7 GB ~2.4 GB +40%

This branch has not been deployed

No deployments
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.

2 participants