SD2E/opil

Validate opil.SampleSet template when loading from an opil file

tramyn opened this issue · 1 comments

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.

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.