laser-measles/- Git submodule containing the core laser-measles frameworksrc/project/- Project-specific extensions and customizationstests/- Project-specific test files
After cloning this repository, you need to initialize and update the submodule:
git submodule update --init --recursiveTo configure the submodule to use a specific tag (e.g., v0.7.2-dev3):
-
Navigate to the submodule directory:
cd laser-measles -
Checkout the desired tag:
git checkout v0.7.2-dev3
-
Return to the project root and commit the submodule reference:
cd .. git add laser-measles git commit -m "Update submodule to v0.7.2-dev3"
To update the submodule to the latest commit on its default branch:
git submodule update --remote laser-measles- Python 3.11+ (recommended)
- Git
-
Clone the repository with submodules:
git clone --recurse-submodules <repository-url> cd laser_measles_project_template
-
Install UV (Python package manager):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Install project and dependencies:
# This creates a virtual environment and installs all dependencies uv sync # Install laser-measles submodule cd laser-measles uv pip install -e ".[dev]" cd ..
-
Verify installation:
# Activate the environment source .venv/bin/activate # On Windows: .venv\Scripts\activate # Run tests to ensure everything is working cd laser-measles pytest tests/unit/ -v cd ..
For full development including examples and documentation for laser-measles:
cd laser-measles
uv pip install -e ".[full]"
cd ..After installation, you can run a basic model:
from laser_measles.abm import ABMModel, ABMParams
from laser_measles.scenarios.synthetic import SyntheticScenario
# Create a simple scenario and model
scenario = SyntheticScenario(num_patches=10, population_size=10000)
params = ABMParams(num_ticks=365, use_numba=False)
model = ABMModel(scenario, params, name="test_model")
# Add basic components and run
from laser_measles.abm.components import *
model.components = [
ProcessVitalDynamics,
ProcessInfection,
ProcessTransmission,
TrackerState
]
model.run()