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

Reimplement LinkML validation error categorization #14

Closed
candleindark opened this issue Oct 14, 2024 · 0 comments · Fixed by #16
Closed

Reimplement LinkML validation error categorization #14

candleindark opened this issue Oct 14, 2024 · 0 comments · Fixed by #16
Assignees

Comments

@candleindark
Copy link
Member

Reimplement how LinkML validation errors are categorized. The current implementation is based on a parsing of the error message

def get_linkml_err_counts(errs: LinkmlValidationErrsType) -> Counter[str]:
"""
Get a `Counter` object that counts the LinkML validation errors by type
:param errs: The list of LinkML validation errors to be counted
:return: The `Counter` object
Notes: The determination of the type of a LinkML validation error is rather
rudimentary at this point.
"""
linkml_err_types = [
re.sub(r".*(is .*) in \S.*", r"\1", e.message, count=1) for e in errs
]
return Counter(isorted(linkml_err_types))

Replace it with an implementation that is based on the validator and validator value made available by #13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant