-
Notifications
You must be signed in to change notification settings - Fork 4
[FEAT] enhance FastAPI-fastkit project templates and detection #52
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,12 +17,12 @@ | |
| from pathlib import Path | ||
| from typing import Any, Dict, List | ||
|
|
||
| from fastapi_fastkit.backend.inspector import inspect_fastapi_template | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This import now runs before Useful? React with 👍 / 👎. |
||
|
|
||
| # Add src to path to import fastapi_fastkit modules | ||
| project_root = Path(__file__).parent.parent | ||
| sys.path.insert(0, str(project_root / "src")) | ||
|
|
||
| from fastapi_fastkit.backend.inspector import inspect_fastapi_template | ||
|
|
||
|
|
||
| def get_templates_to_inspect(specific_templates: str = "") -> List[str]: | ||
| """Get list of templates to inspect.""" | ||
|
|
@@ -119,7 +119,7 @@ def main() -> None: | |
| print(f"📋 Found {len(templates)} templates to inspect: {', '.join(templates)}") | ||
| if args.verbose: | ||
| print(f"🔧 Working directory: {os.getcwd()}") | ||
| print(f"📁 Template directory: src/fastapi_fastkit/fastapi_project_template/") | ||
| print("📁 Template directory: src/fastapi_fastkit/fastapi_project_template/") | ||
| print("=" * 60) | ||
|
|
||
| # Inspect each template | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module import occurs before the script appends
src/tosys.path, which causespython scripts/inspect-changed-templates.pyto fail in environments where the package is not preinstalled. That breaks the intended pre-commit/local workflow because the script exits before computing changed templates.Useful? React with 👍 / 👎.