Skip to content

Commit 6ec8da4

Browse files
committed
Switch output for PRs to Markdown format
1 parent 1e1b085 commit 6ec8da4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

polaris/run/serial.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -674,30 +674,30 @@ def _write_output_for_pull_request(
674674
baseline_build = _parse_baseline_build(values.get('baseline'))
675675

676676
# Build the output content. Only include optional lines if present.
677-
lines = [f'Polaris {suite_name} suite']
677+
lines = [f'### Polaris `{suite_name}` suite']
678678

679679
if values['baseline']:
680-
lines.append(f'- Baseline workdir: {values["baseline"]}')
680+
lines.append(f'- Baseline workdir: `{values["baseline"]}`')
681681
if baseline_build:
682-
lines.append(f'- Baseline build: {baseline_build}')
682+
lines.append(f'- Baseline build: `{baseline_build}`')
683683
if values['build']:
684-
lines.append(f'- PR build: {values["build"]}')
684+
lines.append(f'- PR build: `{values["build"]}`')
685685
if values['work']:
686-
lines.append(f'- PR workdir: {values["work"]}')
686+
lines.append(f'- PR workdir: `{values["work"]}`')
687687
if values['machine']:
688-
lines.append(f'- Machine: {values["machine"]}')
688+
lines.append(f'- Machine: `{values["machine"]}`')
689689
if values['partition']:
690-
lines.append(f'- Partition: {values["partition"]}')
690+
lines.append(f'- Partition: `{values["partition"]}`')
691691
if values['compiler']:
692-
lines.append(f'- Compiler: {values["compiler"]}')
692+
lines.append(f'- Compiler: `{values["compiler"]}`')
693693

694694
# Placeholder for developer to fill in
695695
lines.append('- Build type: <Debug|Release>')
696696

697697
# Try to include job scheduler log path for Slurm
698698
job_log = _derive_job_log_path(suite_name, suite)
699699
if job_log:
700-
lines.append(f'- Log: {job_log}')
700+
lines.append(f'- Log: `{job_log}`')
701701

702702
# If we have results, summarize them
703703
if results is not None and isinstance(results, dict):
@@ -716,9 +716,9 @@ def _write_output_for_pull_request(
716716
if diffs:
717717
lines.append(f' - Diffs ({len(diffs)} of {total}):')
718718
for name in diffs:
719-
lines.append(f' - {name}')
719+
lines.append(f' - `{name}`')
720720

721-
out_path = os.path.join(work_dir, f'{suite_name}_output_for_pr.log')
721+
out_path = os.path.join(work_dir, f'{suite_name}_output_for_pr.md')
722722
print(f'Writing output useful for copy/paste into PRs to:\n {out_path}')
723723
with open(out_path, 'w') as out:
724724
out.write('\n'.join(lines) + '\n')

0 commit comments

Comments
 (0)