Development Setup
This page describes the supported local setup for working on Abacus. The project is maintained with local verification scripts rather than a CI-first workflow, so your development environment needs to be able to run linting, pytest, and the packaging smoke checks directly.
Prerequisites
- Python 3.12
- A local environment manager such as Conda
- A writable temporary directory such as
/tmpfor PyTensor caches and package verification artefacts
Create the Development Environment
The simplest supported path is the repository environment file:
If you know you will be running linting and tests frequently, install the optional extras as well:
Local Runtime Defaults
Some parts of the stack need writable cache directories. In restricted or sandboxed environments, set the same defaults used by the repo’s local verification scripts:
The Makefile already applies these defaults for make test and
make smoke_mmm.
Common Commands
Lint and format
These targets cover the package, tests, scripts, and the local verification
entry points in sandbox/.
Tests
Use targeted pytest first when you are working on a narrow area. Run the wider verification commands before closing substantial changes.
Local verification
What these commands do:
make smoke_mmmruns a short end-to-end MMM smoke path against the demo config and demo data.make verify_localruns the retained local verification matrix fromsandbox/run_local_verification.py.make verify_packagebuilds package artefacts and validates an installed package smoke path.make verify_local_allruns the local verification matrix and includes the packaging smoke step.
Important Working Files
| File | Why it matters |
|---|---|
Makefile |
Primary local entry point for lint, test, smoke, and package verification |
environment.yml |
Supported dev environment definition |
pyproject.toml |
Packaging metadata, extras, Ruff, MyPy, and pytest configuration |
sandbox/run_local_verification.py |
Authoritative local verification matrix |
sandbox/run_package_verification.py |
Package build and installed-wheel smoke verification |
ARCHITECTURE.md |
Contributor-facing module map and dependency rules |
Local-Only Areas
The repo contains some directories that are useful locally but are not part of the shipped library surface:
.archive/for archived planning and reference materialassets/engineering/standards/for local documentation and writing standardssandbox/for local scripts and verification entry points
Keep temporary scripts in sandbox/ rather than mixing them into the package.
Troubleshooting
PyTensor cache permission errors
If you see errors related to .pytensor lock files or compiledir creation,
export the runtime defaults shown above and rerun the command.
Package verification fails because build is missing
Run:
The make verify_package target does this automatically.
You are not sure which command to run
As a rule:
- run targeted
pytestandruffwhile iterating - run
make verify_localbefore finishing non-trivial code changes - run
make verify_packagewhen packaging, imports, or bundled assets changed