forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
314 lines (293 loc) · 9.16 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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
[build-system]
requires = [
"Cython>=0.29.23",
# pin NumPy version used in the build
"oldest-supported-numpy",
"setuptools>=65.0.0",
]
build-backend = "setuptools.build_meta"
[project]
name = "pymatgen"
authors = [
{ name = "Pymatgen Development Team", email = "[email protected]" },
]
maintainers = [
{ name = "Shyue Ping Ong", email = "[email protected]" },
{ name = "Matthew Horton", email = "[email protected]" },
{ name = "Janosh Riebesell", email = "[email protected]" },
]
description = """
Python Materials Genomics is a robust materials analysis code that defines core object representations for structures
and molecules with support for many electronic structure codes. It is currently the core analysis code powering the
Materials Project (https://materialsproject.org)."""
readme = "README.md"
requires-python = ">=3.9"
keywords = [
"ABINIT",
"analysis",
"crystal",
"diagrams",
"electronic",
"gaussian",
"materials",
"nwchem",
"phase",
"project",
"qchem",
"science",
"structure",
"VASP",
]
license = { text = "MIT" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"matplotlib>=3.8",
"monty>=2024.5.24",
"networkx>=2.2",
"numpy>=1.25.0,<2.0.0",
"palettable>=3.1.1",
"pandas>=2",
"plotly>=4.5.0",
"pybtex>=0.24.0",
"requests>=2.32",
"ruamel.yaml>=0.17.0",
"scipy>=1.13.0",
"spglib>=2.0.2",
"sympy>=1.2",
"tabulate>=0.9",
"tqdm>=4.60",
"uncertainties>=3.1.4",
"joblib>=1",
]
version = "2024.6.10"
[project.urls]
Homepage = "https://pymatgen.org"
Documentation = "https://pymatgen.org"
Repository = "https://github.com/materialsproject/pymatgen"
Issues = "https://github.com/materialsproject/pymatgen/issues"
Pypi = "https://pypi.org/project/pymatgen"
[project.optional-dependencies]
ase = ["ase>=3.23.0"]
# don't depend on tblite above 3.11 since unsupported https://github.com/tblite/tblite/issues/175
tblite = ["tblite[ase]>=0.3.0; python_version<'3.12'"]
vis = ["vtk>=6.0.0"]
abinit = ["netcdf4>=1.6.5"]
mlp = ["matgl>=1.1.1", "chgnet>=0.3.8"]
electronic_structure = ["fdint>=2.0.2"]
dev = [
"mypy>=1.10.0",
"pre-commit>=3",
"pytest-cov>=4",
"pytest-split>=0.8",
"pytest>8",
"ruff>=0.4.8",
]
ci = [
"pytest>=8",
"pytest-cov>=4",
"pytest-split>=0.8",
]
docs = [
"sphinx",
"sphinx_rtd_theme",
]
optional = [
"ase>=3.23.0",
# TODO restore BoltzTraP2 when install fixed, hopefully following merge of
# https://gitlab.com/sousaw/BoltzTraP2/-/merge_requests/18
# caused CI failure due to ModuleNotFoundError: No module named 'packaging'
# "BoltzTraP2>=22.3.2; platform_system!='Windows'",
"chemview>=0.6",
"chgnet>=0.3.8",
"f90nml>=1.1.2",
"galore>=0.6.1",
"h5py>=3.11.0",
"jarvis-tools>=2020.7.14",
"matgl>=1.1.1",
"netCDF4>=1.6.5",
"phonopy>=2.23",
"seekpath>=2.0.1",
# don't depend on tblite above 3.11 since unsupported https://github.com/tblite/tblite/issues/175
"tblite[ase]>=0.3.0; platform_system=='Linux' and python_version<'3.12'",
# "hiphive>=0.6",
# "openbabel>=3.1.1; platform_system=='Linux'",
]
numba = ["numba>=0.55"]
[tool.setuptools.packages.find]
where = ["."]
include = ["pymatgen.*"]
[tool.setuptools.package-data]
"pymatgen.analysis" = ["*.yaml", "*.json", "*.csv"]
"pymatgen.analysis.chemenv" = [
"coordination_environments/coordination_geometries_files/*.json",
"coordination_environments/coordination_geometries_files/*.txt",
"coordination_environments/strategy_files/ImprovedConfidenceCutoffDefaultParameters.json",
]
"pymatgen.analysis.structure_prediction" = ["*.yaml", "data/*.json"]
"pymatgen.analysis.diffraction" = ["*.json"]
"pymatgen.analysis.magnetism" = ["default_magmoms.yaml"]
"pymatgen.analysis.solar" = ["am1.5G.dat"]
"pymatgen.entries" = ["*.json.gz", "*.yaml", "data/*.json"]
"pymatgen.core" = ["*.json"]
"pymatgen" = ["py.typed"]
"pymatgen.io.vasp" = ["*.yaml", "*.json", "*.json.gz", "*.json.bz2"]
"pymatgen.io.feff" = ["*.yaml"]
"pymatgen.io.cp2k" = ["*.yaml"]
"pymatgen.io.lobster" = ["lobster_basis/*.yaml"]
"pymatgen.command_line" = ["*"]
"pymatgen.util" = ["structures/*.json", "*.json"]
"pymatgen.vis" = ["*.yaml"]
"pymatgen.io.lammps" = ["CoeffsDataType.yaml", "templates/*.template"]
"pymatgen.symmetry" = ["*.yaml", "*.json", "*.sqlite"]
[project.scripts]
pmg = "pymatgen.cli.pmg:main"
feff_plot_cross_section = "pymatgen.cli.feff_plot_cross_section:main"
feff_plot_dos = "pymatgen.cli.feff_plot_dos:main"
get_environment = "pymatgen.cli.get_environment:main"
[tool.versioningit.vcs]
method = "git"
default-tag = "0.0.1"
[tool.cibuildwheel.linux]
archs = ["auto64"]
skip = ["*musllinux*"]
before-all = "ln -s /usr/lib64/libgfortran.so.5 /usr/lib64/libgfortran.so.3"
[tool.cibuildwheel.macos]
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} --ignore-missing-dependencies"
[tool.ruff]
target-version = "py39"
line-length = 120
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle error
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
"FBT003", # boolean-positional-value-in-call
"FLY", # flynt
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"NPY201", # numpy 2.0
"PD", # pandas-vet
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
"PLR0402",
"PLR1714",
"PLR5501",
"PT", # flake8-pytest-style
"PYI", # flakes8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle warning
"YTT", # flake8-2020
]
ignore = [
"B023", # Function definition does not bind loop variable
"B028", # No explicit stacklevel keyword argument found
"B904", # Within an except clause, raise exceptions with ...
"C408", # unnecessary-collection-call
"D105", # Missing docstring in magic method
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"PD901", # pandas-df-variable-name
"PERF203", # try-except-in-loop
"PERF401", # manual-list-comprehension
"PLR", # pylint refactor
"PLW2901", # Outer for loop variable overwritten by inner assignment target
"PT013", # pytest-incorrect-pytest-import
"PTH", # prefer pathlib to os.path
"SIM105", # Use contextlib.suppress() instead of try-except-pass
]
pydocstyle.convention = "google"
isort.required-imports = ["from __future__ import annotations"]
isort.split-on-trailing-comma = false
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**" = ["ANN201", "D", "S101"]
"tasks.py" = ["D"]
"pymatgen/analysis/*" = ["D"]
"pymatgen/vis/*" = ["D"]
"pymatgen/io/*" = ["D"]
"dev_scripts/*" = ["D"]
[tool.pytest.ini_options]
addopts = "--durations=30 --quiet -r xXs --color=yes -p no:warnings --import-mode=importlib"
[tool.coverage.run]
parallel = true
omit = [
"pymatgen/cli/feff_plot_cross_section.py",
"pymatgen/cli/feff_plot_dos.py",
"pymatgen/cli/pmg_config.py",
"pymatgen/cli/pmg_plot.py",
"pymatgen/cli/pmg_potcar.py",
"pymatgen/cli/pmg_query.py",
"pymatgen/dao.py",
]
[tool.coverage.report]
exclude_also = [
"@deprecated",
"@np.deprecate",
"def __repr__",
"except ImportError:",
"if 0:",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"if self.debug:",
"if settings.DEBUG",
"if typing.TYPE_CHECKING:",
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"show_plot",
]
[tool.mypy]
ignore_missing_imports = true
namespace_packages = true
explicit_package_bases = true
no_implicit_optional = false
disable_error_code = "annotation-unchecked"
[[tool.mypy.overrides]]
module = ["requests.*", "tabulate.*"]
ignore_missing_imports = true
[tool.codespell]
ignore-words-list = """
titel,alls,ans,nd,mater,nwo,te,hart,ontop,ist,ot,fo,nax,coo,
coul,ser,leary,thre,fase,rute,reson,titels,ges,scalr,strat,
struc,hda,nin,ons,pres,kno,loos,lamda,lew,atomate,nempty
"""
skip = "pymatgen/analysis/aflow_prototypes.json"
check-filenames = true
[tool.pyright]
typeCheckingMode = "off"
reportPossiblyUnboundVariable = true
reportUnboundVariable = true
reportMissingImports = false
reportMissingModuleSource = false
reportInvalidTypeForm = false
exclude = ["**/tests"]