-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
154 lines (140 loc) · 4.53 KB
/
Copy pathpyproject.toml
File metadata and controls
154 lines (140 loc) · 4.53 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
[build-system]
requires = ["setuptools>=77", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "httk-atomistic"
version = "2.1.2"
description = "httk₂ module for atomistic structures, their representations, and file I/O (CIF/mCIF, VASP, trajectories)."
readme = "README.md"
license = "AGPL-3.0-or-later"
license-files = ["LICENSE"]
requires-python = ">=3.12"
authors = [{ name = "Rickard Armiento", email = "rickard-gpg@armiento.net" }]
dependencies = [
"httk-core>=2.1.2,<3",
]
keywords = [
"Materials Discovery",
"Materials Informatics",
"Materials Science",
"Machine Learning",
"CIF",
"Crystallography",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
]
[project.optional-dependencies]
numpy = ["httk-core[numpy]>=2.1.2,<3"]
dev = [
# Full-source type checks and tests cover these optional integrations.
"httk-atomistic[default]",
"ase",
"pymatgen",
"pytest>=8.0",
"pytest-xdist>=3.6",
"ruff>=0.16,<0.17",
"pyright",
"mypy",
"pydoclint>=0.9,<1"
]
docs = [
"sphinx",
"furo",
"myst-parser",
"myst-nb",
"sphinx-autodoc-typehints",
"sphinx-copybutton",
"sphinx-autoapi"
]
release = [
"build>=1.2",
"twine>=6.0",
]
# What most users want: the exact core plus the optional pieces that make the whole
# feature set reachable. spglib is needed only to recognize symmetry in a structure that
# carries none (a bare cell and site list); everything driven by a CIF, which supplies its
# own symmetry operations, works without it.
default = [
"httk-atomistic[numpy]",
"spglib>=2.0",
]
[project.urls]
Homepage = "https://httk.org"
Documentation = "https://docs.httk.org/httk-atomistic/"
Repository = "https://github.com/httk/httk-atomistic"
Issues = "https://github.com/httk/httk-atomistic/issues"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
namespaces = true
[tool.setuptools.package-data]
"httk.atomistic" = ["py.typed"]
# httk.atomistic.data is itself a package, so its data files are declared against it
# rather than through a "data/*" glob on the parent.
"httk.atomistic.data" = ["*.json.gz", "LICENSE", "README.md"]
"httk.registry.cli.atomistic" = ["py.typed"]
"httk.registry.io.atomistic" = ["py.typed"]
"httk.registry.entries.atomistic" = ["py.typed"]
"httk.registry.schemas.atomistic" = ["*.json", "LICENSE*", "README.md"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-n 16 -m 'not extended'"
markers = [
"extended: full-depth test case; selected only by the extended test profile",
]
[tool.ruff]
target-version = "py312"
src = ["src", "examples"]
line-length = 120
[tool.pydoclint]
style = "sphinx"
arg-type-hints-in-docstring = false
check-return-types = false
check-yield-types = false
check-class-attributes = false
skip-checking-raises = true
[tool.ruff.lint]
# TRY002: raising plain Exception is accepted httk style.
# TRY004: the ValueError/TypeError choice is public API; do not churn it.
# BLE001: broad excepts deliberately isolate plugin/loader/handler failures.
ignore = ["TRY002", "TRY004", "BLE001"]
[tool.ruff.format]
# preserve replaces black's skip-string-normalization: existing quote styles are kept.
quote-style = "preserve"
[tool.pyright]
pythonVersion = "3.12"
include = ["src", "examples"]
# The examples import httk as an installed package would; point pyright at the
# in-tree sources so they resolve without relying on an editable install.
extraPaths = ["src"]
venvPath = ".."
venv = ".venv"
reportMissingImports = true
[tool.mypy]
python_version = "3.12"
files = ["src", "examples"]
mypy_path = ["src"]
namespace_packages = true
explicit_package_bases = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ["yaml", "markdown", "docutils", "docutils.*"]
ignore_missing_imports = true
# httk-serve is an optional peer distribution, not a dependency: examples/
# serve_structures_as_optimade.py imports it, but it is absent wherever only
# httk-atomistic's own dev extras are installed (its CI, for instance). Where it
# *is* on the path it is type-checked normally; this only stops the import itself
# from being an error when it is not. The matching pyright suppression is a
# file-level comment in that example.
[[tool.mypy.overrides]]
module = ["httk.serve.optimade", "httk.serve.optimade.*"]
ignore_missing_imports = true