Skip to content

Commit 248ce37

Browse files
committed
Merge Mac Mini progress work into D2 card-generator trunk
Brings together two parallel tracks since 4070bfa: - Local track (D1/D2): pydantic card schemas + CardGenerator Protocol + OllamaGenerator + Bedrock backend with concurrency and region fallback - Mac Mini track: course material discovery workflow, progress summary, release metadata gating, release tooling, config hardening Both branches shared no overlapping files by construction; this merge is a true join of two independent feature streams. # Conflicts: # .github/workflows/publish.yml # .gitignore
2 parents dc0eb71 + c2bacf1 commit 248ce37

47 files changed

Lines changed: 3198 additions & 163 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ jobs:
5151
- name: Audit dependencies for known vulnerabilities
5252
run: uv audit
5353

54+
release-consistency:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58+
- uses: astral-sh/setup-uv@e4db8464a088ece1b920f60402e813ea4de65b8f # v4
59+
with:
60+
python-version: "3.12"
61+
- run: python scripts/check-release-consistency.py
62+
5463
test:
5564
runs-on: ubuntu-latest
5665
strategy:
@@ -61,5 +70,32 @@ jobs:
6170
- uses: astral-sh/setup-uv@e4db8464a088ece1b920f60402e813ea4de65b8f # v4
6271
with:
6372
python-version: ${{ matrix.python-version }}
64-
- run: uv sync --all-packages --extra dev --extra test
65-
- run: uv run pytest --tb=short -m "not integration" --cov=packages --cov-report=term-missing
73+
- run: uv sync --all-packages --group dev
74+
- run: uv run pytest --tb=short -m "not integration and not e2e" --cov=packages --cov-report=term-missing
75+
76+
build:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
80+
- uses: astral-sh/setup-uv@e4db8464a088ece1b920f60402e813ea4de65b8f # v4
81+
with:
82+
python-version: "3.12"
83+
- run: ./scripts/build-release.sh
84+
85+
install-smoke:
86+
runs-on: ubuntu-latest
87+
needs: build
88+
steps:
89+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90+
- uses: astral-sh/setup-uv@e4db8464a088ece1b920f60402e813ea4de65b8f # v4
91+
with:
92+
python-version: "3.12"
93+
- run: ./scripts/build-release.sh
94+
- name: Install built wheel without optional extras
95+
run: |
96+
uv venv /tmp/studyctl-smoke
97+
uv pip install --python /tmp/studyctl-smoke/bin/python dist/studyctl-*.whl
98+
- name: Smoke-test installed CLI entry points
99+
run: |
100+
export PATH="/tmp/studyctl-smoke/bin:$PATH"
101+
./scripts/smoke-installed-cli.sh

‎.github/workflows/pre-release.yml‎

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,55 @@ on:
1111
required: false
1212

1313
jobs:
14+
local-quality-gate:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 20
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: astral-sh/setup-uv@v4
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install workspace dependencies
25+
run: uv sync --all-packages --group dev
26+
27+
- name: Release consistency
28+
run: |
29+
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
30+
python scripts/check-release-consistency.py \
31+
--tag "${GITHUB_REF_NAME}" \
32+
--require-release-notes \
33+
--allow-formula-lag
34+
else
35+
python scripts/check-release-consistency.py
36+
fi
37+
38+
- name: Ruff
39+
run: |
40+
uv run ruff check .
41+
uv run ruff format --check .
42+
43+
- name: Pyright
44+
run: |
45+
cd packages/agent-session-tools && uv run pyright src/
46+
cd ../studyctl && uv run pyright src/
47+
48+
- name: Unit tests
49+
run: uv run pytest --tb=short -m "not integration and not e2e" --cov=packages --cov-report=term-missing
50+
51+
- name: Build release package
52+
run: ./scripts/build-release.sh
53+
54+
- name: Install smoke test
55+
run: |
56+
uv venv /tmp/studyctl-smoke
57+
uv pip install --python /tmp/studyctl-smoke/bin/python dist/studyctl-*.whl
58+
export PATH="/tmp/studyctl-smoke/bin:$PATH"
59+
./scripts/smoke-installed-cli.sh
60+
1461
upgrade-path:
62+
needs: local-quality-gate
1563
runs-on: ubuntu-latest
1664
timeout-minutes: 15
1765
steps:
@@ -91,7 +139,9 @@ jobs:
91139
# independently. To block publish on failure, add this as a required
92140
# status check in GitHub branch protection rules.
93141
gate:
94-
needs: upgrade-path
142+
needs:
143+
- local-quality-gate
144+
- upgrade-path
95145
runs-on: ubuntu-latest
96146
steps:
97147
- run: echo "Pre-release gate passed"

