Skip to content

client: names in compact output when listing resources#1443

Open
flxzt wants to merge 1 commit into
labgrid-project:masterfrom
flxzt:list-resources-names
Open

client: names in compact output when listing resources#1443
flxzt wants to merge 1 commit into
labgrid-project:masterfrom
flxzt:list-resources-names

Conversation

@flxzt
Copy link
Copy Markdown
Contributor

@flxzt flxzt commented Jul 15, 2024

Description

This adds that resources names are printed in the compact output of the labgrid-client resources command.

For example, instead of:

exporter-01/usbhub-p01/NetworkSerialPort
exporter-01/usbhub-p01/NetworkSerialPort

the output becomes

exporter-01/usbhub-p01/NetworkSerialPort[/modbus]
exporter-01/usbhub-p01/NetworkSerialPort[/serial-115200]

which makes it easier to differentiate between resources that have the same class.

The alternative would be to enable verbose printing with labgrid-client -v resources, but that adds a lot of other information and makes is quite hard to pick out the name quickly.

At least in my experience the resource name is the only info that I need 95% of the time, so I think it would be beneficial to add it to the default output.

What do you think?

  • PR has been tested

@Bastian-Krause
Copy link
Copy Markdown
Member

Sounds good. Is there a special reason for the square brackets? I would just drop them, so the match can be copy & pasted into labgrid-client add-match <match> directly.

@flxzt
Copy link
Copy Markdown
Contributor Author

flxzt commented Jul 18, 2024

I went with the brackets because they indicate that the name is optional when adding as a match and for consistency to the verbose output.

I don't have a strong opinion about either, should the verbose output be changed as well?

@flxzt flxzt force-pushed the list-resources-names branch from d2a0acb to b17f570 Compare August 19, 2024 08:25
@flxzt
Copy link
Copy Markdown
Contributor Author

flxzt commented Feb 5, 2026

I would appreciate feedback here.

Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com>
@flxzt flxzt force-pushed the list-resources-names branch from b17f570 to 37d7d22 Compare June 1, 2026 14:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.0%. Comparing base (5818762) to head (37d7d22).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/remote/client.py 0.0% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1443   +/-   ##
======================================
  Coverage    46.0%   46.0%           
======================================
  Files         180     180           
  Lines       14462   14462           
======================================
  Hits         6654    6654           
  Misses       7808    7808           
Flag Coverage Δ
3.10 46.0% <0.0%> (ø)
3.11 46.0% <0.0%> (ø)
3.12 ?
3.13 45.9% <0.0%> (ø)
3.14 45.9% <0.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants