Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #338 +/- ##
===========================================
- Coverage 83.76% 81.90% -1.86%
===========================================
Files 21 25 +4
Lines 1355 1785 +430
===========================================
+ Hits 1135 1462 +327
- Misses 220 323 +103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new telemetry subsystem to PANOPTES Utilities, including a FastAPI-based server that writes NDJSON streams, a small Python client wrapper, and a Typer CLI surface to run/stop the service.
Changes:
- Added
panoptes.utils.telemetryserver/client modules with site/run streams, noon-boundary rotation, and/currentsnapshot endpoints. - Added
panoptes-utils telemetryCLI subcommands plus tests covering server and client behavior. - Updated docs, dependencies, and changelog to reflect the new optional
telemetryextra.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_utils.py | Makes libc name assertion more robust across platforms/paths. |
| tests/test_telemetry_server.py | Adds FastAPI TestClient coverage for telemetry server endpoints and file outputs. |
| tests/test_telemetry_client.py | Adds tests for TelemetryClient wrappers and error handling. |
| src/panoptes/utils/telemetry/server.py | Implements TelemetryService + FastAPI app + process launcher. |
| src/panoptes/utils/telemetry/client.py | Implements requests-based TelemetryClient and error type. |
| src/panoptes/utils/telemetry/init.py | Exposes telemetry symbols at the package level. |
| src/panoptes/utils/cli/telemetry.py | Adds Typer commands to run/stop the telemetry server. |
| src/panoptes/utils/cli/main.py | Registers telemetry as a panoptes-utils subcommand. |
| README.md | Documents telemetry installation and usage examples. |
| pyproject.toml | Adds telemetry optional extra and httpx test dependency. |
| CHANGELOG.md | Notes telemetry feature addition (currently with placeholder ref). |
| AGENTS.md | Adds contributor notes and CLI guidance relevant to new commands. |
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot suggestions. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
157ca55 to
d1268a0
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new telemetry subsystem to PANOPTES Utilities, including a local FastAPI server for append-only NDJSON telemetry logging, a small Python client wrapper, and new panoptes-utils telemetry CLI commands, with accompanying tests and documentation.
Changes:
- Introduces
panoptes.utils.telemetryserver/client modules (run context support,/currentsnapshot API, NDJSON persistence). - Adds
panoptes-utils telemetryCLI (run,stop,currentwith optional follow/live display) and wires it into the main CLI with optional-dependency fallback. - Adds tests + documentation (Sphinx page + README updates) and updates dependencies/extras for telemetry support.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_telemetry_server.py | End-to-end API/service tests for events, run handling, NDJSON output, and rotation logic. |
| tests/test_telemetry_client.py | Tests Python client wrappers against an in-process FastAPI TestClient. |
| tests/test_telemetry_cli.py | Tests Typer CLI output, follow behavior, and verbose flag wiring using fakes. |
| src/panoptes/utils/telemetry/server.py | Implements TelemetryService + FastAPI app + process launcher. |
| src/panoptes/utils/telemetry/client.py | Implements requests-style TelemetryClient wrapper and error handling. |
| src/panoptes/utils/telemetry/init.py | Provides lazy imports and a stable public API surface for telemetry components. |
| src/panoptes/utils/cli/telemetry.py | Adds CLI commands to run/stop server and inspect current telemetry with Rich rendering. |
| src/panoptes/utils/cli/main.py | Registers telemetry subcommand when extras are available; otherwise provides a placeholder/help message. |
| src/panoptes/utils/cli/image.py | Switches user-facing output to Rich print to match CLI conventions. |
| README.md | Documents telemetry install/use and updates CLI help references. |
| pyproject.toml | Adds telemetry optional extra (fastapi/uvicorn), adds httpx for tests, and adds rich dependency. |
| docs/telemetry.rst | Adds dedicated telemetry server documentation (CLI/API/examples). |
| docs/index.rst | Adds telemetry page to the Sphinx toctree. |
| CHANGELOG.md | Adds telemetry feature entry and a related fix note. |
You can also share your feedback on Copilot code review. Take the survey.
Small suggestions from copilot. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Adds a telemetry server that would be a replacement for the database utils.