encommon 0.11.0__tar.gz → 0.11.1__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.
- {encommon-0.11.0/encommon.egg-info → encommon-0.11.1}/PKG-INFO +1 -1
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/config.py +4 -8
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/logger.py +3 -2
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/test/test_logger.py +1 -1
- {encommon-0.11.0 → encommon-0.11.1}/encommon/crypts/crypts.py +51 -2
- {encommon-0.11.0 → encommon-0.11.1}/encommon/crypts/params.py +1 -1
- {encommon-0.11.0 → encommon-0.11.1}/encommon/crypts/test/test_crypts.py +56 -1
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/params.py +3 -3
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_timers.py +6 -17
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_windows.py +6 -20
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/timers.py +18 -5
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/windows.py +18 -5
- encommon-0.11.1/encommon/version.txt +1 -0
- {encommon-0.11.0 → encommon-0.11.1/encommon.egg-info}/PKG-INFO +1 -1
- encommon-0.11.0/encommon/version.txt +0 -1
- {encommon-0.11.0 → encommon-0.11.1}/LICENSE +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/MANIFEST.in +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/README.md +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/files.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/params.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/paths.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/test/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/test/test_config.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/test/test_files.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/test/test_paths.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/test/test_utils.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/config/utils.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/conftest.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/crypts/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/crypts/hashes.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/crypts/test/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/crypts/test/test_hashes.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/py.typed +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/common.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/duration.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/parse.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_duration.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_params.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_parse.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_timer.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_times.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_utils.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/test/test_window.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/timer.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/times.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/utils.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/times/window.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/dicts.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/empty.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/notate.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/strings.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/test/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/test/test_dicts.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/test/test_empty.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/test/test_notate.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/types/test/test_strings.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/common.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/files.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/match.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/paths.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/sample.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/stdout.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/test/__init__.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/test/test_files.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/test/test_match.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/test/test_paths.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/test/test_sample.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon/utils/test/test_stdout.py +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon.egg-info/SOURCES.txt +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon.egg-info/dependency_links.txt +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon.egg-info/requires.txt +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/encommon.egg-info/top_level.txt +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/pyproject.toml +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/reqs-install.txt +0 -0
- {encommon-0.11.0 → encommon-0.11.1}/setup.cfg +0 -0
@@ -217,11 +217,10 @@ class Config:
|
|
217
217
|
if self.__logger is not None:
|
218
218
|
return self.__logger
|
219
219
|
|
220
|
-
|
220
|
+
logger = Logger(
|
221
221
|
self.params.enlogger)
|
222
222
|
|
223
|
-
self.__logger =
|
224
|
-
Logger(params=enlogger))
|
223
|
+
self.__logger = logger
|
225
224
|
|
226
225
|
return self.__logger
|
227
226
|
|
@@ -239,12 +238,9 @@ class Config:
|
|
239
238
|
if self.__crypts is not None:
|
240
239
|
return self.__crypts
|
241
240
|
|
242
|
-
|
241
|
+
crypts = Crypts(
|
243
242
|
self.params.encrypts)
|
244
243
|
|
245
|
-
|
246
|
-
|
247
|
-
self.__crypts = (
|
248
|
-
Crypts(params=encrypts))
|
244
|
+
self.__crypts = crypts
|
249
245
|
|
250
246
|
return self.__crypts
|
@@ -7,6 +7,7 @@ is permitted, for more information consult the project license file.
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
+
from copy import deepcopy
|
10
11
|
from json import dumps
|
11
12
|
from logging import CRITICAL
|
12
13
|
from logging import DEBUG
|
@@ -337,11 +338,11 @@ class Logger:
|
|
337
338
|
|
338
339
|
def __init__(
|
339
340
|
self,
|
341
|
+
params: Optional['LoggerParams'] = None,
|
340
342
|
*,
|
341
343
|
stdo_level: Optional[LOGLEVELS] = None,
|
342
344
|
file_level: Optional[LOGLEVELS] = None,
|
343
345
|
file_path: Optional[str | Path] = None,
|
344
|
-
params: Optional['LoggerParams'] = None,
|
345
346
|
) -> None:
|
346
347
|
"""
|
347
348
|
Initialize instance for class using provided parameters.
|
@@ -355,7 +356,7 @@ class Logger:
|
|
355
356
|
file_level=file_level,
|
356
357
|
file_path=file_path)
|
357
358
|
|
358
|
-
self.__params = params
|
359
|
+
self.__params = deepcopy(params)
|
359
360
|
|
360
361
|
stdo_level = params.stdo_level
|
361
362
|
file_level = params.file_level
|
@@ -7,9 +7,11 @@ is permitted, for more information consult the project license file.
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
+
from copy import deepcopy
|
10
11
|
from re import compile
|
11
12
|
from re import match as re_match
|
12
13
|
from re import sub as re_sub
|
14
|
+
from typing import Optional
|
13
15
|
from typing import TYPE_CHECKING
|
14
16
|
|
15
17
|
from cryptography.fernet import Fernet
|
@@ -17,6 +19,7 @@ from cryptography.fernet import Fernet
|
|
17
19
|
from ..types.strings import SEMPTY
|
18
20
|
|
19
21
|
if TYPE_CHECKING:
|
22
|
+
from .params import CryptParams
|
20
23
|
from .params import CryptsParams
|
21
24
|
|
22
25
|
|
@@ -53,13 +56,18 @@ class Crypts:
|
|
53
56
|
|
54
57
|
def __init__(
|
55
58
|
self,
|
56
|
-
params: 'CryptsParams',
|
59
|
+
params: Optional['CryptsParams'] = None,
|
57
60
|
) -> None:
|
58
61
|
"""
|
59
62
|
Initialize instance for class using provided parameters.
|
60
63
|
"""
|
61
64
|
|
62
|
-
|
65
|
+
from .params import CryptsParams
|
66
|
+
|
67
|
+
if params is None:
|
68
|
+
params = CryptsParams()
|
69
|
+
|
70
|
+
self.__params = deepcopy(params)
|
63
71
|
|
64
72
|
|
65
73
|
@property
|
@@ -90,6 +98,9 @@ class Crypts:
|
|
90
98
|
|
91
99
|
phrases = self.params.phrases
|
92
100
|
|
101
|
+
if unique not in phrases:
|
102
|
+
raise ValueError('unique')
|
103
|
+
|
93
104
|
phrase = phrases[unique].phrase
|
94
105
|
|
95
106
|
encrypt = (
|
@@ -134,6 +145,44 @@ class Crypts:
|
|
134
145
|
.decode())
|
135
146
|
|
136
147
|
|
148
|
+
def create(
|
149
|
+
self,
|
150
|
+
unique: str,
|
151
|
+
params: 'CryptParams',
|
152
|
+
) -> None:
|
153
|
+
"""
|
154
|
+
Create a new phrase using the provided input parameters.
|
155
|
+
|
156
|
+
:param unique: Unique identifier of mapping passphrase.
|
157
|
+
:param params: Parameters for instantiating the instance.
|
158
|
+
"""
|
159
|
+
|
160
|
+
phrases = self.params.phrases
|
161
|
+
|
162
|
+
if unique in phrases:
|
163
|
+
raise ValueError('unique')
|
164
|
+
|
165
|
+
phrases[unique] = params
|
166
|
+
|
167
|
+
|
168
|
+
def delete(
|
169
|
+
self,
|
170
|
+
unique: str,
|
171
|
+
) -> None:
|
172
|
+
"""
|
173
|
+
Delete the phrase from the internal dictionary reference.
|
174
|
+
|
175
|
+
:param unique: Unique identifier of mapping passphrase.
|
176
|
+
"""
|
177
|
+
|
178
|
+
phrases = self.params.phrases
|
179
|
+
|
180
|
+
if unique not in phrases:
|
181
|
+
raise ValueError('unique')
|
182
|
+
|
183
|
+
del phrases[unique]
|
184
|
+
|
185
|
+
|
137
186
|
@classmethod
|
138
187
|
def keygen(
|
139
188
|
cls: object,
|
@@ -14,6 +14,7 @@ from pytest import mark
|
|
14
14
|
from pytest import raises
|
15
15
|
|
16
16
|
from ..crypts import Crypts
|
17
|
+
from ..params import CryptParams
|
17
18
|
from ..params import CryptsParams
|
18
19
|
from ...types import inrepr
|
19
20
|
from ...types import instr
|
@@ -35,7 +36,7 @@ def crypts() -> Crypts:
|
|
35
36
|
params = CryptsParams(
|
36
37
|
phrases=source)
|
37
38
|
|
38
|
-
return Crypts(params
|
39
|
+
return Crypts(params)
|
39
40
|
|
40
41
|
|
41
42
|
|
@@ -103,6 +104,28 @@ def test_Crypts_iterate(
|
|
103
104
|
|
104
105
|
|
105
106
|
|
107
|
+
def test_Crypts_cover(
|
108
|
+
crypts: Crypts,
|
109
|
+
) -> None:
|
110
|
+
"""
|
111
|
+
Perform various tests associated with relevant routines.
|
112
|
+
|
113
|
+
:param crypts: Primary class instance for the encryption.
|
114
|
+
"""
|
115
|
+
|
116
|
+
|
117
|
+
crypts = Crypts()
|
118
|
+
|
119
|
+
|
120
|
+
params = CryptParams(
|
121
|
+
phrase=Crypts.keygen())
|
122
|
+
|
123
|
+
crypts.create('testing', params)
|
124
|
+
|
125
|
+
crypts.delete('testing')
|
126
|
+
|
127
|
+
|
128
|
+
|
106
129
|
def test_Crypts_raises(
|
107
130
|
crypts: Crypts,
|
108
131
|
) -> None:
|
@@ -113,6 +136,16 @@ def test_Crypts_raises(
|
|
113
136
|
"""
|
114
137
|
|
115
138
|
|
139
|
+
_raises = raises(ValueError)
|
140
|
+
|
141
|
+
with _raises as reason:
|
142
|
+
crypts.encrypt('foo', 'dne')
|
143
|
+
|
144
|
+
_reason = str(reason.value)
|
145
|
+
|
146
|
+
assert _reason == 'unique'
|
147
|
+
|
148
|
+
|
116
149
|
_raises = raises(ValueError)
|
117
150
|
|
118
151
|
with _raises as reason:
|
@@ -132,3 +165,25 @@ def test_Crypts_raises(
|
|
132
165
|
_reason = str(reason.value)
|
133
166
|
|
134
167
|
assert _reason == 'version'
|
168
|
+
|
169
|
+
|
170
|
+
_raises = raises(ValueError)
|
171
|
+
|
172
|
+
params = CryptParams(phrase='foo')
|
173
|
+
|
174
|
+
with _raises as reason:
|
175
|
+
crypts.create('default', params)
|
176
|
+
|
177
|
+
_reason = str(reason.value)
|
178
|
+
|
179
|
+
assert _reason == 'unique'
|
180
|
+
|
181
|
+
|
182
|
+
_raises = raises(ValueError)
|
183
|
+
|
184
|
+
with _raises as reason:
|
185
|
+
crypts.delete('dne')
|
186
|
+
|
187
|
+
_reason = str(reason.value)
|
188
|
+
|
189
|
+
assert _reason == 'unique'
|
@@ -68,7 +68,7 @@ class TimersParams(BaseModel, extra='forbid'):
|
|
68
68
|
Parameter is picked up by autodoc, please ignore.
|
69
69
|
"""
|
70
70
|
|
71
|
-
timers: dict[str, TimerParams]
|
71
|
+
timers: dict[str, TimerParams] = {}
|
72
72
|
|
73
73
|
|
74
74
|
|
@@ -117,7 +117,7 @@ class WindowParams(BaseModel, extra='forbid'):
|
|
117
117
|
stop = Times(stop)
|
118
118
|
|
119
119
|
if anchor is not None:
|
120
|
-
anchor = Times(
|
120
|
+
anchor = Times(anchor)
|
121
121
|
|
122
122
|
if delay is not None:
|
123
123
|
delay = float(delay)
|
@@ -152,4 +152,4 @@ class WindowsParams(BaseModel, extra='forbid'):
|
|
152
152
|
Parameter is picked up by autodoc, please ignore.
|
153
153
|
"""
|
154
154
|
|
155
|
-
windows: dict[str, WindowParams]
|
155
|
+
windows: dict[str, WindowParams] = {}
|
@@ -8,6 +8,7 @@ is permitted, for more information consult the project license file.
|
|
8
8
|
|
9
9
|
|
10
10
|
from pathlib import Path
|
11
|
+
from time import sleep
|
11
12
|
from typing import Any
|
12
13
|
|
13
14
|
from pytest import fixture
|
@@ -140,35 +141,23 @@ def test_Timers_cover(
|
|
140
141
|
"""
|
141
142
|
|
142
143
|
|
143
|
-
assert not timers.ready('one')
|
144
|
-
|
145
144
|
assert timers.ready('two')
|
146
145
|
|
147
|
-
|
148
146
|
timers.update('two', 'now')
|
149
147
|
|
150
148
|
assert not timers.ready('two')
|
151
149
|
|
152
|
-
timers.load_children()
|
153
|
-
|
154
|
-
assert timers.ready('two')
|
155
|
-
|
156
|
-
|
157
|
-
timers.update('two', 'now')
|
158
150
|
|
159
|
-
|
151
|
+
timers = Timers()
|
160
152
|
|
161
|
-
timers.save_children()
|
162
|
-
timers.load_children()
|
163
153
|
|
164
|
-
|
154
|
+
params = TimerParams(timer=1)
|
165
155
|
|
156
|
+
timers.create('fur', params)
|
166
157
|
|
167
|
-
|
168
|
-
timer=1,
|
169
|
-
start='-1s')
|
158
|
+
assert not timers.ready('fur')
|
170
159
|
|
171
|
-
|
160
|
+
sleep(1)
|
172
161
|
|
173
162
|
assert timers.ready('fur')
|
174
163
|
|
@@ -8,6 +8,7 @@ is permitted, for more information consult the project license file.
|
|
8
8
|
|
9
9
|
|
10
10
|
from pathlib import Path
|
11
|
+
from time import sleep
|
11
12
|
from typing import Any
|
12
13
|
|
13
14
|
from pytest import fixture
|
@@ -173,37 +174,22 @@ def test_Windows_cover(
|
|
173
174
|
"""
|
174
175
|
|
175
176
|
|
176
|
-
assert windows.ready('one')
|
177
|
-
|
178
177
|
assert windows.ready('two')
|
179
178
|
|
180
|
-
|
181
179
|
windows.update('two', '+1h')
|
182
180
|
|
183
181
|
assert not windows.ready('two')
|
184
182
|
|
185
|
-
windows.load_children()
|
186
183
|
|
187
|
-
|
184
|
+
windows = Windows()
|
188
185
|
|
186
|
+
params = WindowParams(window=1)
|
189
187
|
|
190
|
-
windows.
|
191
|
-
|
192
|
-
assert not windows.ready('two')
|
193
|
-
|
194
|
-
windows.save_children()
|
195
|
-
windows.load_children()
|
196
|
-
|
197
|
-
assert not windows.ready('two')
|
198
|
-
|
188
|
+
windows.create('fur', params)
|
199
189
|
|
200
|
-
|
201
|
-
window='* * * * *',
|
202
|
-
start=310,
|
203
|
-
stop=610,
|
204
|
-
delay=10)
|
190
|
+
assert not windows.ready('fur')
|
205
191
|
|
206
|
-
|
192
|
+
sleep(2)
|
207
193
|
|
208
194
|
assert windows.ready('fur')
|
209
195
|
|
@@ -7,6 +7,7 @@ is permitted, for more information consult the project license file.
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
+
from copy import deepcopy
|
10
11
|
from sqlite3 import Connection
|
11
12
|
from sqlite3 import connect as SQLite
|
12
13
|
from typing import Optional
|
@@ -82,7 +83,7 @@ class Timers:
|
|
82
83
|
|
83
84
|
def __init__(
|
84
85
|
self,
|
85
|
-
params: 'TimersParams',
|
86
|
+
params: Optional['TimersParams'] = None,
|
86
87
|
*,
|
87
88
|
file: str = ':memory:',
|
88
89
|
table: str = 'timers',
|
@@ -92,7 +93,12 @@ class Timers:
|
|
92
93
|
Initialize instance for class using provided parameters.
|
93
94
|
"""
|
94
95
|
|
95
|
-
|
96
|
+
from .params import TimersParams
|
97
|
+
|
98
|
+
if params is None:
|
99
|
+
params = TimersParams()
|
100
|
+
|
101
|
+
self.__params = deepcopy(params)
|
96
102
|
|
97
103
|
|
98
104
|
sqlite = SQLite(file)
|
@@ -322,7 +328,12 @@ class Timers:
|
|
322
328
|
|
323
329
|
timer = timers[unique]
|
324
330
|
|
325
|
-
|
331
|
+
ready = timer.ready(update)
|
332
|
+
|
333
|
+
if ready is True:
|
334
|
+
self.save_children()
|
335
|
+
|
336
|
+
return ready
|
326
337
|
|
327
338
|
|
328
339
|
def create(
|
@@ -340,8 +351,6 @@ class Timers:
|
|
340
351
|
|
341
352
|
timers = self.params.timers
|
342
353
|
|
343
|
-
self.save_children()
|
344
|
-
|
345
354
|
if unique in timers:
|
346
355
|
raise ValueError('unique')
|
347
356
|
|
@@ -349,6 +358,8 @@ class Timers:
|
|
349
358
|
|
350
359
|
self.load_children()
|
351
360
|
|
361
|
+
self.save_children()
|
362
|
+
|
352
363
|
return self.children[unique]
|
353
364
|
|
354
365
|
|
@@ -371,6 +382,8 @@ class Timers:
|
|
371
382
|
|
372
383
|
timer = timers[unique]
|
373
384
|
|
385
|
+
self.save_children()
|
386
|
+
|
374
387
|
return timer.update(value)
|
375
388
|
|
376
389
|
|
@@ -7,6 +7,7 @@ is permitted, for more information consult the project license file.
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
+
from copy import deepcopy
|
10
11
|
from sqlite3 import Connection
|
11
12
|
from sqlite3 import connect as SQLite
|
12
13
|
from typing import Optional
|
@@ -85,7 +86,7 @@ class Windows:
|
|
85
86
|
|
86
87
|
def __init__( # noqa: CFQ002
|
87
88
|
self,
|
88
|
-
params: 'WindowsParams',
|
89
|
+
params: Optional['WindowsParams'] = None,
|
89
90
|
start: PARSABLE = 'now',
|
90
91
|
stop: PARSABLE = '3000-01-01',
|
91
92
|
*,
|
@@ -97,7 +98,12 @@ class Windows:
|
|
97
98
|
Initialize instance for class using provided parameters.
|
98
99
|
"""
|
99
100
|
|
100
|
-
|
101
|
+
from .params import WindowsParams
|
102
|
+
|
103
|
+
if params is None:
|
104
|
+
params = WindowsParams()
|
105
|
+
|
106
|
+
self.__params = deepcopy(params)
|
101
107
|
|
102
108
|
|
103
109
|
start = Times(start)
|
@@ -389,7 +395,12 @@ class Windows:
|
|
389
395
|
|
390
396
|
window = windows[unique]
|
391
397
|
|
392
|
-
|
398
|
+
ready = window.ready(update)
|
399
|
+
|
400
|
+
if ready is True:
|
401
|
+
self.save_children()
|
402
|
+
|
403
|
+
return ready
|
393
404
|
|
394
405
|
|
395
406
|
def create(
|
@@ -407,8 +418,6 @@ class Windows:
|
|
407
418
|
|
408
419
|
windows = self.params.windows
|
409
420
|
|
410
|
-
self.save_children()
|
411
|
-
|
412
421
|
if unique in windows:
|
413
422
|
raise ValueError('unique')
|
414
423
|
|
@@ -416,6 +425,8 @@ class Windows:
|
|
416
425
|
|
417
426
|
self.load_children()
|
418
427
|
|
428
|
+
self.save_children()
|
429
|
+
|
419
430
|
return self.children[unique]
|
420
431
|
|
421
432
|
|
@@ -438,6 +449,8 @@ class Windows:
|
|
438
449
|
|
439
450
|
window = windows[unique]
|
440
451
|
|
452
|
+
self.save_children()
|
453
|
+
|
441
454
|
return window.update(value)
|
442
455
|
|
443
456
|
|
@@ -0,0 +1 @@
|
|
1
|
+
0.11.1
|
@@ -1 +0,0 @@
|
|
1
|
-
0.11.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
|