Skip to content

Commit 9218a5a

Browse files
committed
chore: merge main into next preserving next CI coverage
2 parents b421d9e + 2404d04 commit 9218a5a

2,555 files changed

Lines changed: 268493 additions & 56917 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.castiron.stats.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
schema_version: 1
2-
generation_id: dcbb1592-447d-41a4-acb3-90850aee414e
3-
openapi_spec_hash: d342651bd77c6cd6ea10a9d889b35bb8
4-
openapi_transformed_spec_hash: 259f19fd2d38c6e784bbb40bf2f9a971
5-
config_hash: fce3820c4f95b555e486349bc7d297d8
6-
codegen_sha: d082ff25f7a8d79c8b37bd111b6c3c73ed75b287
7-
codegen_hash: 321c8e18084913bcf2ab5c7f4fcc2275399a412df08e3288c4e94a8f0970df4e
8-
public_codegen_sha: 57bc540656cae6646589d514646a8b2c33c5895a
2+
generation_id: 491e58ee-627a-4a57-91d7-2d5261cecfe9
3+
openapi_spec_hash: 1f2d498f08bdd6dacffeb41cee8f44e5
4+
openapi_transformed_spec_hash: 77075630a8655ccbb8d1f790f19f5731
5+
config_hash: d356dda7ff9ca3fbc614107eb546de9f
6+
codegen_sha: eeef8c0a76fd3885ff1da6b83ed2ba0ef6531414
7+
codegen_hash: ccac0bcc0ccfd20617a6e93498d22157f63843c1288cf775b7f3d5d393e49358
8+
public_codegen_sha: 40b2e7c300353a5cc5c8f8992e6616e999f4ecad

‎.devcontainer/Dockerfile‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
ARG VARIANT="3.9"
1+
ARG VARIANT="3.10"
22
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
33

44
USER vscode
55

6-
RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.44.0" RYE_INSTALL_OPTION="--yes" bash
7-
ENV PATH=/home/vscode/.rye/shims:$PATH
6+
ADD --chmod=644 --checksum=sha256:504511fbbbd811aeaba6738abc79408956b6c7da0ca35437b3dcc24a41efc111 \
7+
https://github.com/astral-sh/uv/releases/download/0.12.5/uv-installer.sh /tmp/uv-installer.sh
8+
RUN UV_NO_MODIFY_PATH=1 sh /tmp/uv-installer.sh
9+
ENV PATH=/home/vscode/.local/bin:$PATH
810

911
RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc

‎.devcontainer/devcontainer.json‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"context": ".."
88
},
99

10-
"postStartCommand": "rye sync --all-features",
10+
"postStartCommand": "./scripts/bootstrap",
1111

1212
"customizations": {
1313
"vscode": {
@@ -20,13 +20,16 @@
2020
"python.defaultInterpreterPath": ".venv/bin/python",
2121
"python.typeChecking": "basic",
2222
"terminal.integrated.env.linux": {
23-
"PATH": "/home/vscode/.rye/shims:${env:PATH}"
23+
"PATH": "/home/vscode/.local/bin:${env:PATH}"
2424
}
2525
}
2626
}
2727
},
2828
"features": {
29-
"ghcr.io/devcontainers/features/node:1": {}
29+
"ghcr.io/devcontainers/features/node:1": {
30+
"version": "22.22.3",
31+
"pnpmVersion": "11.19.0"
32+
}
3033
}
3134

3235
// Features to add to the dev container. More info: https://containers.dev/features.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Set up repository Node tooling
2+
description: Install the pinned contributor toolchain and frozen dependencies
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
7+
with:
8+
node-version-file: .node-version
9+
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
10+
with:
11+
run_install: false
12+
- shell: bash
13+
run: ./scripts/bootstrap-node
14+
- shell: bash
15+
run: node --test tests/node-tooling.test.cjs tests/node-release-age.test.cjs

