feat(signal): add SignalManager to Python SDK#598
Conversation
Adds SDK support for the new Signal Service: - RapidataSignalManager exposed as `client.signals` for CRUD on signals. - RapidataSignal with lifecycle methods (pause/resume/delete/trigger/update), run listing, and a blocking wait_for_next_run helper. - SignalRun dataclass with terminal-status / success convenience properties. Backend service is shipping in parallel, so HTTP goes through the existing OAuth-authenticated api_client.call_api against /signal on the gateway. To upgrade after the OpenAPI regen: drop _signal_http and switch to the typed client. Co-Authored-By: luca <luca@rapidata.ai>
Code Review — feat(signal): add SignalManager to Python SDKOverviewThis PR adds a Bugs / Correctness
# Current
return terminal[-1] # oldest new terminal (confusing intent)
# Likely intended
return terminal[0] # newest terminal run (most recently started that finished)
seen_ids = {r.id for r in self.get_runs(page=1, page_size=20)}
# then look for runs whose id is not in seen_ids
Style / Convention ViolationsDouble-underscore # All other managers
self._openapi_service = openapi_service # ✓
# Signal manager — should match
self.__openapi_service = openapi_service # ✗Import inside function body ( Missing Missing Items (per CLAUDE.md)No documentation update No automated tests No type annotation for # Add the annotation alongside the assignment
self.signals: RapidataSignalManager = RapidataSignalManager(
openapi_service=self._openapi_service
)Minor
Summary
The overall structure is solid. Fix the |
Summary
Adds SDK support for the new Signal Service:
RapidataSignalManagerexposed asclient.signals(CRUD entry point:create,get,list,get_run).RapidataSignalwith lifecycle methods (pause,resume,delete,trigger,update),get_runs/get_run, and a blockingwait_for_next_run(timeout, poll_interval)helper that returns the first new terminal run.SignalRundataclass withis_terminal/succeededconvenience properties.Notes for review
requestsagainst the gateway until OpenAPI regen. HTTP currently goes throughself._openapi_service.api_client.call_api(...)againsthttps://api.{environment}/signal/...(same patternRapidataClient._check_beta_featuresuses); the OAuth client transparently attaches the bearer token. To upgrade after backend deploy: addsignalto the openapi generation list, then drop_signal_http.pyand switch the manager / entity calls over to the typed client.RapidataErrorwith status code, message and (when available) parsed details — matching the existing error contract for the rest of the SDK.datetime.fromisoformat(Python 3.10 compatible —Zsuffix is normalised to+00:00).rapidata.rapidata_clientand top-levelrapidatanamespaces.Test plan
python -c "from rapidata import RapidataClient; print('OK')"python -c "from rapidata.rapidata_client.signal import RapidataSignalManager, RapidataSignal, SignalRun; print('OK')"python -c "from rapidata import RapidataSignal, RapidataSignalManager, SignalRun; print('OK')"pyright src/rapidata/rapidata_client-> 0 errorsBackend PR:
🔗 Session: https://session-b2a2bd76.poseidon.rapidata.internal/