-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
174 lines (156 loc) · 6.64 KB
/
Copy pathpyproject.toml
File metadata and controls
174 lines (156 loc) · 6.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
[project]
# The distribution name stays "awl" (the existing PyPI package); the repository
# is awl-python. The project is called AWL-LD in prose.
name = "awl"
description = "Python implementation of the Abstract Workflow Language (AWL-LD)"
authors = [{ name = "Simon Stier", email = "simon.stier@gmx.de" }]
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE"]
keywords = ["python", "workflow", "ast", "linked-data", "json-ld", "oo-ld", "rdf"]
# >=3.11 is required for ast.co_positions() (PEP 657), which the trace and
# write-back modules use to attribute events and edits to source spans.
requires-python = ">=3.11,<4.0"
# Version is managed by python-semantic-release (see [tool.semantic_release]).
# Do not edit by hand; it is bumped automatically on merge to main.
version = "0.3.2"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"pyld",
"rdflib",
"asttokens",
"oold>=0.8.0",
]
[project.optional-dependencies]
# Human-in-the-loop UI (awl.legacy.hitl). Legacy: not part of the AWL-LD
# architecture, and currently uninstallable in practice because the published
# oold wheel omits the built Vue assets that oold.ui.panel imports.
hitl = ["oold[UI-panel]"]
# Structural source edits with trivia preservation (awl.writeback)
edit = ["libcst"]
# awl.contracts.validate(). An extra rather than a dev dependency because
# validating against the contracts is part of what the package offers: any
# module built against them needs it to check its own output.
# referencing is declared explicitly rather than relied on transitively.
validate = ["jsonschema>=4.18.0", "referencing"]
# The editor: awl.ui.panel_reactflow, a Panel application. Running it is
# starting a server, which is the cost of the one canvas of five that could put
# the typed parameter form inside the node. Monaco and the type checker are
# fetched at render time, so nothing here builds or vendors JavaScript.
editor = ["panel-reactflow>=0.4.1", "panel>=1.5", "param>=2.0"]
[project.urls]
Homepage = "https://OO-LD.github.io/awl-python/"
Documentation = "https://OO-LD.github.io/awl-python/"
Repository = "https://github.com/OO-LD/awl-python"
Download = "https://pypi.org/project/awl/#files"
[dependency-groups]
dev = [
# The editor extra, so tests/ui/ runs under a plain `uv sync`, which does
# not install extras. Without it that suite skips itself and the editor
# is silently untested.
"panel-reactflow>=0.4.1",
"deptry>=0.25.0",
"mike @ git+https://github.com/squidfunk/mike.git@2.2.0+zensical-0.1.0",
"pre-commit>=4.0.0",
"pytest>=8.0.0",
"pytest-cov>=6.0.0",
"pytest-benchmark>=5.0.0",
"python-semantic-release>=10.0.0",
"ty>=0.0.1a21",
"zensical>=0.0.46",
"mkdocstrings-python>=1.0.3",
# The validate and edit extras, so their tests run under a plain
# `uv sync`, which does not install extras. CI syncs with --frozen and no
# extras, so without these the structural write-back tier would be skipped
# there and silently untested.
"jsonschema>=4.18.0",
"referencing",
"libcst",
"anywidget",
# The editor variants are exercised in a browser.
"pytest-playwright",
# Only the tests convert through these: awl.astdoc replaced ast2json
# because it renders every constant through str, so b'ab', ... and 1j
# all arrive as plain strings. They stay as an independent second
# opinion in the tests that compare against them.
"ast2json",
"json2ast",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/awl"]
[tool.semantic_release]
commit_parser = "conventional"
tag_format = "v{version}"
commit_message = "chore(release): v{version} [skip ci]"
allow_zero_version = true
build_command = "uv lock"
version_toml = ["pyproject.toml:project.version"]
version_variables = ["CITATION.cff:version"]
exclude_commit_patterns = ['''chore\(release\):.*''']
assets = ["uv.lock"]
[tool.semantic_release.changelog]
mode = "update"
insertion_flag = "<!-- version list -->"
[tool.semantic_release.changelog.default_templates]
changelog_file = "CHANGELOG.md"
[tool.pytest.ini_options]
testpaths = ["tests"]
# tests/legacy is not collected: it covers awl.legacy.hitl, which needs the
# oold UI extra and is outside the AWL-LD architecture.
# tests/benchmarks is not collected either; it has its own session via
# pytest.benchmark.ini, because coverage distorts timings.
addopts = "--cov --cov-config=pyproject.toml --cov-report=term-missing --ignore=tests/legacy --ignore=tests/benchmarks"
[tool.coverage.run]
branch = true
source = ["src"]
[tool.coverage.report]
skip_empty = true
[tool.ty.src]
# awl.legacy is retained for reference only: it is not collected by pytest and
# imports the optional oold UI extra, so it is not type checked either.
# The contract fixtures are sample sources, parsed as data and never imported;
# tier 3 references an oold branch that need not be installed.
exclude = ["src/awl/legacy", "tests/legacy", "src/awl/contracts/fixtures"]
[tool.deptry]
# awl.legacy imports panel, which is only in the hitl extra. The contract
# fixtures deliberately import modules that do not exist.
extend_exclude = ["src/awl/legacy", "src/awl/contracts/fixtures"]
[tool.deptry.per_rule_ignores]
# Declared ahead of the modules that consume them, deliberately: dependency
# changes are batched so parallel module work does not contend on uv.lock.
# rdflib and pyld are used by tests today and by awl.rdf later; asttokens and
# libcst are for awl.writeback.
# oold is used by awl.legacy.hitl today (excluded above) and by awl.facts later.
DEP002 = ["pyld", "rdflib", "asttokens", "libcst", "oold"]
[tool.ruff]
target-version = "py311"
line-length = 120
fix = true
# awl.legacy is retained for reference and not maintained; examples/ are
# illustrative notebooks for that legacy feature. The contract fixtures are
# sample sources treated as data: they are parsed, never imported or run, and
# are deliberately minimal rather than idiomatic.
extend-exclude = ["src/awl/legacy", "tests/legacy", "examples", "src/awl/contracts/fixtures"]
[tool.ruff.lint]
select = [
"YTT", "S", "B", "A", "C4", "T10", "SIM", "I", "C90", "E", "W", "F",
"PGH", "UP", "RUF", "TRY",
]
ignore = ["E501", "E731", "TRY003"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
[tool.ruff.format]
preview = true