Package
DHyDAMO Package¶
Top-level package and shared modules.
D-HyDAMO: build D-HYDRO models (1D2D, RR, RTC) from HyDAMO data with HYDROLIB-core.
__version__ = '0.5.1'
module-attribute
¶
Configure logging for hydrolib.dhydamo without adding duplicate handlers.
Calling it again with the same stream or file does not add another handler, so a notebook cell can be run more than once.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
int or str
|
Lowest level that is logged, e.g. |
INFO
|
fmt
|
str
|
Format of each message, see |
DEFAULT_FORMAT
|
stream
|
bool
|
Log to the screen ( |
True
|
filepath
|
str or Path
|
Log file, in UTF-8. Missing folders are created. Defaults to None: no log file. |
None
|
logger_name
|
str
|
Logger to configure. Defaults to |
'hydrolib.dhydamo'
|
color
|
bool
|
Color the messages on the screen by level, e.g. warnings yellow and errors red. Needs a terminal or notebook that shows ANSI colors. The log file is never colored. Defaults to False. |
False
|
mode
|
(a, w)
|
|
"a"
|
Returns:
| Type | Description |
|---|---|
Logger
|
The configured logger. |
Source code in hydrolib/dhydamo/logging.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
Empty package, left over from the initial file structure (2022).