ap-client 0.7.0.dev0__tar.gz → 0.7.0.dev2__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.
Files changed (21) hide show
  1. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/PKG-INFO +2 -2
  2. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/cli.py +19 -0
  3. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/profile_commands.py +19 -15
  4. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/pyproject.toml +2 -2
  5. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/__init__.py +0 -0
  6. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/akpool_commands.py +0 -0
  7. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/api.py +0 -0
  8. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/config.py +0 -0
  9. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/dataset_commands.py +0 -0
  10. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/dataset_register.py +0 -0
  11. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/exporter.py +0 -0
  12. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/fs_commands.py +0 -0
  13. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/instance_commands.py +0 -0
  14. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/irepo_sdk.py +0 -0
  15. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/managed_ak.py +0 -0
  16. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/manifest_view.py +0 -0
  17. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/repo_read_guard.py +0 -0
  18. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/share_api.py +0 -0
  19. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/split_publish.py +0 -0
  20. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/tbb.py +0 -0
  21. {ap_client-0.7.0.dev0 → ap_client-0.7.0.dev2}/ap_client/waiter.py +0 -0
@@ -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
@@ -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)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ap-client"
7
- version = "0.7.0.dev0"
7
+ version = "0.7.0.dev2"
8
8
  description = "Agent Platform API Client & CLI"
9
9
  readme = { text = "A lightweight Python SDK and command line interface for Agent Platform. It provides helpers for configuring API access and managing templates, datasets, jobs, and groups.", content-type = "text/markdown" }
10
10
  requires-python = ">=3.10"
@@ -14,7 +14,7 @@ dependencies = [
14
14
  "rich>=13.0.0",
15
15
  "PyYAML>=6.0",
16
16
  "websockets>=13.0",
17
- "irepo-artifact==0.2.2",
17
+ "irepo-artifact==0.2.3",
18
18
  ]
19
19
 
20
20
  [project.optional-dependencies]