Skip to content
Snippets Groups Projects
Commit 72e75358 authored by Johannes Boog's avatar Johannes Boog
Browse files

[base] add class for top level tag python_script

parent 2c0b80f4
No related branches found
No related tags found
1 merge request!41standardize files references during prj import/export (new MR)
# python_script -----------------------------------------------------------
#' prj_python_script
#' @description tag: python_script
#' @param file_path string: Path or name of python script file (\code{*.py}).
#' @export
#'
#' @examples
#' prj_python_script(scripts = "bcs_laplace_eq.py")
#'
prj_python_script <- function(file_path) {
new_prj_python_script(file_path)
}
new_prj_python_script <- function(file_path) {
assertthat::assert_that(assertthat::is.string(file_path))
assertthat::assert_that(isTRUE(stringr::str_detect(file_path, ".py")),
msg = "The script has to be a python script!")
structure(list(file_path,
xpath = "python_script",
attr_names = character(),
flatten_on_exp = character()),
class = "prj_python_script")
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment