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

Make Breeze help generation indepdent from having breeze installed #23612

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions scripts/ci/pre_commit/pre_commit_breeze_cmd_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

AIRFLOW_SOURCES_DIR = Path(__file__).parents[3].absolute()
BREEZE_IMAGES_DIR = AIRFLOW_SOURCES_DIR / "images" / "breeze"
BREEZE_SOURCES_DIR = AIRFLOW_SOURCES_DIR / "dev" / "breeze" / "src"
BREEZE_INSTALL_DIR = AIRFLOW_SOURCES_DIR / "dev" / "breeze"
BREEZE_SOURCES_DIR = BREEZE_INSTALL_DIR / "src"

SCREENSHOT_WIDTH = "120"

Expand Down Expand Up @@ -66,11 +67,7 @@ def print_help_for_all_commands():
if old_hash == new_hash:
console.print(f"[bright_blue]Skip generation of SVG images as command hash is unchanged {old_hash}")
return
if run(["breeze", "--help"], check=False).returncode != 0:
console.print("[red]ERROR! You need to install breeze with pipx to run this pre-commit[/]")
console.print("\n[bright_blue]Run this command:[/]\n")
console.print(" pip install -e ./dev/breeze --force\n")
sys.exit(1)
run([sys.executable, "-m", "pip", "install", "--upgrade", "-e", BREEZE_INSTALL_DIR])
env = os.environ.copy()
env['AIRFLOW_SOURCES_ROOT'] = str(AIRFLOW_SOURCES_DIR)
env['RECORD_BREEZE_WIDTH'] = SCREENSHOT_WIDTH
Expand Down