v2.0: migrate template from environment.yml/micromamba to pixi#1
Merged
Conversation
Switch the template's dep-manifest from environment.yml/micromamba to
pixi.toml + pixi.lock. Lockfile is committed, pins linux-64 + osx-arm64 +
win-64. Channels: conda-forge + bioconda (snakemake is not on conda-forge).
Mechanics
- pixi.toml: workspace name {{REPO_NAME}}, dependencies mirror env.yml core,
feature.docs (mystmd) and feature.tests (pytest) split out, tasks for run /
book / lab. pixi accepts the {{REPO_NAME}} placeholder; /init-template
substitutes it.
- pixi.lock: 12k-line per-platform lockfile, 3 envs (default + docs + tests).
- environment.yml deleted; v1.0-environment-yml tag (pushed) preserves the
old flow for existing forks.
Build / CI
- Dockerfile: mambaorg/micromamba -> ghcr.io/prefix-dev/pixi:0.68.1, install
from pixi.lock, drop the micromamba entrypoint, CMD via pixi run.
- ci.yml + jupyter-book.yml: setup-micromamba -> prefix-dev/setup-pixi@v0.9
with locked + cache; all run steps become pixi run. jupyter-book.yml uses
the docs feature; setup-node + npm install -g mystmd is removed (mystmd
ships from conda-forge now).
- docker.yml: unchanged except its first-run guard now includes *.toml.
- All three workflow guards now scan *.toml so pixi.toml's {{REPO_NAME}}
placeholder is detected during scaffold runs.
Docs
- docs/cicd-conventions.md: major rewrite — "environment.yml is the single
source of truth" -> "pixi.toml is the single source of truth"; old
snakemake-via-pip workaround section dropped; all examples use pixi run.
Audit step adds a pixi.lock-staleness check.
- docs/fair4rs-checklist.md, ro-crate.md, verify-before-drafting.md,
nanopub-chain-discovery.md, domain-flavours/{_template, biodiversity-eo}.md:
references to environment.yml swapped to pixi.toml + pixi.lock.
- grid4earth-benchmark.md flavour deferred (separate release).
Operating manual
- CLAUDE.md, DOMAIN.md: I (Interoperable) evidence and Phase 2 + document map
point to pixi.toml + pixi.lock.
- .claude/settings.json: Bash(pixi *) added to allowlist.
- .claude/agents/replication-coder.md + .claude/skills/{replication-study,
init-template, import-from-nanopub}/SKILL.md: env.yml -> pixi.toml; starter
files for /import-from-nanopub now include pixi.toml + pixi.lock.
Repo metadata
- README.md, index.md, notebooks/README.md: quick-start uses pixi install +
pixi run snakemake; structure block names pixi.toml + pixi.lock.
- ro-crate-metadata.json: replaces environment.yml ConfigurationFile entry
with pixi.toml + pixi.lock (both ConfigurationFile; both Workflow inputs).
- scripts/import-nanopub-chain.py: STARTER_FILES enumeration now ships
pixi.toml + pixi.lock; user-facing merge instructions rewritten.
- .gitignore: ignore .pixi/ install cache and .snakemake/ run cache;
pixi.lock is NOT ignored.
Acceptance (osx-arm64)
- pixi install --locked: green; lockfile stable.
- pixi run snakemake --cores 1 -n: dry-run produces the scaffold DAG.
- pixi run -e docs myst build --html: builds the Jupyter Book to _build/html.
setup-pixi only publishes patch-level tags. CI failed at action resolution on first push. Pin to the current latest, v0.9.6.
The pre-existing v1 guards used `if ... | head -1 > /dev/null` which always returns 0 under bash without pipefail (the GH Actions default when shell is unspecified) — so the guard fired even when no placeholders remained. Rewrite each guard to capture the grep output into a variable and check it with `[ -n "$..." ]`. Also relax the init-template skill exclusion from `^./...` to a path-fragment match (`claude/skills/init-template/`) — strict `^./` anchor only matches when grep emits `./` prefix, which differs between greps. Also fix the pages_check guard in jupyter-book.yml the same way: `gh api ... | head -1 > /dev/null` always succeeds and flagged Pages as enabled on repos where it isn't, causing the deploy step to 404. Validated end-to-end on a trial substituted-state repo: - ci.yml ran setup-pixi + pixi install + pixi run snakemake green (41s). - jupyter-book.yml build step ran setup-pixi (docs env) + pixi run jupytext + pixi run jupyter execute + pixi run -e docs myst build green (1m01s).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
environment.yml+mamba-org/setup-micromamba@v3withpixi.toml+pixi.lock+prefix-dev/setup-pixi@v0.9. Lockfile is committed and pins linux-64 + osx-arm64 + win-64. Channels:conda-forge+bioconda(snakemake is not on conda-forge).v1.0-environment-ymlalready pushed for existing forks that need the old flow.ghcr.io/prefix-dev/pixi:0.68.1;jupyter-book.ymldropssetup-node+npm install -g mystmd(mystmd now ships from conda-forge viafeature.docs).docs/cicd-conventions.mdfor the rewritten conventions doc and the new audit step (pixi install --locked && git diff --exit-code pixi.lock).Deviations from the original migration plan
channels = ["conda-forge", "bioconda"], not["conda-forge"]alone — the plan assumed snakemake was on conda-forge; it is bioconda-only. Pixi handles the multi-channel solve cleanly.setup-pixi@v0.9(actual current major; plan said v0.8.x).ci.yml,jupyter-book.yml,docker.yml) now also scan*.tomlsopixi.toml's{{REPO_NAME}}placeholder triggers the scaffold-skip path..snakemake/added to.gitignorealongside.pixi/.Test plan
pixi install --lockedclean on osx-arm64 (all 3 envs: default, docs, tests).pixi run snakemake --cores 1 -nproduces the scaffold DAG.pixi run -e docs myst build --htmlwrites_build/html/.{{REPO_NAME}}inpixi.toml.ci.yml,jupyter-book.yml)./init-template, verify{{REPO_NAME}}substitutes inpixi.toml, CI stays green end-to-end.After merge
v2.0.0release with body: "Default dep manifest is nowpixi.toml+pixi.lock. For the previousenvironment.yml/micromamba flow, pin to tagv1.0-environment-yml."