Fix module imports in run-analysis

This commit is contained in:
Jordan Wages 2025-07-19 02:55:15 -05:00
commit 0a05f0c010
3 changed files with 7 additions and 6 deletions

View file

@ -20,13 +20,13 @@ fi
# Run analysis helpers # Run analysis helpers
echo "[INFO] Checking for missing domains..." echo "[INFO] Checking for missing domains..."
python scripts/analyze.py check-missing-domains python -m scripts.analyze check-missing-domains
echo "[INFO] Suggesting cache improvements..." echo "[INFO] Suggesting cache improvements..."
python scripts/analyze.py suggest-cache python -m scripts.analyze suggest-cache
echo "[INFO] Detecting threats..." echo "[INFO] Detecting threats..."
python scripts/analyze.py detect-threats python -m scripts.analyze detect-threats
# Deactivate to keep cron environment clean # Deactivate to keep cron environment clean
if type deactivate >/dev/null 2>&1; then if type deactivate >/dev/null 2>&1; then

1
scripts/__init__.py Normal file
View file

@ -0,0 +1 @@
"Utility package for ngxstat scripts"

View file

@ -26,7 +26,7 @@ def test_script_invokes_commands(tmp_path):
lines = calls.read_text().strip().splitlines() lines = calls.read_text().strip().splitlines()
assert lines == [ assert lines == [
"scripts/analyze.py check-missing-domains", "-m scripts.analyze check-missing-domains",
"scripts/analyze.py suggest-cache", "-m scripts.analyze suggest-cache",
"scripts/analyze.py detect-threats", "-m scripts.analyze detect-threats",
] ]