Installation#

Requirements#

  • Python 3.11 or higher

  • pip or uv package manager

  • Git

Install from GitHub#

pip install git+https://github.com/PolicyEngine/policyengine-nz.git

Install from source#

For development or to get the latest changes:

git clone https://github.com/PolicyEngine/policyengine-nz.git
cd policyengine-nz
pip install -e ".[dev]"

Verify installation#

Test that the installation works:

import policyengine_nz
from policyengine_nz import NewZealandTaxBenefitSystem

# Create system
system = NewZealandTaxBenefitSystem()
print("PolicyEngine New Zealand installed successfully!")

Development setup#

For developers working on PolicyEngine New Zealand:

# Clone repository
git clone https://github.com/PolicyEngine/policyengine-nz.git
cd policyengine-nz

# Install with development dependencies
uv sync --dev

# Run tests to verify setup
uv run pytest

# Run policy tests
uv run pytest policyengine_nz/tests/policy

# Format code
uv run ruff format .