lockss-turtles 0.6.0.dev10__py3-none-any.whl → 0.6.0.dev11__py3-none-any.whl
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.
- lockss/turtles/__init__.py +1 -1
- lockss/turtles/plugin_registry.py +20 -0
- {lockss_turtles-0.6.0.dev10.dist-info → lockss_turtles-0.6.0.dev11.dist-info}/METADATA +1 -1
- {lockss_turtles-0.6.0.dev10.dist-info → lockss_turtles-0.6.0.dev11.dist-info}/RECORD +7 -7
- {lockss_turtles-0.6.0.dev10.dist-info → lockss_turtles-0.6.0.dev11.dist-info}/LICENSE +0 -0
- {lockss_turtles-0.6.0.dev10.dist-info → lockss_turtles-0.6.0.dev11.dist-info}/WHEEL +0 -0
- {lockss_turtles-0.6.0.dev10.dist-info → lockss_turtles-0.6.0.dev11.dist-info}/entry_points.txt +0 -0
lockss/turtles/__init__.py
CHANGED
|
@@ -175,6 +175,11 @@ class PluginRegistryLayer(BaseModel, ABC):
|
|
|
175
175
|
name: str = Field(title='Plugin Registry Layer Name', description='A name for the plugin registry layer')
|
|
176
176
|
path: str = Field(title='Plugin Registry Layer Path', description='A root path for the plugin registry layer')
|
|
177
177
|
|
|
178
|
+
_plugin_registry: Optional[PluginRegistry]
|
|
179
|
+
|
|
180
|
+
def deploy_plugin(self, plugin_id: PluginIdentifier, src_path: Path, interactive: bool=False) -> Optional[tuple[Path, Plugin]]:
|
|
181
|
+
self.get_plugin_registry().get_layout().deploy_plugin(plugin_id, self, src_path, interactive)
|
|
182
|
+
|
|
178
183
|
def get_id(self) -> PluginRegistryLayerIdentifier:
|
|
179
184
|
return self.id
|
|
180
185
|
|
|
@@ -187,6 +192,19 @@ class PluginRegistryLayer(BaseModel, ABC):
|
|
|
187
192
|
def get_path(self) -> Path:
|
|
188
193
|
return path(self.path)
|
|
189
194
|
|
|
195
|
+
def get_plugin_registry(self) -> PluginRegistry:
|
|
196
|
+
if self._plugin_registry is None:
|
|
197
|
+
raise RuntimeError('Uninitialized plugin registry')
|
|
198
|
+
return self._plugin_registry
|
|
199
|
+
|
|
200
|
+
def initialize(self, plugin_registry: PluginRegistry) -> PluginRegistryLayer:
|
|
201
|
+
self._plugin_registry = plugin_registry
|
|
202
|
+
return self
|
|
203
|
+
|
|
204
|
+
def model_post_init(self, context: Any) -> None:
|
|
205
|
+
super().model_post_init(context)
|
|
206
|
+
self._plugin_registry = None
|
|
207
|
+
|
|
190
208
|
|
|
191
209
|
PluginRegistryKind = Literal['PluginRegistry']
|
|
192
210
|
|
|
@@ -236,3 +254,5 @@ class PluginRegistry(BaseModelWithRoot):
|
|
|
236
254
|
def model_post_init(self, context: Any) -> None:
|
|
237
255
|
super().model_post_init(context)
|
|
238
256
|
self.get_layout().initialize(self)
|
|
257
|
+
for layer in self.get_layers():
|
|
258
|
+
layer.initialize(self)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
lockss/turtles/__init__.py,sha256=
|
|
1
|
+
lockss/turtles/__init__.py,sha256=PwM8A-DGDcbfRxT5F8E6F_LQvwn9FgpvAEe6DoyFTzY,1744
|
|
2
2
|
lockss/turtles/__main__.py,sha256=825geLIwXS0LKRqxifJXlLaAZrY8nllXfHzw5ch5ysM,1624
|
|
3
3
|
lockss/turtles/app.py,sha256=7jC9fhVxfG9RDM8_yLxWzZ2cx_9HOzFZX3aJ9Np2hbg,13410
|
|
4
4
|
lockss/turtles/cli.py,sha256=pLZAG1hmYarCp0R4vHSJcTs3G1umk2esvaLhM5JX7rg,18435
|
|
5
5
|
lockss/turtles/plugin.py,sha256=re44YVlzXVU8azDshxn7oHw1GdTQLLQgYwkvZlur-60,5384
|
|
6
|
-
lockss/turtles/plugin_registry.py,sha256=
|
|
6
|
+
lockss/turtles/plugin_registry.py,sha256=8_pSMhFDYhxUxi1JC-76ao9F32Winv-ijpYyb-EDraY,11901
|
|
7
7
|
lockss/turtles/plugin_set.py,sha256=hKUXOSRyhHxxcMWE3I69Wykod32Ig871oeJsMTvbXfU,11291
|
|
8
8
|
lockss/turtles/util.py,sha256=wGCrw_YySvyqaCzT0PItzXpkLHOCMMC_DQHhGU7zudI,2500
|
|
9
9
|
unittest/lockss/turtles/__init__.py,sha256=hrgWx4GaP-hhPBuRlbLndJnOQmZicKCLaP-dQTCu1sQ,3162
|
|
10
10
|
unittest/lockss/turtles/test_plugin_set.py,sha256=i-VM8mvrPuW2KqUlh2HPVRtgh3-F7RhmRAwcvhwpoDA,3354
|
|
11
|
-
lockss_turtles-0.6.0.
|
|
12
|
-
lockss_turtles-0.6.0.
|
|
13
|
-
lockss_turtles-0.6.0.
|
|
14
|
-
lockss_turtles-0.6.0.
|
|
15
|
-
lockss_turtles-0.6.0.
|
|
11
|
+
lockss_turtles-0.6.0.dev11.dist-info/LICENSE,sha256=O9ONND4uDxY_jucI4jZDf2liAk05ScEJaYu-Al7EOdQ,1506
|
|
12
|
+
lockss_turtles-0.6.0.dev11.dist-info/METADATA,sha256=bQIbBFelD0ka3joMIU2PgZ9xnlMvyaLUyq1VYo35tJ0,39611
|
|
13
|
+
lockss_turtles-0.6.0.dev11.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
14
|
+
lockss_turtles-0.6.0.dev11.dist-info/entry_points.txt,sha256=25BAVFSBRKWAWiXIGZgcr1ypt2mV7nj31Jl8WcNZZOk,51
|
|
15
|
+
lockss_turtles-0.6.0.dev11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{lockss_turtles-0.6.0.dev10.dist-info → lockss_turtles-0.6.0.dev11.dist-info}/entry_points.txt
RENAMED
|
File without changes
|