Skip to content

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

@jamesaoverton

Description

@jamesaoverton

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions