v2.0.0
·
54 commits
to refs/heads/main
since this release
🗒️ Summary
v2.0.0 brings Liminal closer to reaching 100% parity with Benchling Entity Schemas. This release introduces the ability to define namesets, chip naming properties, and constraints on your Liminal entity schema models. Validation has also gone through a major change making it MUCH easier to define custom business logic as validation rules for entities. Now, users can use the @liminal_validator
decorator to define validation functions within Liminal models. When TestSchema.validate() is run, these decorated functions are run on all queried entity rows from the Benchling warehouse, catching any Exceptions
raised and returned a BenchlingValidatorReport
.
constraint_fields
,include_registry_id_in_chips
,use_registry_id_as_label
added to SchemaProperties parameters.__name_template__
can now be defined on Liminal models

- New pattern for defining validation rules
from liminal.validation import ValidationSeverity, liminal_validator
class Pizza(BaseModel, CustomEntityMixin):
...
@liminal_validator
def cook_time_and_temp_validator(self) -> None:
if self.cook_time is not None and self.cook_temp is None:
raise ValueError("Cook temp is required if cook time is set")
if self.cook_time is None and self.cook_temp is not None:
raise ValueError("Cook time is required if cook temp is set")
Next release will aim to finish off coverage for Entity Schemas!
🌠 Major Enhancements
- refactor validators to be decorator (#68) @ndamania00
⭐️ Minor Enhancements
- Add coverage for namesets (#88) @ndamania00
- cover chip naming (#84) @aarushgarg1110
- add coverage for constraints (#82) @ndamania00
🐞 Bug Fixes
- Handle no schemas imported gracefully (#100) @ndamania00
- move prefix warning to validate_model (#98) @samsonjoyce
- ignore non .py files in versions dir (#96) @samsonjoyce
📔 Documentation
- update documentation with v2.0.0 release (#101) @ndamania00
🚧 Tasks
- update order indexes (#89) @ndamania00