Skip to content
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e16925d
shifted group clients upwards in client libraries
emilbon99 Feb 12, 2026
f879d7f
checkpoint
emilbon99 Feb 12, 2026
569b56f
[client/py] - API cleanup
emilbon99 Feb 12, 2026
2858e78
[client/py] - removed references to Payload and renamed to BaseModel
emilbon99 Feb 12, 2026
4c4b0a3
[client/py] - updated python API conventions
emilbon99 Feb 12, 2026
8b92c9e
[freighter/py] - removed payload
emilbon99 Feb 12, 2026
79291ad
[client/py] - more work
emilbon99 Feb 12, 2026
d87062d
[ops] - checkpoint
emilbon99 Feb 12, 2026
6fb0f80
[client/py] - fixed type checking
emilbon99 Feb 12, 2026
bafb60c
checkpoint
emilbon99 Feb 13, 2026
22ff8b9
Merge branch 'rc' of https://github.com/synnaxlabs/synnax into sy-376…
emilbon99 Feb 13, 2026
0b47160
[ops] - pull request cleanup
emilbon99 Feb 13, 2026
2f0f868
Merge branch 'sy-3765-oracle-prep-8-standardize-python-api-naming-con…
emilbon99 Feb 13, 2026
3221efd
[client/py] - more type check tuning
emilbon99 Feb 13, 2026
c9494bc
[ops] - continued tuning pull request
emilbon99 Feb 13, 2026
e051b4d
[integration] - fixed tests to match new synnax API
emilbon99 Feb 13, 2026
614358a
[integration] - fixed linting issues
emilbon99 Feb 13, 2026
ea448a9
[ops] - checkpoint
emilbon99 Feb 13, 2026
f5f1b66
[integration] - updated adatper
emilbon99 Feb 13, 2026
ec8a713
Merge branch 'sy-3765-oracle-prep-8-standardize-python-api-naming-con…
emilbon99 Feb 13, 2026
4ee23d5
[client/py] - updated formatting
emilbon99 Feb 13, 2026
c25b14a
Merge branch 'rc' of https://github.com/synnaxlabs/synnax into sy-376…
emilbon99 Feb 15, 2026
fbcb696
[ops] - fixed namespacing issues
emilbon99 Feb 15, 2026
7b35ec5
[synnax] - added backwards compatible imports
emilbon99 Feb 15, 2026
1119842
[client/py] - added test imports
emilbon99 Feb 15, 2026
6e39918
Merge branch 'sy-3765-oracle-prep-8-standardize-python-api-naming-con…
emilbon99 Feb 15, 2026
4833d51
[client/py] - continued to improve type checking
emilbon99 Feb 15, 2026
96383a6
[ops] - updated integration tests
emilbon99 Feb 18, 2026
dd3c008
[client/py] - updated synnax controller
emilbon99 Feb 18, 2026
4caa3c9
Merge branch 'sy-3765-oracle-prep-8-standardize-python-api-naming-con…
emilbon99 Feb 18, 2026
803aab0
[client/py] - more improvements
emilbon99 Feb 18, 2026
cc41587
[client/py] - more type fixing
emilbon99 Feb 18, 2026
a683603
[client/py] - added active deprecation warnings
emilbon99 Feb 18, 2026
7e14661
[client/py] - removed more type checking
emilbon99 Feb 18, 2026
e4d765c
[client/py] - updated timing
emilbon99 Feb 18, 2026
71cd9e5
Merge branch 'rc' of https://github.com/synnaxlabs/synnax into sy-376…
emilbon99 Feb 19, 2026
5a527a4
fixed simualtors
emilbon99 Feb 19, 2026
d9d0fdd
[client/py] - fixed positional arg issues
emilbon99 Feb 19, 2026
c582a63
fixed union destructuring in streamer response tuples
emilbon99 Feb 20, 2026
1c08380
[client/py] - updated ranger client
emilbon99 Feb 20, 2026
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
6 changes: 5 additions & 1 deletion .github/actions/test-python/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: Whether to run mypy type checking
required: false
default: "true"
type_check_dir:
description: The directory to run mypy type checking in
required: false
default: "."
format_check:
description: Whether to run formatting checks (isort, black)
required: false
Expand Down Expand Up @@ -62,7 +66,7 @@ runs:

