Merging yaml config and set parameters with CLI. Use config processing for more advanced manipulations.
MIT License
Published by valentingol 10 months ago
Published by valentingol 10 months ago
Published by valentingol 11 months ago
Published by valentingol over 1 year ago
Major release 1.0.0 🎉
Since the release 1.0.0 the library is considered as sufficiently stable to be used by everyone. No breaking changes will be introduced until 2.0.0 (if it will exist someday).
📝 Shorten the readme (most information are in documentation).
✨ New argument no_cli
in make_config
to deactivate the CLI parsing
Published by valentingol over 1 year ago
✨ New features of create_processing_value/keep_property
:
create_processing_value
(premerge, postmerge, ...)Published by valentingol over 1 year ago
Beta 4 version
✨ Add ProcessNew
associated to @new
tag to add new keys absent from current config dict.
Any collaborator can use this library to test it in their real projects.
Issues, features requests, enhancement request are welcolme as well as PR! hugs
Published by valentingol over 1 year ago
Beta 3 version
✨ Getting, setting and deleting parameters via config attributes (ex config.training.optimizer.lr = 0.001
)
Any collaborator can use this library to test it in their real projects.
Issues, features requests, enhancement request are welcolme as well as PR! 🤗
Published by valentingol over 1 year ago
Beta 2 version
✨ Add fallback option in make_config
Any collaborator can use this library to test it in their real projects.
Issues, features requests, enhancement request are welcolme as well as PR! 🤗
Published by valentingol over 1 year ago
Beta 1 version
Any collaborator can use this library to test it in their real projects.
Issues, features requests, enhancement request are welcolme as well as PR! 🤗
Published by valentingol over 1 year ago
New features ✨:
make_config
or load_config
), with endbuild
methodProcessDelete
with tag @delete
to delete a key at the end of pre-merge.'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
Published by valentingol over 1 year ago
✨ 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
Published by valentingol over 1 year ago
✨ Introduce Config
classs that is a dataclass containing 2 attributes (no methods): the config dict and the list of processing
Published by valentingol over 1 year ago
🎉 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:
-✨ make_processing functions: helpers to create simple processing
ProcessMerge
(associated to tags @merge_before/after/add) that allow dynamic config merging just in time.ProcessCopy
(associated to tag @copy) that allow copying a parameter just before merging.ProcessTyping
(associated to tag @type:) that enforces the type of a parameter.Published by valentingol over 1 year ago
merge_config_file
to merge from path (= merge_config
that includesclean_pre_flat
to solve conflicting flatten and unflatten parameterscliconfig
Published by valentingol over 1 year ago
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
and load_config
to save and load config.show_config
to visualize config in pretty way.show_config