Skip to content
Merged
23 changes: 21 additions & 2 deletions .github/workflows/r-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,28 @@ jobs:
- name: Install Linux runtime libraries
if: runner.os == 'Linux'
shell: bash
timeout-minutes: 10
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libglpk40
for attempt in 1 2 3; do
echo "apt-get update attempt ${attempt}/3"
if sudo timeout --kill-after=10s 90s apt-get \
-o Acquire::Retries=2 \
-o Acquire::http::Timeout=20 \
-o Acquire::https::Timeout=20 update; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::apt-get update failed or timed out after 3 attempts"
exit 1
fi
sleep 5
done

sudo timeout --kill-after=10s 180s apt-get \
-o Acquire::Retries=2 \
-o Acquire::http::Timeout=20 \
-o Acquire::https::Timeout=20 \
install -y --no-install-recommends libglpk40

- name: Restore renv environment
uses: r-lib/actions/setup-renv@d3c5be51b12e724e68f33216ca3c148b66d5f0b6 # v2
Expand Down
13 changes: 9 additions & 4 deletions R/analytical_workbook.R
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,8 @@ build_executive_summary <- function(
score_threshold,
string_version,
louvain_seed,
fdr_threshold
fdr_threshold,
run_enrichment = TRUE
) {
module_class <- analytical_vector_text(
module_annotations$interpretation_class,
Expand Down Expand Up @@ -1657,7 +1658,9 @@ build_executive_summary <- function(
string_version,
"; score_threshold=",
score_threshold,
"; offline_enrichment=TRUE; FDR<=",
"; offline_enrichment=",
as.character(isTRUE(run_enrichment)),
"; FDR<=",
fdr_threshold,
"; Louvain_seed=",
louvain_seed
Expand Down Expand Up @@ -2202,7 +2205,8 @@ build_analytical_workbook <- function(
biological_evidence,
string_version = "12.0",
louvain_seed = CANCERPPIR_LOUVAIN_SEED,
fdr_threshold = 0.05
fdr_threshold = 0.05,
run_enrichment = TRUE
) {
required_evidence_objects <- c(
"module_annotations",
Expand Down Expand Up @@ -2273,7 +2277,8 @@ build_analytical_workbook <- function(
score_threshold = score_threshold,
string_version = string_version,
louvain_seed = louvain_seed,
fdr_threshold = fdr_threshold
fdr_threshold = fdr_threshold,
run_enrichment = run_enrichment
)

network_overview <- build_network_overview(
Expand Down
3 changes: 2 additions & 1 deletion R/pipeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,8 @@ run_cancerppir <- function(
biological_evidence = biological_evidence,
string_version = "12.0",
louvain_seed = CANCERPPIR_LOUVAIN_SEED,
fdr_threshold = 0.05
fdr_threshold = 0.05,
run_enrichment = run_enrichment
)

analytical_sheets <- analytical_report$sheets
Expand Down
13 changes: 12 additions & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,25 @@ still does not run the seven-case production regression.
Individual commands remain available for focused diagnosis:

- `run_unit_tests.R` — complete unit and CLI test suite.
- `run_smoke_test.R` — single-case smoke validation.
- `run_smoke_test.R` — bundled synthetic end-to-end smoke validation.
- `validate_documentation_contract.R` — documentation contract.
- `validate_reproducibility_contract.R` — pinned software-environment contract.
- `validate_release_contract.R` — static release contract.
- `validate_publication_readiness.R` — publication metadata and public-contract
audit.
- `validate_repository_quality.R` — repository and CI hygiene gate.

Run one complete non-clinical analysis against an existing STRING v12 cache:

```bash
Rscript scripts/run_smoke_test.R STRING_CACHE OUTPUT_ROOT
```

Both paths must be outside the repository, and all required STRING resources
must already exist. The command validates all six outputs, workbook schemas,
GraphML, versioned provenance, checksums, and mapping metadata without running
any of the seven clinical release cases.

## Release qualification

- `run_release_qualification.R` — final seven-case release gate.
Expand Down
Loading