keep-github-workflows-active 2.0.0__tar.gz → 2.1.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.
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.github/workflows/ci.yml +31 -21
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.github/workflows/codeql.yml +1 -1
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.github/workflows/release.yml +2 -2
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.gitignore +1 -0
- keep_github_workflows_active-2.1.1/CHANGELOG.md +57 -0
- keep_github_workflows_active-2.0.0/AGENTS.md → keep_github_workflows_active-2.1.1/CLAUDE.md +29 -106
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/Makefile +7 -1
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/PKG-INFO +29 -12
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/README.md +16 -0
- keep_github_workflows_active-2.1.1/docs/systemdesign/SECURITY.md +298 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/pyproject.toml +50 -11
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/_utils.py +310 -89
- keep_github_workflows_active-2.1.1/scripts/clean.py +75 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/cli.py +20 -1
- keep_github_workflows_active-2.1.1/scripts/dependencies.py +590 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/menu.py +33 -19
- keep_github_workflows_active-2.1.1/scripts/push.py +309 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/release.py +3 -1
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/target_metadata.py +32 -4
- keep_github_workflows_active-2.1.1/scripts/test.py +1004 -0
- keep_github_workflows_active-2.1.1/scripts/toml_config.py +455 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/src/keep_github_workflows_active/__init__conf__.py +8 -1
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/src/keep_github_workflows_active/cli.py +35 -14
- keep_github_workflows_active-2.1.1/src/keep_github_workflows_active/doctest.env +1 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/src/keep_github_workflows_active/keep_github_workflow_active.py +291 -93
- keep_github_workflows_active-2.1.1/src/keep_github_workflows_active/py.typed +0 -0
- keep_github_workflows_active-2.1.1/src/keep_github_workflows_active/sanitization.py +379 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/tests/conftest.py +28 -8
- keep_github_workflows_active-2.1.1/tests/test_sanitization.py +295 -0
- keep_github_workflows_active-2.0.0/CHANGELOG.md +0 -27
- keep_github_workflows_active-2.0.0/scripts/clean.py +0 -48
- keep_github_workflows_active-2.0.0/scripts/push.py +0 -77
- keep_github_workflows_active-2.0.0/scripts/test.py +0 -535
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.devcontainer/devcontainer.json +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.devcontainer/settings.json +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.env.example +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.github/dependabot.yml +0 -0
- /keep_github_workflows_active-2.0.0/src/keep_github_workflows_active/py.typed → /keep_github_workflows_active-2.1.1/.github/workflows/do_not_change_ci_yml.md +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.qlty/qlty.toml +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.snyk +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/CONTRIBUTING.md +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/DEVELOPMENT.md +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/INSTALL.md +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/LICENSE +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/codecov.yml +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/concept.md +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/docs/systemdesign/module_reference.md +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/notebooks/Quickstart.ipynb +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/reset_git_history.sh +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/__init__.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/__main__.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/build.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/bump.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/bump_major.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/bump_minor.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/bump_patch.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/bump_version.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/dev.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/help.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/install.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/run_cli.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/scripts/version_current.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/src/keep_github_workflows_active/__init__.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/src/keep_github_workflows_active/__main__.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/src/keep_github_workflows_active/behaviors.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/tests/test_behaviors.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/tests/test_cli.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/tests/test_metadata.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/tests/test_module_entry.py +0 -0
- {keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/tests/test_scripts.py +0 -0
{keep_github_workflows_active-2.0.0 → keep_github_workflows_active-2.1.1}/.github/workflows/ci.yml
RENAMED
|
@@ -5,11 +5,17 @@ on:
|
|
|
5
5
|
branches: [ main, master ]
|
|
6
6
|
pull_request:
|
|
7
7
|
branches: [ main, master ]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 7 * * 1"
|
|
8
10
|
|
|
9
11
|
jobs:
|
|
10
12
|
test:
|
|
11
13
|
name: Tests (Python ${{ matrix.python }}, ${{ matrix.os }})
|
|
12
14
|
runs-on: ${{ matrix.os }}
|
|
15
|
+
env:
|
|
16
|
+
SECRET_GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }}
|
|
17
|
+
SECRET_GITHUB_OWNER: ${{ secrets.SECRET_GITHUB_OWNER }}
|
|
18
|
+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
|
|
13
19
|
strategy:
|
|
14
20
|
fail-fast: false
|
|
15
21
|
matrix:
|
|
@@ -17,10 +23,15 @@ jobs:
|
|
|
17
23
|
# Test against the latest CPython 3.x release provided by Actions
|
|
18
24
|
python: ["3.x"]
|
|
19
25
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
26
|
+
- uses: actions/checkout@v6
|
|
21
27
|
- uses: actions/setup-python@v6
|
|
22
28
|
with:
|
|
23
29
|
python-version: ${{ matrix.python }}
|
|
30
|
+
cache: 'pip'
|
|
31
|
+
- name: Install uv
|
|
32
|
+
uses: astral-sh/setup-uv@v7
|
|
33
|
+
with:
|
|
34
|
+
enable-cache: true
|
|
24
35
|
- name: Extract project metadata
|
|
25
36
|
shell: python
|
|
26
37
|
run: |
|
|
@@ -46,14 +57,10 @@ jobs:
|
|
|
46
57
|
sudo apt-get update
|
|
47
58
|
sudo apt-get install -y python3-systemd
|
|
48
59
|
|
|
49
|
-
- name:
|
|
50
|
-
shell: bash
|
|
51
|
-
run: python -m pip install --upgrade pip
|
|
52
|
-
|
|
53
|
-
- name: Install dev deps
|
|
60
|
+
- name: Install dev deps with uv
|
|
54
61
|
shell: bash
|
|
55
62
|
run: |
|
|
56
|
-
pip install -e .[dev]
|
|
63
|
+
uv pip install --system -e .[dev]
|
|
57
64
|
|
|
58
65
|
- name: Run full test suite (lint, types, tests, coverage, codecov)
|
|
59
66
|
shell: bash
|
|
@@ -62,23 +69,24 @@ jobs:
|
|
|
62
69
|
run: make test
|
|
63
70
|
- name: Build wheel/sdist
|
|
64
71
|
shell: bash
|
|
65
|
-
run:
|
|
72
|
+
run: uv build
|
|
66
73
|
- name: Verify wheel install in clean env
|
|
67
74
|
shell: bash
|
|
68
75
|
run: |
|
|
69
|
-
|
|
76
|
+
uv venv .venv_wheel
|
|
70
77
|
. .venv_wheel/bin/activate 2>/dev/null || . .venv_wheel/Scripts/activate 2>/dev/null
|
|
71
|
-
pip install dist/*.whl
|
|
78
|
+
uv pip install dist/*.whl
|
|
72
79
|
"$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
|
|
73
80
|
|
|
74
81
|
pipx-uv:
|
|
75
82
|
name: pipx/uv verification (ubuntu)
|
|
76
83
|
runs-on: ubuntu-latest
|
|
77
84
|
steps:
|
|
78
|
-
- uses: actions/checkout@
|
|
85
|
+
- uses: actions/checkout@v6
|
|
79
86
|
- uses: actions/setup-python@v6
|
|
80
87
|
with:
|
|
81
88
|
python-version: "3.13"
|
|
89
|
+
cache: 'pip'
|
|
82
90
|
- name: Extract project metadata
|
|
83
91
|
shell: python
|
|
84
92
|
run: |
|
|
@@ -97,19 +105,17 @@ jobs:
|
|
|
97
105
|
env.write(f"PROJECT_NAME={project}\n")
|
|
98
106
|
env.write(f"PACKAGE_MODULE={module}\n")
|
|
99
107
|
env.write(f"CLI_BIN={cli_bin}\n")
|
|
108
|
+
- name: Install uv
|
|
109
|
+
uses: astral-sh/setup-uv@v7
|
|
110
|
+
with:
|
|
111
|
+
enable-cache: true
|
|
100
112
|
- name: Build wheel
|
|
101
|
-
run:
|
|
102
|
-
python -m pip install --upgrade pip build
|
|
103
|
-
python -m build
|
|
113
|
+
run: uv build
|
|
104
114
|
- name: pipx install from wheel
|
|
105
115
|
run: |
|
|
106
116
|
python -m pip install pipx
|
|
107
117
|
pipx install dist/*.whl
|
|
108
118
|
"$CLI_BIN" --version 2>/dev/null || python -m "$PACKAGE_MODULE" --version
|
|
109
|
-
- name: Install uv
|
|
110
|
-
uses: astral-sh/setup-uv@v7
|
|
111
|
-
with:
|
|
112
|
-
enable-cache: true
|
|
113
119
|
- name: uv tool install
|
|
114
120
|
run: |
|
|
115
121
|
uv tool install .
|
|
@@ -119,14 +125,18 @@ jobs:
|
|
|
119
125
|
name: Execute notebooks (ubuntu, Python 3.13)
|
|
120
126
|
runs-on: ubuntu-latest
|
|
121
127
|
steps:
|
|
122
|
-
- uses: actions/checkout@
|
|
128
|
+
- uses: actions/checkout@v6
|
|
123
129
|
- uses: actions/setup-python@v6
|
|
124
130
|
with:
|
|
125
131
|
python-version: "3.13"
|
|
132
|
+
cache: 'pip'
|
|
133
|
+
- name: Install uv
|
|
134
|
+
uses: astral-sh/setup-uv@v7
|
|
135
|
+
with:
|
|
136
|
+
enable-cache: true
|
|
126
137
|
- name: Install notebook runner deps
|
|
127
138
|
run: |
|
|
128
|
-
|
|
129
|
-
pip install nbclient nbformat ipykernel jupyter_client
|
|
139
|
+
uv pip install --system nbclient nbformat ipykernel jupyter_client
|
|
130
140
|
python -m ipykernel install --user --name python3 --display-name "Python 3"
|
|
131
141
|
- name: Execute Quickstart notebook
|
|
132
142
|
env:
|
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
permissions:
|
|
15
15
|
contents: read
|
|
16
16
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
18
|
- name: Verify PyPI token is set
|
|
19
19
|
run: |
|
|
20
20
|
if [ -z "${{ secrets.PYPI_API_TOKEN }}" ]; then
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
attestations: false
|
|
38
38
|
skip-existing: true
|
|
39
39
|
- name: Upload artifacts
|
|
40
|
-
uses: actions/upload-artifact@
|
|
40
|
+
uses: actions/upload-artifact@v5
|
|
41
41
|
with:
|
|
42
42
|
name: dist
|
|
43
43
|
path: dist/*
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2.1.1] - 2025-12-08
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- **Data Architecture Enforcement**: Refactored to follow strict Pydantic/Enum architecture rules.
|
|
7
|
+
- `EnvConfig` now uses `__getattr__` for typed attribute access instead of dict-style `.get()` method
|
|
8
|
+
- Added `PaginationLink` Pydantic model for typed pagination header handling
|
|
9
|
+
- Replaced dict key access (`response.links.get("next")`) with typed model access (`link.url`)
|
|
10
|
+
- Added `get_value()` method to `EnvConfig` for explicit key lookup
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
- Added `pydantic>=2.10.0` as a runtime dependency for typed data models
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
- Updated `CLAUDE.md` with Data Architecture Rules section documenting:
|
|
17
|
+
- Core principles (Pydantic at boundaries, no internal dicts, Enums for constants)
|
|
18
|
+
- Key Pydantic models and Enums used in the project
|
|
19
|
+
- Framework exceptions where dict usage is required
|
|
20
|
+
- Fixed incorrect path reference in Versioning section (`lib_cli_exit_tools` → `keep_github_workflows_active`)
|
|
21
|
+
|
|
22
|
+
## [2.1.0] - 2025-10-29
|
|
23
|
+
### Security
|
|
24
|
+
- **Added comprehensive credential sanitization** to prevent token leakage in logs.
|
|
25
|
+
- New `sanitization` module with functions to redact sensitive data
|
|
26
|
+
- All logging calls now sanitize messages before output
|
|
27
|
+
- Protects GitHub tokens (ghp_*, gho_*, etc.), API keys, and authorization headers
|
|
28
|
+
- Token pattern detection using regex for various formats (hex, base64, GitHub-specific)
|
|
29
|
+
- Dictionary and nested structure sanitization for structured logging
|
|
30
|
+
- 100% test coverage with 31 dedicated tests
|
|
31
|
+
- Comprehensive security documentation in `docs/systemdesign/SECURITY.md`
|
|
32
|
+
|
|
33
|
+
## [2.0.0] - 2025-10-23
|
|
34
|
+
### Changed
|
|
35
|
+
- Removed pre-3.13 compatibility shims and migrated internal modules to native
|
|
36
|
+
Python 3.13 type syntax (e.g., ``list[str]`` and ``Sequence[str] | None``).
|
|
37
|
+
- Hardened GitHub token discovery by falling back to project ``.env`` files
|
|
38
|
+
when environment variables are unset.
|
|
39
|
+
- Surfaced workflow maintenance helpers as CLI commands
|
|
40
|
+
(``enable-all-workflows`` and ``delete-old-workflow-runs``) with optional
|
|
41
|
+
override parameters.
|
|
42
|
+
- Added explicit HTTP timeouts to GitHub workflow maintenance calls to avoid
|
|
43
|
+
hanging requests.
|
|
44
|
+
- Simplified CI matrix to run only on ``ubuntu-latest`` with the rolling
|
|
45
|
+
``3.x`` CPython release.
|
|
46
|
+
- Updated CI packaging checks to execute the CLI from the pipx binary directory
|
|
47
|
+
and via ``uv tool install --from dist/*.whl`` to confirm the built wheel
|
|
48
|
+
exposes the console entry point correctly.
|
|
49
|
+
- Refined packaging verification to leverage the pipx binary directory and
|
|
50
|
+
install the local wheel via ``uv tool install --from dist/*.whl``.
|
|
51
|
+
- Corrected the CI pipeline to use the current ``astral-sh/setup-uv@v6`` action
|
|
52
|
+
tag.
|
|
53
|
+
|
|
54
|
+
### Dependencies
|
|
55
|
+
- Bumped ``ruff`` to ``>=0.14.1`` and ``textual`` to ``>=6.4.0``.
|
|
56
|
+
- Declared ``requests`` as a runtime dependency to support GitHub API calls when
|
|
57
|
+
the package is installed.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## On session start
|
|
4
4
|
|
|
5
|
-
- Read following files from directory /media/srv-main
|
|
5
|
+
- Read following files from directory /media/srv-main-softdev/*/projects/softwarestack/systemprompts and keep their guidance in working memory:
|
|
6
6
|
- core_programming_solid.md
|
|
7
7
|
- bash_clean_architecture.md
|
|
8
8
|
- bash_clean_code.md
|
|
@@ -48,8 +48,8 @@ when writing or refracturing Python scripts, apply those Rules :
|
|
|
48
48
|
### Versioning & Releases
|
|
49
49
|
|
|
50
50
|
- Single source of truth for the package version is `pyproject.toml` (`[project].version`).
|
|
51
|
-
-
|
|
52
|
-
-
|
|
51
|
+
- Automation rewrites `src/keep_github_workflows_active/__init__conf__.py` from `pyproject.toml`, so runtime code imports generated constants instead of querying `importlib.metadata`.
|
|
52
|
+
- After updating project metadata (version, summary, URLs, authors) run `make test` (or `python -m scripts.test`) to regenerate the metadata module before committing.
|
|
53
53
|
- Tag releases `vX.Y.Z` and push tags; CI will build artifacts and publish when configured.
|
|
54
54
|
|
|
55
55
|
### Common Make Targets (Alphabetical)
|
|
@@ -83,9 +83,35 @@ when writing or refracturing Python scripts, apply those Rules :
|
|
|
83
83
|
## Architecture Overview
|
|
84
84
|
- apply python_clean_architecture.md
|
|
85
85
|
|
|
86
|
+
## Data Architecture Rules
|
|
87
|
+
|
|
88
|
+
This project follows strict data architecture rules using Pydantic models and Enums:
|
|
89
|
+
|
|
90
|
+
### Core Principles
|
|
91
|
+
1. **Pydantic at Boundaries**: All external data (API requests, file reads, env vars) is parsed into Pydantic models immediately upon entry
|
|
92
|
+
2. **Pydantic for Export**: All outputs use Pydantic's `.model_dump()` or `.model_dump_json()`
|
|
93
|
+
3. **No Internal Dicts**: Inside the application, never use raw dicts for structured data - use typed models
|
|
94
|
+
4. **Enums for Constants**: All string literals representing categories, statuses, or modes use Enums (prefer `IntEnum` for performance)
|
|
95
|
+
5. **Minimize Conversions**: Ideal flow is ONE parse at input, ONE dump at output
|
|
96
|
+
|
|
97
|
+
### Key Pydantic Models
|
|
98
|
+
- `GitHubRepository`, `GitHubWorkflow`, `GitHubWorkflowRun` - GitHub API responses
|
|
99
|
+
- `GitHubErrorResponse` - Error parsing with `from_response()` factory
|
|
100
|
+
- `PaginationLink` - Typed wrapper for pagination headers with `from_link_dict()` factory
|
|
101
|
+
- `EnvConfig` - Dynamic configuration with `__getattr__` for typed attribute access
|
|
102
|
+
|
|
103
|
+
### Enums
|
|
104
|
+
- `SkippedWorkflowType` (IntEnum) - Workflow types to skip during enablement
|
|
105
|
+
|
|
106
|
+
### Exceptions to Rules (Framework Requirements)
|
|
107
|
+
- `CLICK_CONTEXT_SETTINGS` dict - Required by Click framework API
|
|
108
|
+
- Pydantic `model_validator(mode="before")` returning dict - Required by Pydantic
|
|
109
|
+
- `sanitization.py` dict handling - Security utility designed for arbitrary dict sanitization
|
|
110
|
+
|
|
86
111
|
## Security & Configuration Tips
|
|
87
112
|
- `.env` is only for local tooling (CodeCov tokens, etc.); do not commit secrets.
|
|
88
113
|
- Rich logging should sanitize payloads before rendering once implemented.
|
|
114
|
+
- All logging calls use `sanitization.sanitize_message()` to prevent credential leakage.
|
|
89
115
|
|
|
90
116
|
## Translations (Docs)
|
|
91
117
|
|
|
@@ -102,106 +128,3 @@ when writing or refracturing Python scripts, apply those Rules :
|
|
|
102
128
|
## commit/push/GitHub policy
|
|
103
129
|
- run "make test" before any push to avoid lint/test breakage.
|
|
104
130
|
- after push, monitor errors in the github actions and try to correct the errors
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
# ONLY ON USER REQEST !!!! :
|
|
109
|
-
|
|
110
|
-
# 📘 Documentation Review & Enhancement Prompt
|
|
111
|
-
|
|
112
|
-
You are a **senior software developer specializing in code documentation and system design clarity**. Your task is to review, correct, and enhance all documentation (external and inline) across the codebase with the following principles and workflow.
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## **Principles**
|
|
117
|
-
|
|
118
|
-
* Documentation should emphasize **WHY** and **WHAT**, not just **HOW**.
|
|
119
|
-
* All docs must align with the system’s design-level documentation in `docs/systemdesign/*`.
|
|
120
|
-
* Every module, function, dataclass, and constant should be documented with clear intent, expected use, and system relevance.
|
|
121
|
-
* Documentation must be **authoritative, consistent, and actionable** for developers, maintainers, and system designers.
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
## **Workflow Checklist**
|
|
126
|
-
|
|
127
|
-
### **Step 1 – System Alignment**
|
|
128
|
-
|
|
129
|
-
* [ ] For every feature, function, configuration, dataclass, and constant:
|
|
130
|
-
|
|
131
|
-
* [ ] Verify alignment with `docs/systemdesign/*`.
|
|
132
|
-
* [ ] Document it in `docs/systemdesign/module_reference.md` using the template in `systemprompts/self_documenting.md`.
|
|
133
|
-
* [ ] Ensure consistent terminology and style with system docs.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
### **Step 2 – Module-Level Documentation**
|
|
138
|
-
|
|
139
|
-
* [ ] At the top of each module, create or update a **header block** that:
|
|
140
|
-
|
|
141
|
-
* [ ] States the **purpose and intention** of the module.
|
|
142
|
-
* [ ] Outlines its **contents** (functions, classes, constants).
|
|
143
|
-
* [ ] Explains how it connects to the **overall system design**.
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
### **Step 3 – Function Documentation**
|
|
148
|
-
|
|
149
|
-
For every function:
|
|
150
|
-
|
|
151
|
-
* [ ] Document **Why** it exists (its role in the system).
|
|
152
|
-
* [ ] Document **What** it does (conceptual description).
|
|
153
|
-
* [ ] Document **Inputs** (parameters, types, ranges, meaning).
|
|
154
|
-
* [ ] Document **Outputs** (return values, meaning, edge cases).
|
|
155
|
-
* [ ] Document **Side Effects** (state changes, I/O, mutations).
|
|
156
|
-
* [ ] Add or refine **doctests** that:
|
|
157
|
-
|
|
158
|
-
* [ ] Demonstrate common use cases.
|
|
159
|
-
* [ ] Cover edge cases.
|
|
160
|
-
* [ ] Illustrate not just mechanics but **intent**.
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
### **Step 4 – Dataclasses & Structures**
|
|
165
|
-
|
|
166
|
-
* [ ] For each dataclass:
|
|
167
|
-
|
|
168
|
-
* [ ] Document each field’s **expected value and type**.
|
|
169
|
-
* [ ] Explain **why the field exists**.
|
|
170
|
-
* [ ] Describe how it interacts with other parts of the system.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
### **Step 5 – Constants & Magic Numbers**
|
|
175
|
-
|
|
176
|
-
* [ ] For each constant or magic number:
|
|
177
|
-
|
|
178
|
-
* [ ] Explain **what it represents**.
|
|
179
|
-
* [ ] Explain **why this value was chosen**.
|
|
180
|
-
* [ ] Reference relevant standards, business rules, or domain logic.
|
|
181
|
-
* [ ] Replace unexplained “magic numbers” with named constants if possible.
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
### **Step 6 – Corrections & Enhancements**
|
|
186
|
-
|
|
187
|
-
* [ ] Remove or rewrite **obsolete documentation**.
|
|
188
|
-
* [ ] Correct **inaccurate or unclear explanations**.
|
|
189
|
-
* [ ] Fill in **missing documentation**.
|
|
190
|
-
* [ ] Reframe overly technical notes to emphasize **intent and reasoning**.
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## ✅ Definition of Done (DoD)
|
|
195
|
-
|
|
196
|
-
Documentation is considered **complete and high quality** when:
|
|
197
|
-
|
|
198
|
-
1. **System Consistency**: Every documented element aligns with `docs/systemdesign/*` and is included in `docs/systemdesign/module_reference.md`.
|
|
199
|
-
2. **Module Headers**: Each module has a clear header block with purpose, contents, and system role.
|
|
200
|
-
3. **Function Docs**: Every function has complete, accurate, and intent-driven documentation, including doctests for clarity and correctness.
|
|
201
|
-
4. **Dataclass Docs**: Every dataclass field is fully described with expected type, purpose, and relevance.
|
|
202
|
-
5. **Constants**: Every constant or magic number has a clear explanation or has been replaced with a meaningful named constant.
|
|
203
|
-
6. **Corrections**: All obsolete, unclear, or incorrect docs have been fixed.
|
|
204
|
-
7. **Completeness**: No feature, function, configuration, dataclass, or constant is left undocumented.
|
|
205
|
-
8. **Clarity**: Documentation emphasizes **WHY** and **WHAT**, making the codebase understandable without digging into implementation details.
|
|
206
|
-
|
|
207
|
-
---
|
|
@@ -3,7 +3,7 @@ SHELL := /bin/bash
|
|
|
3
3
|
PYTHON ?= python3
|
|
4
4
|
SCRIPTS ?= $(PYTHON) -m scripts
|
|
5
5
|
|
|
6
|
-
.PHONY: help install dev test run clean build push release coverage version-current bump bump-patch bump-minor bump-major menu
|
|
6
|
+
.PHONY: help install dev test run clean build push release coverage version-current bump bump-patch bump-minor bump-major dependencies dependencies-update menu
|
|
7
7
|
|
|
8
8
|
help:
|
|
9
9
|
$(SCRIPTS) help
|
|
@@ -50,5 +50,11 @@ build:
|
|
|
50
50
|
release:
|
|
51
51
|
$(SCRIPTS) release
|
|
52
52
|
|
|
53
|
+
dependencies:
|
|
54
|
+
$(SCRIPTS) dependencies
|
|
55
|
+
|
|
56
|
+
dependencies-update:
|
|
57
|
+
$(SCRIPTS) dependencies-update
|
|
58
|
+
|
|
53
59
|
menu:
|
|
54
60
|
$(SCRIPTS) menu
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: keep_github_workflows_active
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
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
|
|
@@ -16,20 +16,21 @@ Classifier: Programming Language :: Python :: 3
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
17
|
Classifier: Typing :: Typed
|
|
18
18
|
Requires-Python: >=3.13
|
|
19
|
-
Requires-Dist: lib-cli-exit-tools>=2.1.
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
19
|
+
Requires-Dist: lib-cli-exit-tools>=2.1.1
|
|
20
|
+
Requires-Dist: pydantic>=2.12.5
|
|
21
|
+
Requires-Dist: requests>=2.32.5
|
|
22
|
+
Requires-Dist: rich-click>=1.9.4
|
|
22
23
|
Provides-Extra: dev
|
|
23
|
-
Requires-Dist: bandit>=1.
|
|
24
|
+
Requires-Dist: bandit>=1.9.2; extra == 'dev'
|
|
24
25
|
Requires-Dist: build>=1.3.0; extra == 'dev'
|
|
25
|
-
Requires-Dist: codecov-cli>=11.2.
|
|
26
|
-
Requires-Dist: import-linter>=2.
|
|
27
|
-
Requires-Dist: pip-audit>=2.
|
|
28
|
-
Requires-Dist: pyright>=1.1.
|
|
26
|
+
Requires-Dist: codecov-cli>=11.2.6; extra == 'dev'
|
|
27
|
+
Requires-Dist: import-linter>=2.8; extra == 'dev'
|
|
28
|
+
Requires-Dist: pip-audit>=2.10.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: pyright>=1.1.407; extra == 'dev'
|
|
29
30
|
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
|
|
30
|
-
Requires-Dist: pytest>=
|
|
31
|
-
Requires-Dist: ruff>=0.14.
|
|
32
|
-
Requires-Dist: textual>=6.
|
|
31
|
+
Requires-Dist: pytest>=9.0.2; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff>=0.14.8; extra == 'dev'
|
|
33
|
+
Requires-Dist: textual>=6.8.0; extra == 'dev'
|
|
33
34
|
Requires-Dist: twine>=6.2.0; extra == 'dev'
|
|
34
35
|
Description-Content-Type: text/markdown
|
|
35
36
|
|
|
@@ -46,6 +47,9 @@ Description-Content-Type: text/markdown
|
|
|
46
47
|
[](https://codecov.io/gh/bitranox/keep_github_workflows_active)
|
|
47
48
|
[](https://qlty.sh/gh/bitranox/projects/keep_github_workflows_active)
|
|
48
49
|
[](https://snyk.io/test/github/bitranox/keep_github_workflows_active)
|
|
50
|
+
[](https://github.com/PyCQA/bandit)
|
|
51
|
+
|
|
52
|
+
> **CI cadence:** The GitHub Actions CI workflow runs automatically every Monday at 07:00 UTC, in addition to push and pull request triggers.
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
## Overview
|
|
@@ -182,6 +186,18 @@ kgwa.print_info()
|
|
|
182
186
|
```
|
|
183
187
|
|
|
184
188
|
|
|
189
|
+
## Security
|
|
190
|
+
|
|
191
|
+
All logging operations sanitize sensitive data before output to prevent credential
|
|
192
|
+
leakage. The automation redacts:
|
|
193
|
+
|
|
194
|
+
- GitHub personal access tokens (ghp_*, gho_*, etc.)
|
|
195
|
+
- Authorization headers and API keys
|
|
196
|
+
- Token-like patterns in error messages
|
|
197
|
+
|
|
198
|
+
For complete security documentation including incident response procedures, see
|
|
199
|
+
[SECURITY.md](docs/systemdesign/SECURITY.md).
|
|
200
|
+
|
|
185
201
|
## Further documentation
|
|
186
202
|
|
|
187
203
|
- [Install Guide](INSTALL.md)
|
|
@@ -189,4 +205,5 @@ kgwa.print_info()
|
|
|
189
205
|
- [Contributor Guide](CONTRIBUTING.md)
|
|
190
206
|
- [Changelog](CHANGELOG.md)
|
|
191
207
|
- [Module Reference](docs/systemdesign/module_reference.md)
|
|
208
|
+
- [Security Documentation](docs/systemdesign/SECURITY.md)
|
|
192
209
|
- [License](LICENSE)
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
[](https://codecov.io/gh/bitranox/keep_github_workflows_active)
|
|
12
12
|
[](https://qlty.sh/gh/bitranox/projects/keep_github_workflows_active)
|
|
13
13
|
[](https://snyk.io/test/github/bitranox/keep_github_workflows_active)
|
|
14
|
+
[](https://github.com/PyCQA/bandit)
|
|
15
|
+
|
|
16
|
+
> **CI cadence:** The GitHub Actions CI workflow runs automatically every Monday at 07:00 UTC, in addition to push and pull request triggers.
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
## Overview
|
|
@@ -147,6 +150,18 @@ kgwa.print_info()
|
|
|
147
150
|
```
|
|
148
151
|
|
|
149
152
|
|
|
153
|
+
## Security
|
|
154
|
+
|
|
155
|
+
All logging operations sanitize sensitive data before output to prevent credential
|
|
156
|
+
leakage. The automation redacts:
|
|
157
|
+
|
|
158
|
+
- GitHub personal access tokens (ghp_*, gho_*, etc.)
|
|
159
|
+
- Authorization headers and API keys
|
|
160
|
+
- Token-like patterns in error messages
|
|
161
|
+
|
|
162
|
+
For complete security documentation including incident response procedures, see
|
|
163
|
+
[SECURITY.md](docs/systemdesign/SECURITY.md).
|
|
164
|
+
|
|
150
165
|
## Further documentation
|
|
151
166
|
|
|
152
167
|
- [Install Guide](INSTALL.md)
|
|
@@ -154,4 +169,5 @@ kgwa.print_info()
|
|
|
154
169
|
- [Contributor Guide](CONTRIBUTING.md)
|
|
155
170
|
- [Changelog](CHANGELOG.md)
|
|
156
171
|
- [Module Reference](docs/systemdesign/module_reference.md)
|
|
172
|
+
- [Security Documentation](docs/systemdesign/SECURITY.md)
|
|
157
173
|
- [License](LICENSE)
|