Skip to content

chore(skore): Using pixi to manage the lock files and CI#2929

Open
glemaitre wants to merge 16 commits into
probabl-ai:mainfrom
glemaitre:pixi_setup
Open

chore(skore): Using pixi to manage the lock files and CI#2929
glemaitre wants to merge 16 commits into
probabl-ai:mainfrom
glemaitre:pixi_setup

Conversation

@glemaitre

@glemaitre glemaitre commented May 21, 2026

Copy link
Copy Markdown
Member

closes #1659
closes #2809

Now that we are in monorepo, I would rather use a tool like pixi to orchestrate task and the CI jobs and update the lock file.

This PR is going towards this direction.

However, it does not force any user to absolutely use pixi as a development tools (the same way that it was not necessary before hand to use uv for instance).

What this CI proposes:

  • create a cross-platform lock file
  • use the lock file for the documentation and code testing
  • add a codecov integration instead of add the report in a message.

@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Documentation preview @ 0c7f303

@glemaitre glemaitre marked this pull request as draft May 21, 2026 12:39
@github-actions

Copy link
Copy Markdown
Contributor
Tests Skipped Failures Errors Time
2564 6 💤 0 ❌ 0 🔥 6m 37s ⏱️

@auguste-probabl

Copy link
Copy Markdown
Collaborator

Yes, please!

@probabl-ai probabl-ai deleted a comment from codecov Bot May 21, 2026
Comment thread scripts/activate_dot.sh
Comment thread scripts/activate_dot.sh
Comment thread pixi.toml
@auguste-probabl

Copy link
Copy Markdown
Collaborator

Is there something specific keeping this in draft @glemaitre ? I'm very excited to have a coherent, reproducible dev environment.

Comment thread pixi.toml Outdated
@glemaitre glemaitre marked this pull request as ready for review June 5, 2026 13:25
Comment thread docs/how-to/bump-minimal-python-version.md

@rouk1 rouk1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMHO this needs to be documented in contribution guidelines.
How to install pixi and dot and how to spawn a virtualenv.

Comment thread .github/workflows/pr-display-code-coverage.yml Outdated
@glemaitre

Copy link
Copy Markdown
Member Author

IMHO this needs to be documented in contribution guidelines.

We can indeed document the way of using pixi if one is interested in.

@thomass-dev

thomass-dev commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

IMHO this needs to be documented in contribution guidelines.

We can indeed document the way of using pixi if one is interested in.

It's not only "if one is interested in".

The lockfiles used in the CI are now only in pixi "language".
If someone wants to debug and reproduce the environment, they cannot use a simple requirements file anymore.
He has to use pixi, where requirements.txt was more "cross-package-manager".

@glemaitre

Copy link
Copy Markdown
Member Author

If someone wants to debug and reproduce the environment, they cannot use a simple requirements file anymore.

OK I see. I was not considering this use case.

@thomass-dev

thomass-dev commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Also, "how to update lockfiles" should be documented, both when adding a new dependency or when dependencies have to be upgraded.

In a way, this PR forces maintainers to adopt pixi.

Comment thread .github/dependabot.yml Outdated
Comment on lines +12 to +14
# Python deps are now resolved by pixi (see `pixi.toml` / `pixi.lock`).
# Dependabot has no native pixi ecosystem; refresh the lockfile with `pixi update`
# (manually or via a scheduled workflow).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is really not cool :(.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can create a bot as we do in skrub that open a PR weekly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes, we should

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maintaining our own dependabot 😅 .

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we are maintaining a whole in-house dependency tracking system right now, so I think it is a net improvement tbh

@thomass-dev thomass-dev Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

whole in-house dependency tracking system

That's not true, and it's really unfair. 😉

Before, we used:

  • pyproject.toml to define dependencies,
  • a txt file to override dependencies (matrix),
  • a bash script to read the txt file and generate requirements.txt files using uv.

With this PR, you need:

  • pyproject.toml to define dependencies,
  • a pixi.toml to define dependencies,
  • a pixi command to read the pixi.toml file and generate the pixi.lock.

Also, the txt file was used in the CI, so with one file we were able to generate lockfiles and to control matrix in the CI. With this PR, we have to redefine matrix both in the CI and in the pixi.toml.

The underlying system is the same, in a different language pixi vs bash+uv: defining lockfiles.

The only advantage is the invisible venv management in the CI + the automatic lockfiles check.
This latest advantage is mitigated by the fact that a replacement for dependabot needs to be created.
Otherwise, the complexity in the CI is strictly the same, and i'm still not convinced.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

whole in-house dependency tracking system

That's not true, and it's really unfair. 😉

pip-compile.sh and supported-versions.json are an attempt at a home-grown dependency tracking system, and it works fine, don't get me wrong!

But it's less powerful (e.g granularity of lock files), less standard, and less well-documented than a bespoke tool like pixi or uv

Comment thread .github/workflows/pytest.yml
Comment thread CONTRIBUTING.rst
@glemaitre

Copy link
Copy Markdown
Member Author

It's not only "if one is interested in".

The lockfiles used in the CI are now only in pixi "language".
If someone wants to debug and reproduce the environment, they cannot use a simple requirements file anymore.
He has to use pixi, where requirements.txt was more "cross-package-manager".

I added a pixi task that could help at exporting a pure requirements.txt file. Maybe we can revisit when pylock.toml is supported.

@rouk1 rouk1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Image

🤣

Side note: cursor/vscode never succeed in auto enabling the correct pixi venv.

