Coverage for packages/workshop/src/livery/workshop/__init__.py: 100%

Measured by coverage.py 7.16.2 on CPython 3.14 while the suites of tests, packages/workshop/tests/test_workshop_workflow.py, packages/workshop/tests/test_workshop_words.py, packages/workshop/tests/test_workshop_without_docs.py, packages/workshop/tests/test_workshop_windows_arguments.py, packages/workshop/tests/test_workshop_walk.py, packages/workshop/tests/test_workshop_vocabulary.py, packages/workshop/tests/test_workshop_versions.py, packages/workshop/tests/test_workshop_verify.py, packages/workshop/tests/test_workshop_variables.py, packages/workshop/tests/test_workshop_update.py, packages/workshop/tests/test_workshop_traces.py, packages/workshop/tests/test_workshop_tokens.py, packages/workshop/tests/test_workshop_test_reads.py, packages/workshop/tests/test_workshop_test_guard.py, packages/workshop/tests/test_workshop_templates.py, packages/workshop/tests/test_workshop_sync_locked.py, packages/workshop/tests/test_workshop_sync_install.py, packages/workshop/tests/test_workshop_sync.py, packages/workshop/tests/test_workshop_sweep.py, packages/workshop/tests/test_workshop_submit.py, packages/workshop/tests/test_workshop_store_tasks.py, packages/workshop/tests/test_workshop_steps.py, packages/workshop/tests/test_workshop_speed.py, packages/workshop/tests/test_workshop_skip_marks.py, packages/workshop/tests/test_workshop_shipped_files.py, packages/workshop/tests/test_workshop_shells.py, packages/workshop/tests/test_workshop_shard.py, packages/workshop/tests/test_workshop_seeds.py, packages/workshop/tests/test_workshop_security.py, packages/workshop/tests/test_workshop_schema.py, packages/workshop/tests/test_workshop_scale.py, packages/workshop/tests/test_workshop_runtime_language.py, packages/workshop/tests/test_workshop_runs.py, packages/workshop/tests/test_workshop_run.py, packages/workshop/tests/test_workshop_root_attribution.py, packages/workshop/tests/test_workshop_repair.py, packages/workshop/tests/test_workshop_render.py, packages/workshop/tests/test_workshop_release_render.py, packages/workshop/tests/test_workshop_release_point.py, packages/workshop/tests/test_workshop_release_fresh.py, packages/workshop/tests/test_workshop_release_driver.py, packages/workshop/tests/test_workshop_release.py, packages/workshop/tests/test_workshop_registries.py, packages/workshop/tests/test_workshop_regions.py, packages/workshop/tests/test_workshop_queries.py, packages/workshop/tests/test_workshop_quality.py, packages/workshop/tests/test_workshop_pythons.py, packages/workshop/tests/test_workshop_pytest_points.py, packages/workshop/tests/test_workshop_pytest_layout.py, packages/workshop/tests/test_workshop_pytest_console.py, packages/workshop/tests/test_workshop_publish.py, packages/workshop/tests/test_workshop_public_names.py, packages/workshop/tests/test_workshop_provenance.py, packages/workshop/tests/test_workshop_proved_trees.py, packages/workshop/tests/test_workshop_proved_shadow.py, packages/workshop/tests/test_workshop_proved_parts.py, packages/workshop/tests/test_workshop_proved_flaky.py, packages/workshop/tests/test_workshop_proved_escapes.py, packages/workshop/tests/test_workshop_proved_decide.py, packages/workshop/tests/test_workshop_proved.py, packages/workshop/tests/test_workshop_prose.py, packages/workshop/tests/test_workshop_proof_pins.py, packages/workshop/tests/test_workshop_points_contributed.py, packages/workshop/tests/test_workshop_points.py, packages/workshop/tests/test_workshop_plugin_tools.py, packages/workshop/tests/test_workshop_phases.py, packages/workshop/tests/test_workshop_phase_verbs.py, packages/workshop/tests/test_workshop_package_templates.py, packages/workshop/tests/test_workshop_package_level_fragments.py, packages/workshop/tests/test_workshop_package.py, packages/workshop/tests/test_workshop_one_door.py, packages/workshop/tests/test_workshop_new_project.py, packages/workshop/tests/test_workshop_metrics.py, packages/workshop/tests/test_workshop_lifecycle.py, packages/workshop/tests/test_workshop_layering.py, packages/workshop/tests/test_workshop_issue.py, packages/workshop/tests/test_workshop_isolated.py, packages/workshop/tests/test_workshop_invoke.py, packages/workshop/tests/test_workshop_inputs_pins.py, packages/workshop/tests/test_workshop_influence.py, packages/workshop/tests/test_workshop_identity.py, packages/workshop/tests/test_workshop_groups.py, packages/workshop/tests/test_workshop_graph.py, packages/workshop/tests/test_workshop_governance.py, packages/workshop/tests/test_workshop_fragments.py, packages/workshop/tests/test_workshop_fragment_engine.py, packages/workshop/tests/test_workshop_footprint.py, packages/workshop/tests/test_workshop_fold.py, packages/workshop/tests/test_workshop_fallbacks.py, packages/workshop/tests/test_workshop_extensions.py, packages/workshop/tests/test_workshop_extension_mount.py, packages/workshop/tests/test_workshop_examples.py, packages/workshop/tests/test_workshop_env.py, packages/workshop/tests/test_workshop_entry.py, packages/workshop/tests/test_workshop_e2e_rows.py, packages/workshop/tests/test_workshop_e2e.py, packages/workshop/tests/test_workshop_due.py, packages/workshop/tests/test_workshop_doctor_unlisted.py, packages/workshop/tests/test_workshop_doctor.py, packages/workshop/tests/test_workshop_dispatch.py, packages/workshop/tests/test_workshop_devenv.py, packages/workshop/tests/test_workshop_dev_release.py, packages/workshop/tests/test_workshop_declaration.py, packages/workshop/tests/test_workshop_currency.py, packages/workshop/tests/test_workshop_credential_traces.py, packages/workshop/tests/test_workshop_cpp_kind.py, packages/workshop/tests/test_workshop_conventional.py, packages/workshop/tests/test_workshop_contributed_jobs.py, packages/workshop/tests/test_workshop_contract_file.py, packages/workshop/tests/test_workshop_contract.py, packages/workshop/tests/test_workshop_conformance.py, packages/workshop/tests/test_workshop_composition.py, packages/workshop/tests/test_workshop_commit.py, packages/workshop/tests/test_workshop_claims.py, packages/workshop/tests/test_workshop_ci_context.py, packages/workshop/tests/test_workshop_categories.py, packages/workshop/tests/test_workshop_c7_shards.py, packages/workshop/tests/test_workshop_balance.py, packages/workshop/tests/test_workshop_affected_legs.py, packages/workshop/tests/test_tools_restub.py, packages/workshop/tests/test_tools_materialise.py, packages/workshop/tests/test_kind_tools.py, packages/extensions/ty/tests/test_ty.py, packages/extensions/ruff/tests/test_ruff.py, packages/extensions/python/tests/test_speed.py, packages/extensions/python/tests/test_runner_terminal.py, packages/extensions/python/tests/test_release_driver.py, packages/extensions/python/tests/test_quality.py, packages/extensions/python/tests/test_python_phases.py, packages/extensions/python/tests/test_python_layering.py, packages/extensions/python/tests/test_private_reaches.py, packages/extensions/python/tests/test_plugin_reaches.py, packages/extensions/python/tests/test_extensions_python.py, packages/extensions/python/tests/test_examples.py, packages/extensions/python/tests/test_declared_imports.py, packages/extensions/python/tests/test_credential_traces.py, packages/extensions/pytest/tests/test_pytest_observer_shadow.py, packages/extensions/pytest/tests/test_pytest_observer_runner.py, packages/extensions/pytest/tests/test_pytest_observer.py, packages/extensions/pytest/tests/test_pytest_guard.py, packages/extensions/pytest/tests/test_pytest_coverage.py, packages/extensions/pytest/tests/test_pytest_contexts.py, packages/extensions/pytest/tests/test_pytest_c6_selection.py, packages/extensions/pytest/tests/test_pytest_c5_repeats.py, packages/extensions/pytest/tests/test_pytest_c4_reads.py, packages/extensions/pytest/tests/test_pytest.py, packages/extensions/pyrefly/tests/test_pyrefly.py, packages/extensions/nanobind/tests/test_nanobind_kind.py, packages/extensions/nanobind/tests/test_kind_publish.py, packages/extensions/nanobind/tests/test_extensions_nanobind.py, packages/extensions/mypy/tests/test_mypy.py, packages/extensions/mkdocstrings/tests/test_mkdocstrings_refs.py, packages/extensions/mkdocstrings/tests/test_mkdocstrings_docstrings.py, packages/extensions/mkdocstrings/tests/test_mkdocstrings_digests.py, packages/extensions/mkdocstrings/tests/test_mkdocstrings.py, packages/extensions/lfs/tests/test_lfs.py, packages/extensions/docs/tests/test_taskref.py, packages/extensions/docs/tests/test_task_links.py, packages/extensions/docs/tests/test_llms.py, packages/extensions/docs/tests/test_influence.py, packages/extensions/docs/tests/test_groups.py, packages/extensions/docs/tests/test_extensions_docs.py, packages/extensions/docs/tests/test_docs_verbs.py, packages/extensions/docs/tests/test_docs_site.py, packages/extensions/docs/tests/test_docs_phase.py, packages/extensions/docs/tests/test_docs_contract.py, packages/extensions/docs/tests/test_docs.py, packages/extensions/docs/tests/test_doc_steps.py, packages/extensions/cpp/tests/test_extensions_cpp.py, packages/extensions/coverage/tests/test_parts.py, packages/extensions/coverage/tests/test_extensions_coverage.py, packages/extensions/coverage/tests/test_coverage_union_pins.py, packages/extensions/coverage/tests/test_coverage_store.py, packages/extensions/coverage/tests/test_coverage_proved_parts.py, packages/extensions/coverage/tests/test_coverage_pages.py, packages/extensions/coverage/tests/test_coverage_marks.py, packages/extensions/coverage/tests/test_coverage_format.py, packages/extensions/coverage/tests/test_coverage_accept.py, packages/extensions/coverage/tests/test_coverage.py, packages/extensions/coverage/tests/test_affected_legs.py, packages/extensions/conan/tests/test_layering.py, packages/extensions/conan/tests/test_extensions_conan.py, packages/extensions/conan/tests/test_cross_kind.py, packages/extensions/conan/tests/test_conan_releases.py, packages/extensions/conan/tests/test_conan_publish.py, packages/extensions/conan/tests/test_conan_kind.py, packages/extensions/cmake/tests/test_measured_run.py, packages/extensions/cmake/tests/test_cpp_kind.py, packages/extensions/cmake/tests/test_coverage_parts.py, packages/extensions/cmake/tests/test_cmake.py, packages/extensions/clang-tidy/tests/test_clang_tidy.py, packages/extensions/clang-format/tests/test_clang_format.py, packages/extensions/changelog/tests/test_changelog.py, packages/extensions/basedpyright/tests/test_basedpyright.py, packages/extensions/agents/tests/test_agents.py ran.

