Metadata-Version: 2.4
Name: snt-malaria-budgeting
Version: 0.1.2
Summary: A Python library for calculating malaria intervention budgets
Author: PATH, IDM, Bluesquare
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/BLSQ/snt-malaria-budgeting
Project-URL: Repository, https://github.com/BLSQ/snt-malaria-budgeting
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: openpyxl
Requires-Dist: pydantic
Requires-Dist: python-dotenv
Requires-Dist: cachetools
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: build<2,>=1.3; extra == "dev"
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov>=2.0; extra == "dev"
Requires-Dist: ruff==0.13.1; extra == "dev"
Requires-Dist: mypy>=0.812; extra == "dev"
Requires-Dist: pandas-stubs; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=6.0; extra == "test"
Requires-Dist: pytest-cov>=2.0; extra == "test"
Dynamic: license-file

# SNT Malaria Budgeting

A Python library for calculating malaria intervention budgets across different countries and time periods.

## Installation

Install the package and its dependencies:

```bash
pip install -r requirements.txt
```

## Example usage

To fetch budgets for a given country and years:

```python
from snt_malaria_budgeting import get_budget

country = "DRC"
start_year = 2025
end_year = 2027
interventions = [
    {"name": "smc", "type": "SP+AQ", "places": ["Tshopo:Opala"]},
    {"name": "vacc", "type": "R21", "places": ["Tshopo:Opala"]},
    {"name": "iptp", "type": "SP", "places": ["Tshopo:Opala"]},
]
settings = {
    "smc_buffer": 1.5,
    "vacc_doses_per_child": 4,
    "currency": "NGN",
}

budgets = []

for year in range(start_year, end_year + 1):
    print(f"Fetching budget for year: {year}")
    budgets.append(
        get_budget(
            country=country,
            year=year,
            interventions_input=interventions,
            settings=settings,
            cost_df=cost_df,
            population_df=population_df,
            cost_overrides=[], # optional
        )
    )

print(budgets)
```

## Development

### Running Tests

```bash
pip install pytest pytest-cov
```

Run the test suite:

```bash
pytest
pytest -v # verbose output
pytest --cov=snt_malaria_budgeting --cov-report=html # with coverage report

# specific test files or methods:
pytest tests/core/test_budget_calculator.py
pytest tests/core/test_budget_calculator.py::TestBudgetCalculator::test_iptp_quantification
```