- name: Check types
if: inputs.type_check == 'true'
run: uv run mypy .
run: uv run mypy ${{ inputs.type_check_dir }}
shell: bash
working-directory: ${{ inputs.directory }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ jobs:
coverage: true
coverage_module: synnax
coverage_flag: client-py
type_check: false
type_check_dir: "./synnax"

ts:
name: Test - TypeScript
Expand Down
2 changes: 1 addition & 1 deletion client/py/examples/simulators/press.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _run_loop(self) -> None:
with self.client.open_writer(
start=sy.TimeStamp.now(),
channels=[
self.daq_time_ch.key,
self.daq_time_ch.name,
"press_vlv_state",
"vent_vlv_state",
"press_pt",
Expand Down
4 changes: 2 additions & 2 deletions client/py/examples/simulators/thermal.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _create_channels(self) -> None:
client.write(
now,
{
self.daq_time.key: [now],
self.daq_time.name: [now],
"temp_sensor": [self.AMBIENT_TEMP],
"heater_state": [0],
},
Expand All @@ -119,7 +119,7 @@ def _run_loop(self) -> None:
) as streamer:
with self.client.open_writer(
start=sy.TimeStamp.now(),
channels=[self.daq_time.key, "temp_sensor", "heater_state"],
channels=[self.daq_time.name, "temp_sensor", "heater_state"],
name="Thermal Sim DAQ",
) as writer:
force_overheat = False
Expand Down
9 changes: 8 additions & 1 deletion client/py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dev = [
"black>=26.1.0,<27",
"isort>=7.0.0,<8",
"mypy>=1.19.1,<2",
"pandas-stubs>=2.0.0",
"pymodbus>=3.11.4,<4",
"pytest>=9.0.2,<10",
"pytest-asyncio>=1.3.0,<2",
Expand All @@ -46,9 +47,14 @@ packages = ["synnax", "examples"]
profile = "black"

[tool.mypy]
plugins = ["numpy.typing.mypy_plugin", "pydantic.mypy"]
plugins = ["pydantic.mypy"]
strict = true

[[tool.mypy.overrides]]
module = "nptdms.*"
ignore_missing_imports = true
follow_imports = "skip"

[tool.pydantic-mypy]
init_forbid_extra = true
init_types = true
Expand All @@ -62,6 +68,7 @@ markers = [
"channel: mark test as a channel test",
"cli: mark test as a cli test",
"control: mark test as a control test",
"deprecation: mark test as a deprecation test",
"device: mark test as a device test",
"ethercat: mark test as an ethercat test",
"framer: mark test as a framer test",
Expand Down
21 changes: 13 additions & 8 deletions client/py/synnax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Handle,
Position,
)
from synnax.arc import Task as ArcTask
from synnax.arc import Task as _ArcTask
from synnax.arc import (
Text,
)
Expand Down Expand Up @@ -57,8 +57,8 @@
from synnax.ranger import Range
from synnax.status import Status
from synnax.synnax import Synnax
from synnax.task import Status as TaskStatus
from synnax.task import StatusDetails as TaskStatusDetails
from synnax.task import Status as _TaskStatus
from synnax.task import StatusDetails as _TaskStatusDetails
from synnax.task import Task
from synnax.telem import (
Alignment,
Expand Down Expand Up @@ -86,13 +86,20 @@
)
from synnax.timing import Loop, Timer, sleep
from synnax.user.payload import User
from synnax.util.deprecation import deprecated_getattr

SynnaxOptions = Options
_DEPRECATED: dict[str, str | tuple[str, str]] = {
"ArcTask": ("synnax.arc.Task", "_ArcTask"),
"TaskStatus": ("synnax.task.Status", "_TaskStatus"),
"TaskStatusDetails": ("synnax.task.StatusDetails", "_TaskStatusDetails"),
"SynnaxOptions": "Options",
}

__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())

__all__ = [
"Alignment",
"Arc",
"ArcTask",
"AUTO_SPAN",
"AuthError",
"Authority",
Expand Down Expand Up @@ -143,10 +150,7 @@
"Status",
"Streamer",
"Synnax",
"SynnaxOptions",
"Task",
"TaskStatus",
"TaskStatusDetails",
"Text",
"Timer",
"TimeRange",
Expand All @@ -165,4 +169,5 @@
"ni",
"opcua",
"status",
"Status",
]
21 changes: 10 additions & 11 deletions client/py/synnax/access/policy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
Policy,
ontology_id,
)
from synnax.util.deprecation import deprecated_getattr

# Backwards compatibility
PolicyClient = Client
CREATE_ACTION = ACTION_CREATE
DELETE_ACTION = ACTION_DELETE
RETRIEVE_ACTION = ACTION_RETRIEVE
UPDATE_ACTION = ACTION_UPDATE
_DEPRECATED = {
"PolicyClient": "Client",
"CREATE_ACTION": "ACTION_CREATE",
"DELETE_ACTION": "ACTION_DELETE",
"RETRIEVE_ACTION": "ACTION_RETRIEVE",
"UPDATE_ACTION": "ACTION_UPDATE",
}

__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())

__all__ = [
"Client",
Expand All @@ -32,9 +36,4 @@
"ACTION_RETRIEVE",
"ACTION_UPDATE",
"ontology_id",
"PolicyClient",
"CREATE_ACTION",
"DELETE_ACTION",
"RETRIEVE_ACTION",
"UPDATE_ACTION",
]
15 changes: 10 additions & 5 deletions client/py/synnax/access/policy/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ def ontology_id(key: UUID | None = None) -> ontology.ID:
return ontology.ID(type="policy", key=key if key is None else str(key))


# Backwards compatibility
CREATE_ACTION = ACTION_CREATE
DELETE_ACTION = ACTION_DELETE
RETRIEVE_ACTION = ACTION_RETRIEVE
UPDATE_ACTION = ACTION_UPDATE
from synnax.util.deprecation import deprecated_getattr

_DEPRECATED = {
"CREATE_ACTION": "ACTION_CREATE",
"DELETE_ACTION": "ACTION_DELETE",
"RETRIEVE_ACTION": "ACTION_RETRIEVE",
"UPDATE_ACTION": "ACTION_UPDATE",
}

__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())
10 changes: 7 additions & 3 deletions client/py/synnax/access/role/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@

