A monorepo containing two Python libraries that share the sim_sci_test_monorepo namespace:
sim_sci_test_monorepo.core- Core functionality and utilitiessim_sci_test_monorepo.public_health- Public health specific functionality
sim_sci_test_monorepo/
├── libs/
│ ├── core/ # Core library
│ │ ├── src/
│ │ │ └── sim_sci_test_monorepo/
│ │ │ └── core/ # Core package
│ │ ├── tests/ # Core tests
│ │ ├── pyproject.toml # Core build configuration
│ │ └── README.md
│ └── public_health/ # Public health library
│ ├── src/
│ │ └── sim_sci_test_monorepo/
│ │ └── public_health/ # Public health package
│ ├── tests/ # Public health tests
│ ├── pyproject.toml # Public health build configuration
│ └── README.md
├── pyproject.toml # Root configuration
├── Makefile # Development tasks
└── README.md
This project uses uv for fast Python package management. Install it first:
curl -LsSf https://astral.sh/uv/install.sh | shTo install both libraries in development mode:
make installOr install with development dependencies:
make install-devYou can also install libraries individually:
# Core library only
uv pip install -e libs/core
# Public health library only (includes core as dependency)
uv pip install -e libs/public_healthBoth libraries share the sim_sci_test_monorepo namespace:
# Import from core
from sim_sci_test_monorepo.core.utils import hello_core, CoreUtility
# Import from public health
from sim_sci_test_monorepo.public_health.models import hello_public_health, HealthModel
# Example usage
print(hello_core()) # Hello from sim_sci_test_monorepo.core!
print(hello_public_health()) # Hello from sim_sci_test_monorepo.public_health!
core_util = CoreUtility("example")
print(core_util.greet()) # Core utility example is ready!
health_model = HealthModel("flu_model", 10000)
print(health_model.simulate()) # Simulating flu_model for population of 10000# Run all tests
make test
# Run core tests only
make test-core
# Run public health tests only
make test-public-healthThis project uses setuptools_scm for automatic versioning based on git tags. Each package has its own version tags:
- Core package:
core-v1.2.3 - Public health package:
public-health-v1.2.3
To check the current version:
make versionYou can release each package independently:
- Use the GitHub Actions "release" workflow
- Select "core" as the package
- Provide a version number (e.g.,
1.2.3) - This creates a
core-v1.2.3tag and triggers deployment
- Use the GitHub Actions "release" workflow
- Select "public_health" as the package
- Provide a version number (e.g.,
1.2.3) - This creates a
public-health-v1.2.3tag and triggers deployment
The deploy workflow automatically triggers when releases are published.
# Format code
make format
# Lint code
make lintmake cleanThe libraries use Python namespace packages, allowing them to be:
- Developed and distributed separately
- Installed independently or together
- Share the same top-level namespace (
sim_sci_test_monorepo)
Each library has its own:
pyproject.tomlfor build configuration and dependencies- Test suite
- Documentation
- Version management