Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ROMOPMappingTools 2.0.3

- Added download button to vocabulary and database status tables
- Force `ADD_INFO:validationMessages` and `ADD_INFO:autoUpdatingInfo` to be NA if they are empty

# ROMOPMappingTools 2.0.2

Expand Down
2 changes: 1 addition & 1 deletion R/buildStatusDashboard.R
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ buildStatusDashboard <- function(
statusSetBy = statusSetBy,
fileIssue = paste0(
"<a href='",
URLencode(paste0("https://github.com/", fileIssueRepo, "/issues/new?title=Issue with", sourceCode, " (", sourceVocabularyId, ")&body=Source code: ", sourceCode, "\nSource vocabulary: ", sourceVocabularyId, "\nSource concept name: ", sourceConceptName, "\nSource concept id: ", sourceConceptId, "\n\nStatus: ", status, "\n\nTarget concept ids: ", targetConceptIds_str, "\nTarget concept names: ", targetConceptNames_str, "\nTarget vocabulary: ", targetVocabularyIds_str, "\n\nPlease describe the issue hee: ")),
URLencode(paste0("https://github.com/", fileIssueRepo, "/issues/new?title=Issue with", sourceCode, " (", sourceVocabularyId, ")&body=Source code: ", sourceCode, "\nSource vocabulary: ", sourceVocabularyId, "\nSource concept name: ", sourceConceptName, "\nSource concept id: ", sourceConceptId, "\n\nStatus: ", status, "\n\nTarget concept ids: ", targetConceptIds_str, "\nTarget concept names: ", targetConceptNames_str, "\nTarget vocabulary: ", targetVocabularyIds_str, "\n\nPlease describe the issue here: ")),
"' target='_blank'>File issue</a>"
)
) |>
Expand Down
14 changes: 14 additions & 0 deletions R/usagiFile.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,19 @@ writeUsagiFile <- function(usagiTibble, pathToUsagiFile) {
dplyr::any_of(c(firstColNames, midColNames, lastColNames))
)

# force "ADD_INFO:validationMessages" and "ADD_INFO:autoUpdatingInfo" to be NA if they are empty, if they exist
if ("ADD_INFO:validationMessages" %in% colNames) {
usagiTibble <- usagiTibble |>
dplyr::mutate(
`ADD_INFO:validationMessages` = ifelse(`ADD_INFO:validationMessages` == "", NA, `ADD_INFO:validationMessages`)
)
}
if ("ADD_INFO:autoUpdatingInfo" %in% colNames) {
usagiTibble <- usagiTibble |>
dplyr::mutate(
`ADD_INFO:autoUpdatingInfo` = ifelse(`ADD_INFO:autoUpdatingInfo` == "", NA, `ADD_INFO:autoUpdatingInfo`)
)
}

readr::write_csv(usagiTibble, pathToUsagiFile, na = "")
}
Loading