Python library with common functionality for other Waikato projects.
Python library with common functionality for other Waikato projects. Changelog =========
- Removed Rational class as a better implementation is provided by fractions.Fraction.
- Several changes to CLI classes:
- Can query the optionality of all option types.
- Default values are now unchecked.
- TypedOption no longer produces lists of lists for certain combinations of nargs and action.
- Argument parsers log by default (instead of printing to stdout/stderr).
- Can now get all registered classes from a ClassRegistry.
- Added a partial implementation of rational numbers.
- Bug fixes.
- Initial values for options on CLIInstantiable objects can be specified in internal format.
- Bug fixes.
- Additional functionality for ClassRegistry.
- New cli Option, ClassOption, selects from a predefined set of classes.
- import_code can now optionally bypass aliasing of inner classes.
- meta.code_repr package for representing values as Python code.
- Fixed bug in Option descriptors which prevented them from working with generic option-handlers in Python3.6.
- Added LazyDescriptor.
- Added function to get the fully-qualified name of a class.
- Added function to get the import code for a class.
- Added ClassRegistry class.
- Added meta-constants module.
- Added command-line utilities.
- Fixed typing bug in dynamic_defaults.
- Added dynamic defaults.
- Added function to get the kwargs that are supplied to a function (non-default).
- Added decorator ensure_error_type which wraps exceptions not of a particular type in that type.
- Removed json package, now in its own repository, wai-json.
- Added instanceoptionalmethod, a decorator for methods which can be called from either the class or an instance, and take whichever they are called from as their first argument.
- Added LoggingMixin, which adds logging support to classes.
- Added serialisation utilities.
- Added utility for a standard library logger.
- Added logging utilities package, with utility for a standard root logger.
- Added extra methods to Polygon, Point.
- Reworking of JSON configurations to unify value setting between internal and JSON values.
- Adding caching of non-varying calculated attributes to improve serialisation time.
- Added PathContextManager, which is a context manager which changes the cwd temporarily.
- Added ensure_path, which creates a directory if it doesn’t exist.
- Added TypeVarProperty, for easier caching of dynamic type variables.
- Added depth argument to flatten (iterators and sequences).
- Added support for ADAMS report files.
- Added basic support for geometry.
- Added support for working with located objects in image-classification/identification tasks.
- Bug fixes.
- Configuration schema caching is now lazier than ever.
- JSON serialisation now validates in both directions.
- Fixed bug in Configuration where cached schema were preventing grand-inheritance.
- Added support for checking Python versions.
- get_argument_to_typevar now works with Python3.6 and Python3.7.
- Fix so that JSON schema definitions propagate through all composite schema.
- JSON schema package now has tools for working with references/definitions.
- Configurations now validate additional properties as JSON by default.
- Added StrictConfiguration, which disables additional properties by default.
- Minor fixes.
- Fixed bug in get_argument_to_typevar.
- Added new property type for configurations, MapProperty, which behaves like a dict from strings to some sub-property type.
- Configurations now support: validation of additional properties, initialisation by value or JSON, programmatically getting/setting additional properties.
- Added meta package for typing functionality.
- Fixed bug where Absent was being validated after Property.validate_value had checked it, and therefore failing.
- Added interfaces for serialising/deserialising JSON using custom representations.
- Added exception package to meta package for processing exceptions. Currently only contains ExceptionChainer, which captures exceptions as a context-manager and then provides methods for processing them.
- Added utility interface JSONValidatedBiserialisable.
- Refactored configurations and properties to be more understandable.
- Added AnyOfProperty.
- Two new iterable functions, all_meet_predicate and any_meets_predicate.
- Added meta-functions for determining if methods in base-classes have been overridden by sub-classes.
- Rejigged abc package.
- Added JSON package, with tools for working with JSON and JSONSchema. Also specifies the configuration class, which allows for easy manipulation of JSON files in an object-oriented manner.
- Added load_dir function to file package, which can load all files in a directory.
- Added is_hashable to test if an object is hashable.
- Added Interval class representing intervals on the number line.
- Added exception InvalidStateError for classes that get into an invalid setup.
- Added typing module for type-related functionality.
- Added first, which finds the first element of an iterable to match a predicate.
- Added statistics package with quartile functions.
- Added random, which returns the elements of an iterator in random order.
- Added meta package, with functions to set and retrieve arbitrary meta-data against objects.
- Added ConstantIterator class, which returns the same value over and over again.
- Added metadata module to iterate, for working with metadata in iterables of objects.
- Modified TwoWayDict so type-inference works with Python-3.7.
- Removed restriction that switch only work with enums. Now can switch on any type. Onus is on the user to handle modifications of the switched value during switching.
- Added abc package, with utilities for working with abstract classes/methods.
- Added decorator package, with custom decorators.
- Initial release
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size wai.common-0.0.31.tar.gz (94.7 kB)||File type Source||Python version None||Upload date||Hashes View|