Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def lint(session: nox.Session) -> None:
".",
)
session.run("pyright", "--pythonversion", PYTHON_VERSION, "--threads")
session.run("mypy", "src")
session.run("mypy", "packages/aignostics-sdk/src", "packages/aignostics/src")


@nox.session(python=[PYTHON_VERSION])
Expand Down Expand Up @@ -596,13 +596,15 @@ def _generate_pdf_docs(session: nox.Session) -> None:
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 596 to +607
base_version = match.group(1)

if float(base_version) < LATEXMK_VERSION_MIN:
Expand Down Expand Up @@ -665,13 +667,15 @@ def docs_pdf(session: nox.Session) -> None:
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
base_version = match.group(1)

if float(base_version) < LATEXMK_VERSION_MIN:
Expand Down Expand Up @@ -1028,4 +1032,5 @@ def act(session: nox.Session) -> None:
@nox.session()
def dist(session: nox.Session) -> None:
"""Build wheel and put in dist/."""
session.run("uv", "build", external=True)
session.run("uv", "build", "--package", "aignostics-sdk", "--out-dir", "dist/", external=True)
session.run("uv", "build", "--package", "aignostics", "--out-dir", "dist/", external=True)
31 changes: 22 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@ docstring-code-format = true
convention = "google"

[tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html
exclude = ["src/aignostics/third_party", "_notebook.py", "_pydicom_handler.py"]
exclude = [
"packages/aignostics-sdk/src/aignostics_sdk/third_party",
"packages/aignostics/src/aignostics/third_party",
"packages/aignostics/src/aignostics/notebook/_notebook.py",
"packages/aignostics/src/aignostics/wsi/_pydicom_handler.py",
"packages/aignostics/src/aignostics/wsi/_openslide_handler.py",
]
junit_xml = "reports/mypy_junit.xml"
plugins = "pydantic.mypy"
strict = true
Expand All @@ -170,7 +176,7 @@ warn_untyped_fields = true
main_file = "tests/main.py"
testpaths = ["tests"]
python_files = ["*_test.py", "test_*.py"]
addopts = "-p nicegui.testing.plugin -v --strict-markers --log-disable=aignostics --cov=aignostics --cov-report=term-missing --cov-report=xml:reports/coverage.xml --cov-report=html:reports/coverage_html"
addopts = "-p nicegui.testing.plugin -v --strict-markers --log-disable=aignostics --cov=aignostics_sdk --cov=aignostics --cov-report=term-missing --cov-report=xml:reports/coverage.xml --cov-report=html:reports/coverage_html"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
timeout = 10 # We use a rather short default timeout. Override with @pytest.mark.timeout(timeout=N)
Expand Down Expand Up @@ -207,20 +213,27 @@ md_report_exclude_outcomes = ["passed", "skipped"]
[tool.coverage.run]
sigterm = true
relative_files = true
source = ["src"]
source = [
"packages/aignostics-sdk/src",
"packages/aignostics/src",
]
Comment on lines 213 to +219
omit = [
"src/aignostics/aignostics.py",
"src/aignostics/third_party/*",
"src/aignostics/notebook/_notebook.py",
"src/aignostics/wsi/_pydicom_handler.py",
"src/aignostics/wsi/_openslide_handler.py",
"*/aignostics/aignostics.py",
"*/aignostics/third_party/*",
"*/aignostics_sdk/third_party/*",
"*/aignostics/notebook/_notebook.py",
"*/aignostics/wsi/_pydicom_handler.py",
"*/aignostics/wsi/_openslide_handler.py",
]
branch = true
parallel = true
concurrency = ["thread", "multiprocessing"]

[tool.coverage.paths]
source = ["src/"]
source = [
"packages/aignostics-sdk/src",
"packages/aignostics/src",
]


[tool.bumpversion]
Expand Down
15 changes: 10 additions & 5 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"typeCheckingMode": "basic",
"include": [
"packages/aignostics-sdk/src",
"packages/aignostics/src",
"noxfile.py"
],
Comment on lines +3 to +7
"exclude": [
"**/.nox/**",
"**/.venv/**",
"**/.claude/worktrees/**",
"**/dist-packages/**",
"**/dist_vercel/.vercel/**",
"**/dist_native/**",
"**/site-packages/**",
"**/site-packages/**"
],
"ignore": [
"**/third_party/**",
Expand All @@ -17,10 +22,10 @@
"template/**",
"tests/**",
"codegen/**",
"src/aignostics/wsi/_pydicom_handler.py",
"src/aignostics/notebook/_notebook.py",
"packages/aignostics/src/aignostics/wsi/_pydicom_handler.py",
"packages/aignostics/src/aignostics/notebook/_notebook.py"
],
"extraPaths": [
"./src/aignostics/utils/_"
"./packages/aignostics/src/aignostics/utils"
]
}
}