Skip to content
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

Error Prompt Updates in getEMLfunctions.R #122

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions R/getEMLfunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ get_additional_info <- function(eml_object) {
get_methods <- function(eml_object){
doc <- eml_object$dataset$methods
if(is.null(doc)){
warning("Your EML lacks a methods section. Use set_methods to add methods.")
warning("Your EML lacks a methods section. Use set_methods() to add methods.")
}
return(doc)
}
Expand Down Expand Up @@ -174,7 +174,7 @@ get_ds_id <- function(eml_object) {
}
ref_id <- stringr::str_sub(doi, start = -7)
if (suppressWarnings(is.na(as.numeric(ref_id)))) {
warning("Your DOI is not consistent with an NPS DOI. Use set_doi to update your DOI.")
warning("Your DOI is not consistent with an NPS DOI. Use set_doi() to update your DOI.")
ref_id <- NA
}
}
Expand Down Expand Up @@ -223,7 +223,7 @@ get_citation <- function(eml_object) {

# piece it together:
if (is.null(doi)) {
warning("No doi specified. Please use set_doi to add a DOI.")
warning("No doi specified. Please use set_doi() to add a DOI.")
}
if (is.null(author_list)) {
warning("No creators detected. Please add at least one \"creator\" in EMLassemlbyline with a valid givenName and surName.")
Expand Down Expand Up @@ -440,7 +440,7 @@ get_cui <- function(eml_object) {
cui <- "Does NOT contain CUI"
}
else {
warning("CUI not properly specified. User set_cui to update the CUI code.")
warning("CUI not properly specified. Use set_cui() to update the CUI code.")
cui <- NA
}
return(cui)
Expand Down Expand Up @@ -468,7 +468,7 @@ get_file_info <- function(eml_object) {
file_name <- arcticdatautils::eml_get_simple(eml_object, "objectName")

if (is.null(file_name)) {
warning("You have not specified data file names, sizes, or descripions. If you used EMLassemblyline, double check for any issues generated after running make_eml. Missing data and undifined units will often cause this problem.")
warning("You have not specified data file names, sizes, or descriptions. If you used EMLassemblyline, double check for any issues generated after running make_eml. Missing data and undefined units will often cause this problem.")
print("NA")
} else {
# get file sizes (assumes in bytes)
Expand Down
Loading