chore(tooling): update dev tooling paths for uv workspace layout [PYSDK-139]#654
Open
ari-nz wants to merge 1 commit into
Open
chore(tooling): update dev tooling paths for uv workspace layout [PYSDK-139]#654ari-nz wants to merge 1 commit into
ari-nz wants to merge 1 commit into
Conversation
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).
There was a problem hiding this comment.
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 lintmypy targets anddistsession builds to operate on workspace packages. - Adjusted
pyrightconfig.jsoninclude/ignore/extraPaths for the new package directory layout. - Updated mypy excludes and coverage/pytest-cov configuration to account for both
aignosticsandaignostics_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 on lines
+3
to
+7
| "include": [ | ||
| "packages/aignostics-sdk/src", | ||
| "packages/aignostics/src", | ||
| "noxfile.py" | ||
| ], |
| ], | ||
| "extraPaths": [ | ||
| "./src/aignostics/utils/_" | ||
| "./packages/aignostics/src/aignostics/utils" |
| ) | ||
| session.run("pyright", "--pythonversion", PYTHON_VERSION, "--threads") | ||
| session.run("mypy", "src") | ||
| session.run("mypy", "packages/aignostics-sdk/src", "packages/aignostics/src") |
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 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 on lines
213
to
+219
| [tool.coverage.run] | ||
| sigterm = true | ||
| relative_files = true | ||
| source = ["src"] | ||
| source = [ | ||
| "packages/aignostics-sdk/src", | ||
| "packages/aignostics/src", | ||
| ] |
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release Train — PYSDK-133
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.pylintsession:mypytarget updated fromsrctopackages/aignostics-sdk/src packages/aignostics/srcdistsession: now builds bothaignostics-sdkandaignosticspackages with--packageflagsession.error()is not typed asNoReturnin nox stubs, sore.Match | Nonewas not narrowed after the error call; addedassert ... is not None # noqa: S101)pyrightconfig.jsonincludelist targetingpackages/aignostics-sdk/src,packages/aignostics/src, andnoxfile.pyignorepaths fromsrc/aignostics/...topackages/aignostics/src/aignostics/...extraPathsfrom./src/aignostics/utilsto./packages/aignostics/src/aignostics/utilsexcludeentries (nox/.venv/dist etc.)pyproject.toml[tool.mypy]exclude: updated fromsrc/aignostics/third_partyglob to explicit new package paths for bothaignostics-sdkandaignosticsthird-party dirs and excluded files[tool.pytest.ini_options]addopts: changed--cov=aignosticsto--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 fromsrc/aignostics/...to*/aignostics/...and*/aignostics_sdk/...[tool.coverage.paths]source: updated to point at both new package source dirsWhat was verified
ruff check .— all checks passedruff format --check .— all files already formattedpyright— 0 errors, 0 warningsmypy packages/aignostics-sdk/src packages/aignostics/src— success (2 stub__init__.pyfiles)python -c "import json; json.load(open('pyrightconfig.json'))"— valid JSONuv run coverage debug config— config parses correctlyuv sync --all-extras— workspace resolves cleanlyNotes
ruff.toml/[tool.ruff]: uses glob patterns only (**/third_party/*.pyetc.) — no path changes neededsonar-project.properties: uses glob exclusion patterns, nosonar.sourcesproperty — no changes needed