from synnax.access.role.client import Client
from synnax.access.role.payload import ONTOLOGY_TYPE, Role, ontology_id
from synnax.util.deprecation import deprecated_getattr

# Backwards compatibility
RoleClient = Client
_DEPRECATED = {
"RoleClient": "Client",
}

__all__ = ["Role", "Client", "ONTOLOGY_TYPE", "ontology_id", "RoleClient"]
__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())

__all__ = ["Role", "Client", "ONTOLOGY_TYPE", "ontology_id"]
5 changes: 3 additions & 2 deletions client/py/synnax/access/role/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(
@overload
def create(
self,
role: Role,
roles: Role,
) -> Role: ...

@overload
Expand All @@ -89,6 +89,7 @@ def retrieve(self, key: UUID) -> Role: ...
@overload
def retrieve(
self,
*,
keys: list[UUID] | None = None,
limit: int | None = None,
offset: int | None = None,
Expand All @@ -104,7 +105,7 @@ def retrieve(
internal: bool | None = None,
) -> Role | list[Role]:
is_single = key is not None
if is_single:
if is_single and key is not None:
keys = [key]
req = _RetrieveRequest(keys=keys, limit=limit, offset=offset, internal=internal)
res = send_required(
Expand Down
24 changes: 11 additions & 13 deletions client/py/synnax/arc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@
Text,
)
from synnax.arc.types import Task, TaskConfig
from synnax.util.deprecation import deprecated_getattr

# Backwards compatibility
ArcTask = Task
ArcTaskConfig = TaskConfig
ArcClient = Client
ArcKey = Key
ArcMode = Mode
ArcPayload = Payload
_DEPRECATED = {
"ArcTask": "Task",
"ArcTaskConfig": "TaskConfig",
"ArcClient": "Client",
"ArcKey": "Key",
"ArcMode": "Mode",
"ArcPayload": "Payload",
}

__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())

__all__ = [
"Arc",
Expand All @@ -43,10 +47,4 @@
"Handle",
"Position",
"Text",
"ArcTask",
"ArcTaskConfig",
"ArcClient",
"ArcKey",
"ArcMode",
"ArcPayload",
]
15 changes: 10 additions & 5 deletions client/py/synnax/arc/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ class Payload(BaseModel):
"""Visual graph representation of the program."""


# Backwards compatibility
ARC_ONTOLOGY_TYPE = ONTOLOGY_TYPE
ArcKey = Key
ArcMode = Mode
ArcPayload = Payload
from synnax.util.deprecation import deprecated_getattr

_DEPRECATED = {
"ARC_ONTOLOGY_TYPE": "ONTOLOGY_TYPE",
"ArcKey": "Key",
"ArcMode": "Mode",
"ArcPayload": "Payload",
}

__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())
11 changes: 8 additions & 3 deletions client/py/synnax/arc/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ def __init__(
self.config = TaskConfig(arc_key=str(arc_key), auto_start=auto_start)


# Backwards compatibility
ArcTask = Task
ArcTaskConfig = TaskConfig
from synnax.util.deprecation import deprecated_getattr

_DEPRECATED = {
"ArcTask": "Task",
"ArcTaskConfig": "TaskConfig",
}

__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())
19 changes: 13 additions & 6 deletions client/py/synnax/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def authenticate(self) -> None:
self.user = res.user
self.authenticated = True

def middleware(self) -> list[Middleware]:
def mw(ctx: Context, _next: Next):
def middleware(self) -> Middleware:
def mw(ctx: Context, _next: Next) -> tuple[Context, Exception | None]:
if not self.authenticated:
self.authenticate()

Expand All @@ -86,8 +86,10 @@ def mw(ctx: Context, _next: Next):

return mw

def async_middleware(self) -> list[AsyncMiddleware]:
async def mw(ctx: Context, _next: AsyncNext):
def async_middleware(self) -> AsyncMiddleware:
async def mw(
ctx: Context, _next: AsyncNext
) -> tuple[Context, Exception | None]:
if not self.authenticated:
self.authenticate()

Expand All @@ -112,5 +114,10 @@ def maybe_refresh_token(
self.token = refresh


# Backwards compatibility
AuthenticationClient = Client
from synnax.util.deprecation import deprecated_getattr

_DEPRECATED = {
"AuthenticationClient": "Client",
}

__getattr__ = deprecated_getattr(__name__, _DEPRECATED, globals())
Loading
Loading