verkit 0.1.5__tar.gz → 0.2.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.
- {verkit-0.1.5 → verkit-0.2.1}/PKG-INFO +37 -1
- {verkit-0.1.5 → verkit-0.2.1}/README.md +36 -0
- {verkit-0.1.5 → verkit-0.2.1}/pyproject.toml +1 -1
- {verkit-0.1.5 → verkit-0.2.1}/src/verkit/__init__.py +8 -5
- verkit-0.2.1/src/verkit/theme.json +18 -0
- verkit-0.2.1/src/verkit/theme.py +55 -0
- verkit-0.2.1/tests/test_theme.py +38 -0
- {verkit-0.1.5 → verkit-0.2.1}/uv.lock +1 -1
- {verkit-0.1.5 → verkit-0.2.1}/.github/workflows/ci.yml +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/.github/workflows/publish.yml +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/.gitignore +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/src/verkit/cli.py +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/src/verkit/inspector.py +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/src/verkit/promoter.py +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/src/verkit/py.typed +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/src/verkit/tagger.py +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/tests/test_inspector.py +0 -0
- {verkit-0.1.5 → verkit-0.2.1}/tests/test_promoter.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: verkit
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Polyglot project version inspector, promoter, tagger, and release workflow engine
|
|
5
5
|
Author: Mark Stouffer
|
|
6
6
|
License: MIT
|
|
@@ -86,3 +86,39 @@ tag_name = verkit.tag_version(push=True)
|
|
|
86
86
|
# 4. Atomic release
|
|
87
87
|
verkit.release_version("patch", push=True)
|
|
88
88
|
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Shared Terminal Theme
|
|
93
|
+
|
|
94
|
+
`verkit` publishes the canonical Rich theme used across this developer's
|
|
95
|
+
CLIs (`task-agent`, `multi-agent-registry`, ...). It is **opt-in** — verkit
|
|
96
|
+
never applies the theme for you; consumers import it and apply it to their
|
|
97
|
+
own `Table`/`Panel` objects:
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
from rich.console import Console
|
|
101
|
+
from rich.table import Table
|
|
102
|
+
from verkit.theme import DEFAULT as theme
|
|
103
|
+
|
|
104
|
+
console = Console()
|
|
105
|
+
table = Table(
|
|
106
|
+
title="Portfolio",
|
|
107
|
+
box=theme.table_box, # borderless
|
|
108
|
+
header_style=theme.header_style, # "on grey23"
|
|
109
|
+
padding=theme.table_padding, # (0, 2, 0, 0)
|
|
110
|
+
)
|
|
111
|
+
console.print(table)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The theme is a frozen dataclass (`verkit.theme.Theme`); `DEFAULT` is the
|
|
115
|
+
canonical instance. Non-Python consumers (e.g. PowerShell scripts) read the
|
|
116
|
+
machine-readable mirror, which stays in sync via `tests/test_theme.py`:
|
|
117
|
+
|
|
118
|
+
```powershell
|
|
119
|
+
$theme = Invoke-RestMethod `
|
|
120
|
+
https://raw.githubusercontent.com/bizkite-co/verkit/main/src/verkit/theme.json
|
|
121
|
+
# $theme.theme.header_style -> "on grey23"
|
|
122
|
+
# $theme.theme.header_background_ansi -> ANSI 256 index 237 background escape
|
|
123
|
+
# $theme.theme.header_background_rgb_hex -> "#3a3a3a"
|
|
124
|
+
```
|
|
@@ -76,3 +76,39 @@ tag_name = verkit.tag_version(push=True)
|
|
|
76
76
|
# 4. Atomic release
|
|
77
77
|
verkit.release_version("patch", push=True)
|
|
78
78
|
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Shared Terminal Theme
|
|
83
|
+
|
|
84
|
+
`verkit` publishes the canonical Rich theme used across this developer's
|
|
85
|
+
CLIs (`task-agent`, `multi-agent-registry`, ...). It is **opt-in** — verkit
|
|
86
|
+
never applies the theme for you; consumers import it and apply it to their
|
|
87
|
+
own `Table`/`Panel` objects:
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
from rich.console import Console
|
|
91
|
+
from rich.table import Table
|
|
92
|
+
from verkit.theme import DEFAULT as theme
|
|
93
|
+
|
|
94
|
+
console = Console()
|
|
95
|
+
table = Table(
|
|
96
|
+
title="Portfolio",
|
|
97
|
+
box=theme.table_box, # borderless
|
|
98
|
+
header_style=theme.header_style, # "on grey23"
|
|
99
|
+
padding=theme.table_padding, # (0, 2, 0, 0)
|
|
100
|
+
)
|
|
101
|
+
console.print(table)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The theme is a frozen dataclass (`verkit.theme.Theme`); `DEFAULT` is the
|
|
105
|
+
canonical instance. Non-Python consumers (e.g. PowerShell scripts) read the
|
|
106
|
+
machine-readable mirror, which stays in sync via `tests/test_theme.py`:
|
|
107
|
+
|
|
108
|
+
```powershell
|
|
109
|
+
$theme = Invoke-RestMethod `
|
|
110
|
+
https://raw.githubusercontent.com/bizkite-co/verkit/main/src/verkit/theme.json
|
|
111
|
+
# $theme.theme.header_style -> "on grey23"
|
|
112
|
+
# $theme.theme.header_background_ansi -> ANSI 256 index 237 background escape
|
|
113
|
+
# $theme.theme.header_background_rgb_hex -> "#3a3a3a"
|
|
114
|
+
```
|
|
@@ -10,16 +10,19 @@ from verkit.inspector import (
|
|
|
10
10
|
)
|
|
11
11
|
from verkit.promoter import promote_version
|
|
12
12
|
from verkit.tagger import release_version, tag_version
|
|
13
|
+
from verkit.theme import DEFAULT, Theme
|
|
13
14
|
|
|
14
|
-
__version__ = "0.
|
|
15
|
+
__version__ = "0.2.0"
|
|
15
16
|
__all__ = [
|
|
17
|
+
"DEFAULT",
|
|
18
|
+
"Theme",
|
|
16
19
|
"VersionInfo",
|
|
17
|
-
"
|
|
18
|
-
"inspect_committed",
|
|
20
|
+
"display_version_info",
|
|
19
21
|
"get_installed_version",
|
|
20
22
|
"get_latest_pypi_version",
|
|
21
|
-
"
|
|
23
|
+
"inspect_committed",
|
|
24
|
+
"inspect_project",
|
|
22
25
|
"promote_version",
|
|
23
|
-
"tag_version",
|
|
24
26
|
"release_version",
|
|
27
|
+
"tag_version",
|
|
25
28
|
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "verkit-grey",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"description": "Shared Rich terminal theme for tables and panels across this developer's Python CLIs (task-agent, multi-agent-registry, ...). Source of truth is src/verkit/theme.py (the Theme dataclass); this JSON mirrors Theme.DEFAULT for non-Python consumers and is kept in sync by tests/test_theme.py.",
|
|
5
|
+
"adoption": {
|
|
6
|
+
"python": "from verkit.theme import DEFAULT as theme",
|
|
7
|
+
"powershell": "$theme = Invoke-RestMethod '<raw URL of this file>'; $theme.theme",
|
|
8
|
+
"note": "Opt-in only: verkit publishes the theme but never applies it for you."
|
|
9
|
+
},
|
|
10
|
+
"theme": {
|
|
11
|
+
"table_box": null,
|
|
12
|
+
"panel_box": "MINIMAL",
|
|
13
|
+
"table_padding": [0, 2, 0, 0],
|
|
14
|
+
"header_style": "on grey23",
|
|
15
|
+
"header_background_ansi": "\u001b[48;5;237m",
|
|
16
|
+
"header_background_rgb_hex": "#3a3a3a"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""Shared visual theme for Rich terminal output across client CLIs.
|
|
2
|
+
|
|
3
|
+
This module is a *convention carrier*, not a mandate. The theme is published
|
|
4
|
+
here so a client project can opt in with a one-line import instead of
|
|
5
|
+
maintaining its own copy; importing it is never forced on consumers.
|
|
6
|
+
|
|
7
|
+
Adoption hint (Python)::
|
|
8
|
+
|
|
9
|
+
from verkit.theme import DEFAULT as theme
|
|
10
|
+
|
|
11
|
+
table = Table(
|
|
12
|
+
title="...",
|
|
13
|
+
box=theme.table_box,
|
|
14
|
+
header_style=theme.header_style,
|
|
15
|
+
padding=theme.table_padding,
|
|
16
|
+
)
|
|
17
|
+
console.print(Panel(..., box=theme.panel_box))
|
|
18
|
+
|
|
19
|
+
Because ``Theme`` is a frozen dataclass, ``DEFAULT`` can be shared or
|
|
20
|
+
subclassed without risk of accidental mutation.
|
|
21
|
+
|
|
22
|
+
Non-Python consumers (e.g. PowerShell scripts) should read the machine
|
|
23
|
+
readable mirror at ``src/verkit/theme.json`` instead of re-deriving styles:
|
|
24
|
+
|
|
25
|
+
$theme = Invoke-RestMethod `
|
|
26
|
+
https://raw.githubusercontent.com/bizkite-co/verkit/main/src/verkit/theme.json
|
|
27
|
+
|
|
28
|
+
The JSON and this dataclass are kept in sync by ``tests/test_theme.py``.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
from __future__ import annotations
|
|
32
|
+
|
|
33
|
+
from dataclasses import dataclass
|
|
34
|
+
|
|
35
|
+
from rich import box as rich_box
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@dataclass(frozen=True)
|
|
39
|
+
class Theme:
|
|
40
|
+
"""Visual theme for Rich terminal output (tables, panels).
|
|
41
|
+
|
|
42
|
+
Defaults render tables and panels in the compact report style shared
|
|
43
|
+
across this developer's CLIs: borderless tables, a minimal panel border,
|
|
44
|
+
and a subtle grey header band (ANSI 256 index 237).
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
table_box: rich_box.Box | None = None
|
|
48
|
+
panel_box: rich_box.Box = rich_box.MINIMAL
|
|
49
|
+
table_padding: tuple[int, int, int, int] = (0, 2, 0, 0)
|
|
50
|
+
header_style: str = "on grey23"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
#: The canonical theme. Client CLIs opt in with ``from verkit.theme import
|
|
54
|
+
#: DEFAULT``.
|
|
55
|
+
DEFAULT = Theme()
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from rich import box as rich_box
|
|
5
|
+
|
|
6
|
+
from verkit.theme import DEFAULT, Theme
|
|
7
|
+
|
|
8
|
+
THEME_JSON = Path(__file__).resolve().parent.parent / "src" / "verkit" / "theme.json"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_default_is_theme():
|
|
12
|
+
assert isinstance(DEFAULT, Theme)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_default_values():
|
|
16
|
+
assert DEFAULT.table_box is None
|
|
17
|
+
assert DEFAULT.panel_box is rich_box.MINIMAL
|
|
18
|
+
assert DEFAULT.table_padding == (0, 2, 0, 0)
|
|
19
|
+
assert DEFAULT.header_style == "on grey23"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def test_theme_json_matches_default():
|
|
23
|
+
data = json.loads(THEME_JSON.read_text(encoding="utf-8"))
|
|
24
|
+
theme = data["theme"]
|
|
25
|
+
assert theme["table_box"] is None
|
|
26
|
+
assert theme["panel_box"] == "MINIMAL"
|
|
27
|
+
assert tuple(theme["table_padding"]) == DEFAULT.table_padding
|
|
28
|
+
assert theme["header_style"] == DEFAULT.header_style
|
|
29
|
+
assert theme["header_background_ansi"] == "\x1b[48;5;237m"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def test_theme_is_frozen():
|
|
33
|
+
try:
|
|
34
|
+
DEFAULT.table_padding = (1, 1, 1, 1)
|
|
35
|
+
except AttributeError:
|
|
36
|
+
pass
|
|
37
|
+
else:
|
|
38
|
+
raise AssertionError("Theme should be immutable")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|