Develop Dyno¶
This guide is for contributors: it explains how to clone the dyno.py repository and set up its development environments with Pixi. To use Dyno in your own project, see Install Dyno instead.
The development workspace currently targets linux-64 only (see platforms in pixi.toml).
Package Manager: Pixi¶
Dyno is managed using Pixi, a modern cross-platform package and workflow manager built on top of the Conda ecosystem. Pixi ensures deterministic, reproducible environments with lockfile guarantees.
[!TIP] We recommend using Pixi for all Dyno development tasks. Avoid running
piporpoetrydirectly in the project repository to prevent dependency divergence.
Installing Pixi¶
If you do not have Pixi installed on your system:
Cloning and Environment Setup¶
Clone the repository and install all dependencies:
git clone https://github.com/EconForge/dyno.py.git
cd dyno.py
# Install dependencies and setup default dev environment
pixi install -e dev
Pixi creates a virtual environment under .pixi/envs/dev with Python 3.12, PyTest, NumPy, SciPy, SymPy, Pandas, Altair, Lark, and development tooling.
Pixi Environments and Features¶
Dyno defines modular features and environments in pixi.toml to support different use cases:
| Environment | Purpose | Key Packages |
|---|---|---|
dev (default) |
Full development environment | pytest, mypy, black, jupyterlab, zensical |
test |
Lean CI test runner | pytest, coverage, pytest-cov |
dynare |
Full Dynare preprocessor integration | dynare-preprocessor-pylib |
prod |
Production / runtime notebook environment | jupyter, numpy, scipy, pandas |
Dyno Lab (JupyterLab Extension)¶
The dev and prod environments already include JupyterLab and Dyno Lab (jupyterlab-dyno, from the jupyter feature in pixi.toml). To launch JupyterLab with Dyno Lab enabled:
For more details, see the Dyno Lab Documentation.
Running Commands in Environments¶
To run commands or tasks within an environment, use the -e flag:
# Run test suite
pixi run -e dev test
# Run static type checking
pixi run -e dev typecheck
# Code formatting check
pixi run -e dev black
# Serve documentation locally
pixi run -e dev docs
Optional: Dynare Preprocessor¶
Dyno includes its own native Lark-based parser for .mod files that does not require any external C++ binaries. However, if you wish to use the official Dynare preprocessor via DynareModel for maximum fidelity with Dynare C++ syntax:
The preprocessor is packaged on the econforge prefix channel as dynare-preprocessor-pylib.
Verifying the Installation¶
To verify that your installation is working correctly, run a quick Python check:
You are now ready to write and solve your first economic model!