Provide configuration options for the CRT Runner
Parameters: | config_file (The path to a yaml file or a yaml stream) – A YAML file in the expected format |
---|
Provide list of crt warnings from config file
Returns: | A list of regular expression search strings |
---|
Provide text for a specific type of email
Parameters: |
|
---|---|
Returns: | The field value |
Raises AssertionError: | |
if the email_type or field is not in the config file |
Provide requested information about the institute
Parameters: |
|
---|---|
Returns: | The field value |
Raises AssertionError: | |
if the institute or field is not in the config file |
Provide timestamp for when the CRT.pl was last run
List of institutes :return: List of institutes :rtype: list
Provide path to local institute folder
Provide user friendly warning for a given warning
Parameters: | crt_warning (str) – The warning regular expression string |
---|---|
Returns: | The user friendly text associated with that input warning |
The yaml file should include the following items:
Each of these fields should be listed under the institute name:
Each of these fields should be listed under the email type:
This should be a list where each field has the following entries:
The crt_warning section can have regular expression groups eg (.*) . These captured groups will be substituted for the character X in the associated user_friendly_warning
path_to_perl_script: '/path/to/script'
mandrill_api_key: 'API SECRET'
from_email: 'national@tfa.org'
from_name: 'National Overloard'
cm_file_base_name: '_CMs.xls'
collab_file_base_name: '_collabs.xls'
user_settings_base_name: '_user_settings.txt'
box_access_token_file: /path/to/box_access_token.txt
box_refresh_token_file: /path/to/box_refresh_token.txt
box_client_id: ae399afe
box_client_secret: eafegead
box_sync_modify_dates: /path/to/modify_dates.yaml
root_box_folder_name: collab_test
root_local_folder: /path/to/sync_folders
emails:
sample_email:
subject: 'email subject'
body: 'email body'
institutes:
Atlanta:
ddm_name: 'Nick'
ddm_email: 'ddm.nick@gmail.com'
path_to_folder: 'path/to/folder'
file_prefix: 'ATL'
warnings:
-
crt_warning: 'Sample warning'
user_friendly_warning: 'Warning to be displayed'
-
crt_warning: 'Warning about (.*) CMs'
user_friendly_warning: 'Display warning about X CMs'