keep-github-workflows-active 2.3.2__tar.gz → 2.3.3__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.
- keep_github_workflows_active-2.3.3/.gitattributes +15 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.github/actions/extract-metadata/action.yml +16 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.github/workflows/activate_workflows.yml +8 -8
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.github/workflows/activate_workflows_priv.yml +10 -10
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.github/workflows/codeql.yml +1 -1
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.github/workflows/default_cicd_public.yml +63 -13
- keep_github_workflows_active-2.3.3/.github/workflows/default_release_public.yml +95 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.gitignore +10 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/CHANGELOG.md +12 -0
- keep_github_workflows_active-2.3.3/Makefile +453 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/PKG-INFO +8 -8
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/concept.md +9 -9
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/docs/systemdesign/SECURITY.md +33 -28
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/notebooks/Quickstart.ipynb +4 -4
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/pyproject.toml +65 -9
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/__init__conf__.py +4 -2
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/__main__.py +9 -6
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/behaviors.py +5 -7
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/cli.py +28 -28
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/keep_github_workflow_active.py +13 -10
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/sanitization.py +19 -12
- keep_github_workflows_active-2.3.3/src/keep_github_workflows_active/typed_click.py +51 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/tests/conftest.py +5 -3
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/tests/test_cli.py +11 -9
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/tests/test_metadata.py +12 -12
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/tests/test_module_entry.py +7 -5
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/tests/test_sanitization.py +18 -0
- keep_github_workflows_active-2.3.2/.github/workflows/default_release_public.yml +0 -69
- keep_github_workflows_active-2.3.2/Makefile +0 -260
- keep_github_workflows_active-2.3.2/src/keep_github_workflows_active/typed_click.py +0 -32
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.devcontainer/devcontainer.json +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.devcontainer/settings.json +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.env.example +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.github/dependabot.yml +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.qlty/qlty.toml +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/.snyk +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/CONTRIBUTING.md +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/DEVELOPMENT.md +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/INSTALL.md +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/LICENSE +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/README.md +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/codecov.yml +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/docs/systemdesign/module_reference.md +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/__init__.py +1 -1
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/doctest.env +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/src/keep_github_workflows_active/py.typed +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/tests/test_behaviors.py +0 -0
- {keep_github_workflows_active-2.3.2 → keep_github_workflows_active-2.3.3}/tests/test_github_integration.py +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Normalize every text file to LF in the repo AND the working tree, on every OS.
|
|
2
|
+
# `text=auto` auto-detects binary and leaves it untouched; `eol=lf` forces LF checkout
|
|
3
|
+
# so a Windows edit/save cannot reintroduce CRLF churn.
|
|
4
|
+
* text=auto eol=lf
|
|
5
|
+
|
|
6
|
+
# Runtime-critical: CRLF here breaks execution on Linux (^M in shebang / make recipes).
|
|
7
|
+
Makefile text eol=lf
|
|
8
|
+
*.sh text eol=lf
|
|
9
|
+
*.py text eol=lf
|
|
10
|
+
*.ps1 text eol=lf
|
|
11
|
+
*.toml text eol=lf
|
|
12
|
+
*.md text eol=lf
|
|
13
|
+
*.json text eol=lf
|
|
14
|
+
*.yml text eol=lf
|
|
15
|
+
*.yaml text eol=lf
|
|
@@ -29,6 +29,11 @@ outputs:
|
|
|
29
29
|
BANDIT_SKIP_FLAG:
|
|
30
30
|
description: Bandit skip flag string (e.g. "-s B101,B601") or empty
|
|
31
31
|
value: ${{ steps.meta.outputs.BANDIT_SKIP_FLAG }}
|
|
32
|
+
PYTEST_MARKER_EXPR:
|
|
33
|
+
description: >-
|
|
34
|
+
Marker expression for the CI test run (e.g. "not local_only and not integration"),
|
|
35
|
+
built from tool.ci.pytest-exclude-markers
|
|
36
|
+
value: ${{ steps.meta.outputs.PYTEST_MARKER_EXPR }}
|
|
32
37
|
|
|
33
38
|
runs:
|
|
34
39
|
using: composite
|
|
@@ -69,6 +74,15 @@ runs:
|
|
|
69
74
|
bandit_skips = data.get('tool', {}).get('bandit', {}).get('skips', [])
|
|
70
75
|
bandit_skip_flag = f"-s {','.join(bandit_skips)}" if bandit_skips else ""
|
|
71
76
|
|
|
77
|
+
# --- [tool.ci] section ---
|
|
78
|
+
# CI always skips local_only (those tests need a dev box). A project whose
|
|
79
|
+
# suite also carries markers CI cannot satisfy - integration tests needing a
|
|
80
|
+
# container that a separate workflow starts - names them here, rather than
|
|
81
|
+
# every such repo forking this workflow to edit one -m expression.
|
|
82
|
+
ci_config = data.get('tool', {}).get('ci', {})
|
|
83
|
+
exclude_markers = ['local_only', *ci_config.get('pytest-exclude-markers', [])]
|
|
84
|
+
pytest_marker_expr = ' and '.join(f'not {m}' for m in exclude_markers)
|
|
85
|
+
|
|
72
86
|
# Write to GITHUB_OUTPUT for composite action outputs
|
|
73
87
|
with open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as out:
|
|
74
88
|
out.write(f"PROJECT_NAME={project}\n")
|
|
@@ -79,6 +93,7 @@ runs:
|
|
|
79
93
|
out.write(f"COV_REPORT_FILE={cov_report_file}\n")
|
|
80
94
|
out.write(f"COV_FAIL_UNDER={cov_fail_under}\n")
|
|
81
95
|
out.write(f"BANDIT_SKIP_FLAG={bandit_skip_flag}\n")
|
|
96
|
+
out.write(f"PYTEST_MARKER_EXPR={pytest_marker_expr}\n")
|
|
82
97
|
|
|
83
98
|
# Also write to GITHUB_ENV so subsequent steps can use ${{ env.VAR }}
|
|
84
99
|
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env:
|
|
@@ -90,3 +105,4 @@ runs:
|
|
|
90
105
|
env.write(f"COV_REPORT_FILE={cov_report_file}\n")
|
|
91
106
|
env.write(f"COV_FAIL_UNDER={cov_fail_under}\n")
|
|
92
107
|
env.write(f"BANDIT_SKIP_FLAG={bandit_skip_flag}\n")
|
|
108
|
+
env.write(f"PYTEST_MARKER_EXPR={pytest_marker_expr}\n")
|
|
@@ -23,8 +23,8 @@ jobs:
|
|
|
23
23
|
# Test against the latest CPython 3.x release provided by Actions
|
|
24
24
|
python: ["3.x"]
|
|
25
25
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
27
|
-
- uses: actions/setup-python@
|
|
26
|
+
- uses: actions/checkout@v7
|
|
27
|
+
- uses: actions/setup-python@v7
|
|
28
28
|
with:
|
|
29
29
|
python-version: ${{ matrix.python }}
|
|
30
30
|
cache: 'pip'
|
|
@@ -87,8 +87,8 @@ jobs:
|
|
|
87
87
|
SECRET_GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }}
|
|
88
88
|
SECRET_GITHUB_OWNER: ${{ secrets.SECRET_GITHUB_OWNER }}
|
|
89
89
|
steps:
|
|
90
|
-
- uses: actions/checkout@
|
|
91
|
-
- uses: actions/setup-python@
|
|
90
|
+
- uses: actions/checkout@v7
|
|
91
|
+
- uses: actions/setup-python@v7
|
|
92
92
|
with:
|
|
93
93
|
python-version: "3.x"
|
|
94
94
|
cache: 'pip'
|
|
@@ -107,8 +107,8 @@ jobs:
|
|
|
107
107
|
name: pipx/uv verification (ubuntu)
|
|
108
108
|
runs-on: ubuntu-latest
|
|
109
109
|
steps:
|
|
110
|
-
- uses: actions/checkout@
|
|
111
|
-
- uses: actions/setup-python@
|
|
110
|
+
- uses: actions/checkout@v7
|
|
111
|
+
- uses: actions/setup-python@v7
|
|
112
112
|
with:
|
|
113
113
|
python-version: "3.13"
|
|
114
114
|
cache: 'pip'
|
|
@@ -150,8 +150,8 @@ jobs:
|
|
|
150
150
|
name: Execute notebooks (ubuntu, Python 3.13)
|
|
151
151
|
runs-on: ubuntu-latest
|
|
152
152
|
steps:
|
|
153
|
-
- uses: actions/checkout@
|
|
154
|
-
- uses: actions/setup-python@
|
|
153
|
+
- uses: actions/checkout@v7
|
|
154
|
+
- uses: actions/setup-python@v7
|
|
155
155
|
with:
|
|
156
156
|
python-version: "3.13"
|
|
157
157
|
cache: 'pip'
|
|
@@ -23,8 +23,8 @@ jobs:
|
|
|
23
23
|
# Test against the latest CPython 3.x release provided by Actions
|
|
24
24
|
python: ["3.x"]
|
|
25
25
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
27
|
-
- uses: actions/setup-python@
|
|
26
|
+
- uses: actions/checkout@v7
|
|
27
|
+
- uses: actions/setup-python@v7
|
|
28
28
|
with:
|
|
29
29
|
python-version: ${{ matrix.python }}
|
|
30
30
|
cache: 'pip'
|
|
@@ -87,8 +87,8 @@ jobs:
|
|
|
87
87
|
SECRET_GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }}
|
|
88
88
|
SECRET_GITHUB_OWNER: ${{ secrets.SECRET_GITHUB_OWNER }}
|
|
89
89
|
steps:
|
|
90
|
-
- uses: actions/checkout@
|
|
91
|
-
- uses: actions/setup-python@
|
|
90
|
+
- uses: actions/checkout@v7
|
|
91
|
+
- uses: actions/setup-python@v7
|
|
92
92
|
with:
|
|
93
93
|
python-version: "3.x"
|
|
94
94
|
cache: 'pip'
|
|
@@ -112,8 +112,8 @@ jobs:
|
|
|
112
112
|
SECRET_GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN2 }}
|
|
113
113
|
SECRET_GITHUB_OWNER: ${{ secrets.SECRET_GITHUB_OWNER2 }}
|
|
114
114
|
steps:
|
|
115
|
-
- uses: actions/checkout@
|
|
116
|
-
- uses: actions/setup-python@
|
|
115
|
+
- uses: actions/checkout@v7
|
|
116
|
+
- uses: actions/setup-python@v7
|
|
117
117
|
with:
|
|
118
118
|
python-version: "3.x"
|
|
119
119
|
cache: 'pip'
|
|
@@ -132,8 +132,8 @@ jobs:
|
|
|
132
132
|
name: pipx/uv verification (ubuntu)
|
|
133
133
|
runs-on: ubuntu-latest
|
|
134
134
|
steps:
|
|
135
|
-
- uses: actions/checkout@
|
|
136
|
-
- uses: actions/setup-python@
|
|
135
|
+
- uses: actions/checkout@v7
|
|
136
|
+
- uses: actions/setup-python@v7
|
|
137
137
|
with:
|
|
138
138
|
python-version: "3.13"
|
|
139
139
|
cache: 'pip'
|
|
@@ -175,8 +175,8 @@ jobs:
|
|
|
175
175
|
name: Execute notebooks (ubuntu, Python 3.13)
|
|
176
176
|
runs-on: ubuntu-latest
|
|
177
177
|
steps:
|
|
178
|
-
- uses: actions/checkout@
|
|
179
|
-
- uses: actions/setup-python@
|
|
178
|
+
- uses: actions/checkout@v7
|
|
179
|
+
- uses: actions/setup-python@v7
|
|
180
180
|
with:
|
|
181
181
|
python-version: "3.13"
|
|
182
182
|
cache: 'pip'
|
|
@@ -18,8 +18,8 @@ jobs:
|
|
|
18
18
|
python-latest: ${{ steps.metadata.outputs.python-latest }}
|
|
19
19
|
os-matrix: ${{ steps.metadata.outputs.os-matrix }}
|
|
20
20
|
steps:
|
|
21
|
-
- uses: actions/checkout@
|
|
22
|
-
- uses: actions/setup-python@
|
|
21
|
+
- uses: actions/checkout@v7
|
|
22
|
+
- uses: actions/setup-python@v7
|
|
23
23
|
with:
|
|
24
24
|
python-version: "3.x"
|
|
25
25
|
- name: Parse pyproject.toml for Python versions and OS matrix
|
|
@@ -66,8 +66,8 @@ jobs:
|
|
|
66
66
|
UV_LINK_MODE: "copy"
|
|
67
67
|
UV_BREAK_SYSTEM_PACKAGES: "1"
|
|
68
68
|
steps:
|
|
69
|
-
- uses: actions/checkout@
|
|
70
|
-
- uses: actions/setup-python@
|
|
69
|
+
- uses: actions/checkout@v7
|
|
70
|
+
- uses: actions/setup-python@v7
|
|
71
71
|
with:
|
|
72
72
|
python-version: ${{ matrix.python }}
|
|
73
73
|
- name: Install uv
|
|
@@ -169,7 +169,7 @@ jobs:
|
|
|
169
169
|
- name: Restore ruff cache
|
|
170
170
|
if: runner.environment == 'github-hosted'
|
|
171
171
|
id: ruff-cache
|
|
172
|
-
uses: actions/cache/restore@
|
|
172
|
+
uses: actions/cache/restore@v6
|
|
173
173
|
with:
|
|
174
174
|
path: .ruff_cache
|
|
175
175
|
key: ruff-${{ runner.os }}-py${{ matrix.python }}-${{ github.sha }}
|
|
@@ -201,7 +201,7 @@ jobs:
|
|
|
201
201
|
# and stale journal files cause "database is locked" errors.
|
|
202
202
|
COVERAGE_FILE: "${{ runner.temp }}/.coverage"
|
|
203
203
|
run: >-
|
|
204
|
-
pytest -m "
|
|
204
|
+
pytest -m "${{ env.PYTEST_MARKER_EXPR }}"
|
|
205
205
|
--cov=${{ env.SRC_PATH }}/${{ env.PACKAGE_MODULE }}
|
|
206
206
|
--cov-report=term-missing
|
|
207
207
|
--cov-report=xml:${{ env.COV_REPORT_FILE }}
|
|
@@ -236,12 +236,62 @@ jobs:
|
|
|
236
236
|
continue-on-error: true
|
|
237
237
|
shell: python
|
|
238
238
|
run: |
|
|
239
|
-
import subprocess, sys
|
|
239
|
+
import subprocess, sys, tempfile
|
|
240
240
|
import rtoml
|
|
241
241
|
from pathlib import Path
|
|
242
|
+
|
|
243
|
+
# Audit the project's OWN resolved dependency tree, not the ambient
|
|
244
|
+
# environment. "Install dev deps" uses --system, so the interpreter
|
|
245
|
+
# being audited is the runner image's, and that image ships packages
|
|
246
|
+
# this project neither declares nor distributes (setuptools, pip,
|
|
247
|
+
# wheel). Auditing those reported CVEs no consumer of this project is
|
|
248
|
+
# exposed to, and a scan that is permanently yellow is a scan everyone
|
|
249
|
+
# learns to ignore. Resolving pyproject.toml here keeps the result
|
|
250
|
+
# identical on every OS/python and dependent only on what we declare.
|
|
242
251
|
data = rtoml.load(Path("pyproject.toml"))
|
|
252
|
+
|
|
253
|
+
# Not every project declares dev dependencies, and those that do may use
|
|
254
|
+
# either an extra or a PEP 735 group. Asking uv for one that does not
|
|
255
|
+
# exist is a hard error ("Requested extra not found"), which would leave
|
|
256
|
+
# the audit permanently broken here rather than merely noisy, so select
|
|
257
|
+
# the flag from what this project actually declares.
|
|
258
|
+
selector = []
|
|
259
|
+
if "dev" in data.get("project", {}).get("optional-dependencies", {}):
|
|
260
|
+
selector = ["--extra", "dev"]
|
|
261
|
+
elif "dev" in data.get("dependency-groups", {}):
|
|
262
|
+
selector = ["--group", "dev"]
|
|
263
|
+
|
|
264
|
+
tmp = Path(tempfile.mkdtemp())
|
|
265
|
+
req = tmp / "compiled-requirements.txt"
|
|
266
|
+
subprocess.check_call(
|
|
267
|
+
["uv", "pip", "compile", *selector, "pyproject.toml", "-o", str(req), "--quiet"]
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
# Drop direct URL references ("pkg @ git+https://...") before auditing.
|
|
271
|
+
# pip-audit cannot audit those (they are not on PyPI) but, given a
|
|
272
|
+
# requirements file, first tries to `git clone` each one to resolve a
|
|
273
|
+
# version - a slow, credential-dependent fetch. No public project here
|
|
274
|
+
# uses one today, yet "allow-direct-references" is enabled, so this
|
|
275
|
+
# guards the day one appears and keeps this step identical to the
|
|
276
|
+
# default_cicd_private template's.
|
|
277
|
+
audit_req = tmp / "audit-requirements.txt"
|
|
278
|
+
kept, dropped = [], []
|
|
279
|
+
for line in req.read_text(encoding="utf-8").splitlines():
|
|
280
|
+
if " @ " in line and not line.lstrip().startswith("#"):
|
|
281
|
+
dropped.append(line.split(" @ ", 1)[0].strip())
|
|
282
|
+
else:
|
|
283
|
+
kept.append(line)
|
|
284
|
+
audit_req.write_text("\n".join(kept) + "\n", encoding="utf-8")
|
|
285
|
+
if dropped:
|
|
286
|
+
# Never drop coverage silently: name what is not being audited here.
|
|
287
|
+
print(f"::notice::pip-audit: not auditing {len(dropped)} direct-URL dependency/ies "
|
|
288
|
+
f"(audited in their own repo): {', '.join(sorted(dropped))}")
|
|
289
|
+
|
|
290
|
+
req = audit_req
|
|
243
291
|
vulns = data.get("tool", {}).get("pip-audit", {}).get("ignore-vulns", [])
|
|
244
|
-
|
|
292
|
+
# --no-deps: the compiled file is already a complete pinned resolution,
|
|
293
|
+
# so pip-audit must audit it verbatim rather than re-resolving it.
|
|
294
|
+
cmd = ["pip-audit", "--no-deps", "-r", str(req)]
|
|
245
295
|
for v in vulns:
|
|
246
296
|
cmd.extend(["--ignore-vuln", v])
|
|
247
297
|
sys.exit(subprocess.call(cmd))
|
|
@@ -293,7 +343,7 @@ jobs:
|
|
|
293
343
|
|
|
294
344
|
- name: Save ruff cache
|
|
295
345
|
if: always() && runner.environment == 'github-hosted' && steps.ruff-cache.outputs.cache-hit != 'true'
|
|
296
|
-
uses: actions/cache/save@
|
|
346
|
+
uses: actions/cache/save@v6
|
|
297
347
|
with:
|
|
298
348
|
path: .ruff_cache
|
|
299
349
|
key: ruff-${{ runner.os }}-py${{ matrix.python }}-${{ github.sha }}
|
|
@@ -302,8 +352,8 @@ jobs:
|
|
|
302
352
|
name: pipx/uv verification (ubuntu)
|
|
303
353
|
runs-on: ubuntu-latest
|
|
304
354
|
steps:
|
|
305
|
-
- uses: actions/checkout@
|
|
306
|
-
- uses: actions/setup-python@
|
|
355
|
+
- uses: actions/checkout@v7
|
|
356
|
+
- uses: actions/setup-python@v7
|
|
307
357
|
with:
|
|
308
358
|
python-version: "3.14"
|
|
309
359
|
|
|
@@ -341,8 +391,8 @@ jobs:
|
|
|
341
391
|
name: Execute notebooks (ubuntu, Python 3.14)
|
|
342
392
|
runs-on: ubuntu-latest
|
|
343
393
|
steps:
|
|
344
|
-
- uses: actions/checkout@
|
|
345
|
-
- uses: actions/setup-python@
|
|
394
|
+
- uses: actions/checkout@v7
|
|
395
|
+
- uses: actions/setup-python@v7
|
|
346
396
|
with:
|
|
347
397
|
python-version: "3.14"
|
|
348
398
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# The tag push is the only release event bmk guarantees: it runs
|
|
4
|
+
# `git push <remote> <tag>` unconditionally, whereas `gh release create` sits
|
|
5
|
+
# behind a gh-availability check and runs with check=False, so a missing or
|
|
6
|
+
# failing gh would leave nothing to publish. Listening for `release: published`
|
|
7
|
+
# as well fired a second, redundant run that raced the first to the upload and
|
|
8
|
+
# only ever logged "Skipping ... already exists".
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
tags:
|
|
12
|
+
- 'v*'
|
|
13
|
+
workflow_dispatch: {}
|
|
14
|
+
|
|
15
|
+
# One publish at a time per tag, so a workflow_dispatch re-run cannot overlap
|
|
16
|
+
# the run the tag push started.
|
|
17
|
+
concurrency:
|
|
18
|
+
group: release-${{ github.ref_name }}
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
env:
|
|
27
|
+
UV_LINK_MODE: "copy"
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v7
|
|
30
|
+
- uses: actions/setup-python@v7
|
|
31
|
+
with:
|
|
32
|
+
python-version: '3.14'
|
|
33
|
+
|
|
34
|
+
- name: Install uv
|
|
35
|
+
uses: astral-sh/setup-uv@v7
|
|
36
|
+
with:
|
|
37
|
+
enable-cache: true
|
|
38
|
+
prune-cache: false
|
|
39
|
+
|
|
40
|
+
- name: Build artifacts
|
|
41
|
+
run: uv build
|
|
42
|
+
|
|
43
|
+
- name: Upload artifacts
|
|
44
|
+
uses: actions/upload-artifact@v7
|
|
45
|
+
with:
|
|
46
|
+
name: dist
|
|
47
|
+
path: dist/*
|
|
48
|
+
|
|
49
|
+
- name: Prune uv cache
|
|
50
|
+
continue-on-error: true
|
|
51
|
+
run: uv cache prune --ci
|
|
52
|
+
|
|
53
|
+
publish:
|
|
54
|
+
needs: build
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
environment: pypi
|
|
57
|
+
permissions:
|
|
58
|
+
contents: read
|
|
59
|
+
# id-token is required for OIDC / PyPI Trusted Publisher. It is harmless when
|
|
60
|
+
# a PYPI_API_TOKEN secret is configured, in which case the token path runs.
|
|
61
|
+
id-token: write
|
|
62
|
+
steps:
|
|
63
|
+
- name: Select PyPI auth method
|
|
64
|
+
id: auth
|
|
65
|
+
env:
|
|
66
|
+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
67
|
+
run: |
|
|
68
|
+
if [ -n "$PYPI_API_TOKEN" ]; then
|
|
69
|
+
echo "PYPI_API_TOKEN is set; publishing with the API token."
|
|
70
|
+
echo "method=token" >> "$GITHUB_OUTPUT"
|
|
71
|
+
else
|
|
72
|
+
echo "No PYPI_API_TOKEN; publishing via OIDC Trusted Publisher."
|
|
73
|
+
echo "method=oidc" >> "$GITHUB_OUTPUT"
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
- name: Download artifacts
|
|
77
|
+
uses: actions/download-artifact@v8
|
|
78
|
+
with:
|
|
79
|
+
name: dist
|
|
80
|
+
path: dist/
|
|
81
|
+
|
|
82
|
+
- name: Publish to PyPI (API token)
|
|
83
|
+
if: steps.auth.outputs.method == 'token'
|
|
84
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
85
|
+
with:
|
|
86
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
87
|
+
attestations: false
|
|
88
|
+
skip-existing: true
|
|
89
|
+
|
|
90
|
+
- name: Publish to PyPI (Trusted Publisher / OIDC)
|
|
91
|
+
if: steps.auth.outputs.method == 'oidc'
|
|
92
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
93
|
+
with:
|
|
94
|
+
attestations: true
|
|
95
|
+
skip-existing: true
|
|
@@ -181,3 +181,13 @@ uv.lock
|
|
|
181
181
|
/.github.bak/
|
|
182
182
|
.claude/
|
|
183
183
|
CLAUDE.md
|
|
184
|
+
|
|
185
|
+
# Local, per-developer settings (Claude Code etc.) - never commit
|
|
186
|
+
*.local.json
|
|
187
|
+
|
|
188
|
+
# Python virtual environments (managed by bmk)
|
|
189
|
+
.venv-win/
|
|
190
|
+
.venv-bmk/
|
|
191
|
+
|
|
192
|
+
# Python virtual environments (managed by bmk)
|
|
193
|
+
.venv*/
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [2.3.3] 2026-07-24
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Added the curated bitranox `[tool.ruff.lint].select` (pycodestyle/pyflakes/isort/bugbear/pylint/bandit/etc.) plus a Pydantic `flake8-type-checking.runtime-evaluated-base-classes` entry; ruff 0.16's ~920-rule default (no explicit `select`) was about to reflood CI with unrelated rule families.
|
|
9
|
+
- Made internal traceback-preference helpers (`apply_traceback_preferences`, `_announce_traceback_choice`, `_traceback_limit`, `_restore_when_requested`) and the `cli` root command keyword-only for their boolean parameters (PLR0917/FBT001); updated every call site and doctest.
|
|
10
|
+
- Replaced `print()` calls in `__init__conf__.print_info` and `keep_github_workflow_active.py` (workflow activation/removal progress messages) with `sys.stdout.write`/`sys.stderr.write` (T201).
|
|
11
|
+
- Replaced the ASCII en-dash (`–`) with a plain hyphen across module docstrings (RUF002).
|
|
12
|
+
- Named the GitHub API "not found" status code as `HTTP_STATUS_NOT_FOUND` instead of the bare `404` (PLR2004).
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- CI: `make test` was red under the latest `ruff` (0.16 default rule explosion on a no-`select` repo); the fixes above make it pass again.
|
|
16
|
+
|
|
5
17
|
## [2.3.2] 2026-06-14
|
|
6
18
|
|
|
7
19
|
### Changed
|