Releases: haxsaw/hikaru
Releases · haxsaw/hikaru
Connecting to Kubernetes, integrating your own subclasses
- Integrated the official Kubernetes Python client; now you can make Kubernetes calls through Hikaru classes and methods.
- Added a subclass registration mechanism that allows you to create subclasses of Hikaru classes and have Hikaru use them when needed (some limitations apply).
- Reorganized the model subpackage to pave the way for later support of multiple versions of the Kubernetes client.
- Improved the output of dff() to give more detailed reporting of what changed between two versions of a Hikaru object.
- Changed code annotation generation approach so cyclic structures are now supported directly; no more workarounds for items like JSONSchemaProps.
- Added a 'documents' module to every model version package; this contains only references to top-level Hikaru classes.
- Fixed known bugs.
- Updated all docs.
Round-tripping through JSON, more methods on HikaruBase
- Added support a new two new styles of generated code from
get_python_source()
: the 'black' style, using the 'black' formatter, and None, which outputs syntactically correct Python but with no formatting at all (this is the fastest generation option and is good if the code is going to be dynamically executed). - New
get_type_warnings()
method on HikaruBase objects; compares actual values with the types currently populating an instance, and looks for required values that are missing. Generates a list of warning records for any problems found. - New
diff()
method of HikaruBase; compares to object hierarchies and generates difference records indicating where they are different. - Removed dead code.
- Improved and documented all exceptions that are raised.
- Added support for round-tripping between YAML, Python objects, Python source, JSON, and Python dicts. You can now start with any of these, move between them, and get back the original representation.
- Raised testing coverage to 99% overall.
- Documentation updates; includes a section on patterns and recipes.
Dict value quoting fix
This fixes the issue that values of generated Python dicts always were quoting their values. They are now only quoted when appropriate.