@@ -23,12 +23,11 @@ def create_logger(logger_name: str) -> logging.Logger:
23
23
24
24
Parameters
25
25
----------
26
- logger_name : str
26
+ logger_name
27
27
Name of logger
28
28
29
29
Returns
30
30
-------
31
- logging.Logger
32
31
Created logger object
33
32
"""
34
33
logger = logging .getLogger (logger_name )
@@ -46,7 +45,7 @@ def create_logger(logger_name: str) -> logging.Logger:
46
45
LOGGER = create_logger (__name__ )
47
46
48
47
49
- def get_yaml_config (yaml_config_file : str , logger = LOGGER ) -> dict :
48
+ def get_yaml_config (yaml_config_file : str , logger : logging . Logger = LOGGER ) -> dict :
50
49
"""
51
50
This function takes in the path, or name of the file if it can be found in the config/ folder, with of without the
52
51
extension, and returns the values of the file in a dictionary format.
@@ -56,10 +55,10 @@ def get_yaml_config(yaml_config_file: str, logger=LOGGER) -> dict:
56
55
57
56
Parameters
58
57
----------
59
- yaml_config_file : str
58
+ yaml_config_file
60
59
Path to yaml config file. If config file is in the config folder,
61
60
you can use the file's name without the extension.
62
- logger : _type_, optional
61
+ logger
63
62
Logger to handle messaging, by default LOGGER
64
63
65
64
Returns
@@ -106,14 +105,13 @@ def get_json_config(json_config_file: str, logger=LOGGER) -> dict:
106
105
107
106
Parameters
108
107
----------
109
- json_config_file : str
108
+ json_config_file
110
109
Path to JSON config file. If config file is in the config folder,
111
- logger : _type_, optional
110
+ logger
112
111
Logger to handle messaging, by default LOGGER
113
112
114
113
Returns
115
114
-------
116
- dict
117
115
Dictionary of JSON configuration values
118
116
"""
119
117
@@ -148,14 +146,13 @@ def create_crs(dataset_crs: Union[str, int], logger=LOGGER):
148
146
149
147
Parameters
150
148
----------
151
- dataset_crs : Union[str, int]
149
+ dataset_crs
152
150
EPSG code in string or int format. Can be given in the following ways: 5070 | "5070" | "EPSG:5070"
153
151
logger:
154
152
Logger instance
155
153
156
154
Returns
157
155
-------
158
- target_crs : str
159
156
EPSG code in string format : EPSG:<numerical_code>
160
157
161
158
"""
@@ -204,18 +201,17 @@ def create_date_range_for_specific_period(
204
201
205
202
Parameters
206
203
----------
207
- start_year : int
204
+ start_year
208
205
Start year for ranges
209
- end_year : int
206
+ end_year
210
207
End year for ranges
211
- start_month_range : int
208
+ start_month_range
212
209
Starting month for each period
213
- end_month_range : int
210
+ end_month_range
214
211
End month for each period (inclusively)
215
212
216
213
Returns
217
214
-------
218
- list[datatime.datetime]
219
215
Dictionary containing datatime data ranges
220
216
"""
221
217
date_ranges = []
0 commit comments