Move runtime env configuration into .projio/config.yml¶
Problem¶
Projects currently configure conda environments via ad-hoc mechanisms:
- workflow/runtime.env (pixecog) — shell vars like PYTHON, PYTHON_DOCS, CONDA_ENV
- .projio/projio.mk — hardcoded env paths (labpy for MKDOCS, etc.) that get stale
- MCP tools parse Makefile vars (_resolve_project_python(), _resolve_docs_python()) — fragile, indirect
This creates drift: runtime.env says docs use rag, projio.mk hardcodes labpy for MKDOCS, MCP tools resolve yet another path.
Proposed design¶
Add code.envs section to .projio/config.yml:
code:
project_utils: code/utils
conda_prefix: /storage/share/python/environments/Anaconda3
envs:
default: cogpy # pipelines, notebooks, snakemake
docs: rag # mkdocs site builds
rag: rag # RAG index builds
What changes¶
- projio config schema — add
code.envsandcode.conda_prefixfields - projio.mk generation — read envs from config instead of hardcoding.
MKDOCS,PYTHON,DATALADetc. derived fromconda_prefix+envs.{purpose} - MCP tools —
_resolve_project_python()and_resolve_docs_python()read from config, not Makefile parsing - pipeio_nb_exec —
envparameter becomes optional; defaults tocode.envs.defaultfrom config - site_build — uses
code.envs.docsfrom config - projio sync — validates that configured envs exist, warns if stale
Migration for pixecog¶
- Add
code.envsto.projio/config.yml - Delete
workflow/runtime.env - Delete
workflow/config.yml,workflow/Snakefile,workflow/mod_registry.yml,workflow/pipe_flow_mod_registry.yml(all stale, replaced by pipeio) - Keep
workflow/docs.mkuntil targets absorbed byprojio.mk - Update
Makefileto removeinclude workflow/runtime.env
Key constraint¶
projio.mk must be fully derivable from .projio/config.yml — no project-specific hardcoded paths in the generated file.
Source context: pixecog¶
PixEcog (pixecog): Neuropixels and ECoG dataset and analysis
Recent commits:
9b2f6fa Scaffold ecephys TTL removal mod, flow overview + mod docs, demo notebook
80194af Add TTL characterization & removal demo notebook (preprocess_ieeg)
dc93496 Update mkdocs pipeline nav
README:
type: readme
Quick Start for Collaborators¶
Follow this checklist to get started with Pixecog documentation and workflows.
🐀 Pixecog Project — Compact Overview¶
Core principles
- One immutable BIDS raw dataset (
raw/) as the canonical baseline - Each analysis pipeline ha
Related Notes¶
- issue-arash-20260407-033705-872924.md — Directly related: adds kernel/env option to pipeio_nb_exec, which this note proposes should default to code.envs.default from config
- issue-arash-20260407-040507-512890.md — Related: pipeio_nb_exec python_bin resolution bug — same subsystem being redesigned in this note
- issue-arash-20260402-220237-298776.md — Related: projio MCP tools update — overlaps with proposed changes to _resolve_project_python() and _resolve_docs_python()