Skip to content

Improvements: update docs, ci action, training script - #29

Merged
chaithubk merged 4 commits into
mainfrom
fixes
May 16, 2026
Merged

Improvements: update docs, ci action, training script#29
chaithubk merged 4 commits into
mainfrom
fixes

Conversation

@chaithubk

Copy link
Copy Markdown
Owner
  • Updated devcontainer.json and action.yml with minor configuration and workflow improvements.
  • Expanded and clarified documentation in YOCTO_INTEGRATION.md and docs/pipeline-internals.md, including new sections and edits for clarity.
  • Refactored src/train_and_convert.py:
    • Improved type annotations and type checking, especially in compute_stats and arr().
    • Added explicit casting and type ignore comments to resolve mypy and Pylance errors.
    • Cleaned up imports and removed redundant code.
    • Reformatted code for readability and compliance with line length limits.
  • No changes to runtime logic; all updates are for developer experience, documentation, and CI/dev environment consistency.

chaithubk added 3 commits May 16, 2026 20:02
- Updated devcontainer.json and action.yml with minor configuration and workflow improvements.
- Expanded and clarified documentation in YOCTO_INTEGRATION.md and docs/pipeline-internals.md, including new sections and edits for clarity.
- Refactored src/train_and_convert.py:
  - Improved type annotations and type checking, especially in compute_stats and arr().
  - Added explicit casting and type ignore comments to resolve mypy and Pylance errors.
  - Cleaned up imports and removed redundant code.
  - Reformatted code for readability and compliance with line length limits.
- No changes to runtime logic; all updates are for developer experience, documentation, and CI/dev environment consistency.
Create a cleaner, modular approach with separate scripts:

**New scripts created:**

1. **detect_model_changes.py** — Core detection logic
   - Analyzes git diffs for 15 model-affecting patterns
   - Returns JSON output for easy parsing
   - Reusable and testable

2. **detect_model_changes.sh** — Shell wrapper
   - Calls Python script and parses JSON output
   - Sets GitHub Actions outputs
   - Works in both CI and local environments

3. **format_model_regen_comment.py** — Comment generator
   - Generates formatted markdown PR comments
   - Takes comma-separated pattern list as input
   - Separated from workflow logic for clarity

**Updated workflow (detect-model-changes.yml):**
- Calls scripts instead of inline bash/JavaScript
- Much cleaner and easier to maintain
- All logic extracted to reusable modules
- Passes all linting checks (actionlint, shellcheck)

**Benefits:**
- ✓ Testable in isolation (`python scripts/detect_model_changes.py`)
- ✓ Reusable for other workflows or tools
- ✓ Easier to debug and maintain
- ✓ Follows software engineering best practices
- ✓ No YAML or shell complexity in the workflow itself
@chaithubk
chaithubk merged commit 9328372 into main May 16, 2026
7 checks passed
@chaithubk
chaithubk deleted the fixes branch May 16, 2026 21:12
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.

1 participant