Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use check-naming conventions #15

Closed
mbjones opened this issue Feb 15, 2023 · 2 comments
Closed

use check-naming conventions #15

mbjones opened this issue Feb 15, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mbjones
Copy link
Member

mbjones commented Feb 15, 2023

@jeanetteclark Peter and I noted that, as the number of checks grew in metadig, they were hard to find and understand. So we shifted to a check naming pattern of entity.subentity.checktype, where entity is the kind of resource being checked, subentity is the component of that entity being checked, and checktype was a short name for the kind of check being run. We tried to be consistent with our checktypes across entities (e.g., present and resolvable had the same meaning across different entity types). This allows checks on similar entities to sort together, and for one to find similar kinds of checks across different entities. For example, the following metadata check names are fairly sortable and interpretable:

metadata.identifier.present
metadata.identifier.resolvable
metadata.alternateIdentifier.present
metadata.alternateIdentifier.resolvable
resource.URLs.resolvable
resource.landingPage.present

resource refers to the thing being described by a metadata document (e.g., a Dataset), while metadata refers to the metadata about that resource. I'm not sure that distinction really holds up to scrutiny, open to discussion.

It would be good if the data checks followed a similar convention. Maybe something like:

data.table-text-delimited.well-formed
data.table-text-fixed.well-formed
data.binary-format.valid
data.text-encoding.valid
data.text-encoding.congruent

In this case, data is a stand-in for the individual data objects that might be contained within a Dataset. By valid I mean that the bytes we find on disk correspond to the corresponding specification. By congruent I mean that what we find on disk matches what was claimed in the metadata. Lot's of ways to structure this, but I think it would be good to pick a decent convention to get started (which will also make renaming checks easier if we decide to do so later). Thoughts welcome.

@mbjones mbjones added the enhancement New feature or request label Feb 15, 2023
@jeanetteclark
Copy link
Collaborator

Yeah, definitely on the right track here. So with this system of entity.subentity.checktype the checks we have now are:

data.table-text-delimited.well-formed (#2)
data.format.congruent (#9)

upcoming checks to write would be:

data.text-encoding.valid (#12)
data.text-encoding.congruent (#12)
data.attribute-names.congruent (#3)

Any concern about deviating from camel case in the subentity slot for kebab case? I'm guessing the camel case was to match the corresponding EML slots?

@jeanetteclark
Copy link
Collaborator

existing checks have been renamed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants