Skip to content

Migrate from conda/micromamba to pixi#674

Merged
timmens merged 18 commits intomainfrom
migrate-conda-to-pixi
Mar 12, 2026
Merged

Migrate from conda/micromamba to pixi#674
timmens merged 18 commits intomainfrom
migrate-conda-to-pixi

Conversation

@timmens
Copy link
Member

@timmens timmens commented Mar 10, 2026

Summary

  • Replace conda/micromamba environment management with pixi, embedding all configuration in pyproject.toml
  • Rewrite CI workflows (main.yml, .readthedocs.yml) to use prefix-dev/setup-pixi and pixi run
  • Remove old conda files (environment.yml, .tools/envs/testenv-*.yml, .tools/update_envs.py, docs/rtd_environment.yml)
  • Update developer docs and check_mypy_versions.py to reference pixi instead of conda
  • Drop support for Python 3.10 and 3.11
  • Add support for Python 3.14
  • Set minimal lower level versions of packages to versions released 2-3 years ago and compatible with py312

Details

All environments (default dev, test-linux, test-py, old-pandas/numpy/plotly, nevergrad, docs) are defined in [tool.pixi.environments] with feature composition. Linux-specific deps (JAX, PETSc) use separate solve-groups to avoid cross-platform conflicts.

Replace conda environment.yml files and micromamba-based CI with pixi
configuration embedded in pyproject.toml. This simplifies environment
management by using a single source of truth for all dependencies.

- Add [tool.pixi.*] sections to pyproject.toml with all environments
- Rewrite CI workflow to use prefix-dev/setup-pixi
- Update .readthedocs.yml to use pixi via asdf
- Remove old conda files (environment.yml, testenv-*.yml, update_envs.py)
- Update check_mypy_versions.py to read from pyproject.toml
- Update developer docs to reference pixi commands
- Bump check-added-large-files maxkb to accommodate pixi.lock

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

timmens and others added 2 commits March 10, 2026 13:32
- Move optimizer backends and viz libs from test feature to base deps
- Create separate typecheck env with mypy + type stubs
- Slim down docs feature to only sphinx tooling + doc-specific deps
- Slim down default env to just base + test (no typecheck/docs)
- Rename docs task to build-docs
- Remove pixi install from RTD config (pixi run handles it)
- Remove pre-commit/pdbp from pixi deps (install globally)
- Update contributor guide: explain global pre-commit install
- Fix two pre-existing mypy errors in history.py and slice_plot_3d.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move optimizer backends and viz libs from test feature to base deps
- Create separate typecheck env with mypy + type stubs
- Slim down docs feature to only sphinx tooling + doc-specific deps
- Slim down default env to just base + test (no typecheck/docs)
- Rename docs task to build-docs
- Remove pixi install from RTD config (pixi run handles it)
- Remove pre-commit/pdbp from pixi deps (install globally)
- Update contributor guide: explain global pre-commit install
- Revert unrelated algorithms.py changes from pre-commit hook
- Fix two pre-existing mypy errors in history.py and slice_plot_3d.py
- Pin pandas<3 for gradient-free-optimizers compatibility
- Pin gradient-free-optimizers>=1.6.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timmens timmens mentioned this pull request Mar 10, 2026
timmens and others added 2 commits March 10, 2026 13:55
JAX 0.3.0 (resolved for py310) references scipy.linalg.tril which was
removed in newer scipy. Pin to >=0.4.1 to ensure compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RTD's build step conflicts with custom pixi-based builds when a sphinx
configuration is declared. Move the build to post_build (matching the
dags pattern) and remove the sphinx section so RTD doesn't try to run
its own sphinx build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/optimagic/algorithms.py 88.82% <100.00%> (ø)
src/optimagic/config.py 100.00% <ø> (ø)
src/optimagic/optimization/history.py 93.63% <100.00%> (ø)
src/optimagic/shared/compat.py 100.00% <100.00%> (+16.66%) ⬆️
src/optimagic/visualization/slice_plot_3d.py 94.80% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

timmens and others added 13 commits March 10, 2026 14:26
- Update requires-python to >=3.12, add 3.14 classifier
- Set Python 3.14 as default dev, typecheck, and docs version
- Remove py310/py311 pixi features, CI matrix entries, and environments
- Add py314 pixi feature and environments across linux, mac/win, nevergrad
- Remove test-old-pandas env (pandas <2 incompatible with Python 3.12+)
- Remove petsc4py upper bound pin (no 3.14 builds at <=3.23.4)
- Update ruff target-version to py312
- Update publish workflow and RTD config Python versions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Also fix missing return in compat.py and end-of-file in config.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set target to auto (base branch coverage) with 1% threshold to avoid
failing on infrastructure PRs that don't change code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
--cov=./ measured coverage of the entire repo including .tools/ and other
non-source files. Scoping to src/optimagic gives accurate results and
restores the codecov/project check. Also reverts the codecov target change
since the root cause is now fixed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
--cov=src/optimagic excluded src/estimagic from coverage. Using --cov=src
captures both packages while still avoiding .pixi/envs/ contamination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timmens timmens merged commit 760ac83 into main Mar 12, 2026
21 checks passed
@timmens timmens deleted the migrate-conda-to-pixi branch March 12, 2026 12:25
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