Skip to content

Add workbook catalog, validation, and scrubbing infrastructure - #1

Merged
aappuupatell merged 1 commit into
mainfrom
claude/repository-review-kh6qz5
Sep 1, 2026
Merged

aappuupatell merged 1 commit into
mainfrom
claude/repository-review-kh6qz5

Conversation

@aappuupatell

Copy link
Copy Markdown
Owner

This PR establishes a comprehensive infrastructure for managing and validating the workbook template repository, including automated catalog generation, resource ID scrubbing, and CI/CD validation.

Summary

Adds tooling and documentation to improve the repository's usability and maintainability:

  • Generates an auto-indexed catalog of all 824 workbooks across 14 categories
  • Implements validation to ensure workbooks are properly formatted and don't leak environment-specific resource IDs
  • Provides scripts to scrub subscription IDs, resource groups, and workspace names from exported workbooks
  • Updates README with category overview and contribution guidelines
  • Adds GitHub Actions workflow for automated validation on push/PR

Key Changes

New Scripts:

  • scripts/build_catalog.py - Generates CATALOG.md with workbook titles (derived from content), parameters, and step counts
  • scripts/validate_workbooks.py - Validates JSON structure, version compatibility, and checks for leaked resource IDs
  • scripts/scrub_resource_ids.py - Replaces environment-specific Azure resource paths with neutral placeholders (subscription GUIDs, resource group names, workspace names)

Documentation:

  • CATALOG.md - Auto-generated index of all workbooks with derived titles and metadata
  • CONTRIBUTING.md - Guidelines for adding new workbooks, including the scrubbing workflow
  • Updated README.md - Reorganized with category table and link to catalog

Configuration:

  • .github/workflows/validate.yml - CI gate that validates workbooks and checks for stale catalog/placeholders
  • .editorconfig - Standardizes formatting (UTF-8, LF line endings, 2-space JSON indent)
  • .gitattributes - Configures GitHub to treat .workbook files as JSON for syntax highlighting

Workbook Updates:

  • Applied scrub_resource_ids.py to 40+ workbooks to replace leaked subscription IDs, resource groups, and workspace names with placeholders
  • Removed leading comments from JSON files (e.g., DataConnectorCost.workbook)

Implementation Details

  • Title derivation prioritizes unconditional markdown headings, then any heading, then first sentence of text content
  • Resource ID scrubbing handles both plain (/subscriptions/<guid>/...) and URL-encoded (%2Fsubscriptions%2F...) forms
  • Validation enforces "version": "Notebook/1.0" and presence of items array as minimum requirements
  • Scripts support both full repository scans and targeted file validation
  • All scripts include --check mode for CI integration without modifying files

https://claude.ai/code/session_018fsKr7G5DH3d8uyFxBjMnb

- Replace real subscription, resource group and workspace identifiers in
  59 workbooks with neutral placeholders; replace two personal e-mail
  addresses used as parameter defaults with user@example.com
- Fix DataConnectorCost.workbook, which began with a // comment and was
  not valid JSON; the description now lives in its first text step
- Add scripts/validate_workbooks.py (JSON validity, Notebook/1.0 shape,
  leaked resource IDs), scripts/scrub_resource_ids.py and
  scripts/build_catalog.py, all standard-library Python
- Add a GitHub Actions workflow that runs the three checks on every PR
- Generate CATALOG.md listing all 824 workbooks with derived titles and
  top-level parameters so same-named exports can be told apart
- Rewrite README (files are .workbook, not .json; category table with
  counts; import steps; tooling), add CONTRIBUTING.md, .gitattributes
  (highlight .workbook as JSON) and .editorconfig

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fsKr7G5DH3d8uyFxBjMnb
@aappuupatell
aappuupatell merged commit 3d5224d into main Sep 1, 2026
1 check passed
@aappuupatell
aappuupatell deleted the claude/repository-review-kh6qz5 branch September 2, 2026 13:23
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.

2 participants