keep-github-workflows-active 2.1.2__tar.gz → 2.1.4__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.1.4/.github/actions/extract-metadata/action.yml +92 -0
- keep_github_workflows_active-2.1.2/.github/workflows/ci.yml → keep_github_workflows_active-2.1.4/.github/workflows/activate_workflows.yml +1 -1
- keep_github_workflows_active-2.1.4/.github/workflows/default_cicd_public.yml +283 -0
- keep_github_workflows_active-2.1.2/.github/workflows/release.yml → keep_github_workflows_active-2.1.4/.github/workflows/default_release_public.yml +41 -15
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/CHANGELOG.md +33 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/CLAUDE.md +4 -5
- keep_github_workflows_active-2.1.4/Makefile +235 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/PKG-INFO +11 -11
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/README.md +1 -1
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/pyproject.toml +16 -11
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/reset_git_history.sh +17 -16
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/__init__conf__.py +1 -1
- keep_github_workflows_active-2.1.4/tests/test_github_integration.py +90 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/tests/test_metadata.py +3 -4
- keep_github_workflows_active-2.1.2/.github/workflows/do_not_change_ci_yml.md +0 -0
- keep_github_workflows_active-2.1.2/Makefile +0 -60
- keep_github_workflows_active-2.1.2/scripts/__init__.py +0 -3
- keep_github_workflows_active-2.1.2/scripts/__main__.py +0 -7
- keep_github_workflows_active-2.1.2/scripts/_utils.py +0 -768
- keep_github_workflows_active-2.1.2/scripts/build.py +0 -52
- keep_github_workflows_active-2.1.2/scripts/bump.py +0 -32
- keep_github_workflows_active-2.1.2/scripts/bump_major.py +0 -20
- keep_github_workflows_active-2.1.2/scripts/bump_minor.py +0 -20
- keep_github_workflows_active-2.1.2/scripts/bump_patch.py +0 -20
- keep_github_workflows_active-2.1.2/scripts/bump_version.py +0 -80
- keep_github_workflows_active-2.1.2/scripts/clean.py +0 -75
- keep_github_workflows_active-2.1.2/scripts/cli.py +0 -232
- keep_github_workflows_active-2.1.2/scripts/dependencies.py +0 -590
- keep_github_workflows_active-2.1.2/scripts/dev.py +0 -19
- keep_github_workflows_active-2.1.2/scripts/help.py +0 -41
- keep_github_workflows_active-2.1.2/scripts/install.py +0 -19
- keep_github_workflows_active-2.1.2/scripts/menu.py +0 -582
- keep_github_workflows_active-2.1.2/scripts/push.py +0 -309
- keep_github_workflows_active-2.1.2/scripts/release.py +0 -92
- keep_github_workflows_active-2.1.2/scripts/run_cli.py +0 -154
- keep_github_workflows_active-2.1.2/scripts/target_metadata.py +0 -202
- keep_github_workflows_active-2.1.2/scripts/test.py +0 -1004
- keep_github_workflows_active-2.1.2/scripts/toml_config.py +0 -433
- keep_github_workflows_active-2.1.2/scripts/version_current.py +0 -20
- keep_github_workflows_active-2.1.2/tests/test_scripts.py +0 -266
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.devcontainer/devcontainer.json +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.devcontainer/settings.json +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.env.example +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.github/dependabot.yml +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.github/workflows/codeql.yml +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.gitignore +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.qlty/qlty.toml +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/.snyk +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/CONTRIBUTING.md +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/DEVELOPMENT.md +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/INSTALL.md +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/LICENSE +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/codecov.yml +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/concept.md +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/docs/systemdesign/SECURITY.md +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/docs/systemdesign/module_reference.md +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/notebooks/Quickstart.ipynb +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/__init__.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/__main__.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/behaviors.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/cli.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/doctest.env +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/keep_github_workflow_active.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/py.typed +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/src/keep_github_workflows_active/sanitization.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/tests/conftest.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/tests/test_behaviors.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/tests/test_cli.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/tests/test_module_entry.py +0 -0
- {keep_github_workflows_active-2.1.2 → keep_github_workflows_active-2.1.4}/tests/test_sanitization.py +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Extract project metadata
|
|
2
|
+
description: >-
|
|
3
|
+
Parse pyproject.toml and expose project metadata as step outputs.
|
|
4
|
+
Requires Python to be available in the runner environment.
|
|
5
|
+
Auto-installs rtoml if not already present.
|
|
6
|
+
|
|
7
|
+
outputs:
|
|
8
|
+
PACKAGE_MODULE:
|
|
9
|
+
description: Python-importable module name (underscored)
|
|
10
|
+
value: ${{ steps.meta.outputs.PACKAGE_MODULE }}
|
|
11
|
+
PROJECT_NAME:
|
|
12
|
+
description: Project name from pyproject.toml
|
|
13
|
+
value: ${{ steps.meta.outputs.PROJECT_NAME }}
|
|
14
|
+
CLI_BIN:
|
|
15
|
+
description: CLI entry-point binary name
|
|
16
|
+
value: ${{ steps.meta.outputs.CLI_BIN }}
|
|
17
|
+
SRC_PATH:
|
|
18
|
+
description: Source directory path (e.g. "src")
|
|
19
|
+
value: ${{ steps.meta.outputs.SRC_PATH }}
|
|
20
|
+
COV_FAIL_UNDER:
|
|
21
|
+
description: Minimum coverage percentage from tool.coverage.report.fail_under
|
|
22
|
+
value: ${{ steps.meta.outputs.COV_FAIL_UNDER }}
|
|
23
|
+
COV_REPORT_FILE:
|
|
24
|
+
description: Coverage report filename (e.g. "coverage.xml")
|
|
25
|
+
value: ${{ steps.meta.outputs.COV_REPORT_FILE }}
|
|
26
|
+
PYTEST_VERBOSITY:
|
|
27
|
+
description: Pytest verbosity flag (e.g. "-vv")
|
|
28
|
+
value: ${{ steps.meta.outputs.PYTEST_VERBOSITY }}
|
|
29
|
+
BANDIT_SKIP_FLAG:
|
|
30
|
+
description: Bandit skip flag string (e.g. "-s B101,B601") or empty
|
|
31
|
+
value: ${{ steps.meta.outputs.BANDIT_SKIP_FLAG }}
|
|
32
|
+
|
|
33
|
+
runs:
|
|
34
|
+
using: composite
|
|
35
|
+
steps:
|
|
36
|
+
- name: Extract project metadata from pyproject.toml
|
|
37
|
+
id: meta
|
|
38
|
+
shell: python
|
|
39
|
+
run: |
|
|
40
|
+
import os, subprocess, sys
|
|
41
|
+
try:
|
|
42
|
+
import rtoml
|
|
43
|
+
except ModuleNotFoundError:
|
|
44
|
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "rtoml", "-q"])
|
|
45
|
+
import rtoml
|
|
46
|
+
|
|
47
|
+
from pathlib import Path
|
|
48
|
+
data = rtoml.load(Path('pyproject.toml'))
|
|
49
|
+
|
|
50
|
+
# --- [project] section ---
|
|
51
|
+
project = data['project']['name']
|
|
52
|
+
module = project.replace('-', '_')
|
|
53
|
+
dash = project.replace('_', '-')
|
|
54
|
+
scripts = list(data['project'].get('scripts', {}).keys())
|
|
55
|
+
cli_bin = scripts[0] if scripts else dash
|
|
56
|
+
|
|
57
|
+
# --- [tool.scripts.test] section ---
|
|
58
|
+
scripts_test = data.get('tool', {}).get('scripts', {}).get('test', {})
|
|
59
|
+
src_path = scripts_test.get('src-path', 'src')
|
|
60
|
+
pytest_verbosity = scripts_test.get('pytest-verbosity', '-vv')
|
|
61
|
+
cov_report_file = scripts_test.get('coverage-report-file', 'coverage.xml')
|
|
62
|
+
|
|
63
|
+
# --- [tool.coverage.report] section ---
|
|
64
|
+
cov_fail_under = (
|
|
65
|
+
data.get('tool', {}).get('coverage', {}).get('report', {}).get('fail_under', 90)
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# --- [tool.bandit] section ---
|
|
69
|
+
bandit_skips = data.get('tool', {}).get('bandit', {}).get('skips', [])
|
|
70
|
+
bandit_skip_flag = f"-s {','.join(bandit_skips)}" if bandit_skips else ""
|
|
71
|
+
|
|
72
|
+
# Write to GITHUB_OUTPUT for composite action outputs
|
|
73
|
+
with open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as out:
|
|
74
|
+
out.write(f"PROJECT_NAME={project}\n")
|
|
75
|
+
out.write(f"PACKAGE_MODULE={module}\n")
|
|
76
|
+
out.write(f"CLI_BIN={cli_bin}\n")
|
|
77
|
+
out.write(f"SRC_PATH={src_path}\n")
|
|
78
|
+
out.write(f"PYTEST_VERBOSITY={pytest_verbosity}\n")
|
|
79
|
+
out.write(f"COV_REPORT_FILE={cov_report_file}\n")
|
|
80
|
+
out.write(f"COV_FAIL_UNDER={cov_fail_under}\n")
|
|
81
|
+
out.write(f"BANDIT_SKIP_FLAG={bandit_skip_flag}\n")
|
|
82
|
+
|
|
83
|
+
# Also write to GITHUB_ENV so subsequent steps can use ${{ env.VAR }}
|
|
84
|
+
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as env:
|
|
85
|
+
env.write(f"PROJECT_NAME={project}\n")
|
|
86
|
+
env.write(f"PACKAGE_MODULE={module}\n")
|
|
87
|
+
env.write(f"CLI_BIN={cli_bin}\n")
|
|
88
|
+
env.write(f"SRC_PATH={src_path}\n")
|
|
89
|
+
env.write(f"PYTEST_VERBOSITY={pytest_verbosity}\n")
|
|
90
|
+
env.write(f"COV_REPORT_FILE={cov_report_file}\n")
|
|
91
|
+
env.write(f"COV_FAIL_UNDER={cov_fail_under}\n")
|
|
92
|
+
env.write(f"BANDIT_SKIP_FLAG={bandit_skip_flag}\n")
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, master ]
|
|
8
|
+
schedule:
|
|
9
|
+
# Run daily at 3:17 AM UTC (off-peak hours, odd minute to avoid congestion)
|
|
10
|
+
- cron: '17 3 * * *'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Tests (Python ${{ matrix.python }}, ${{ matrix.os }})
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
20
|
+
# Test against all supported Python versions (3.10+)
|
|
21
|
+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
22
|
+
env:
|
|
23
|
+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
|
|
24
|
+
PYTHONIOENCODING: "utf-8"
|
|
25
|
+
UV_LINK_MODE: "copy"
|
|
26
|
+
UV_BREAK_SYSTEM_PACKAGES: "1"
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
- uses: actions/setup-python@v6
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{ matrix.python }}
|
|
32
|
+
- name: Install uv
|
|
33
|
+
uses: astral-sh/setup-uv@v7
|
|
34
|
+
with:
|
|
35
|
+
enable-cache: true
|
|
36
|
+
prune-cache: false
|
|
37
|
+
|
|
38
|
+
- name: Install bash 4+ on macOS
|
|
39
|
+
if: runner.os == 'macOS'
|
|
40
|
+
run: |
|
|
41
|
+
brew install bash
|
|
42
|
+
echo "$(brew --prefix)/bin" >> "$GITHUB_PATH"
|
|
43
|
+
|
|
44
|
+
- name: Extract project metadata
|
|
45
|
+
id: metadata
|
|
46
|
+
uses: ./.github/actions/extract-metadata
|
|
47
|
+
|
|
48
|
+
- name: Install journald prerequisites
|
|
49
|
+
if: runner.os == 'Linux'
|
|
50
|
+
shell: bash
|
|
51
|
+
run: |
|
|
52
|
+
sudo apt-get update
|
|
53
|
+
sudo apt-get install -y python3-systemd
|
|
54
|
+
|
|
55
|
+
- name: Install dev deps
|
|
56
|
+
shell: bash
|
|
57
|
+
run: |
|
|
58
|
+
uv pip install -e .[dev] --system
|
|
59
|
+
|
|
60
|
+
- name: Install Windows Event Log prerequisites
|
|
61
|
+
if: runner.os == 'Windows'
|
|
62
|
+
shell: bash
|
|
63
|
+
run: |
|
|
64
|
+
uv pip install pywin32 --system
|
|
65
|
+
|
|
66
|
+
- name: Restore ruff cache
|
|
67
|
+
id: ruff-cache
|
|
68
|
+
uses: actions/cache/restore@v5
|
|
69
|
+
with:
|
|
70
|
+
path: .ruff_cache
|
|
71
|
+
key: ruff-${{ runner.os }}-py${{ matrix.python }}-${{ github.sha }}
|
|
72
|
+
restore-keys: |
|
|
73
|
+
ruff-${{ runner.os }}-py${{ matrix.python }}-
|
|
74
|
+
ruff-${{ runner.os }}-
|
|
75
|
+
|
|
76
|
+
- name: Run ruff (lint + format)
|
|
77
|
+
id: ruff
|
|
78
|
+
continue-on-error: true
|
|
79
|
+
shell: bash
|
|
80
|
+
run: |
|
|
81
|
+
ruff check .
|
|
82
|
+
ruff format --check .
|
|
83
|
+
|
|
84
|
+
- name: Run pyright (type check)
|
|
85
|
+
id: pyright
|
|
86
|
+
continue-on-error: true
|
|
87
|
+
shell: bash
|
|
88
|
+
run: pyright
|
|
89
|
+
|
|
90
|
+
- name: Run pytest (tests + coverage)
|
|
91
|
+
id: pytest
|
|
92
|
+
continue-on-error: true
|
|
93
|
+
shell: bash
|
|
94
|
+
env:
|
|
95
|
+
TEST_VERBOSE: "1"
|
|
96
|
+
# Write coverage SQLite database to local disk — network mounts
|
|
97
|
+
# and stale journal files cause "database is locked" errors.
|
|
98
|
+
COVERAGE_FILE: "${{ runner.temp }}/.coverage"
|
|
99
|
+
run: >-
|
|
100
|
+
pytest -m "not local_only"
|
|
101
|
+
--cov=${{ env.SRC_PATH }}/${{ env.PACKAGE_MODULE }}
|
|
102
|
+
--cov-report=term-missing
|
|
103
|
+
--cov-report=xml:${{ env.COV_REPORT_FILE }}
|
|
104
|
+
--cov-fail-under=${{ env.COV_FAIL_UNDER }}
|
|
105
|
+
${{ env.PYTEST_VERBOSITY }}
|
|
106
|
+
|
|
107
|
+
- name: Upload coverage to Codecov
|
|
108
|
+
if: >-
|
|
109
|
+
always()
|
|
110
|
+
&& steps.pytest.outcome == 'success'
|
|
111
|
+
&& matrix.os == 'ubuntu-latest'
|
|
112
|
+
&& matrix.python == '3.13'
|
|
113
|
+
uses: codecov/codecov-action@v5
|
|
114
|
+
with:
|
|
115
|
+
files: ${{ env.COV_REPORT_FILE }}
|
|
116
|
+
fail_ci_if_error: false
|
|
117
|
+
|
|
118
|
+
- name: Run import-linter (architecture)
|
|
119
|
+
id: importlinter
|
|
120
|
+
continue-on-error: true
|
|
121
|
+
shell: bash
|
|
122
|
+
run: lint-imports
|
|
123
|
+
|
|
124
|
+
- name: Run bandit (security scan)
|
|
125
|
+
id: bandit
|
|
126
|
+
continue-on-error: true
|
|
127
|
+
shell: bash
|
|
128
|
+
run: bandit -q -r ${{ env.SRC_PATH }}/${{ env.PACKAGE_MODULE }} ${{ env.BANDIT_SKIP_FLAG }}
|
|
129
|
+
|
|
130
|
+
- name: Run pip-audit (vulnerability scan)
|
|
131
|
+
id: pipaudit
|
|
132
|
+
continue-on-error: true
|
|
133
|
+
shell: python
|
|
134
|
+
run: |
|
|
135
|
+
import subprocess, sys
|
|
136
|
+
import rtoml
|
|
137
|
+
from pathlib import Path
|
|
138
|
+
data = rtoml.load(Path("pyproject.toml"))
|
|
139
|
+
vulns = data.get("tool", {}).get("pip-audit", {}).get("ignore-vulns", [])
|
|
140
|
+
cmd = ["pip-audit", "--skip-editable"]
|
|
141
|
+
for v in vulns:
|
|
142
|
+
cmd.extend(["--ignore-vuln", v])
|
|
143
|
+
sys.exit(subprocess.call(cmd))
|
|
144
|
+
|
|
145
|
+
- name: Check all steps passed
|
|
146
|
+
shell: bash
|
|
147
|
+
run: |
|
|
148
|
+
if [[ "${{ steps.ruff.outcome }}" != "success" ]]; then
|
|
149
|
+
echo "::error::Ruff check failed"
|
|
150
|
+
exit 1
|
|
151
|
+
fi
|
|
152
|
+
if [[ "${{ steps.pyright.outcome }}" != "success" ]]; then
|
|
153
|
+
echo "::error::Pyright check failed"
|
|
154
|
+
exit 1
|
|
155
|
+
fi
|
|
156
|
+
if [[ "${{ steps.pytest.outcome }}" != "success" ]]; then
|
|
157
|
+
echo "::error::Pytest failed"
|
|
158
|
+
exit 1
|
|
159
|
+
fi
|
|
160
|
+
if [[ "${{ steps.importlinter.outcome }}" != "success" ]]; then
|
|
161
|
+
echo "::error::Import-linter check failed"
|
|
162
|
+
exit 1
|
|
163
|
+
fi
|
|
164
|
+
if [[ "${{ steps.bandit.outcome }}" != "success" ]]; then
|
|
165
|
+
echo "::error::Bandit security scan failed"
|
|
166
|
+
exit 1
|
|
167
|
+
fi
|
|
168
|
+
if [[ "${{ steps.pipaudit.outcome }}" != "success" ]]; then
|
|
169
|
+
echo "::error::pip-audit vulnerability scan failed"
|
|
170
|
+
exit 1
|
|
171
|
+
fi
|
|
172
|
+
echo "All checks passed!"
|
|
173
|
+
|
|
174
|
+
- name: Build wheel/sdist
|
|
175
|
+
shell: bash
|
|
176
|
+
run: uv build
|
|
177
|
+
|
|
178
|
+
- name: Verify wheel install in clean env
|
|
179
|
+
shell: bash
|
|
180
|
+
run: |
|
|
181
|
+
uv venv .venv_wheel
|
|
182
|
+
. .venv_wheel/bin/activate 2>/dev/null || . .venv_wheel/Scripts/activate 2>/dev/null
|
|
183
|
+
uv pip install dist/*.whl
|
|
184
|
+
"$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
|
|
185
|
+
|
|
186
|
+
- name: Prune uv cache
|
|
187
|
+
continue-on-error: true
|
|
188
|
+
shell: bash
|
|
189
|
+
run: uv cache prune --ci
|
|
190
|
+
|
|
191
|
+
- name: Save ruff cache
|
|
192
|
+
if: always() && steps.ruff-cache.outputs.cache-hit != 'true'
|
|
193
|
+
uses: actions/cache/save@v5
|
|
194
|
+
with:
|
|
195
|
+
path: .ruff_cache
|
|
196
|
+
key: ruff-${{ runner.os }}-py${{ matrix.python }}-${{ github.sha }}
|
|
197
|
+
|
|
198
|
+
pipx-uv:
|
|
199
|
+
name: pipx/uv verification (ubuntu)
|
|
200
|
+
runs-on: ubuntu-latest
|
|
201
|
+
steps:
|
|
202
|
+
- uses: actions/checkout@v6
|
|
203
|
+
- uses: actions/setup-python@v6
|
|
204
|
+
with:
|
|
205
|
+
python-version: "3.14"
|
|
206
|
+
|
|
207
|
+
- name: Install uv
|
|
208
|
+
uses: astral-sh/setup-uv@v7
|
|
209
|
+
with:
|
|
210
|
+
enable-cache: true
|
|
211
|
+
prune-cache: false
|
|
212
|
+
|
|
213
|
+
- name: Extract project metadata
|
|
214
|
+
id: metadata
|
|
215
|
+
uses: ./.github/actions/extract-metadata
|
|
216
|
+
|
|
217
|
+
- name: Build wheel
|
|
218
|
+
run: uv build
|
|
219
|
+
- name: pipx install from wheel
|
|
220
|
+
run: |
|
|
221
|
+
uv pip install --system pipx
|
|
222
|
+
pipx ensurepath
|
|
223
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
224
|
+
pipx install dist/*.whl
|
|
225
|
+
"$CLI_BIN" --version
|
|
226
|
+
|
|
227
|
+
- name: uv tool install
|
|
228
|
+
run: |
|
|
229
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
230
|
+
uv tool install --force .
|
|
231
|
+
"$CLI_BIN" --version
|
|
232
|
+
|
|
233
|
+
- name: Prune uv cache
|
|
234
|
+
continue-on-error: true
|
|
235
|
+
run: uv cache prune --ci
|
|
236
|
+
|
|
237
|
+
notebooks:
|
|
238
|
+
name: Execute notebooks (ubuntu, Python 3.14)
|
|
239
|
+
runs-on: ubuntu-latest
|
|
240
|
+
steps:
|
|
241
|
+
- uses: actions/checkout@v6
|
|
242
|
+
- uses: actions/setup-python@v6
|
|
243
|
+
with:
|
|
244
|
+
python-version: "3.14"
|
|
245
|
+
|
|
246
|
+
- name: Install uv
|
|
247
|
+
uses: astral-sh/setup-uv@v7
|
|
248
|
+
with:
|
|
249
|
+
enable-cache: true
|
|
250
|
+
prune-cache: false
|
|
251
|
+
|
|
252
|
+
- name: Install notebook runner deps
|
|
253
|
+
run: |
|
|
254
|
+
uv pip install --system nbclient nbformat ipykernel jupyter_client
|
|
255
|
+
python -m ipykernel install --user --name python3 --display-name "Python 3"
|
|
256
|
+
- name: Execute Quickstart notebook
|
|
257
|
+
env:
|
|
258
|
+
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
259
|
+
PIP_NO_INPUT: "1"
|
|
260
|
+
run: |
|
|
261
|
+
python - << 'PY'
|
|
262
|
+
from pathlib import Path
|
|
263
|
+
|
|
264
|
+
import nbformat
|
|
265
|
+
from nbclient import NotebookClient
|
|
266
|
+
|
|
267
|
+
nb_path = Path('notebooks/Quickstart.ipynb')
|
|
268
|
+
if not nb_path.exists():
|
|
269
|
+
raise SystemExit(f"Notebook not found: {nb_path}")
|
|
270
|
+
|
|
271
|
+
notebook = nbformat.read(nb_path, as_version=4)
|
|
272
|
+
client = NotebookClient(
|
|
273
|
+
notebook,
|
|
274
|
+
timeout=900,
|
|
275
|
+
kernel_name='python3',
|
|
276
|
+
allow_errors=False,
|
|
277
|
+
)
|
|
278
|
+
client.execute()
|
|
279
|
+
|
|
280
|
+
out_path = Path('notebooks/Quickstart-executed.ipynb')
|
|
281
|
+
nbformat.write(notebook, out_path)
|
|
282
|
+
print(f"Executed notebook written to: {out_path}")
|
|
283
|
+
PY
|
|
@@ -9,35 +9,61 @@ on:
|
|
|
9
9
|
workflow_dispatch: {}
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
|
-
build
|
|
12
|
+
build:
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
permissions:
|
|
15
15
|
contents: read
|
|
16
|
+
env:
|
|
17
|
+
UV_LINK_MODE: "copy"
|
|
16
18
|
steps:
|
|
17
19
|
- uses: actions/checkout@v6
|
|
20
|
+
- uses: actions/setup-python@v6
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.14'
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v7
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
prune-cache: false
|
|
29
|
+
|
|
30
|
+
- name: Build artifacts
|
|
31
|
+
run: uv build
|
|
32
|
+
|
|
33
|
+
- name: Upload artifacts
|
|
34
|
+
uses: actions/upload-artifact@v6
|
|
35
|
+
with:
|
|
36
|
+
name: dist
|
|
37
|
+
path: dist/*
|
|
38
|
+
|
|
39
|
+
- name: Prune uv cache
|
|
40
|
+
continue-on-error: true
|
|
41
|
+
run: uv cache prune --ci
|
|
42
|
+
|
|
43
|
+
publish:
|
|
44
|
+
needs: build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
environment: pypi
|
|
47
|
+
permissions:
|
|
48
|
+
contents: read
|
|
49
|
+
steps:
|
|
18
50
|
- name: Verify PyPI token is set
|
|
19
51
|
run: |
|
|
20
52
|
if [ -z "${{ secrets.PYPI_API_TOKEN }}" ]; then
|
|
21
|
-
echo "::error title=Missing PyPI token::Set the PYPI_API_TOKEN secret in GitHub repository settings to enable PyPI publishing on releases."
|
|
22
|
-
echo "See: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions"
|
|
53
|
+
echo "::error title=Missing PyPI token::Set the PYPI_API_TOKEN secret in GitHub repository settings to enable PyPI publishing on releases."
|
|
54
|
+
echo "See: https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions"
|
|
23
55
|
exit 1
|
|
24
56
|
fi
|
|
25
|
-
|
|
57
|
+
|
|
58
|
+
- name: Download artifacts
|
|
59
|
+
uses: actions/download-artifact@v7
|
|
26
60
|
with:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
python -m pip install --upgrade pip build
|
|
31
|
-
python -m build
|
|
61
|
+
name: dist
|
|
62
|
+
path: dist/
|
|
63
|
+
|
|
32
64
|
- name: Publish to PyPI
|
|
33
|
-
# Use the rolling major tag to get latest Twine/standards support (e.g., Core Metadata 2.4)
|
|
34
65
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
35
66
|
with:
|
|
36
67
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
37
68
|
attestations: false
|
|
38
69
|
skip-existing: true
|
|
39
|
-
- name: Upload artifacts
|
|
40
|
-
uses: actions/upload-artifact@v6
|
|
41
|
-
with:
|
|
42
|
-
name: dist
|
|
43
|
-
path: dist/*
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [2.1.4] - 2026-02-13
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Fixed shellcheck SC1083 warning and shfmt formatting in `reset_git_history.sh`
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Updated CI/CD workflows: added Bash 4+ support for macOS, streamlined metadata extraction action
|
|
12
|
+
- Updated README badge path
|
|
13
|
+
|
|
14
|
+
### Dependencies
|
|
15
|
+
- Bumped `lib_cli_exit_tools` to `>=2.3.0`
|
|
16
|
+
- Bumped `ruff` to `>=0.15.1`
|
|
17
|
+
- Bumped `import-linter` to `>=2.10`
|
|
18
|
+
|
|
19
|
+
### Security
|
|
20
|
+
- Added CVE-2026-1703 and CVE-2026-26007 (cryptography 46.0.3) to pip-audit ignore list
|
|
21
|
+
|
|
22
|
+
## [2.1.3] - 2026-02-01
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Fixed pyright errors in `test_metadata.py` by replacing `tomllib` (Python 3.11+) with `rtoml` for Python 3.10 compatibility
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- Added `local_only` pytest marker for tests requiring GitHub credentials
|
|
29
|
+
- Created `test_github_integration.py` with dedicated GitHub API integration tests
|
|
30
|
+
- Tests marked `local_only` are excluded from public CI (`default_cicd_public.yml`) but run in `activate_workflows.yml` where secrets are available
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- Excluded `keep_github_workflow_active.py` from doctest collection (doctests access GitHub API when credentials available)
|
|
34
|
+
- Added setuptools vulnerability exceptions to pip-audit (PYSEC-2022-43012, PYSEC-2025-49, CVE-2024-6345) - transitive dependency pinned by build tools
|
|
35
|
+
|
|
3
36
|
## [2.1.2] - 2025-12-15
|
|
4
37
|
|
|
5
38
|
### Changed
|
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
- bash_clean_code.md
|
|
9
9
|
- bash_small_functions.md
|
|
10
10
|
- python_solid_architecture_enforcer.md
|
|
11
|
-
- python_clean_architecture.md
|
|
12
11
|
- python_clean_code.md
|
|
13
12
|
- python_small_functions_style.md
|
|
14
|
-
-
|
|
13
|
+
- use skill `bx-python-libraries-to-use`
|
|
15
14
|
- python_structure_template.md
|
|
16
15
|
- self_documenting.md
|
|
17
16
|
- self_documenting_template.md
|
|
@@ -32,10 +31,10 @@ when writing or refracturing Bash scripts, apply those Rules :
|
|
|
32
31
|
when writing or refracturing Python scripts, apply those Rules :
|
|
33
32
|
- core_programming_solid.md
|
|
34
33
|
- python_solid_architecture_enforcer.md
|
|
35
|
-
-
|
|
34
|
+
- use skill `bx-python-clean-architecture`
|
|
36
35
|
- python_clean_code.md
|
|
37
36
|
- python_small_functions_style.md
|
|
38
|
-
-
|
|
37
|
+
- use skill `bx-python-libraries-to-use`
|
|
39
38
|
- python_lib_structure_template.md
|
|
40
39
|
|
|
41
40
|
## Project Structure & Module Organization
|
|
@@ -81,7 +80,7 @@ when writing or refracturing Python scripts, apply those Rules :
|
|
|
81
80
|
## Commit & Pull Request Guidelines
|
|
82
81
|
|
|
83
82
|
## Architecture Overview
|
|
84
|
-
-
|
|
83
|
+
- use skill `bx-python-clean-architecture`
|
|
85
84
|
|
|
86
85
|
## Data Architecture Rules
|
|
87
86
|
|