Skip to content

v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 09 Feb 13:25
· 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
Screenshot 2025-02-05 at 10 30 40 AM
  • 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

⭐️ Minor Enhancements

🐞 Bug Fixes

📔 Documentation

🚧 Tasks