Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project attempts to adhere to Semantic Versioning.
Unreleased
Removed
pre-commithooks for line-counting and version checking- Instead, will pull them from external gadzooks repo
0.4.1
2024-04-22
Added
DictConfigclass for configs stored as untyped dictDataclassAdaptablemixin to convert one dataclass to another- Can be used to handle field name collisions in
DataclassMixinsettings
- Can be used to handle field name collisions in
saveandloadconvenience methods forFileSerializable(includesJSONDataclassandTOMLDataclass)
Changed
Config.get_configreturns reference instead of deepcopy- Class hierarchy of
FileSerializable- Split into
TextSerializable,BinarySerializable TextFileSerializablesubclassesBinaryFileSerializable
- Split into
0.3.1
2024-04-16
Added
- Documentation: Badges in README (workflow passing, coverage, docs, etc.)
- CI:
- More GH Actions code checks
- Testing Python versions 3.8-3.12 via
hatchmatrix
Changed
- Top-level
*-imports mostly limited to mixin classes via__all__ - Renamed
Config.configurecontext manager toas_config - Renamed
SubprocessDataclass.argsmethod toget_args
Fixed
- Support for Python 3.8, 3.9 (which lack some newer type annotation features)
0.3.0
2024-04-14
Added
TOMLDataclassfor saving/loading TOML viatomlkit- Support for loading TOML configurations in
ConfigDataclass
- Support for loading TOML configurations in
FileSerializableandDictFileSerializableDataclassmixins to factor out shared functionality between JSON/TOML serialization- Documentation
- Usage examples for
TOMLDataclassandConfigDataclass - Hosting on Read the Docs here
- Usage examples for
- CI: Github Actions to automate building/linting/testing
0.2.0
2024-04-13
Added
ConfigDataclassmixin for global configurations- Customization of
DataclassMixin:DataclassMixinSettingsfor mixin class configurationFieldSettingsfor field-specific settings__post_dataclass_wrap__hook to customize behavior afterdataclassdecorator is applied (e.g. validating fields at definition time)
- Documentation
- Reference pages via
mkdocs-materialandmkdocstrings - Basic usage examples for main mixin classes
- CHANGELOG
- Reference pages via
- Linting via
ruff - Unit tests
- Over 90% code coverage, via
pytest-cov
- Over 90% code coverage, via
Changed
- Build via
hatch - Better flattened/nested dataclass conversions
Fixed
- More robust type handling
0.1.0
2022-06-06
Added
DataclassMixinclass providing extra dataclass featuresArgparseDataclass: command-line argument parsingCLIDataclass: command-line argument parsing andmainfunctionDictDataclass: conversion to/from Python dictJSONDataclass: conversion to/from JSONSQLDataclass: SQL persistence viasqlalchemySubprocessDataclass: call out to another program viasubprocess