Metadata-Version: 2.4
Name: policyengine-core
Version: 3.25.4
Summary: Core microsimulation engine enabling country-specific policy models.
Project-URL: Homepage, https://github.com/policyengine/policyengine-core
Author-email: PolicyEngine <hello@policyengine.org>
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.9
Requires-Dist: dpath<3
Requires-Dist: h5py<4,>=3
Requires-Dist: huggingface-hub>=0.25.1
Requires-Dist: ipython<9,>=8
Requires-Dist: microdf-python>=1.0.0
Requires-Dist: numexpr<3
Requires-Dist: numpy<2.1,>=1.26; python_version < '3.10'
Requires-Dist: numpy<3,>=2.1.0; python_version >= '3.10'
Requires-Dist: pandas>=1
Requires-Dist: plotly<6,>=5
Requires-Dist: psutil<7,>=6
Requires-Dist: pytest<9,>=8
Requires-Dist: pyvis>=0.3.2
Requires-Dist: requests<3,>=2
Requires-Dist: sortedcontainers<3
Requires-Dist: standard-imghdr
Requires-Dist: wheel<1
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: coverage; extra == 'dev'
Requires-Dist: furo; extra == 'dev'
Requires-Dist: jupyter-book<1; extra == 'dev'
Requires-Dist: markupsafe==2.0.1; extra == 'dev'
Requires-Dist: mypy==0.991; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-rerunfailures<15,>=10; extra == 'dev'
Requires-Dist: ruff>=0.9.0; extra == 'dev'
Requires-Dist: sphinx-argparse==0.4.0; extra == 'dev'
Requires-Dist: sphinx-math-dollar==1.2.1; extra == 'dev'
Requires-Dist: sphinx==5.0.0; extra == 'dev'
Requires-Dist: towncrier>=24.8.0; extra == 'dev'
Requires-Dist: types-pyyaml==6.0.12.2; extra == 'dev'
Requires-Dist: types-requests==2.28.11.7; extra == 'dev'
Requires-Dist: types-setuptools==65.6.0.2; extra == 'dev'
Requires-Dist: types-urllib3==1.26.25.4; extra == 'dev'
Description-Content-Type: text/markdown

# PolicyEngine Core

[![codecov](https://codecov.io/gh/PolicyEngine/policyengine-core/branch/master/graph/badge.svg?token=BLoCjCf5Qr)](https://codecov.io/gh/PolicyEngine/policyengine-core)
[![PyPI version](https://badge.fury.io/py/policyengine-core.svg)](https://badge.fury.io/py/policyengine-core)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

A fork of [OpenFisca-Core](https://github.com/OpenFisca/OpenFisca-Core) that powers PolicyEngine country models (`policyengine-uk`, `policyengine-us`, `policyengine-canada`, `policyengine-il`, `policyengine-ng`) and the downstream apps and APIs. Provides the simulation engine, parameter tree, variable system, and reform machinery that each country package builds on top of.

## Install

```bash
pip install policyengine-core
```

Supports Python 3.9 – 3.14.

## Usage

Most users reach this package transitively through a country model. Import directly if you're building a new country model, writing a reform, or extending the core:

```python
from policyengine_core.simulations import Simulation
from policyengine_core.reforms import Reform
```

See the [documentation](https://policyengine.github.io/policyengine-core/) for API reference and tutorials.

## Development

```bash
# Install dev dependencies (uses uv)
make install

# Run the full test suite
make test

# Run a single test
uv run pytest tests/core/test_file.py::test_name -v

# Format before committing (CI enforces)
make format
```

**Always use `uv run`** for Python commands; bare `python` / `pytest` / `pip` may pick up the wrong environment.

Contributions: see [CONTRIBUTING.md](./CONTRIBUTING.md) for branching, PR conventions, and the towncrier `changelog.d/` workflow. Default branch is `master`.

## License

Distributed under the AGPL License. See [`LICENSE`](./LICENSE) for details.

## Acknowledgements

- Forked from [OpenFisca-Core](https://github.com/OpenFisca/OpenFisca-Core).
- README template adapted from Othneil Drew's [Best-README-Template](https://github.com/othneildrew/Best-README-Template).
