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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lockss-turtles
3
- Version: 0.6.0.dev3
3
+ Version: 0.6.0.dev4
4
4
  Summary: Library and command line tool to manage LOCKSS plugin sets and LOCKSS plugin registries
5
5
  License: BSD-3-Clause
6
6
  Author: Thib Guicherd-Callin
@@ -28,7 +28,7 @@
28
28
 
29
29
  [project]
30
30
  name = "lockss-turtles"
31
- version = "0.6.0-dev3" # Always change in __init__.py, and at release time in README.rst and CHANGELOG.rst
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"
@@ -5,7 +5,7 @@ Library and command line tool to manage LOCKSS plugin sets and LOCKSS plugin
5
5
  registries.
6
6
  """
7
7
 
8
- __version__ = '0.6.0-dev3'
8
+ __version__ = '0.6.0-dev4'
9
9
 
10
10
  __copyright__ = '''
11
11
  Copyright (c) 2000-2025, Board of Trustees of Leland Stanford Jr. University
@@ -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
@@ -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._get_root().joinpath(pstr) for pstr in self.plugin_registry_files]
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._get_root().joinpath(p) for p in self.plugin_set_files]
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._get_root().joinpath(self._get_main())
73
+ return self.get_root().joinpath(self._get_main())
74
74
 
75
75
  def get_test(self) -> Path:
76
- return self._get_root().joinpath(self._get_test())
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._get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
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._get_root().joinpath('plugins/jars', f'{plugin_id}.jar')
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._get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
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._get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
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._get_root(), check=True, stdout=sys.stdout, stderr=sys.stderr)
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._get_root().joinpath('target', 'pluginjars', f'{plugin_id}.jar')
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)
@@ -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, Dict, Optional, Tuple, Union
34
+ from typing import Any, Optional, Tuple, Union
35
35
  from unittest import TestCase
36
36
 
37
37