You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# Changelog
2
2
3
+
## 3.0.2 (2025-09-24)
4
+
5
+
Full Changelog: [v3.0.1...v3.0.2](https://github.com/digitalocean/gradient-python/compare/v3.0.1...v3.0.2)
6
+
7
+
### Chores
8
+
9
+
* do not install brew dependencies in ./scripts/bootstrap by default ([d83b77a](https://github.com/digitalocean/gradient-python/commit/d83b77a943d7beb3373eebc543cdc787371753a5))
10
+
* improve example values ([8f3a107](https://github.com/digitalocean/gradient-python/commit/8f3a107935a7ef0aa7e0e93161a24c7ecf24a272))
11
+
***types:** change optional parameter type from NotGiven to Omit ([78eb019](https://github.com/digitalocean/gradient-python/commit/78eb019c87cc55186abffd92f1d710d0c6ef0895))
12
+
3
13
## 3.0.1 (2025-09-24)
4
14
5
15
Full Changelog: [v3.0.0...v3.0.1](https://github.com/digitalocean/gradient-python/compare/v3.0.0...v3.0.1)
The repository includes a small set of live "smoke" tests (see the `smoke` pytest marker) that exercise real Gradient API endpoints. These are excluded from the default test run and only executed when you explicitly target them (`pytest -m smoke`) or in CI via the dedicated `smoke` job.
102
+
103
+
Required environment variables for smoke tests (all must be set):
104
+
105
+
| Variable | Purpose |
106
+
|----------|---------|
107
+
|`DIGITALOCEAN_ACCESS_TOKEN`| Access token for core DigitalOcean Gradient API operations (e.g. listing agents). |
108
+
|`GRADIENT_MODEL_ACCESS_KEY`| Key used for serverless inference (chat completions, etc.). |
109
+
|`GRADIENT_AGENT_ACCESS_KEY`| Key used for agent-scoped inference requests. |
110
+
|`GRADIENT_AGENT_ENDPOINT`| Fully-qualified HTTPS endpoint for your deployed agent (e.g. `https://my-agent.agents.do-ai.run`). |
While you can provide an `access_token`, `model_access_key` keyword argument,
98
98
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
99
-
to add `DIGITALOCEAN_ACCESS_TOKEN="My API Key"`, `GRADIENT_MODEL_ACCESS_KEY="My INFERENCE Key"` to your `.env` file
99
+
to add `DIGITALOCEAN_ACCESS_TOKEN="My Access Token"`, `GRADIENT_MODEL_ACCESS_KEY="My Model Access Key"` to your `.env` file
100
100
so that your keys are not stored in source control.
101
101
102
102
## Async usage
@@ -542,7 +542,64 @@ Python 3.8 or higher.
542
542
543
543
See [the contributing documentation](./CONTRIBUTING.md).
544
544
545
+
## Smoke tests
546
+
547
+
The repository includes a small set of "smoke" tests that exercise live Gradient API / Inference / Agent endpoints to catch integration regressions early. These tests are intentionally excluded from the standard test run (they are marked with the `smoke` pytest marker) and only run in CI via the dedicated `smoke` job, or when you explicitly target them locally.
548
+
549
+
### Required environment variables
550
+
551
+
All of the following environment variables must be set for the smoke tests (both sync & async) to run. If any are missing the smoke tests will fail fast:
552
+
553
+
| Variable | Purpose |
554
+
|----------|---------|
555
+
|`DIGITALOCEAN_ACCESS_TOKEN`| Access token for core DigitalOcean Gradient API operations (e.g. listing agents). |
556
+
|`GRADIENT_MODEL_ACCESS_KEY`| Key used for serverless inference (chat completions, etc.). |
557
+
|`GRADIENT_AGENT_ACCESS_KEY`| Key used for agent-scoped inference requests. |
558
+
|`GRADIENT_AGENT_ENDPOINT`| Fully-qualified HTTPS endpoint for your deployed agent (e.g. `https://my-agent.agents.do-ai.run`). |
559
+
560
+
> Optional override: `GRADIENT_INFERENCE_ENDPOINT` can be provided to point inference to a non-default endpoint (defaults to `https://inference.do-ai.run`).
561
+
562
+
### Running smoke tests locally
563
+
564
+
1. Export the required environment variables (or place them in a `.env` file and use a tool like `direnv` or `python-dotenv`).
565
+
2. Run only the smoke tests:
566
+
567
+
```bash
568
+
rye run pytest -m smoke -q
569
+
```
570
+
571
+
To include them alongside the regular suite:
572
+
573
+
```bash
574
+
./scripts/test -m smoke
575
+
```
576
+
577
+
Convenience wrapper (auto-loads a local `.env` if present):
578
+
579
+
```bash
580
+
./scripts/smoke
581
+
```
582
+
583
+
See `.env.example` for a template of required variables you can copy into a `.env` file (do not commit secrets).
584
+
585
+
### Async variants
586
+
587
+
Each smoke test has an async counterpart in `tests/test_smoke_sdk_async.py`. Both sets are covered automatically by the `-m smoke` selection.
588
+
589
+
### CI behavior
590
+
591
+
The default `test` job excludes smoke tests (`-m 'not smoke'`). A separate `smoke` job runs on pushes to the main repository with the required secrets injected. This keeps contributors from inadvertently hitting live services while still providing integration coverage in controlled environments.
592
+
593
+
### Adding new smoke tests
594
+
595
+
1. Add a new test function to `tests/test_smoke_sdk.py` and/or `tests/test_smoke_sdk_async.py`.
596
+
2. Mark it with `@pytest.mark.smoke`.
597
+
3. Avoid duplicating environment or client property assertions—those live in the central environment/client state test (sync & async).
598
+
4. Keep assertions minimal—verify only surface contract / structure; deeper behavior belongs in unit tests with mocks.
599
+
600
+
If a new credential is required, update this README section, the `REQUIRED_ENV_VARS` list in both smoke test files, and the CI workflow's `smoke` job environment.
601
+
545
602
546
603
## License
547
604
548
-
Licensed under the Apache License 2.0. See [LICENSE](./LICENSE)
605
+
Licensed under the Apache License 2.0. See [LICENSE](./LICENSE)
0 commit comments