Skip to content

feat(ci): update publish pipeline for dual-package aignostics-sdk release [PYSDK-140]#651

Open
ari-nz wants to merge 1 commit into
feat/PYSDK-133/python-sdk-slimfrom
feat/PYSDK-140/cicd-pipeline
Open

feat(ci): update publish pipeline for dual-package aignostics-sdk release [PYSDK-140]#651
ari-nz wants to merge 1 commit into
feat/PYSDK-133/python-sdk-slimfrom
feat/PYSDK-140/cicd-pipeline

Conversation

@ari-nz
Copy link
Copy Markdown
Collaborator

@ari-nz ari-nz commented May 28, 2026

Release Train — PYSDK-133

Verify wiring on the integration branch first: #661 (draft, targets main)

Step PR Jira Phase Notes
1 #653 PYSDK-134 Workspace scaffolding Merge first — gates everything below
2a #656 PYSDK-135 Source migration After #653
2b #655 PYSDK-138 Dependency split After #653, parallel with 2a
2c #654 PYSDK-139 Tooling updates After #653, parallel with 2a
3 #657 PYSDK-136 Import rewrite After #656
4a #658 PYSDK-137 Slim CLI After #657
4b #659 PYSDK-141 Tests After #657, parallel with 4a
#651 PYSDK-140 CI/CD pipeline Independent — merge any time
#652 PYSDK-142 Docs & migration Independent — merge any time

Retargeting: each PR currently targets its predecessor branch. After the predecessor merges into feat/PYSDK-133/python-sdk-slim, retarget this PR to feat/PYSDK-133/python-sdk-slim before merging it.


This PR — Independent: No dependency on the sequential chain. Can be merged any time into feat/PYSDK-133/python-sdk-slim.

Summary

This PR updates the CI/CD publish pipeline to handle the new dual-package workspace structure introduced in PYSDK-133.

Changes

  • Sequential dual-package publish: Replaced the single uv publish step with a build-then-publish sequence for each package. aignostics-sdk is built and published first (required because aignostics depends on it), then aignostics is built and published second.

  • Lockstep version consistency check: Added a pre-publish gate that reads the version = field from both packages/aignostics-sdk/pyproject.toml and packages/aignostics/pyproject.toml and fails fast if they differ. This enforces the lockstep versioning contract before anything reaches PyPI.

  • Slim package smoke test job: Added a new smoke_test_slim job (marked continue-on-error: true so it does not gate the full package publish). After package_publish completes, this job installs aignostics-sdk from PyPI into a fresh venv, asserts aignostics-sdk --help exits 0, verifies from aignostics_sdk.platform import Client works, and confirms that heavy deps like openslide are absent.

  • GitHub release artifact coverage: The existing ./dist/* glob in both gh release create steps already covers both wheels since all builds write into dist/. No change needed here.

  • make dist / noxfile update: Updated the dist() nox session to build both packages (uv build --package aignostics-sdk --out-dir dist/ then uv build --package aignostics --out-dir dist/) so make dist stays consistent with the new publish flow.

Note: The Verify lockstep versioning step reads from packages/aignostics-sdk/pyproject.toml and packages/aignostics/pyproject.toml, which will exist once the parent branch (feat/PYSDK-133/python-sdk-slim) lands. This PR is intentionally forward-looking and targets that branch.

Test plan

  • Verify YAML is syntactically valid (python -c "import yaml; yaml.safe_load(open('.github/workflows/_package-publish.yml'))")
  • Confirm package_publish job builds and publishes aignostics-sdk before aignostics
  • Confirm smoke_test_slim job does not block the release on failure (continue-on-error: true)
  • Confirm make dist builds both packages once the workspace packages exist

…ease

- Replace single uv publish step with sequential build+publish for aignostics-sdk (first) then aignostics (second) to respect dependency order
- Add pre-publish lockstep version consistency check that fails fast if the two packages diverge
- Add informational smoke_test_slim job (continue-on-error) that installs aignostics-sdk from PyPI after publish and asserts the CLI works, the slim import succeeds, and heavy deps (openslide) are absent
- Update noxfile dist() session to build both packages into dist/ so make dist stays consistent with the new publish flow
- GitHub release glob ./dist/* already covers both wheels since both are built into dist/
Copilot AI review requested due to automatic review settings May 28, 2026 10:25
@ari-nz ari-nz requested a review from a team as a code owner May 28, 2026 10:25
@ari-nz ari-nz added the skip:test:long_running Skip long-running tests (≥5min) label May 28, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release pipeline to support publishing both the slim aignostics-sdk package and the full aignostics package in the upcoming workspace layout.

Changes:

  • Adds lockstep version validation between the two package pyproject.toml files.
  • Replaces single-package publishing with package-specific build/publish steps.
  • Adds a non-blocking PyPI smoke test for the slim SDK package.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/_package-publish.yml Updates release publishing for dual packages and adds the slim package smoke test.
noxfile.py Updates the dist session to build both package distributions.

Comment on lines +189 to +197
- name: Publish aignostics-sdk to PyPI
shell: bash
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
run: |
# Use uv's credential storage - uv will read from UV_PUBLISH_TOKEN env var automatically
uv publish
run: uv publish dist/aignostics_sdk-*

- name: Build aignostics distribution
shell: bash
run: uv build --package aignostics --out-dir dist/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip:test:long_running Skip long-running tests (≥5min)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants