SD2E / opil

The Open Protocol Interface Language (OPIL) is intended as a standard language for protocol interfaces
5 stars 1 forks source link

Validate opil.SampleSet template when loading from an opil file #171

Open tramyn opened 3 years ago

tramyn commented 3 years ago

Similar to issue #170, opil==1.0b3.post2 does not validate that an SampleSet must have its template field set. This will be valuable to know when reading in an opil file that this type of condition is satisfied.

bbartley commented 3 years ago

There are a couple ways we might prevent this from happening.

  1. Prevent users from constructing invalid objects. This would necessitate checking that a user has specified required parameters in the constructor call. I believe pySBOL does this type of checking in constructors but OPIL currently does not. This should be slated for the b5 release.
  2. Add SHACL rules in the validation of the OPIL Document. In fact, I believe SHACL already checks that cardinality requirements for a property are fulfilled. However, there is a possible failure mode in which the pySBOL3 serializer inserts dummy values, and this is not currently checked.