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

Merged
merged 10 commits into from
Sep 9, 2024
Merged

Extend formatting options to listen subcommand #539

merged 10 commits into from
Sep 9, 2024

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 92.66%. Comparing base (0760630) to head (d5f993d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/blueapi/cli/cli.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
+ Coverage   92.48%   92.66%   +0.17%     
==========================================
  Files          35       35              
  Lines        1637     1663      +26     
==========================================
+ Hits         1514     1541      +27     
+ Misses        123      122       -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 aa5a0eb to 6e15a10 Compare September 9, 2024 11:49
tpoliaw and others added 8 commits September 9, 2024 15:37
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).
f'{Foo.A}' uses str.__format__ in 3.10 but enum.__format__ in 3.11+.
Use the name attribute to work with the string directly to ensure the
same behaviour in both environments.
@tpoliaw tpoliaw merged commit 07c273f into main Sep 9, 2024
26 checks passed
@tpoliaw tpoliaw deleted the listen_format branch September 9, 2024 16:08
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