-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (128 loc) · 4.05 KB
/
Copy pathpyproject.toml
File metadata and controls
139 lines (128 loc) · 4.05 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
[project]
name = "pymatviz"
version = "0.18.0"
description = "A toolkit for visualizations in materials informatics"
authors = [{ name = "Janosh Riebesell", email = "janosh.riebesell@gmail.com" }]
readme = "readme.md"
license = { file = "license" }
keywords = [
"chemistry",
"crystallography",
"data analysis",
"data visualization",
"materials informatics",
"plotly",
]
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
urls = { Homepage = "https://github.com/janosh/pymatviz" }
requires-python = ">=3.12"
dependencies = [
"anywidget>=0.9.18",
"moyopy[interface]>=0.8",
"numpy>=2",
"pandas[output-formatting,xml]>=2.2", # output-formatting needed for pandas Stylers,
# see https://github.com/pandas-dev/pandas/blob/-/pyproject.toml
"plotly>=6.4",
"pymatgen>=2025.10.7",
"pyyaml>=6",
"scikit-learn>=1.5",
"scipy>=1.14",
]
[project.optional-dependencies]
make-assets = ["matminer>=0.9"]
gh-pages = ["jupyter>=1.1", "lazydocs>=0.4", "nbconvert>=7.16"]
phonons = ["phonopy>=2.31"] # only needed if user passes in phonopy objects
test = [
"kaleido>=1.2.0",
"pymatviz[clustering, phonons]",
"pytest-cov>=6",
"pytest-split>=0.9",
"pytest>=8",
]
export = ["kaleido>=1.2.0", "playwright>=1.40"]
brillouin = ["seekpath>=2.1"]
clustering = [
"matminer>=0.9",
"umap-learn>=0.5.12",
"pynndescent>=0.6", # keeps numba/llvmlite on Python 3.12+ compatible releases
]
[build-system]
requires = ["uv_build>=0.11.8"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "pymatviz"
module-root = ""
source-include = ["pymatviz/**/*.csv", "pymatviz/**/*.yml"]
source-exclude = [".venv"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-p no:warnings"
[tool.ruff]
output-format = "concise"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN401", # Any-type
"C408", # unnecessary-collection-call
"C901", # complex-structure
"CPY001", # missing copyright notice
"COM812", # trailing comma missing
"D205", # 1 blank line required between summary line and description
"E731", # do not assign a lambda expression, use a def
"EM101", # raw-string-in-exception
"EM102", # f-string-in-exception
"ERA001", # dead code
"FIX002", # line-contains-todo
"PLC0415", # import should be at top-level
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # function-with-too-many-arguments
"PLR0915", # too-many-statements
"PLR0917", # too-many-positional-arguments
"PLR2004", # magic-number-comparison
"PTH", # prefer pathlib over os.path
"S108", # Probable insecure usage of temporary file or directory
"SIM105", # Use contextlib.suppress instead of try-except-pass
"SLF001", # Access private class members
"TD", # TODO related
"TRY003", # Avoid specifying long messages outside exception class
]
pydocstyle.convention = "google"
isort.lines-after-imports = 2
isort.split-on-trailing-comma = false
pep8-naming.ignore-names = ["E_kin", "E_pot", "E_tot", "kT"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # unused-import
"**/tests/*" = [
"D100", # missing-module-docstring
"D103", # missing-function-docstring
"D107", # missing-init-docstring
"FBT001", # boolean-type-hint-positional-argument
"INP001", # implicit-namespace-package
"PLR2004", # magic-value-comparison
"S101", # use of assert
]
"examples/*" = [
"INP001", # implicit-namespace-package
"T201", # print found
]
"assets/scripts/*" = [
"INP001", # implicit-namespace-package
"T201", # print found
]
[dependency-groups]
dev = ["prek>=0.3.11", "ty>=0.0.34"]
[tool.ty.rules]
unused-ignore-comment = "ignore"
[[tool.ty.overrides]]
# examples and asset scripts import heavy optional deps (torch, mace, mp_api, dash,
# marimo, matbench-discovery, ...) that aren't part of any pymatviz extra
include = ["examples/**", "assets/scripts/**"]
rules = { unresolved-import = "ignore", unsupported-operator = "ignore", invalid-return-type = "ignore" }