import_comma_repo.RdImport CoMMa specifications from a CoMMa specification repository
import_comma_repo(x)An imported CoMMa spec repo object.
comma::import_comma_repo(
"https://codeberg.org/sci-ops/comma-repo/raw/CoMMa-specs.yml"
);
#> Called from: comma::import_comma_repo("https://codeberg.org/sci-ops/comma-repo/raw/CoMMa-specs.yml")
#> debug: if (length(manifest) != 1) {
#> stop("The CoMMa specifications repository manifesto does not contain exactly ",
#> "one YAML node. This suggests the file is corrupt (or misspecified).")
#> }
#> debug: if (!(names(manifest) == "CoMMa_spec_repo")) {
#> name <- names(manifest)
#> stop("The CoMMa specifications repository manifesto does contains exactly ",
#> "one YAML node (which is good) but it's not named exactly ",
#> "`CoMMa_spec_repo` (but instead, `", name, "`). This suggests the ",
#> "file is corrupt (or misspecified).")
#> }
#> debug: if (!("metadata" %in% names(manifest$CoMMa_spec_repo))) {
#> stop("The CoMMa specifications repository manifesto does not contain ",
#> "a YAML node named `metadata` (which should be in the YAML node ",
#> "named `CoMMa_spec_repo`). This suggests the file is corrupt ",
#> "(or misspecified).")
#> }
#> debug: if (!("CoMMa_specs" %in% names(manifest$CoMMa_spec_repo))) {
#> stop("The CoMMa specifications repository manifesto does not contain ",
#> "a YAML node named `CoMMa_specs` (which should be in the YAML node ",
#> "named `CoMMa_spec_repo`). This suggests the file is corrupt ",
#> "(or misspecified).")
#> }
#> debug: if (length(manifest$CoMMa_spec_repo$CoMMa_specs) == 0) {
#> stop("No CoMMa specifications are specified in the manifesto!")
#> } else {
#> CoMMa_specs <- manifest$CoMMa_spec_repo$CoMMa_specs
#> }
#> debug: CoMMa_specs <- manifest$CoMMa_spec_repo$CoMMa_specs
#> debug: CoMMa_specs <- lapply(CoMMa_specs, function(x) {
#> msg("Trying to import a CoMMa spec from `", x, "`...\n",
#> silent = silent)
#> if (!((length(x) == 1) && is.character(x))) {
#> warningMsg <- paste0("One of the CoMMa specs isn't a single character value, but instead ",
#> vecTxtQ(x), ". Ignoring it.")
#> if (silent) {
#> warning(warningMsg)
#> }
#> else {
#> msg(warningMsg, silent = silent)
#> }
#> }
#> if (grepl("^https?://", x)) {
#> msg(" - This seems to be a URL (`", x, "`); will try to download from that location.\n",
#> silent = silent)
#> }
#> else {
#> if (manifest_is_localFile) {
#> currentPath <- file.path(manifest_path, x)
#> if (file.exists(currentPath)) {
#> msg(" - This seems to be a local file (`", currentPath,
#> "`); will try to open that.\n", silent = silent)
#> x <- currentPath
#> }
#> else {
#> if (!is.null(manifest$CoMMa_spec_repo$metadata$download_prefix)) {
#> }
#> }
#> }
#> }
#> })
#> Error in FUN(X[[i]], ...): object 'silent' not found