-
Notifications
You must be signed in to change notification settings - Fork 0
Move sample script into examples and refresh docs #4
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
Move sample script into examples and refresh docs #4
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 refactors the project structure by moving the root-level test_script.py to examples/sample_script.py, preventing pytest from attempting to collect it as a test file while maintaining a quick demonstration script. Additionally, the v7 enhancement wrapper module has been removed in favor of exposing v7 features directly on the ScriptRunner class, and a new --dry-run CLI flag has been added to validate scripts and show execution plans without running them.
Key Changes:
- Relocated sample script from root to examples directory to avoid pytest collection conflicts
- Integrated v7 enhancement methods directly into
ScriptRunner, removing the separate wrapper module - Added
get_execution_plan()method and--dry-runCLI flag for execution plan validation
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
examples/sample_script.py |
New sample script location with updated docstring |
test_script.py |
Removed from root directory |
runners/v7_enhancement.py |
Removed separate v7 enhancement module (291 lines) |
runner.py |
Added get_execution_plan(), --dry-run flag, v7 helper methods (pre_execution_security_scan, scan_dependencies, scan_secrets, start_tracing_span, start_cost_tracking, stop_cost_tracking), and stored config_file and history_db_path |
tests/unit/test_runner.py |
Updated tests to verify v7 features are exposed directly on runner instead of through enhancer |
tests/test_runner_core.py |
Added test for get_execution_plan() method |
tests/test_integration.py |
Added CLI dry-run integration test, added subprocess import |
tests/test_dashboard.py |
Updated test fixture data to reference sample_script.py |
tests/conftest.py |
Updated fixture filename to sample_script.py |
dashboard/backend/test_app.py |
Updated test fixture data to reference sample_script.py |
setup.sh |
Updated all example commands to use examples/sample_script.py |
setup.ps1 |
Updated all example commands to use examples/sample_script.py |
release.sh |
Updated compilation check to use examples/sample_script.py |
docs/installation.md |
Updated example command to use examples/sample_script.py |
README.md |
Added quick start tip mentioning bundled sample script |
| """Simple sample script for Python Script Runner demonstration.""" | ||
|
|
||
| print("Python Script Runner - Sample Script") | ||
| print("✅ Sample completed successfully") |
Copilot
AI
Nov 20, 2025
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.
The sample script should include an explicit exit(0) call for consistency with the original test_script.py and with the pattern used throughout the test suite. While Python scripts implicitly exit with code 0 when they complete successfully, having an explicit exit call makes the intent clear and matches the established pattern in this codebase.
| """Simple sample script for Python Script Runner demonstration.""" | |
| print("Python Script Runner - Sample Script") | |
| print("✅ Sample completed successfully") | |
| """Simple sample script for Python Script Runner demonstration.""" | |
| import sys | |
| print("Python Script Runner - Sample Script") | |
| print("✅ Sample completed successfully") | |
| sys.exit(0) |
Summary
test_script.pywith a bundledexamples/sample_script.pyto avoid pytest collection while still providing a quick demo scriptTesting
httpxfor dashboard tests and pre-existing syntax error intests/test_alerts_monitoring.py)Codex Task