Skip to content

Releases: illuin-tech/configue

7.0.0

25 Nov 20:09
12b6d32
Compare
Choose a tag to compare

Breaking changes

  • Remove support for Python 3.8

5.0.0

12 Feb 12:53
7bd2107
Compare
Choose a tag to compare

Breaking changes

  • Remove support for Python < 3.8

Features

  • () can now load object attributes, such as static methods (e.g. (): module.MyClass.generate)

4.2.0

09 Feb 19:22
8edf105
Compare
Choose a tag to compare

Features

  • !ext can now load object attributes, such as enum members (e.g. !ext module.MyEnum.MY_VALUE)

4.1.1

30 Jan 21:01
6918325
Compare
Choose a tag to compare

Fixes

  • Fixed loading !import or !cfg tags in a !cfg tag

4.1.0

03 Aug 13:24
27a0541
Compare
Choose a tag to compare

Features

  • Added a logging_config_path keyword parameter to configue.load to set up a logging configuration while loading a
    configuration file

4.0.1

28 Jul 12:07
9d94742
Compare
Choose a tag to compare

Fixes

  • Loading a null !path will now return None instead of raising an Exception

4.0.0

24 May 07:34
4536ed1
Compare
Choose a tag to compare

Breaking changes

  • The !env tag has been removed, environment variables can now be loaded anywhere
  • The cfg:// syntax has been replaced with !cfg path.to.value
  • !cfg now redirects to a path in the current file (instead of the first loaded file)
    • Use !import to load a path in another file
  • The ext://module.submodule.object syntax has been replaced with !ext module.submodule.object
  • Replaced load_config_from_file with a configue.load function, which is now the main entrypoint of the library
    • use configue.load("/path/to/file.yml") to load a file
    • use configue.load("/path/to/file.yml", "path.to.section") to load only a section of a file
    • loading a path in a file recursively loads all children (replaced the lazy-loading with path loading),
      see README for more details
  • Removed the load_config_from_dict function
  • The !list tag has been removed, set your environment variable to [value_1, value_2] instead

Migration guide

  • Remove all !env tags
  • Remove all !list tags, and replace your environment variables from value1,value2 to [value1,value2]
  • Replace ext://path.to.load with !ext path.to.load
  • If you are using !import to import a file containing values with cfg://path.to.load, replace the cfg://... with
    !import:path/to/root/file.yml path.to.load
  • Replace cfg://path.to.load with !cfg path.to.load
  • Replace configue.load_config_from_file(...) with configue.load(...)
  • Replace configue.load_config_from_file(...)["path"]["to"]["load"] with configue.load(..., "path.to.load")

Features

  • The !import tag can now specify the path to load in the other file, with the syntax:
    !import:path.to.load path/to/file.yml
  • Dictionaries and lists are now JSON dumpable and picklable

Fixes

  • Removed warning about missing environment variables from unloaded paths

3.0.5

21 Feb 10:22
8d534ed
Compare
Choose a tag to compare

Enhancements

  • Added Python 3.10 support
  • Updated PyYAML dependency version

3.0.4

10 Feb 11:32
3beaec9
Compare
Choose a tag to compare

Enhancements

  • Added Python 3.9 support

Fixes

  • Fixed DeprecationWarning on collections import