apheris-foundry-cli 2.6.0__tar.gz → 2.7.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.6.0/src/apheris_foundry_cli.egg-info → apheris_foundry_cli-2.7.0}/PKG-INFO +2 -2
  2. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/README.md +1 -1
  3. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/pyproject.toml +1 -1
  4. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0/src/apheris_foundry_cli.egg-info}/PKG-INFO +2 -2
  5. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/main.py +3 -0
  6. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/skills/apheris-foundry-hub/SKILL.md +27 -18
  7. apheris_foundry_cli-2.7.0/src/apherisfold_cli/version.py +1 -0
  8. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_cli.py +23 -6
  9. apheris_foundry_cli-2.6.0/src/apherisfold_cli/version.py +0 -1
  10. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/LICENSE +0 -0
  11. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/setup.cfg +0 -0
  12. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apheris_foundry_cli.egg-info/SOURCES.txt +0 -0
  13. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apheris_foundry_cli.egg-info/dependency_links.txt +0 -0
  14. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apheris_foundry_cli.egg-info/entry_points.txt +0 -0
  15. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apheris_foundry_cli.egg-info/requires.txt +0 -0
  16. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apheris_foundry_cli.egg-info/top_level.txt +0 -0
  17. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/__init__.py +0 -0
  18. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/__init__.py +0 -0
  19. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/compounds.py +0 -0
  20. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/docs.py +0 -0
  21. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/foundry.py +0 -0
  22. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/login.py +0 -0
  23. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/settings.py +0 -0
  24. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/skills.py +0 -0
  25. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/commands/weights.py +0 -0
  26. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/__init__.py +0 -0
  27. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/auth.py +0 -0
  28. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/browser.py +0 -0
  29. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/config.py +0 -0
  30. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/context.py +0 -0
  31. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/documents.py +0 -0
  32. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/errors.py +0 -0
  33. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/hub_requests.py +0 -0
  34. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/input_archive.py +0 -0
  35. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/io.py +0 -0
  36. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/limits.py +0 -0
  37. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/login_profiles.py +0 -0
  38. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/msa.py +0 -0
  39. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/pubchem.py +0 -0
  40. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/render.py +0 -0
  41. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/result_artifacts.py +0 -0
  42. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/core/transient.py +0 -0
  43. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/src/apherisfold_cli/handlers.py +0 -0
  44. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_auth.py +0 -0
  45. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_auth_lifecycle.py +0 -0
  46. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_benchmark_examples.py +0 -0
  47. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_browser.py +0 -0
  48. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_config.py +0 -0
  49. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_docs.py +0 -0
  50. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_documents.py +0 -0
  51. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_dry_run_guard.py +0 -0
  52. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_foundry_execution.py +0 -0
  53. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_foundry_helpers.py +0 -0
  54. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_foundry_warnings.py +0 -0
  55. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_handlers.py +0 -0
  56. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_hub_requests.py +0 -0
  57. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_input_archive.py +0 -0
  58. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_io.py +0 -0
  59. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_jobs_metadata.py +0 -0
  60. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_jobs_update.py +0 -0
  61. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_login_callback.py +0 -0
  62. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_main.py +0 -0
  63. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_model_discovery.py +0 -0
  64. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_msa.py +0 -0
  65. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_pubchem.py +0 -0
  66. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_render.py +0 -0
  67. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_result_artifacts.py +0 -0
  68. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.0}/tests/test_skills.py +0 -0
  69. {apheris_foundry_cli-2.6.0 → apheris_foundry_cli-2.7.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.6.0
3
+ Version: 2.7.0
4
4
  Summary: Command-line interface for Apheris Foundry workflows.
5
5
  Author: Apheris
6
6
  License-Expression: LicenseRef-Apheris-Foundry-Software-License
@@ -356,7 +356,7 @@ the metadata change notification.
356
356
  | `apheris-foundry jobs logs --id <job-id>` | Print logs for a job |
357
357
  | `apheris-foundry jobs error --id <job-id>` | Print the saved error for a failed job |
358
358
  | `apheris-foundry jobs download --id <job-id>` | Download results for a completed job |
359
- | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job |
359
+ | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job (`--yes` skips confirmation) |
360
360
  | `apheris-foundry jobs delete --id <job-id>` | Permanently delete a terminal job and its stored data (`--yes` skips confirmation) |
361
361
 
362
362
  Use `--help` on any command for the full option reference and examples:
@@ -330,7 +330,7 @@ the metadata change notification.
330
330
  | `apheris-foundry jobs logs --id <job-id>` | Print logs for a job |
331
331
  | `apheris-foundry jobs error --id <job-id>` | Print the saved error for a failed job |
332
332
  | `apheris-foundry jobs download --id <job-id>` | Download results for a completed job |
333
- | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job |
333
+ | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job (`--yes` skips confirmation) |
334
334
  | `apheris-foundry jobs delete --id <job-id>` | Permanently delete a terminal job and its stored data (`--yes` skips confirmation) |
335
335
 
336
336
  Use `--help` on any command for the full option reference and examples:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "apheris-foundry-cli"
7
- version = "2.6.0"
7
+ version = "2.7.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.6.0
3
+ Version: 2.7.0
4
4
  Summary: Command-line interface for Apheris Foundry workflows.
5
5
  Author: Apheris
6
6
  License-Expression: LicenseRef-Apheris-Foundry-Software-License
@@ -356,7 +356,7 @@ the metadata change notification.
356
356
  | `apheris-foundry jobs logs --id <job-id>` | Print logs for a job |
357
357
  | `apheris-foundry jobs error --id <job-id>` | Print the saved error for a failed job |
358
358
  | `apheris-foundry jobs download --id <job-id>` | Download results for a completed job |
359
- | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job |
359
+ | `apheris-foundry jobs cancel --id <job-id>` | Cancel a pending or running job (`--yes` skips confirmation) |
360
360
  | `apheris-foundry jobs delete --id <job-id>` | Permanently delete a terminal job and its stored data (`--yes` skips confirmation) |
361
361
 
362
362
  Use `--help` on any command for the full option reference and examples:
@@ -337,9 +337,12 @@ def error_cmd(
337
337
  @jobs_app.command("cancel", help="Cancel a pending or running Foundry job.")
338
338
  def cancel_cmd(
339
339
  run_id: Annotated[str, typer.Option("--id", help="Foundry job identifier.")],
340
+ yes: Annotated[bool, typer.Option("--yes", "-y", help="Skip the confirmation prompt.")] = False,
340
341
  wait: Annotated[bool, typer.Option("--wait", help="Poll until the job reaches cancelled.")] = False,
341
342
  json_output: Annotated[bool, typer.Option("--json", help="Render as JSON.")] = False,
342
343
  ) -> None:
344
+ if not yes and not get_ctx().dry_run and not typer.confirm(f"Cancel Foundry job {run_id}?"):
345
+ raise typer.Abort()
343
346
  foundry_cancel(run_id, json_output=json_output, wait=wait)
344
347
 
345
348
 
@@ -252,7 +252,7 @@ Lifecycle of an enabled weight (changes are owner-only):
252
252
  `weights deploy`, which is no longer supported; update existing scripts.
253
253
 
254
254
  Private is the default and visibility cannot change later, so un-sharing means
255
- delete. `jobs delete` on the producing job also deletes its weights: warn first.
255
+ deleting the weight.
256
256
  Details and error handling are in step 3 of the fine-tune hand-off below.
257
257
 
258
258
  ### Fine-tune → hand off the checkpoint → predict
@@ -366,8 +366,8 @@ apheris-foundry weights enable --name <unique-weight-name> --run-id <training-jo
366
366
  export is not automatically a resumable training checkpoint.
367
367
  - Capture the returned weight `id`, producing model/version and artifact
368
368
  path. Enabling weights copies job artifacts into independent managed storage; it
369
- does not run prediction or upload local weights. On Hub versions containing
370
- hub#3142, enabled weights survive deletion of the producing job.
369
+ does not run prediction or upload local weights. Enabled weights survive
370
+ deletion of the producing job.
371
371
 
372
372
  Hub copies and verifies the checkpoint before replying, so large weights may
373
373
  need several minutes. `weights enable --timeout SECONDS` controls the CLI's
@@ -391,8 +391,8 @@ tags). Inspect one weight with `weights get --id <id>`. Delete only on explicit
391
391
  request with `weights delete --id <id> --yes`: it stops selection and sharing,
392
392
  and jobs already running keep working. Checkpoint files remain until explicitly
393
393
  removed with `weights delete --id <id> --delete-files --yes`. Use that option
394
- only when permanent file removal is requested and Hub contains hub#3142; older
395
- Hubs may ignore it. The record and provenance remain. A 409 means the weight
394
+ only when permanent file removal is requested. The record and provenance remain.
395
+ A 409 means the weight
396
396
  was soft-deleted but active jobs blocked file removal; report this partial
397
397
  outcome and retry only after those jobs finish. File removal can follow a
398
398
  previous soft delete. `--dry-run true` previews the selected mode without
@@ -442,19 +442,28 @@ report the gap rather than stitching artifacts together speculatively.
442
442
 
443
443
  ### Cancel versus delete
444
444
 
445
- Use `jobs cancel --id <id> --wait --json` to stop the identified active job and
446
- confirm its terminal state. Cancellation preserves the job and available logs
447
- and artifacts. A request such as “cap this run at four epochs” means explain the
448
- restart, cancel that active run, confirm cancellation, then submit its prepared
449
- replacement; never claim the original run was edited. If it finished before
450
- cancellation, report that race and inspect results before deciding on replacement.
451
-
452
- `jobs delete --id <id>` removes the job and its backing files; it is cleanup,
453
- not the normal way to stop computation. Use it only when deletion is requested,
454
- and explain that enabled weights have independent storage on Hub versions
455
- containing hub#3142. Do not delete cancelled
456
- trial jobs or failed evidence automatically. A failed cancellation is not a
457
- reason to fall back to deletion.
445
+ Cancel stops a job and keeps its logs and artifacts. When the user has asked
446
+ to stop a specific job, run:
447
+
448
+ ```sh
449
+ apheris-foundry jobs cancel --id <id> --yes --wait --json
450
+ ```
451
+
452
+ `--yes` skips the confirmation prompt; `--wait` waits for the job to finish
453
+ stopping. `--json` alone still prompts. Dry runs never prompt.
454
+
455
+ Changing an active run requires a replacement, not an edit. Explain the restart
456
+ and confirm cancellation before submitting the replacement. If the original job
457
+ finished first, inspect its results before deciding whether to replace it.
458
+
459
+ Delete removes the job and its files. Only when the user asks for deletion, run:
460
+
461
+ ```sh
462
+ apheris-foundry jobs delete --id <id> --yes --json
463
+ ```
464
+
465
+ Never delete as a fallback when cancellation fails. Enabled weights survive job
466
+ deletion.
458
467
 
459
468
  ### Public compound resolution
460
469
 
@@ -0,0 +1 @@
1
+ __version__ = "2.7.0"
@@ -2485,7 +2485,7 @@ def test_foundry_workflows_run_dry_run_still_rejects_invalid_dataset(hub_api_fix
2485
2485
  ],
2486
2486
  )
