chore: regenerate only changed colab notebooks - #838
Conversation
Pass changed notebook sources through the existing generator filter to avoid unrelated cell ID churn. Remove stale generated notebooks when sources are deleted or renamed. Closes #413 Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Greptile SummarySelectively regenerates Colab notebooks affected by source changes while preserving full regeneration for manual runs.
|
| Filename | Overview |
|---|---|
| .github/workflows/check-colab-notebooks.yml | Selects changed and deleted sources safely, removes stale generated outputs, and detects newly generated untracked notebooks. |
| Makefile | Adds optional NUL-delimited selective generation while retaining the existing full-generation behavior. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Workflow starts] --> B{Valid base SHA?}
B -->|No| C[Regenerate all Colab notebooks]
B -->|Yes| D[Collect changed and deleted sources]
D --> E[Remove outputs for deleted sources]
E --> F[Regenerate changed sources]
C --> G[Mark untracked outputs intent-to-add]
F --> G
G --> H{Meaningful generated diff?}
H -->|Yes| I[Fail synchronization check]
H -->|No| J[Pass]
Reviews (5): Last reviewed commit: "Merge branch 'main' into andreatnvidia/c..." | Re-trigger Greptile
|
Thanks for putting this together, @andreatnvidia — this is a clean, well-scoped fix for a genuinely annoying problem (unrelated cell-ID churn drowning real diffs). SummaryThe PR makes the Colab-notebook check regenerate only the notebooks whose FindingsSuggestions — Take it or leave it
What Looks Good
Note: this changeset touches only the workflow YAML and the Makefile — no Python — so the ruff lint/format step and the interface→engine→config import invariants don't apply, and there's no unit-test surface to cover (the PR description confirms this). VerdictShip it (with nits) — the logic is correct and the fallbacks are safe. The findings above are all optional polish; none block merge. This review was generated by an AI assistant. |
|
Thanks for putting this together, @andreatnvidia! SummaryThis PR selectively regenerates Colab notebooks from the source files changed in the relevant PR or push range, removes stale generated notebooks for deletions and renames, and preserves full regeneration for manual runs. The implementation matches the stated intent and keeps the existing generator interface small by forwarding the optional FindingsI validated the existing unresolved P1 review thread and agree it should be addressed before merge; I am not opening a duplicate finding. I found no additional correctness, design, or maintainability issues beyond that thread. What Looks Good
VerdictNeeds changes — address the existing unresolved P1 so newly generated, untracked notebooks cannot escape the final diff check. Once that is fixed, I do not see another blocker. This review was generated by an AI assistant. |
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
Signed-off-by: Andre Manoel <amanoel@nvidia.com>
|
Thanks, @nabinchha. I addressed the original unresolved P1 in |
📋 Summary
Regenerates only Colab notebooks whose source files changed, preventing unrelated random cell ID churn from appearing in pull requests. Deleted and renamed sources also remove their stale generated notebooks.
🔗 Related Issue
Closes #413
🔄 Changes
FILESlist from the Make target to the generator's existing--filesoption.🧪 Testing
.venv/bin/ruff check --fix ..venv/bin/ruff format ..venv/bin/pytest packages/data-designer-config/tests- 643 passed.venv/bin/pytest packages/data-designer-engine/tests- 2,209 passed.venv/bin/pytest packages/data-designer/tests- 1,105 passed, 1 skipped✅ Checklist