Skip to content

Commit d0d0847

Browse files
committed
ci(client-sdks): release locally-generated sdk as ogx-client
Following comment #6207 (comment) Building the locally-gnerated client SDK as `ogx-client`, moving back from the temporary `ogx-open-client` Signed-off-by: E Geiger <egeiger@redhat.com>
1 parent e697962 commit d0d0847

3 files changed

Lines changed: 24 additions & 48 deletions

File tree

.github/workflows/openapi-generator-validation.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
188188
- name: Generate Python SDK
189189
working-directory: client-sdks/openapi
190-
run: make sdk OPEN=1
190+
run: make sdk OPEN=0
191191

192192
- name: Validate generated SDK
193193
working-directory: client-sdks/openapi
@@ -217,14 +217,14 @@ jobs:
217217
218218
- name: Install generated SDK
219219
run: |
220-
echo "Reinstalling OpenAPI-generated SDK (ogx_open_client)..."
221-
uv pip uninstall ogx-open-client || true
220+
echo "Reinstalling OpenAPI-generated SDK (ogx_client)..."
221+
uv pip uninstall ogx-client || true
222222
223223
# Install SDK using uv pip
224224
uv pip install -e client-sdks/openapi/sdks/python
225225
226226
echo "Verifying installation..."
227-
uv run python -c "import ogx_open_client; print(f'Installed: {ogx_open_client.__name__}')"
227+
uv run python -c "import ogx_client; print(f'Installed: {ogx_client.__name__}')"
228228
229229
- name: Setup Ollama (for integration tests)
230230
if: runner.os == 'Linux'
@@ -242,7 +242,7 @@ jobs:
242242
|| echo "::warning::Some integration tests failed - this may indicate SDK compatibility issues"
243243
244244
# Show which SDK is actually being used
245-
uv run python -c "import ogx_open_client; import inspect; print(f'SDK location: {inspect.getfile(ogx_open_client)}')"
245+
uv run python -c "import ogx_client; import inspect; print(f'SDK location: {inspect.getfile(ogx_client)}')"
246246
247247
- name: Summary
248248
if: runner.os == 'Linux'
@@ -255,5 +255,5 @@ jobs:
255255
echo "✅ Integration tests executed (check logs for results)"
256256
echo ""
257257
echo "**Platform**: ${{ matrix.os }}"
258-
echo "**Package**: ogx_open_client (OpenAPI-generated)"
258+
echo "**Package**: ogx_client (OpenAPI-generated)"
259259
} >> "$GITHUB_STEP_SUMMARY"

.github/workflows/publish-openapi-sdk.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Publish OpenAPI SDK to PyPI
22

3-
run-name: Publish ogx-open-client to PyPI
3+
run-name: Publish ogx-client to PyPI
44

55
on:
66
workflow_dispatch:
@@ -101,8 +101,8 @@ jobs:
101101
working-directory: client-sdks/openapi
102102
run: |
103103
VERSION="${{ needs.compute-version.outputs.version }}"
104-
echo "Generating SDK with OPEN=1 (ogx_open_client) at version ${VERSION}..."
105-
make sdk OPEN=1 VERSION="${VERSION}"
104+
echo "Generating SDK with OPEN=0 (ogx_client) at version ${VERSION}..."
105+
make sdk OPEN=0 VERSION="${VERSION}"
106106
107107
- name: Verify SDK generation
108108
working-directory: client-sdks/openapi
@@ -169,10 +169,10 @@ jobs:
169169
echo ""
170170
echo "- **Event**: ${{ github.event_name }}"
171171
echo "- **Target**: TestPyPI"
172-
echo "- **Package**: ogx-open-client"
172+
echo "- **Package**: ogx-client"
173173
echo ""
174174
echo "✅ Package published to TestPyPI"
175-
echo "Install with: \`pip install --index-url https://test.pypi.org/simple/ ogx-open-client\`"
175+
echo "Install with: \`pip install --index-url https://test.pypi.org/simple/ ogx-client\`"
176176
} >> "$GITHUB_STEP_SUMMARY"
177177
178178
publish-pypi:
@@ -204,8 +204,8 @@ jobs:
204204
echo ""
205205
echo "- **Event**: ${{ github.event_name }}"
206206
echo "- **Target**: PyPI (production)"
207-
echo "- **Package**: ogx-open-client"
207+
echo "- **Package**: ogx-client"
208208
echo ""
209209
echo "✅ Package published to PyPI"
210-
echo "Install with: \`pip install ogx-open-client\`"
210+
echo "Install with: \`pip install ogx-client\`"
211211
} >> "$GITHUB_STEP_SUMMARY"

