Skip to content

Conversation

@keewis
Copy link
Member

@keewis keewis commented Nov 30, 2025

This adds initial support for pixi environments.

It does so by manually parsing the manifest file (which needs to be passed explicitly to the action), extracting the features from the given environment (the name of the env is passed as pixi:<env-name>) and merging them into a single list of pins.

There's still a lot to be done before it can be merged:

  • PyPI dependencies are ignored without warning warns now
  • the tests are lacking / non-existent
  • no documentation

cc @VeckoTheGecko

@keewis
Copy link
Member Author

keewis commented Dec 8, 2025

I believe with this we should have a working version (it's still far from where I'd like it to be regarding tests, but this is already much better than before).

I'll keep this open for a couple of days to double check there's nothing wrong with it and will then merge and release.

Copy link

@VeckoTheGecko VeckoTheGecko left a comment

Choose a reason for hiding this comment

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

will do some more testing later



def parse_spec(name, version_text):
# "*" => None

Choose a reason for hiding this comment

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

I've been testing with the xarray manifest, and all the minimum envs there have the 'test' feature, which has

array-api-strict = "<2.4"

as a dep, but this errors with

ValueError: Unknown version format: <2.4

since this function doesn't support "<" as a specifier

Choose a reason for hiding this comment

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

Actually, I realised that the env I was looking at was the wrong one (test-py311-bare-min-and-scipy when it should be test-py311-min-versions - the latter which has array-api-strict pinned to something else). So I don't think this is a problem

Copy link
Member Author

Choose a reason for hiding this comment

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

it actually is a problem (but not with this action, see below): array-api-strict comes from the test feature and is included in test-py311-bare-minimum, which we definitely want to check.

However, I would argue that array-api-strict is not part of the test deps (like pytest or hypothesis), but rather a dependency that should be part of the extras feature. Which means the pin would not be included in the min versions envs, side-stepping this issue.

@VeckoTheGecko
Copy link

Finished the testing I wanted to do with the xarray manifest - didn't run into any more issues (except those listed above) :)

@keewis keewis merged commit 3db8e1c into xarray-contrib:main Dec 10, 2025
14 checks passed
@keewis keewis deleted the pixi branch December 10, 2025 20:17
@keewis keewis linked an issue Dec 10, 2025 that may be closed by this pull request
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.

better error messages for policy schema failures support pixi raise a nicer error for unpinned deps

2 participants