seisflows.tools.msg
SeisFlows messages tool. For providing a uniform look to SeisFlows print and log statements that end up in stdout or in log files.
Module Contents
Functions
|
Message formatter used to block off sections in log files with visually |
|
Message formatter used to block off sections in log files with visually |
|
Message formatter used to block off sections in log files with visually |
|
Provide a standardized look to the SeisFlows command line interface messages |
Attributes
- seisflows.tools.msg.DEG = °
- seisflows.tools.msg.mjr(val, char='=')
Message formatter used to block off sections in log files with visually distinctive separators. Defined as individual functions to reduce call length.
Major: For important or workflow.main() messages like starting workflow
>>> print(msg.mjr(“Important message here”)) or >>> logger.info.(msg.mjr(“Important message here”))
- Parameters
val (str) – formatted message to return
char (str) – border character to separate the message from remainder of logs
- Return type
str
- Returns
formatted string message to be printed to std out
- seisflows.tools.msg.mnr(val, char='/')
Message formatter used to block off sections in log files with visually distinctive separators. Defined as individual functions to reduce call length.
Minor: For key messages, describing things like what iteration were at
>>> print(msg.mnr(“Semi important message here”)) OR >>> logger.info.(msg.mnr(“Semi important message here”))
- Parameters
val (str) – formatted message to return
char (str) – border character to separate the message from remainder of logs
- Return type
str
- Returns
formatted string message to be printed to std out
- seisflows.tools.msg.sub(val, char='-')
Message formatter used to block off sections in log files with visually distinctive separators. Defined as individual functions to reduce call length.
Sub: For sub-critical messages, describing things like notes and warnings
>>> print(msg.mnr(“Sub-critical message here”)) OR >>> logger.info.(msg.sub(“Sub-critical message here”))
- Parameters
val (str) – formatted message to return
char (str) – border character to separate the message from remainder of logs
- Return type
str
- Returns
formatted string message to be printed to std out
- seisflows.tools.msg.cli(text='', items=None, wraplen=80, header=None, border=None, hchar='/')
Provide a standardized look to the SeisFlows command line interface messages The look we are after is something like:
- $ seisflows cmd
text item1 item2 … itemN =======================
$ ls -l
- Parameters
text (str) – text to format into the cli look
items (list) – optional list of items that will be displayed on new lines after the text. Useful for listing parameters or paths. The items here are NOT wrapped.
wraplen (int) – desired line length to wrap messages.
header (str) – optional header line that will be centered (wraplen/2) and capitalized. Useful for things like ‘WARNING’ and ‘ERROR’
border (str) – a character to use to block off
hchar (str) – character to underline the header with
- Rtype output_str
str
- Return output_str
formatted string to print out
- seisflows.tools.msg.base_parameter_file = Multiline-String
Show Value
1# ////////////////////////////////////////////////////////////////////////////// 2# 3# SeisFlows YAML Parameter File 4# 5# ////////////////////////////////////////////////////////////////////////////// 6# 7# Modules correspond to the structure of the source code, and determine 8# SeisFlows' behavior at runtime. Each module requires its own sub-parameters. 9# 10# .. rubric:: 11# - Determine available options for modules by running: 12# > seisflows print modules 13# - Auto-fill with docstrings and default values (recommended) by running: 14# > seisflows configure 15# - Swap out module parameters for a configured parameter file by running: 16# > seisflows swap {module} {name} (e.g., seisflows swap solver specfem3d) 17# - To set values as NoneType, use: null 18# - To set values as infinity, use: inf 19# 20# MODULES 21# /////// 22# workflow (str): The types and order of functions for running SeisFlows 23# system (str): Computer architecture of the system being used 24# solver (str): External numerical solver to use for waveform simulations 25# preprocess (str): Preprocessing schema for waveform data 26# optimize (str): Optimization algorithm for the inverse problem 27# ============================================================================== 28workflow: forward 29system: workstation 30solver: specfem2d 31preprocess: default 32optimize: gradient
- seisflows.tools.msg.ascii_logo = Multiline-String
Show Value
1 @@@@@@@@@@@@@@@@@@@@@@@ 2 @@@@@@@@@. .(%@&#( %@@@. 3 /@@@@@@@& *@@@@@@@@@& ,@@@@ @@( 4 @@@@@@@@ @@@@@@@@ &@@@@@@@@@@@@@ .@% @@ 5 *@@@@@@@ @@@@@@@ (@@@@@@ @@ @@ @* 6 @@@@@@@ @@@@@@@, /@@@@@ @ @ @@ 7 &@@@@@@ @@@@@@@. @@@@@@ @ @ @& 8 @@@@@@@ @@@@@@@ @@@@@@ @@ @ @ 9 %@@@@@@ @@@@@@@@ @@@@@@ @@ @ @& 10 @@@@@@@ @@@@@@@@ @@@@@@ @* @ (@ 11 @@@@@@@ @@@@@@@ @@@@@@ @@ @@ @@ 12 @@@@@@& @@@@@@@@ ,@@@@@@/ .@@ .@& @ 13 @@@@@@@ @@@@@@@@ @@@@@@@ @@@ @@ ,@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