-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathpyproject.toml
194 lines (175 loc) · 4.69 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
[build-system]
requires = ["setuptools>=77", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = 'nomad-lab'
description = 'The NOvel MAterials Discovery (NOMAD) Python package'
readme = "README.md"
authors = [
{ name = "NOMAD Laboratory", email = '[email protected]' },
]
dynamic = ["version"]
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
dependencies = [
'ase~=3.22.0', # breaking changes in later versions
'bitarray>=2.3.5',
'cachetools>=4.2.4',
'click>=7.1.2',
'docstring-parser>=0.12',
'elasticsearch-dsl>=7,<8',
'h5py>=3.6.0',
'httpx>=0.23.3,<0.28',
'jmespath>=0.10.0',
'jsonpath-ng',
'lxml>=5.2',
'matid>=2.1.3',
'msgpack>=1',
'msgspec',
'numpy>=1.22.4,<2',
'orjson>=1.0',
'pandas>=2',
'pint==0.17',
'plotly<6', # version 6.0.0 not fully compatible with our GUI
'py-spy', # for on-server profiling
'pydantic>=2',
'pyinstrument', # for endpoint profiling
'pymatgen>=2023.5.10',
'python-keycloak>=0.26.1',
'python-magic-bin;sys_platform=="win32"',
'python-magic',
'pytz>=2022.7.1',
'pyyaml>=6.0',
'requests>=2.27.1,<2.32.0',
'rfc3161ng>=2.1.3',
'scipy>=1.7.1',
'unidecode',
'xarray>=0.20.2',
]
[project.urls]
homepage = "https://nomad-lab.eu/"
documentation = "https://nomad-lab.eu/prod/v1/docs"
repository = 'https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR'
[project.optional-dependencies]
parsing = []
infrastructure = [
'beautifulsoup4>=4,<=4.12.3', # 4.13 introduced breaking changes
'blinker', # mongoengine needs this for signals
'celery>=5',
'dockerspawner',
'fastapi',
'gunicorn',
'h5grove[fastapi]',
'jupyterhub',
'mongoengine',
'oauthenticator',
'optimade[mongo]',
'pyjwt[crypto]',
'python-logstash',
'python-multipart',
'rdflib==5', # breaking changes in DCT.dataset in later versions
'structlog',
'tabulate',
'uvicorn[standard]',
'validators',
'zipstream-ng',
]
dev = [
'aiosmtpd>=1',
'devtools',
'essential_generators',
'mkdocs-click',
'mkdocs-git-revision-date-localized-plugin',
'mkdocs-glightbox',
'mkdocs-macros-plugin',
'mkdocs-material-extensions',
'mkdocs-material',
'mkdocs-redirects',
'mkdocs',
'mypy>=1.15',
'pytest-asyncio',
'pytest-cov',
'pytest-split',
'pytest-timeout',
'pytest-xdist',
'pytest',
'python-gitlab',
'ruff',
'setuptools>=70', # py3.12 doesn't bundle in setuptools, but this is required by mongomock lib
]
[project.scripts]
nomad = "nomad.cli:run_cli"
[tool.ruff]
include = ["nomad/*.py", "tests/*.py"]
exclude = ["dependencies"]
# Same as Black.
line-length = 88
indent-width = 4
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F401", # remove unused import
"I001", # sort imports
"PL", # pylint
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"E501", # Line too long ({width} > {limit} characters)
"E701", # Multiple statements on one line (colon)
"E731", # Do not assign a lambda expression, use a def
"E402", # Module level import not at top of file
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PLR2004", # Magic value used instead of constant
"PLW0603", # Using the global statement
"PLW2901", # redefined-loop-name
"PLR1714", # consider-using-in
"PLR5501", # else-if-used
]
fixable = ["ALL"]
isort.split-on-trailing-comma = false
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["F401", "I001"]
"nomad/app/v1/models/graph/utils.py" = [
"UP007",
] # causes pydantic model building errors
[tool.ruff.format]
# use single quotes for strings.
quote-style = "single"
# indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.setuptools.packages.find]
where = ["."]
exclude = ["tests*"]
namespaces = false
[tool.mypy]
strict = false
ignore_missing_imports = true
follow_imports = "silent"
no_strict_optional = true
disable_error_code = "import, annotation-unchecked"
plugins = ["pydantic.mypy"]
[tool.setuptools_scm]
[tool.uv]
extra-index-url = [
"https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple",
]
override-dependencies = [
'elasticsearch-dsl>=7,<8',
'python-magic',
'unidecode',
]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::SyntaxWarning",
]