Skip to content

Commit

Permalink
Refactor verify_dependencies function: dynamically load dependencies …
Browse files Browse the repository at this point in the history
…from requirements.txt for improved accuracy and maintainability
  • Loading branch information
Your Name committed May 12, 2025
1 parent aa6f216 commit 6fbd794
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions scripts/lambda_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,10 @@ def verify_dependencies():
run_command("python3 -c 'import sys; print(sys.path)'")

# Check key dependencies
dependencies = [
"jinja2",
"github", # PyGithub
"pydantic",
"boto3",
"template_automation"
]
dependencies = []
with open(f"{TMP_DIR}/requirements.txt") as f:
dependencies = [line.strip().split("=")[0] for line in f if line.strip() and not line.startswith("#")]


for dep in dependencies:
cmd = f"python3 -c 'import {dep}; print(f\"{dep} installed successfully\")' || echo '{dep} not installed correctly'"
Expand Down

0 comments on commit 6fbd794

Please sign in to comment.