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

Add colors in help outputs of Airfow CLI commands #28789

Closed
1 task done
potiuk opened this issue Jan 7, 2023 · 6 comments · Fixed by #29116
Closed
1 task done

Add colors in help outputs of Airfow CLI commands #28789

potiuk opened this issue Jan 7, 2023 · 6 comments · Fixed by #29116
Labels
good first issue kind:meta High-level information important to the community

Comments

@potiuk
Copy link
Member

potiuk commented Jan 7, 2023

Body

Folowing up after #22613 (comment) - seems that there is a new rich-argparse project that might give us the option without rewriting Airflow's argument parsing to click (click has a number of possible performance issues that might impact airlfow's speed of CLI command parsing)

Seems this might be rather easy thing to do (just adding the formatter class for argparse).

Would be nice if someone implements it and tests (also for performance of CLI).

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@potiuk potiuk added good first issue kind:meta High-level information important to the community labels Jan 7, 2023
@Bowrna
Copy link
Contributor

Bowrna commented Jan 8, 2023

@potiuk Could I try my hands on a few CLI commands to use rich-argparse?

@potiuk
Copy link
Member Author

potiuk commented Jan 8, 2023

Sure. But I guess it will be "all-or-nothing"

@Bowrna
Copy link
Contributor

Bowrna commented Jan 12, 2023

@potiuk Do you mean that it should be done either for all the CLI commands or for nothing? Am i right?

@potiuk
Copy link
Member Author

potiuk commented Jan 12, 2023

I believe so. This is what rich-argparse promises at least. Change formatter and all your commands will get colour.

@loulsb
Copy link
Contributor

loulsb commented Jan 23, 2023

@potiuk I would like to work on this. Any advice on where to start?

@potiuk
Copy link
Member Author

potiuk commented Jan 23, 2023

Just here and see if you can apply it to all argparse https://github.com/hamdanal/rich-argparse

loulsb added a commit to loulsb/airflow that referenced this issue Jan 23, 2023
potiuk pushed a commit that referenced this issue Feb 8, 2023
* Add colors in help outputs of Airfow CLI commands #28789

* Fix cli tests

* Delete line from previous format_action  method

* Fix TypeError when printing a proxy

* Don't use private rich_argparse method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue kind:meta High-level information important to the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants