Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Setup & Workflow

Setup

pylcm uses pixi for dependency management. Python 3.14+ is required.

# Clone the repository
git clone https://github.com/OpenSourceEconomics/pylcm.git
cd pylcm

The first pixi run command will install dependencies automatically, but you can run pixi install explicitly if you prefer. Run pixi task list to see all available tasks.

Install pre-commit hooks (requires prek):

pixi global install prek
prek install

Running Tests

# All tests
pixi run tests

# Tests with coverage
pixi run tests-with-cov

# Specific test file
pixi run pytest tests/test_specific_module.py

# Specific test function
pixi run pytest tests/test_specific_module.py::test_function_name

Code Quality

# Type checking (ty, not mypy)
pixi run ty

# Run all pre-commit hooks
prek run --all-files

Building Documentation

# Build docs
pixi run build-docs

# Live preview (watches for changes)
pixi run view-docs

Contributing

Report bugs and suggest features on the GitHub issue tracker.