diracx-cli 0.0.6__py3-none-any.whl → 0.0.8__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.
diracx/cli/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from diracx.core.extensions import select_from_extension
3
+ from diracx.core.extensions import DiracEntryPoint, select_from_extension
4
4
 
5
5
  from .auth import app
6
6
 
@@ -9,21 +9,26 @@ __all__ = ("app",)
9
9
 
10
10
  # Load all the sub commands
11
11
  cli_names = set(
12
- [entry_point.name for entry_point in select_from_extension(group="diracx.cli")]
12
+ [
13
+ entry_point.name
14
+ for entry_point in select_from_extension(group=DiracEntryPoint.CLI)
15
+ ]
13
16
  )
14
17
  for cli_name in cli_names:
15
- entry_point = select_from_extension(group="diracx.cli", name=cli_name)[0]
18
+ entry_point = select_from_extension(group=DiracEntryPoint.CLI, name=cli_name)[0]
16
19
  app.add_typer(entry_point.load(), name=entry_point.name)
17
20
 
18
21
 
19
22
  cli_hidden_names = set(
20
23
  [
21
24
  entry_point.name
22
- for entry_point in select_from_extension(group="diracx.cli.hidden")
25
+ for entry_point in select_from_extension(group=DiracEntryPoint.HIDDEN_CLI)
23
26
  ]
24
27
  )
25
28
  for cli_name in cli_hidden_names:
26
- entry_point = select_from_extension(group="diracx.cli.hidden", name=cli_name)[0]
29
+ entry_point = select_from_extension(
30
+ group=DiracEntryPoint.HIDDEN_CLI, name=cli_name
31
+ )[0]
27
32
  app.add_typer(entry_point.load(), name=entry_point.name, hidden=True)
28
33
 
29
34
 
@@ -21,7 +21,7 @@ from typer import Option
21
21
 
22
22
  from diracx.core.config import Config
23
23
  from diracx.core.config.schema import Field, SupportInfo
24
- from diracx.core.extensions import select_from_extension
24
+ from diracx.core.extensions import DiracEntryPoint, select_from_extension
25
25
 
26
26
  from ..utils import AsyncTyper
27
27
 
@@ -77,9 +77,9 @@ def cs_sync(old_file: Path, new_file: Path):
77
77
  )
78
78
 
79
79
  _apply_fixes(raw)
80
- config_class: Config = select_from_extension(group="diracx", name="config")[
81
- 0
82
- ].load()
80
+ config_class: Config = select_from_extension(
81
+ group=DiracEntryPoint.CORE, name="config"
82
+ )[0].load()
83
83
  config = config_class.model_validate(raw)
84
84
  new_file.write_text(
85
85
  yaml.safe_dump(config.model_dump(exclude_unset=True, mode="json"))
@@ -264,7 +264,7 @@ def generate_helm_values(
264
264
 
265
265
  from diracx.core.extensions import select_from_extension
266
266
 
267
- for entry_point in select_from_extension(group="diracx.dbs.sql"):
267
+ for entry_point in select_from_extension(group=DiracEntryPoint.SQL_DB):
268
268
  db_name = entry_point.name
269
269
  db_config = all_db_configs.get(db_name, {})
270
270
 
@@ -310,7 +310,7 @@ def generate_helm_values(
310
310
  },
311
311
  }
312
312
 
313
- for entry_point in select_from_extension(group="diracx.dbs.os"):
313
+ for entry_point in select_from_extension(group=DiracEntryPoint.OS_DB):
314
314
  db_name = entry_point.name
315
315
  db_config = all_db_configs.get(db_name, {})
316
316
 
diracx/cli/jobs.py CHANGED
@@ -13,7 +13,11 @@ from rich.table import Table
13
13
  from typer import FileText, Option
14
14
 
15
15
  from diracx.client.aio import AsyncDiracClient
16
- from diracx.core.models import ScalarSearchOperator, SearchSpec, VectorSearchOperator
16
+ from diracx.core.models.search import (
17
+ ScalarSearchOperator,
18
+ SearchSpec,
19
+ VectorSearchOperator,
20
+ )
17
21
  from diracx.core.preferences import OutputFormats, get_diracx_preferences
18
22
 
19
23
  from .utils import AsyncTyper
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diracx-cli
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: TODO
5
5
  License: GPL-3.0-only
6
6
  Classifier: Intended Audience :: Science/Research
@@ -1,14 +1,14 @@
1
- diracx/cli/__init__.py,sha256=HB9Umd1DXskg8lrRY0ZnSaOBVYPD5Pl4PYRWts-ZR0E,808
1
+ diracx/cli/__init__.py,sha256=X1nuw3PX5aouWKCBqwyPEJa8ofZy503RHK823yuT1A4,889
2
2
  diracx/cli/__main__.py,sha256=yGjYWjRcrrp5mJ0xD0v3rc7VIA9bzDib5D7LPAdH4OI,92
3
3
  diracx/cli/auth.py,sha256=QkwzHCXCAKRCPOOSL_8m-fEEtFy3IXLBxzLYn0aAEmk,5110
4
4
  diracx/cli/config.py,sha256=LDoFT4x0VF0QAU2_y-fkZWQwD7yMYmyiM7VJFLK79GQ,863
5
- diracx/cli/jobs.py,sha256=ev3Zm6WH9g5MVT5EXbfSwHamiQUcatT4bYUrxx4c8BE,4729
5
+ diracx/cli/jobs.py,sha256=0GboQ_XCk8mAjy1NZhdlu2bDlkoVrrrXUGGbVCdPDaA,4753
6
6
  diracx/cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  diracx/cli/utils.py,sha256=--kP1lOO4yky81nxmej8IQz1v6njxn_WYol5O9LcJ04,1063
8
8
  diracx/cli/internal/__init__.py,sha256=KZrzVcKu3YhNev2XF2KA2nttAa9ONU3CVUgatVMonJ4,143
9
9
  diracx/cli/internal/config.py,sha256=T5bf9brG1oCQkQ6D7Em4z7Fk--2Q-nPtUbe2jv-syUU,6079
10
- diracx/cli/internal/legacy.py,sha256=NV28d8_1m3ePL7cEQYQUqXoQDNP1S5jkeilsi7UXAP4,13516
11
- diracx_cli-0.0.6.dist-info/METADATA,sha256=G_Ynyie35C1iLKDiPVovTMlT5Z2adRR8a0CVBLtvygQ,760
12
- diracx_cli-0.0.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
13
- diracx_cli-0.0.6.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
14
- diracx_cli-0.0.6.dist-info/RECORD,,
10
+ diracx/cli/internal/legacy.py,sha256=esdSzhY4kImEWrUavrrVidrAYD71d061bmOOaM3v9vQ,13557
11
+ diracx_cli-0.0.8.dist-info/METADATA,sha256=W61Kv0a2-nUC-z5XPm7cWEZo6QRs7Prd2J_mBreCyyc,760
12
+ diracx_cli-0.0.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
13
+ diracx_cli-0.0.8.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
14
+ diracx_cli-0.0.8.dist-info/RECORD,,