‎.github/workflows/publish.yml‎

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,48 +24,93 @@ permissions:
2424
contents: write
2525

2626
jobs:
27-
release:
27+
quality-gate:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v4
31-
with:
32-
fetch-depth: 0
3331

34-
- name: Generate changelog for release
35-
uses: orhun/git-cliff-action@v4
36-
id: changelog
32+
- name: Install uv
33+
uses: astral-sh/setup-uv@v4
3734
with:
38-
config: cliff.toml
39-
args: --latest --strip header
35+
python-version: "3.12"
4036

41-
- name: Create GitHub Release
42-
uses: softprops/action-gh-release@v2
43-
with:
44-
body: ${{ steps.changelog.outputs.content }}
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
- name: Install workspace dependencies
38+
run: uv sync --all-packages --group dev
39+
40+
- name: Release consistency
41+
run: |
42+
python scripts/check-release-consistency.py \
43+
--tag "${GITHUB_REF_NAME}" \
44+
--require-release-notes \
45+
--allow-formula-lag
46+
47+
- name: Ruff
48+
run: |
49+
uv run ruff check .
50+
uv run ruff format --check .
51+
52+
- name: Pyright
53+
run: |
54+
cd packages/agent-session-tools && uv run pyright src/
55+
cd ../studyctl && uv run pyright src/
56+
57+
- name: Unit tests
58+
run: uv run pytest --tb=short -m "not integration and not e2e" --cov=packages --cov-report=term-missing
4759

4860
build:
49-
needs: release
61+
needs: quality-gate
5062
runs-on: ubuntu-latest
5163
steps:
5264
- uses: actions/checkout@v4
5365

5466
- name: Install uv
5567
uses: astral-sh/setup-uv@v4
68+
with:
69+
python-version: "3.12"
5670

5771
- name: Build package
5872
run: ./scripts/build-release.sh
5973

74+
- name: Smoke-test built wheel without optional extras
75+
run: |
76+
uv venv /tmp/studyctl-smoke
77+
uv pip install --python /tmp/studyctl-smoke/bin/python dist/studyctl-*.whl
78+
export PATH="/tmp/studyctl-smoke/bin:$PATH"
79+
./scripts/smoke-installed-cli.sh
80+
6081
- name: Upload artifact
6182
uses: actions/upload-artifact@v4
6283
with:
6384
name: dist
6485
path: dist/
6586

66-
publish:
87+
release:
6788
needs: build
6889
runs-on: ubuntu-latest
90+
steps:
91+
- uses: actions/checkout@v4
92+
with:
93+
fetch-depth: 0
94+
95+
- name: Generate changelog for release
96+
uses: orhun/git-cliff-action@v4
97+
id: changelog
98+
with:
99+
config: cliff.toml
100+
args: --latest --strip header
101+
102+
- name: Create GitHub Release
103+
uses: softprops/action-gh-release@v2
104+
with:
105+
body: ${{ steps.changelog.outputs.content }}
106+
env:
107+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108+
109+
publish:
110+
needs:
111+
- build
112+
- release
113+
runs-on: ubuntu-latest
69114
permissions:
70115
contents: read
71116
id-token: write # OIDC for PyPI trusted publishing
@@ -118,6 +163,13 @@ jobs:
118163
sed -i '/^ url .*studyctl-/{n;s|sha256 ".*"|sha256 "'"${SHA}"'"|;}' Formula/studyctl.rb
119164
grep -A1 'url .*studyctl' Formula/studyctl.rb
120165
166+
- name: Verify formula consistency
167+
run: |
168+
python scripts/check-release-consistency.py \
169+
--tag "${GITHUB_REF_NAME}" \
170+
--require-release-notes \
171+
--require-formula-current
172+
121173
- name: Commit and push formula
122174
run: |
123175
VERSION="${GITHUB_REF_NAME#v}"

‎.gitignore‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ site/
479479
docs/internal/
480480
docs/local_repo_docs/
481481
docs/plans/
482-
docs/architecture/
482+
docs/architecture/*
483+
!docs/architecture/
484+
!docs/architecture/adapter-pattern-notebooklm.md
483485

484486
# Demo recordings (large, local-only)
485487
demos/
@@ -502,3 +504,6 @@ docs/brainstorms/
502504

503505
# Benchmark output (large regenerable artefacts — keep local)
504506
benchmarks/d2-output/
507+
508+
# Stray mock path artefacts from tests that stringify MagicMock path objects
509+
<MagicMock id='*'>

‎.secrets.baseline‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)