Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .github/workflows/sdk-candidate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: SDK candidate

on:
pull_request:
paths:
- 'candidate/**'
- '.github/workflows/sdk-candidate.yml'

permissions:
contents: read

jobs:
regenerate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Verify frozen SDK input
run: echo '283b1079b67453be6e8f06ccd3bf9955fedd553a9ab881e3f1f3904467d87cca candidate/contract/openapi.yaml' | sha256sum --check
- name: Regenerate selected client
run: |
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/local" \
openapitools/openapi-generator-cli:v7.27.0 generate \
-i /local/candidate/contract/openapi.yaml -g python \
-o /local/candidate/generated \
--additional-properties=packageName=nimble_client \
--global-property=apiTests=false,modelTests=false,apiDocs=false,modelDocs=false \
> "$RUNNER_TEMP/sdk-generation.log" 2>&1
test -z "$(git status --porcelain -- candidate/generated)"
- name: Compile candidate
run: python -m compileall -q candidate/generated/nimble_client
- name: Build and install candidate wheel
run: |
python -m pip install build
mkdir -p "$RUNNER_TEMP/sdk-artifact"
python -m build --wheel --sdist \
--outdir "$RUNNER_TEMP/sdk-artifact" candidate/generated \
> "$RUNNER_TEMP/sdk-build.log" 2>&1
python -m venv "$RUNNER_TEMP/sdk-consumer"
"$RUNNER_TEMP/sdk-consumer/bin/pip" install "$RUNNER_TEMP"/sdk-artifact/*.whl
"$RUNNER_TEMP/sdk-consumer/bin/python" -c 'import nimble_client'
- uses: actions/upload-artifact@v7
with:
name: python-sdk-candidate
path: ${{ runner.temp }}/sdk-artifact/*
if-no-files-found: error
13 changes: 13 additions & 0 deletions candidate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# OpenAPI generator candidate

This directory is a reviewable generator output, not the published Python SDK.
It does not change the root package, its version, or its release workflow.

- Platform source commit: `61ad0c8b85a98b48d73a0370d022dd26a14831f5`
- SDK input SHA-256: `283b1079b67453be6e8f06ccd3bf9955fedd553a9ab881e3f1f3904467d87cca`
- Generator image: `openapitools/openapi-generator-cli:v7.27.0`
- Selected operations: 59

The input is a frozen copy of Platform's proposed `sdk/openapi.yaml` in
Nimbleway/platform#3592. CI regenerates and compiles this candidate. Generated
package metadata is provisional and must be replaced before publication.
Loading
Loading