-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
191 lines (177 loc) · 6.03 KB
/
pyproject.toml
File metadata and controls
191 lines (177 loc) · 6.03 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
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
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.1.0"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry]
name = "nnpdf"
version = "0.0.0"
description = "An open-source machine learning framework for global analyses of parton distributions."
readme = "README.md"
authors = [
"NNPDF Collaboration"
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
license = "GPL-3.0-or-later"
repository = "https://github.com/NNPDF/nnpdf"
# Packages installed together within the nnpdf metapackage
packages = [
{ include = "n3fit", from = "n3fit/src" },
{ include = "evolven3fit", from = "n3fit/src" },
{ include = "validphys", from = "validphys2/src" },
{ include = "nnpdf_data", from = "nnpdf_data"},
]
# Data files
include = [
# The default profile is included together with the validphys package
{ path ="validphys2/src/validphys/nnprofile_default.yaml",format = ["sdist", "wheel"] },
# The version file is ignored by git so it needs to be explicitly included
{ path ="validphys2/src/validphys/_version.py", format = ["sdist", "wheel"] },
{ path ="nnpdf_data/nnpdf_data/_version.py", format = ["sdist", "wheel"] }
]
[tool.poetry.scripts]
n3fit = "n3fit.scripts.n3fit_exec:main"
validphys = "validphys.scripts.main:main"
# Fitting scripts
evolven3fit = "n3fit.scripts.evolven3fit:main"
vp-setupfit = "n3fit.scripts.vp_setupfit:main"
postfit = "validphys.scripts.postfit:main"
# validphys helpers and scripts
vp-upload = "validphys.scripts.vp_upload:main"
wiki-upload = "validphys.scripts.wiki_upload:main"
vp-get = "validphys.scripts.vp_get:main"
vp-comparefits = "validphys.scripts.vp_comparefits:main"
vp-fitrename = "validphys.scripts.vp_fitrename:main"
vp-checktheory = "validphys.scripts.vp_checktheory:main"
vp-pdfrename = "validphys.scripts.vp_pdfrename:main"
vp-pdffromreplicas = "validphys.scripts.vp_pdffromreplicas:main"
vp-list = "validphys.scripts.vp_list:main"
vp-nextfitruncard = "validphys.scripts.vp_nextfitruncard:main"
vp-hyperoptplot = "validphys.scripts.vp_hyperoptplot:main"
vp-deltachi2 = "validphys.scripts.vp_deltachi2:main"
[tool.poetry.dependencies]
# Generic dependencies (i.e., validphys)
python = ">=3.9"
matplotlib = "^3.9"
pineappl = "^1.0.0"
# TODO: make the code compatible with pandas 3
pandas = "*"
numpy = "*"
"ruamel.yaml" = {version = ">=0.19.1", extras=["oldlibyaml"]}
validobj = "*"
prompt_toolkit = "*"
reportengine = ">=0.32"
packaging = "*"
# Fit
psutil = "*"
tensorflow = "*"
keras = "^3.1"
tensorboard = "*" # keras requires tensorboard but some versions are missing the dependency
eko = "^0.15.1"
joblib = "*"
seaborn = "*"
# Hyperopt
hyperopt = {version = "*", optional = true}
# hyperopt needs setuptools pinned to < 82 due to pkg resources
setuptools = {version = "<82", optional = true}
# LHAPDF installation for debugging purposes
# a3b2bbc3ced97675ac3a71df45f55ba = "*"
# Optional dependencies
# tests
pytest = {version = ">=7", optional = true}
pytest-mpl = {version = "*", optional = true}
pytest-cov = {version = ">=6", optional = true}
hypothesis = {version = "*", optional = true}
# docs
sphinxcontrib-bibtex = {version = "*", optional = true}
sphinx_rtd_theme = {version = "*", optional = true}
sphinx = {version = "^6.2", optional = true}
tabulate = {version = "*", optional = true}
# qed
fiatlux = {version = "*", optional = true}
# without lhapdf
pdfflow = {version = "^1.2.1", optional = true}
lhapdf-management = {version = "^0.6", optional = true}
# torch
torch = {version = "*", optional = true}
# jax
jax = {version = "*", optional = true}
# parallel hyperopt
pymongo = {version = "<4", optional = true}
# Optional dependencies
[tool.poetry.extras]
tests = ["pytest", "pytest-mpl", "hypothesis", "pytest-cov"]
docs = ["sphinxcontrib-bibtex", "sphinx-rtd-theme", "sphinx", "tabulate"]
qed = ["fiatlux"]
nolha = ["pdfflow", "lhapdf-management"]
torch = ["torch"]
jax = ["jax"]
hyperopt = ["hyperopt", "setuptools"]
parallelhyperopt = ["pymongo", "hyperopt", "setuptools"]
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
stype = "semver"
dirty = true
pattern = "default-unprefixed" # we don't use v in the tags
ignore-untracked = true
[tool.poetry-dynamic-versioning.files."validphys2/src/validphys/_version.py"]
persistent-substitution = true
initial-content = """
__version__ = "0.0.0"
"""
# When installed toghether, make sure the validphs and nnpdf_data versions are written at the same time
[tool.poetry-dynamic-versioning.files."nnpdf_data/nnpdf_data/_version.py"]
persistent-substitution = true
initial-content = """
__version__ = "0.0.0"
"""
[tool.poetry-dynamic-versioning.substitution]
files = ["validphys2/src/validphys/_version.py", "nnpdf_data/nnpdf_data/_version.py"]
[tool.black]
line-length = 100
skip-string-normalization = true
skip-magic-trailing-comma = true
[tool.isort]
atomic = true
line_length = 100
profile = "black" # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#custom-configuration
skip_gitignore = true
known_first_party = ["validphys", "eko", "n3fit", "nnpdf_data", "reportengine"]
force_sort_within_sections = true
[tool.pytest.ini_options]
minversion = 7
addopts = ["--disable-warnings", "--strict-config"]
xfail_strict = true
log_cli_level = "WARNING"
[tool.coverage.run]
omit = [
"*/local*",
"*/rule*",
"*/nnpdf_data/commondata/*",
"*/nnpdf_data/filter_utils/*",
"*test_*.py"
]
[tool.coverage.paths]
cipaths = [ # In order to combine files from both the ubuntu and macos runners
"./", # CI working directory
"/Users/runner/work/nnpdf/nnpdf",
"/home/runner/work/nnpdf/nnpdf"
]
[tool.repo-review]
select = ["PY", "GH", "PP", "PC"]
[tool.repo-review.ignore]
"PY004" = "Using doc/ as folder"
"PY005" = "Tests are in <package>/src/*/tests"
"PY007" = ""
"PP303" = ""
"PP307" = "False positive"
"PP308" = ""
"GH200" = ""
"PC190" = ""
"PC160" = ""
"PC901" = "No autocommit coming from the CI in pre-commit is set"