Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend formatting options to listen subcommand #539

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

tpoliaw
Copy link
Contributor

@tpoliaw tpoliaw commented Jul 5, 2024

Listen streams a mix of WorkerEvent, ProgressEvent and DataEvent
instances for anything that the server is doing. This extends the type
handling in the format to each of these types to display the relevant
level of information for each.

Informational messages are changed to be printed to stderr so that the
main stdout output can be piped to an external application (eg jq for
json mode).

Copy link
Collaborator

@callumforrester callumforrester left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.50%. Comparing base (b3b3f0b) to head (f335fc1).

Files Patch % Lines
src/blueapi/cli/cli.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
+ Coverage   91.32%   91.50%   +0.17%     
==========================================
  Files          41       41              
  Lines        1880     1906      +26     
==========================================
+ Hits         1717     1744      +27     
+ Misses        163      162       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tpoliaw tpoliaw force-pushed the listen_format branch 2 times, most recently from f335fc1 to 8c688a0 Compare July 10, 2024 09:57
Listen streams a mix of WorkerEvent, ProgressEvent and DataEvent
instances for anything that the server is doing. This extends the type
handling in the format to each of these types to display the relevant
level of information for each.

Informational messages are changed to be printed to stderr so that the
main stdout output can be piped to an external application (eg jq for
json mode).
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.

None yet

2 participants