-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (105 loc) · 2.99 KB
/
pyproject.toml
File metadata and controls
122 lines (105 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[project]
name = "reformlab"
version = "0.1.0"
description = "OpenFisca-first environmental policy analysis platform"
readme = "README.md"
license = "AGPL-3.0-or-later"
requires-python = ">=3.13"
dependencies = [
"jsonschema>=4.23.0",
"marimo>=0.20.4",
"matplotlib>=3.8.0",
"pyarrow>=18.0.0",
"pyyaml>=6.0.2",
"scipy>=1.14.0",
]
[project.optional-dependencies]
openfisca = [
"openfisca-core>=44.0.0",
"openfisca-france>=175.0.0",
]
server = [
"fastapi>=0.133.0",
"uvicorn[standard]>=0.41.0",
"python-multipart>=0.0.9",
]
dev = [
"pytest>=8.3.3",
"pytest-cov>=4.1.0",
"ruff>=0.15.0",
"mypy>=1.19.0",
"nbmake>=1.4",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/reformlab"]
include = [
"reformlab/calibration/schema/*.json",
"reformlab/data/populations/**/*.json",
"reformlab/data/populations/**/*.parquet",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = "-m 'not integration and not scale and not network and not nightly'"
markers = [
"benchmark: marks tests as benchmark validation tests (deselect with '-m \"not benchmark\"')",
"integration: marks tests as integration tests requiring openfisca-france (run with '-m integration')",
"network: marks tests requiring real network access to institutional APIs (opt-in with '-m network')",
"scale: marks tests as scale validation tests (100k-500k population, may be slow)",
"nightly: marks tests as nightly tests (100k+ population, slow, excluded from default CI runs)",
]
[tool.ruff]
src = ["src"]
target-version = "py313"
line-length = 110
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
[tool.ruff.lint.per-file-ignores]
"tests/computation/test_openfisca_api_adapter.py" = ["E402"]
"tests/computation/test_openfisca_integration.py" = ["E402"]
"tests/templates/carbon_tax/test_performance.py" = ["E402"]
"src/reformlab/interfaces/api.py" = ["E501"]
"tests/interfaces/test_api.py" = ["E501"]
[tool.mypy]
python_version = "3.13"
mypy_path = "src"
strict = true
[[tool.mypy.overrides]]
module = ["openfisca_core.*", "openfisca_france.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["pyarrow", "pyarrow.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["jsonschema", "jsonschema.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["yaml", "yaml.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["fastapi", "fastapi.*", "uvicorn", "uvicorn.*", "starlette", "starlette.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["scipy", "scipy.*"]
ignore_missing_imports = true
[tool.coverage.run]
source = ["src/reformlab"]
branch = true
[tool.coverage.report]
fail_under = 80
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@overload",
"\\.\\.\\.",
]
show_missing = true
[dependency-groups]
dev = [
"ipykernel>=7.2.0",
"jupyter>=1.1.1",
]