1"""The livery ecosystem's devkit.
2
3The task surface arrives through the footman plugin
4(``plugin("livery.workshop")``); this module's own API is the extension
5walk (livery.workshop.extension_names, livery.workshop.workspace_root),
6the package contracts
7(livery.workshop.discover_packages, livery.workshop.verify_workspace
8over livery.workshop.Package and livery.workshop.Edge). The forge
9lane belongs to
10livery.forge.Forge; the workshop orchestrates local, git, and forge
11steps and never hands a raw forge verb to a user.
12
13An extension in its own wheel declares itself in an ``extension.toml``
14beside the package its ``workshop.extensions`` entry point names: the
15steps it adds to the gate's phases under ``[phases.<phase>.<step>]``,
16each with its body under ``main``, a template of its tool's words
17with ``{paths}`` where the paths the run reaches go and
18``{arguments}`` where the words after ``--`` go, or the function that
19runs it as ``"module:function"``. A step in code takes a
20[livery.workshop.PhaseContext][]. One that narrows by paths reads them
21from [livery.workshop.scoped_paths][], which answers
22[livery.workshop.WHOLE][] for the tool's configured whole, and
23calls its tool through [livery.workshop.run_batched][]; a workspace
24step that declares no ``inputs`` narrows by packages and reads them
25from [livery.workshop.scoped_packages][], and one that judges a
26package at a time (``scope = "package"``) reads its files from
27[livery.workshop.scoped_files][]. One that declares ``inputs`` judges
28the whole workspace in every scope, and asks
29[livery.workshop.selected_files][] which of them this run's change
30touched, with the context its run was handed; its ``widen``
31reference receives the run's [livery.workshop.Changes][]. A step
32declares the options a package may set on it under its ``options``
33and reads a package's value with [livery.workshop.step_option][],
34which answers from the installed declaration in a process that
35mounted nothing. A step names the extensions it judges packages by,
36[livery.workshop.step_extensions][], and judges a package whose set
37holds one of them: the extensions it lists and every one they
38require, [livery.workshop.extension_set][]. A step declared
39``enabled = false`` registers once the root contract turns it on at
40the step's address, which [livery.workshop.step_enabled][] answers.
41A step asks a package's extensions
42what it needs of the package with [livery.workshop.answer][]: the
43modules a type-completeness step verifies,
44[livery.workshop.PUBLIC_MODULES][], or where the package's build
45writes the compilation database a linter reads,
46[livery.workshop.COMPILE_COMMANDS][]. The workspace's own tests, the
47``tests`` directory at its root, are a unit of their own,
48[livery.workshop.workspace_suite][], which holds the root's set. A
49test step runs them beside the packages it judges while that set
50holds an extension the step names: [livery.workshop.scoped_suite][]
51returns the unit then. A step whose tool of the store is not on
52``PATH`` refuses with [livery.workshop.undeployed][]: the refusal
53names the tool and the sync that deploys it.
54
55An extension reads the workspace through the names the engine reads
56it by: the root of the workspace a package is a member of,
57[livery.workshop.Package.root][]; a contract's judged keys,
58[livery.workshop.read_contract][]; a query's answer,
59[livery.workshop.answer][], asked with a package or
60the workspace root through a [livery.workshop.Query][] handle; the CI
61run it belongs to, [livery.workshop.ci_run][], a
62[livery.workshop.RunContext][] or None at a desk; the workspace's
63repository on its forge, [livery.workshop.forge_repository][], and,
64connected, [livery.workshop.this_repository][] on
65[livery.workshop.this_forge][], whose everyday token
66[livery.workshop.forge_token][] resolves; the
67registry an artifact kind goes to, [livery.workshop.registry][], a
68[livery.workshop.RegistryTarget][], which a step of the ``publish``
69phase reads from its ``registry-target`` key with
70[livery.workshop.RegistryTarget.from_table][]; and the release
71notes' provider the listed extensions answer,
72[livery.workshop.release_notes][], which
73answers the [livery.workshop.ReleaseNotes][] protocol. A file an extension
74writes outside the engine opens with
75[livery.workshop.generated_header][]. What a CI run changed
76against the base it measures from is [livery.workshop.ci_changes][].
77The guidance for one reader, [livery.workshop.AGENT][] or
78[livery.workshop.HUMAN][], is the composed set of
79[livery.workshop.Prose][] fragments [livery.workshop.guidance][]
80answers; each listed extension's shipped files live where
81[livery.workshop.shipped_content][] says; the gate's fixers run over
82named files through [livery.workshop.fix_files][], and a phase's steps
83over named packages through [livery.workshop.run_phase_over][]; and
84what the listed extensions declare for an extension is
85[livery.workshop.contributions_for][]. A phase the gate never runs,
86one declared ``gated = false``, runs over the workspace through
87[livery.workshop.run_phase][], which first removes what a step that
88stopped running declared it writes under ``outputs``. The members come
89in release order from [livery.workshop.order_topologically][], every
90dependency before its dependents, and [livery.workshop.release_tag][]
91reads the member and the version a release tag names. A query's
92combine function that decides between answers by what each answering
93extension requires hands the lookup it is called with to
94[livery.workshop.nearest_extensions][].
95
96An extension that keeps records of a CI run reaches them through the
97names the gate's own records use. The workshop's series live on the
98checkout's state store, [livery.workshop.state_store][]; on it,
99[livery.workshop.RUNS][] keeps each check leg's files for one run
100until the gate job collects them. A check leg's entry leaves a file
101for the leg's one write with [livery.workshop.leave_leg_file][], and
102reads what the gate ran on the leg, a [livery.workshop.LegScope][],
103from [livery.workshop.leg_scope][]. The gate job's entry leaves a
104section of the run's row with [livery.workshop.leave_section][]. The
105branch whose run proved the checkout's tree, a
106[livery.workshop.VerifiedBranch][], is what
107[livery.workshop.verified_branch][] reads. The check legs the gate produces
108are [livery.workshop.check_legs][], and those a pull request's run
109produces are [livery.workshop.pull_request_legs][], unless the pull
110request carries [livery.workshop.EVERY_RUNNER_LABEL][], when its run
111produces every leg; split into the
112shards the contract gives each runner they are
113[livery.workshop.check_shards][] and
114[livery.workshop.pull_request_shards][], each shard spelled by a
115[livery.workshop.Shard][] at the end of its label, which
116[livery.workshop.platform_leg][] and [livery.workshop.shard_of][]
117split. A shard's share of the items a test step partitions, pytest's
118test files, is what [livery.workshop.partition][] packs from the medians
119[livery.workshop.read_durations][] takes over the platform leg's rows
120in the [livery.workshop.DURATIONS][] family, bounded by
121[livery.workshop.checkout_time][]; the set it partitioned has the
122digest [livery.workshop.files_digest][], and the shard leaves what it
123ran with [livery.workshop.leave_shard][], a
124[livery.workshop.ShardMarker][] that [livery.workshop.read_shard][]
125reads back. Of a set of
126units, each a member's suite or the workspace's own tests at
127[livery.workshop.WORKSPACE_TESTS][], [livery.workshop.tested][] keeps
128those a test step runs. Whether a package holds the extension of the
129workshop's own language is [livery.workshop.holds_runtime_language][],
130and what a path is to its package, a [livery.workshop.Category][], is
131[livery.workshop.category_of][].
132
133An extension that builds a release's artifacts in a CI job of its own
134reaches the release through the names the release train uses. The
135members a release squash releases, each with its version, are what
136[livery.workshop.discover_release][] reads at a commit, and
137[livery.workshop.build_release][] builds one of them as the release
138train does, into its ``dist/``. The members a job of the release point
139builds before the wave are the workspace's answer to
140[livery.workshop.JOB_BUILT_MEMBERS][]. The interpreters the CI matrix
141runs are [livery.workshop.python_matrix][]. What the checkout
142installed of each tool is [livery.workshop.tool_receipts][], a
143[livery.workshop.ToolReceipt][] per tool, and the tool store's home on
144this machine is [livery.workshop.store_home][].
145
146An extension that judges a language's sources reads what each source
147references from its package's ``references`` answer: one
148[livery.workshop.SourceReferences][] per source, and a
149[livery.workshop.ReferencedName][] for each name the source references
150and how it makes the reference. Which member owns a referenced name is
151what [livery.workshop.neighbours][] answers, a
152[livery.workshop.Neighbours][] made from each member's module roots. A
153step over the sources runs over every one of them when
154[livery.workshop.graph_changed][] says a contract, a native manifest or
155a root ``src/`` changed.
156
157An extension that runs python in a venv names its interpreter with
158[livery.workshop.venv_python][] and its executables directory with
159[livery.workshop.scripts_dir][]. A runner that starts pytest shares two
160names with the workshop's pytest plugins: [livery.workshop.is_example][]
161says which files the examples plugin collects as documentation
162examples, and the speed plugin sums each package's test time into the
163file the runner names in the variable
164[livery.workshop.SPEED_FILE_VARIABLE][]. The plugins read three more
165names of the workshop: the speed plugin sums by the package
166[livery.workshop.package_of][] names for a test's node id, the points
167plugin selects the tests of the CI point named in
168[livery.workshop.POINT_VARIABLE][], and the layout plugin checks the
169tests directory of each directory
170[livery.workshop.package_directories][] lists. Each package's mark on
171each check leg, a [livery.workshop.SpeedMark][], is what
172[livery.workshop.speed_marks][] reads.
173
174An extension adds steps to a package's lifecycle phases under
175``[phases.<phase>.<step>]``, with the keys every step takes;
176each runs once per package whose set holds the extension and
177receives the same [livery.workshop.PhaseContext][], which carries the
178keys the steps provide and read. It
179answers questions about a package under ``[queries]``: each a
180[livery.workshop.Query][] the workshop defines, such as
181[livery.workshop.PUBLIC_MODULES][] or [livery.workshop.EXECUTABLES][],
182which [livery.workshop.answer][] asks of a package's extensions and
183combines by the query's rule. Each function it answers
184``requirement-writers`` with writes a requirement on a sibling into
185the package's manifest, and is a [livery.workshop.RequirementWriter][].
186"""
187
188from __future__ import annotations(empty)
189
190# The literal-False spelling the checkers honour without importing
191# `typing`: the names below are what a checker sees, and at runtime
192# `__getattr__` serves each from its module when it is read, so importing
193# one private module of the workshop never loads the rest.
194TYPE_CHECKING = False(empty)
195if TYPE_CHECKING:(empty)
196 from livery.workshop import testing as testing
197 from livery.workshop._categories import Category as Category
198 from livery.workshop._categories import category_of as category_of
199 from livery.workshop._ci_context import POINT_VARIABLE as POINT_VARIABLE
200 from livery.workshop._ci_context import RunContext as RunContext
201 from livery.workshop._ci_context import ci_run as ci_run
202 from livery.workshop._ci_context import state_store as state_store
203 from livery.workshop._composition import extension_set as extension_set
204 from livery.workshop._composition import (
205 nearest_extensions as nearest_extensions,
206 )
207 from livery.workshop._contract import read_contract as read_contract
208 from livery.workshop._examples import is_example as is_example
209 from livery.workshop._extensions import contributions_for as contributions_for
210 from livery.workshop._extensions import extension_names as extension_names
211 from livery.workshop._extensions import shipped_content as shipped_content
212 from livery.workshop._extensions import workspace_root as workspace_root
213 from livery.workshop._forge_lane import forge_repository as forge_repository
214 from livery.workshop._forge_lane import this_forge as this_forge
215 from livery.workshop._forge_lane import this_repository as this_repository
216 from livery.workshop._graph import order_topologically as order_topologically
217 from livery.workshop._influence import Changes as Changes
218 from livery.workshop._invoke import run_batched as run_batched
219 from livery.workshop._lifecycle import build_release as build_release
220 from livery.workshop._metrics import RUN_LEGS as RUN_LEGS
221 from livery.workshop._metrics import RUNS as RUNS
222 from livery.workshop._metrics import leave_leg_file as leave_leg_file
223 from livery.workshop._metrics import leave_section as leave_section
224 from livery.workshop._metrics import read_leg_json as read_leg_json
225 from livery.workshop._metrics import run_leg_dirs as run_leg_dirs
226 from livery.workshop._packages import WORKSPACE_TESTS as WORKSPACE_TESTS
227 from livery.workshop._packages import Edge as Edge
228 from livery.workshop._packages import Neighbours as Neighbours
229 from livery.workshop._packages import Package as Package
230 from livery.workshop._packages import ReferencedName as ReferencedName
231 from livery.workshop._packages import SourceReferences as SourceReferences
232 from livery.workshop._packages import discover_packages as discover_packages
233 from livery.workshop._packages import (
234 holds_runtime_language as holds_runtime_language,
235 )
236 from livery.workshop._packages import neighbours as neighbours
237 from livery.workshop._packages import (
238 package_directories as package_directories,
239 )
240 from livery.workshop._packages import release_tag as release_tag
241 from livery.workshop._packages import verify_workspace as verify_workspace
242 from livery.workshop._packages import workspace_suite as workspace_suite
243 from livery.workshop._phases import PhaseContext as PhaseContext
244 from livery.workshop._phases import run_phase as run_phase
245 from livery.workshop._points import EVERY_RUNNER_LABEL as EVERY_RUNNER_LABEL
246 from livery.workshop._points import check_legs as check_legs
247 from livery.workshop._points import check_shards as check_shards
248 from livery.workshop._points import pull_request_legs as pull_request_legs
249 from livery.workshop._points import pull_request_shards as pull_request_shards
250 from livery.workshop._prose import AGENT as AGENT
251 from livery.workshop._prose import HUMAN as HUMAN
252 from livery.workshop._prose import Prose as Prose
253 from livery.workshop._prose import guidance as guidance
254 from livery.workshop._proved import NO_SELECT_VARIABLE as NO_SELECT_VARIABLE
255 from livery.workshop._proved import PROVED_PARTS as PROVED_PARTS
256 from livery.workshop._proved import Escape as Escape
257 from livery.workshop._proved import ItemReadSet as ItemReadSet
258 from livery.workshop._proved import ItemSelection as ItemSelection
259 from livery.workshop._proved import RanItems as RanItems
260 from livery.workshop._proved import (
261 active_escaped_packages as active_escaped_packages,
262 )
263 from livery.workshop._proved import detect_item_escapes as detect_item_escapes
264 from livery.workshop._proved import dir_listing_digest as dir_listing_digest
265 from livery.workshop._proved import head_tree_id as head_tree_id
266 from livery.workshop._proved import item_read_set_matches as item_read_set_matches
267 from livery.workshop._proved import (
268 item_selection_disabled as item_selection_disabled,
269 )
270 from livery.workshop._proved import (
271 proved_parts_prefixes as proved_parts_prefixes,
272 )
273 from livery.workshop._proved import proved_parts_series as proved_parts_series
274 from livery.workshop._proved import proved_unit_key as proved_unit_key
275 from livery.workshop._proved import proved_unit_keys as proved_unit_keys
276 from livery.workshop._proved import put_proved_part as put_proved_part
277 from livery.workshop._proved import read_proved_part as read_proved_part
278 from livery.workshop._proved import read_ran_items as read_ran_items
279 from livery.workshop._proved import record_escapes as record_escapes
280 from livery.workshop._proved import (
281 record_item_observations as record_item_observations,
282 )
283 from livery.workshop._proved import record_ran_items as record_ran_items
284 from livery.workshop._proved import (
285 record_selection_measure as record_selection_measure,
286 )
287 from livery.workshop._proved import shadow_select_items as shadow_select_items
288 from livery.workshop._provenance import generated_header as generated_header
289 from livery.workshop._publish import discover_release as discover_release
290 from livery.workshop._pythons import python_matrix as python_matrix
291 from livery.workshop._pythons import scripts_dir as scripts_dir
292 from livery.workshop._pythons import venv_python as venv_python
293 from livery.workshop._quality import ci_changes as ci_changes
294 from livery.workshop._quality import fix_files as fix_files
295 from livery.workshop._quality import run_phase_over as run_phase_over
296 from livery.workshop._queries import COMPILE_COMMANDS as COMPILE_COMMANDS
297 from livery.workshop._queries import CURRENT_VERSION as CURRENT_VERSION
298 from livery.workshop._queries import DISTRIBUTIONS as DISTRIBUTIONS
299 from livery.workshop._queries import EXECUTABLES as EXECUTABLES
300 from livery.workshop._queries import JOB_BUILT_MEMBERS as JOB_BUILT_MEMBERS
301 from livery.workshop._queries import MODULE_ROOTS as MODULE_ROOTS
302 from livery.workshop._queries import PUBLIC_MODULES as PUBLIC_MODULES
303 from livery.workshop._queries import REQUIREMENTS as REQUIREMENTS
304 from livery.workshop._queries import TEST_ITEMS as TEST_ITEMS
305 from livery.workshop._queries import VERSION_FILES as VERSION_FILES
306 from livery.workshop._queries import Query as Query
307 from livery.workshop._queries import RequirementWriter as RequirementWriter
308 from livery.workshop._queries import answer as answer
309 from livery.workshop._registries import RegistryTarget as RegistryTarget
310 from livery.workshop._registries import registry as registry
311 from livery.workshop._release_notes import ReleaseNotes as ReleaseNotes
312 from livery.workshop._release_notes import release_notes as release_notes
313 from livery.workshop._scope import LegScope as LegScope
314 from livery.workshop._scope import VerifiedBranch as VerifiedBranch
315 from livery.workshop._scope import leg_scope as leg_scope
316 from livery.workshop._scope import verified_branch as verified_branch
317 from livery.workshop._shard import DURATIONS as DURATIONS
318 from livery.workshop._shard import Shard as Shard
319 from livery.workshop._shard import ShardMarker as ShardMarker
320 from livery.workshop._shard import VerifiedPlan as VerifiedPlan
321 from livery.workshop._shard import checkout_time as checkout_time
322 from livery.workshop._shard import files_digest as files_digest
323 from livery.workshop._shard import leave_shard as leave_shard
324 from livery.workshop._shard import partition as partition
325 from livery.workshop._shard import platform_leg as platform_leg
326 from livery.workshop._shard import read_durations as read_durations
327 from livery.workshop._shard import read_shard as read_shard
328 from livery.workshop._shard import read_verified_plan as read_verified_plan
329 from livery.workshop._shard import shard_of as shard_of
330 from livery.workshop._speed import SPEED_FILE_VARIABLE as SPEED_FILE_VARIABLE
331 from livery.workshop._speed import SpeedMark as SpeedMark
332 from livery.workshop._speed import package_of as package_of
333 from livery.workshop._speed import speed_marks as speed_marks
334 from livery.workshop._steps import NONE as NONE
335 from livery.workshop._steps import PACKAGE as PACKAGE
336 from livery.workshop._steps import PACKAGES as PACKAGES
337 from livery.workshop._steps import PATHS as PATHS
338 from livery.workshop._steps import WHOLE as WHOLE
339 from livery.workshop._steps import graph_changed as graph_changed
340 from livery.workshop._steps import scoped_files as scoped_files
341 from livery.workshop._steps import scoped_packages as scoped_packages
342 from livery.workshop._steps import scoped_paths as scoped_paths
343 from livery.workshop._steps import scoped_suite as scoped_suite
344 from livery.workshop._steps import selected_files as selected_files
345 from livery.workshop._steps import step_enabled as step_enabled
346 from livery.workshop._steps import step_extensions as step_extensions
347 from livery.workshop._steps import step_option as step_option
348 from livery.workshop._steps import tested as tested
349 from livery.workshop._tokens import forge_token as forge_token
350 from livery.workshop._tools import ToolReceipt as ToolReceipt
351 from livery.workshop._tools import store_home as store_home
352 from livery.workshop._tools import tool_receipts as tool_receipts
353 from livery.workshop._tools import undeployed as undeployed
354
355__version__ = "0.12.0"(empty)
356
357__all__ = [(empty)
358 "AGENT",
359 "COMPILE_COMMANDS",
360 "CURRENT_VERSION",
361 "DISTRIBUTIONS",
362 "DURATIONS",
363 "EVERY_RUNNER_LABEL",
364 "EXECUTABLES",
365 "HUMAN",
366 "JOB_BUILT_MEMBERS",
367 "MODULE_ROOTS",
368 "NONE",
369 "NO_SELECT_VARIABLE",
370 "PACKAGE",
371 "PACKAGES",
372 "PATHS",
373 "POINT_VARIABLE",
374 "PROVED_PARTS",
375 "PUBLIC_MODULES",
376 "REQUIREMENTS",
377 "RUNS",
378 "RUN_LEGS",
379 "SPEED_FILE_VARIABLE",
380 "TEST_ITEMS",
381 "VERSION_FILES",
382 "WHOLE",
383 "WORKSPACE_TESTS",
384 "Category",
385 "Changes",
386 "Edge",
387 "Escape",
388 "ItemReadSet",
389 "ItemSelection",
390 "LegScope",
391 "Neighbours",
392 "Package",
393 "PhaseContext",
394 "Prose",
395 "Query",
396 "RanItems",
397 "ReferencedName",
398 "RegistryTarget",
399 "ReleaseNotes",
400 "RequirementWriter",
401 "RunContext",
402 "Shard",
403 "ShardMarker",
404 "SourceReferences",
405 "SpeedMark",
406 "ToolReceipt",
407 "VerifiedBranch",
408 "VerifiedPlan",
409 "__version__",
410 "active_escaped_packages",
411 "answer",
412 "build_release",
413 "category_of",
414 "check_legs",
415 "check_shards",
416 "checkout_time",
417 "ci_changes",
418 "ci_run",
419 "contributions_for",
420 "detect_item_escapes",
421 "dir_listing_digest",
422 "discover_packages",
423 "discover_release",
424 "extension_names",
425 "extension_set",
426 "files_digest",
427 "fix_files",
428 "forge_repository",
429 "forge_token",
430 "generated_header",
431 "graph_changed",
432 "guidance",
433 "head_tree_id",
434 "holds_runtime_language",
435 "is_example",
436 "item_read_set_matches",
437 "item_selection_disabled",
438 "leave_leg_file",
439 "leave_section",
440 "leave_shard",
441 "leg_scope",
442 "nearest_extensions",
443 "neighbours",
444 "order_topologically",
445 "package_directories",
446 "package_of",
447 "partition",
448 "platform_leg",
449 "proved_parts_prefixes",
450 "proved_parts_series",
451 "proved_unit_key",
452 "proved_unit_keys",
453 "pull_request_legs",
454 "pull_request_shards",
455 "put_proved_part",
456 "python_matrix",
457 "read_contract",
458 "read_durations",
459 "read_leg_json",
460 "read_proved_part",
461 "read_ran_items",
462 "read_shard",
463 "read_verified_plan",
464 "record_escapes",
465 "record_item_observations",
466 "record_ran_items",
467 "record_selection_measure",
468 "registry",
469 "release_notes",
470 "release_tag",
471 "run_batched",
472 "run_leg_dirs",
473 "run_phase",
474 "run_phase_over",
475 "scoped_files",
476 "scoped_packages",
477 "scoped_paths",
478 "scoped_suite",
479 "scripts_dir",
480 "selected_files",
481 "shadow_select_items",
482 "shard_of",
483 "shipped_content",
484 "speed_marks",
485 "state_store",
486 "step_enabled",
487 "step_extensions",
488 "step_option",
489 "store_home",
490 "tested",
491 "testing",
492 "this_forge",
493 "this_repository",
494 "tool_receipts",
495 "undeployed",
496 "venv_python",
497 "verified_branch",
498 "verify_workspace",
499 "workspace_root",
500 "workspace_suite",
501]
502
503# The module each lazily served name lives in.
504_EXPORTS: dict[str, str] = {(empty)
505 "COMPILE_COMMANDS": "livery.workshop._queries",
506 "CURRENT_VERSION": "livery.workshop._queries",
507 "DISTRIBUTIONS": "livery.workshop._queries",
508 "EXECUTABLES": "livery.workshop._queries",
509 "MODULE_ROOTS": "livery.workshop._queries",
510 "PUBLIC_MODULES": "livery.workshop._queries",
511 "REQUIREMENTS": "livery.workshop._queries",
512 "TEST_ITEMS": "livery.workshop._queries",
513 "VERSION_FILES": "livery.workshop._queries",
514 "JOB_BUILT_MEMBERS": "livery.workshop._queries",
515 "ToolReceipt": "livery.workshop._tools",
516 "build_release": "livery.workshop._lifecycle",
517 "discover_release": "livery.workshop._publish",
518 "python_matrix": "livery.workshop._pythons",
519 "store_home": "livery.workshop._tools",
520 "tool_receipts": "livery.workshop._tools",
521 "Neighbours": "livery.workshop._packages",
522 "ReferencedName": "livery.workshop._packages",
523 "SourceReferences": "livery.workshop._packages",
524 "neighbours": "livery.workshop._packages",
525 "graph_changed": "livery.workshop._steps",
526 "scripts_dir": "livery.workshop._pythons",
527 "venv_python": "livery.workshop._pythons",
528 "is_example": "livery.workshop._examples",
529 "SPEED_FILE_VARIABLE": "livery.workshop._pytest_common",
530 "package_of": "livery.workshop._pytest_common",
531 "POINT_VARIABLE": "livery.workshop._pytest_common",
532 "package_directories": "livery.workshop._pytest_common",
533 "SpeedMark": "livery.workshop._speed",
534 "speed_marks": "livery.workshop._speed",
535 "RUN_LEGS": "livery.workshop._metrics",
536 "RUNS": "livery.workshop._metrics",
537 "read_leg_json": "livery.workshop._metrics",
538 "run_leg_dirs": "livery.workshop._metrics",
539 "WORKSPACE_TESTS": "livery.workshop._packages",
540 "Category": "livery.workshop._categories",
541 "LegScope": "livery.workshop._scope",
542 "VerifiedBranch": "livery.workshop._scope",
543 "category_of": "livery.workshop._categories",
544 "EVERY_RUNNER_LABEL": "livery.workshop._points",
545 "check_legs": "livery.workshop._points",
546 "check_shards": "livery.workshop._points",
547 "pull_request_shards": "livery.workshop._points",
548 "DURATIONS": "livery.workshop._shard",
549 "NO_SELECT_VARIABLE": "livery.workshop._proved",
550 "PROVED_PARTS": "livery.workshop._proved",
551 "Escape": "livery.workshop._proved",
552 "ItemReadSet": "livery.workshop._proved",
553 "ItemSelection": "livery.workshop._proved",
554 "RanItems": "livery.workshop._proved",
555 "active_escaped_packages": "livery.workshop._proved",
556 "detect_item_escapes": "livery.workshop._proved",
557 "dir_listing_digest": "livery.workshop._proved",
558 "head_tree_id": "livery.workshop._proved",
559 "item_read_set_matches": "livery.workshop._proved",
560 "item_selection_disabled": "livery.workshop._proved",
561 "proved_parts_prefixes": "livery.workshop._proved",
562 "proved_parts_series": "livery.workshop._proved",
563 "proved_unit_key": "livery.workshop._proved",
564 "proved_unit_keys": "livery.workshop._proved",
565 "put_proved_part": "livery.workshop._proved",
566 "read_proved_part": "livery.workshop._proved",
567 "read_ran_items": "livery.workshop._proved",
568 "record_escapes": "livery.workshop._proved",
569 "record_item_observations": "livery.workshop._proved",
570 "record_ran_items": "livery.workshop._proved",
571 "record_selection_measure": "livery.workshop._proved",
572 "shadow_select_items": "livery.workshop._proved",
573 "Shard": "livery.workshop._shard",
574 "ShardMarker": "livery.workshop._shard",
575 "VerifiedPlan": "livery.workshop._shard",
576 "checkout_time": "livery.workshop._shard",
577 "files_digest": "livery.workshop._shard",
578 "leave_shard": "livery.workshop._shard",
579 "partition": "livery.workshop._shard",
580 "platform_leg": "livery.workshop._shard",
581 "read_durations": "livery.workshop._shard",
582 "read_shard": "livery.workshop._shard",
583 "read_verified_plan": "livery.workshop._shard",
584 "shard_of": "livery.workshop._shard",
585 "holds_runtime_language": "livery.workshop._packages",
586 "leave_leg_file": "livery.workshop._metrics",
587 "leave_section": "livery.workshop._metrics",
588 "leg_scope": "livery.workshop._scope",
589 "pull_request_legs": "livery.workshop._points",
590 "state_store": "livery.workshop._ci_context",
591 "tested": "livery.workshop._steps",
592 "verified_branch": "livery.workshop._scope",
593 "Query": "livery.workshop._queries",
594 "RequirementWriter": "livery.workshop._queries",
595 "answer": "livery.workshop._queries",
596 "AGENT": "livery.workshop._prose",
597 "Changes": "livery.workshop._influence",
598 "Edge": "livery.workshop._packages",
599 "HUMAN": "livery.workshop._prose",
600 "NONE": "livery.workshop._steps",
601 "PACKAGE": "livery.workshop._steps",
602 "PACKAGES": "livery.workshop._steps",
603 "PATHS": "livery.workshop._steps",
604 "Package": "livery.workshop._packages",
605 "PhaseContext": "livery.workshop._phases",
606 "Prose": "livery.workshop._prose",
607 "RegistryTarget": "livery.workshop._registries",
608 "ReleaseNotes": "livery.workshop._release_notes",
609 "RunContext": "livery.workshop._ci_context",
610 "WHOLE": "livery.workshop._steps",
611 "ci_changes": "livery.workshop._quality",
612 "ci_run": "livery.workshop._ci_context",
613 "contributions_for": "livery.workshop._extensions",
614 "discover_packages": "livery.workshop._packages",
615 "extension_names": "livery.workshop._extensions",
616 "extension_set": "livery.workshop._composition",
617 "nearest_extensions": "livery.workshop._composition",
618 "order_topologically": "livery.workshop._graph",
619 "forge_repository": "livery.workshop._forge_lane",
620 "this_forge": "livery.workshop._forge_lane",
621 "this_repository": "livery.workshop._forge_lane",
622 "forge_token": "livery.workshop._tokens",
623 "fix_files": "livery.workshop._quality",
624 "shipped_content": "livery.workshop._extensions",
625 "generated_header": "livery.workshop._provenance",
626 "guidance": "livery.workshop._prose",
627 "read_contract": "livery.workshop._contract",
628 "registry": "livery.workshop._registries",
629 "release_notes": "livery.workshop._release_notes",
630 "release_tag": "livery.workshop._packages",
631 "run_batched": "livery.workshop._invoke",
632 "run_phase": "livery.workshop._phases",
633 "run_phase_over": "livery.workshop._quality",
634 "scoped_files": "livery.workshop._steps",
635 "scoped_packages": "livery.workshop._steps",
636 "scoped_paths": "livery.workshop._steps",
637 "scoped_suite": "livery.workshop._steps",
638 "selected_files": "livery.workshop._steps",
639 "step_enabled": "livery.workshop._steps",
640 "step_extensions": "livery.workshop._steps",
641 "step_option": "livery.workshop._steps",
642 "undeployed": "livery.workshop._tools",
643 "verify_workspace": "livery.workshop._packages",
644 "workspace_root": "livery.workshop._extensions",
645 "workspace_suite": "livery.workshop._packages",
646}
647
648#: The public packages beneath the root, served whole on first use.
649_PACKAGES = ("testing",)(empty)
650
651
652def __getattr__(name: str) -> object:(empty)
653 """Serve a public name from its module, each time it is read.
654
655 The value is never kept here. A kept value would be whatever the
656 module held at the first read, so a test that patched the module's
657 name before that read would leave its fake in this module for the
658 rest of the process.
659 """
660 import importlib
661
662 if name in _PACKAGES:
663 value: object = importlib.import_module(f"livery.workshop.{name}")
664 else:
665 module = _EXPORTS.get(name)
666 if module is None:
667 raise AttributeError(f"module 'livery.workshop' has no attribute {name!r}")
668 value = getattr(importlib.import_module(module), name)
669 return value