apheris-foundry-cli 2.4.0__tar.gz → 2.6.0__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 (69) hide show
  1. {apheris_foundry_cli-2.4.0/src/apheris_foundry_cli.egg-info → apheris_foundry_cli-2.6.0}/PKG-INFO +1 -1
  2. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/pyproject.toml +1 -1
  3. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0/src/apheris_foundry_cli.egg-info}/PKG-INFO +1 -1
  4. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apheris_foundry_cli.egg-info/SOURCES.txt +1 -0
  5. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/docs.py +3 -12
  6. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/foundry.py +12 -3
  7. apheris_foundry_cli-2.6.0/src/apherisfold_cli/version.py +1 -0
  8. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_cli.py +9 -2
  9. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_docs.py +3 -12
  10. apheris_foundry_cli-2.6.0/tests/test_foundry_execution.py +36 -0
  11. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_jobs_metadata.py +1 -0
  12. apheris_foundry_cli-2.4.0/src/apherisfold_cli/version.py +0 -1
  13. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/LICENSE +0 -0
  14. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/README.md +0 -0
  15. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/setup.cfg +0 -0
  16. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apheris_foundry_cli.egg-info/dependency_links.txt +0 -0
  17. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apheris_foundry_cli.egg-info/entry_points.txt +0 -0
  18. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apheris_foundry_cli.egg-info/requires.txt +0 -0
  19. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apheris_foundry_cli.egg-info/top_level.txt +0 -0
  20. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/__init__.py +0 -0
  21. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/__init__.py +0 -0
  22. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/compounds.py +0 -0
  23. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/login.py +0 -0
  24. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/settings.py +0 -0
  25. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/skills.py +0 -0
  26. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/commands/weights.py +0 -0
  27. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/__init__.py +0 -0
  28. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/auth.py +0 -0
  29. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/browser.py +0 -0
  30. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/config.py +0 -0
  31. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/context.py +0 -0
  32. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/documents.py +0 -0
  33. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/errors.py +0 -0
  34. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/hub_requests.py +0 -0
  35. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/input_archive.py +0 -0
  36. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/io.py +0 -0
  37. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/limits.py +0 -0
  38. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/login_profiles.py +0 -0
  39. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/msa.py +0 -0
  40. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/pubchem.py +0 -0
  41. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/render.py +0 -0
  42. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/result_artifacts.py +0 -0
  43. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/core/transient.py +0 -0
  44. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/handlers.py +0 -0
  45. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/main.py +0 -0
  46. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/src/apherisfold_cli/skills/apheris-foundry-hub/SKILL.md +0 -0
  47. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_auth.py +0 -0
  48. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_auth_lifecycle.py +0 -0
  49. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_benchmark_examples.py +0 -0
  50. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_browser.py +0 -0
  51. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_config.py +0 -0
  52. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_documents.py +0 -0
  53. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_dry_run_guard.py +0 -0
  54. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_foundry_helpers.py +0 -0
  55. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_foundry_warnings.py +0 -0
  56. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_handlers.py +0 -0
  57. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_hub_requests.py +0 -0
  58. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_input_archive.py +0 -0
  59. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_io.py +0 -0
  60. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_jobs_update.py +0 -0
  61. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_login_callback.py +0 -0
  62. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_main.py +0 -0
  63. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_model_discovery.py +0 -0
  64. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_msa.py +0 -0
  65. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_pubchem.py +0 -0
  66. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_render.py +0 -0
  67. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_result_artifacts.py +0 -0
  68. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_skills.py +0 -0
  69. {apheris_foundry_cli-2.4.0 → apheris_foundry_cli-2.6.0}/tests/test_weights.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apheris-foundry-cli
3
- Version: 2.4.0
3
+ Version: 2.6.0
4
4
  Summary: Command-line interface for Apheris Foundry workflows.
5
5
  Author: Apheris
6
6
  License-Expression: LicenseRef-Apheris-Foundry-Software-License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "apheris-foundry-cli"
