keep-github-workflows-active 2.3.3__py3-none-any.whl → 2.3.5__py3-none-any.whl
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.
- keep_github_workflows_active/__init__conf__.py +1 -1
- keep_github_workflows_active/__main__.py +6 -110
- {keep_github_workflows_active-2.3.3.dist-info → keep_github_workflows_active-2.3.5.dist-info}/METADATA +42 -12
- {keep_github_workflows_active-2.3.3.dist-info → keep_github_workflows_active-2.3.5.dist-info}/RECORD +7 -7
- {keep_github_workflows_active-2.3.3.dist-info → keep_github_workflows_active-2.3.5.dist-info}/WHEEL +1 -1
- {keep_github_workflows_active-2.3.3.dist-info → keep_github_workflows_active-2.3.5.dist-info}/entry_points.txt +0 -0
- {keep_github_workflows_active-2.3.3.dist-info → keep_github_workflows_active-2.3.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -26,7 +26,7 @@ name = "keep_github_workflows_active"
|
|
|
26
26
|
#: Human-readable summary shown in CLI help output.
|
|
27
27
|
title = "Template for python apps with registered cli commands"
|
|
28
28
|
#: Current release version pulled from ``pyproject.toml`` by automation.
|
|
29
|
-
version = "2.3.
|
|
29
|
+
version = "2.3.5"
|
|
30
30
|
#: Repository homepage presented to users.
|
|
31
31
|
homepage = "https://github.com/bitranox/keep_github_workflows_active"
|
|
32
32
|
#: Author attribution surfaced in CLI output.
|
|
@@ -1,117 +1,13 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Provide the ``python -m keep_github_workflows_active`` entry point.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
project's packaging guidelines. The wrapper delegates to
|
|
7
|
-
:func:`keep_github_workflows_active.cli.main` so that module execution mirrors the
|
|
8
|
-
installed console script, including traceback handling and exit-code mapping.
|
|
9
|
-
|
|
10
|
-
Contents
|
|
11
|
-
--------
|
|
12
|
-
* :func:`_open_cli_session` - wires ``cli_session`` with the agreed limits.
|
|
13
|
-
* :func:`_command_to_run` / :func:`_command_name` - expose the command and label
|
|
14
|
-
used by the module entry.
|
|
15
|
-
* :func:`_module_main` - drives execution and returns the exit code.
|
|
16
|
-
|
|
17
|
-
System Role
|
|
18
|
-
-----------
|
|
19
|
-
Lives in the adapters layer. It bridges CPython's module execution entry point
|
|
20
|
-
to the shared CLI helper while reusing the same ``cli_session`` orchestration
|
|
21
|
-
documented in ``docs/systemdesign/module_reference.md``.
|
|
3
|
+
Runs :func:`keep_github_workflows_active.cli.main`, the function the console
|
|
4
|
+
scripts run, so exit codes and traceback handling are identical however the
|
|
5
|
+
CLI is started.
|
|
22
6
|
"""
|
|
23
7
|
|
|
24
8
|
from __future__ import annotations
|
|
25
9
|
|
|
26
|
-
from
|
|
27
|
-
from typing import TYPE_CHECKING, Final
|
|
28
|
-
|
|
29
|
-
from lib_cli_exit_tools import cli_session
|
|
30
|
-
|
|
31
|
-
from . import __init__conf__, cli
|
|
32
|
-
|
|
33
|
-
if TYPE_CHECKING:
|
|
34
|
-
from contextlib import AbstractContextManager
|
|
35
|
-
|
|
36
|
-
import rich_click as click
|
|
37
|
-
|
|
38
|
-
# Match the CLI defaults so truncation behaviour stays consistent across entry
|
|
39
|
-
# points regardless of whether users call the console script or ``python -m``.
|
|
40
|
-
#: Character budget for truncated tracebacks when running via module entry.
|
|
41
|
-
TRACEBACK_SUMMARY_LIMIT: Final[int] = cli.TRACEBACK_SUMMARY_LIMIT
|
|
42
|
-
#: Character budget for verbose tracebacks when running via module entry.
|
|
43
|
-
TRACEBACK_VERBOSE_LIMIT: Final[int] = cli.TRACEBACK_VERBOSE_LIMIT
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
CommandRunner = Callable[..., int]
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def _open_cli_session() -> AbstractContextManager[CommandRunner]:
|
|
50
|
-
"""Return the configured ``cli_session`` context manager.
|
|
51
|
-
|
|
52
|
-
Why
|
|
53
|
-
``cli_session`` wires ``lib_cli_exit_tools`` with the tracing limits we
|
|
54
|
-
want for module execution. Wrapping it keeps the configuration in a
|
|
55
|
-
single place.
|
|
56
|
-
|
|
57
|
-
Outputs
|
|
58
|
-
AbstractContextManager[CommandRunner]:
|
|
59
|
-
Context manager that yields the callable responsible for invoking
|
|
60
|
-
the Click command.
|
|
61
|
-
"""
|
|
62
|
-
|
|
63
|
-
return cli_session(
|
|
64
|
-
summary_limit=TRACEBACK_SUMMARY_LIMIT,
|
|
65
|
-
verbose_limit=TRACEBACK_VERBOSE_LIMIT,
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def _command_to_run() -> click.Command:
|
|
70
|
-
"""Expose the click command that powers the module entry.
|
|
71
|
-
|
|
72
|
-
Why
|
|
73
|
-
Keeps the module entry explicit about which command is being executed
|
|
74
|
-
while remaining easy to stub in tests.
|
|
75
|
-
|
|
76
|
-
Outputs
|
|
77
|
-
click.Command: reference to the root CLI command group.
|
|
78
|
-
"""
|
|
79
|
-
|
|
80
|
-
return cli.cli
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
def _command_name() -> str:
|
|
84
|
-
"""Return the shell-friendly name announced by the session.
|
|
85
|
-
|
|
86
|
-
Why
|
|
87
|
-
``lib_cli_exit_tools`` uses this value when presenting help and error
|
|
88
|
-
messages; we centralise the derivation so tests can assert against it.
|
|
89
|
-
|
|
90
|
-
Outputs
|
|
91
|
-
str: Name of the console script as published through entry points.
|
|
92
|
-
"""
|
|
93
|
-
|
|
94
|
-
return __init__conf__.shell_command
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
def _module_main() -> int:
|
|
98
|
-
"""Execute the CLI entry point and return a normalised exit code.
|
|
99
|
-
|
|
100
|
-
Why
|
|
101
|
-
Implements ``python -m keep_github_workflows_active`` by delegating to the
|
|
102
|
-
shared CLI composition while respecting the configured traceback
|
|
103
|
-
budgets.
|
|
104
|
-
|
|
105
|
-
Outputs
|
|
106
|
-
int: Exit code reported by the CLI run.
|
|
107
|
-
"""
|
|
108
|
-
|
|
109
|
-
with _open_cli_session() as run:
|
|
110
|
-
return run(
|
|
111
|
-
_command_to_run(),
|
|
112
|
-
prog_name=_command_name(),
|
|
113
|
-
)
|
|
114
|
-
|
|
10
|
+
from . import cli
|
|
115
11
|
|
|
116
12
|
if __name__ == "__main__":
|
|
117
|
-
raise SystemExit(
|
|
13
|
+
raise SystemExit(cli.main())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: keep_github_workflows_active
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.5
|
|
4
4
|
Summary: Template for python apps with registered cli commands
|
|
5
5
|
Project-URL: Homepage, https://github.com/bitranox/keep_github_workflows_active
|
|
6
6
|
Project-URL: Repository, https://github.com/bitranox/keep_github_workflows_active.git
|
|
@@ -15,25 +15,26 @@ Classifier: Operating System :: OS Independent
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
19
|
Classifier: Typing :: Typed
|
|
19
20
|
Requires-Python: >=3.10
|
|
20
|
-
Requires-Dist: lib-cli-exit-tools>=2.
|
|
21
|
-
Requires-Dist: pydantic>=2.
|
|
21
|
+
Requires-Dist: lib-cli-exit-tools>=2.4.1
|
|
22
|
+
Requires-Dist: pydantic>=2.14.1
|
|
22
23
|
Requires-Dist: requests>=2.34.2
|
|
23
|
-
Requires-Dist: rich-click>=1.9.
|
|
24
|
+
Requires-Dist: rich-click>=1.9.9
|
|
24
25
|
Provides-Extra: dev
|
|
25
26
|
Requires-Dist: bandit>=1.9.4; extra == 'dev'
|
|
26
|
-
Requires-Dist: build>=1.
|
|
27
|
-
Requires-Dist: click>=8.
|
|
28
|
-
Requires-Dist: import-linter>=2.
|
|
27
|
+
Requires-Dist: build>=1.6.1; extra == 'dev'
|
|
28
|
+
Requires-Dist: click>=8.5.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: import-linter>=2.15; extra == 'dev'
|
|
29
30
|
Requires-Dist: pip-audit>=2.10.1; extra == 'dev'
|
|
30
|
-
Requires-Dist: pyright[nodejs]>=1.1.
|
|
31
|
+
Requires-Dist: pyright[nodejs]>=1.1.414; extra == 'dev'
|
|
31
32
|
Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
|
|
32
33
|
Requires-Dist: pytest>=9.1.1; extra == 'dev'
|
|
33
|
-
Requires-Dist: rtoml>=0.
|
|
34
|
-
Requires-Dist: ruff>=0.
|
|
34
|
+
Requires-Dist: rtoml>=0.14.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: ruff>=0.17.0; extra == 'dev'
|
|
35
36
|
Requires-Dist: textual>=8.2.8; extra == 'dev'
|
|
36
|
-
Requires-Dist: twine>=
|
|
37
|
+
Requires-Dist: twine>=7.0.0; extra == 'dev'
|
|
37
38
|
Description-Content-Type: text/markdown
|
|
38
39
|
|
|
39
40
|
# keep_github_workflows_active
|
|
@@ -148,6 +149,35 @@ your `PATH`.
|
|
|
148
149
|
`macos-latest`, `windows-latest`) on CPython 3.13 in addition to the most
|
|
149
150
|
recent 3.x release Actions makes available.
|
|
150
151
|
|
|
152
|
+
### Why we recommend uv: supply-chain protection
|
|
153
|
+
|
|
154
|
+
This repository commits a `uv.lock`. It pins every package the project needs, transitive
|
|
155
|
+
dependencies included, to an exact version and to the hashes of that version's files. The
|
|
156
|
+
`exclude-newer` setting under `[tool.uv]` in `pyproject.toml` adds a cooldown: uv leaves any
|
|
157
|
+
release younger than that out of the lock. CI installs from the lock, so a hijacked release that
|
|
158
|
+
gets pulled again within the cooldown never reaches our builds, and a file whose hash does not
|
|
159
|
+
match is refused.
|
|
160
|
+
|
|
161
|
+
That protection stays in this repository. The installable package declares only lower bounds
|
|
162
|
+
(`>=`) for its dependencies, so a plain `pip install` takes the newest release of every transitive
|
|
163
|
+
dependency at the moment you run it. If one of them was hijacked an hour earlier, you get the
|
|
164
|
+
hijacked version. `pipx install` and `uv tool install` without options do the same.
|
|
165
|
+
|
|
166
|
+
To install the command line tool with a cooldown of your own (uv then skips any release younger
|
|
167
|
+
than 7 days, transitive ones included), or to run the exact tree our CI tests:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
uv tool install --exclude-newer "7 days" keep_github_workflows_active
|
|
171
|
+
git clone https://github.com/bitranox/keep_github_workflows_active.git && cd keep_github_workflows_active && uv sync --locked && uv run keep_github_workflows_active --help
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
If you depend on keep_github_workflows_active in your own project, give that project the same cooldown (7 days here, as
|
|
175
|
+
an example) and commit the `uv.lock` that `uv add keep_github_workflows_active` writes:
|
|
176
|
+
|
|
177
|
+
```toml
|
|
178
|
+
[tool.uv]
|
|
179
|
+
exclude-newer = "7 days"
|
|
180
|
+
```
|
|
151
181
|
|
|
152
182
|
## Usage
|
|
153
183
|
|
{keep_github_workflows_active-2.3.3.dist-info → keep_github_workflows_active-2.3.5.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
keep_github_workflows_active/__init__.py,sha256=AlRr46bcAznN5xCoFiwEyc65m6kbfGBB5l30iIzq-Q4,399
|
|
2
|
-
keep_github_workflows_active/__init__conf__.py,sha256=
|
|
3
|
-
keep_github_workflows_active/__main__.py,sha256=
|
|
2
|
+
keep_github_workflows_active/__init__conf__.py,sha256=83YpFbzM7A4x3qsRgM_Vep15__AsIxq74OygCxUdrE0,2592
|
|
3
|
+
keep_github_workflows_active/__main__.py,sha256=HVAzfYkGNoQYMiMgjCOkLVetgQWXE8NmzyySFuuUx8Q,361
|
|
4
4
|
keep_github_workflows_active/behaviors.py,sha256=6ck9W-QIwHox6j93XHFL57f_YRwgDkxooa6FtxmnPdw,3733
|
|
5
5
|
keep_github_workflows_active/cli.py,sha256=eqeMrqBltwHvmNPyz8i5az5_0dVPnJbb4Mloa4vmZn0,19070
|
|
6
6
|
keep_github_workflows_active/doctest.env,sha256=WmDSq0QN1PFXpP4jq7JW_Kz-k5PT5uS8KzLrAEmJNC8,25
|
|
@@ -8,8 +8,8 @@ keep_github_workflows_active/keep_github_workflow_active.py,sha256=c8FfZuYmwv27e
|
|
|
8
8
|
keep_github_workflows_active/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
keep_github_workflows_active/sanitization.py,sha256=cuG2Lbn0Ca4h6NP2f7Z2rSwio_3c_wy3dNsofUwaGOc,10115
|
|
10
10
|
keep_github_workflows_active/typed_click.py,sha256=VLZgUkCZ6AFnf6StvoztK3JVYj9lZmgPSNY2Wjb3B8g,2183
|
|
11
|
-
keep_github_workflows_active-2.3.
|
|
12
|
-
keep_github_workflows_active-2.3.
|
|
13
|
-
keep_github_workflows_active-2.3.
|
|
14
|
-
keep_github_workflows_active-2.3.
|
|
15
|
-
keep_github_workflows_active-2.3.
|
|
11
|
+
keep_github_workflows_active-2.3.5.dist-info/METADATA,sha256=dgJoMAmD9YBcNnB0u9IaFC2sBr6uxuto6SMo-xBv89Y,11047
|
|
12
|
+
keep_github_workflows_active-2.3.5.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
13
|
+
keep_github_workflows_active-2.3.5.dist-info/entry_points.txt,sha256=6B8ytwKR2VIAj6IXUYhF957dlfulwTPPLR39RBXwCM0,156
|
|
14
|
+
keep_github_workflows_active-2.3.5.dist-info/licenses/LICENSE,sha256=6s9SL2InRrwynPjJYiER7ONHBshbGj_yC5EBzfo7l9I,1072
|
|
15
|
+
keep_github_workflows_active-2.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|