Commits
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- CLAUDE.md line 30: clarified that ____ blanks are used only in units 2–3; units 4–6 use raise NotImplementedError exclusively (verified via grep of exercise files)
- lessons/02_read_and_inspect.md: added Note on dtype references before ## Your turn, teaching the pl.Date / pl.Int64 form used in exercise assertions (closes the gap between lesson prose and assertion syntax)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Records the editor-facing contracts for the pedagogy-redesign structure:
lesson→demo→exercise→solution loop, 1:1 unit numbering, data-derived
assertion constants, the blank/de-scaffolding conventions, and Polars-only
/ no-SQL constraints. README stays learner-facing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1. Written materials stand fully alone: lesson-by-lesson audit confirms every Polars method used in solutions (ex02–06) is taught in its paired lesson's Concept section before the 'Your turn' hand-off. Audit clean: all methods taught before use across 5 units.
2. Every exercise and demo file (demo02–06, ex02–06, solutions) states how to run it and how to interpret outcomes: docstrings document 'python exercises/exNN...' or 'python solutions/exNN...' and explain 'All checks passed.', 'AttributeError', and 'NotImplementedError' signals. Unit 1 has no demo/exercise .py by design (Data Wrangler is the hands-on surface; lesson 01 carries run-nothing instructions). AC2.1 sweep confirms all solution docstrings carry run command, outcome meaning, and README pointer.
3. Python fundamentals taught before use: lesson 00 covers running scripts, imports/aliasing, variables/print, f-strings, functions/__main__, method chaining, assertions as the grader; lesson 03 teaches &/| with parentheses callout. AC1.2 idiom audit green.
4. Every exercise preceded by complete, annotated, runnable worked example: demos 02–06 exist and run clean (SCDM verification PASSED; all 5 demos pass).
5. Scaffolding fades: ex02–03 use completion-style blanks (8 blanks each); ex04 uses pattern hints (11 TODO blocks); ex05 uses three-tier collapsible hints (15 details blocks in lesson 05, 9 in lesson content); ex06 is capstone with tier-1 hints (task statements + first-tier hints).
6. Each lesson contains SAS ↔ Polars contrastive mapping scoped to that lesson's operations. Verified: lessons 02–06 all contain mapping tables with parameter-level contrasts.
7. Lazy evaluation is exercised as required: ex06 contains TODO 6 (required lazy aggregation over partitioned dataset using scan_parquet + collect) with an assertion; solution passes it.
8. README contains no orphaned teaching: expression-model section (lesson 03 pointer), partitioning/lazy-evaluation sections (lesson 06 pointers), course-mechanics and how-to-run reference; cross-link sweep confirms all relative links resolve across 8 files (README + lessons 00–06).
9. All demos, exercises, and solutions run clean end-to-end: fresh venv (Python 3.11.14) runs data generation (10,000/14,221/199,613 exact counts), SCDM verification passed, all 5 demos clean, all exercises fail as documented (ex02–03 AttributeError '____'; ex04–06 NotImplementedError TODO 1; no SyntaxErrors), all 5 solutions pass 'All checks passed.', assertion parity confirmed for ex02–06, completed-exercise smoke tests pass.
Added missing "How to run the scripts" README pointers to ex04, ex05, and ex06
solution docstrings. All solutions now have consistent documentation with three
required elements: run command, outcome meaning, and README reference.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Added pl.read_parquet() to lesson 05's Supporting methods section to ensure it's
taught before the exercise uses it. Also fixed comment formatting in ex06 solution
to avoid false-positive regex match in audit.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove unmandated SAS analogy from misconception callout to match plan text verbatim
- Add mandated Further reading links (lazy API and parquet user-guide URLs)
- Remove method-chain pseudocode from TODO 6 nudge (breached no-pseudocode rule)
All three issues now resolved: callout matches plan exactly, both URLs present,
TODO 6 nudge contains only sanctioned guidance and step reference.
- TODO 2(b) Tier 3: trim to stop at filter() with placeholder comment, leaving unique()/height for learner (AC5.3)
- TODO 2(c) Tier 2: update pseudocode to reference covered_disp from 2(b) instead of inline build
- TODO 2(c) Tier 3: anti-join against covered_disp on full grain [PatID, RxDate, Rx] (CRITICAL: previous code had ColumnNotFoundError — enr_drug.select() doesn't contain RxDate/Rx columns)
- Verified: corrected Tier 3 code runs against real data → 9,953 uncovered dispensings (correct)
- All <details> blocks balanced and render correctly (15 total)
- Add .sort("ProviderID") before .head(3) in demo04 steps 2 and 3 to ensure
deterministic output across runs (AC4.2). Previously, group_by().agg()
returned unsorted groups, so .head(3) yielded different rows each run.
- Re-captured deterministic output and updated lesson 04's worked example
blocks (steps 2, 3, 5) to match fresh demo output exactly.
- Remove duplicate scaffolding-change announcement from lesson 04 "Your turn"
section (lines 258/260). Kept the plan's verbatim phrasing from line 260.
Stable values verified: 77697 providers, 6 years, 19970/1214655 (step 5 top row),
12149535 total remain correct.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Added further-reading link to Polars expressions reference (https://docs.pola.rs/api/python/stable/reference/expressions/index.html) in lesson 03 Your turn section per Plan Task 2 requirement
- Removed backticks from select() and filter() in SAS reflex check callout to match plan's mandatory wording anchor exactly (Important for phases 4-6 template copying)
Addresses code review issues:
1. Important: Missing further-reading link required by Plan Task 2 item 5
2. Minor: AC6.2 callout wording mismatch with plan's literal anchor
Verification:
- grep "docs.pola.rs" lessons/03_filter_select.md ✓ hits
- demo03.py exit 0 ✓
- solutions/ex03_filter_select.py passes ✓
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Change lesson 0 title from "Python survival kit" to "Lesson 0: Python survival kit"
- Change lesson 2 title from "Unit 2: Read and Inspect" to "Lesson 2: Read and Inspect"
(ensures consistent "Lesson N:" convention across all lessons)
- Trim README file tree to remove future lessons (03-06) and demos (03-06) that don't
exist yet; keep exercises/solutions 03-06 as they exist on disk
- Later phases will add their lessons and demos as they are implemented
This prevents broken links for users cloning at this commit (all listed files now exist).
This establishes the title convention early to prevent 6-way drift across later phases.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Line 213: changed ^^^^^^^ (7 carets) to ^^^^^^ (6 carets) to match the actual output shown in the code block above
- The caret marker should match the 'x == 5' portion of the assertion that failed
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completed brainstorming session. Design includes:
- Faded worked-example architecture: lessons/ + demos/ paired with exercises
- New Python survival-kit lesson covering silently assumed fundamentals
- Scaffolding decay from completion problems to near-independent capstone
- 7 implementation phases with scoped acceptance criteria
Exercise 1 taught a SQL query step that Data Wrangler does not support; it
is a low/no-code tool. Rework the exercise around the data grid, column
statistics panel, and filter/sort UI instead. Add the Git Bash Scripts/
activation path for Windows venvs, and replace requirements.txt with
pyproject.toml (pip install .).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This reverts commit 780650bb0fb08448c97940f2156eb6d923e0956d.
macOS ships an old system Python (3.9/3.10) that can't be upgraded.
Add Homebrew install instructions to prerequisites and a dedicated
troubleshooting entry with PATH export for Apple Silicon and Intel.
SAS analysts know PROC SQL. Show them how to run SQL against Parquet
files in the VS Code viewer before asking them to answer questions.
Each question now has a SQL hint showing the query they need.
All terminal commands are now unified bash blocks since Windows users
will use Git Bash. Removes PowerShell-specific instructions (execution
policy, Activate.ps1, py launcher, Get-ChildItem) and replaces the
prerequisites to list Git Bash for Windows.
- Data generator (data/generate_data.py) producing deterministic SCDM v8.2.2
synthetic data: 10K patients, 14K enrollment spans, ~200K dispensings
- 6 exercises (ex01 markdown + ex02-ex06 Python) with TODO blocks
- 5 solution scripts with assertions that verify correct output
- README with full workshop narrative: setup, SAS-to-Polars mapping,
expression model explanation, troubleshooting, partitioning/lazy eval notes
- SCDM verification script (scripts/verify_scdm.py)
- .gitignore excludes generated Parquet files, venv, and output dirs
- CLAUDE.md line 30: clarified that ____ blanks are used only in units 2–3; units 4–6 use raise NotImplementedError exclusively (verified via grep of exercise files)
- lessons/02_read_and_inspect.md: added Note on dtype references before ## Your turn, teaching the pl.Date / pl.Int64 form used in exercise assertions (closes the gap between lesson prose and assertion syntax)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Records the editor-facing contracts for the pedagogy-redesign structure:
lesson→demo→exercise→solution loop, 1:1 unit numbering, data-derived
assertion constants, the blank/de-scaffolding conventions, and Polars-only
/ no-SQL constraints. README stays learner-facing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1. Written materials stand fully alone: lesson-by-lesson audit confirms every Polars method used in solutions (ex02–06) is taught in its paired lesson's Concept section before the 'Your turn' hand-off. Audit clean: all methods taught before use across 5 units.
2. Every exercise and demo file (demo02–06, ex02–06, solutions) states how to run it and how to interpret outcomes: docstrings document 'python exercises/exNN...' or 'python solutions/exNN...' and explain 'All checks passed.', 'AttributeError', and 'NotImplementedError' signals. Unit 1 has no demo/exercise .py by design (Data Wrangler is the hands-on surface; lesson 01 carries run-nothing instructions). AC2.1 sweep confirms all solution docstrings carry run command, outcome meaning, and README pointer.
3. Python fundamentals taught before use: lesson 00 covers running scripts, imports/aliasing, variables/print, f-strings, functions/__main__, method chaining, assertions as the grader; lesson 03 teaches &/| with parentheses callout. AC1.2 idiom audit green.
4. Every exercise preceded by complete, annotated, runnable worked example: demos 02–06 exist and run clean (SCDM verification PASSED; all 5 demos pass).
5. Scaffolding fades: ex02–03 use completion-style blanks (8 blanks each); ex04 uses pattern hints (11 TODO blocks); ex05 uses three-tier collapsible hints (15 details blocks in lesson 05, 9 in lesson content); ex06 is capstone with tier-1 hints (task statements + first-tier hints).
6. Each lesson contains SAS ↔ Polars contrastive mapping scoped to that lesson's operations. Verified: lessons 02–06 all contain mapping tables with parameter-level contrasts.
7. Lazy evaluation is exercised as required: ex06 contains TODO 6 (required lazy aggregation over partitioned dataset using scan_parquet + collect) with an assertion; solution passes it.
8. README contains no orphaned teaching: expression-model section (lesson 03 pointer), partitioning/lazy-evaluation sections (lesson 06 pointers), course-mechanics and how-to-run reference; cross-link sweep confirms all relative links resolve across 8 files (README + lessons 00–06).
9. All demos, exercises, and solutions run clean end-to-end: fresh venv (Python 3.11.14) runs data generation (10,000/14,221/199,613 exact counts), SCDM verification passed, all 5 demos clean, all exercises fail as documented (ex02–03 AttributeError '____'; ex04–06 NotImplementedError TODO 1; no SyntaxErrors), all 5 solutions pass 'All checks passed.', assertion parity confirmed for ex02–06, completed-exercise smoke tests pass.
- Remove unmandated SAS analogy from misconception callout to match plan text verbatim
- Add mandated Further reading links (lazy API and parquet user-guide URLs)
- Remove method-chain pseudocode from TODO 6 nudge (breached no-pseudocode rule)
All three issues now resolved: callout matches plan exactly, both URLs present,
TODO 6 nudge contains only sanctioned guidance and step reference.
- TODO 2(b) Tier 3: trim to stop at filter() with placeholder comment, leaving unique()/height for learner (AC5.3)
- TODO 2(c) Tier 2: update pseudocode to reference covered_disp from 2(b) instead of inline build
- TODO 2(c) Tier 3: anti-join against covered_disp on full grain [PatID, RxDate, Rx] (CRITICAL: previous code had ColumnNotFoundError — enr_drug.select() doesn't contain RxDate/Rx columns)
- Verified: corrected Tier 3 code runs against real data → 9,953 uncovered dispensings (correct)
- All <details> blocks balanced and render correctly (15 total)
- Add .sort("ProviderID") before .head(3) in demo04 steps 2 and 3 to ensure
deterministic output across runs (AC4.2). Previously, group_by().agg()
returned unsorted groups, so .head(3) yielded different rows each run.
- Re-captured deterministic output and updated lesson 04's worked example
blocks (steps 2, 3, 5) to match fresh demo output exactly.
- Remove duplicate scaffolding-change announcement from lesson 04 "Your turn"
section (lines 258/260). Kept the plan's verbatim phrasing from line 260.
Stable values verified: 77697 providers, 6 years, 19970/1214655 (step 5 top row),
12149535 total remain correct.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Added further-reading link to Polars expressions reference (https://docs.pola.rs/api/python/stable/reference/expressions/index.html) in lesson 03 Your turn section per Plan Task 2 requirement
- Removed backticks from select() and filter() in SAS reflex check callout to match plan's mandatory wording anchor exactly (Important for phases 4-6 template copying)
Addresses code review issues:
1. Important: Missing further-reading link required by Plan Task 2 item 5
2. Minor: AC6.2 callout wording mismatch with plan's literal anchor
Verification:
- grep "docs.pola.rs" lessons/03_filter_select.md ✓ hits
- demo03.py exit 0 ✓
- solutions/ex03_filter_select.py passes ✓
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Change lesson 0 title from "Python survival kit" to "Lesson 0: Python survival kit"
- Change lesson 2 title from "Unit 2: Read and Inspect" to "Lesson 2: Read and Inspect"
(ensures consistent "Lesson N:" convention across all lessons)
- Trim README file tree to remove future lessons (03-06) and demos (03-06) that don't
exist yet; keep exercises/solutions 03-06 as they exist on disk
- Later phases will add their lessons and demos as they are implemented
This prevents broken links for users cloning at this commit (all listed files now exist).
This establishes the title convention early to prevent 6-way drift across later phases.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completed brainstorming session. Design includes:
- Faded worked-example architecture: lessons/ + demos/ paired with exercises
- New Python survival-kit lesson covering silently assumed fundamentals
- Scaffolding decay from completion problems to near-independent capstone
- 7 implementation phases with scoped acceptance criteria
Exercise 1 taught a SQL query step that Data Wrangler does not support; it
is a low/no-code tool. Rework the exercise around the data grid, column
statistics panel, and filter/sort UI instead. Add the Git Bash Scripts/
activation path for Windows venvs, and replace requirements.txt with
pyproject.toml (pip install .).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Data generator (data/generate_data.py) producing deterministic SCDM v8.2.2
synthetic data: 10K patients, 14K enrollment spans, ~200K dispensings
- 6 exercises (ex01 markdown + ex02-ex06 Python) with TODO blocks
- 5 solution scripts with assertions that verify correct output
- README with full workshop narrative: setup, SAS-to-Polars mapping,
expression model explanation, troubleshooting, partitioning/lazy eval notes
- SCDM verification script (scripts/verify_scdm.py)
- .gitignore excludes generated Parquet files, venv, and output dirs