Add validation for sourceCode maximum length of 50 characters #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OMOP CDM's
concept_codefield is VARCHAR(50). The Usagi file validator was missing a check to ensuresourceCodedoesn't exceed this limit.Changes
Validation rule (
R/validateUsagiFile.R:100): AddedSourceCode.is.more.than.50.characters = field_length(sourceCode, min = 0, max = 50)following the same pattern as the existingSourceName.is.more.than.255.charactersvalidationTest data (
inst/testdata/VOCABULARIES/ICD10fi/ICD10fi_with_errors.usagi.csv): Added test case with 52-character sourceCodeTest assertions (
tests/testthat/test-validateUsagiFile.R:91-97): Verifies validation detects oversized sourceCodes, sets error message, and flags entries appropriatelyEntries with sourceCode > 50 characters will now be flagged with
ERROR: SourceCode is more than 50 charactersandmappingStatusset toFLAGGED.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cloud.r-project.org/usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R --vanilla -e options(repos~+~=~+~c(CRAN~+~=~+~'REDACTED'));~+~install.packages('validate',~+~dependencies=TRUE)(dns block)esm.ubuntu.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https(dns block)packagemanager.posit.co/usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R -e options(repos~+~=~+~c(CRAN~+~=~+~'REDACTED'));~+~install.packages(c('validate',~+~'checkmate',~+~'dplyr'),~+~dependencies=TRUE)(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.