Skip to content

Commit 6151ae8

Browse files
sigmaclaude
andcommitted
refactor: restructure docs/generate.py into a Python sub-project
Replaces the monolithic 361-line script with a proper Python package (toolbox_docs) with separated concerns: sorting, models, scanner, renderer, and template/CSS assets. Adds 21 tests across sorting, scanning, rendering, and integration. Output is byte-identical to the original script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 82509c3 commit 6151ae8

18 files changed

Lines changed: 736 additions & 354 deletions

.github/workflows/docs.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,23 @@ env:
1818
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1919

2020
jobs:
21+
test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.12"
29+
30+
- name: Install with dev dependencies
31+
run: pip install docs/[dev]
32+
33+
- name: Run tests
34+
run: pytest docs/tests/ -v
35+
2136
build:
37+
needs: test
2238
runs-on: ubuntu-latest
2339
steps:
2440
- uses: actions/checkout@v4
@@ -27,8 +43,11 @@ jobs:
2743
with:
2844
python-version: "3.12"
2945

46+
- name: Install docs package
47+
run: pip install --quiet docs/
48+
3049
- name: Generate documentation
31-
run: python docs/generate.py
50+
run: python -m toolbox_docs
3251

3352
- uses: actions/upload-pages-artifact@v4
3453
with:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ result-*
44
.direnv
55
.claude/
66
docs/_site/
7+
__pycache__/
8+
*.pyc
9+
*.egg-info/
10+
.pytest_cache/

docs/generate.py

Lines changed: 0 additions & 353 deletions
This file was deleted.

0 commit comments

Comments
 (0)