[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "openaq" description = "Official OpenAQ Python SDK." readme = "README.md" requires-python = ">=3.10" license = { file = "LICENSE" } keywords = ["air quality", "environment", "openaq"] maintainers = [ { name = "OpenAQ", email = "dev@openaq.org" }, ] authors = [ { name = "Russ Biggs", email = "russ@openaq.org" } ] classifiers = [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Typing :: Typed", ] dynamic = ["version"] [project.urls] Documentation = "https://python.openaq.org" Issues = "https://github.com/openaq/openaq-python/issues" Source = "https://github.com/openaq/openaq-python" Changelog = "https://github.com/openaq/openaq-python/releases" [project.optional-dependencies] orjson = ["orjson >=3.11.6"] all = ["openaq[orjson]"] [tool.hatch.build.targets.wheel] packages = ["openaq"] include = [ "openaq/py.typed", ] [tool.hatch.build.targets.sdist] include = [ "/openaq", "/tests", "/README.md", "/LICENSE", ] [tool.hatch.version] path = "openaq/__init__.py" [tool.hatch.envs.test] features = ["orjson"] dependencies = [ "coverage[toml]", "pytest", "pytest-cov", "pytest-mock", "freezegun", ] [tool.pytest.ini_options] testpaths = ["tests/unit"] [tool.hatch.envs.test.scripts] test-unit = 'pytest tests/unit/ -s -vv' test-integration = 'pytest tests/integration/ -s -vv' test = 'pytest tests/ -s -vv' cov = 'pytest --cov --cov-branch --cov-report=xml' [[tool.hatch.envs.test.matrix]] python = ["3.10", "3.11", "3.12", "3.13", "3.14"] [tool.hatch.envs.types] detached = true dependencies = ["mypy", "lxml"] [tool.mypy] python_version = "3.10" strict = true [[tool.mypy.overrides]] module = ["orjson"] ignore_missing_imports = true [[tool.mypy.overrides]] module = ["tomllib"] ignore_missing_imports = true [tool.hatch.envs.types.scripts] check = "mypy -p openaq --install-types --non-interactive" ci = "mypy -p openaq" cov = "mypy -p openaq --exclude 'openaq/vendor/.*' --install-types --html-report mypy-report" [tool.hatch.envs.style] detached = true dependencies = ["ruff"] [tool.hatch.envs.style.scripts] check = ["ruff check .", "ruff format --check ."] fmt = ["ruff check --fix .", "ruff format ."] [tool.coverage.run] branch = true parallel = true omit = ["openaq/__init__.py", "openaq/vendor/*", "tests/*"] [tool.coverage.report] exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"] exclude_also = [ "raise AssertionError", "raise NotImplementedError", "@(abc\\.)?abstractmethod", ] [tool.ruff] extend-exclude = ["tests"] [tool.ruff.lint] ignore = [ "E501", ] select = ["E", "F", "I", "D", "UP", "B", "SIM"] pydocstyle.convention = "google"