sciveo 0.1.10__tar.gz → 0.1.11__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.
Files changed (44) hide show
  1. {sciveo-0.1.10 → sciveo-0.1.11}/PKG-INFO +15 -4
  2. {sciveo-0.1.10 → sciveo-0.1.11}/README.md +14 -3
  3. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/cli.py +1 -1
  4. sciveo-0.1.11/sciveo/common/tools/logger.py +47 -0
  5. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/tools/timers.py +3 -1
  6. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/monitoring/monitor.py +1 -1
  7. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/monitoring/network.py +2 -2
  8. sciveo-0.1.11/sciveo/version.py +2 -0
  9. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo.egg-info/PKG-INFO +15 -4
  10. sciveo-0.1.10/sciveo/common/tools/logger.py +0 -47
  11. sciveo-0.1.10/sciveo/version.py +0 -2
  12. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/__init__.py +0 -0
  13. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/api/__init__.py +0 -0
  14. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/api/base.py +0 -0
  15. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/api/upload.py +0 -0
  16. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/__init__.py +0 -0
  17. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/configuration.py +0 -0
  18. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/model.py +0 -0
  19. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/optimizers.py +0 -0
  20. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/sampling.py +0 -0
  21. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/tools/__init__.py +0 -0
  22. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/tools/configuration.py +0 -0
  23. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/tools/daemon.py +0 -0
  24. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/tools/formating.py +0 -0
  25. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/tools/hardware.py +0 -0
  26. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/common/tools/synchronized.py +0 -0
  27. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/content/__init__.py +0 -0
  28. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/content/dataset.py +0 -0
  29. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/content/experiment.py +0 -0
  30. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/content/project.py +0 -0
  31. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/content/runner.py +0 -0
  32. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/monitoring/__init__.py +0 -0
  33. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo/monitoring/start.py +0 -0
  34. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo.egg-info/SOURCES.txt +0 -0
  35. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo.egg-info/dependency_links.txt +0 -0
  36. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo.egg-info/entry_points.txt +0 -0
  37. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo.egg-info/requires.txt +0 -0
  38. {sciveo-0.1.10 → sciveo-0.1.11}/sciveo.egg-info/top_level.txt +0 -0
  39. {sciveo-0.1.10 → sciveo-0.1.11}/setup.cfg +0 -0
  40. {sciveo-0.1.10 → sciveo-0.1.11}/setup.py +0 -0
  41. {sciveo-0.1.10 → sciveo-0.1.11}/test/test_configuration.py +0 -0
  42. {sciveo-0.1.10 → sciveo-0.1.11}/test/test_monitoring.py +0 -0
  43. {sciveo-0.1.10 → sciveo-0.1.11}/test/test_runner.py +0 -0
  44. {sciveo-0.1.10 → sciveo-0.1.11}/test/test_sampling.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
  Provides-Extra: net
@@ -47,12 +47,18 @@ The library has local and remote mode. The local one is ready to use, but for th
47
47
 
48
48
  When have sciveo account:
49
49
  ```shell
50
+ sciveo init
51
+ ```
52
+ Where ~/.sciveo/ path and ~/.sciveo/default file will be created. Just need to change the secret_access_key value.
53
+
54
+ or
55
+ ```shell
50
56
  export SCIVEO_SECRET_ACCESS_KEY='my_sciveo_user_auth_token'
51
57
  ```
52
58
  or create a file like ~/.sciveo/some_file_name where put:
53
59
  secret_access_key=my_sciveo_user_auth_token
54
60
 
55
- When using sciveo Monitoring just run, using suitable python environment
61
+ Sciveo Monitoring cli
56
62
  ```shell
57
63
  sciveo monitor --period 120
58
64
  ```
@@ -64,12 +70,17 @@ import sciveo
64
70
  # Non blocking monitoring, so continue the code execution after it.
65
71
  sciveo.monitor(period=120, block=False)
66
72
 
67
- #rest of your code here
73
+ #rest of your python code here
68
74
 
75
+ ```
69
76
 
77
+ Sciveo Scan hosts port tool available
78
+ ```shell
79
+ sciveo scan --port 22 --timeout 0.5
70
80
  ```
71
81
 
72
- When using sciveo Experimental projects management
82
+
83
+ Experimental Projects management
73
84
 
74
85
  ```python
75
86
 
@@ -39,12 +39,18 @@ The library has local and remote mode. The local one is ready to use, but for th
39
39
 
40
40
  When have sciveo account:
41
41
  ```shell
42
+ sciveo init
43
+ ```
44
+ Where ~/.sciveo/ path and ~/.sciveo/default file will be created. Just need to change the secret_access_key value.
45
+
46
+ or
47
+ ```shell
42
48
  export SCIVEO_SECRET_ACCESS_KEY='my_sciveo_user_auth_token'
43
49
  ```
44
50
  or create a file like ~/.sciveo/some_file_name where put:
45
51
  secret_access_key=my_sciveo_user_auth_token
46
52
 
47
- When using sciveo Monitoring just run, using suitable python environment
53
+ Sciveo Monitoring cli
48
54
  ```shell
49
55
  sciveo monitor --period 120
50
56
  ```
@@ -56,12 +62,17 @@ import sciveo
56
62
  # Non blocking monitoring, so continue the code execution after it.
57
63
  sciveo.monitor(period=120, block=False)
58
64
 
59
- #rest of your code here
65
+ #rest of your python code here
60
66
 
67
+ ```
61
68
 
69
+ Sciveo Scan hosts port tool available
70
+ ```shell
71
+ sciveo scan --port 22 --timeout 0.5
62
72
  ```
63
73
 
64
- When using sciveo Experimental projects management
74
+
75
+ Experimental Projects management
65
76
 
66
77
  ```python
67
78
 
@@ -28,7 +28,7 @@ def main():
28
28
  parser.add_argument('--period', type=int, default=120, help='Period in seconds')
29
29
  parser.add_argument('--block', type=bool, default=True, help='Block flag')
30
30
  parser.add_argument('--auth', type=str, default=config['secret_access_key'], help='Auth secret access key')
31
- parser.add_argument('--timeout', type=float, default=0.5, help='Timeout')
31
+ parser.add_argument('--timeout', type=float, default=1.0, help='Timeout')
32
32
  parser.add_argument('--port', type=int, default=22, help='Host port number, used for network ops')
33
33
  parser.add_argument('--localhost', type=bool, default=False, help='Add localhost to list of hosts')
34
34
  args = parser.parse_args()
