Skip to content

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.6.0.dev] - Unreleased

Added - 0.6.0

  • Protocol classes so that we can use structural typing for function parameters and return types: ParameterContainerProtocol, ParameterContainerSectionProtocol, UpdateableParameterContainerProtocol;
  • Configuration - and settings parameters for the package application_settings itself, namely the import string for the Config class / the Settings class that the application uses and whether or not to use application_settings in strict mode.

Fixed - 0.6.0

  • Toml files read with tomlkit need to be unwrapped before processing with pydantic.

Removed - 0.6.0

  • Type alias PathOpt, use Optional[Path] instead (breaking)

[0.5.0] - Released 2024-10-12

Added - 0.5.0

  • Enable file inclusion for json config files (Issue #79)
  • Document parameters by means of docstrings according to (the rejected) PEP224 (Issue #140)
  • Allow to specify the container class that takes care of loading in the parameter file rather than in code (Issue #237)
  • Introduced a ParameterKind enum.

Changed - 0.5.0

  • Use tomlkit instead of tomli and tomli-w (non-breaking)
  • Rename literal SectionTypeStr to ParameterKindStr (breaking).

[0.4.0] - 2023-12-11

Added - 0.4.0

  • Added a GitHub action for PyPi deployment
  • Check for presence of the dataclass decorator (Issue #76)
  • Enable file inclusion for toml config files (Issue #67)
  • Added logging (Issue #17)
  • Added a recipe for handling configurable initialization of module global variables and class variables

Changed - 0.4.0

  • pydantic.dataclasses.dataclass and pydantic.ValidationError now exported from our namespace (Issue #36)
  • Exceptions added to docstrings (Issue #16)
  • Upgraded pydantic to version 2.0, which has a different way of doing type conversion, see the conversion table (Issue #75)

[0.3.0] - 2023-06-21

Added - 0.3.0

  • Multiple versions of documentation served on Github Pages.
  • You can now request a (re-) load when setting the filepath or via a method load.
  • You can choose whether or not to throw a FileNotFoundError during load when the parameter file is not found in the expected location (Issue #51)
  • Support for parameters in the main container (Issue #20).
  • Support for subsections (arbitrary depth) (Issue #5).
  • Sections also stored as a singleton, so that libs can define and access parameters via their own Section (Issue #46).
  • Literal SectionTypeStr exported.
  • Convenience functions to specify filepath for config and settings via command-line [#53]

Changed - 0.3.0

  • The method update now is a class method (breaking).
  • You cannot request a reload via method get anymore, use separate method load (breaking).
  • A Container now is a specialization of a ContainerSection.

Fixed - 0.3.0

  • Default folder name no longer just a dot if container class is called Config or Settings.

[0.2.0] - 2023-03-19

Added - 0.2.0

  • Files can be formatted as toml or json.
  • Introduced settings, i.e., read-write parameters (where config is read-only).
  • Now also useable with python 3.9.
  • Documentation extended and served on Github Pages.

Changed - 0.2.0

  • File path for config / settings now via set_filepath() and no longer as argument of get().

[0.1.0] - 2023-02-13

Added - 0.1.0

  • Loading a toml file.
  • Initializing a dataclass with the loaded toml and storing it as a singleton.
  • Default path, folder and file name.
  • Specification of a config file path via argument of get().
  • Validation using pydantic.
  • README that explains it all.