Skip to content

v0.2.2 - Sphinx AutoDoc; Improved List, Union, and Instance Properties

Choose a tag to compare

@fwkoch fwkoch released this 24 Oct 20:43

New Features

  • Sphinx documentation generated for HasProperties classes in the metaclass based on the class's properties

Minor Changes:

  • required properties may now have default values. On validate, a required property cannot be None or undefined
  • assert_valid ensures HasProperty classes are valid
  • List:
    • List properties are now lists of a given property type. A HasProperties class can also be provided - this is coerced into an instance property of that class.
    • validation errors raise list errors rather than errors of the property type
    • assert_valid validates HasProperties instances only
    • list now has min/max length property
  • Union:
    • Similar to list, Union now allows HasProperties classes, coercing them into Instance properties
    • Union was moved to base from basic
  • Uid:
    • assert_valid ensures the uid has not been tampered with
  • Additional testing of the new features
  • Improved docstrings