7
- version = "2.4.0"
7
+ version = "2.6.0"
8
8
  description = "Command-line interface for Apheris Foundry workflows."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apheris-foundry-cli
3
- Version: 2.4.0
3
+ Version: 2.6.0
4
4
  Summary: Command-line interface for Apheris Foundry workflows.
5
5
  Author: Apheris
6
6
  License-Expression: LicenseRef-Apheris-Foundry-Software-License
@@ -46,6 +46,7 @@ tests/test_config.py
46
46
  tests/test_docs.py
47
47
  tests/test_documents.py
48
48
  tests/test_dry_run_guard.py
49
+ tests/test_foundry_execution.py
49
50
  tests/test_foundry_helpers.py
50
51
  tests/test_foundry_warnings.py
51
52
  tests/test_handlers.py
@@ -6,7 +6,6 @@ from typing import Annotated, Any
6
6
 
7
7
  import typer
8
8
  from rich import box
9
- from rich.console import Group
10
9
  from rich.markdown import Markdown
11
10
  from rich.table import Table
12
11
  from rich.text import Text
@@ -40,9 +39,7 @@ def _pages(entries: Any, depth: int = 0, sections: tuple[str, ...] = ()) -> list
40
39
  or any(char in path for char in "\\?#:%")
41
40
  ):
42
41
  raise _invalid()
43
- pages.append(
44
- {"title": entry["title"], "path": path, "sections": sections, "draft": entry.get("draft") is True}
45
- )
42
+ pages.append({"title": entry["title"], "path": path, "sections": sections})
46
43
  else:
47
44
  pages.extend(_pages(entry.get("children"), depth + 1, (*sections, entry["title"])))
48
45
  return pages
