lockss-turtles 0.6.0.dev3__tar.gz → 0.6.0.dev4__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.
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/PKG-INFO +1 -1
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/pyproject.toml +1 -1
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/__init__.py +1 -1
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/cli.py +0 -1
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/plugin_registry.py +1 -1
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/plugin_set.py +9 -9
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/tests/unittest/lockss/turtles/__init__.py +1 -1
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/CHANGELOG.rst +0 -0
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/LICENSE +0 -0
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/README.rst +0 -0
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/__main__.py +0 -0
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/app.py +0 -0
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/plugin.py +0 -0
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/util.py +0 -0
- {lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/tests/unittest/lockss/turtles/test_plugin_set.py +0 -0
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
[project]
|
|
30
30
|
name = "lockss-turtles"
|
|
31
|
-
version = "0.6.0-
|
|
31
|
+
version = "0.6.0-dev4" # Always change in __init__.py, and at release time in README.rst and CHANGELOG.rst
|
|
32
32
|
description = "Library and command line tool to manage LOCKSS plugin sets and LOCKSS plugin registries"
|
|
33
33
|
license = { text = "BSD-3-Clause" }
|
|
34
34
|
readme = "README.rst"
|
|
@@ -43,7 +43,6 @@ from pydantic.v1.class_validators import validator
|
|
|
43
43
|
import tabulate
|
|
44
44
|
from typing import Optional
|
|
45
45
|
|
|
46
|
-
from lockss.turtles.plugin_registry import PluginRegistryLayer
|
|
47
46
|
from . import __copyright__, __license__, __version__
|
|
48
47
|
from .app import TurtlesApp
|
|
49
48
|
from .plugin_registry import PluginRegistryLayerIdentifier
|
{lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/src/lockss/turtles/plugin_registry.py
RENAMED
|
@@ -54,7 +54,7 @@ class PluginRegistryCatalog(BaseModelWithRoot):
|
|
|
54
54
|
plugin_registry_files: list[str] = Field(min_length=1, description="A non-empty list of plugin registry files", title='Plugin Registry Files', alias='plugin-registry-files')
|
|
55
55
|
|
|
56
56
|
def get_plugin_registry_files(self) -> list[Path]:
|
|
57
|
-
return [self.
|
|
57
|
+
return [self.get_root().joinpath(pstr) for pstr in self.plugin_registry_files]
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
PluginRegistryLayoutType = Literal['directory', 'rcs']
|
|
@@ -54,7 +54,7 @@ class PluginSetCatalog(BaseModelWithRoot):
|
|
|
54
54
|
plugin_set_files: list[str] = Field(min_length=1, description="A non-empty list of plugin set files", title='Plugin Set Files', alias='plugin-set-files')
|
|
55
55
|
|
|
56
56
|
def get_plugin_set_files(self) -> list[Path]:
|
|
57
|
-
return [self.
|
|
57
|
+
return [self.get_root().joinpath(p) for p in self.plugin_set_files]
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
PluginSetBuilderType = Literal['ant', 'maven']
|
|
@@ -70,10 +70,10 @@ class BasePluginSetBuilder(BaseModelWithRoot, ABC):
|
|
|
70
70
|
pass
|
|
71
71
|
|
|
72
72
|
def get_main(self) -> Path:
|
|
73
|
-
return self.
|
|
73
|
+
return self.get_root().joinpath(self._get_main())
|
|
74
74
|
|
|
75
75
|
def get_test(self) -> Path:
|
|
76
|
-
return self.
|
|
76
|
+
return self.get_root().joinpath(self._get_test())
|
|
77
77
|
|
|
78
78
|
def get_type(self) -> PluginSetBuilderType:
|
|
79
79
|
return getattr(self, 'type')
|
|
@@ -121,7 +121,7 @@ class AntPluginSetBuilder(BasePluginSetBuilder):
|
|
|
121
121
|
if not self._built:
|
|
122
122
|
# Do build
|
|
123
123
|
subprocess.run('ant load-plugins',
|
|
124
|
-
shell=True, cwd=self.
|
|
124
|
+
shell=True, cwd=self.get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
|
|
125
125
|
self._built = True
|
|
126
126
|
|
|
127
127
|
def _little_build(self, plugin_id: PluginIdentifier, keystore_path: Path, keystore_alias: str, keystore_password: str=None) -> tuple[Path, Plugin]:
|
|
@@ -142,14 +142,14 @@ class AntPluginSetBuilder(BasePluginSetBuilder):
|
|
|
142
142
|
cur_id = cur_plugin.get_parent_identifier()
|
|
143
143
|
# Invoke jarplugin
|
|
144
144
|
jar_fstr = Plugin.id_to_file(plugin_id)
|
|
145
|
-
jar_path = self.
|
|
145
|
+
jar_path = self.get_root().joinpath('plugins/jars', f'{plugin_id}.jar')
|
|
146
146
|
jar_path.parent.mkdir(parents=True, exist_ok=True)
|
|
147
147
|
cmd = ['test/scripts/jarplugin',
|
|
148
148
|
'-j', str(jar_path),
|
|
149
149
|
'-p', str(jar_fstr)]
|
|
150
150
|
for d in dirs:
|
|
151
151
|
cmd.extend(['-d', d])
|
|
152
|
-
subprocess.run(cmd, cwd=self.
|
|
152
|
+
subprocess.run(cmd, cwd=self.get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
|
|
153
153
|
# Invoke signplugin
|
|
154
154
|
cmd = ['test/scripts/signplugin',
|
|
155
155
|
'--jar', str(jar_path),
|
|
@@ -158,7 +158,7 @@ class AntPluginSetBuilder(BasePluginSetBuilder):
|
|
|
158
158
|
if keystore_password is not None:
|
|
159
159
|
cmd.extend(['--password', keystore_password])
|
|
160
160
|
try:
|
|
161
|
-
subprocess.run(cmd, cwd=self.
|
|
161
|
+
subprocess.run(cmd, cwd=self.get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
|
|
162
162
|
except subprocess.CalledProcessError as cpe:
|
|
163
163
|
raise self._sanitize(cpe)
|
|
164
164
|
if not jar_path.is_file():
|
|
@@ -203,13 +203,13 @@ class MavenPluginSetBuilder(BasePluginSetBuilder):
|
|
|
203
203
|
f'-Dkeystore.alias={keystore_alias}',
|
|
204
204
|
f'-Dkeystore.password={keystore_password}']
|
|
205
205
|
try:
|
|
206
|
-
subprocess.run(cmd, cwd=self.
|
|
206
|
+
subprocess.run(cmd, cwd=self.get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
|
|
207
207
|
except subprocess.CalledProcessError as cpe:
|
|
208
208
|
raise self._sanitize(cpe)
|
|
209
209
|
self._built = True
|
|
210
210
|
|
|
211
211
|
def _little_build(self, plugin_id: PluginIdentifier) -> tuple[Path, Plugin]:
|
|
212
|
-
jar_path = self.
|
|
212
|
+
jar_path = self.get_root().joinpath('target', 'pluginjars', f'{plugin_id}.jar')
|
|
213
213
|
if not jar_path.is_file():
|
|
214
214
|
raise Exception(f'{plugin_id}: built JAR not found: {jar_path!s}')
|
|
215
215
|
return jar_path, Plugin.from_jar(jar_path)
|
{lockss_turtles-0.6.0.dev3 → lockss_turtles-0.6.0.dev4}/tests/unittest/lockss/turtles/__init__.py
RENAMED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
from collections.abc import Callable
|
|
32
32
|
from pydantic import ValidationError
|
|
33
33
|
from pydantic_core import ErrorDetails
|
|
34
|
-
from typing import Any,
|
|
34
|
+
from typing import Any, Optional, Tuple, Union
|
|
35
35
|
from unittest import TestCase
|
|
36
36
|
|
|
37
37
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|