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.
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/CHANGELOG.md +8 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/PKG-INFO +14 -13
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/README.md +9 -8
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/pyproject.toml +5 -5
- dyno_phi-0.3.1/src/phi/_version.py +1 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/graph.py +1 -1
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_packaging.py +31 -31
- dyno_phi-0.3.0/src/phi/_version.py +0 -1
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/.gitignore +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/README.md +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/async_concurrent.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/compose_dag.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/download_results.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/pipelines/fold_and_analyze.yaml +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/pipelines/mpnn_esmfold_alphafold.yaml +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/quickstart/README.md +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/quickstart/trp_cage.fasta +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/run_pipeline.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/examples/submit_fold.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/_schema_validation.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/_transport.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/async_client.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/__main__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/artifacts.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/auth.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/datasets.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/documents.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/export.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/jobs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/logs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/models.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/pipeline.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/projects.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/quickstart.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/quota.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/runs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/commands/use.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/completion.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/document_sync.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/errors.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/main.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/params.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/render.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/cli/state.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/client.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/config.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/errors.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/files.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/_generated.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/artifacts.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/common.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/datasets.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/designs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/documents.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/imports.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/job_types.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/jobs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/logs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/projects.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/quota.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/run_admin.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/runs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/sequences.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/models/tool_configs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/profiles.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/py.typed +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/artifacts.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/datasets.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/designs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/documents.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/files.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/imports.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/job_types.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/jobs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/logs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/projects.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/quota.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/run_admin.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/runs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/sequences.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/tool_configs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/resources/uploads.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/schema_cache.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/src/phi/waiters.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/conftest.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_artifacts.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_auth.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_cli_scaffold.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_completion.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_datasets.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_document_sync.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_documents.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_export.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_jobs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_json_contract.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_logs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_models_cmd.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_params.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_pipeline.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_projects.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_quickstart.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_quota.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/cli/test_runs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/conftest.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/__init__.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/conftest.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_artifacts_logs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_auth_discovery.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_datasets_export.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_errors.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_jobs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_pipelines.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/live/test_live_quickstart_sdk.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_artifacts.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_config.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_datasets.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_designs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_docs_examples.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_documents.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_errors.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_files.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_graph.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_imports.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_job_types.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_jobs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_logs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_parity.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_projects.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_quota.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_run_admin.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_runs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_schema_validation.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_sequences.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_tool_configs.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_transport.py +0 -0
- {dyno_phi-0.3.0 → dyno_phi-0.3.1}/tests/test_uploads.py +0 -0
- {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.
|
|
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
|
|
37
|
-
|
|
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
|
|
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
|
|
51
|
-
|
|
52
|
-
|
|
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
|
|
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
|
|
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
|
|
6
|
-
|
|
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
|
|
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
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
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
|
|
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
|
|
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;
|
|
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
|
|
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
|
|
46
|
-
"""`pip install dyno-phi
|
|
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("
|
|
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
|
|
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("
|
|
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
|
|
88
|
-
"""
|
|
89
|
-
python = str(
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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(
|
|
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(
|
|
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
|
|
115
|
-
"""
|
|
116
|
-
executable =
|
|
117
|
-
assert executable.is_file(), "the [cli]
|
|
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(
|
|
127
|
-
help_text = _run(str(
|
|
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(
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|