Skip to content

chore(tooling): update dev tooling paths for uv workspace layout [PYSDK-139] - #654

Closed
ari-nz wants to merge 1 commit into
feat/PYSDK-134/workspace-scaffoldingfrom
feat/PYSDK-139/tooling-updates
Closed

chore(tooling): update dev tooling paths for uv workspace layout [PYSDK-139]#654
ari-nz wants to merge 1 commit into
feat/PYSDK-134/workspace-scaffoldingfrom
feat/PYSDK-139/tooling-updates

Conversation

@ari-nz

@ari-nzari-nz commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Release Train — PYSDK-133

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

StepPRJiraPhaseNotes
1#653PYSDK-134Workspace scaffoldingMerge first — gates everything below
2a#656PYSDK-135Source migrationAfter #653
2b#655PYSDK-138Dependency splitAfter #653, parallel with 2a
2c#654PYSDK-139Tooling updatesAfter #653, parallel with 2a
3#657PYSDK-136Import rewriteAfter #656
4a#658PYSDK-137Slim CLIAfter #657
4b#659PYSDK-141TestsAfter #657, parallel with 4a
#651PYSDK-140CI/CD pipelineIndependent — merge any time
#652PYSDK-142Docs & migrationIndependent — 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 2c: Merge after #653 (workspace scaffolding), parallel with #656 and #655. Retarget to feat/PYSDK-133/python-sdk-slim first.

Summary

Updates all dev tooling configuration to understand the new uv workspace layout introduced by PYSDK-134. Source code has NOT moved yet (PYSDK-135 is a parallel PR) — tool paths point to the new package locations and lint/type-check errors from missing source files are expected until PYSDK-135 merges.

Files changed

  • noxfile.py

    • lint session: mypy target updated from src to packages/aignostics-sdk/src packages/aignostics/src
    • dist session: now builds both aignostics-sdk and aignostics packages with --package flag
    • Fixed four Pylance/pyright type-narrowing errors in latexmk version detection (session.error() is not typed as NoReturn in nox stubs, so re.Match | None was not narrowed after the error call; added assert ... is not None # noqa: S101)
  • pyrightconfig.json

    • Added explicit include list targeting packages/aignostics-sdk/src, packages/aignostics/src, and noxfile.py
    • Updated ignore paths from src/aignostics/... to packages/aignostics/src/aignostics/...
    • Updated extraPaths from ./src/aignostics/utils to ./packages/aignostics/src/aignostics/utils
    • Preserved existing exclude entries (nox/.venv/dist etc.)
  • pyproject.toml

    • [tool.mypy]exclude: updated from src/aignostics/third_party glob to explicit new package paths for both aignostics-sdk and aignostics third-party dirs and excluded files
    • [tool.pytest.ini_options]addopts: changed --cov=aignostics to --cov=aignostics_sdk --cov=aignostics
    • [tool.coverage.run]source: updated from ["src"] to ["packages/aignostics-sdk/src", "packages/aignostics/src"]
    • [tool.coverage.run]omit: updated glob patterns from src/aignostics/... to */aignostics/... and */aignostics_sdk/...
    • [tool.coverage.paths]source: updated to point at both new package source dirs

What was verified

  • ruff check . — all checks passed
  • ruff format --check . — all files already formatted
  • pyright — 0 errors, 0 warnings
  • mypy packages/aignostics-sdk/src packages/aignostics/src — success (2 stub __init__.py files)
  • python -c "import json; json.load(open('pyrightconfig.json'))" — valid JSON
  • uv run coverage debug config — config parses correctly
  • uv sync --all-extras — workspace resolves cleanly

Notes

  • ruff.toml / [tool.ruff]: uses glob patterns only (**/third_party/*.py etc.) — no path changes needed
  • sonar-project.properties: uses glob exclusion patterns, no sonar.sources property — no changes needed

Update mypy, pyright, coverage, pytest, and dist build configs to target
packages/aignostics-sdk/src and packages/aignostics/src instead of the
legacy src/ layout introduced by PYSDK-134 workspace scaffolding.
Also fix four Pylance type-narrowing errors in noxfile.py latexmk version
detection (session.error() is not NoReturn in nox's type stubs).
CopilotAI review requested due to automatic review settings May 28, 2026 10:55
@ari-nz
ari-nz requested a review from a team as a code ownerMay 28, 2026 10:55
@ari-nzari-nz added the skip:test:long_running Skip long-running tests (≥5min) label May 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 developer tooling configuration (nox, pyright, mypy, pytest-cov/coverage) to target a new uv workspace layout with package sources under packages/*/src, in preparation for an upcoming code move.

Changes:

  • Updated nox lint mypy targets and dist session builds to operate on workspace packages.
  • Adjusted pyrightconfig.json include/ignore/extraPaths for the new package directory layout.
  • Updated mypy excludes and coverage/pytest-cov configuration to account for both aignostics and aignostics_sdk.

Reviewed changes

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

FileDescription
pyrightconfig.jsonAdds include list and updates ignore/extraPaths to the new workspace paths.
pyproject.tomlUpdates mypy excludes and coverage/pytest-cov configuration for the new package layout.
noxfile.pyUpdates lint mypy targets, refines latexmk version parsing narrowing, and builds both workspace packages in dist.

Comment threadpyrightconfig.json
Comment on lines +3 to +7
"include": [
"packages/aignostics-sdk/src",
"packages/aignostics/src",
"noxfile.py"
],
Comment threadpyrightconfig.json
],
"extraPaths": [
"./src/aignostics/utils/_"
"./packages/aignostics/src/aignostics/utils"
Comment threadnoxfile.py
)
session.run("pyright", "--pythonversion", PYTHON_VERSION, "--threads")
session.run("mypy", "src")
session.run("mypy", "packages/aignostics-sdk/src", "packages/aignostics/src")
Comment threadnoxfile.py
Comment on lines 596 to +607
version_match = re.search(r"Version (\d+\.\d+\w*)", str(out))
if not version_match:
session.error("Could not determine latexmk version")
assert version_match is not None # noqa: S101

version_str = version_match.group(1)

# Parse version (handle cases like "4.86a")
match = re.match(r"(\d+\.\d+)", version_str)
if not match:
session.error(f"Could not parse version number from '{version_str}'")
assert match is not None # noqa: S101
Comment threadnoxfile.py
Comment on lines 667 to +678
version_match = re.search(r"Version (\d+\.\d+\w*)", str(out))
if not version_match:
session.error("Could not determine latexmk version")
assert version_match is not None # noqa: S101

version_str = version_match.group(1)

# Parse version (handle cases like "4.86a")
match = re.match(r"(\d+\.\d+)", version_str)
if not match:
session.error(f"Could not parse version number from '{version_str}'")
assert match is not None # noqa: S101
Comment threadpyproject.toml
Comment on lines 213 to +219
[tool.coverage.run]
sigterm = true
relative_files = true
source = ["src"]
source = [
"packages/aignostics-sdk/src",
"packages/aignostics/src",
]
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ari-nz