Skip to content

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

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

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
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 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).
Copilot AI 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 owner May 28, 2026 10:55
@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 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.

File Description
pyrightconfig.json Adds include list and updates ignore/extraPaths to the new workspace paths.
pyproject.toml Updates mypy excludes and coverage/pytest-cov configuration for the new package layout.
noxfile.py Updates lint mypy targets, refines latexmk version parsing narrowing, and builds both workspace packages in dist.

Comment thread pyrightconfig.json
Comment on lines +3 to +7
"include": [
"packages/aignostics-sdk/src",
"packages/aignostics/src",
"noxfile.py"
],
Comment thread pyrightconfig.json
],
"extraPaths": [
"./src/aignostics/utils/_"
"./packages/aignostics/src/aignostics/utils"
Comment thread noxfile.py
)
session.run("pyright", "--pythonversion", PYTHON_VERSION, "--threads")
session.run("mypy", "src")
session.run("mypy", "packages/aignostics-sdk/src", "packages/aignostics/src")
Comment thread noxfile.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 thread noxfile.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 thread pyproject.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 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