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

Validate Parameter.required when loading from an opil file #170

Open
tramyn opened this issue Mar 24, 2021 · 2 comments
Open

Validate Parameter.required when loading from an opil file #170

tramyn opened this issue Mar 24, 2021 · 2 comments

Comments

@tramyn
Copy link

tramyn commented Mar 24, 2021

When loading an opil file with a ProtocolInterface, opil==1.0b3.post2 does not validate that a required field must be present for each opil.Parameter. Since this is a required field that must appear in a Parameter object, it will be valuable to have opil validate that this field is set when loading opil from a file.

@bbartley
Copy link
Collaborator

Hi @tramyn required Parameters are currently checked by the SHACL validator. Does this test case here cover the use case you are describing?
https://github.com/SD2E/opil/blob/master/test/test_opil.py#L46

This validation is not automatically checked when loading a file, but you can call doc.validate after doc.read to check it.

@tramyn
Copy link
Author

tramyn commented Mar 30, 2021

@bbartley the linked test case matches my description. I'll update IP to use doc.validate after performing doc.read. Thanks!

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