NCEAS / metadig-r

MetaDIG client package for R
Apache License 2.0
4 stars 4 forks source link

Add runSuite() function #4

Closed drkrynstrng closed 5 years ago

drkrynstrng commented 5 years ago

I added a runSuite() function that runs multiple checks on a given metadata document and returns all results in a named list. It is essentially a convenience wrapper function around runCheck(). This approach does not take an actual suite XML document as an input though. With a suite XML document, I'm not sure how to translate the check IDs to filepaths for use with runCheck().

Also, the docs were updated with roxygen 6.1.1.

gothub commented 5 years ago

@drkrynstrng I just had a quick look now and it looks great, but I'll give it a test run tomorrow.

gothub commented 5 years ago

@drkrynstrng The 'runCheck()' function was initially intended to help quality check authors develop R code and the check XML that could be verified in R and then directly used in the quality engine. The runSuite() function should provide similar functionality, so it should be able to read a proposed or existing suite XML file from the quality engine. It's a bit of work for people running the suites to always have to specify the list of checks to run, so the list of checks should be available in an external file. The 'published' suite and check xml files are available directly from the quality server, for example:

https://quality.nceas.ucsb.edu/quality/suites/arctic.data.center.suite.1

If a production suite & checks are being run, then they could be obtained from the server and cached; if a development suite and checks are being run, then they could be run from local files.

drkrynstrng commented 5 years ago

Yeah, that makes sense. I've updated the function to use a suite XML file. By also specifying a directory where check files are stored, it is possible to translate check IDs to filepaths. This works for local files at least. I'm not sure where the check files are stored on the server, but if there's a directory to point to then the function should work too.