encommon 0.17.0__tar.gz → 0.17.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {encommon-0.17.0/encommon.egg-info → encommon-0.17.2}/PKG-INFO +4 -2
- {encommon-0.17.0 → encommon-0.17.2}/README.md +3 -1
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/logger.py +8 -1
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/test/test_logger.py +25 -10
- {encommon-0.17.0 → encommon-0.17.2}/encommon/conftest.py +1 -1
- encommon-0.17.2/encommon/version.txt +1 -0
- {encommon-0.17.0 → encommon-0.17.2/encommon.egg-info}/PKG-INFO +4 -2
- encommon-0.17.0/encommon/version.txt +0 -1
- {encommon-0.17.0 → encommon-0.17.2}/LICENSE +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/MANIFEST.in +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/colors/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/colors/color.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/colors/test/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/colors/test/test_color.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/config.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/files.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/params.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/paths.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/test/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/test/test_config.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/test/test_files.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/test/test_paths.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/test/test_utils.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/config/utils.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/crypts/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/crypts/crypts.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/crypts/hashes.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/crypts/params.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/crypts/test/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/crypts/test/test_crypts.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/crypts/test/test_hashes.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/py.typed +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/common.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/duration.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/params.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/parse.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_duration.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_params.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_parse.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_time.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_timer.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_timers.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_unitime.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_utils.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_window.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/test/test_windows.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/time.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/timer.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/timers.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/unitime.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/utils.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/window.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/times/windows.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/classes.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/dicts.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/empty.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/lists.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/notate.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/strings.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/test/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/test/test_classes.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/test/test_dicts.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/test/test_empty.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/test/test_lists.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/test/test_notate.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/test/test_strings.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/types/types.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/common.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/files.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/match.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/paths.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/sample.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/stdout.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/test/__init__.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/test/test_files.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/test/test_match.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/test/test_paths.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/test/test_sample.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon/utils/test/test_stdout.py +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon.egg-info/SOURCES.txt +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon.egg-info/dependency_links.txt +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon.egg-info/requires.txt +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/encommon.egg-info/top_level.txt +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/pyproject.toml +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/reqs-install.txt +0 -0
- {encommon-0.17.0 → encommon-0.17.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: encommon
|
3
|
-
Version: 0.17.
|
3
|
+
Version: 0.17.2
|
4
4
|
Summary: Enasis Network Common Library
|
5
5
|
License: MIT
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
@@ -88,7 +88,7 @@ make -s pytest
|
|
88
88
|
|
89
89
|
1. Create [repository](https://github.com/enasisnetwork/encommon) release.
|
90
90
|
|
91
|
-
1. Build the Python package.<br>
|
91
|
+
1. Build the Python package.<br>Be sure no uncommited files in tree.
|
92
92
|
```
|
93
93
|
make -s pypackage
|
94
94
|
```
|
@@ -104,3 +104,5 @@ make -s pytest
|
|
104
104
|
```
|
105
105
|
|
106
106
|
1. Update [Read the Docs](https://encommon.readthedocs.io) documentation.
|
107
|
+
|
108
|
+
1. Consider running builds on dependent projects.
|
@@ -69,7 +69,7 @@ make -s pytest
|
|
69
69
|
|
70
70
|
1. Create [repository](https://github.com/enasisnetwork/encommon) release.
|
71
71
|
|
72
|
-
1. Build the Python package.<br>
|
72
|
+
1. Build the Python package.<br>Be sure no uncommited files in tree.
|
73
73
|
```
|
74
74
|
make -s pypackage
|
75
75
|
```
|
@@ -85,3 +85,5 @@ make -s pytest
|
|
85
85
|
```
|
86
86
|
|
87
87
|
1. Update [Read the Docs](https://encommon.readthedocs.io) documentation.
|
88
|
+
|
89
|
+
1. Consider running builds on dependent projects.
|
@@ -133,7 +133,7 @@ class Message:
|
|
133
133
|
value = round(value, 2)
|
134
134
|
|
135
135
|
|
136
|
-
value = str(value)
|
136
|
+
value = str(value).strip()
|
137
137
|
|
138
138
|
self.__fields[key] = value
|
139
139
|
|
@@ -574,6 +574,13 @@ class Logger:
|
|
574
574
|
logr_stdo = self.__logr_stdo
|
575
575
|
logr_file = self.__logr_file
|
576
576
|
|
577
|
+
# Prevent debug from creating
|
578
|
+
# new object each time called
|
579
|
+
if (level == 'debug'
|
580
|
+
and stdo_level != 'debug'
|
581
|
+
and file_level != 'debug'):
|
582
|
+
return None
|
583
|
+
|
577
584
|
message = Message(level, **kwargs)
|
578
585
|
|
579
586
|
if stdo_level is not None:
|
@@ -42,7 +42,7 @@ def logger(
|
|
42
42
|
"""
|
43
43
|
|
44
44
|
params = LoggerParams(
|
45
|
-
stdo_level='
|
45
|
+
stdo_level='debug',
|
46
46
|
file_level='info',
|
47
47
|
file_path=f'{tmp_path}/test.log')
|
48
48
|
|
@@ -166,7 +166,7 @@ def test_Logger(
|
|
166
166
|
|
167
167
|
assert logger.params
|
168
168
|
|
169
|
-
assert logger.stdo_level == '
|
169
|
+
assert logger.stdo_level == 'debug'
|
170
170
|
|
171
171
|
assert logger.file_level == 'info'
|
172
172
|
|
@@ -201,6 +201,21 @@ def test_Logger_cover(
|
|
201
201
|
time = Time('now')
|
202
202
|
|
203
203
|
|
204
|
+
# Test preventing debug from
|
205
|
+
# any needless instantiation
|
206
|
+
setattr(
|
207
|
+
logger,
|
208
|
+
'_Logger__file_level',
|
209
|
+
'info')
|
210
|
+
|
211
|
+
# Test preventing debug from
|
212
|
+
# any needless instantiation
|
213
|
+
setattr(
|
214
|
+
logger,
|
215
|
+
'_Logger__stdo_level',
|
216
|
+
'info')
|
217
|
+
|
218
|
+
|
204
219
|
def _logger_logs() -> None:
|
205
220
|
logger.log_d(msg='pytest')
|
206
221
|
logger.log_c(msg='pytest')
|
@@ -234,16 +249,16 @@ def test_Logger_cover(
|
|
234
249
|
|
235
250
|
_logger_logs()
|
236
251
|
|
237
|
-
assert len(_logger_stdo()) ==
|
238
|
-
assert len(_logger_file()) ==
|
252
|
+
assert len(_logger_stdo()) == 5
|
253
|
+
assert len(_logger_file()) == 5
|
239
254
|
|
240
255
|
logger.stop()
|
241
256
|
|
242
257
|
|
243
258
|
_logger_logs()
|
244
259
|
|
245
|
-
assert len(_logger_stdo()) ==
|
246
|
-
assert len(_logger_file()) ==
|
260
|
+
assert len(_logger_stdo()) == 5
|
261
|
+
assert len(_logger_file()) == 5
|
247
262
|
|
248
263
|
|
249
264
|
logger.start()
|
@@ -261,8 +276,8 @@ def test_Logger_cover(
|
|
261
276
|
assert message in str(stdo)
|
262
277
|
assert message in str(file)
|
263
278
|
|
264
|
-
assert len(_logger_stdo()) ==
|
265
|
-
assert len(_logger_file()) ==
|
279
|
+
assert len(_logger_stdo()) == 6
|
280
|
+
assert len(_logger_file()) == 6
|
266
281
|
|
267
282
|
|
268
283
|
logger.stop()
|
@@ -270,5 +285,5 @@ def test_Logger_cover(
|
|
270
285
|
|
271
286
|
_logger_logs()
|
272
287
|
|
273
|
-
assert len(_logger_stdo()) ==
|
274
|
-
assert len(_logger_file()) ==
|
288
|
+
assert len(_logger_stdo()) == 6
|
289
|
+
assert len(_logger_file()) == 6
|
@@ -0,0 +1 @@
|
|
1
|
+
0.17.2
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: encommon
|
3
|
-
Version: 0.17.
|
3
|
+
Version: 0.17.2
|
4
4
|
Summary: Enasis Network Common Library
|
5
5
|
License: MIT
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
@@ -88,7 +88,7 @@ make -s pytest
|
|
88
88
|
|
89
89
|
1. Create [repository](https://github.com/enasisnetwork/encommon) release.
|
90
90
|
|
91
|
-
1. Build the Python package.<br>
|
91
|
+
1. Build the Python package.<br>Be sure no uncommited files in tree.
|
92
92
|
```
|
93
93
|
make -s pypackage
|
94
94
|
```
|
@@ -104,3 +104,5 @@ make -s pytest
|
|
104
104
|
```
|
105
105
|
|
106
106
|
1. Update [Read the Docs](https://encommon.readthedocs.io) documentation.
|
107
|
+
|
108
|
+
1. Consider running builds on dependent projects.
|
@@ -1 +0,0 @@
|
|
1
|
-
0.17.0
|
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
|
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
|