Conversation
chaithubk
commented
May 16, 2026
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.
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.