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
5 changes: 1 addition & 4 deletions packages/aignostics-sdk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,9 @@ build-backend = "hatchling.build"

[tool.hatch.build]
include = ["src/*"]
# TODO(Phase 5): Bundle codegen/out/aignx into wheel. Hatchling does not support
# paths outside the project root (../../codegen/out/*). Options: symlink, copy
# via a build hook, or use a hatch plugin. Deferred to the codegen migration phase.

[tool.hatch.build.targets.wheel]
packages = ["src/aignostics_sdk"]
packages = ["src/aignostics_sdk", "src/aignx"]

[tool.hatch.metadata]
allow-direct-references = true
2 changes: 1 addition & 1 deletion packages/aignostics-sdk/src/aignostics_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""Package stubsource migrated in Phase 2."""
"""Aignostics SDKslim platform client distribution."""
4 changes: 4 additions & 0 deletions packages/aignostics-sdk/src/aignostics_sdk/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Static configuration of Aignostics SDK (slim package)."""

# Organizations with internal/advanced access (e.g., platform-wide queue visibility, GPU config)
INTERNAL_ORGS = {"aignostics", "pre-alpha-org", "lmu", "charite"}
1 change: 1 addition & 0 deletions packages/aignostics-sdk/src/aignx
51 changes: 50 additions & 1 deletion packages/aignostics/src/aignostics/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
"""Package stub — source migrated in Phase 2."""
"""Python SDK providing access to Aignostics AI services."""

import os
import warnings
from typing import Any

# TODO(Helmut): remove when google_crc32c supports Python 3.14
warnings.filterwarnings("ignore", message="As the c extension couldn't be imported", category=RuntimeWarning)

from .constants import ( # noqa: E402
HETA_APPLICATION_ID,
SENTRY_INTEGRATIONS,
TEST_APP_APPLICATION_ID,
WSI_SUPPORTED_FILE_EXTENSIONS,
WSI_SUPPORTED_FILE_EXTENSIONS_TEST_APP,
)
from .utils.boot import boot # noqa: E402

# Add scheme to HTTP proxy environment variables if missing
for proxy_var in ["HTTP_PROXY", "HTTPS_PROXY"]:
proxy_url = os.environ.get(proxy_var)
if proxy_url and not proxy_url.startswith(("http://", "https://")):
os.environ[proxy_var] = f"http://{proxy_url}"


def _log_filter(record: Any) -> bool: # noqa: ANN401
"""Filter out unwanted log messages.

Args:
record: The log record to filter

Returns:
bool: True to log the message, False to filter it out
"""
return not (
(record["name"] == "azure.storage.blob._shared.avro.schema" and record["function"] == "register")
or (record["name"] == "matplotlib.font_manager" and record["function"] == "_findfont_cached")
or (record["name"] == "PIL.PngImagePlugin" and record["function"] == "call")
or (record["name"] == "PIL.PngImagePlugin" and record["function"] == "_open")
)


boot(sentry_integrations=SENTRY_INTEGRATIONS, log_filter=_log_filter)

__all__ = [
"HETA_APPLICATION_ID",
"TEST_APP_APPLICATION_ID",
"WSI_SUPPORTED_FILE_EXTENSIONS",
"WSI_SUPPORTED_FILE_EXTENSIONS_TEST_APP",
]
File renamed without changes.
50 changes: 0 additions & 50 deletions src/aignostics/__init__.py

This file was deleted.