Releases: valentingol/cliconfig
v0.7.0
New features ✨:
- New processing timing: end-build (at the end of the config building with
make_config
orload_config
), withendbuild
method ProcessDelete
with tag@delete
to delete a key at the end of pre-merge.- Supports multi files in yaml documents (with "---" separator)
- Supports yaml tags instead (or in addition) to cliconfig tags, e.g:
'key': !tag1@tag2 value
instead of'key@tag1@tag2': value
parse_cli
's default value is True for CLI parameter
📝 Better docstrings for sphinx
🚀 Improve behavior of ProcessCopy
and ProcessTyping
v0.6.0
✨ New features:
is_tag_in
: tag routine to check if a tag is in a key with robustness (useful in all processing dealing with tags)ProcessSelect
processing that remove a sub-config except selecting keyscreate_processing_keep_property
: helper function to make processing that maintain property of a parameterProcessTyping
now supports nested types (nested with nodes List, Dict, Union, Optional)
✔️ Add complex integration test with @select, @merge_add, @type and @copy
🚑 Fix a bug where an error was systematically raised when make_config
or load_config
were called with a custom process_list
v0.5.0
✨ Introduce Config
classs that is a dataclass containing 2 attributes (no methods): the config dict and the list of processing
v0.4.0
🎉 Processings !
This release bring the processings to the config routines (merge, load, save). It is possible to apply any function that modify a configuration after and before merging, after loading and before saving. The processings use the list of processing to apply processings recursively via the routines. To use processing, the tags are usefull (like {'config.param@mytag': value}
). The processings can then trigger on a any tagged key.
Processing module:
-:sparkles: make_processing functions: helpers to create simple processing
- ✨ Built-in processing
ProcessMerge
(associated to tags @merge_before/after/add) that allow dynamic config merging just in time. - ✨ Built-in processing
ProcessCopy
(associated to tag @copy) that allow copying a parameter just before merging. - ✨ Built-in processing
ProcessTyping
(associated to tag @type:) that enforces the type of a parameter. - ✨ tag routines to facilitate the manipulation of tags
- 📝 ✔️ Doc and associated tests
v0.2.0
- ✨ add
merge_config_file
to merge from path (=merge_config
that includes
config loading) - ✨ add
clean_pre_flat
to solve conflicting flatten and unflatten parameters
before flattening the config - 🚀 avoid changing keys order in merge_config
- 📝 improve readmes indications and improve docstring examples
- 🏗️ architectural changes in
cliconfig
v0.1.2
Working cliconfig
module to make and manipulate configs with yaml files merging and CLI.
- ✨
make_config
to make config merging from default configs, additional configs and parameters in CLI. - ✨
merge
to merge two configs together. Support nested config, flat configs (with '.' delimiter) and mix of two. - ✨
save_config
andload_config
to save and load config. - ✨
show_config
to visualize config in pretty way. - 📝 Complete documentation with Read the Docs here
- 🎨 10/10 pylint, ruff (flake8 + extensions) and mypy are happy
- ✔️ 100% test coverage and integration test for
show_config