Pixi workspace and pre-submit conventions
This document describes how pixi and the pre-submit pipeline are configured for this package. The same structure is shared across the mojo-* libraries so behaviour is predictable.
Workspace configuration
platforms = ["linux-64", "linux-aarch64", "osx-arm64"]channels = ["conda-forge", "https://conda.modular.com/max"]name = "mojo-*"(per-repository)MOJO_PATHis set via activation to$PIXI_PROJECT_ROOT/srcsomojo -I srcworks consistently.
Core tasks
Development
mojo-versionβ prints the Mojo compiler version available in the pixi environment.
Tests
test-allrunspython scripts/run_tests.py.- The Python runner:
- auto-discovers
tests/test_*.mojofiles, - runs each with
mojo -I src, and - reports a summary at the end.
- auto-discovers
Individual test-* tasks may exist for focused development, but test-all is the canonical entry point and is what pre-submit uses.
Build
build-packagerunsmojo packageto produce a.mojopkgartefact underdist/.cleanremoves build and test artefacts (dist,__pycache__,.pytest_cache, and the local.mojopkgfile).
Code quality
pre-commitβ runs all pre-commit hooks for this repository.pre-commit-installβ installs the git hooks for local development.
Pre-submit for modular-community
There are two equivalent tasks:
pre-submitpre-submit-modular-community
Both run python scripts/pre_submit_checklist.py, which performs:
- Tests β
pixi run test-allfor the full test suite. - Recipe validation β
./scripts/validate-recipe.sh packaging/recipe.yamlagainst the modular-community schema. - Package build β
./scripts/build-recipe.sh, usingrattler-buildwith tests disabled (tests are already covered bytest-all). - Git tag check β ensures a
v<version>tag exists and matchesHEAD. - Install check β creates a temporary pixi project, adds a file:// channel pointing at
output/, and verifies that the built package can be installed and that the expected files appear under.pixi/envs/default/lib/mojo. - Optional modular-community build β when invoked with
--modular-community(or when the environment is configured accordingly), runspixi run build-allin a local clone of themodular-communityrepository to mirror CI behaviour.
The script prints a summary of all checks and a short list of next steps (push tag, update modular-community recipe, trigger CI) when everything passes.
Core dependencies
The shared core dependencies across the mojo-* libraries are:
mojoβ the Modular toolchain (==1.0.0b1).pythonβ used for the test runner, benchmarks, and pre-submit tooling (">=3.11,<4").pre-commitβ for local code quality checks (">=4.5.1,<5").rattler-buildβ for building conda packages (">=0.55.1,<0.56").
Each repository may add extra dependencies (for example benchmark counterparts such as asciichartpy, python-dotenv, pyyaml, or tomli-w) but the core tooling above is consistent.
Relationship to modular-community
- The
pre-submit/pre-submit-modular-communitytask is designed as a local analogue of the modular-community CI pipeline. - A successful run means:
- tests pass,
- the recipe is structurally valid,
- the package can be built locally with
rattler-build, - the git tag and version are aligned, and
- the built artefact can be installed into a fresh environment.
- When the optional modular-community step is enabled, the same
build-allpipeline that CI uses will be exercised locally, reducing surprises when opening or updating a recipe PR.
This document should stay in sync with the pixi.toml and scripts/pre_submit_checklist.py files; when those change in a material way, please update this file as part of the same change set.