Skip to content

Commit

Permalink
update erd
Browse files Browse the repository at this point in the history
  • Loading branch information
dennysrega1ado committed Sep 21, 2024
1 parent c6e2348 commit 69feac6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
8 changes: 4 additions & 4 deletions docs/apache-airflow/img/airflow_erd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 0 additions & 21 deletions scripts/ci/pre_commit/generate_er_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,6 @@
from rich.console import Console

SVG_FILE = Path("docs") / "apache-airflow" / "img" / "airflow_erd.svg"
MARKDOWN_FILE = "README.md"

def inject_mermaid_diagram():
console = Console(width=400, color_system="standard")
try:
paracelsus_process = subprocess.run(
['paracelsus', 'inject', MARKDOWN_FILE, 'airflow.models.base:Base', '--import-module', 'airflow.models:*'],
capture_output=True,
text=True
)
if paracelsus_process.returncode != 0:
console.print("[red]Error running paracelsus command:", paracelsus_process.stderr)
return

console.print(f"[green]The mermaid diagram was injecte in {MARKDOWN_FILE}. Please commit the changes!")
except FileNotFoundError as fnf_error:
console.print("[red]Command not found:", fnf_error)
except Exception as e:
console.print("An error occurred:", str(e))


def generate_svg():
console = Console(width=400, color_system="standard")
Expand Down Expand Up @@ -92,4 +72,3 @@ def generate_svg():

if __name__ == "__main__":
generate_svg()
inject_mermaid_diagram()

0 comments on commit 69feac6

Please sign in to comment.