turbaszek commented on a change in pull request #12218:
URL: https://github.com/apache/airflow/pull/12218#discussion_r520165924
##########
File path: scripts/ci/pre_commit/pre_commit_check_setup_installation.py
##########
@@ -81,32 +85,35 @@ def get_extras_from_docs() -> List[str]:
setup_packages = get_extras_from_setup()
docs_packages = get_extras_from_docs()
- output_table = ""
+ table = Table()
+ table.add_column("NAME", justify="right", style="cyan")
+ table.add_column("SETUP", justify="center", style="magenta")
+ table.add_column("INSTALLATION", justify="center", style="green")
for extras in sorted(setup_packages.keys()):
if not set(setup_packages[extras]).intersection(docs_packages):
- output_table += "| {:20} | {:^10} | {:^10} |\n".format(extras,
"V", "")
+ table.add_row(extras, "V", "")
setup_packages_str = str(setup_packages)
for extras in sorted(docs_packages):
if f"'{extras}'" not in setup_packages_str:
- output_table += "| {:20} | {:^10} | {:^10} |\n".format(extras, "",
"V")
+ table.add_row(extras, "", "V")
- if output_table == "":
+ if table.row_count == 0:
sys.exit(0)
- print(
+ rprint(
f"""
-ERROR
+[red bold]ERROR!![/red bold]
-"EXTRAS_REQUIREMENTS" section in {SETUP_PY_FILE} should be synchronized
-with "Extra Packages" section in documentation file doc/{DOCS_FILE}.
+"EXTRAS_REQUIREMENTS" section in [bold yellow]{SETUP_PY_FILE}[/bold yellow]
should be synchronized
+with "Extra Packages" section in documentation file [bold
yellow]doc/{DOCS_FILE}[/bold yellow].
here is a list of packages that are used but are not documented, or
Review comment:
```suggestion
Here is a list of packages that are used but are not documented, or
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]