Skip to content

Commit

Permalink
Add image link for nextflow method
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiWaldrant committed Nov 18, 2024
1 parent 2d062ab commit 797e681
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions src/reporting/get_method_info/script.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ library(rlang, warn.conflicts = FALSE)

## VIASH START
par <- list(
input = "resources_test/openproblems/task_results_v3/raw/method_configs.yaml",
input = "test.yaml",
output = "resources_test/openproblems/task_results_v3/processed/method_info.json"
)
## VIASH END
Expand Down Expand Up @@ -38,15 +38,27 @@ outputs <- map(configs, function(config) {
info$code_version <- config$version
info$code_url <- config$links$repository
info$documentation_url <- config$links$documentation
info$image <- paste0(
"https://",
config$links$docker_registry, "/",
config$package_config$organization, "/",
config$package_config$name, "/",
gsub("src/", "", info$comp_path),
":",
info$code_version
)
# Check if the method has a docker container to create an image url. If it does not have a docker it will be a nextflow component consisting of different components that will have a docker image.
engines <- config$engines
has_docker <- any(map_lgl(engines, ~ .x$type == "docker"))
if (has_docker) {
info$image <- paste0(
"https://",
config$links$docker_registry, "/",
config$package_config$organization, "/",
config$package_config$name, "/",
gsub("src/", "", info$comp_path),
":",
info$code_version
)
} else {
info$image <- paste0(
"https://github.com/orgs/openproblems-bio/packages?repo_name=",
config$package_config$name,
"&q=",
gsub("src/", "", info$comp_path)
)
}
info$implementation_url <- paste0(
build_info$git_remote, "/blob/",
build_info$git_commit, "/",
Expand Down

0 comments on commit 797e681

Please sign in to comment.