.github/workflows/pypi.yml

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This workflow builds, tests, and publishes all ogx packages:
66
# - ogx (PyPI)
77
# - ogx-api (PyPI)
8-
# - ogx-client-python (PyPI, from external repo)
8+
# - ogx-client (PyPI, OpenAPI-generated SDK)
99
# - ogx-client-typescript (npm, from external repo)
1010
#
1111
# =============================================================================
@@ -226,15 +226,11 @@ jobs:
226226
type: local
227227
registry: pypi
228228
# OpenAPI-generated SDK (built from spec in this repo)
229-
- package: ogx-open-client
229+
- package: ogx-client
230230
path: client-sdks/openapi
231231
type: openapi-sdk
232232
registry: pypi
233233
# External packages (client SDKs from other repos)
234-
- package: ogx-client-python
235-
repo: ogx-ai/ogx-client-python
236-
type: external
237-
registry: pypi
238234
- package: ogx-client-typescript
239235
repo: ogx-ai/ogx-client-typescript
240236
type: external
@@ -355,7 +351,7 @@ jobs:
355351
env:
356352
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.compute-version.outputs.version }}
357353

358-
# === OPENAPI SDK BUILD (ogx-open-client) ===
354+
# === OPENAPI SDK BUILD (ogx-client) ===
359355
- name: Set up Java (openapi-sdk)
360356
if: steps.should-build.outputs.skip != 'true' && matrix.type == 'openapi-sdk'
361357
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
@@ -378,8 +374,8 @@ jobs:
378374
working-directory: ${{ matrix.path }}
379375
run: |
380376
VERSION="${{ needs.compute-version.outputs.version }}"
381-
echo "Generating SDK with OPEN=1 (ogx_open_client) at version ${VERSION}..."
382-
make sdk OPEN=1 VERSION="${VERSION}"
377+
echo "Generating SDK with OPEN=0 (ogx_client) at version ${VERSION}..."
378+
make sdk OPEN=0 VERSION="${VERSION}"
383379
384380
cd sdks/python
385381
echo "Building Python package..."
@@ -658,14 +654,6 @@ jobs:
658654
path: dist-stack
659655
continue-on-error: true
660656

661-
- name: Download ogx-client-python artifacts
662-
id: download-client-python
663-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
664-
with:
665-
name: Packages-ogx-client-python
666-
path: dist-client-python
667-
continue-on-error: true
668-
669657
- name: Download ogx-client-typescript artifacts
670658
id: download-client-ts
671659
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
@@ -674,12 +662,12 @@ jobs:
674662
path: dist-client-ts
675663
continue-on-error: true
676664

677-
- name: Download ogx-open-client artifacts
678-
id: download-open-client
665+
- name: Download ogx-client artifacts (OpenAPI SDK)
666+
id: download-client-python
679667
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
680668
with:
681-
name: Packages-ogx-open-client
682-
path: dist-open-client
669+
name: Packages-ogx-client
670+
path: dist-client-python
683671
continue-on-error: true
684672

685673
- name: Create venv and install Python packages
@@ -703,11 +691,6 @@ jobs:
703691
uv pip install dist-stack/*.whl
704692
fi
705693
706-
if [ -d "dist-open-client" ] && ls dist-open-client/*.whl 1>/dev/null 2>&1; then
707-
echo "Installing ogx-open-client..."
708-
uv pip install dist-open-client/*.whl
709-
fi
710-
711694
- name: List Wheel Contents (ogx-api)
712695
if: steps.download-api.outcome == 'success'
713696
run: |
@@ -741,10 +724,6 @@ jobs:
741724
python -c "import ogx_client; print(f'ogx_client imported successfully from {ogx_client.__file__}')"
742725
fi
743726
744-
if [ -d "dist-open-client" ] && ls dist-open-client/*.whl 1>/dev/null 2>&1; then
745-
python -c "import ogx_open_client; print(f'ogx_open_client imported successfully from {ogx_open_client.__file__}')"
746-
fi
747-
748727
- name: Verify TypeScript package
749728
if: steps.download-client-ts.outcome == 'success'
750729
run: |
@@ -764,7 +743,7 @@ jobs:
764743
fi
765744
766745
# Publish packages to PyPI/npm
767-
# Order: ogx-client-python, ogx-client-typescript, ogx-open-client, ogx-api, ogx
746+
# Order: ogx-client-typescript, ogx-client, ogx-api, ogx
768747
publish-packages:
769748
name: Publish ${{ matrix.package }}
770749
if: |
@@ -785,13 +764,10 @@ jobs:
785764
matrix:
786765
include:
787766
# Order matters! Dependencies are published first
788-
- package: ogx-client-python
789-
registry: pypi
790-
type: external
791767
- package: ogx-client-typescript
792768
registry: npm
793769
type: external
794-
- package: ogx-open-client
770+
- package: ogx-client
795771
registry: pypi
796772
type: openapi-sdk
797773
- package: ogx-api

0 commit comments

Comments
 (0)