@@ -113,10 +110,7 @@ def list_docs(
113
110
  section = " › ".join(page["sections"])
114
111
  if page["sections"] and page["sections"] == latest:
115
112
  section += " (latest)"
116
- title = Text(page["title"])
117
- if page["draft"]:
118
- title.append(" Draft", style="yellow")
119
- table.add_row(Text(section), title, Text(page["path"]))
113
+ table.add_row(Text(section), Text(page["title"]), Text(page["path"]))
120
114
  run_simple_listing(payload=payload, renderable_output=table)
121
115
 
122
116
 
@@ -156,7 +150,4 @@ def show_doc(
156
150
  run_simple_listing(payload=payload)
157
151
  else:
158
152
  body = re.sub(r"\A---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\Z)", "", content, count=1)
159
- renderable: Any = Markdown(body)
160
- if payload.get("draft") is True:
161
- renderable = Group(Text("Draft: unreviewed, may change before release.", style="yellow"), renderable)
162
- run_simple_listing(payload=payload, renderable_output=renderable)
153
+ run_simple_listing(payload=payload, renderable_output=Markdown(body))
@@ -86,10 +86,9 @@ def _run_table(runs: list[dict[str, Any]], *, show_workflow: bool = False) -> Ta
86
86
  ]
87
87
  if show_workflow:
88
88
  row.append(str(run.get("workflow", "")))
89
- params = run.get("params") if isinstance(run.get("params"), dict) else {}
90
89
  row += [
91
- Text(str(params.get("model") or "")),
92
- Text(str(params.get("weight") or "")),
90
+ Text(_execution_label(run, "modelId")),
91
+ Text(_execution_label(run, "weight")),
93
92
  Text(status, style=style),
94
93
  Text(_steps_display(run), overflow="ellipsis"),
95
94
  _format_run_duration(run),
@@ -99,6 +98,14 @@ def _run_table(runs: list[dict[str, Any]], *, show_workflow: bool = False) -> Ta
99
98
  return table
100
99
 
101
100
 
101
+ def _execution_label(run: dict[str, Any], field: str) -> str:
102
+ """Display saved execution identity, including defaults resolved by Hub."""
103
+ execution = run.get("execution")
104
+ tasks = execution.get("tasks", []) if isinstance(execution, dict) else []
105
+ values = [task.get(field) for task in tasks if isinstance(task, dict)] if isinstance(tasks, list) else []
106
+ return ", ".join(dict.fromkeys(value for value in values if isinstance(value, str) and value)) or "—"
107
+
108
+
102
109
  def _run_tags_display(run: dict[str, Any]) -> str:
103
110
  tags = run.get("tags") if isinstance(run.get("tags"), list) else []
104
111
  return ", ".join(str(tag) for tag in tags) or "—"
@@ -359,6 +366,8 @@ def _run_detail_renderable(
359
366
  detail.add_row("NAME", Text(str(run.get("name") or "—")))
360
367
  detail.add_row("TAGS", Text(_run_tags_display(run)))
361
368
  detail.add_row("WORKFLOW", str(run.get("workflow", "")))
369
+ detail.add_row("MODEL", Text(_execution_label(run, "modelId")))
370
+ detail.add_row("WEIGHT", Text(_execution_label(run, "weight")))
362
371
  steps = _step_display_names(run)
363
372
  if steps:
364
373
  detail.add_row("STEPS" if len(steps) > 1 else "STEP", Text(", ".join(steps)))
@@ -0,0 +1 @@
1
+ __version__ = "2.6.0"
@@ -1128,7 +1128,8 @@ def test_foundry_list_shows_explicit_name_tags_model_and_weight(monkeypatch, wor
1128
1128
  "status": "running",
1129
1129
  # Hub rejects "weights" in create requests but stores the resolved path in
1130
1130
  # run params, so list responses include it; the table must not show it.
1131
- "params": {"model": "openfold3", "weight": "0.3.0", "weights": "/app/weights/model.pt"},
1131
+ "params": {"model": "wrong", "weight": "wrong", "weights": "/app/weights/model.pt"},
1132
+ "execution": {"tasks": [{"modelId": "openfold3", "weight": "0.3.0"}]},
1132
1133
  "tags": ["cli-pr210-e2e"],
1133
1134
  "observability": {"steps": [], "outputs": []},
1134
1135
  }
@@ -1171,7 +1172,13 @@ def test_foundry_list_tolerates_missing_model_and_weight(monkeypatch, run_fields
1171
1172
  def test_foundry_list_renders_model_and_weight_literally_and_preserves_json(monkeypatch) -> None:
1172
1173
  payload = {
1173
1174
  "total": 1,
1174
- "runs": [{"id": "job", "tags": ["cli"], "params": {"model": "[red]model", "weight": "[bold]weight"}}],
1175
+ "runs": [
1176
+ {
1177
+ "id": "job",
1178
+ "tags": ["cli"],
1179
+ "execution": {"tasks": [{"modelId": "[red]model", "weight": "[bold]weight"}]},
1180
+ }
1181
+ ],
1175
1182
  }
1176
1183
  monkeypatch.setattr("apherisfold_cli.commands.foundry.list_foundry_runs", lambda **kwargs: payload)
1177
1184
 
@@ -107,7 +107,7 @@ RELEASES_INDEX = {
107
107
  "toolkitVersion": "v0.1.1-0.20261103113419-2c72f429d059",
108
108
  "navigation": [
109
109
  {"title": "Overview", "path": "index.md"},
110
- {"title": "Deployment", "children": [{"title": "Upgrade", "path": "deployment/upgrade.md", "draft": True}]},
110
+ {"title": "Deployment", "children": [{"title": "Upgrade", "path": "deployment/upgrade.md"}]},
111
111
  {
112
112
  "title": "Releases",
113
113
  "children": [
@@ -134,12 +134,12 @@ def _rows(output: str) -> list[str]:
134
134
  return [" ".join(line.split()) for line in output.splitlines() if ".md" in line]
135
135
 
136
136
 
137
- def test_list_names_sections_releases_drafts_and_builds(releases):
137
+ def test_list_names_sections_releases_and_builds(releases):
138
138
  result = runner.invoke(app, ["docs", "list"], env={"COLUMNS": "120"})
139
139
  assert result.exit_code == 0, result.output
140
140
  assert _rows(result.output) == [
141
141
  "Overview index.md",
142
- "Deployment Upgrade Draft deployment/upgrade.md",
142
+ "Deployment Upgrade deployment/upgrade.md",
143
143
  "Releases › Foundry 1.2.0 (latest) Release notes releases/1.2.0/release-notes.md",
144
144
  "Releases › Foundry 1.2.0 (latest) Known issues releases/1.2.0/known-issues.md",
145
145
  "Releases › Foundry 1.1.0 Release notes releases/1.1.0/release-notes.md",
@@ -179,12 +179,3 @@ def test_older_hub_without_toolkit_version(monkeypatch):
179
179
  result = runner.invoke(app, ["docs", "list"])
180
180
  assert result.exit_code == 0, result.output
181
181
  assert "Hub old" in result.output and "foundry-toolkit" not in result.output
182
-
183
-
184
- def test_show_marks_draft_documents(document):
185
- document["draft"] = True
186
- result = runner.invoke(app, ["docs", "show", PATH])
187
- assert result.exit_code == 0, result.output
188
- assert "Draft: unreviewed" in result.output
189
- raw = runner.invoke(app, ["docs", "show", PATH, "--raw"])
190
- assert raw.stdout_bytes == CONTENT.encode()
@@ -0,0 +1,36 @@
1
+ from io import StringIO
2
+
3
+ import pytest
4
+ from rich.console import Console
5
+
6
+ from apherisfold_cli.commands.foundry import _execution_label, _run_detail_renderable, _run_table
7
+
8
+
9
+ @pytest.mark.parametrize("params", [{}, {"model": "wrong-request", "weight": "wrong-weight"}])
10
+ @pytest.mark.parametrize("view", ["list", "detail"])
11
+ def test_displays_saved_execution_even_without_parameters(params, view):
12
+ run = {
13
+ "id": "foundry_example",
14
+ "params": params,
15
+ "execution": {"tasks": [{"modelId": "openfold3", "weight": "checkpoint-v1"}]},
16
+ }
17
+ output = StringIO()
18
+ Console(file=output, width=240, color_system=None).print(
19
+ _run_table([run]) if view == "list" else _run_detail_renderable(run)
20
+ )
21
+ assert "openfold3" in output.getvalue()
22
+ assert "checkpoint-v1" in output.getvalue()
23
+ assert "wrong-request" not in output.getvalue()
24
+ assert "wrong-weight" not in output.getvalue()
25
+
26
+
27
+ @pytest.mark.parametrize("view", ["list", "detail"])
28
+ def test_does_not_reconstruct_missing_execution_from_parameters(view):
29
+ run = {"id": "foundry_old", "params": {"model": "requested-model", "weight": "requested-weight"}}
30
+ output = StringIO()
31
+ Console(file=output, width=240, color_system=None).print(
32
+ _run_table([run]) if view == "list" else _run_detail_renderable(run)
33
+ )
34
+ assert _execution_label(run, "modelId") == _execution_label(run, "weight") == "—"
35
+ assert "requested-model" not in output.getvalue()
36
+ assert "requested-weight" not in output.getvalue()
@@ -27,6 +27,7 @@ def test_list_metadata_columns_preserve_api_fields_and_full_ids(width, show_work
27
27
  run = {
28
28
  "id": "foundry_a1b2c3d4e5f67890",
29
29
  "workflow": "predict",
30
+ "execution": {"tasks": [{"modelId": "openfold3", "weight": "of3ob"}]},
30
31
  "params": {"model": "openfold3", "weight": "of3ob", "requestSubpath": "unrelated-input.json"},
31
32
  "observability": {"outputs": [{"type": "metadata", "path": "invented-name_sample_1.json"}]},
32
33
  **metadata,
@@ -1 +0,0 @@
1
- __version__ = "2.4.0"