Simplify scripts to use dictionary for configuration settings
Closed this issue · 0 comments
Summary
Currently the scripts have specific handling of optional inputs in addition to the config parsing done by the main default configuration file. This has grown as every script is used and customization is needed. In LD-Cool-P, we managed to refactor this to load the configuration settings
as a dict. A similar approach is desired in this case.
Motivation
Allows for greater flexibility in parsing in configuration files. Having a single function that does this for all scripts will make the codebase more stable.
Objectives
Scripts are executable in the same manner with the same sets of inputs with significant reduction in number of lines of codes.
Proposal
- A primary function in
commons
should be created to implement the loading of contents into a dict - Another function exists to use input arguments to update the above dict - This was incorporated into first step
- Since logging is conducted, another function (possibly separate from above) is needed to log set status, etc. - CL: Not sure what I meant here. Revisiting, I don't think this is needed.
- Implementation should begin in
script_run
and tested - Implementation in other scripts
-
user_update
-
add_grouper_groups
-
get_org_code_numbers
-
- Refactoring of settings/argument logs via
log_settings
function - CI build testing and unit tests on dev environment
Testing notes
See above. More to follow
Implemented in: feature/104_config_dict