Skip to content

Commit 868bbbf

Browse files
committed
Fix generate report
1 parent 99fa0ec commit 868bbbf

File tree

5 files changed

+27
-14
lines changed

5 files changed

+27
-14
lines changed

.DS_Store

-10 KB
Binary file not shown.

.nextflow/.DS_Store

-6 KB
Binary file not shown.

example-input.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
repo_url
2+
https://github.com/PythonOT/POT.git
3+
https://github.com/RabadanLab/TARGet.git

modules/GenerateReport.nf

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ nextflow.enable.dsl=2
44
/**
55
* Process: GenerateReport
66
*
7-
* Generates a consolidated report from all status files.
8-
* The report includes:
9-
* - Repository name
10-
* - Clone status
11-
* - Dependencies status
12-
* - Tests status
13-
* - Almanack status
7+
* Aggregates all status files into a single consolidated CSV report.
8+
* The report includes the following columns:
9+
* - Tool: Repository name
10+
* - CloneRepository: Status of repository cloning
11+
* - CheckReadme: Status of README check
12+
* - CheckDependencies: Status of dependencies check
13+
* - CheckTests: Status of tests check
14+
* - Almanack: Status of Almanack analysis
1415
*/
1516

1617
process GenerateReport {
18+
publishDir path: "${params.output_dir}", mode: 'copy'
19+
1720
input:
18-
path "*status_*.txt"
21+
path status_files
1922

2023
output:
2124
path "consolidated_report.csv"
@@ -25,12 +28,16 @@ process GenerateReport {
2528
#!/bin/bash
2629
set -euo pipefail
2730
28-
# Create header
29-
echo "repo_name,clone_status,deps_status,tests_status,almanack_status" > consolidated_report.csv
30-
31-
# Append each status file
32-
for f in status_*.txt; do
33-
cat "\$f" >> consolidated_report.csv
31+
# Write header with column names
32+
echo "Tool,CloneRepository,CheckReadme,CheckDependencies,CheckTests,Almanack" > consolidated_report.csv
33+
34+
# Append each status row from all files
35+
for f in ${status_files}; do
36+
if [ -f "\$f" ]; then
37+
cat "\$f" >> consolidated_report.csv
38+
else
39+
echo "Warning: File \$f not found" >&2
40+
fi
3441
done
3542
"""
3643
}

results/consolidated_report.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Tool,CloneRepository,CheckReadme,CheckDependencies,CheckTests,Almanack
2+
TARGet,PASS,FAIL,FAIL,PASS
3+
POT,PASS,PASS,PASS,PASS

0 commit comments

Comments
 (0)