ap-client 0.7.0.dev0__py3-none-any.whl → 0.7.0.dev2__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.
ap_client/cli.py CHANGED
@@ -953,6 +953,25 @@ def _print_job_get_plain(job: dict) -> None:
953
953
  ]
954
954
  )
955
955
 
956
+ bindings = job.get("ak_bindings") or []
957
+ rows = [
958
+ {**parameter, "ak_id": binding["ak_id"]}
959
+ for binding in bindings
960
+ for parameter in binding.get("parameters", [])
961
+ ]
962
+ if "ak_bindings.parameters" in (job.get("restricted_fields") or []):
963
+ typer.echo("\nManaged AK parameters: content access required")
964
+ elif rows:
965
+ typer.echo("\nManaged AK parameters")
966
+ for row in rows:
967
+ typer.echo(f" {row['parameter']}: {row['value']} -> {row['ak_id']}")
968
+ if any("parameters" not in binding for binding in bindings):
969
+ typer.echo(" Some historical parameter mappings are unavailable")
970
+ elif response_ak_ids(job):
971
+ typer.echo("\nManaged AK parameters: historical mapping unavailable")
972
+ elif "ak_bindings" in job:
973
+ typer.echo("\nManaged AK parameters\n No managed AK used")
974
+
956
975
  meta_pairs = [
957
976
  ("meta_model", job.get("meta_model")),
958
977
  ("meta_job_type", job.get("meta_job_type")),
@@ -669,21 +669,25 @@ def profile_versions(
669
669
  current = client.get_profile(identifier)
670
670
  items_key = "data" if "data" in result else "items" if "items" in result else "versions"
671
671
  items = result.get(items_key) or []
672
- # Derive version-item shape from archived items so new fields
673
- # are automatically picked up; fall back to a minimal set when
674
- # no archived versions exist yet.
675
- if items:
676
- fields = (*items[0], "release")
677
- else:
678
- fields = (
679
- "version",
680
- "name",
681
- "template",
682
- "updated_at",
683
- "verification",
684
- "release",
685
- "tags",
686
- )
672
+ # Match the version-summary API instead of inferring fields from an
673
+ # archived row: optional fields may exist only on the current version.
674
+ # Keep spec and live job_meta out of the version-list response.
675
+ fields = (
676
+ "version",
677
+ "name",
678
+ "description",
679
+ "template",
680
+ "account_pool",
681
+ "owner_name",
682
+ "owner_realname",
683
+ "author_name",
684
+ "author_realname",
685
+ "tags",
686
+ "verification",
687
+ "release",
688
+ "update_reason",
689
+ "updated_at",
690
+ )
687
691
  current_item = {k: current[k] for k in fields if k in current}
688
692
  result[items_key] = [current_item] + items
689
693
  # Adjust total count (+1 for current version)
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ap-client
3
- Version: 0.7.0.dev0
3
+ Version: 0.7.0.dev2
4
4
  Summary: Agent Platform API Client & CLI
5
5
  Requires-Python: >=3.10
6
- Requires-Dist: irepo-artifact==0.2.2
6
+ Requires-Dist: irepo-artifact==0.2.3
7
7
  Requires-Dist: pyyaml>=6.0
8
8
  Requires-Dist: requests>=2.28.0
9
9
  Requires-Dist: rich>=13.0.0
@@ -1,7 +1,7 @@
1
1
  ap_client/__init__.py,sha256=3_72pFnCJjc9foZlmC_d5cSQkLzpoY0nLhtcnyqDdiQ,507
2
2
  ap_client/akpool_commands.py,sha256=DhhPka8Nf03HSYYcokn0EEgAjEtLYtVm3ix6pPjdmYQ,6794
3
3
  ap_client/api.py,sha256=gclqYcPzlepgoLoobp4nv9f27ZsmhOvq9b-u7qGIMdI,135969
4
- ap_client/cli.py,sha256=f8u1NG_AUCno0ui7D_lzxnLP3RfjtsbJzOKGg4aYgaQ,314543
4
+ ap_client/cli.py,sha256=-kIIJZr3aL3IncxyAd4yYO0rzDMX6VnEX7QFqbMioFw,315411
5
5
  ap_client/config.py,sha256=HRGqGgdw2zUq9LPzX4P-qcs-5QmcSoJHIZn60gOidJo,11881
6
6
  ap_client/dataset_commands.py,sha256=sTPtHs4mRRSDvyZIaNniXIfazvXhYnu1ovBrrQGXw4o,84024
7
7
  ap_client/dataset_register.py,sha256=dFE1P70J60HrftaRxU4n2KDF1bWHqu4ezSE2monYsyY,15385
@@ -11,13 +11,13 @@ ap_client/instance_commands.py,sha256=pf6RjQFZRyWQfMWMJgJUqcI2BcQRBpoBWvZAOe2vrn
11
11
  ap_client/irepo_sdk.py,sha256=lGQnZ2X4-k3PW0Tps65YUbaVs7Y0xFwYbnngyTWiYmk,44587
12
12
  ap_client/managed_ak.py,sha256=dmWJu7gEpEdOEIq3xXtBQAnhg8y-fCv04ENgglBxdF0,9357
13
13
  ap_client/manifest_view.py,sha256=gDCHYrUFsoy9vSxXON2UVmjkg9H0QF0-zQMxuXX16mA,3831
14
- ap_client/profile_commands.py,sha256=GmOE6pNd-fJmnsAMqrkTA4TyKSwg2tfk5gI7Q_Bq250,29177
14
+ ap_client/profile_commands.py,sha256=cpgsZBDQV_5KzzvVk82DB3JjZGj6i-z7-VDOwSera6U,29307
15
15
  ap_client/repo_read_guard.py,sha256=S_rQt5uw6sLIXSMHQ9tg-vtJkAuDkOe1nAbevy4quvQ,1605
16
16
  ap_client/share_api.py,sha256=Im7NpoqdYwVh67bJNQpvjsHUsFwJrrcAk4Zy0v58SKI,8782
17
17
  ap_client/split_publish.py,sha256=7QAf9b4W6A-vRmlccfIZeWjlUmN76P6nZX5dOpIyoRc,6590
18
18
  ap_client/tbb.py,sha256=WJstsdqxCXvuNuSdIOc0Y6Q4GgUWE0cAj0dP4iMKHVM,7149
19
19
  ap_client/waiter.py,sha256=l-9F4j7z3-VpeMKEKAdNg_4ahReu0fEFsoby1bMiQd0,7794
20
- ap_client-0.7.0.dev0.dist-info/METADATA,sha256=sQpcFMSv7WeHuaD8aXQTnJig-88j4IcoAlREUItmAk0,694
21
- ap_client-0.7.0.dev0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
22
- ap_client-0.7.0.dev0.dist-info/entry_points.txt,sha256=lxFlc62mI5NftTCQ5W1fTPQLnItvI8AYQ3aIlOLVLn0,42
23
- ap_client-0.7.0.dev0.dist-info/RECORD,,
20
+ ap_client-0.7.0.dev2.dist-info/METADATA,sha256=7BSorZAEzzfQJg0s9wdDNNvs-05o5g3t7sBcHAfpPjc,694
21
+ ap_client-0.7.0.dev2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
22
+ ap_client-0.7.0.dev2.dist-info/entry_points.txt,sha256=lxFlc62mI5NftTCQ5W1fTPQLnItvI8AYQ3aIlOLVLn0,42
23
+ ap_client-0.7.0.dev2.dist-info/RECORD,,