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

Added note on validation service changing; Added error table #199

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ESapenaVentura
Copy link

@ESapenaVentura ESapenaVentura commented Oct 9, 2024

  • submit/samples.rst:
    • Added note on validation service change, linking to sample_checklist_errors.md
  • submit/samples/sample_checklist/sample_checklist_errors.md:
    • Added an error table with some clarifications on old vs new error messages.

Please let me know if the place/format is correct or not, as I was not entirely sure!

ebi-ait/checklist#107


| **XML validation (old)** | **BioSamples validation (New)** |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Error at {<sample-name>}. Invalid units "{value-of-units}" for field "{<attribute-name>}". Allowed units are "{<list-of-allowed-values>}" | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must be equal to one of the allowed values:{list-of-allowed-values} |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a space after all the colons, in all other error messages and in the app itself. Is there a reason for not using spaces after the colons?

Suggested change
| Error at {<sample-name>}. Invalid units "{value-of-units}" for field "{<attribute-name>}". Allowed units are "{<list-of-allowed-values>}" | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must be equal to one of the allowed values:{list-of-allowed-values} |
| Error at {<sample-name>}. Invalid units "{value-of-units}" for field "{<attribute-name>}". Allowed units are "{<list-of-allowed-values>}" | sample:{<sample-name>}; attribute: {<path-to-attribute>}; reason: must be equal to one of the allowed values: {list-of-allowed-values} |

Copy link
Author

@ESapenaVentura ESapenaVentura Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it without spaces to make it more easy to tokenise (one char vs 2), but happy to hear people on this, I don't have a strong preference to be honest

| Error at {<sample-name>}. The length of field "{<attribute-name>}" value "{<value-provided>}" exceeds the maximum allowed length "{<maximum-length-of-field>}". | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must NOT have more than {<maximum-length-of-field>} characters |
| Error at {<sample-name>}. The value "{<value-provided>}" for field "{<attribute-name>}" does not match regular expression "{<pattern>}" | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must match pattern {<pattern>} |
| Missing mandatory field "{<property-name>}". | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must have required property {<property-name>} |
| Missing recommended field "{<property-name>}". | **DEPRECATED**. Recommended field validation will no longer be supported. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. Did missing recommended fields appear as errors in the XML validation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the file I got with the list of errors, it is listed (ERAM.2.1.8=Missing recommended field "{0}".)

| Error at {<sample-name>}. The value "{<value-provided>}" for field "{<attribute-name>}" does not match regular expression "{<pattern>}" | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must match pattern {<pattern>} |
| Missing mandatory field "{<property-name>}". | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must have required property {<property-name>} |
| Missing recommended field "{<property-name>}". | **DEPRECATED**. Recommended field validation will no longer be supported. |
| Error at {<sample-name>}. Field "{<property-name>}" may only occur once. | sample:{<sample-name>}; attribute:{<path-to-attribute>}; reason:must NOT have more than 1 items |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we simulate such an error?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, but that's Biovalidator's error for when maxItems : 1 fails

| A symonym was used for field "{<property-name>}". Replacing value "{<synonym-property-name>}" with value "{<property-name>}" | **DEPRECATED**. Synonym validation and processing will no longer be supported. |


Please note: The new sample validation service may catch more errors that do not have an equivalent on the old service.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an example?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have an exhaustive list (As I am not sure of all the possible events that may happen validation-wise), but I do have one in mind: If my memory serves me well, XML validation does not validate synonym fields, whereas we added the error on the oneOf to ensure only 1 synonym appears in a document

@amnonkhen
Copy link

Please add link to the ticket.

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

Successfully merging this pull request may close these issues.

2 participants