encommon 0.17.0__tar.gz → 0.17.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. {encommon-0.17.0/encommon.egg-info → encommon-0.17.1}/PKG-INFO +2 -2
  2. {encommon-0.17.0 → encommon-0.17.1}/README.md +1 -1
  3. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/logger.py +8 -1
  4. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/test/test_logger.py +25 -10
  5. {encommon-0.17.0 → encommon-0.17.1}/encommon/conftest.py +1 -1
  6. encommon-0.17.1/encommon/version.txt +1 -0
  7. {encommon-0.17.0 → encommon-0.17.1/encommon.egg-info}/PKG-INFO +2 -2
  8. encommon-0.17.0/encommon/version.txt +0 -1
  9. {encommon-0.17.0 → encommon-0.17.1}/LICENSE +0 -0
  10. {encommon-0.17.0 → encommon-0.17.1}/MANIFEST.in +0 -0
  11. {encommon-0.17.0 → encommon-0.17.1}/encommon/__init__.py +0 -0
  12. {encommon-0.17.0 → encommon-0.17.1}/encommon/colors/__init__.py +0 -0
  13. {encommon-0.17.0 → encommon-0.17.1}/encommon/colors/color.py +0 -0
  14. {encommon-0.17.0 → encommon-0.17.1}/encommon/colors/test/__init__.py +0 -0
  15. {encommon-0.17.0 → encommon-0.17.1}/encommon/colors/test/test_color.py +0 -0
  16. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/__init__.py +0 -0
  17. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/config.py +0 -0
  18. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/files.py +0 -0
  19. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/params.py +0 -0
  20. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/paths.py +0 -0
  21. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/test/__init__.py +0 -0
  22. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/test/test_config.py +0 -0
  23. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/test/test_files.py +0 -0
  24. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/test/test_paths.py +0 -0
  25. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/test/test_utils.py +0 -0
  26. {encommon-0.17.0 → encommon-0.17.1}/encommon/config/utils.py +0 -0
  27. {encommon-0.17.0 → encommon-0.17.1}/encommon/crypts/__init__.py +0 -0
  28. {encommon-0.17.0 → encommon-0.17.1}/encommon/crypts/crypts.py +0 -0
  29. {encommon-0.17.0 → encommon-0.17.1}/encommon/crypts/hashes.py +0 -0
  30. {encommon-0.17.0 → encommon-0.17.1}/encommon/crypts/params.py +0 -0
  31. {encommon-0.17.0 → encommon-0.17.1}/encommon/crypts/test/__init__.py +0 -0
  32. {encommon-0.17.0 → encommon-0.17.1}/encommon/crypts/test/test_crypts.py +0 -0
  33. {encommon-0.17.0 → encommon-0.17.1}/encommon/crypts/test/test_hashes.py +0 -0
  34. {encommon-0.17.0 → encommon-0.17.1}/encommon/py.typed +0 -0
  35. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/__init__.py +0 -0
  36. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/common.py +0 -0
  37. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/duration.py +0 -0
  38. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/params.py +0 -0
  39. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/parse.py +0 -0
  40. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/__init__.py +0 -0
  41. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_duration.py +0 -0
  42. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_params.py +0 -0
  43. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_parse.py +0 -0
  44. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_time.py +0 -0
  45. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_timer.py +0 -0
  46. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_timers.py +0 -0
  47. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_unitime.py +0 -0
  48. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_utils.py +0 -0
  49. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_window.py +0 -0
  50. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/test/test_windows.py +0 -0
  51. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/time.py +0 -0
  52. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/timer.py +0 -0
  53. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/timers.py +0 -0
  54. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/unitime.py +0 -0
  55. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/utils.py +0 -0
  56. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/window.py +0 -0
  57. {encommon-0.17.0 → encommon-0.17.1}/encommon/times/windows.py +0 -0
  58. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/__init__.py +0 -0
  59. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/classes.py +0 -0
  60. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/dicts.py +0 -0
  61. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/empty.py +0 -0
  62. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/lists.py +0 -0
  63. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/notate.py +0 -0
  64. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/strings.py +0 -0
  65. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/test/__init__.py +0 -0
  66. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/test/test_classes.py +0 -0
  67. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/test/test_dicts.py +0 -0
  68. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/test/test_empty.py +0 -0
  69. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/test/test_lists.py +0 -0
  70. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/test/test_notate.py +0 -0
  71. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/test/test_strings.py +0 -0
  72. {encommon-0.17.0 → encommon-0.17.1}/encommon/types/types.py +0 -0
  73. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/__init__.py +0 -0
  74. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/common.py +0 -0
  75. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/files.py +0 -0
  76. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/match.py +0 -0
  77. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/paths.py +0 -0
  78. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/sample.py +0 -0
  79. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/stdout.py +0 -0
  80. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/test/__init__.py +0 -0
  81. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/test/test_files.py +0 -0
  82. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/test/test_match.py +0 -0
  83. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/test/test_paths.py +0 -0
  84. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/test/test_sample.py +0 -0
  85. {encommon-0.17.0 → encommon-0.17.1}/encommon/utils/test/test_stdout.py +0 -0
  86. {encommon-0.17.0 → encommon-0.17.1}/encommon.egg-info/SOURCES.txt +0 -0
  87. {encommon-0.17.0 → encommon-0.17.1}/encommon.egg-info/dependency_links.txt +0 -0
  88. {encommon-0.17.0 → encommon-0.17.1}/encommon.egg-info/requires.txt +0 -0
  89. {encommon-0.17.0 → encommon-0.17.1}/encommon.egg-info/top_level.txt +0 -0
  90. {encommon-0.17.0 → encommon-0.17.1}/pyproject.toml +0 -0
  91. {encommon-0.17.0 → encommon-0.17.1}/reqs-install.txt +0 -0
  92. {encommon-0.17.0 → encommon-0.17.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.17.0
3
+ Version: 0.17.1
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
  ```
@@ -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
  ```
@@ -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='info',
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 == 'info'
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()) == 6
238
- assert len(_logger_file()) == 6
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()) == 6
246
- assert len(_logger_file()) == 6
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()) == 7
265
- assert len(_logger_file()) == 7
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()) == 7
274
- assert len(_logger_file()) == 7
288
+ assert len(_logger_stdo()) == 6
289
+ assert len(_logger_file()) == 6
@@ -36,7 +36,7 @@ def config_factory(
36
36
  - '{SAMPLES}/wayne'
37
37
 
38
38
  enlogger:
39
- stdo_level: info
39
+ stdo_level: debug
40
40
 
41
41
  encrypts:
42
42
  phrases:
@@ -0,0 +1 @@
1
+ 0.17.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.17.0
3
+ Version: 0.17.1
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
  ```
@@ -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