2487
2487
  def test_foundry_job_actions_dry_run_do_not_call_hub(hub_api_fixture, args, expected) -> None:
2488
- # delete omits --yes: a dry run must not prompt for a deletion it will not perform.
2488
+ # Both actions omit --yes: a dry run must not prompt for an action it will not perform.
2489
2489
  result = runner.invoke(app, ["--dry-run", "true", *args, "--json"])
2490
2490
 
2491
2491
  assert result.exit_code == 0, result.output
@@ -3018,8 +3018,9 @@ def test_foundry_delete_renders_json(hub_api_fixture) -> None:
3018
3018
  assert hub_api_fixture["delete_foundry_run"] == ["foundry_test_001"]
3019
3019
 
3020
3020
 
3021
- def test_workflows_cancel_cancels_run(hub_api_fixture) -> None:
3022
- result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001"])
3021
+ @pytest.mark.parametrize("flag", ["--yes", "-y"])
3022
+ def test_workflows_cancel_cancels_run(hub_api_fixture, flag) -> None:
3023
+ result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001", flag])
3023
3024
 
3024
3025
  assert result.exit_code == 0
3025
3026
  assert "foundry_cancelling_001" in result.stdout
@@ -3027,8 +3028,24 @@ def test_workflows_cancel_cancels_run(hub_api_fixture) -> None:
3027
3028
  assert hub_api_fixture["cancel_foundry_run"] == ["foundry_cancelling_001"]
