Skip to content

feat(packaging): introduce uv workspace structure for aignostics-sdk split [PYSDK-134]#653

Open
ari-nz wants to merge 1 commit into
feat/PYSDK-133/python-sdk-slimfrom
feat/PYSDK-134/workspace-scaffolding
Open

feat(packaging): introduce uv workspace structure for aignostics-sdk split [PYSDK-134]#653
ari-nz wants to merge 1 commit into
feat/PYSDK-133/python-sdk-slimfrom
feat/PYSDK-134/workspace-scaffolding

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 — Step 1: Must merge before anything else. All of steps 2a–4b depend on this.

Summary

  • Transforms root pyproject.toml into a workspace-only config: strips [project], [project.optional-dependencies], [project.scripts], [project.urls], [build-system], and [tool.hatch.*]; adds [tool.uv.workspace] members = ["packages/*"]
  • Creates packages/aignostics-sdk/pyproject.toml — the slim package, with full dependency list copied from the original root (dependency split is Phase 5); hatchling build config points to src/aignostics_sdk
  • Creates packages/aignostics/pyproject.toml — the full meta-package depending on aignostics-sdk==1.4.0 via [tool.uv.sources] workspace reference
  • Creates minimal stub __init__.py files at packages/aignostics-sdk/src/aignostics_sdk/__init__.py and packages/aignostics/src/aignostics/__init__.py
  • Updates [tool.bumpversion.files] to target the two new package pyproject.toml files instead of the root
  • Regenerates uv.lock to include both workspace members

Notes

  • uv sync --all-extras resolves and installs both aignostics==1.4.0 and aignostics-sdk==1.4.0 from the workspace
  • make lint fails with pre-existing aignx.codegen import errors — these are expected for Phase 1 since the codegen/out/aignx package isn't installed in the workspace venv yet; import rewrites happen in Phase 3
  • Hatchling does not support ../../-relative paths for [tool.hatch.build.targets.wheel].packages; the codegen bundling spec (../../codegen/out/aignx) has been deferred to Phase 5 with a TODO comment; this does not affect uv sync or workspace resolution
  • Source migration (moving src/aignostics/* into the appropriate package src/) follows in PYSDK-135

Test plan

  • uv sync --all-extras completes successfully with both packages installed from the workspace
  • packages/aignostics-sdk/pyproject.toml has version = "1.4.0"
  • packages/aignostics/pyproject.toml has version = "1.4.0" and depends on aignostics-sdk==1.4.0
  • Root pyproject.toml has no [project] section and includes [tool.uv.workspace]

Copilot AI review requested due to automatic review settings May 28, 2026 10:31
@ari-nz ari-nz requested a review from a team as a code owner May 28, 2026 10:31
@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 restructures the SDK packaging into a uv workspace as a first step toward splitting the existing monolithic package into separate aignostics and aignostics-sdk distributions.

Changes:

  • Converts the root pyproject.toml into workspace/tooling configuration.
  • Adds workspace package metadata for packages/aignostics and packages/aignostics-sdk.
  • Adds package stubs and regenerates uv.lock for the workspace members.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pyproject.toml Removes root project metadata, adds workspace configuration, and updates version bump targets.
packages/aignostics/pyproject.toml Defines the full/meta package and its dependency on aignostics-sdk.
packages/aignostics-sdk/pyproject.toml Defines the slim SDK package metadata, dependencies, build config, and script entry point.
packages/aignostics/src/aignostics/__init__.py Adds a temporary package stub for the meta package.
packages/aignostics-sdk/src/aignostics_sdk/__init__.py Adds a temporary package stub for the SDK package.
uv.lock Regenerates lock metadata for the new workspace layout.

@@ -0,0 +1 @@
"""Package stub — source migrated in Phase 2."""
Comment on lines +164 to +166
[project.scripts]
aignostics-sdk = "aignostics_sdk.cli:cli"

Comment thread pyproject.toml
Comment on lines +252 to +259
search = """
[project]
name = \"aignostics-sdk\"
version = \"{current_version}\"\""""
replace = """
[project]
name = \"aignostics-sdk\"
version = \"{new_version}\"\""""
Comment thread pyproject.toml
Comment on lines 263 to +270
search = """
[project]
name = \"aignostics\"
version = \"{current_version}\""""
version = \"{current_version}\"\""""
replace = """
[project]
name = \"aignostics\"
version = \"{new_version}\""""
version = \"{new_version}\"\""""
Comment on lines +77 to +79
dependencies = [
"aignostics-sdk==1.4.0",
# Heavy deps will be moved here from aignostics-sdk in Phase 5
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