diracx-cli 0.0.1a20__py3-none-any.whl → 0.0.1a21__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
@@ -10,7 +10,7 @@ from diracx.client.aio import DiracClient
10
10
  from diracx.client.models import DeviceFlowErrorResponse
11
11
  from diracx.core.extensions import select_from_extension
12
12
  from diracx.core.preferences import get_diracx_preferences
13
- from diracx.core.utils import write_credentials
13
+ from diracx.core.utils import read_credentials, write_credentials
14
14
 
15
15
  from .utils import AsyncTyper
16
16
 
@@ -116,11 +116,11 @@ async def logout():
116
116
  async with DiracClient() as api:
117
117
  credentials_path = get_diracx_preferences().credentials_path
118
118
  if credentials_path.exists():
119
- credentials = json.loads(credentials_path.read_text())
119
+ credentials = read_credentials(credentials_path)
120
120
 
121
121
  # Revoke refresh token
122
122
  try:
123
- await api.auth.revoke_refresh_token(credentials["refresh_token"])
123
+ await api.auth.revoke_refresh_token(credentials.refresh_token)
124
124
  except Exception as e:
125
125
  print(f"Error revoking the refresh token {e!r}")
126
126
  pass
diracx/cli/jobs.py CHANGED
@@ -152,7 +152,7 @@ def display_rich(data, content_range: ContentRange) -> None:
152
152
  async def submit(jdl: list[FileText]):
153
153
  async with DiracClient() as api:
154
154
  # api.valid(enforce_https=False)
155
- jobs = await api.jobs.submit_bulk_jobs([x.read() for x in jdl])
155
+ jobs = await api.jobs.submit_bulk_jdl_jobs([x.read() for x in jdl])
156
156
  print(
157
157
  f"Inserted {len(jobs)} jobs with ids: {','.join(map(str, (job.job_id for job in jobs)))}"
158
158
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diracx-cli
3
- Version: 0.0.1a20
3
+ Version: 0.0.1a21
4
4
  Summary: TODO
5
5
  License: GPL-3.0-only
6
6
  Classifier: Intended Audience :: Science/Research
@@ -15,7 +15,7 @@ Requires-Dist: diracx-api
15
15
  Requires-Dist: diracx-client
16
16
  Requires-Dist: diracx-core
17
17
  Requires-Dist: gitpython
18
- Requires-Dist: pydantic
18
+ Requires-Dist: pydantic>=2.10
19
19
  Requires-Dist: rich
20
20
  Requires-Dist: typer
21
21
  Requires-Dist: pyyaml
@@ -1,13 +1,13 @@
1
- diracx/cli/__init__.py,sha256=JoFLjpTj4qdUlSSUDTSAM22wbPQo1ksjUdcW39eFSZ8,5398
1
+ diracx/cli/__init__.py,sha256=eenV2ezX845cIvDV2mTKqd23TLwXQBwD6Ho252h8WwA,5407
2
2
  diracx/cli/__main__.py,sha256=SM9tEc-fiW7cDHTKQRwgKobe5FfijHLYiAWfWaIM_zg,56
3
3
  diracx/cli/config.py,sha256=r5Lq_SN-1t3IzGAeS57ZzS-ukLhP6PMnmTXNld2pZXU,818
4
- diracx/cli/jobs.py,sha256=rv3sa6Cz32y2wvKR7yV7mT719VOMm8qZ1nZFviNF98E,4721
4
+ diracx/cli/jobs.py,sha256=wV7-YMI_jUIflj87cBM4yuI2EF9K5mu2WsCG_eakWrg,4725
5
5
  diracx/cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  diracx/cli/utils.py,sha256=NwhMMHwveKOdW2aoSqpnLnfOKhPnjmPPLpX69naPAzc,855
7
7
  diracx/cli/internal/__init__.py,sha256=DCKzknHUEvo7PYiatZis15-gkxhga5WU4cyVZ6LCkmA,6578
8
8
  diracx/cli/internal/legacy.py,sha256=bhq8vfHoL0fZGhtye0EqMsucwepOYpQkj3UGe-rHNhY,10882
9
- diracx_cli-0.0.1a20.dist-info/METADATA,sha256=3fIzXo6H7j43oUZpQjyX4SHZd4pcqFIH52LEui6L37I,789
10
- diracx_cli-0.0.1a20.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
11
- diracx_cli-0.0.1a20.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
12
- diracx_cli-0.0.1a20.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
13
- diracx_cli-0.0.1a20.dist-info/RECORD,,
9
+ diracx_cli-0.0.1a21.dist-info/METADATA,sha256=FIGewmFFEy_xHTmXoJQ9WodWOQx2ViJyWK07rcnmBps,795
10
+ diracx_cli-0.0.1a21.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
11
+ diracx_cli-0.0.1a21.dist-info/entry_points.txt,sha256=b1909GHVOkFUiHVglNlpwia4Ug-7Ncrg-8D5xtYVAlw,169
12
+ diracx_cli-0.0.1a21.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
13
+ diracx_cli-0.0.1a21.dist-info/RECORD,,