-
Notifications
You must be signed in to change notification settings - Fork 3
feat(suggest): add Python dependency parser for deep framework detection #304
Copy link
Copy link
Open
Labels
Description
Context
The current detection system is heavily oriented around package.json for dependency scanning. Python projects use pyproject.toml, requirements.txt, Pipfile, or setup.py — none of which are parsed for dependency names today. This blocks proper detection of Django, Flask, FastAPI, Pytest, LangChain, OpenAI, PyTorch, TensorFlow, and many more.
Proposal
Add Python dependency parsing analogous to collect_package_names for package.json:
New parsers needed in detect.rs:
parse_requirements_txt— Line-by-line, strip version specifiers (django>=4.0→django)parse_pyproject_toml_deps— Parse[project.dependencies]and[project.optional-dependencies]frompyproject.tomlparse_pipfile_deps(optional) — Parse[packages]and[dev-packages]fromPipfile
New detection field:
Either add a python_packages detection method or reuse config_file_content with smarter patterns.
Technologies This Unlocks
| Technology | Python Package |
|---|---|
| Django | django |
| Flask | flask |
| FastAPI | fastapi |
| Pytest | pytest |
| LangChain | langchain |
| OpenAI | openai |
| PyTorch | torch |
| TensorFlow | tensorflow |
Acceptance Criteria
-
requirements.txtdependencies are parsed and matched -
pyproject.tomldependencies are parsed and matched - Django/Flask/FastAPI detected in respective projects
- Unit tests for each parser
-
cargo test suggestpasses
Reactions are currently unavailable