Skip to content

Commit 3c38d0b

Browse files
committed
fix: resolve NO_FILE staging collision and module bin shadowing
Two CI-breaking issues fixed: 1. NORMALIZE_BENCHMARK_JSONL crashed with 'input file name collision' when both optional inputs (CUR report + machines dir) were absent — both resolved to the same 'NO_FILE' sentinel. Use distinct sentinels: NO_FILE_CUR and NO_FILE_MACHINES. 2. Module-local bin/benchmark_report.py shims were shadowed by the root bin/benchmark_report.py (Typer CLI). Nextflow only adds projectDir/bin/ to PATH, so the argparse shims were never found. Renamed module-local shims to stage-specific names (normalize_benchmark_jsonl.py, etc.) and moved them to root bin/. Worker modules (benchmark_report_normalize.py etc.) are symlinked from root bin/ to module-local bin/. 3. Fixed editorconfig-checker failures: 14 lines in benchmark_report_template.html had odd-number leading spaces.
1 parent c5b9ea5 commit 3c38d0b

12 files changed

Lines changed: 27 additions & 23 deletions

File tree

modules/local/aggregate_benchmark_report_data/bin/benchmark_report.py renamed to bin/aggregate_benchmark_report_data.py

File renamed without changes.

bin/benchmark_report_aggregate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../modules/local/aggregate_benchmark_report_data/bin/benchmark_report_aggregate.py

bin/benchmark_report_normalize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../modules/local/normalize_benchmark_jsonl/bin/benchmark_report_normalize.py

bin/benchmark_report_render.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../modules/local/render_benchmark_report/bin/benchmark_report_render.py

bin/benchmark_report_template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../modules/local/render_benchmark_report/bin/benchmark_report_template.html

modules/local/normalize_benchmark_jsonl/bin/benchmark_report.py renamed to bin/normalize_benchmark_jsonl.py

File renamed without changes.

modules/local/render_benchmark_report/bin/benchmark_report.py renamed to bin/render_benchmark_report.py

File renamed without changes.

modules/local/aggregate_benchmark_report_data/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ process AGGREGATE_BENCHMARK_REPORT_DATA {
1212

1313
script:
1414
"""
15-
benchmark_report.py \\
15+
aggregate_benchmark_report_data.py \\
1616
--jsonl-dir ${jsonl_bundle} \\
1717
--output report_data.json
1818

modules/local/normalize_benchmark_jsonl/main.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ process NORMALIZE_BENCHMARK_JSONL {
1313
path "versions.yml", emit: versions
1414

1515
script:
16-
def cost_flag = benchmark_aws_cur_report.name != 'NO_FILE' ? "--costs ${benchmark_aws_cur_report}" : ""
17-
def machines_flag = machines_dir.name != 'NO_FILE' ? "--machines-dir ${machines_dir}" : ""
16+
def cost_flag = benchmark_aws_cur_report.name != 'NO_FILE' && benchmark_aws_cur_report.name != 'NO_FILE_CUR' ? "--costs ${benchmark_aws_cur_report}" : ""
17+
def machines_flag = machines_dir.name != 'NO_FILE' && machines_dir.name != 'NO_FILE_MACHINES' ? "--machines-dir ${machines_dir}" : ""
1818
"""
19-
benchmark_report.py \\
19+
normalize_benchmark_jsonl.py \\
2020
--data-dir ${data_dir} \\
2121
${cost_flag} \\
2222
${machines_flag} \\

modules/local/render_benchmark_report/bin/benchmark_report_template.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<style>
1212
* { box-sizing: border-box; margin: 0; padding: 0; }
1313
body { font-family: 'Inter', Helvetica, sans-serif;
14-
background: {{ brand_white }}; color: {{ brand_heading }}; line-height: 1.6; font-size: 14px; }
14+
background: {{ brand_white }}; color: {{ brand_heading }}; line-height: 1.6; font-size: 14px; }
1515
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
1616

1717
.navbar { background: {{ brand_white }}; border-bottom: 1px solid {{ brand_border }}; padding: 12px 0; margin-bottom: 30px; }
@@ -22,9 +22,9 @@
2222

2323
.section { margin-bottom: 40px; }
2424
.section h1 { font-size: 26px; font-weight: 600; color: {{ brand_heading }}; margin-bottom: 5px;
25-
padding-bottom: 8px; border-bottom: 1px solid {{ brand_border }}; }
25+
padding-bottom: 8px; border-bottom: 1px solid {{ brand_border }}; }
2626
.section h2 { font-size: 20px; font-weight: 500; color: {{ brand_heading }}; margin: 25px 0 8px;
27-
padding-bottom: 5px; border-bottom: 1px solid {{ brand_border }}; }
27+
padding-bottom: 5px; border-bottom: 1px solid {{ brand_border }}; }
2828
.section h3 { font-size: 17px; font-weight: 500; color: {{ brand_heading }}; margin: 20px 0 8px; }
2929
.section-desc { color: {{ brand_heading }}; font-size: 13px; margin-bottom: 15px; line-height: 1.5; }
3030
.section-desc strong { color: {{ brand_heading }}; font-weight: 600; }
@@ -49,7 +49,7 @@
4949

