-
Notifications
You must be signed in to change notification settings - Fork 21
/
pyproject.toml
169 lines (156 loc) · 4.46 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
[build-system]
requires = [
"hatchling>=1.13.0",
]
build-backend = "hatchling.build"
[project]
name = "cabinetry"
version = "0.6.0"
description = "design and steer profile likelihood fits"
readme = "README.md"
license = { text = "BSD-3-Clause" } # SPDX short identifier
requires-python = ">=3.8"
authors = [
{ name = "Alexander Held", email = "[email protected]" },
]
maintainers = [ {name = "The Scikit-HEP admins", email = "[email protected]"} ]
keywords = [
"fitting",
"physics",
"profile likelihood",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = [
"pyhf[minuit]~=0.7.0", # model.config.suggested_fixed / .par_names API changes, set_poi(None)
"boost_histogram>=1.0.0", # subclassing with family, 1.02 for stdev scaling fix (currently not needed)
"hist>=2.5.0", # hist.intervals.poisson_interval
"tabulate>=0.8.1", # multiline text
"matplotlib>=3.5.0", # layout kwarg for subplots
# below are direct dependencies of cabinetry, which are also included via pyhf[iminuit]
"numpy",
"pyyaml",
"iminuit",
"jsonschema",
"click",
"scipy",
"packaging", # for version parsing
]
[project.scripts]
cabinetry = "cabinetry.cli:cabinetry"
[project.urls]
Documentation = "https://cabinetry.readthedocs.io/"
Homepage = "https://github.com/scikit-hep/cabinetry"
"Issue Tracker" = "https://github.com/scikit-hep/cabinetry/issues"
"Releases" = "https://github.com/scikit-hep/cabinetry/releases"
"Source Code" = "https://github.com/scikit-hep/cabinetry"
[project.optional-dependencies]
contrib = ["uproot>=4.1.5"] # file writing bug-fixes
pyhf_backends = ["pyhf[backends]"]
# Developer extras
test = [
"cabinetry[contrib]",
"pytest",
"pytest-cov>=2.6.1", # no_cover support
"pydocstyle",
"check-manifest",
"flake8",
"flake8-bugbear",
"flake8-import-order",
"flake8-print",
"mypy",
"types-tabulate",
"types-PyYAML",
"typeguard>=4.0.0", # cabinetry#391
"black",
]
docs = [
"sphinx!=5.2.0.post0", # broken due to version parsing in RTD theme
"sphinx-click",
"sphinx-copybutton",
"sphinx-jsonschema",
"sphinx-rtd-theme>=1.2", # Sphinx 7 compatibility
]
develop = [
"cabinetry[test,docs]",
"pre-commit",
"twine",
]
complete = [
"cabinetry[develop]",
"cabinetry[pyhf_backends]",
]
[tool.hatch.build.targets.sdist]
# hatchling always includes:
# pyproject.toml, .gitignore, any README, any LICENSE, AUTHORS
only-include = [
"/src",
"/tests",
"/utils",
]
[tool.hatch.build.targets.wheel]
packages = ["src/cabinetry"]
[tool.black]
target-version = ['py38']
include = '\.pyi?$'
exclude = '''
/(
\.git
| .eggs
| build
)/
'''
[tool.pytest.ini_options]
# running typeguard can result in lower coverage https://github.com/agronholm/typeguard/issues/356
addopts = "--cov=cabinetry --cov-report html --cov-report term-missing --cov-branch -rsx --typeguard-packages=cabinetry"
[tool.pytype]
inputs = "src/cabinetry"
[tool.pydocstyle]
# configuration duplicated in pre-commit config
match = "(?!setup|example).*\\.py"
match_dir = "^(?!(tests|utils|docs)).*"
convention = "google"
[tool.mypy]
files = "src/cabinetry"
pretty = true
show_error_context = true
show_error_codes = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
# strict = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
# warn_return_any = true
warn_unreachable = true
warn_unused_ignores = true
strict_equality = true
no_implicit_optional = true
# numpy 1.25 is no longer compatible with Python 3.8, so use Python >=3.9 for type checking
python_version = "3.9"
[[tool.mypy.overrides]]
module = [
"uproot",
"pyhf",
"matplotlib.*",
"iminuit",
"jsonschema",
"scipy.*",
"packaging.*",
]
ignore_missing_imports = true