@@ -0,0 +1,47 @@
1
+ #
2
+ # Pavlin Georgiev, Softel Labs
3
+ #
4
+ # This is a proprietary file and may not be copied,
5
+ # distributed, or modified without express permission
6
+ # from the owner. For licensing inquiries, please
7
+ # contact pavlin@softel.bg.
8
+ #
9
+ # 2023
10
+ #
11
+
12
+ import os
13
+ import logging
14
+ from threading import Lock
15
+
16
+ from sciveo.common.tools.configuration import GlobalConfiguration
17
+
18
+
19
+ SCIVEO_LOGGER_NAME = "sciveo-log"
20
+
21
+ _sciveo_global_config = GlobalConfiguration.get()
22
+ _sciveo_log_min_level = _sciveo_global_config["LOG_MIN_LEVEL"]
23
+ _sciveo_log_lock = Lock()
24
+
25
+ def _sciveo_get_logger(name):
26
+ logger = logging.getLogger(name)
27
+ if not logger.hasHandlers():
28
+ with _sciveo_log_lock:
29
+ if not logger.hasHandlers():
30
+ logger.setLevel(logging.getLevelName(_sciveo_log_min_level))
31
+ formatter = logging.Formatter('%(asctime)s [%(thread)d] [%(levelname)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
32
+ ch = logging.StreamHandler()
33
+ ch.setFormatter(formatter)
34
+ logger.addHandler(ch)
35
+ logger.propagate = False
36
+ return logger
37
+
38
+ def debug(*args):
39
+ _sciveo_get_logger(SCIVEO_LOGGER_NAME).debug(args)
40
+ def info(*args):
41
+ _sciveo_get_logger(SCIVEO_LOGGER_NAME).info(args)
42
+ def warning(*args):
43
+ _sciveo_get_logger(SCIVEO_LOGGER_NAME).warning(args)
44
+ def error(*args):
45
+ _sciveo_get_logger(SCIVEO_LOGGER_NAME).error(args)
46
+ def critical(*args):
47
+ _sciveo_get_logger(SCIVEO_LOGGER_NAME).critical(args)
@@ -11,6 +11,8 @@
11
11
 
12
12
  import time
13
13
 
14
+ from sciveo.common.tools.logger import *
15
+
14
16
 
15
17
  class FPSCounter:
16
18
  def __init__(self, period=10, tag=""):
@@ -23,7 +25,7 @@ class FPSCounter:
23
25
  self.n += 1
24
26
  t2 = time.time()
25
27
  if t2 - self.t1 > self.period:
26
- print(type(self).__name__, self.tag, "FPS", self.n / (t2 - self.t1))
28
+ debug(type(self).__name__, self.tag, "FPS", self.n / (t2 - self.t1))
27
29
  self.n = 0
28
30
  self.t1 = time.time()
29
31
 
@@ -187,7 +187,7 @@ class BaseMonitor(DaemonBase):
187
187
  self.previous_io_counters[name] = io_counters
188
188
 
189
189
  if __name__ == "__main__":
190
- print(MonitorTools.serial())
190
+ debug(MonitorTools.serial())
191
191
 
192
192
  mon = BaseMonitor(period=10)
193
193
  mon.start()
@@ -19,7 +19,7 @@ from sciveo.common.tools.timers import Timer
19
19
  class NetworkTools:
20
20
  def __init__(self, **kwargs):
21
21
  self.default_arguments = {
22
- "timeout": 0.1,
22
+ "timeout": 1.0,
23
23
  "localhost": False,
24
24
  }
25
25
 
@@ -92,4 +92,4 @@ class NetworkTools:
92
92
 
93
93
 
94
94
  if __name__ == "__main__":
95
- print(NetworkTools(timeout=0.5, localhost=False).scan_port(port=9901))
95
+ debug(NetworkTools(timeout=1.0, localhost=False).scan_port(port=9901))
@@ -0,0 +1,2 @@
1
+
2
+ __version__ = '0.1.11'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sciveo
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Description-Content-Type: text/markdown
5
5
  Provides-Extra: mon
6
6
  Provides-Extra: net
@@ -47,12 +47,18 @@ The library has local and remote mode. The local one is ready to use, but for th
47
47
 
48
48
  When have sciveo account:
49
49
  ```shell
50
+ sciveo init
51
+ ```
52
+ Where ~/.sciveo/ path and ~/.sciveo/default file will be created. Just need to change the secret_access_key value.
53
+
54
+ or
55
+ ```shell
50
56
  export SCIVEO_SECRET_ACCESS_KEY='my_sciveo_user_auth_token'
51
57
  ```
52
58
  or create a file like ~/.sciveo/some_file_name where put:
53
59
  secret_access_key=my_sciveo_user_auth_token
54
60
 
55
- When using sciveo Monitoring just run, using suitable python environment
61
+ Sciveo Monitoring cli
56
62
  ```shell
57
63
  sciveo monitor --period 120
58
64
  ```
@@ -64,12 +70,17 @@ import sciveo
64
70
  # Non blocking monitoring, so continue the code execution after it.
65
71
  sciveo.monitor(period=120, block=False)
66
72
 
67
- #rest of your code here
73
+ #rest of your python code here
68
74
 
75
+ ```
69
76
 
77
+ Sciveo Scan hosts port tool available
78
+ ```shell
79
+ sciveo scan --port 22 --timeout 0.5
70
80
  ```
71
81
 
72
- When using sciveo Experimental projects management
82
+
83
+ Experimental Projects management
73
84
 
74
85
  ```python
75
86
 
@@ -1,47 +0,0 @@
1
- #
2
- # Pavlin Georgiev, Softel Labs
3
- #
4
- # This is a proprietary file and may not be copied,
5
- # distributed, or modified without express permission
6
- # from the owner. For licensing inquiries, please
7
- # contact pavlin@softel.bg.
8
- #
9
- # 2023
10
- #
11
-
12
- import os
13
- import logging
14
- import threading
15
-
16
- from sciveo.common.tools.configuration import GlobalConfiguration
17
-
18
-
19
- config = GlobalConfiguration.get()
20
- log_min_level = config["LOG_MIN_LEVEL"]
21
-
22
- def get_logger(name):
23
- logger = logging.getLogger(name)
24
-
25
- if not logger.handlers:
26
- logger.setLevel(logging.getLevelName(log_min_level))
27
- formatter = logging.Formatter('%(asctime)s [%(thread)d] [%(levelname)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
28
- ch = logging.StreamHandler()
29
- ch.setFormatter(formatter)
30
- logger.addHandler(ch)
31
-
32
- return logger
33
-
34
-
35
-
36
- SCIVEO_LOGGER_NAME = "sciveo-log"
37
-
38
- def debug(*args):
39
- get_logger(SCIVEO_LOGGER_NAME).debug(args)
40
- def info(*args):
41
- get_logger(SCIVEO_LOGGER_NAME).info(args)
42
- def warning(*args):
43
- get_logger(SCIVEO_LOGGER_NAME).warning(args)
44
- def error(*args):
45
- get_logger(SCIVEO_LOGGER_NAME).error(args)
46
- def critical(*args):
47
- get_logger(SCIVEO_LOGGER_NAME).critical(args)
@@ -1,2 +0,0 @@
1
-
2
- __version__ = '0.1.10'
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