Skip to content

feat(export): --split-size for AI-review-sized chunks - #19

Merged
astrapi69 merged 2 commits into
mainfrom
feat/export-split-size
Sep 1, 2026
Merged

feat(export): --split-size for AI-review-sized chunks#19
astrapi69 merged 2 commits into
mainfrom
feat/export-split-size

Conversation

@astrapi69

Copy link
Copy Markdown
Owner

Closes #18

Summary

  • Ports --split-size N to scripts/export_set.py, verbatim from
    feat(export): --split-size for AI-review-sized chunks alc-psychology#34 (the original implementation). The file
    was byte-identical between the two repos before this change (confirmed
    by diff), so no repo-specific adaptation was needed.
  • --split-size N splits a large set's export into multiple
    self-contained files (each carrying its own review_instructions
    copy plus part/of/lesson_count/total_lesson_count), instead
    of one huge file.
  • Ports the full 8-test suite from alc-psychology's
    tests/test_export_set.py: the three generic chunk_lessons() unit
    tests verbatim, and the five KNOWN_SLUG-based integration tests
    unchanged too, since this repo's known set (ansible-qe, 8 lessons)
    has the exact same lesson count as alc-psychology's known set - no
    number adjustments needed.

Gate results

  • make validate: PASS (2/2 sets)
  • make lint: PASS (self-test + engine-validate, 0 errors)
  • make lint-warnings: exit 0 (pre-existing content warnings only,
    unrelated to this change)
  • make stable-ids: unchanged (315/315 ids, 18/18 lessons, 0/0
    retired)
  • make audit: no issues
  • pytest: 101 -> 109 passed (8 new tests), 1 skipped both times
    (pre-existing, unrelated)

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

astrapisixtynine and others added 2 commits September 1, 2026 15:34
Ported verbatim from astrapi69/alc-psychology#34 (the original
implementation) - export_set.py was byte-identical between the two
repos before this change (confirmed by diff), so this is the same
file, no adaptation.

--split-size N splits a large set's export into multiple self-contained
files (each carrying its own review_instructions copy plus part/of/
lesson_count/total_lesson_count), instead of one huge file.

Ported the full 8-test suite from alc-psychology's test_export_set.py:
the three generic chunk_lessons() unit tests port verbatim, and the
five KNOWN_SLUG-based integration tests port unchanged too, since this
repo's known set (ansible-qe, 8 lessons) has the exact same lesson
count as alc-psychology's known set, so split_size=5 (5+3 split) and
split_size=3 (3+3+2 split) already exercise a real 2-/3-way split with
no number adjustments needed.

Gates: make validate PASS (2/2 sets), make lint PASS (self-test +
engine-validate, 0 errors), make lint-warnings exit 0 (pre-existing
content warnings only, unrelated), make stable-ids unchanged
(315/315 ids, 18/18 lessons, 0/0 retired), make audit no issues,
pytest 101 -> 109 passed (8 new tests), 1 skipped both times
(pre-existing, unrelated).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The exporter (with --split-size support) shipped on this branch
earlier this session with no make target and no doc update - only
reachable via a bare python3 invocation, and --split-size was covered
only by the script's own --help text.

Wraps scripts/export_set.py the same way 'make generate' wraps
scripts/generate_exercises.py - ARGS passthrough, e.g.
'make export ARGS="it-grundlagen --split-size 4"'.

Documented --split-size in README.md's 'Export a set for AI review'
section and in docs/export-set-usage.md / .de.md (usage table row,
worked example, self-contained-parts explanation, and the 'review
large sets in slices' bullet now points at --split-size).

Verified: 'make export ARGS="..."' runs the real exporter and writes
a valid file (ansible-qe, 8 lessons); --split-size + --out still
correctly errors without writing a file. make validate/lint/lint-
warnings/audit/stable-ids green, unchanged (18 lessons, 2 sets, 315
stable_ids untouched).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@astrapi69
astrapi69 merged commit f8c22e2 into main Sep 1, 2026
6 checks passed
@astrapi69
astrapi69 deleted the feat/export-split-size branch September 1, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(export): --split-size for AI-review-sized chunks

2 participants