-
Notifications
You must be signed in to change notification settings - Fork 16
feat: replace bash integration test script with Python version #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: replace bash integration test script with Python version #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces the bash-based integration test script (integration_test.sh) with a Python implementation (integration_test.py), modernizing the build infrastructure while maintaining the same functionality for building SCORE modules and tracking warning counts.
Changes:
- Removed the 356-line bash script and replaced it with a 393-line Python script
- Updated the GitHub Actions workflow to invoke the Python script instead of the bash script
- Maintained all existing functionality including module building, warning/deprecation counting, and build summary generation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/integration_test.sh | Complete removal of the bash-based integration test script |
| scripts/integration_test.py | New Python implementation providing the same integration test functionality with improved maintainability |
| .github/workflows/reusable_integration-build.yml | Updated workflow to call the Python script instead of the bash script |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Build command | ||
| cmd = ['bazel', 'build', '--verbose_failures', f'--config={config}'] + targets.split() | ||
| #cmd = ['ls'] # for testing purposes only, remove on PR |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line appears to be a commented-out testing artifact that should be removed before merging. It serves no purpose in production code and could cause confusion.
| #cmd = ['ls'] # for testing purposes only, remove on PR |
| old_identifier, old_link = get_identifier_and_link(old_module) | ||
|
|
||
| # Check if hash changed | ||
| hash_changed = old_module is None or old_module.hash != new_module.hash |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When old_module is None, accessing old_module.hash in the second part of the OR expression will fail if Python evaluates both sides. While the short-circuit evaluation prevents this in practice, the logic is clearer and safer if restructured to: hash_changed = old_module is None or (old_module.hash is not None and old_module.hash != new_module.hash) or use a conditional that explicitly handles the None case first.
| hash_changed = old_module is None or old_module.hash != new_module.hash | |
| hash_changed = old_module is None or ( | |
| old_module.hash is not None and old_module.hash != new_module.hash | |
| ) |
| # Add tools directory to path to import Module | ||
| script_dir = Path(__file__).parent | ||
| repo_root = script_dir.parent | ||
| sys.path.insert(0, str(repo_root / "tools")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's time to merge scripts and tools? Or should we just Sontag in follow up PRs?
|
|
||
|
|
||
| # Build target groups - maps module names to their Bazel targets | ||
| BUILD_TARGET_GROUPS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json? yaml?
|
The created documentation from the pull request is available at: docu-html |
No description provided.