Skip to content

create_task_readme fails for older tasks #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
szalata opened this issue May 16, 2025 · 0 comments
Open

create_task_readme fails for older tasks #924

szalata opened this issue May 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@szalata
Copy link

szalata commented May 16, 2025

Describe the bug
After the PR that added the common submodule, the common/scripts/create_task_readme script fails in older tasks. Here attempting to run it for the task_perturbation_prediction

To Reproduce
In task_perturbation_prediction:

❯ ./scripts/create_readme.sh
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Read task metadata
Looking for project root in
'/viash_automount/Users/arturszalata/perturbation_test/task_perturbation_prediction/src/api'
Project root found at
'/viash_automount/Users/arturszalata/perturbation_test/task_perturbation_prediction'
Reading project config
Reading component yamls
Reading file yamls
Generating task graph
Render README.qmd content
Warning message:
Component spec validation failed: 1 error validating api_component_spec object
from source
/viash_automount/Users/arturszalata/perturbation_test/task_perturbation_prediction/src/api/comp_method.yaml:

  • (#/additionalProperties): must NOT have additional properties
    Render authors
    Render task graph
    Render task API parts
    Error in map_chr():
    ℹ In index: 5.
    Caused by error:
    ! Failed to evaluate glue component {paste(.render_file_format__example(spec), collapse = '
    ')}
    Caused by error in summarise():
    ℹ In argument: str = paste0("'", .data$name, "'", collapse = ", ").
    Caused by error in .data$name:
    ! Column name not found in .data.
    Backtrace:
    1. ├─openproblems.docs::render_task_readme_qmd(metadata)
    2. │ └─openproblems.docs:::.render_task_parts(task_metadata)
    3. │ └─purrr::map_chr(...)
    4. │ └─purrr:::map_("character", .x, .f, ..., .progress = .progress)
    5. │ ├─purrr:::with_indexed_errors(...)
    6. │ │ └─base::withCallingHandlers(...)
    7. │ ├─purrr:::call_with_cleanup(...)
    8. │ └─openproblems.docs (local) .f(.x[[i]], ...)
    9. │ └─openproblems.docs::render_file_format(task_metadata$files[[file_name]])
  1. │ ├─openproblems.utils::strip_margin(glue("Format:\n |\n |:::{{.small}}\n |{paste(.render_file_format__example(spec), collapse = '\n')}\n |:::\n |\n |Data structure:\n |\n |:::{{.small}}\n |{paste(.render_file_format__table(spec), collapse = '\n')}\n |:::\n |"))
  2. │ │ └─base::gsub(paste0("(^|\n)[ \t]*", symbol), "\1", text)
  3. │ │ └─base::is.factor(x)
  4. │ ├─glue::glue("Format:\n |\n |:::{{.small}}\n |{paste(.render_file_format__example(spec), collapse = '\n')}\n |:::\n |\n |Data structure:\n |\n |:::{{.small}}\n |{paste(.render_file_format__table(spec), collapse = '\n')}\n |:::\n |")
  5. │ │ └─glue::glue_data(...)
  6. │ ├─base::paste(.render_file_format__example(spec), collapse = "\n")
  7. │ └─openproblems.docs:::.render_file_format__example(spec)
  8. │ ├─dplyr::summarise(...)
  9. │ └─dplyr:::summarise.data.frame(spec$expected_format, str = paste0("'", .data$name, "'", collapse = ", "))
  10. │ └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  11. │ ├─base::withCallingHandlers(...)
  12. │ └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
  13. │ └─base::lapply(.x, .f, ...)
  14. │ └─dplyr (local) FUN(X[[i]], ...)
  15. │ └─mask$eval_all_summarise(quo)
  16. │ └─dplyr (local) eval()
  17. ├─glue (local) <fn>("paste(.render_file_format__example(spec), collapse = '\n')")
  18. │ ├─.transformer(expr, env) %||% .null
  19. │ └─glue (local) .transformer(expr, env)
  20. │ ├─glue:::with_glue_error(...)
  21. │ │ └─base::withCallingHandlers(...)
  22. │ └─base::eval(expr, envir)
  23. │ └─base::eval(expr, envir)
  24. ├─base::paste0("'", .data$name, "'", collapse = ", ")
  25. ├─name
  26. ├─rlang:::$.rlang_data_pronoun(.data, name)
  27. │ └─rlang:::data_pronoun_get(...)
  28. └─rlang:::abort_data_pronoun(x, call = y)
  29. └─rlang::abort(msg, "rlang_error_data_pronoun_not_found", call = call)
    Execution halted
    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Expected behavior
expect the README.md to be updated.

@szalata szalata added the bug Something isn't working label May 16, 2025
@szalata szalata changed the title creaate_task_readme fails for older tasks create_task_readme fails for older tasks May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant