Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
220 lines (205 loc) · 7.64 KB
/
Copy pathpyproject.toml
File metadata and controls
220 lines (205 loc) · 7.64 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
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
[build-system]
requires = ["setuptools>=77", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "httk-workflow"
version = "2.1.1"
description = "Filesystem-native workflow execution for httk₂."
readme = "README.md"
license = "AGPL-3.0-or-later"
license-files = ["LICENSE"]
requires-python = ">=3.12"
authors = [{ name = "Rickard Armiento", email = "gitcommits@armiento.net" }]
dependencies = [
# Collection attaches the DataRecord.product_of provenance edges added in 2.1.2.
"httk-core>=2.1.2,<3",
]
keywords = [
"Materials Discovery",
"Materials Informatics",
"Materials Science",
"Machine Learning",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
# POSIX rather than OS Independent: the engine reaps process groups with
# os.killpg, relies on POSIX rename and symlink semantics for its protocol,
# and ships Bash authoring libraries it executes.
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Unix Shell",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: System :: Distributed Computing",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://httk.org"
Documentation = "https://docs.httk.org/httk-workflow/"
Repository = "https://github.com/httk/httk-workflow"
Issues = "https://github.com/httk/httk-workflow/issues"
[project.optional-dependencies]
dev = [
# Full-source type checks cover the optional workflow language integrations.
"httk-workflow[cwl,jobflow,atomate2]",
"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",
]
default = []
# The CWL language realization needs a CWL *parser* when a document is prepared;
# executing the normalized plan does not, so this extra belongs on the machine
# that creates the job. cwltool is deliberately absent: httk executes the plan
# on its own runner and manager, and never shells out to another engine.
# The Python Workflow Definition realization needs no extra at all — its documents
# are plain JSON, and the `python-workflow-definition` package is used as a
# stricter validator only when an environment happens to have it.
cwl = [
"cwl-utils>=0.32,<1",
"cwl-upgrader>=1.2,<2",
]
# The jobflow language needs no extra to prepare or collect jobs; these extras
# belong on the machine that runs the job. `jobflow` supports any jobflow Maker
# and structure inputs via pymatgen; `atomate2` additionally provides its Maker library.
jobflow = [
"jobflow>=0.3.1,<0.4",
"pymatgen",
]
atomate2 = [
"atomate2>=0.1.5,<1",
"jobflow>=0.3.1,<0.4",
]
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
namespaces = true
[tool.setuptools.package-data]
"httk.workflow" = [
"py.typed",
"shell/*.sh",
# The native C authoring SDK ships beside the shell libraries as one .h/.c
# pair, designed to be vendored or compiled directly beside a runner.
"native/c/*.h",
"native/c/*.c",
# The native Fortran SDK is one module wrapping that C pair over iso_c_binding;
# it ships beside it, compiled with a runner and the C source (see docs/sdks/native_fortran_api).
"native/fortran/*.f90",
# The native Rust SDK is a std-only crate (no crates.io deps), a bridge client
# like the Bash and C ones rather than FFI over them; it ships as its Cargo
# manifest and single source file, path-depended or vendored (see docs/sdks/native_rust_api).
"native/rust/Cargo.toml",
"native/rust/src/*.rs",
# The native Perl SDK is one pure-core module, loaded directly by interpreted runners.
"native/perl/*.pm",
# The native Ada SDK is an Ada 2012 spec/body binding over the C SDK.
"native/ada/*.ads",
"native/ada/*.adb",
# The native C++ SDK is a header-only C++17 RAII wrapper over the C SDK.
"native/cpp/*.hpp",
# The native Java SDK is one java.base-only source file, compiled beside a runner.
"native/java/*.java",
"adapter_templates/*/remote.json",
"adapter_templates/*/adapter",
"launch_templates/*/launcher.json",
"launch_templates/*/launcher",
]
# The bundled legacy shell runtime is data of the v1 compatibility package it now
# lives in, so a job whose httk-v1 backend points HTTK_DIR at it finds it wherever
# httk.workflow.compat.v1 was installed.
"httk.workflow.compat.v1" = [
"v1_runtime/Execution/tasks/*.sh",
"v1_runtime/Execution/tasks/vasp/*.sh",
"v1_runtime/LICENSE",
"v1_runtime/NOTICE",
"v1_runtime/README.md",
"v1_runtime/compat/*.sh",
]
# The Python runners are modules of the package and ship with it; the Bash runner
# beside them is data, and a job referencing pkg:httk.workflow.vasp.runners/...
# needs it installed exactly like the shell libraries above.
"httk.workflow.vasp.runners" = [
"*.sh",
"scripts/relaxation_report",
"scripts/relaxation_plot",
]
# httk.workflow.languages.cwl and httk.workflow.languages.pwd follow the same rule and
# need no entry of their own: cwl_runner.py and pwd_runner.py are modules of those
# packages, so a job referencing pkg:httk.workflow.languages.cwl/... or
# pkg:httk.workflow.languages.pwd/... finds them wherever the package was installed.
# Nothing beside them is data.
[tool.pytest.ini_options]
testpaths = ["tests"]
# Match the host CPU count: a fixed 16 workers starves runner subprocesses on
# small CI hosts and causes manager deadlines to expire. Cap larger hosts at 16.
# An extended run overrides the marker selection with `-m ""`.
addopts = "-n auto --maxprocesses 16 --dist loadgroup -m 'not extended'"
markers = [
"slow: drives real processes and waits on them; deselect with -m 'not slow'",
"extended: full-depth test case; selected only by the extended test profile",
# Timing-sensitive tests belong in the serial `-m timing -n 0` pass; if a
# timing-sensitive test is missed, it remains in the parallel pass.
"timing: asserts or depends on wall-clock timing; run serially after the parallel pass",
"xdist_group(name): schedule related timing-sensitive tests on one worker",
]
[tool.ruff]
target-version = "py312"
src = ["src", "examples", "tests"]
line-length = 120
[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", "tests"]
extraPaths = ["src", "../httk-core/src"]
venvPath = ".."
venv = ".venv"
reportMissingImports = true
[tool.mypy]
python_version = "3.12"
files = ["src", "examples", "tests"]
mypy_path = ["src", "tests"]
namespace_packages = true
explicit_package_bases = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ["yaml", "markdown", "docutils", "docutils.*"]
ignore_missing_imports = true
# Optional peer integrations remain type-checked whenever those distributions
# are installed; their absence must not break this module's own release gates.
[[tool.mypy.overrides]]
module = ["httk.atomistic", "httk.atomistic.*", "httk.store", "httk.store.*"]
ignore_missing_imports = true
[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