Skip to content

PDF report customization#982

Open
babo989 wants to merge 2 commits into
mainfrom
feat/pdf-report-generator
Open

PDF report customization#982
babo989 wants to merge 2 commits into
mainfrom
feat/pdf-report-generator

Conversation

@babo989

@babo989 babo989 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Added customization popup. Worked on aesthetics of the report @jeremyszym

@sonnyp sonnyp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add justfile
Make the root justfile run the justfile of reporter

Use uv and pyprojects for dependencies
Remove requirements.txt

Look at "segmenter" or "controller" for inspiration.

So that reporter is setup with the rest of the system and user doesn't need to figure out the commands to run

Also add a README.md - similar to segmenter/README.md - with the API documented.

Comment thread reporter/planktoscope-reporter.service Outdated
Comment on lines +10 to +11
# Dedicated reporter venv (created with: uv venv /opt/PlanktoScope/reporter/.venv).
ExecStart=/opt/PlanktoScope/reporter/.venv/bin/python /opt/PlanktoScope/reporter/report_generator.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExecStart=/usr/local/bin/uv run main.py

Comment thread reporter/report_generator.py Outdated
from pathlib import Path

import numpy as np
import paho.mqtt.client as mqtt

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use aiomqtt

asyncio for the win

You can get inspiration from bubbler/main.py for how to use.

- Add pyproject.toml and uv.lock, and remove requirements.txt (modeled on segmenter/)
- Add reporter/justfile for setup/testing and wire it into the root justfile
- Add reporter/README.md documenting the MQTT API payload shapes and responses
- Rename report_generator.py to main.py and update planktoscope-org.reporter.service
- Rewrite MQTT layer using aiomqtt/asyncio, running PDF rendering in asyncio.to_thread
- Verify on-device execution, service startup, and full MQTT round-trip PDF generation

Thanks @sonnyp — all addressed in this push.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants