-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
223 lines (193 loc) · 5.34 KB
/
pyproject.toml
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
[project]
name = "pybmds"
license = {text = "MIT License"}
authors = [
{name = "BMDS Development Team"},
{name = "Andy Shapiro", email = "shapiro.andy@epa.gov"},
{name = "Cody Simmons", email = "simmons.cody@epa.gov"},
]
readme = "README.md"
description = "U.S. EPA Dose Response Modeling Software"
dynamic = ["version"]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.11"
dependencies = [
"matplotlib>=3.7",
"numpy",
"openpyxl",
"pandas>=2",
"pydantic>=2",
"python-docx",
"scipy",
"tabulate",
"tqdm",
]
[project.urls]
"Source" = "https://github.com/USEPA/BMDS"
"Changes" = "https://github.com/USEPA/BMDS/blob/main/docs/source/history.md"
"Issue Tracker" = "https://github.com/USEPA/BMDS/issues"
"Documentation" = "https://usepa.github.io/BMDS/"
[project.optional-dependencies]
dev = [
"poethepoet~=0.32.2",
"coverage~=7.6.4",
"mypy~=1.13.0",
"pybind11==2.13.6",
"pytest-mpl~=0.17.0",
"pytest~=8.3.3",
"ruff~=0.7.1",
"setuptools~=75.3.0",
"wheel~=0.44.0",
"clang-format==19.1.3",
]
docs = [
"Sphinx~=8.1.3",
"myst-nb~=1.1.2",
"myst-parser~=4.0.0",
"furo==2024.8.6",
"sphinx_design~=0.6.1",
"sphinx-autobuild~=2024.10.3",
]
[project.scripts]
"bmds-priors-report" = "pybmds.cli.priors_report:main"
[build-system]
requires = [
"pybind11==2.13.6",
"setuptools~=75.3.0",
]
build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
archs = ["auto64"]
build = ["cp311-*", "cp312-*", "cp313-*"]
skip = [
"*-win32",
"*-win_arm64",
"*musllinux*",
"*i686",
"*-macosx_x86_64",
"*-macosx_universal2",
]
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
test-requires = ["pytest", "pytest-mpl"]
test-command = "pytest {project}/tests"
[tool.cibuildwheel.windows]
before-build = "bash tools/windows_ci.sh"
[tool.cibuildwheel.windows.environment]
EIGEN_DIR="D:/a/bmds/bmds/deps/eigen"
NLOPT_DIR="D:/a/bmds/bmds/deps/nlopt/src/api;D:/a/bmds/bmds/deps/nlopt/build/Release;D:/a/bmds/bmds/deps/nlopt/build"
GSL_DIR="D:/a/bmds/bmds/deps/gsl/build/Release;D:/a/bmds/bmds/deps/gsl/build"
[tool.cibuildwheel.linux]
before-build = "tools/cibuildwheel-linux.sh"
[tool.cibuildwheel.linux.environment]
EIGEN_DIR="/usr/include/eigen3"
NLOPT_DIR="/usr/local/lib64/"
CMAKE_C_COMPILER="/opt/rh/gcc-toolset-12/root/usr/bin/gcc"
CMAKE_CXX_COMPILER="/opt/rh/gcc-toolset-12/root/usr/bin/g++"
[tool.cibuildwheel.macos]
before-build = "tools/cibuildwheel-mac.sh"
[tool.cibuildwheel.macos.environment]
EIGEN_DIR="/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3"
GSL_DIR="/opt/homebrew/Cellar/gsl/2.7.1"
NLOPT_DIR="/opt/homebrew/Cellar/nlopt/2.7.1/include"
[tool.coverage.report]
exclude_also = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
fail_under=96.7
precision=1
[tool.coverage.run]
include = [
"src/pybmds/*"
]
[tool.pytest.ini_options]
testpaths = "tests/test_pybmds"
addopts = "--mpl-baseline-path=tests/data/mpl"
python_files = ["test_*.py"]
[tool.ruff]
exclude = ["docs"]
line-length = 100
lint.select = ["F", "E", "W", "I", "UP", "S", "B", "T20", "ERA", "NPY", "RUF", "PTH"]
lint.ignore = ["E501"]
lint.isort.known-first-party = ["pybmds"]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["S101", "ERA001"]
"setup.py" = ["S603", "S607"]
[tool.setuptools.dynamic]
version = {attr = "pybmds.__version__"}
[tool.setuptools.packages.find]
where = ["src"]
include = ["pybmds*"]
[tool.poe.tasks.sync-dev]
help = "Sync dev environment after code checkout"
sequence = [
{cmd = 'uv pip install -e ".[dev,docs]"'},
]
[tool.poe.tasks.test]
help = "Run Python tests"
cmd = "py.test"
[tool.poe.tasks.format]
help = "Format Python code"
sequence = [
{cmd = "ruff format ."},
{cmd = "ruff check . --fix --show-fixes"},
]
[tool.poe.tasks.format-cpp]
help = "Format C++ code"
sequence = [
{shell = 'find src -name "*.cpp" -o -name "*.h" | xargs clang-format -i'},
]
[tool.poe.tasks.lint]
help = "Check Python formatting issues"
sequence = [
{cmd = "ruff format . --check"},
{cmd = "ruff check ."},
]
[tool.poe.tasks.build]
help = "Build Python package"
sequence = [
{cmd ="python setup.py develop"},
{cmd ="stubgen -p pybmds.bmdscore -o src/"},
{cmd ="ruff format src/pybmds/bmdscore.pyi"},
]
[tool.poe.tasks.dist]
help = "Build wheel package for distribution"
sequence = [
{cmd ="python setup.py bdist_wheel"},
]
[tool.poe.tasks.coverage]
help = "Run Python coverage and create HTML report"
sequence = [
{cmd = "coverage run -m pytest"},
{cmd = "coverage html -d coverage_html -i"},
]
[tool.poe.tasks.loc]
help = "Generate lines of code report"
cmd = """cloc \
--exclude-dir=build,dist,venv \
--exclude-ext=json,yaml,svg,toml,ini \
--vcs=git \
--counted loc-files.txt \
--md \
.
"""
[tool.poe.tasks.docs]
help = "Build html documentation"
cmd = "sphinx-build -W -b html docs/source docs/build/html"
[tool.poe.tasks.docs-docx]
help = "Build docx documentation"
sequence = [
{cmd = "sphinx-build -W -b singlehtml docs/source docs/build/singlehtml"},
{shell = "cd docs/build/singlehtml && pandoc -s index.html -o ../pybmds.docx"},
]
[tool.poe.tasks.docs-serve]
help = "Preview html documentation"
cmd = "sphinx-autobuild -b html docs/source docs/build/html --port 5800"