livery.workshop._registries¶
livery.workshop._registries ¶
Where each artifact kind's registry lives: the resolution ladder.
One resolution for every artifact kind the ecosystem publishes or
probes, so no caller derives a registry address on its own. The
ladder, per kind: the declaration wins (the env cascade's variables
first, machine truth over committed; then the contract's
[registries] table), else the forge's own hosted registry of
that kind, else the ecosystem default where one exists (pypi.org
for python), else a refusal naming the kind and the rungs it tried.
A declaration may be a local folder or share: every kind publishes
to a path, so a workspace can work with no registry server at all.
Classes:
| Name | Description |
|---|---|
RegistryTarget |
One resolved registry for one artifact kind. |
Functions:
| Name | Description |
|---|---|
target_table |
target as the |
registry |
The registry the workspace at root reads and publishes kind artifacts at. |
resolve_registry |
The registry for kind, through the ladder; refusal teaches. |
RegistryTarget
dataclass
¶
RegistryTarget(kind: str, url: str, publish_url: str = '', local: bool = False, token: str = '', releases: bool = False)
One resolved registry for one artifact kind.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
str
|
Which artifact registry this is. |
url |
str
|
The registry's address: the read index for python (the
publish endpoint is |
publish_url |
str
|
Where python dists upload; empty means the publisher's own default resolution (uv publish and trusted publishing on pypi.org). Unused by other kinds. |
local |
bool
|
True when the target is a folder or share rather than a server. |
releases |
bool
|
True when the artifacts ride the forge's own
releases, attached to each member's receipt tag. The
route a conan package takes on a forge that hosts no
conan registry; |
token |
str
|
The registry credential, for reads and uploads alike: the kind's credential variable when set, else the forge lane's token when the forge rung answered. Empty reads anonymously and lets the publisher's own resolution decide. |
Methods:
| Name | Description |
|---|---|
from_table |
The target a |
from_table
classmethod
¶
from_table(table: Mapping[str, object]) -> RegistryTarget
The target a registry-target table holds.
The engine gives each step of the publish phase the registry
it resolved as the registry-target key: a table of this
class's fields by name, which the step reads back with this
constructor. The table holds kind and url, and a field
it leaves out takes its default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table
|
Mapping[str, object]
|
Each field of the target by its name. |
required |
Returns:
| Type | Description |
|---|---|
RegistryTarget
|
The target the table holds. |
Raises:
| Type | Description |
|---|---|
ValueError
|
when the table is not a registry target: it has
no |
Source code in packages/workshop/src/livery/workshop/_registries.py
target_table ¶
target_table(target: RegistryTarget) -> dict[str, object]
target as the publish phase's registry-target: its fields by name.
Source code in packages/workshop/src/livery/workshop/_registries.py
registry ¶
registry(root: Path, kind: str) -> RegistryTarget
The registry the workspace at root reads and publishes kind artifacts at.
kind is python, conan or container. The first rung
that names one wins: the environment's variables for the kind, the
contract's [registries] table, the forge's own registry of the
kind, then the ecosystem's default.
Raises:
| Type | Description |
|---|---|
Failed
|
when kind is not an artifact registry kind, naming the three. |
Source code in packages/workshop/src/livery/workshop/_registries.py
resolve_registry ¶
resolve_registry(root: Path, kind: str) -> RegistryTarget
The registry for kind, through the ladder; refusal teaches.
The rungs, in order: the env cascade's variables (machine truth
over committed declarations), the contract's [registries]
table, the forge's own registry of the kind, the ecosystem
default. A python declaration may split read and publish
addresses; the other kinds carry one.