5050
.callout { border: 1px solid {{ brand_border }}; border-radius: 4px; margin-bottom: 15px; }
5151
.callout-header { background: {{ brand_neutral }}; padding: 8px 12px; cursor: pointer; font-size: 13px;
52-
font-weight: 600; color: {{ brand_heading }}; border-bottom: 1px solid {{ brand_border }}; }
52+
font-weight: 600; color: {{ brand_heading }}; border-bottom: 1px solid {{ brand_border }}; }
5353
.callout-header:hover { background: {{ brand_accent_surface }}; }
5454
.callout-body { padding: 12px; display: none; }
5555
.callout-body.show { display: block; }
@@ -59,14 +59,14 @@
5959
.dl-row dd { color: {{ brand_heading }}; margin-right: 15px; }
6060

6161
.status-badge { display: inline-block; padding: 1px 8px; border-radius: 9999px; font-size: 11px;
62-
font-weight: 600; line-height: 1.6; white-space: nowrap; }
62+
font-weight: 600; line-height: 1.6; white-space: nowrap; }
6363
.status-badge.success { background: rgba(25, 135, 84, 0.12); color: #146c43; }
6464
.status-badge.failed { background: rgba(220, 53, 69, 0.14); color: #b02a37; }
6565
.status-badge.cancelled { background: rgba(255, 193, 7, 0.18); color: #997404; }
6666
.status-badge.unknown { background: rgba(108, 117, 125, 0.14); color: #495057; }
6767

6868
footer { border-top: 1px solid {{ brand_border }}; padding: 15px 0; margin-top: 40px;
69-
font-size: 12px; color: {{ brand_border }}; text-align: center; }
69+
font-size: 12px; color: {{ brand_border }}; text-align: center; }
7070
footer a { color: {{ brand_accent }}; text-decoration: none; }
7171

7272
.side-nav { position: fixed; top: 53px; left: 0; width: 228px; padding: 12px 8px;
@@ -84,7 +84,7 @@
8484
.main-content { margin-left: 228px; }
8585

8686
.csv-btn { float: right; font-size: 13px; color: {{ brand_accent }}; cursor: pointer; border: 1px solid {{ brand_border }};
87-
background: {{ brand_white }}; padding: 2px 10px; border-radius: 3px; text-decoration: none; }
87+
background: {{ brand_white }}; padding: 2px 10px; border-radius: 3px; text-decoration: none; }
8888
.csv-btn:hover { background: {{ brand_neutral }}; }
8989

9090
.runtime-panels { display: flex; flex-direction: column; gap: 18px; }
@@ -168,7 +168,7 @@
168168
.group-colors span { display: inline-block; width: 12px; height: 12px; border-radius: 2px;
169169
margin-right: 4px; vertical-align: middle; }
170170
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px;
171-
font-size: 11px; font-weight: 600; line-height: 1.3; }
171+
font-size: 11px; font-weight: 600; line-height: 1.3; }
172172
.status-success { background: #dcfce7; color: #166534; }
173173
.status-failed { background: #fee2e2; color: #991b1b; }
174174
.status-cancelled { background: #fef3c7; color: #92400e; }
@@ -896,8 +896,8 @@ <h2 id="pg-mem-savings"><svg class="h-icon sm"><use href="#ic-chart"/></svg> Sav
896896
grid: { top: 40, bottom: 40, containLabel: true },
897897
xAxis: { type: 'value', name: 'Run time (minutes)', nameLocation: 'center', nameGap: 25 },
898898
yAxis: { type: 'category', data: processes,
899-
axisLabel: { width: 280, overflow: 'truncate' },
900-
inverse: true },
899+
axisLabel: { width: 280, overflow: 'truncate' },
900+
inverse: true },
901901
series: [...series, ...errorSeries],
902902
});
903903

@@ -908,8 +908,8 @@ <h2 id="pg-mem-savings"><svg class="h-icon sm"><use href="#ic-chart"/></svg> Sav
908908
grid: { top: 40, bottom: 40, containLabel: true },
909909
xAxis: { type: 'value', name: 'Cost ($)', nameLocation: 'center', nameGap: 25 },
910910
yAxis: { type: 'category', data: processes,
911-
axisLabel: { width: 280, overflow: 'truncate' },
912-
inverse: true },
911+
axisLabel: { width: 280, overflow: 'truncate' },
912+
inverse: true },
913913
series: costSeries,
914914
});
915915
}, 50);
@@ -1425,8 +1425,8 @@ <h2 id="pg-mem-savings"><svg class="h-icon sm"><use href="#ic-chart"/></svg> Sav
14251425
tooltip: { trigger: 'item' },
14261426
grid: { top: 40, bottom: 20, containLabel: true },
14271427
yAxis: { type: 'category', data: processes,
1428-
axisLabel: { width: 220, overflow: 'truncate', interval: 0 },
1429-
inverse: true },
1428+
axisLabel: { width: 220, overflow: 'truncate', interval: 0 },
1429+
inverse: true },
14301430
xAxis: { type: 'value', name: 'Cost ($)', nameLocation: 'center', nameGap: 25 },
14311431
series: [{ type: 'boxplot', data: boxData }],
14321432
});

0 commit comments

Comments
 (0)