Chore: Refactor commonly set of codes in scripts
Closed this issue · 0 comments
astrochun commented
Summary
Similar to UAL-RE/LD-Cool-P#173, there are a number of blocks of codes.
The common block of codes are:
- Creating log with
LogClass
->log_setup
function - Logging the ReQUIAM version control info
- Logging information about the system
- Logging script completion
- Changing permissions of the log file
- Common function to create log file,
log_setup
inlogger
module
Since these are alllogging
related, it may be best to have this under the logger module
Outside of logging, there are also:
-
git
info (this can be simplified). SeeGitInfo
Objectives
Fewer codes to maintain
Proposal
- This can be a feature branch so it's portable to merge into other feature branch.
- Use type hinting for these new functions/method. It may be better to have this as an object, e.g.,
CommonsLogs
Testing notes
Since this will touch the scripts and most of them are not tested, manual testing will be required of:
-
script_run
-
user_update
-
add_grouper_groups
-
get_org_code_numbers
Additional notes
Implemented in: TBD