-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathpyproject.toml
More file actions
140 lines (129 loc) · 4.24 KB
/
pyproject.toml
File metadata and controls
140 lines (129 loc) · 4.24 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
[project]
name = "pymatviz"
version = "0.17.5"
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.11",
"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.11"
dependencies = [
"anywidget>=0.9.18",
"kaleido>=1.2.0",
"moyopy[interface]>=0.7.1",
"nbformat>=5.10",
"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 = [
"pymatviz[cluster, phonons]",
"pytest-cov>=6",
"pytest-split>=0.9",
"pytest>=8",
]
export = ["playwright>=1.40"]
brillouin = ["seekpath>=2.1"]
cluster = ["matminer>=0.9"]
# umap-learn not included in cluster because its numba dep clashes with other packages
# <3.13 pin pending new llvmlite wheels https://github.com/lmcinnes/umap/issues/1163
umap = ["umap-learn>=0.5; python_version < '3.13'"]
[build-system]
requires = ["uv_build>=0.8.10"]
build-backend = "uv_build"
# TODO remove once orjson 3.11.8 gets x86_64 Linux wheels or 3.11.9 is released
[tool.uv]
constraint-dependencies = ["orjson!=3.11.8"]
[tool.uv.build-backend]
module-name = "pymatviz"
module-root = ""
source-include = ["pymatviz/**/*.csv", "pymatviz/**/*.yml"]
source-exclude = [".venv", "web"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-p no:warnings"
[tool.ruff]
target-version = "py311"
output-format = "concise"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN401", # Any-type
"C408", # unnecessary-collection-call
"C901", # complex-structure
"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
"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
"D101", # missing-class-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.2.13", "ty>=0.0.1a25"]
[tool.ty.rules]
unused-type-ignore-comment = "ignore"
unused-ignore-comment = "ignore"
unresolved-import = "ignore"