dyno-phi 0.3.0__tar.gz → 0.3.1__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 (144) hide show
  1. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/CHANGELOG.md +8 -0
  2. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/PKG-INFO +14 -13
  3. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/README.md +9 -8
  4. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/pyproject.toml +5 -5
  5. dyno_phi-0.3.1/src/phi/_version.py +1 -0
  6. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/graph.py +1 -1
  7. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_packaging.py +31 -31
  8. dyno_phi-0.3.0/src/phi/_version.py +0 -1
  9. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/.gitignore +0 -0
  10. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/README.md +0 -0
  11. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/async_concurrent.py +0 -0
  12. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/compose_dag.py +0 -0
  13. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/download_results.py +0 -0
  14. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/pipelines/fold_and_analyze.yaml +0 -0
  15. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/pipelines/mpnn_esmfold_alphafold.yaml +0 -0
  16. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/quickstart/README.md +0 -0
  17. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/quickstart/trp_cage.fasta +0 -0
  18. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/run_pipeline.py +0 -0
  19. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/submit_fold.py +0 -0
  20. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/__init__.py +0 -0
  21. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/_schema_validation.py +0 -0
  22. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/_transport.py +0 -0
  23. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/async_client.py +0 -0
  24. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/__init__.py +0 -0
  25. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/__main__.py +0 -0
  26. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/__init__.py +0 -0
  27. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/artifacts.py +0 -0
  28. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/auth.py +0 -0
  29. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/datasets.py +0 -0
  30. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/documents.py +0 -0
  31. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/export.py +0 -0
  32. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/jobs.py +0 -0
  33. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/logs.py +0 -0
  34. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/models.py +0 -0
  35. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/pipeline.py +0 -0
  36. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/projects.py +0 -0
  37. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/quickstart.py +0 -0
  38. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/quota.py +0 -0
  39. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/runs.py +0 -0
  40. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/use.py +0 -0
  41. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/completion.py +0 -0
  42. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/document_sync.py +0 -0
  43. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/errors.py +0 -0
  44. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/main.py +0 -0
  45. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/params.py +0 -0
  46. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/render.py +0 -0
  47. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/state.py +0 -0
  48. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/client.py +0 -0
  49. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/config.py +0 -0
  50. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/errors.py +0 -0
  51. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/files.py +0 -0
  52. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/__init__.py +0 -0
  53. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/_generated.py +0 -0
  54. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/artifacts.py +0 -0
  55. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/common.py +0 -0
  56. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/datasets.py +0 -0
  57. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/designs.py +0 -0
  58. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/documents.py +0 -0
  59. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/imports.py +0 -0
  60. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/job_types.py +0 -0
  61. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/jobs.py +0 -0
  62. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/logs.py +0 -0
  63. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/projects.py +0 -0
  64. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/quota.py +0 -0
  65. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/run_admin.py +0 -0
  66. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/runs.py +0 -0
  67. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/sequences.py +0 -0
  68. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/tool_configs.py +0 -0
  69. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/profiles.py +0 -0
  70. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/py.typed +0 -0
  71. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/__init__.py +0 -0
  72. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/artifacts.py +0 -0
  73. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/datasets.py +0 -0
  74. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/designs.py +0 -0
  75. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/documents.py +0 -0
  76. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/files.py +0 -0
  77. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/imports.py +0 -0
  78. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/job_types.py +0 -0
  79. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/jobs.py +0 -0
  80. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/logs.py +0 -0
  81. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/projects.py +0 -0
  82. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/quota.py +0 -0
  83. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/run_admin.py +0 -0
  84. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/runs.py +0 -0
  85. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/sequences.py +0 -0
  86. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/tool_configs.py +0 -0
  87. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/uploads.py +0 -0
  88. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/schema_cache.py +0 -0
  89. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/waiters.py +0 -0
  90. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/__init__.py +0 -0
  91. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/__init__.py +0 -0
  92. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/conftest.py +0 -0
  93. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_artifacts.py +0 -0
  94. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_auth.py +0 -0
  95. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_cli_scaffold.py +0 -0
  96. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_completion.py +0 -0
  97. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_datasets.py +0 -0
  98. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_document_sync.py +0 -0
  99. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_documents.py +0 -0
  100. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_export.py +0 -0
  101. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_jobs.py +0 -0
  102. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_json_contract.py +0 -0
  103. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_logs.py +0 -0
  104. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_models_cmd.py +0 -0
  105. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_params.py +0 -0
  106. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_pipeline.py +0 -0
  107. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_projects.py +0 -0
  108. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_quickstart.py +0 -0
  109. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_quota.py +0 -0
  110. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_runs.py +0 -0
  111. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/conftest.py +0 -0
  112. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/__init__.py +0 -0
  113. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/conftest.py +0 -0
  114. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_artifacts_logs.py +0 -0
  115. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_auth_discovery.py +0 -0
  116. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_datasets_export.py +0 -0
  117. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_errors.py +0 -0
  118. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_jobs.py +0 -0
  119. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_pipelines.py +0 -0
  120. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_quickstart_sdk.py +0 -0
  121. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_artifacts.py +0 -0
  122. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_config.py +0 -0
  123. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_datasets.py +0 -0
  124. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_designs.py +0 -0
  125. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_docs_examples.py +0 -0
  126. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_documents.py +0 -0
  127. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_errors.py +0 -0
  128. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_files.py +0 -0
  129. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_graph.py +0 -0
  130. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_imports.py +0 -0
  131. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_job_types.py +0 -0
  132. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_jobs.py +0 -0
  133. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_logs.py +0 -0
  134. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_parity.py +0 -0
  135. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_projects.py +0 -0
  136. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_quota.py +0 -0
  137. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_run_admin.py +0 -0
  138. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_runs.py +0 -0
  139. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_schema_validation.py +0 -0
  140. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_sequences.py +0 -0
  141. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_tool_configs.py +0 -0
  142. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_transport.py +0 -0
  143. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_uploads.py +0 -0
  144. {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_waiters.py +0 -0
@@ -5,6 +5,14 @@ package follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The
5
5
  version is read from `src/phi/_version.py`; a release is the tag `client-v<version>`
6
6
  on `dynotx/phi-api`, which `.github/workflows/publish-client.yml` builds and publishes.
7
7
 
8
+ ## [0.3.1] - 2026-10-17
9
+
10
+ ### Changed
11
+
12
+ - The CLI is installed with the package: `pip install dyno-phi` puts `phi` on the
13
+ path. The `[cli]` extra is kept as a no-op alias, so `dyno-phi[cli]` still
14
+ installs.
15
+
8
16
  ## [0.3.0] - 2026-10-17
9
17
 
10
18
  The first release of the Phi SDK and CLI on PyPI, published from `clients/phi` in
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: dyno-phi
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Phi — Python SDK and CLI for the Phi protein design API
5
5
  Project-URL: Homepage, https://design.dynotx.com
6
6
  Project-URL: Documentation, https://design.dynotx.com/docs
@@ -20,21 +20,21 @@ Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
21
21
  Classifier: Typing :: Typed
22
22
  Requires-Python: >=3.12
23
+ Requires-Dist: click>=8.1
23
24
  Requires-Dist: httpx>=0.27
24
25
  Requires-Dist: pydantic>=2.9
26
+ Requires-Dist: pyyaml>=6
27
+ Requires-Dist: rich>=13
28
+ Requires-Dist: typer>=0.12
25
29
  Provides-Extra: cli
26
- Requires-Dist: click>=8.1; extra == 'cli'
27
- Requires-Dist: pyyaml>=6; extra == 'cli'
28
- Requires-Dist: rich>=13; extra == 'cli'
29
- Requires-Dist: typer>=0.12; extra == 'cli'
30
30
  Description-Content-Type: text/markdown
31
31
 
32
32
  # dyno-phi
33
33
 
34
34
  Python SDK and CLI for the [Phi](https://design.dynotx.com) protein design API.
35
35
  The `phi` package exposes synchronous (`PhiClient`) and asynchronous
36
- (`AsyncPhiClient`) clients; the CLI ships behind the `[cli]` extra so the SDK
37
- stays light. It is published to PyPI from `clients/phi` in
36
+ (`AsyncPhiClient`) clients and the `phi` CLI, installed together. It is
37
+ published to PyPI from `clients/phi` in
38
38
  [`dynotx/phi-api`](https://github.com/dynotx/phi-api).
39
39
 
40
40
  ## Install
@@ -42,16 +42,17 @@ stays light. It is published to PyPI from `clients/phi` in
42
42
  The CLI as an isolated tool on your `PATH`:
43
43
 
44
44
  ```bash
45
- uv tool install "dyno-phi[cli]"
45
+ uv tool install dyno-phi
46
46
  ```
47
47
 
48
48
  `uv tool` provisions its own Python, which covers the client's **Python 3.12+**
49
49
  requirement on stock macOS, where the system Python is 3.9. Re-run with
50
- `--upgrade` to upgrade. `pip install "dyno-phi[cli]"` into a Python 3.12+ of
51
- your own does the same. From a `phi-api` checkout, `just install-cli` runs the
52
- first form and `just install-cli-dev` installs the working tree.
50
+ `--upgrade` to upgrade. `pip install dyno-phi` into a Python 3.12+ of your own
51
+ does the same. From a `phi-api` checkout, `just install-cli` runs the first
52
+ form and `just install-cli-dev` installs the working tree.
53
53
 
54
- The SDK inside an existing project, without the CLI's dependencies:
54
+ The SDK inside an existing project (the CLI comes with it; the `[cli]` extra
55
+ from 0.3.0 still installs and adds nothing):
55
56
 
56
57
  ```bash
57
58
  uv add dyno-phi # or: pip install dyno-phi
@@ -60,7 +61,7 @@ uv add dyno-phi # or: pip install dyno-phi
60
61
  Check the install with `phi --version`. `dyno-phi` 0.2.x was an earlier,
61
62
  unrelated client of a retired API; if `phi --version` prints `0.2.x`, that
62
63
  client is first on your `PATH` (`which -a phi` lists every match) and
63
- `pip install --upgrade "dyno-phi[cli]"` in the Python that owns it replaces it.
64
+ `pip install --upgrade dyno-phi` in the Python that owns it replaces it.
64
65
  Coming from 0.2.x: the key is `PHI_API_KEY` (or `PHI_KEY`) and the base URL
65
66
  `PHI_API`, the commands are `phi <group> <command>` as listed under
66
67
  [CLI](#cli), and Python 3.12+ is required; see
@@ -2,8 +2,8 @@
2
2
 
3
3
  Python SDK and CLI for the [Phi](https://design.dynotx.com) protein design API.
4
4
  The `phi` package exposes synchronous (`PhiClient`) and asynchronous
5
- (`AsyncPhiClient`) clients; the CLI ships behind the `[cli]` extra so the SDK
6
- stays light. It is published to PyPI from `clients/phi` in
5
+ (`AsyncPhiClient`) clients and the `phi` CLI, installed together. It is
6
+ published to PyPI from `clients/phi` in
7
7
  [`dynotx/phi-api`](https://github.com/dynotx/phi-api).
8
8
 
9
9
  ## Install
@@ -11,16 +11,17 @@ stays light. It is published to PyPI from `clients/phi` in
11
11
  The CLI as an isolated tool on your `PATH`:
12
12
 
13
13
  ```bash
14
- uv tool install "dyno-phi[cli]"
14
+ uv tool install dyno-phi
15
15
  ```
16
16
 
17
17
  `uv tool` provisions its own Python, which covers the client's **Python 3.12+**
18
18
  requirement on stock macOS, where the system Python is 3.9. Re-run with
19
- `--upgrade` to upgrade. `pip install "dyno-phi[cli]"` into a Python 3.12+ of
20
- your own does the same. From a `phi-api` checkout, `just install-cli` runs the
21
- first form and `just install-cli-dev` installs the working tree.
19
+ `--upgrade` to upgrade. `pip install dyno-phi` into a Python 3.12+ of your own
20
+ does the same. From a `phi-api` checkout, `just install-cli` runs the first
21
+ form and `just install-cli-dev` installs the working tree.
22
22
 
23
- The SDK inside an existing project, without the CLI's dependencies:
23
+ The SDK inside an existing project (the CLI comes with it; the `[cli]` extra
24
+ from 0.3.0 still installs and adds nothing):
24
25
 
25
26
  ```bash
26
27
  uv add dyno-phi # or: pip install dyno-phi
@@ -29,7 +30,7 @@ uv add dyno-phi # or: pip install dyno-phi
29
30
  Check the install with `phi --version`. `dyno-phi` 0.2.x was an earlier,
30
31
  unrelated client of a retired API; if `phi --version` prints `0.2.x`, that
31
32
  client is first on your `PATH` (`which -a phi` lists every match) and
32
- `pip install --upgrade "dyno-phi[cli]"` in the Python that owns it replaces it.
33
+ `pip install --upgrade dyno-phi` in the Python that owns it replaces it.
33
34
  Coming from 0.2.x: the key is `PHI_API_KEY` (or `PHI_KEY`) and the base URL
34
35
  `PHI_API`, the commands are `phi <group> <command>` as listed under
35
36
  [CLI](#cli), and Python 3.12+ is required; see
@@ -33,10 +33,6 @@ classifiers = [
33
33
  dependencies = [
34
34
  "httpx>=0.27",
35
35
  "pydantic>=2.9",
36
- ]
37
-
38
- [project.optional-dependencies]
39
- cli = [
40
36
  "typer>=0.12",
41
37
  # Typer vendors Click from 0.27 on, so it is no longer a transitive
42
38
  # dependency. The CLI imports click directly for UsageError and confirm.
@@ -45,6 +41,10 @@ cli = [
45
41
  "pyyaml>=6",
46
42
  ]
47
43
 
44
+ [project.optional-dependencies]
45
+ # The CLI ships with the package since 0.3.1; `dyno-phi[cli]` stays installable.
46
+ cli = []
47
+
48
48
  [project.scripts]
49
49
  phi = "phi.cli:main"
50
50
 
@@ -57,7 +57,7 @@ Issues = "https://github.com/dynotx/phi-api/issues"
57
57
 
58
58
  [dependency-groups]
59
59
  dev = [
60
- "dyno-phi[cli]",
60
+ "dyno-phi",
61
61
  "pytest>=8.3.0",
62
62
  "pytest-asyncio>=0.24.0",
63
63
  "respx>=0.21.0",
@@ -0,0 +1 @@
1
+ __version__ = "0.3.1"
@@ -14,7 +14,7 @@ try:
14
14
  except ModuleNotFoundError:
15
15
  yaml_mod = None
16
16
 
17
- _YAML_MISSING = "PyYAML is required for YAML support; install dyno-phi[cli]"
17
+ _YAML_MISSING = "PyYAML is required for YAML support; reinstall dyno-phi"
18
18
  _NODE_ID_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9_.-]*$")
19
19
 
20
20
 
@@ -1,8 +1,7 @@
1
1
  """Build the wheel and install it, the way a user first meets this package.
2
2
 
3
3
  Catches what an editable source-tree install hides: a missing ``py.typed``, an
4
- entry point that does not resolve, or a CLI import that leaks into the base
5
- install.
4
+ entry point that does not resolve, or a base install without the CLI.
6
5
  """
7
6
 
8
7
  from __future__ import annotations
@@ -42,20 +41,20 @@ def wheel(tmp_path_factory: pytest.TempPathFactory) -> Path:
42
41
 
43
42
 
44
43
  @pytest.fixture(scope="session")
45
- def sdk_only_venv(wheel: Path, tmp_path_factory: pytest.TempPathFactory) -> Path:
46
- """`pip install dyno-phi` with no extras."""
44
+ def base_venv(wheel: Path, tmp_path_factory: pytest.TempPathFactory) -> Path:
45
+ """`pip install dyno-phi`, which carries the CLI since 0.3.1."""
47
46
  assert UV is not None
48
- venv = tmp_path_factory.mktemp("sdk-only") / "venv"
47
+ venv = tmp_path_factory.mktemp("base") / "venv"
49
48
  _run(UV, "venv", str(venv))
50
49
  _run(UV, "pip", "install", "--python", str(venv / "bin" / "python"), str(wheel))
51
50
  return venv
52
51
 
53
52
 
54
53
  @pytest.fixture(scope="session")
55
- def cli_venv(wheel: Path, tmp_path_factory: pytest.TempPathFactory) -> Path:
56
- """`pip install "dyno-phi[cli]"`."""
54
+ def cli_alias_venv(wheel: Path, tmp_path_factory: pytest.TempPathFactory) -> Path:
55
+ """`pip install "dyno-phi[cli]"`: the extra is empty, kept so old install lines work."""
57
56
  assert UV is not None
58
- venv = tmp_path_factory.mktemp("with-cli") / "venv"
57
+ venv = tmp_path_factory.mktemp("cli-alias") / "venv"
59
58
  _run(UV, "venv", str(venv))
60
59
  # Extras need a PEP 508 direct reference; a bare wheel path cannot carry them.
61
60
  _run(
@@ -84,21 +83,25 @@ def test_wheel_declares_the_supported_python(wheel: Path) -> None:
84
83
  assert "Requires-Python: >=3.12" in metadata
85
84
 
86
85
 
87
- def test_sdk_install_stays_light(sdk_only_venv: Path) -> None:
88
- """The base install promises no CLI dependencies; prove typer is absent."""
89
- python = str(sdk_only_venv / "bin" / "python")
86
+ def test_base_install_carries_the_sdk_and_the_cli(base_venv: Path) -> None:
87
+ """`pip install dyno-phi` puts `phi` on the path; no extra is needed."""
88
+ python = str(base_venv / "bin" / "python")
90
89
  _run(python, "-c", "import phi; phi.PhiClient; phi.AsyncPhiClient; phi.Profile")
91
90
 
92
- probe = subprocess.run(
93
- [python, "-c", "import typer"], capture_output=True, text=True, check=False
94
- )
95
- assert probe.returncode != 0, "typer leaked into the base install"
91
+ executable = base_venv / "bin" / "phi"
92
+ assert executable.is_file(), "the base install did not install the `phi` console script"
93
+
94
+ version = _run(str(executable), "--version")
95
+ assert version.stdout.startswith("phi ")
96
+
97
+ module = _run(python, "-m", "phi.cli", "--version")
98
+ assert module.stdout == version.stdout
96
99
 
97
100
 
98
- def test_sdk_install_exposes_types_to_mypy(sdk_only_venv: Path, tmp_path: Path) -> None:
101
+ def test_sdk_install_exposes_types_to_mypy(base_venv: Path, tmp_path: Path) -> None:
99
102
  """A user running mypy against the installed package must see our types."""
100
103
  assert UV is not None
101
- python = str(sdk_only_venv / "bin" / "python")
104
+ python = str(base_venv / "bin" / "python")
102
105
  _run(UV, "pip", "install", "--python", python, "mypy")
103
106
 
104
107
  script = tmp_path / "usage.py"
@@ -111,20 +114,15 @@ def test_sdk_install_exposes_types_to_mypy(sdk_only_venv: Path, tmp_path: Path)
111
114
  _run(python, "-m", "mypy", "--strict", str(script))
112
115
 
113
116
 
114
- def test_cli_extra_installs_a_working_entry_point(cli_venv: Path) -> None:
115
- """`phi` on PATH is the contract the README's first command depends on."""
116
- executable = cli_venv / "bin" / "phi"
117
- assert executable.is_file(), "the [cli] extra did not install the `phi` console script"
118
-
119
- version = _run(str(executable), "--version")
120
- assert version.stdout.startswith("phi ")
121
-
122
- module = _run(str(cli_venv / "bin" / "python"), "-m", "phi.cli", "--version")
123
- assert module.stdout == version.stdout
117
+ def test_cli_extra_still_installs(cli_alias_venv: Path) -> None:
118
+ """Install lines written for 0.3.0 keep working."""
119
+ executable = cli_alias_venv / "bin" / "phi"
120
+ assert executable.is_file(), "the [cli] alias did not install the `phi` console script"
121
+ assert _run(str(executable), "--version").stdout.startswith("phi ")
124
122
 
125
123
 
126
- def test_cli_help_lists_every_command_group(cli_venv: Path) -> None:
127
- help_text = _run(str(cli_venv / "bin" / "phi"), "--help").stdout
124
+ def test_cli_help_lists_every_command_group(base_venv: Path) -> None:
125
+ help_text = _run(str(base_venv / "bin" / "phi"), "--help").stdout
128
126
  for group in (
129
127
  "auth",
130
128
  "projects",
@@ -143,10 +141,12 @@ def test_cli_help_lists_every_command_group(cli_venv: Path) -> None:
143
141
  assert group in help_text, f"`phi --help` does not mention {group}"
144
142
 
145
143
 
146
- def test_offline_commands_work_from_a_bare_install(cli_venv: Path, tmp_path: Path) -> None:
144
+ def test_offline_commands_work_from_a_bare_install(base_venv: Path, tmp_path: Path) -> None:
147
145
  """Nothing that runs before a user has credentials may need the network."""
148
146
  graph = tmp_path / "graph.yaml"
149
147
  graph.write_text("nodes:\n - id: fold\n tool: esmfold\n")
150
148
 
151
- result = _run(str(cli_venv / "bin" / "phi"), "--json", "pipeline", "validate", "-f", str(graph))
149
+ result = _run(
150
+ str(base_venv / "bin" / "phi"), "--json", "pipeline", "validate", "-f", str(graph)
151
+ )
152
152
  assert '"valid": true' in result.stdout
@@ -1 +0,0 @@
1
- __version__ = "0.3.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes