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
{{ message }}
Repository navigation
Commit 1503fb5
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+29-20Lines changed: 29 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,39 +27,42 @@ must include a release note naming the final compatible SDK release.
27
27
### With uv
28
28
29
29
We use [uv](https://docs.astral.sh/uv/) to manage Python, dependencies, and builds.
30
-
Install uv 0.12.1 or newer, Node.js at the version in `.node-version`, and
31
-
the exact pnpm version in `package.json` (`npm install --global pnpm@11.19.0`).
32
-
The Node toolchain is for repository development only, not SDK users or builds.
33
-
Then run:
30
+
Install uv 0.12.1 or newer. To run the runtime tests, also install Node.js at
31
+
the version in `.node-version` for the mock-server tooling. Then run:
34
32
35
33
```sh
36
34
$ ./scripts/bootstrap
37
35
```
38
36
39
-
This installs all SDK extras and Python development tools from `uv.lock`, plus
40
-
the contributor tools from `pnpm-lock.yaml`. Bootstrap requires an already
41
-
installed Node.js and pnpm; it does not download or switch those tools for you.
42
-
Run a
43
-
command with `uv run --locked --all-extras`, or activate `.venv` in your shell.
37
+
This installs all SDK extras and Python development tools from `uv.lock`.
38
+
Run a command with `uv run --locked --all-extras`, or activate `.venv` in your shell.
44
39
Use `uv lock` after changing dependencies, and commit the updated `uv.lock`.
45
40
It is the authoritative lockfile; `uv export` can produce a requirements file
46
41
for tools that need one.
47
42
48
-
For Node tooling updates, edit `package.json`, run
49
-
`pnpm install --lockfile-only --ignore-scripts`, review the dependency and
50
-
integrity changes, and commit `pnpm-lock.yaml`. Normal bootstrap uses a frozen
51
-
lockfile. pnpm rejects releases that have not cleared the eight-day cooldown,
52
-
including packages whose registry metadata omits their publication date.
53
-
Pyright runs the local Microsoft package and never invokes npm or
54
-
downloads a runtime. Do not use `npx`, `pnpm dlx`, or Corepack auto-downloads.
43
+
The separate breaking-change CI job checks previous-version callers with Pyright.
44
+
To run that compatibility gate locally, install Node.js at the version in
45
+
`.node-version` and the exact pnpm version in `package.json`, then run
46
+
`./scripts/bootstrap-node`. Pyright and pnpm are not required for normal bootstrap or lint. Runtime tests
47
+
still require Node.js for the Steady mock-server tooling. Before running them, install
48
+
the pinned mock server and runtime:
49
+
50
+
```sh
51
+
$ ./scripts/steady/install
52
+
```
53
+
54
+
Node tooling uses the frozen `pnpm-lock.yaml`, an eight-day release cooldown,
55
+
and disabled lifecycle scripts. Update it with `pnpm install --lockfile-only
56
+
--ignore-scripts` and review the integrity changes. Do not use `npx`, `pnpm dlx`,
57
+
or Corepack auto-downloads to run compatibility checks.
55
58
56
59
The default environment uses Pydantic v2. `./scripts/test` also runs the
57
60
Pydantic-v1 suite in a separate, locked environment. To run that lane alone,
58
61
use `./scripts/test-pydantic-v1`.
59
62
60
63
### Dependency update policy
61
64
62
-
Routine Python, Node-tooling, and GitHub Actions updates have an eight-day cooldown. uv also
65
+
Routine Python, compatibility-checker, and GitHub Actions updates have an eight-day cooldown. uv also
63
66
excludes Python distribution artifacts uploaded within the last eight days.
64
67
Dependabot security updates remain enabled and are exempt from Dependabot's
65
68
version-update cooldown.
@@ -209,9 +212,9 @@ installation, integrity checks, and mock-server lifecycle.
209
212
210
213
Most tests require you to [set up a mock server](https://github.com/openai-oss-forks/steady) against the OpenAPI spec to run the tests.
211
214
212
-
`./scripts/bootstrap` installs the pinned Steady source and Deno runtime. `./scripts/test` starts it automatically when no mock server is running.
215
+
`./scripts/steady/install` installs the pinned Steady source and Deno runtime. `./scripts/test` starts it automatically when no mock server is running.
213
216
Neither `./scripts/test` nor `./scripts/mock` downloads mock tooling. If the local
214
-
tool is missing, rerun bootstrap. `TEST_API_BASE_URL` and an already-running
217
+
tool is missing, rerun `./scripts/steady/install`. `TEST_API_BASE_URL` and an already-running
215
218
mock server remain supported. To start the server yourself:
216
219
217
220
```sh
@@ -224,7 +227,13 @@ $ ./scripts/test
224
227
225
228
## Linting and formatting
226
229
227
-
This repository uses [Ruff](https://github.com/astral-sh/ruff) to lint and format Python code.
230
+
This repository uses [Ruff](https://github.com/astral-sh/ruff) to lint and format Python code,
231
+
and [ty](https://docs.astral.sh/ty/) to typecheck it. These are development tools;
232
+
installing the SDK does not install a typechecker or require consumers to switch checkers.
233
+
Consumers use their own checker and configuration. Keep public annotations, overloads,
234
+
exports, and `py.typed` compatible across checkers; repository-only checker settings
235
+
are not part of that contract. Preserve compatibility with both supported Pydantic
236
+
major versions and the Python versions covered by CI.
0 commit comments