sciveo 0.1.12__tar.gz → 0.1.13__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.
- {sciveo-0.1.12 → sciveo-0.1.13}/PKG-INFO +1 -1
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/configuration.py +28 -12
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/logger.py +4 -1
- sciveo-0.1.13/sciveo/version.py +2 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo.egg-info/PKG-INFO +1 -1
- sciveo-0.1.12/sciveo/version.py +0 -2
- {sciveo-0.1.12 → sciveo-0.1.13}/README.md +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/__init__.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/api/__init__.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/api/base.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/api/upload.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/cli.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/__init__.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/configuration.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/model.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/optimizers.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/sampling.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/__init__.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/daemon.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/formating.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/hardware.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/synchronized.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/common/tools/timers.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/content/__init__.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/content/dataset.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/content/experiment.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/content/project.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/content/runner.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/monitoring/__init__.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/monitoring/monitor.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/monitoring/network.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo/monitoring/start.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo.egg-info/SOURCES.txt +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo.egg-info/dependency_links.txt +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo.egg-info/entry_points.txt +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo.egg-info/requires.txt +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/sciveo.egg-info/top_level.txt +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/setup.cfg +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/setup.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/test/test_configuration.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/test/test_monitoring.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/test/test_runner.py +0 -0
- {sciveo-0.1.12 → sciveo-0.1.13}/test/test_sampling.py +0 -0
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#
|
|
11
11
|
|
|
12
12
|
import os
|
|
13
|
+
import json
|
|
13
14
|
import threading
|
|
14
15
|
|
|
15
16
|
|
|
@@ -44,22 +45,37 @@ class GlobalConfiguration:
|
|
|
44
45
|
key = key.lower()
|
|
45
46
|
return self.data.get(key, self.default.get(key, ""))
|
|
46
47
|
|
|
48
|
+
def save_kv(self, key, value):
|
|
49
|
+
key = key.strip().lower().replace("sciveo_", "")
|
|
50
|
+
value = value.strip()
|
|
51
|
+
self.data[key] = value
|
|
52
|
+
|
|
47
53
|
def read_environment(self):
|
|
48
54
|
for k, v in os.environ.items():
|
|
49
|
-
k
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
self.save_kv(k, v)
|
|
56
|
+
|
|
57
|
+
def read_file(self, path):
|
|
58
|
+
with open(path, 'r') as fp:
|
|
59
|
+
lines = fp.readlines()
|
|
60
|
+
for line in lines:
|
|
61
|
+
parts = line.strip().split('=')
|
|
62
|
+
if len(parts) == 2:
|
|
63
|
+
self.save_kv(parts[0], parts[1])
|
|
64
|
+
|
|
65
|
+
def read_json(self, path):
|
|
66
|
+
data_json = {}
|
|
67
|
+
with open(path, 'r') as fp:
|
|
68
|
+
data_json = json.load(fp)
|
|
69
|
+
for key, value in data_json.items():
|
|
70
|
+
self.save_kv(key, value)
|
|
53
71
|
|
|
54
72
|
def read_local_files(self):
|
|
55
73
|
if os.path.exists(self.base_path):
|
|
56
74
|
for path, _, files in os.walk(self.base_path):
|
|
57
75
|
for file_name in files:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
value = parts[1].strip()
|
|
65
|
-
self.data[key] = value
|
|
76
|
+
file_path = os.path.join(path, file_name)
|
|
77
|
+
_, file_extension = os.path.splitext(file_name)
|
|
78
|
+
if file_extension == ".json":
|
|
79
|
+
self.read_json(file_path)
|
|
80
|
+
else:
|
|
81
|
+
self.read_file(file_path)
|
|
@@ -44,4 +44,7 @@ def warning(*args):
|
|
|
44
44
|
def error(*args):
|
|
45
45
|
_sciveo_get_logger(SCIVEO_LOGGER_NAME).error(args)
|
|
46
46
|
def critical(*args):
|
|
47
|
-
_sciveo_get_logger(SCIVEO_LOGGER_NAME).critical(args)
|
|
47
|
+
_sciveo_get_logger(SCIVEO_LOGGER_NAME).critical(args)
|
|
48
|
+
def exception(e, *args):
|
|
49
|
+
e_str = ''.join(traceback.format_tb(e.__traceback__))
|
|
50
|
+
_sciveo_get_logger(SCIVEO_LOGGER_NAME).error(e_str, args)
|
sciveo-0.1.12/sciveo/version.py
DELETED
|
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
|