Closed jeanetteclark closed 1 year ago
FYI, the datapack
R library has a SystemMetadata
class that knows how to parse and serialize sysmeta to and from XML, validate it, and has some helpful accessor methods. See https://github.com/ropensci/datapack/blob/main/R/SystemMetadata.R
Oh right - in that case we don't actually need a helper. datapack::parseSystemMetadata
can just be used within check code as long as we are okay with the check being dependent on that library.
I'm 👍 on the dependency -- we don't really want to maintain multiple SystemMetadata parsing libraries -- its hard enough to do right once!
Purpose
A sysmeta argument was just added to
metadig-r
, to better mimic what the java engine does. The sysmeta is made available to check code as a string literal, which would benefit from a helper to parse when writing an R check that looks in sysmeta.A few options for implementation, we could just parse it to XML, or to a named list. The latter would probably be the most helpful for check code, and I don't think we'd lose anything since sysmeta is flat anyway.