livery-workshop 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- livery_workshop-0.0.1/LICENSE +21 -0
- livery_workshop-0.0.1/PKG-INFO +29 -0
- livery_workshop-0.0.1/README.md +10 -0
- livery_workshop-0.0.1/pyproject.toml +36 -0
- livery_workshop-0.0.1/pyproject.toml.orig +35 -0
- livery_workshop-0.0.1/src/livery/workshop/__init__.py +23 -0
- livery_workshop-0.0.1/src/livery/workshop/_layers.py +63 -0
- livery_workshop-0.0.1/src/livery/workshop/_tasks.py +38 -0
- livery_workshop-0.0.1/src/livery/workshop/py.typed +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Willem Kokke
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: livery-workshop
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: The livery ecosystem's devkit: the task surface, layers, templates, and content.
|
|
5
|
+
Author: Willem Kokke
|
|
6
|
+
Author-email: Willem Kokke <mail@willem.net>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Typing :: Typed
|
|
13
|
+
Requires-Dist: livery-forge>=0.1.0
|
|
14
|
+
Requires-Dist: footman>=0.46
|
|
15
|
+
Requires-Dist: toolroom>=0.6.1
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Project-URL: Repository, https://github.com/willemkokke/livery
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# livery-workshop
|
|
21
|
+
|
|
22
|
+
The livery ecosystem's devkit: the task surface every repository runs
|
|
23
|
+
(`fm check` and its family), the layer host that composes base,
|
|
24
|
+
overlay, and instance, the materialiser that delivers content, and
|
|
25
|
+
the template driver. Pre-alpha: this release reserves the
|
|
26
|
+
distribution name and proves the release train; the task surface
|
|
27
|
+
arrives phase by phase.
|
|
28
|
+
|
|
29
|
+
Part of the [livery monorepo](https://github.com/willemkokke/livery).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# livery-workshop
|
|
2
|
+
|
|
3
|
+
The livery ecosystem's devkit: the task surface every repository runs
|
|
4
|
+
(`fm check` and its family), the layer host that composes base,
|
|
5
|
+
overlay, and instance, the materialiser that delivers content, and
|
|
6
|
+
the template driver. Pre-alpha: this release reserves the
|
|
7
|
+
distribution name and proves the release train; the task surface
|
|
8
|
+
arrives phase by phase.
|
|
9
|
+
|
|
10
|
+
Part of the [livery monorepo](https://github.com/willemkokke/livery).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.11,<0.13"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "livery-workshop"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
description = "The livery ecosystem's devkit: the task surface, layers, templates, and content."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
17
|
+
"Typing :: Typed",
|
|
18
|
+
]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"livery-forge>=0.1.0",
|
|
21
|
+
"footman>=0.46",
|
|
22
|
+
"toolroom>=0.6.1",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[[project.authors]]
|
|
26
|
+
name = "Willem Kokke"
|
|
27
|
+
email = "mail@willem.net"
|
|
28
|
+
|
|
29
|
+
[project.entry-points."footman.tasks"]
|
|
30
|
+
"livery.workshop" = "livery.workshop._tasks"
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Repository = "https://github.com/willemkokke/livery"
|
|
34
|
+
|
|
35
|
+
[tool.uv.build-backend]
|
|
36
|
+
module-name = "livery.workshop"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.11,<0.13"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "livery-workshop"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
description = "The livery ecosystem's devkit: the task surface, layers, templates, and content."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
authors = [{ name = "Willem Kokke", email = "mail@willem.net" }]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
18
|
+
"Typing :: Typed",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"livery-forge>=0.1.0",
|
|
22
|
+
"footman>=0.46",
|
|
23
|
+
"toolroom>=0.6.1",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.entry-points."footman.tasks"]
|
|
27
|
+
"livery.workshop" = "livery.workshop._tasks"
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Repository = "https://github.com/willemkokke/livery"
|
|
31
|
+
|
|
32
|
+
[tool.uv.build-backend]
|
|
33
|
+
# PEP 420 namespace: the importable package is livery.workshop and
|
|
34
|
+
# there is no livery/__init__.py anywhere in this repository.
|
|
35
|
+
module-name = "livery.workshop"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""The livery ecosystem's devkit.
|
|
2
|
+
|
|
3
|
+
The task surface, the materialiser, and the template driver arrive
|
|
4
|
+
phase by phase; this release carries the plugin host and the layer
|
|
5
|
+
walk (livery.workshop.layer_names, livery.workshop.mount_layers,
|
|
6
|
+
livery.workshop.workspace_root) and reserves the distribution name.
|
|
7
|
+
The forge lane belongs to livery.forge.Forge; the workshop
|
|
8
|
+
orchestrates local, git, and forge steps and never hands a raw forge
|
|
9
|
+
verb to a user.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from livery.workshop._layers import layer_names, mount_layers, workspace_root
|
|
15
|
+
|
|
16
|
+
__version__ = "0.0.1"
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"__version__",
|
|
20
|
+
"layer_names",
|
|
21
|
+
"mount_layers",
|
|
22
|
+
"workspace_root",
|
|
23
|
+
]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""The layer walk: one list in the workspace contract, every channel.
|
|
2
|
+
|
|
3
|
+
The root ``livery.toml`` names the layers in precedence order, the
|
|
4
|
+
workshop first and the instance implicitly last. Mounting reads that
|
|
5
|
+
list and grafts each further layer's footman plugin in order, so a
|
|
6
|
+
package installed by accident never changes a repository: discovery
|
|
7
|
+
is the list and nothing else.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import tomllib
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
#: The layer this package is. Never mounted by name: importing the
|
|
16
|
+
#: plugin module IS this layer arriving.
|
|
17
|
+
SELF = "livery.workshop"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def workspace_root(start: Path | None = None) -> Path | None:
|
|
21
|
+
"""The nearest ancestor carrying a ``livery.toml``, or None.
|
|
22
|
+
|
|
23
|
+
The workspace contract is the marker; a checkout without one is
|
|
24
|
+
not a workspace and gets no layers.
|
|
25
|
+
"""
|
|
26
|
+
origin = (start or Path.cwd()).resolve()
|
|
27
|
+
for candidate in (origin, *origin.parents):
|
|
28
|
+
if (candidate / "livery.toml").is_file():
|
|
29
|
+
return candidate
|
|
30
|
+
return None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def layer_names(start: Path | None = None) -> tuple[str, ...]:
|
|
34
|
+
"""The layers the workspace declares, in precedence order.
|
|
35
|
+
|
|
36
|
+
Empty outside a workspace, and empty when the contract carries no
|
|
37
|
+
``[workspace] layers`` list: no guessing, no defaults.
|
|
38
|
+
"""
|
|
39
|
+
root = workspace_root(start)
|
|
40
|
+
if root is None:
|
|
41
|
+
return ()
|
|
42
|
+
contract = tomllib.loads((root / "livery.toml").read_text("utf-8"))
|
|
43
|
+
workspace = contract.get("workspace") or {}
|
|
44
|
+
layers = workspace.get("layers") or []
|
|
45
|
+
return tuple(str(layer) for layer in layers)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def mount_layers(start: Path | None = None) -> tuple[str, ...]:
|
|
49
|
+
"""Graft every further layer's plugin, in order; the names mounted.
|
|
50
|
+
|
|
51
|
+
The workshop itself is skipped: importing this package's plugin
|
|
52
|
+
module is how the base layer arrives, and mounting it again from
|
|
53
|
+
inside itself would recurse.
|
|
54
|
+
"""
|
|
55
|
+
from footman import plugin
|
|
56
|
+
|
|
57
|
+
mounted = []
|
|
58
|
+
for layer in layer_names(start):
|
|
59
|
+
if layer == SELF:
|
|
60
|
+
continue
|
|
61
|
+
plugin(layer)
|
|
62
|
+
mounted.append(layer)
|
|
63
|
+
return tuple(mounted)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""The workshop's footman plugin: what mounting the base layer runs.
|
|
2
|
+
|
|
3
|
+
Advertised as the ``footman.tasks`` entry point named
|
|
4
|
+
``livery.workshop``; a repository's whole ``tasks.py`` is
|
|
5
|
+
``plugin("livery.workshop")`` once the surface has moved in. Importing
|
|
6
|
+
this module mounts every further layer the workspace contract names,
|
|
7
|
+
in order, so one line composes the entire tree.
|
|
8
|
+
|
|
9
|
+
The task surface migrates here phase by phase; today the plugin
|
|
10
|
+
carries the layer host and its one verb.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
from footman import task
|
|
16
|
+
|
|
17
|
+
from livery.workshop._layers import SELF, layer_names, mount_layers
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@task
|
|
21
|
+
def layers() -> None:
|
|
22
|
+
"""Print the workspace's layers in precedence order.
|
|
23
|
+
|
|
24
|
+
The list is the whole of discovery: what shapes this repository
|
|
25
|
+
is exactly what it prints, and the instance's own files always
|
|
26
|
+
win last.
|
|
27
|
+
"""
|
|
28
|
+
names = layer_names()
|
|
29
|
+
if not names:
|
|
30
|
+
print(" no workspace: no livery.toml above the working directory")
|
|
31
|
+
return
|
|
32
|
+
for name in names:
|
|
33
|
+
marker = " (this package)" if name == SELF else ""
|
|
34
|
+
print(f" {name}{marker}")
|
|
35
|
+
print(" ... then the instance's own files, which always win")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
mount_layers()
|
|
File without changes
|