Skip to content

Generate conda env files from pixi and bump pytensor and pytensor-ml - #78

Merged
bwengals merged 4 commits into
pymc-devs:mainfrom
jessegrabowski:export-conda-envs
Nov 11, 2026
Merged

bwengals merged 4 commits into
pymc-devs:mainfrom
jessegrabowski:export-conda-envs

Conversation

@jessegrabowski

@jessegrabowski jessegrabowski commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Added scripts/export_conda_envs.py, a script that writes conda_envs/environment.yaml, environment-test.yaml, and environment-docs.yaml from the pixi default, test, and docs environments. The new pixi-export-envs pre-commit hook runs it, and pixi-lock-check fails when pixi.lock is out of sync with pyproject.toml.

The script edits pixi's export before writing it. Only the dev file keeps the editable install, rewritten to -e .. because conda runs pip from the env file's directory. Pip lines for packages the conda section already lists are dropped, so pip install -U can't replace a conda-forge build with a wheel.

pytensor is now pinned to >=3.3.8,<3.4 and pytensor-ml to >=0.4.0,<0.5.0.


📚 Documentation preview 📚: https://ptgp--78.org.readthedocs.build/en/78/

@bwengals bwengals left a comment

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.

Two small things:

  1. A couple of places still say to keep the env files in sync by hand: AGENTS.md ("Keep all three in sync with the pixi manifest.") and docs/source/dev/docs.rst ("keep that env file's pins in sync with the pixi docs feature").
  2. CI pins pixi to v0.81.0, but nothing pins it locally. If a different pixi version formats the export differently, the hook could pass locally and fail in CI, or the reverse. Would requires-pixi in [tool.pixi.workspace] be worth adding, or is the export format stable enough that it doesn't matter?

@jessegrabowski

Copy link
Copy Markdown
Member Author

i think it's a good idea to pin pixi version regardless, i'll do it.

@jessegrabowski

Copy link
Copy Markdown
Member Author

donr

@bwengals
bwengals merged commit 1353d1e into pymc-devs:main Nov 11, 2026
7 checks passed
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