Properties

Latest version: v0.6.1

Safety actively analyzes 629564 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 4

0.2.1

New features:
- `properties.validator` wrapper for methods of `HasProperties` classes.
- If this wrapper is used without arguments, the wrapped function becomes a `ClassValidator` that is called on `has_props_instance.validate()`
- If this wrapper is given property name(s) like the `properties.observer` wrapper, then the wrapped function is called on property change. `validator` functions are called before the change; `observer` functions are called after the change.
- `properties.observe` => `properties.observer` rename to match `validator`

Minor changes:
- `choices` is now required on `StringChoices` `__init__` - this fixes problems with validation of default values (ie trying to set and validate default before the choices are set)

0.2.0

This is almost a complete rewrite that is more inline with `traitlets` except that the class namespace is much cleaner. This is quite important as these classes are exposed to interactive use.

This version includes:
- observers
- class _REGISTRY for all subclasses
- better defaults and validators

0.1.5

Bug Fixes
- use `tofile()` instead of `tobytes()` to maintain numpy 1.7 compatibility
- remove unused string format variable in array error
- replace '3point Science, Inc' with '3point Science' in the documentation


v0.1.4-final
Bug Fixes
- Fix a bug where `pre` and `post` values are incorrect in `_on_property_change` when using `+=`
- Remove `equal_nan` in `properties.array.serialize` so numpy requirement >= 1.7 is accurate
- Improve error messaging in `properties.vector`

0.1.3

Major Features
- Pointer ptype may now be the string name of a property class.
- This allows recursive pointers to compile
- Once importing is complete `properties.Pointer.resolve()` resolves these string ptypes into PropertyClass ptypes
- This release introduces and corrects for infinite loops during validation
- PropertyClasses now contain a `_dirty` attribute
- This lists the properties that have been changed
- It recurses into pointers to determine if they are dirty as well
- `_on_property_change` hook fires when properties are changed
- `_mark_clean` makes all properties no longer dirty
- Several non-backwards-compatible variable and method name changes for PEP8 compatibility
- `properties.vmath.Vector` methods `.as*` with camelCase renamed to `.as_*` with no camel case
- `properties.basic.Range` attributes `maxValue` and `minValue` renamed `max_value` and `min_value`
- Other internal name changes are also included

Minor Features
- Color may now be 'random'
- Array properties may only have dtype `float`, `int`, or `(float, int)`. `None` is no longer an option
- 'auto_create' is now an attribute of properties
- The default is `True`
- However it can be set to `False` if an creating a default property class instance is unwanted (or cannot be done due to required initialization parameters)
- 'repeated' properties can now be 'required' so one or more value is required
- Improved `properties.basic.Range` and `properties.basic.RangeInt`
- Broken and incomplete math classes (matrix, plane, and parallelogram) removed

Page 4 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.