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

Validation - refactor to be able to retrieve all errors rather than throw exception on 1st #706

Open
davmlaw opened this issue Oct 9, 2023 · 5 comments
Labels
enhancement New feature or request keep alive exempt issue from staleness checks

Comments

@davmlaw
Copy link
Contributor

davmlaw commented Oct 9, 2023

I would like to be able to see all the errors, rather than throw an exception on the 1st one

Say you asked to validate 'NM_000059.4(BRCA2):c.-40+1G>C'

Now, I know - but this is biology so it's full of messy data! This is an example from ClinVar submission
If you run it with strict=True it throws HGVSInvalidVariantError "Cannot validate sequence of an intronic variant"
strict = False it returns True (as it was only a warning)

I'd like to see what errors there are - In strict you can also only see 1 issue (the first that causes an exception to be thrown) and strict=False you can see none

I think it's important to separate the concept of "Wrong" and "I can't tell whether it's wrong"

Recommendation:

Add a new method which performs validation, and returns a list of results and messages, sorted by res (ie severity)
We could re-implement the existing validate using this
If you call the new method you can then examine it for the errors you care about (or display them to the user)
For strict - go through the sorted list and throw the worst one. For the warnings (eg "Cannot validate sequence of an intronic variant" I'd throw a subclass of HGVSInvalidVariantError which indicates it's not an error but rather you can't evaluate it - can then handle client code better)

@davmlaw
Copy link
Contributor Author

davmlaw commented Oct 9, 2023

I posted this in HGVS slack but it disappeared after 90 days so re-raising here

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Nov 28, 2023
Copy link

github-actions bot commented Dec 5, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
@reece reece removed stale Issue is stale and subject to automatic closing closed-by-stale labels Dec 8, 2023
@reece reece reopened this Dec 8, 2023
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Mar 11, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
@jsstevenson jsstevenson added keep alive exempt issue from staleness checks enhancement New feature or request and removed stale Issue is stale and subject to automatic closing closed-by-stale labels Mar 19, 2024
@jsstevenson jsstevenson reopened this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request keep alive exempt issue from staleness checks
Projects
None yet
Development

No branches or pull requests

3 participants