2.15. log_change module
This is an interactive script that generates a changelog entry for any changes implemented to real time RRFS runs. It asks the user a variety of RRFS-specific questions, interrogates the UFS SRW App and its 1st-level Externals (submodules) to determine if they are consistent with the code on disk, and generates a log file with relevant tracking information.
Note: It is important to continue to use this logging script, even for changes that occur outside the clone, even though those changes will not be captured in the git information for the log file.
The log file will be appended to those in /misc/whome/rtrr/RRFS/
Requirements:
Python 3.6+
Conda Environment:
module use /contrib/miniconda3/modulefiles module load miniconda3 module load workflow_tools
Usage:
python log_change.py -h
- class log_change.cd(newPath)[source]
Bases:
objectContext manager for changing the current working directory
- log_change.get_repo_info()[source]
Get the hashes that are currently checked out in each repository. Report on differences between hashes checked out and those in Externals.cfg, as well as differences that exist on disk.
- log_change.isbool(string)[source]
Returns a bool after checking whether the input string meets the requirements for a yes/no answer.
- log_change.isdate(string)[source]
Returns a bool after checking whether the input string meets the requirements for a date string: YYYYMMDDHH.
- log_change.isdomain(string)[source]
Returns a bool after checking whether the input string meets the requirements for a domain, or list of domains
- log_change.load_externals(ext_path='Externals.cfg')[source]
Use configparser to load the Externals.cfg info. Return the dict