Release Notes

1.1.0

Release Summary

This release add support for AnyConfig

New Features

  • New model: cfgtree.models.anyconfig.AnyConfigModel, that automatically loads configuration file from a large variety of file formats: ini, json, pickle, properties, shellvars, xml, yaml
  • No more need to specify both ConfigFileCfg and default_filename in storage class. Now, when trying to load the configuration file, the models search for a ConfigFileCfg type argument and inject its default_filename value.

1.0.0

Release Summary

This is the first 1.0 release. It includes a major rework of the cfgtree internal code and API.

Upgrade Notes

  • rename EnvironmentConfig to ConfigBaseModel
  • add type: FloatCfg
  • rename type FileVersionCfg to ConfigVersionCfg
  • remove short parameter for type definition:

    • l to long_param
    • s to short_param
    • h to summary
  • Please note the API is not compatible with previous version. You need to manually update your application.
  • EnvironmentConfig is renamed ConfigBaseModel.

    config_storage is renamed storage.

    cfgtree is renamed model.

    From:

    from cfgtree.cfgtree import EnvironmentConfig
    
    class MyAppConfig(EnvironmentConfig):
    
        config_storage = ...
    
        cfgtree = ...
    
        ...
    

    To:

    from cfgtree import ConfigBaseModel
    
    class MyAppConfig(ConfigBaseModel):
    
        storage = ...
    
        model = ...
        ...
    
  • DopplerrJsonConfigFile has been moved to cfgtree.storages.json and its fields has been renamed.
  • Type short argument h=, l=, s= has been renamed to more meaningful name.
    • l=: long_param
    • s=: short_param
    • h=: summary
    • r=: required

Deprecations

  • Type UserCfg has been deprecated. Use StringCfg instead.

0.1.1

Release Summary

New version increase the user documentation.

New Features

  • User documentation at readthedocs
  • API documentation

0.1.0

Release Summary

First release of cfgtree. It only support basic features, that was needed for the main project I was using it internally.

New Features

  • Only simple feature are supported on this version, single json configuration file, argparse command line parser and a bunch of setting types.
  • Note the API may change on the next version.
  • Current support:
    • File storage: - json (JsonFileConfigStorage)
    • Command line parser: - argparse
    • Settings types: - BoolCfg - ConfigFileCfg - DirNameCfg - HardcodedCfg - IntCfg - ListOfStringCfg - MultiChoiceCfg - PasswordCfg - SingleChoiceCfg - StringCfg - UserCfg