R/input_validation_functions.R
check_orcid_format.RdReads in a .xlsx file for data validation. Uses an NPS API to check that all the emails listed in the column author_email_list have properly formatted ORCiDs (xxxx-xxxx-xxx-xxxx) associated with them. For the Project reference type, the function will check the column leads_email_list rather than author_email_list. Lack of an ORCiD, including because the supplied email address is not a valid NPS email, is considered improperly formatted for the purposes of this test. emails supplied do not have properly formatted ORCiDs associated with them the function throws an error and lists the emails that do not have properly formatted ORCiDs associated with them. If all emails are tied to valid NPS accounts with properly formatted ORCiDs associated with them, the function passes.
check_orcid_format(
path = getwd(),
filename = "DSbulkUploadR_input.xlsx",
sheet_name
)NULL (invisibly)
if (FALSE) { # \dontrun{
check_orcid_format(path = getwd(),
filename = "DSbulkUploadR_input.xlsx",
sheet_name = "AudioRecording")} # }