3028
3029
 
3029
3030
 
3031
+ def test_jobs_cancel_prompts_and_confirms(hub_api_fixture) -> None:
3032
+ result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001"], input="y\n")
3033
+
3034
+ assert result.exit_code == 0
3035
+ assert "Cancel Foundry job foundry_cancelling_001?" in result.stdout
3036
+ assert hub_api_fixture["cancel_foundry_run"] == ["foundry_cancelling_001"]
3037
+
3038
+
3039
+ @pytest.mark.parametrize("answer", ["n\n", "\n", ""])
3040
+ def test_jobs_cancel_aborts_without_confirmation(hub_api_fixture, answer) -> None:
3041
+ result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001"], input=answer)
3042
+
3043
+ assert result.exit_code != 0
3044
+ assert hub_api_fixture["cancel_foundry_run"] == []
3045
+
3046
+
3030
3047
  def test_workflows_cancel_renders_json(hub_api_fixture) -> None:
3031
- result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001", "--json"])
3048
+ result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001", "--yes", "--json"])
3032
3049
 
3033
3050
  assert result.exit_code == 0
3034
3051
  payload = json.loads(result.stdout)
@@ -3038,7 +3055,7 @@ def test_workflows_cancel_renders_json(hub_api_fixture) -> None:
3038
3055
 
3039
3056
 
3040
3057
  def test_jobs_cancel_wait_polls_until_cancelled(hub_api_fixture) -> None:
3041
- result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelled_001", "--wait"])
3058
+ result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelled_001", "--yes", "--wait"])
3042
3059
 
3043
3060
  assert result.exit_code == 0
3044
3061
  assert "foundry_cancelled_001" in result.stdout
@@ -3057,7 +3074,7 @@ def test_workflows_cancel_surfaces_api_error(hub_api_fixture, monkeypatch) -> No
3057
3074
 
3058
3075
  monkeypatch.setattr("apherisfold_cli.commands.foundry.cancel_foundry_run", raise_not_cancellable)
3059
3076
 
3060
- result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001"])
3077
+ result = runner.invoke(app, ["jobs", "cancel", "--id", "foundry_cancelling_001", "--yes"])
3061
3078
 
3062
3079
  assert result.exit_code != 0
3063
3080
  assert hub_api_fixture["cancel_foundry_run"] == []
@@ -1 +0,0 @@
1
- __version__ = "2.6.0"