geocif 0.1.21__tar.gz → 0.1.22__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {geocif-0.1.21/geocif.egg-info → geocif-0.1.22}/PKG-INFO +1 -1
- {geocif-0.1.21 → geocif-0.1.22}/geocif/logger.py +23 -2
- {geocif-0.1.21 → geocif-0.1.22}/geocif/utils.py +0 -23
- {geocif-0.1.21 → geocif-0.1.22/geocif.egg-info}/PKG-INFO +1 -1
- {geocif-0.1.21 → geocif-0.1.22}/setup.py +1 -1
- {geocif-0.1.21 → geocif-0.1.22}/LICENSE +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/MANIFEST.in +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/README.md +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/__init__.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/agmet/__init__.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/agmet/geoagmet.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/agmet/plot.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/agmet/utils.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/backup/__init__.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/backup/constants.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/backup/features.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/backup/geo.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/backup/geocif.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/backup/metadata.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/backup/models.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/cei/__init__.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/cei/definitions.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/cei/indices.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/geocif.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/indices_runner.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/__init__.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/analysis.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/correlations.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/embedding.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/feature_engineering.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/feature_selection.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/misc.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/outliers.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/outlook.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/output.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/stages.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/stats.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/trainers.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/trend.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif/ml/xai.py +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif.egg-info/SOURCES.txt +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif.egg-info/dependency_links.txt +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif.egg-info/not-zip-safe +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif.egg-info/requires.txt +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/geocif.egg-info/top_level.txt +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/requirements.txt +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/setup.cfg +0 -0
- {geocif-0.1.21 → geocif-0.1.22}/tests/test_geocif.py +0 -0
@@ -5,7 +5,28 @@ from pathlib import Path
|
|
5
5
|
import arrow as ar
|
6
6
|
import logzero
|
7
7
|
|
8
|
-
|
8
|
+
|
9
|
+
def read_config(path_config_file):
|
10
|
+
"""
|
11
|
+
|
12
|
+
Args:
|
13
|
+
path_config_file ():
|
14
|
+
|
15
|
+
Returns:
|
16
|
+
|
17
|
+
"""
|
18
|
+
from configparser import ConfigParser, ExtendedInterpolation
|
19
|
+
|
20
|
+
parser = ConfigParser(
|
21
|
+
inline_comment_prefixes=(";",), interpolation=ExtendedInterpolation()
|
22
|
+
)
|
23
|
+
|
24
|
+
try:
|
25
|
+
parser.read(path_config_file)
|
26
|
+
except Exception as e:
|
27
|
+
raise IOError(f"Cannot read {path_config_file}: {e}")
|
28
|
+
|
29
|
+
return parser
|
9
30
|
|
10
31
|
|
11
32
|
class Logger:
|
@@ -62,7 +83,7 @@ def setup_logger_parser(path_config_file, name_project="geocif", name_file="ml",
|
|
62
83
|
Returns:
|
63
84
|
|
64
85
|
"""
|
65
|
-
parser =
|
86
|
+
parser = read_config(path_config_file)
|
66
87
|
dir_log = parser.get("PATHS", "dir_log")
|
67
88
|
|
68
89
|
logger = Logger(
|
@@ -100,29 +100,6 @@ def matplotlib_setup():
|
|
100
100
|
plt.rcParams["ytick.color"] = "#333F4B"
|
101
101
|
|
102
102
|
|
103
|
-
def read_config(path_config_file):
|
104
|
-
"""
|
105
|
-
|
106
|
-
Args:
|
107
|
-
path_config_file ():
|
108
|
-
|
109
|
-
Returns:
|
110
|
-
|
111
|
-
"""
|
112
|
-
from configparser import ConfigParser, ExtendedInterpolation
|
113
|
-
|
114
|
-
parser = ConfigParser(
|
115
|
-
inline_comment_prefixes=(";",), interpolation=ExtendedInterpolation()
|
116
|
-
)
|
117
|
-
|
118
|
-
try:
|
119
|
-
parser.read(path_config_file)
|
120
|
-
except Exception as e:
|
121
|
-
raise IOError(f"Cannot read {path_config_file}: {e}")
|
122
|
-
|
123
|
-
return parser
|
124
|
-
|
125
|
-
|
126
103
|
def delete_empty_dirs(_dir):
|
127
104
|
"""
|
128
105
|
Cleanup by deleting folders which have no files in them. Delete folders which only have empty subdirs
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|