Issue #33: add executable onboarding and smoke-test scripts for the core repo#34
Issue #33: add executable onboarding and smoke-test scripts for the core repo#34
Conversation
Review Summary by QodoAdd executable example runner and improve documentation
WalkthroughsDescription• Added make example target to simplify running examples • Created run_example.sh script for automated example execution • Fixed executable path in plotting tutorial notebook • Restructured README to prioritize examples section • Corrected typos and path references in documentation Diagramflowchart LR
A["Makefile"] -->|"adds example target"| B["make example EXAMPLE=N"]
C["run_example.sh"] -->|"executes example"| B
B -->|"builds & runs"| D["GORILLA executable"]
D -->|"generates output"| E["Plot results"]
F["plotting_tutorial.ipynb"] -->|"fixes paths"| D
G["README.md"] -->|"restructures sections"| H["Examples first"]
File Changes1. Makefile
|
Code Review by Qodo
|
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
| # Check if executable exists | ||
| if [ ! -f "BUILD/test_gorilla_main.x" ]; then | ||
| echo "Error: Executable BUILD/SRC/test_gorilla_main.x not found. Please run 'make build' first." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Running example $EXAMPLE_NUM from $EXAMPLE_DIR" | ||
| cd "$EXAMPLE_DIR" | ||
| ./test_gorilla_main.x | ||
|
|
There was a problem hiding this comment.
1. run_example.sh runs wrong binary 📎 Requirement gap ☼ Reliability
The script checks for BUILD/test_gorilla_main.x but then executes ./test_gorilla_main.x inside the example directory without creating/linking it, so the documented make example EXAMPLE=<n> bootstrap is likely to fail from a clean checkout. This violates the requirement that the single entrypoint builds and runs an example to completion.
Agent Prompt
## Issue description
`run_example.sh` checks for `BUILD/test_gorilla_main.x` but then runs `./test_gorilla_main.x` within the example directory without ensuring that file exists.
## Issue Context
The README documents `make example EXAMPLE=<n>` as an onboarding bootstrap command, and the Makefile calls `bash run_example.sh $(EXAMPLE)`. For a clean checkout, the script must run the built executable reliably.
## Fix Focus Areas
- run_example.sh[21-36]
- Makefile[29-35]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| echo "Running example $EXAMPLE_NUM from $EXAMPLE_DIR" | ||
| cd "$EXAMPLE_DIR" | ||
| ./test_gorilla_main.x | ||
|
|
||
| if [ $? -eq 0 ]; then | ||
| echo "Example $EXAMPLE_NUM completed successfully" | ||
| else | ||
| echo "Error: Example $EXAMPLE_NUM failed" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Plotting results for example $EXAMPLE_NUM from $EXAMPLE_DIR" | ||
| cd ../../PYTHON | ||
| python3 plot_example_$EXAMPLE_NUM.py No newline at end of file |
There was a problem hiding this comment.
2. No expected-output validation 📎 Requirement gap ☼ Reliability
run_example.sh does not check for expected orbit/output artifacts after the example run (or after plotting), so it can report success without verifying outputs exist. This violates the requirement that onboarding/smoke-test entrypoints explicitly detect missing outputs and fail nonzero.
Agent Prompt
## Issue description
The new onboarding runner does not validate that the example produced the expected output files/artifacts, and the plotting step is not producing a deterministic artifact that can be checked.
## Issue Context
Compliance requires deterministic, self-checking smoke-test behavior that fails nonzero when outputs are missing. The current runner only checks the executable exit code and then launches interactive plotting.
## Fix Focus Areas
- run_example.sh[27-40]
- PYTHON/plot_example_1.py[20-56]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| #!/bin/bash | ||
|
|
||
| # Script to run a GORILLA example | ||
| # Usage: ./run_example.sh <example_number> | ||
|
|
There was a problem hiding this comment.
3. Runner not under scripts/ 📎 Requirement gap ⚙ Maintainability
The added smoke-test runner is placed at repo root (run_example.sh) rather than under EXAMPLES/ or scripts/ as required. This does not meet the checklist’s location requirement for repo-native smoke-test runners.
Agent Prompt
## Issue description
The smoke-test/onboarding runner script is not located under `EXAMPLES/` or `scripts/`.
## Issue Context
The compliance checklist explicitly requires one or two smoke-test runners to live under `EXAMPLES/` or `scripts/`.
## Fix Focus Areas
- run_example.sh[1-40]
- Makefile[29-35]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Changes:
run_example.sh. Not sure if this is best practice.plotting_tutorial.ipynb. Also a few typos in markdown cells.Questions:
build.shbut this does not seem to exist?