1
1
[build-system ]
2
- requires = [
3
- " setuptools>=42" ,
4
- " setuptools_scm[toml]>=3.4"
2
+ requires = [" hatchling" , " hatch-vcs" ]
3
+ build-backend = " hatchling.build"
4
+
5
+ [project ]
6
+ name = " hepstats"
7
+ description = " statistics tools and utilities"
8
+ authors = [{
name =
" Matthieu Marinangeli" ,
email =
" [email protected] " }]
9
+ maintainers = [{
name =
" Scikit-HEP" ,
email =
" [email protected] " }]
10
+ license = { text = " BSD 3-Clause License" }
11
+ classifiers = [
12
+ " Development Status :: 4 - Beta" ,
13
+ " Intended Audience :: Developers" ,
14
+ " Intended Audience :: Information Technology" ,
15
+ " Intended Audience :: Science/Research" ,
16
+ " License :: OSI Approved :: BSD License" ,
17
+ " Operating System :: MacOS" ,
18
+ " Operating System :: Microsoft :: Windows" ,
19
+ " Operating System :: POSIX" ,
20
+ " Operating System :: Unix" ,
21
+ " Programming Language :: C++" ,
22
+ " Programming Language :: Python" ,
23
+ " Programming Language :: Python :: 3" ,
24
+ " Programming Language :: Python :: 3 :: Only" ,
25
+ " Programming Language :: Python :: 3.9" ,
26
+ " Programming Language :: Python :: 3.10" ,
27
+ " Programming Language :: Python :: 3.11" ,
28
+ " Programming Language :: Python :: 3.12" ,
29
+ " Topic :: Scientific/Engineering" ,
30
+ " Topic :: Scientific/Engineering :: Information Analysis" ,
31
+ " Topic :: Scientific/Engineering :: Mathematics" ,
32
+ " Topic :: Scientific/Engineering :: Physics" ,
33
+ " Topic :: Software Development" ,
34
+ " Topic :: Utilities" ,
35
+ ]
36
+ urls = { Homepage = " https://github.com/scikit-hep/hepstats" }
37
+ requires-python = " >=3.9"
38
+ dependencies = [
39
+ " asdf" ,
40
+ " numpy" ,
41
+ " pandas" ,
42
+ " scipy" ,
43
+ " tqdm" ,
44
+ " uhi" ,
45
+ ]
46
+ dynamic = [" version" ]
47
+
48
+ [project .readme ]
49
+ file = " README.md"
50
+ content-type = " text/markdown"
51
+
52
+ [project .optional-dependencies ]
53
+ dev = [
54
+ " hepstats[docs]" ,
55
+ " hepstats[test]" ,
56
+ " pre-commit" ,
57
+ ]
58
+ docs = [
59
+ " matplotlib" ,
60
+ " pydata-sphinx-theme" ,
61
+ " sphinx>=3.1.2" ,
62
+ " sphinx-autodoc-typehints" ,
63
+ " sphinx-copybutton" ,
64
+ " sphinxcontrib-bibtex>=2.0.0" ,
5
65
]
66
+ doc = [" hepstats[docs]" ] # alias
67
+ test = [
68
+ " pytest" ,
69
+ " pytest-cov" ,
70
+ " pytest-runner" ,
71
+ " zfit>=0.20.0" ,
72
+ ]
73
+ zfit = [" zfit>=0.20.0" ]
74
+
75
+
76
+
77
+ [tool .pytest .ini_options ]
78
+ junit_family = " xunit2"
79
+ testpaths = [" tests" ]
80
+
81
+ [tool .check-manifest ]
82
+ ignore = [" src/hepstats/_version.py" ]
83
+
84
+ [tool .build_sphinx ]
85
+ project = " hepstats"
86
+ source-dir = " docs"
87
+ build-dir = " docs/_build"
88
+ all-files = " 1"
89
+ warning-is-error = " 0"
6
90
7
- build-backend = " setuptools.build_meta"
8
91
9
- [tool .setuptools_scm ]
10
- write_to = " src/hepstats/version.py"
92
+ [tool .hatch ]
93
+ version.source = " vcs"
94
+ build.hooks.vcs.version-file = " src/hepstats/_version.py"
11
95
12
96
[tool .ruff ]
13
97
# src = ["src"]
@@ -20,41 +104,42 @@ exclude = [
20
104
]
21
105
[tool .ruff .lint ]
22
106
extend-select = [
23
- " B" , # flake8-bugbear
24
- " I" , # isort
25
- " ARG" , # flake8-unused-arguments
26
- " C4" , # flake8-comprehensions
27
- " EM" , # flake8-errmsg
28
- " ICN" , # flake8-import-conventions
29
- " G" , # flake8-logging-format
30
- " PGH" , # pygrep-hooks
31
- " PIE" , # flake8-pie
32
- " PL" , # pylint
33
- " PT" , # flake8-pytest-style
34
- " PTH" , # flake8-use-pathlib
35
- " RET" , # flake8-return
36
- " RUF" , # Ruff-specific
37
- " SIM" , # flake8-simplify
38
- " T20" , # flake8-print
39
- " UP" , # pyupgrade
40
- " YTT" , # flake8-2020
41
- " EXE" , # flake8-executable
42
- " NPY" , # NumPy specific rules
43
- " PD" , # pandas-vet
107
+ " B" , # flake8-bugbear
108
+ " I" , # isort
109
+ " ARG" , # flake8-unused-arguments
110
+ " C4" , # flake8-comprehensions
111
+ " EM" , # flake8-errmsg
112
+ " ICN" , # flake8-import-conventions
113
+ " G" , # flake8-logging-format
114
+ " PGH" , # pygrep-hooks
115
+ " PIE" , # flake8-pie
116
+ " PL" , # pylint
117
+ " PT" , # flake8-pytest-style
118
+ " PTH" , # flake8-use-pathlib
119
+ " RET" , # flake8-return
120
+ " RUF" , # Ruff-specific
121
+ " SIM" , # flake8-simplify
122
+ " T20" , # flake8-print
123
+ " UP" , # pyupgrade
124
+ " YTT" , # flake8-2020
125
+ " EXE" , # flake8-executable
126
+ " NPY" , # NumPy specific rules
127
+ " PD" , # pandas-vet
44
128
]
45
129
ignore = [
46
- " UP007" , # type annotation upgrade, breaks pydantic for Python 3.9 (remove once above)
47
- " PLR09" , # Too many <...>
48
- " PLR2004" , # Magic value used in comparison
49
- " ISC001" , # Conflicts with formatter
50
- " RET505" , # This is sometimes wanted, protets against accidental intendation
51
- " PD901" , # "avoid using `df[...].values`" -> no, this is a very good name if there is only one df
52
- " PD011" , # "replace `df[...].values` with `df[...].to_numpy()`" -> not yet, it's not deprecated.
130
+ " UP007" , # type annotation upgrade, breaks pydantic for Python 3.9 (remove once above)
131
+ " PLR09" , # Too many <...>
132
+ " PLR2004" , # Magic value used in comparison
133
+ " ISC001" , # Conflicts with formatter
134
+ " RET505" , # This is sometimes wanted, protets against accidental intendation
135
+ " PD901" , # "avoid using `df[...].values`" -> no, this is a very good name if there is only one df
136
+ " PD011" , # "replace `df[...].values` with `df[...].to_numpy()`" -> not yet, it's not deprecated.
53
137
# Prefer to have a single way to access the data if we don't care about whether it's a numpy array or not.
54
- " PLW0603" , # updating global variables with a function is bad, but we use it for
55
- " PLW2901" , # "for loop overwritten by assignment" -> we use this to update the loop variable
56
- " PD013" , # "melt over stack": df function, but triggers on tensors
57
- " NPY002" , # "Use rnd generator in numpy" -> we use np.random for some legacy stuff but do use the new one where we can
138
+ " PLW0603" , # updating global variables with a function is bad, but we use it for
139
+ " PLW2901" , # "for loop overwritten by assignment" -> we use this to update the loop variable
140
+ " PD013" , # "melt over stack": df function, but triggers on tensors
141
+ " NPY002" , # "Use rnd generator in numpy" -> we use np.random for some legacy stuff but do use the new one where we can
142
+ " T201" , # "print used" -> we use print for displaying information in verbose mode
58
143
59
144
]
60
145
isort.required-imports = [" from __future__ import annotations" ]
0 commit comments