diracx-cli 0.0.1a45__py3-none-any.whl → 0.0.1a47__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/auth.py CHANGED
@@ -12,7 +12,9 @@ from typing import Annotated, Optional
12
12
  import typer
13
13
 
14
14
  from diracx.client.aio import AsyncDiracClient
15
- from diracx.client.models import DeviceFlowErrorResponse
15
+
16
+ # See https://github.com/DIRACGrid/diracx/issues/578
17
+ from diracx.client.models import DeviceFlowErrorResponse # type: ignore [attr-defined]
16
18
  from diracx.core.preferences import get_diracx_preferences
17
19
  from diracx.core.utils import read_credentials, write_credentials
18
20
 
@@ -88,7 +90,9 @@ async def login(
88
90
  )
89
91
  while expires > datetime.now(tz=timezone.utc):
90
92
  print(".", end="", flush=True)
91
- response = await api.auth.get_oidc_token(device_code=data.device_code, client_id=api.client_id) # type: ignore
93
+ response = await api.auth.get_oidc_token(
94
+ device_code=data.device_code, client_id=api.client_id
95
+ ) # type: ignore
92
96
  if isinstance(response, DeviceFlowErrorResponse):
93
97
  if response.error == "authorization_pending":
94
98
  # TODO: Setting more than 5 seconds results in an error
@@ -95,6 +95,7 @@ def _apply_fixes(raw):
95
95
  raw["DIRAC"].pop("Extensions", None)
96
96
  raw["DIRAC"].pop("Framework", None)
97
97
  raw["DIRAC"].pop("Security", None)
98
+ raw["DIRAC"].pop("PreferredURLPatterns", None)
98
99
 
99
100
  # This is VOMS specific and no longer required
100
101
  raw["DIRAC"].pop("ConnConf", None)
@@ -210,7 +211,6 @@ def generate_helm_values(
210
211
  },
211
212
  "rabbitmq": {"enabled": False},
212
213
  "mysql": {"enabled": False},
213
- "global": {"images": {"services": "FILL ME"}, "storageClassName": "FILL ME"},
214
214
  }
215
215
 
216
216
  cfg = diraccfg.CFG().loadFromBuffer(public_cfg.read_text())
@@ -264,8 +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.db.sql"):
268
-
267
+ for entry_point in select_from_extension(group="diracx.dbs.sql"):
269
268
  db_name = entry_point.name
270
269
  db_config = all_db_configs.get(db_name, {})
271
270
 
@@ -284,9 +283,9 @@ def generate_helm_values(
284
283
  if "Password" in db_config:
285
284
  sql_dbs["dbs"][db_name]["password"] = db_config.get("Password")
286
285
  if "Host" in db_config or "Port" in db_config:
287
- sql_dbs["dbs"][db_name][
288
- "host"
289
- ] = f"{db_config.get('Host', default_db_host)}:{db_config.get('Port', default_db_port)}"
286
+ sql_dbs["dbs"][db_name]["host"] = (
287
+ f"{db_config.get('Host', default_db_host)}:{db_config.get('Port', default_db_port)}"
288
+ )
290
289
  if not sql_dbs["dbs"][db_name]:
291
290
  sql_dbs["dbs"][db_name] = None
292
291
 
@@ -311,7 +310,7 @@ def generate_helm_values(
311
310
  },
312
311
  }
313
312
 
314
- for entry_point in select_from_extension(group="diracx.db.os"):
313
+ for entry_point in select_from_extension(group="diracx.dbs.os"):
315
314
  db_name = entry_point.name
316
315
  db_config = all_db_configs.get(db_name, {})
317
316
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diracx-cli
3
- Version: 0.0.1a45
3
+ Version: 0.0.1a47
4
4
  Summary: TODO
5
5
  License: GPL-3.0-only
6
6
  Classifier: Intended Audience :: Science/Research
@@ -17,7 +17,7 @@ Requires-Dist: gitpython
17
17
  Requires-Dist: pydantic>=2.10
18
18
  Requires-Dist: pyyaml
19
19
  Requires-Dist: rich
20
- Requires-Dist: typer>=0.12.4
20
+ Requires-Dist: typer>=0.15.4
21
21
  Provides-Extra: testing
22
22
  Requires-Dist: diracx-testing; extra == 'testing'
23
23
  Provides-Extra: types
@@ -1,14 +1,14 @@
1
1
  diracx/cli/__init__.py,sha256=HB9Umd1DXskg8lrRY0ZnSaOBVYPD5Pl4PYRWts-ZR0E,808
2
2
  diracx/cli/__main__.py,sha256=yGjYWjRcrrp5mJ0xD0v3rc7VIA9bzDib5D7LPAdH4OI,92
3
- diracx/cli/auth.py,sha256=UZ_vhDv2K9qMH_pSFn-6hA6hL7QmBY1a_DzvLoTp-EQ,5003
3
+ diracx/cli/auth.py,sha256=kY6cRy6Xv_EkCvtI8-NMAELzSxfzzjWAs69I-IdfGds,5118
4
4
  diracx/cli/config.py,sha256=LDoFT4x0VF0QAU2_y-fkZWQwD7yMYmyiM7VJFLK79GQ,863
5
5
  diracx/cli/jobs.py,sha256=ev3Zm6WH9g5MVT5EXbfSwHamiQUcatT4bYUrxx4c8BE,4729
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=zfdqO-ydFSkio2CTIcHXlObAwhBq25WNZgdChkdZ1LE,13548
11
- diracx_cli-0.0.1a45.dist-info/METADATA,sha256=EWz-8JC4mvAfdgsyYZ7d3939eQ0jRi87TTrz6n5CP_A,763
12
- diracx_cli-0.0.1a45.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
- diracx_cli-0.0.1a45.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
14
- diracx_cli-0.0.1a45.dist-info/RECORD,,
10
+ diracx/cli/internal/legacy.py,sha256=NV28d8_1m3ePL7cEQYQUqXoQDNP1S5jkeilsi7UXAP4,13516
11
+ diracx_cli-0.0.1a47.dist-info/METADATA,sha256=HI6gQuaBE0fXFPehyxYR2velbHIhh9-tdeYm7K6w310,763
12
+ diracx_cli-0.0.1a47.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
+ diracx_cli-0.0.1a47.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
14
+ diracx_cli-0.0.1a47.dist-info/RECORD,,