Python analysis parity with Java (codeanalyzer-python backend)#152
Draft
rahlk wants to merge 3 commits into
Draft
Python analysis parity with Java (codeanalyzer-python backend)#152rahlk wants to merge 3 commits into
rahlk wants to merge 3 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PythonAnalysisas a façade over a newcodeanalyzer-pythonbackend so the Python API surface mirrorsJavaAnalysis(application view, symbol table, call-graph). Single-filesource_codemode is dropped;project_diris now required.cldk/analysis/python/codeanalyzerpackage (backend driver + cache); replacecldk/models/python/models.pywith a structured model package (PyApplication,PyCallable,PyClass,PyClassAttribute,PyComment,PyModule).treesitter_python.pydown to parsing primitives; wire backend selection throughcldk/core.py.uv.lock, droppoetry.toml), add.envrcfor direnv, updatepyproject.toml/.gitignore/README/tests.Closes #137.
Test plan
pytest tests/analysis/python/test_python_analysis.pypytest tests/analysis/python/test_treesitter_python.pyuv sync/uv lockresolve cleanly