Comment thread CONTRIBUTING.rst
Comment thread .github/workflows/sphinx.yml Outdated
Comment thread .github/workflows/sphinx.yml Outdated
@jeromedockes

Copy link
Copy Markdown
Collaborator

FWIW the pixi workflow proposed by @glemaitre is more or less what he set up for skrub like 1.5 year ago and it has worked well for skrub. personally I don't use pixi for my day-to-day work, only when there is an error in one of the CI jobs that I don't reproduce in my local env I will run pixi run -e ci-env-name pytest test_.py::test_it. the pixi run -e <env> part I copy-paste from the ci log. so I would say I use pixi less than monthly. Usually when I do it is for the env using the nightly builds of scientific packages which are not on PyPI or conda-forge but on other indexes so just doing pixi run -e ci-nightly-deps is convenient (I'm sure there are other ways besides pixi to have that convenience)

@thomass-dev

thomass-dev commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This message is meant to be factual, and i'm looking for arguments in favor of pixi (i hope this isn't taken as passive-aggressive).

FWIW the pixi workflow proposed by @glemaitre is more or less what he set up for skrub like 1.5 year ago and it has worked well for skrub. personally I don't use pixi for my day-to-day work, only when there is an error in one of the CI jobs that I don't reproduce in my local env I will run pixi run -e ci-env-name pytest test_.py::test_it. the pixi run -e <env> part I copy-paste from the ci log. so I would say I use pixi less than monthly. Usually when I do it is for the env using the nightly builds of scientific packages which are not on PyPI or conda-forge but on other indexes so just doing pixi run -e ci-nightly-deps is convenient (I'm sure there are other ways besides pixi to have that convenience)

So what is the benefit of changing the CI from uv+bash+gh to pixi+gh? The argument of "bash" doesn't convince me, pixi is another language to learn, and the diff +30K -5K neither. The same goes for reproducibility; that's what lockfiles are for, whether you're using pixi or not.

I'm not convinced.

(by the way, i'm starting my review)

Comment thread .github/workflows/sphinx.yml
Comment thread .github/workflows/sphinx.yml
Comment thread CONTRIBUTING.rst Outdated
Comment thread CONTRIBUTING.rst Outdated
@jeromedockes

Copy link
Copy Markdown
Collaborator

and i'm looking for arguments in favor of pixi

I wasn't arguing for or against pixi, just saying what was my experience with this setup in another project. I don't have an opinion either way.

(i hope this isn't taken as passive-aggressive).

don't worry :) it did not come across like that

@thomass-dev

Copy link
Copy Markdown
Collaborator

This message is meant to be factual, and i'm looking for arguments in favor of pixi (i hope this isn't taken as passive-aggressive).

FWIW the pixi workflow proposed by @glemaitre is more or less what he set up for skrub like 1.5 year ago and it has worked well for skrub. personally I don't use pixi for my day-to-day work, only when there is an error in one of the CI jobs that I don't reproduce in my local env I will run pixi run -e ci-env-name pytest test_.py::test_it. the pixi run -e <env> part I copy-paste from the ci log. so I would say I use pixi less than monthly. Usually when I do it is for the env using the nightly builds of scientific packages which are not on PyPI or conda-forge but on other indexes so just doing pixi run -e ci-nightly-deps is convenient (I'm sure there are other ways besides pixi to have that convenience)

So what is the benefit of changing the CI from uv+bash+gh to pixi+gh? The argument of "bash" doesn't convince me, pixi is another language to learn, and the diff +30K -5K neither. The same goes for reproducibility; that's what lockfiles are for, whether you're using pixi or not.

I'm not convinced.

(by the way, i'm starting my review)

Sorry @jeromedockes , in fact my message was implicitly addressed to @glemaitre .

Comment thread .github/workflows/pytest.yml
# Conflicts:
#	.github/workflows/lint.yml
#	.github/workflows/pr-display-code-coverage.yml
#	.github/workflows/pytest.yml
#	.github/workflows/sphinx.yml
#	ci/requirements/skore/python-3.11/scikit-learn-1.6/test-requirements.txt
#	ci/requirements/skore/python-3.11/scikit-learn-1.6_and_mlflow-2/test-requirements.txt
#	ci/requirements/skore/python-3.11/scikit-learn-1.9/test-requirements.txt
#	ci/requirements/skore/python-3.12/scikit-learn-1.6/test-requirements.txt
#	ci/requirements/skore/python-3.12/scikit-learn-1.9/test-requirements.txt
#	ci/requirements/skore/python-3.13/scikit-learn-1.6/test-requirements.txt
#	ci/requirements/skore/python-3.13/scikit-learn-1.9/test-requirements.txt
#	ci/requirements/skore/python-3.14/scikit-learn-1.7/test-requirements.txt
#	ci/requirements/skore/python-3.14/scikit-learn-1.8/test-requirements.txt
#	ci/requirements/skore/python-3.14/scikit-learn-1.9/sphinx-requirements.txt
#	ci/requirements/skore/python-3.14/scikit-learn-1.9/test-requirements.txt
#	ci/requirements/skore/python-3.14/scikit-learn-1.9_and_mlflow-3/test-requirements.txt
#	ci/requirements/skore/python-3.14/scikit-learn-1.9_and_pandas-2/test-requirements.txt
#	docs/how-to/bump-minimal-python-version.md
@glemaitre

Copy link
Copy Markdown
Member Author

Side note: cursor/vscode never succeed in auto enabling the correct pixi venv.

It is weird, it works normally with the Python extension out of the box.

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.

ci: move from multi-package to mono-package chore: Use pixi for the CI and one of the way to get started

5 participants