Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

generate_sivacor_partb.sh - Generate a template-consistent SIVACOR Part B report

Description

Bash wrapper around get_sivacor_info.py and replace_placeholders.py that generates generated/REPLICATION-PartB-SIVACOR.md from a submitted SIVACOR TRO (Transparent Research Object) JSON-LD file, without rerunning the author’s code.

It extracts the four SIVACOR-specific Markdown snippets (computing environment, replication steps, findings, and appendix) from the TRO, splits the report template to the Part B section, and fills in the SIVACOR placeholders to produce a Part B report consistent with the standard REPLICATION.md template.

Usage

tools/generate_sivacor_partb.sh [-j tro.jsonld] [-t template.md] [-o output.md] [-d output_dir] [--dry-run]

If -j is omitted, the first */tro/tro-*.jsonld file found under the current directory is used.

Options

Environment Variables

Outputs

Written under output_dir (default generated/):

Workflow

  1. Resolve the Python interpreter (PYTHON, python3, or python).

  2. Parse command-line options.

  3. If -j was not given, find the first */tro/tro-*.jsonld file (excluding .git/).

  4. Fail if no JSON-LD file was found, or if the template file does not exist.

  5. Run get_sivacor_info.py four times against the JSON-LD file to write the computing environment, replication steps, findings, and appendix snippets.

  6. If the template contains the line You are starting *PartB*., truncate the template to start from that line (so only the Part B portion of a combined REPLICATION.md is used); otherwise use the template as-is.

  7. Run replace_placeholders.py to substitute placeholders in the (possibly truncated) template with the generated snippets, writing the combined output file.

  8. On --dry-run, print the combined preview to stdout (or, if the snippet files don’t yet exist, print a description of what would be generated) instead of writing the output file.

  9. Clean up any temporary truncated-template file.

Requirements

Examples

# Auto-detect the TRO file and generate generated/REPLICATION-PartB-SIVACOR.md
tools/generate_sivacor_partb.sh

# Preview the combined Part B report without writing any files
tools/generate_sivacor_partb.sh --dry-run

# Use an explicit TRO file and output path
tools/generate_sivacor_partb.sh -j 246665/tro/tro-6a23045802a927359ccb67f4.jsonld -o generated/REPLICATION-PartB-SIVACOR.md

# Write generated snippets to a custom directory
tools/generate_sivacor_partb.sh -d generated/sivacor

SIVACOR Workflow Note

For repositories generated by SIVACOR, do not rerun the author code as part of the AEA workflow. The submitted repository should include a tro/ directory containing the TRO JSON-LD file. Use this script, or automations/18_summarize_sivacor.sh, to generate a template-consistent generated/REPLICATION-PartB-SIVACOR.md, then apply it with --replace-report. In split-report cases this updates REPLICATION-PartB.md; in single-file revision reports it replaces the Part B section inside REPLICATION.md. Human review still compares output files against the manuscript, evaluates substantive code behavior, checks requirements completeness against the README, and assigns the final classification.

Error Handling

See Also