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

Validator should return a warning message when a synonym is used instead of a preferred label #35

Open
jamesaoverton opened this issue Oct 7, 2020 · 1 comment
Assignees

Comments

@jamesaoverton
Copy link
Contributor

I'm not 100% sure about this, but I think we should implement it and see how it works.

When the user submits a synonym instead of a preferred name for MHC Name or Modification Name, the validation functions should return a message with "level": "warn" and "fix" the suggested value. The message should be something like "Replace synonym 'foo' with preferred label 'FOO'".

If validation returns warnings but no errors, then I would say that validation is successful. If there's at least one error then validation has failed. This makes the return value of the validate function a little harder to interpret than it was before. So we should add a function errors that takes a list of messages and returns just the errors (or an empty list). Likewise a warnings function might be useful.

The command line tool should print errors and warnings. If there are only warnings and no errors, the command line tool should exit with status 0 (success). If there are any errors, the command line tool should exit with status 1.

When we return data to the user that they might resubmit, we want to make the substitution for the preferred label. Then if they resubmit there should be no warnings.

The HTML form should substitute the preferred value and print the warning message.

When a user uploads an Excel file, we should return an Excel file with the substitutions made and those cells highlighted in yellow with the message.

@apmody
Copy link
Contributor

apmody commented Oct 8, 2020

Partly implemented in pull request #33

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

No branches or pull requests

2 participants