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

CLI: normalize use of colors #5547

Merged
merged 1 commit into from
May 30, 2022
Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented May 30, 2022

Fixes #5542

Certain CLI commands used coloring in the output that was inconsistent
with what users might expect based on other parts of the CLI and basic
intuition. For example, red was sometimes used to highlight a purely
informative piece of data or a header, but red is typically associated
with errors.

To normalize the use of colors, all uses of it use the COLORS mapping
from the aiida.cmdline.utils.echo module and instead of naming the
literal color, it designates the intended meaning.

Certain CLI commands used coloring in the output that was inconsistent
with what users might expect based on other parts of the CLI and basic
intuition. For example, red was sometimes used to highlight a purely
informative piece of data or a header, but red is typically associated
with errors.

To normalize the use of colors, all uses of it use the `COLORS` mapping
from the `aiida.cmdline.utils.echo` module and instead of naming the
literal color, it designates the intended meaning.
@sphuber sphuber requested a review from ltalirz May 30, 2022 18:09
@sphuber
Copy link
Contributor Author

sphuber commented May 30, 2022

This should address all the inconsistencies in the main code base @ltalirz . Essentially a few cases where red was used where it now uses the more suitable blue.

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

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

Great, thanks @sphuber for taking the time to fix this!

@sphuber sphuber merged commit 8fdc4e4 into aiidateam:main May 30, 2022
@sphuber sphuber deleted the fix/5542/cli-colors branch May 30, 2022 19:45
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.

basic color semantics in cli
2 participants