Fix SIVACOR Part B generation for revisions#84
Conversation
larsvilhuber
left a comment
There was a problem hiding this comment.
I've made a few notes targeting better/easier maintenance going forward. Can you address them?
|
@larsvilhuber Addressed the review feedback: replaced Python 3.12-specific references with python3, removed the Perl dependency, and consolidated the SIVACOR placeholders into the main REPLICATION.md template. Normal and SIVACOR generation paths were tested successfully. Ready for re-review. |
There was a problem hiding this comment.
Pull request overview
This PR fixes SIVACOR Part B generation for revision (single-file) reports by switching to placeholder-based insertion into REPLICATION.md/appendix templates, ensuring outputs land under generated/, and removing redundant Part B/appendix insertion scripts.
Changes:
- Rework SIVACOR Part B generation to fill placeholders in
REPLICATION.md(and include appendix content viatemplate/REPLICATION_appendix.md) rather than directly editing regenerated artifacts. - Standardize outputs under
generated/and ensure non-SIVACOR runs get empty SIVACOR snippet files so placeholders resolve cleanly. - Improve portability by using
python3/pythondetection and updating docs/examples accordingly.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/update_sivacor_appendix.py | Removed direct appendix mutation helper (appendix now assembled via template placeholder). |
| tools/replace_placeholders.py | Makes chardet optional (fallback to UTF-8 if unavailable). |
| tools/insert_sivacor_partb_sections.py | Removed bespoke Part B insertion script (replaced by placeholder fill). |
| tools/get_sivacor_info.py | Uses python3 shebang; updates example output path to generated/. |
| tools/generate_sivacor_partb.sh | Generates SIVACOR snippet files + fills placeholders to produce generated/REPLICATION-PartB-SIVACOR.md. |
| template/REPLICATION_appendix.md | Adds {{ sivacor-partb-appendix.md }} include point. |
| REPLICATION.md | Adds SIVACOR placeholders for computing environment, replication steps, and findings. |
| docs/tools/repository/96-90-get_sivacor_info.md | Updates workflow/docs for new filenames and revision/split behavior. |
| docs/tools/index.md | Updates tool description for new output locations and appendix snippet behavior. |
| docs/automations/index.md | Updates automation description for new generation/apply behavior. |
| docs/96-91-pipeline-overview.md | Updates pipeline overview text to match new SIVACOR behavior. |
| automations/24_amend_report.sh | Ensures SIVACOR snippet placeholders resolve (creates empty files if missing); uses $PYTHON. |
| automations/18_summarize_sivacor.sh | Uses $PYTHON, generates Part B from REPLICATION.md, and supports replace-report for revisions. |
| if [[ "$dry_run" != "--dry-run" ]] | ||
| then | ||
| mkdir -p "$output_dir" | ||
| fi | ||
|
|
||
| python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-computing-environment --output "$environment_output" $dry_run | ||
| python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-replication-steps --output "$steps_output" $dry_run | ||
| python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-findings --output "$findings_output" $dry_run | ||
| python3 tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-appendix --output "$appendix_output" $dry_run | ||
| "$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-computing-environment --output "$environment_output" $dry_run | ||
| "$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-replication-steps --output "$steps_output" $dry_run | ||
| "$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-findings --output "$findings_output" $dry_run | ||
| "$PYTHON" tools/get_sivacor_info.py --jsonld "$jsonld" --key sivacor-appendix --output "$appendix_output" $dry_run |
|
@dmcguir5 can you have a look at the second comment by the AI review? Ignore the first one, for now. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Closes issue #83
-Fixes SIVACOR part B generation for revision reports, preserves functionality for non-revision reports
-Writes part B under generated/
-Correctly writes SIVACOR appendix through appendix template
-Removes redundant/duplicated scripts
-Supports python/python3