‎.github/dependabot.yml‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
cooldown:
8+
default-days: 8
9+
- package-ecosystem: uv
10+
directory: /
11+
versioning-strategy: increase-if-necessary
12+
schedule:
13+
interval: weekly
14+
day: monday
15+
time: "09:00"
16+
timezone: Etc/UTC
17+
# Version updates wait; Dependabot security updates are exempt.
18+
cooldown:
19+
default-days: 8
20+
open-pull-requests-limit: 3
21+
groups:
22+
python-maintenance:
23+
applies-to: version-updates
24+
patterns:
25+
- "*"
26+
update-types:
27+
- minor
28+
- patch
29+
python-security:
30+
applies-to: security-updates
31+
patterns:
32+
- "*"
33+
34+
- package-ecosystem: github-actions
35+
directory: /
36+
schedule:
37+
interval: weekly
38+
day: monday
39+
time: "09:30"
40+
timezone: Etc/UTC
41+
cooldown:
42+
default-days: 8
43+
open-pull-requests-limit: 5
44+
groups:
45+
# CodeQL init/analyze share versioned state and must change together.
46+
codeql:
47+
patterns:
48+
- "github/codeql-action"

‎.github/pull_request_template.md‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
<!-- Thank you for contributing to this project! -->
2-
<!-- The code in this repository is all auto-generated, and is not meant to be edited manually. -->
3-
<!-- We recommend opening an Issue instead, but you are still welcome to open a PR to share for -->
4-
<!-- an improvement if you wish, just note that we are unlikely to merge it as-is. -->
5-
6-
- [ ] I understand that this repository is auto-generated and my pull request may not be merged
1+
<!-- Pull requests are limited to repository collaborators. -->
2+
<!-- For community bug reports and feature requests, open an issue: -->
3+
<!-- https://github.com/openai/openai-python/issues -->
4+
<!-- Read the contribution policy and development guide: -->
5+
<!-- https://github.com/openai/openai-python/blob/main/CONTRIBUTING.md -->
76

87
## Changes being requested
98

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Ubuntu restricts user namespaces for downloaded Chromium. Keep Chromium's
5+
# sandbox enabled and allow only the two executables installed for this CI job.
6+
: "${RUNNER_TEMP:?RUNNER_TEMP is required}"
7+
: "${PLAYWRIGHT_BROWSERS_PATH:?PLAYWRIGHT_BROWSERS_PATH is required}"
8+
expected_root="$RUNNER_TEMP/openai-python-playwright"
9+
if [[ "$PLAYWRIGHT_BROWSERS_PATH" != "$expected_root" || ! -d "$expected_root" ]]; then
10+
echo "Playwright must be installed inside this job's RUNNER_TEMP." >&2
11+
exit 1
12+
fi
13+
runner_root="$(realpath "$RUNNER_TEMP")"
14+
install_root="$(realpath "$expected_root")"
15+
# AppArmor uses these paths in its policy syntax, without globs or expansions.
16+
if [[ "$install_root" != "$runner_root/openai-python-playwright" || ! "$install_root" =~ ^/[a-zA-Z0-9_./-]+$ ]]; then
17+
echo "Playwright installation escaped RUNNER_TEMP or contains unexpected path characters." >&2
18+
exit 1
19+
fi
20+
shopt -s nullglob
21+
chromiums=("$install_root"/chromium-*/chrome-linux64/chrome)
22+
headless_shells=("$install_root"/chromium_headless_shell-*/chrome-headless-shell-linux64/chrome-headless-shell)
23+
if [[ "${#chromiums[@]}" -ne 1 || "${#headless_shells[@]}" -ne 1 ]]; then
24+
echo "Expected one installed Chromium and one installed headless shell." >&2
25+
exit 1
26+
fi
27+
binaries=("${chromiums[0]}" "${headless_shells[0]}")
28+
for index in "${!binaries[@]}"; do
29+
binary="$(realpath "${binaries[index]}")"
30+
if [[ ! -x "$binary" || "$binary" != "$install_root/"* || ! "$binary" =~ ^/[a-zA-Z0-9_./-]+$ ]]; then
31+
echo "Chromium executable is absent or outside this job's installation." >&2
32+
exit 1
33+
fi
34+
binaries[index]="$binary"
35+
done
36+
{
37+
printf 'abi <abi/4.0>,\ninclude <tunables/global>\n'
38+
for index in "${!binaries[@]}"; do
39+
printf 'profile openai-python-playwright-%s "%s" flags=(unconfined) {\n userns,\n}\n' "$index" "${binaries[index]}"
40+
done
41+
} | sudo tee /etc/apparmor.d/openai-python-playwright >/dev/null
42+
sudo apparmor_parser -r /etc/apparmor.d/openai-python-playwright

0 commit comments

Comments
 (0)