Skip to content

Python analysis parity with Java (codeanalyzer-python backend)#152

Draft
rahlk wants to merge 3 commits into
mainfrom
137-feature-request-feature-parity-between-java-and-python-analysis
Draft

Python analysis parity with Java (codeanalyzer-python backend)#152
rahlk wants to merge 3 commits into
mainfrom
137-feature-request-feature-parity-between-java-and-python-analysis

Conversation

@rahlk
Copy link
Copy Markdown
Collaborator

@rahlk rahlk commented May 16, 2026

Summary

  • Rework PythonAnalysis as a façade over a new codeanalyzer-python backend so the Python API surface mirrors JavaAnalysis (application view, symbol table, call-graph). Single-file source_code mode is dropped; project_dir is now required.
  • Add cldk/analysis/python/codeanalyzer package (backend driver + cache); replace cldk/models/python/models.py with a structured model package (PyApplication, PyCallable, PyClass, PyClassAttribute, PyComment, PyModule).
  • Slim treesitter_python.py down to parsing primitives; wire backend selection through cldk/core.py.
  • Tooling: migrate from poetry to uv (uv.lock, drop poetry.toml), add .envrc for direnv, update pyproject.toml/.gitignore/README/tests.

Closes #137.

Test plan

  • pytest tests/analysis/python/test_python_analysis.py
  • pytest tests/analysis/python/test_treesitter_python.py
  • Verify symbol-table and call-graph analysis on a sample Python project
  • Confirm uv sync / uv lock resolve cleanly

rahlk and others added 3 commits July 22, 2025 10:05
Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
Replace the tree-sitter-only PythonAnalysis with a codeanalyzer-python
backend so the Python API surface mirrors JavaAnalysis.

Changes:
- Add cldk/analysis/python/codeanalyzer package (backend driver + cache)
- Rework PythonAnalysis as a façade over codeanalyzer-python with
  application view, symbol table, and call-graph support; drop
  single-file source_code mode (project_dir now required)
- Replace cldk/models/python/models.py with the new model package
  (PyApplication, PyCallable, PyClass, PyClassAttribute, PyComment,
  PyModule, etc.)
- Slim treesitter_python.py down to parsing primitives
- Wire backend selection through cldk/core.py
- Update pyproject.toml, .gitignore, README, and tests accordingly
…hon-analysis' of github.com:codellm-devkit/python-sdk into 137-feature-request-feature-parity-between-java-and-python-analysis

# Conflicts:
#	.github/workflows/release.yml
#	CHANGELOG.md
#	pyproject.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Feature Parity between Java and Python Analysis

1 participant