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

Coloring the JobApiError in red #87

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Coloring the JobApiError in red #87

merged 2 commits into from
Nov 12, 2024

Conversation

BrunoLiegiBastonLiegi
Copy link
Contributor

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi commented Nov 7, 2024

As per title. Other things might be considered to improve readability, not sure which though...
Probably the error messages could be improved, but qibo-client is not responsible for that, as the JobApiError just repeats the response received.

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (99609be) to head (0b3119d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #87   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          242       242           
=========================================
  Hits           242       242           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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.

@alecandido
Copy link
Member

I already proposed it for tables, but I will try again: instead of formatting manually, you can use rich which makes the task much easier :)

@BrunoLiegiBastonLiegi
Copy link
Contributor Author

But is it worth to add a dependency just for coloring some errors in red?

@alecandido
Copy link
Member

rich is a very popular and stable dep. For coloring red, maybe it'd not be worth.

However, this package is generally taking care of UI (either coloring, printing tables, and possibly more).
So, if you do not care about UI, you should just keep it simple, and log in the simplest way. But, if you care, my advice would be not doing it manually, because it's time-consuming (and there is a very reliable dep doing it for you, and almost dependency-less).

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi marked this pull request as ready for review November 11, 2024 14:15
Copy link
Member

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

@scarrazza scarrazza merged commit 419ee5c into main Nov 12, 2024
19 checks passed
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.

3 participants