-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
222 lines (203 loc) · 6.18 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
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "eko"
version = "0.0.0"
description = "Evolution Kernel Operators"
readme = "README.md"
authors = [
"A. Barontini <[email protected]>",
"A. Candido <[email protected]>",
"F. Hekhorn <[email protected]>",
"N. Laurenti <[email protected]>",
"G. Magni <[email protected]>",
"T. Sharma <[email protected]>",
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
repository = "https://github.com/NNPDF/eko"
include = [
"doc/source/img/Logo.png",
"src/ekobox/genpdf/templatePDF.info",
"src/ekobox/genpdf/Toy.info",
"src/ekomark/benchmark/external/LHA.yaml",
]
packages = [
{ include = "eko", from = "src" },
{ include = "ekomark", from = "src" },
{ include = "ekobox", from = "src" },
{ include = "ekore", from = "src" },
]
[tool.poetry.dependencies]
python = "^3.9,<3.13"
numpy = "^1.24"
scipy = "^1.10.1"
PyYAML = "^6.0"
lz4 = "^4.0.2"
numba = "^0.59.0"
# ekomark
banana-hep = { version = "^0.6.12", optional = true }
sqlalchemy = { version = "^1.4.21", optional = true }
pandas = { version = "^2.1.4", optional = true }
matplotlib = { version = "^3.5.1", optional = true }
rich = { version = "^12.6.0", optional = true }
click = { version = ">=8.0.3,<9.0.0", optional = true }
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
Sphinx = "^7.0.0"
sphinx-rtd-theme = "^1.0.0"
sphinxcontrib-bibtex = "^2.4.1"
nbsphinx = "^0.8.8"
ipykernel = "^6.13.0"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = "^7.1.3"
pytest-cov = "4.0.0"
pytest-env = "^0.6.2"
pylint = "^3.1.0"
[tool.poetry.group.dev.dependencies]
pdbpp = "^0.10.3"
ipython = "^8.0"
# benchmark
asv = "^0.4.2"
virtualenv = "^20.13.2"
devtools = "^0.10.0"
[tool.poetry.group.version.dependencies]
tomlkit = "^0.12.5"
[tool.poetry.extras]
mark = ["banana-hep", "sqlalchemy", "pandas", "matplotlib"]
box = ["rich", "click"]
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
dirty = true
[tool.poetry-dynamic-versioning.substitution]
files = ["src/eko/version.py"]
[tool.poetry.scripts]
ekonav = "ekomark.navigator:launch_navigator"
genpdf = "ekobox.genpdf.cli:cli"
eko = "ekobox.cli:command"
[tool.poe.tasks]
test = "pytest tests"
coverage = "$BROWSER htmlcov/index.html"
test-cov = ["test", "coverage"]
bench = ["bench-iso", "bench-run"]
bench-iso.cmd = "pytest benchmarks -m isolated"
bench-iso.env.NUMBA_DISABLE_JIT.default = "0"
bench-run.cmd = "pytest benchmarks -m 'not isolated'"
bench-run.env.NUMBA_DISABLE_JIT.default = "0"
lint = "pylint src/**/*.py -E"
lint-warnings = "pylint src/**/*.py --exit-zero"
sandbox = "python benchmarks/sandbox.py"
lha.cmd = "pytest benchmarks/lha_paper_bench.py -s"
lha.env.NUMBA_DISABLE_JIT.default = "0"
nav = "ekonav --config benchmarks/banana.yaml"
navigator = "ekonav --config benchmarks/banana.yaml"
docs = { "shell" = "cd doc; make html" }
docs-view = { "shell" = "cd doc; make view" }
docs-server = { "shell" = "cd doc; make server" }
docs-clean = { "shell" = "cd doc; make clean" }
docs-cleanall = { "shell" = "cd doc; make cleanall" }
docs-install-nb = { "shell" = "python -m ipykernel install --user --name=$(basename $(poetry env info -p))" }
asv-run = "asv run --config benchmarks/asv.conf.json master..HEAD"
asv-preview = "asv preview --config benchmarks/asv.conf.json"
asv-publish = "asv publish --config benchmarks/asv.conf.json"
asv-show = "asv show --config benchmarks/asv.conf.json"
asv-clean = { "shell" = "rm -rf benchmarks/env benchmarks/html benchmarks/results" }
asv = ["asv-run", "asv-publish", "asv-preview"]
bump-version = { "shell" = "python crates/bump-versions.py $(git describe --tags)" }
compile = "pip install -e crates/eko/"
rdocs.cmd = "cargo doc --workspace --no-deps"
rdocs.env = { RUSTDOCFLAGS = "--html-in-header crates/doc-header.html" }
rdocs-view = "xdg-open target/doc/ekors/index.html"
rdocs-clean = "rm -rf target/doc/"
rtest = "cargo test --workspace"
fmtcheck = "cargo fmt --all -- --check"
clippy = "cargo clippy --no-deps"
rbib = { "shell" = "python crates/make_bib.py > crates/ekore/src/bib.rs" }
[tool.pytest.ini_options]
testpaths = ['tests/', 'benchmarks/']
python_files = ['test_*.py', 'benchmark_*.py', 'regression.py']
python_classes = ['Test*', 'Benchmark*']
python_functions = ['test_*', 'benchmark_*']
addopts = [
'--cov=eko',
'--cov=ekobox',
'--cov=ekore',
'--cov-report=html',
'--cov-report=xml',
'--strict-markers',
]
env = ["D:NUMBA_DISABLE_JIT=1"]
markers = [
"isolated: marks benchmarks as isolated",
"ffns: Fixed flavor configuration",
"ffns_pol: Polarized fixed flavor configuration",
"vfns: Variable flavor configuration",
"lo: Leading order",
"nlo: Next-to-leading order",
"nnlo: Next-to-next-to-leading order",
"sv: Scale variations",
]
[tool.pylint.master]
# extensions not to check
extension-pkg-whitelist = ["numpy", "numba", "lhapdf", "pegasus"]
ignore-paths = ["benchmarks/", "doc/", "tests/"]
# has to be 1 as pylint is NOT threadsafe
jobs = 1
[tool.pylint.messages_control]
disable = ["invalid-name", "fixme"]
[tool.pylint.reports]
# Available formats are:
# text, parseable, colorized, json and msvs (visual studio).
output-format = "colorized"
[tool.pylint.format]
# Maximum number of characters on a single line.
max-line-length = 100
[tool.pylint.design]
# Maximum number of arguments for function / method
max-args = 10
[tool.pydocstyle]
convention = "numpy"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"extras/"
]
[tool.ruff.format]
docstring-code-format = true