Fix spec_runner.py path resolution after move to runners/ directory
- spec_runner.py: Update sys.path to add parent directory (auto-claude/) instead of current directory (runners/) so imports work correctly - spec_runner.py: Fix .env file path resolution for the new location - analyzer.py: Add CLI entry point to shim so it works when run as script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
"""Backward compatibility shim - import from analysis.analyzer instead."""
|
"""Backward compatibility shim - import from analysis.analyzer instead."""
|
||||||
|
|
||||||
from analysis.analyzer import * # noqa: F403
|
from analysis.analyzer import * # noqa: F403
|
||||||
|
from analysis.analyzer import main
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Add auto-claude to path
|
# Add auto-claude to path (parent of runners/)
|
||||||
sys.path.insert(0, str(Path(__file__).parent))
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||||
|
|
||||||
# Load .env file
|
# Load .env file
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
env_file = Path(__file__).parent / ".env"
|
env_file = Path(__file__).parent.parent / ".env"
|
||||||
dev_env_file = Path(__file__).parent.parent / "dev" / "auto-claude" / ".env"
|
dev_env_file = Path(__file__).parent.parent.parent / "dev" / "auto-claude" / ".env"
|
||||||
if env_file.exists():
|
if env_file.exists():
|
||||||
load_dotenv(env_file)
|
load_dotenv(env_file)
|
||||||
elif dev_env_file.exists():
|
elif dev_env_file.exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user