tree-sitter-analyzer 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tree-sitter-analyzer might be problematic. Click here for more details.
- tree_sitter_analyzer-0.1.0/.gitignore +281 -0
- tree_sitter_analyzer-0.1.0/DEPLOYMENT_GUIDE.md +278 -0
- tree_sitter_analyzer-0.1.0/MCP_USAGE_GUIDE.md +269 -0
- tree_sitter_analyzer-0.1.0/PKG-INFO +581 -0
- tree_sitter_analyzer-0.1.0/README.md +487 -0
- tree_sitter_analyzer-0.1.0/WINDOWS_UPLOAD_GUIDE.md +114 -0
- tree_sitter_analyzer-0.1.0/build_standalone.py +125 -0
- tree_sitter_analyzer-0.1.0/examples/BigService.java +1420 -0
- tree_sitter_analyzer-0.1.0/examples/BigService.json +938 -0
- tree_sitter_analyzer-0.1.0/examples/BigService.summary.json +650 -0
- tree_sitter_analyzer-0.1.0/examples/JavaDocTest.java +78 -0
- tree_sitter_analyzer-0.1.0/examples/MultiClass.java +54 -0
- tree_sitter_analyzer-0.1.0/examples/Sample.java +178 -0
- tree_sitter_analyzer-0.1.0/examples/calculate_token_comparison.py +250 -0
- tree_sitter_analyzer-0.1.0/examples/sample.py +260 -0
- tree_sitter_analyzer-0.1.0/pyproject.toml +243 -0
- tree_sitter_analyzer-0.1.0/pytest.ini +34 -0
- tree_sitter_analyzer-0.1.0/tests/__init__.py +5 -0
- tree_sitter_analyzer-0.1.0/tests/conftest.py +154 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/__init__.py +10 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_integration.py +418 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_resources/__init__.py +10 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_resources/test_code_file_resource.py +323 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_resources/test_project_stats_resource.py +484 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_resources/test_resource_integration.py +403 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_server.py +178 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_tools/__init__.py +10 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_tools/test_analyze_scale_tool.py +505 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_tools/test_get_positions_tool.py +251 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_tools/test_read_partial_tool.py +178 -0
- tree_sitter_analyzer-0.1.0/tests/mcp/test_tools/test_table_format_tool.py +381 -0
- tree_sitter_analyzer-0.1.0/tests/test_analyze_scale_tool_cli_compatible.py +621 -0
- tree_sitter_analyzer-0.1.0/tests/test_api.py +531 -0
- tree_sitter_analyzer-0.1.0/tests/test_cli.py +515 -0
- tree_sitter_analyzer-0.1.0/tests/test_cli_comprehensive.py +898 -0
- tree_sitter_analyzer-0.1.0/tests/test_core/test_analysis_engine.py +316 -0
- tree_sitter_analyzer-0.1.0/tests/test_core/test_cache_service.py +306 -0
- tree_sitter_analyzer-0.1.0/tests/test_core/test_engine.py +380 -0
- tree_sitter_analyzer-0.1.0/tests/test_core/test_parser.py +474 -0
- tree_sitter_analyzer-0.1.0/tests/test_core/test_query.py +450 -0
- tree_sitter_analyzer-0.1.0/tests/test_encoding_cache.py +246 -0
- tree_sitter_analyzer-0.1.0/tests/test_encoding_utils.py +391 -0
- tree_sitter_analyzer-0.1.0/tests/test_engine.py +122 -0
- tree_sitter_analyzer-0.1.0/tests/test_exceptions.py +492 -0
- tree_sitter_analyzer-0.1.0/tests/test_interfaces/test_cli_adapter.py +550 -0
- tree_sitter_analyzer-0.1.0/tests/test_interfaces/test_mcp_adapter.py +692 -0
- tree_sitter_analyzer-0.1.0/tests/test_interfaces_cli.py +689 -0
- tree_sitter_analyzer-0.1.0/tests/test_interfaces_mcp_server.py +407 -0
- tree_sitter_analyzer-0.1.0/tests/test_intermediate_files_management.py +623 -0
- tree_sitter_analyzer-0.1.0/tests/test_java_analyzer.py +121 -0
- tree_sitter_analyzer-0.1.0/tests/test_java_analyzer_extended.py +485 -0
- tree_sitter_analyzer-0.1.0/tests/test_java_plugin_coverage.py +327 -0
- tree_sitter_analyzer-0.1.0/tests/test_java_structure_analyzer.py +772 -0
- tree_sitter_analyzer-0.1.0/tests/test_javascript_plugin_extended.py +455 -0
- tree_sitter_analyzer-0.1.0/tests/test_language_detector.py +153 -0
- tree_sitter_analyzer-0.1.0/tests/test_language_detector_extended.py +479 -0
- tree_sitter_analyzer-0.1.0/tests/test_language_loader.py +170 -0
- tree_sitter_analyzer-0.1.0/tests/test_languages/test_java_plugin.py +572 -0
- tree_sitter_analyzer-0.1.0/tests/test_languages/test_python_plugin.py +763 -0
- tree_sitter_analyzer-0.1.0/tests/test_main_entry.py +40 -0
- tree_sitter_analyzer-0.1.0/tests/test_mcp_server.py +256 -0
- tree_sitter_analyzer-0.1.0/tests/test_output_manager.py +358 -0
- tree_sitter_analyzer-0.1.0/tests/test_partial_reading.py +283 -0
- tree_sitter_analyzer-0.1.0/tests/test_plugins/test_manager.py +483 -0
- tree_sitter_analyzer-0.1.0/tests/test_plugins/test_registry.py +453 -0
- tree_sitter_analyzer-0.1.0/tests/test_plugins.py +326 -0
- tree_sitter_analyzer-0.1.0/tests/test_plugins_base.py +517 -0
- tree_sitter_analyzer-0.1.0/tests/test_plugins_coverage.py +330 -0
- tree_sitter_analyzer-0.1.0/tests/test_plugins_fixed.py +202 -0
- tree_sitter_analyzer-0.1.0/tests/test_python_plugin_comprehensive.py +948 -0
- tree_sitter_analyzer-0.1.0/tests/test_python_plugin_coverage.py +83 -0
- tree_sitter_analyzer-0.1.0/tests/test_queries_java.py +189 -0
- tree_sitter_analyzer-0.1.0/tests/test_queries_javascript.py +138 -0
- tree_sitter_analyzer-0.1.0/tests/test_queries_python.py +144 -0
- tree_sitter_analyzer-0.1.0/tests/test_query_library_coverage.py +153 -0
- tree_sitter_analyzer-0.1.0/tests/test_query_loader.py +265 -0
- tree_sitter_analyzer-0.1.0/tests/test_table_formatter.py +648 -0
- tree_sitter_analyzer-0.1.0/tests/test_utils.py +345 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/__init__.py +121 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/__main__.py +12 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/api.py +539 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/__init__.py +39 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/__main__.py +13 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/__init__.py +27 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/advanced_command.py +88 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/base_command.py +155 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/default_command.py +19 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/partial_read_command.py +133 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/query_command.py +82 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/structure_command.py +121 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/summary_command.py +93 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/commands/table_command.py +233 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli/info_commands.py +121 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/cli_main.py +276 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/core/__init__.py +20 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/core/analysis_engine.py +574 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/core/cache_service.py +330 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/core/engine.py +560 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/core/parser.py +288 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/core/query.py +502 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/encoding_utils.py +460 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/exceptions.py +340 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/file_handler.py +222 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/formatters/__init__.py +1 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/formatters/base_formatter.py +168 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/formatters/formatter_factory.py +74 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/formatters/java_formatter.py +270 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/formatters/python_formatter.py +235 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/interfaces/__init__.py +10 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/interfaces/cli.py +557 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/interfaces/cli_adapter.py +319 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/interfaces/mcp_adapter.py +170 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/interfaces/mcp_server.py +416 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/java_analyzer.py +219 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/language_detector.py +400 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/language_loader.py +228 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/languages/__init__.py +11 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/languages/java_plugin.py +1113 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/languages/python_plugin.py +712 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/__init__.py +32 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/resources/__init__.py +47 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/resources/code_file_resource.py +213 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/resources/project_stats_resource.py +550 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/server.py +319 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/__init__.py +36 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py +558 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py +245 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/base_tool.py +55 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/get_positions_tool.py +448 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/read_partial_tool.py +302 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/table_format_tool.py +359 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py +476 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/utils/__init__.py +106 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/mcp/utils/error_handler.py +549 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/models.py +481 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/output_manager.py +264 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/__init__.py +334 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/base.py +446 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/java_plugin.py +625 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/javascript_plugin.py +439 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/manager.py +355 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/plugin_loader.py +83 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/python_plugin.py +598 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/plugins/registry.py +366 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/queries/__init__.py +27 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/queries/java.py +394 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/queries/javascript.py +149 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/queries/python.py +286 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/queries/typescript.py +230 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/query_loader.py +260 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/table_formatter.py +448 -0
- tree_sitter_analyzer-0.1.0/tree_sitter_analyzer/utils.py +201 -0
- tree_sitter_analyzer-0.1.0/upload_to_pypi.py +144 -0
- tree_sitter_analyzer-0.1.0/upload_to_pypi_windows_fix.py +185 -0
- tree_sitter_analyzer-0.1.0/uv.lock +1277 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be added to the global gitignore or merged into this project gitignore. For a PyCharm
|
|
158
|
+
# project, it is recommended to use the following settings for the Project Structure:
|
|
159
|
+
# File | Settings | Project Structure | Add Content Root | Exclude files | *.pyc
|
|
160
|
+
.idea/
|
|
161
|
+
|
|
162
|
+
# VS Code
|
|
163
|
+
.vscode/
|
|
164
|
+
*.code-workspace
|
|
165
|
+
|
|
166
|
+
# Local History for Visual Studio Code
|
|
167
|
+
.history/
|
|
168
|
+
|
|
169
|
+
# Built Visual Studio Code Extensions
|
|
170
|
+
*.vsix
|
|
171
|
+
|
|
172
|
+
# macOS
|
|
173
|
+
.DS_Store
|
|
174
|
+
.AppleDouble
|
|
175
|
+
.LSOverride
|
|
176
|
+
|
|
177
|
+
# Icon must end with two \r
|
|
178
|
+
Icon
|
|
179
|
+
|
|
180
|
+
# Thumbnails
|
|
181
|
+
._*
|
|
182
|
+
|
|
183
|
+
# Files that might appear in the root of a volume
|
|
184
|
+
.DocumentRevisions-V100
|
|
185
|
+
.fseventsd
|
|
186
|
+
.Spotlight-V100
|
|
187
|
+
.TemporaryItems
|
|
188
|
+
.Trashes
|
|
189
|
+
.VolumeIcon.icns
|
|
190
|
+
.com.apple.timemachine.donotpresent
|
|
191
|
+
|
|
192
|
+
# Directories potentially created on remote AFP share
|
|
193
|
+
.AppleDB
|
|
194
|
+
.AppleDesktop
|
|
195
|
+
Network Trash Folder
|
|
196
|
+
Temporary Items
|
|
197
|
+
.apdisk
|
|
198
|
+
|
|
199
|
+
# Windows
|
|
200
|
+
Thumbs.db
|
|
201
|
+
Thumbs.db:encryptable
|
|
202
|
+
ehthumbs.db
|
|
203
|
+
ehthumbs_vista.db
|
|
204
|
+
|
|
205
|
+
# Dump file
|
|
206
|
+
*.stackdump
|
|
207
|
+
|
|
208
|
+
# Folder config file
|
|
209
|
+
[Dd]esktop.ini
|
|
210
|
+
|
|
211
|
+
# Recycle Bin used on file shares
|
|
212
|
+
$RECYCLE.BIN/
|
|
213
|
+
|
|
214
|
+
# Windows Installer files
|
|
215
|
+
*.cab
|
|
216
|
+
*.msi
|
|
217
|
+
*.msix
|
|
218
|
+
*.msm
|
|
219
|
+
*.msp
|
|
220
|
+
|
|
221
|
+
# Windows shortcuts
|
|
222
|
+
*.lnk
|
|
223
|
+
|
|
224
|
+
# Linux
|
|
225
|
+
*~
|
|
226
|
+
|
|
227
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
228
|
+
.fuse_hidden*
|
|
229
|
+
|
|
230
|
+
# KDE directory preferences
|
|
231
|
+
.directory
|
|
232
|
+
|
|
233
|
+
# Linux trash folder which might appear on any partition or disk
|
|
234
|
+
.Trash-*
|
|
235
|
+
|
|
236
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
237
|
+
.nfs*
|
|
238
|
+
|
|
239
|
+
# Project specific files
|
|
240
|
+
error.log
|
|
241
|
+
*.log
|
|
242
|
+
input_handler.py
|
|
243
|
+
prompt_config.json
|
|
244
|
+
user_input_prompt.md
|
|
245
|
+
ISSUE_TRACKING.md
|
|
246
|
+
OPTIMIZATION_REPORT.md
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
# Development and temporary files
|
|
250
|
+
prompt_history/
|
|
251
|
+
temp/
|
|
252
|
+
tmp/
|
|
253
|
+
.temp/
|
|
254
|
+
|
|
255
|
+
# Tree-sitter specific
|
|
256
|
+
tree-sitter-*/
|
|
257
|
+
*.so
|
|
258
|
+
*.dylib
|
|
259
|
+
*.dll
|
|
260
|
+
|
|
261
|
+
# UV lock file (keep uv.lock for reproducible builds)
|
|
262
|
+
# uv.lock
|
|
263
|
+
|
|
264
|
+
# Benchmark and performance files
|
|
265
|
+
benchmark_results/
|
|
266
|
+
performance_data/
|
|
267
|
+
|
|
268
|
+
# Local configuration files
|
|
269
|
+
local_config.py
|
|
270
|
+
local_settings.py
|
|
271
|
+
.local/
|
|
272
|
+
|
|
273
|
+
# Editor backup files
|
|
274
|
+
*~
|
|
275
|
+
*.swp
|
|
276
|
+
*.swo
|
|
277
|
+
*#
|
|
278
|
+
.#*
|
|
279
|
+
|
|
280
|
+
# Compiled tree-sitter parsers
|
|
281
|
+
parsers/
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# Tree-sitter Analyzer デプロイメントガイド
|
|
2
|
+
|
|
3
|
+
このガイドでは、tree-sitter-analyzerをPyPIに登録し、スタンドアロン実行ファイルを作成する手順を説明します。
|
|
4
|
+
|
|
5
|
+
## 目次
|
|
6
|
+
|
|
7
|
+
1. [PyPIへの登録](#pypiへの登録)
|
|
8
|
+
2. [スタンドアロン実行ファイルの作成](#スタンドアロン実行ファイルの作成)
|
|
9
|
+
3. [ユーザー向けインストール手順](#ユーザー向けインストール手順)
|
|
10
|
+
|
|
11
|
+
## PyPIへの登録
|
|
12
|
+
|
|
13
|
+
### 前提条件
|
|
14
|
+
|
|
15
|
+
1. PyPIアカウントの作成
|
|
16
|
+
- [PyPI](https://pypi.org/account/register/) でアカウントを作成
|
|
17
|
+
- [TestPyPI](https://test.pypi.org/account/register/) でテスト用アカウントを作成
|
|
18
|
+
|
|
19
|
+
2. API トークンの設定
|
|
20
|
+
```bash
|
|
21
|
+
# PyPI用
|
|
22
|
+
python -m pip install --upgrade pip
|
|
23
|
+
python -m pip install --upgrade build twine
|
|
24
|
+
|
|
25
|
+
# 認証情報の設定(~/.pypirc)
|
|
26
|
+
[distutils]
|
|
27
|
+
index-servers =
|
|
28
|
+
pypi
|
|
29
|
+
testpypi
|
|
30
|
+
|
|
31
|
+
[pypi]
|
|
32
|
+
username = __token__
|
|
33
|
+
password = <your-pypi-api-token>
|
|
34
|
+
|
|
35
|
+
[testpypi]
|
|
36
|
+
repository = https://test.pypi.org/legacy/
|
|
37
|
+
username = __token__
|
|
38
|
+
password = <your-testpypi-api-token>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### アップロード手順
|
|
42
|
+
|
|
43
|
+
#### 方法1: 自動スクリプトを使用
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# アップロードスクリプトを実行
|
|
47
|
+
python upload_to_pypi.py
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
このスクリプトは以下を自動実行します:
|
|
51
|
+
- 必要なツールのインストール
|
|
52
|
+
- パッケージのビルド
|
|
53
|
+
- 整合性チェック
|
|
54
|
+
- TestPyPI または PyPI へのアップロード
|
|
55
|
+
|
|
56
|
+
#### 方法2: 手動実行
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# 1. 依存関係のインストール
|
|
60
|
+
pip install build twine
|
|
61
|
+
|
|
62
|
+
# 2. パッケージのビルド
|
|
63
|
+
python -m build
|
|
64
|
+
|
|
65
|
+
# 3. パッケージの検証
|
|
66
|
+
python -m twine check dist/*
|
|
67
|
+
|
|
68
|
+
# 4. TestPyPIにアップロード(テスト用)
|
|
69
|
+
python -m twine upload --repository testpypi dist/*
|
|
70
|
+
|
|
71
|
+
# 5. 本番PyPIにアップロード
|
|
72
|
+
python -m twine upload dist/*
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### アップロード後の確認
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# TestPyPIからのインストールテスト
|
|
79
|
+
pip install --index-url https://test.pypi.org/simple/ tree-sitter-analyzer
|
|
80
|
+
|
|
81
|
+
# 本番PyPIからのインストール
|
|
82
|
+
pip install tree-sitter-analyzer
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## スタンドアロン実行ファイルの作成
|
|
86
|
+
|
|
87
|
+
Python環境がないユーザーでも使用できるスタンドアロン実行ファイルを作成できます。
|
|
88
|
+
|
|
89
|
+
### 前提条件
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# PyInstallerのインストール
|
|
93
|
+
pip install pyinstaller
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### ビルド手順
|
|
97
|
+
|
|
98
|
+
#### 方法1: 自動スクリプトを使用
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# スタンドアロンビルドスクリプトを実行
|
|
102
|
+
python build_standalone.py
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### 方法2: 手動実行
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# 1. PyInstallerのインストール
|
|
109
|
+
pip install pyinstaller
|
|
110
|
+
|
|
111
|
+
# 2. 実行ファイルの作成
|
|
112
|
+
pyinstaller --onefile --name tree-sitter-analyzer tree_sitter_analyzer/cli_main.py
|
|
113
|
+
|
|
114
|
+
# 3. 必要なデータファイルを含める場合
|
|
115
|
+
pyinstaller --onefile --name tree-sitter-analyzer \
|
|
116
|
+
--add-data "tree_sitter_analyzer/queries:tree_sitter_analyzer/queries" \
|
|
117
|
+
tree_sitter_analyzer/cli_main.py
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 生成されるファイル
|
|
121
|
+
|
|
122
|
+
- Windows: `dist/tree-sitter-analyzer.exe`
|
|
123
|
+
- Linux/macOS: `dist/tree-sitter-analyzer`
|
|
124
|
+
|
|
125
|
+
### 使用方法
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Windows
|
|
129
|
+
./dist/tree-sitter-analyzer.exe examples/Sample.java --advanced
|
|
130
|
+
|
|
131
|
+
# Linux/macOS
|
|
132
|
+
./dist/tree-sitter-analyzer examples/Sample.java --advanced
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## ユーザー向けインストール手順
|
|
136
|
+
|
|
137
|
+
### Python環境がある場合
|
|
138
|
+
|
|
139
|
+
#### PyPIからのインストール
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# 基本インストール
|
|
143
|
+
pip install tree-sitter-analyzer
|
|
144
|
+
|
|
145
|
+
# Java サポート付き
|
|
146
|
+
pip install "tree-sitter-analyzer[java]"
|
|
147
|
+
|
|
148
|
+
# 人気言語サポート付き(Java, Python, JavaScript, TypeScript)
|
|
149
|
+
pip install "tree-sitter-analyzer[popular]"
|
|
150
|
+
|
|
151
|
+
# 全言語サポート付き
|
|
152
|
+
pip install "tree-sitter-analyzer[all]"
|
|
153
|
+
|
|
154
|
+
# MCP サーバーサポート付き
|
|
155
|
+
pip install "tree-sitter-analyzer[mcp]"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### uvを使用したインストール(推奨)
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# uvのインストール
|
|
162
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
163
|
+
|
|
164
|
+
# プロジェクトのインストール
|
|
165
|
+
uv add tree-sitter-analyzer
|
|
166
|
+
|
|
167
|
+
# 特定の機能付きインストール
|
|
168
|
+
uv add "tree-sitter-analyzer[popular]"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Python環境がない場合
|
|
172
|
+
|
|
173
|
+
1. **スタンドアロン実行ファイルをダウンロード**
|
|
174
|
+
- GitHubのReleasesページから最新版をダウンロード
|
|
175
|
+
- または、開発者から提供された実行ファイルを使用
|
|
176
|
+
|
|
177
|
+
2. **実行権限の付与(Linux/macOS)**
|
|
178
|
+
```bash
|
|
179
|
+
chmod +x tree-sitter-analyzer
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
3. **使用方法**
|
|
183
|
+
```bash
|
|
184
|
+
# Windows
|
|
185
|
+
tree-sitter-analyzer.exe your-code-file.java --advanced
|
|
186
|
+
|
|
187
|
+
# Linux/macOS
|
|
188
|
+
./tree-sitter-analyzer your-code-file.java --advanced
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## 配布戦略
|
|
192
|
+
|
|
193
|
+
### 1. PyPI配布
|
|
194
|
+
- Python開発者向け
|
|
195
|
+
- 依存関係の自動管理
|
|
196
|
+
- 簡単なインストール
|
|
197
|
+
|
|
198
|
+
### 2. スタンドアロン実行ファイル配布
|
|
199
|
+
- Python環境がないユーザー向け
|
|
200
|
+
- 単一ファイルで完結
|
|
201
|
+
- 依存関係なし
|
|
202
|
+
|
|
203
|
+
### 3. GitHub Releases
|
|
204
|
+
- 両方の配布形式を提供
|
|
205
|
+
- バージョン管理
|
|
206
|
+
- ダウンロード統計
|
|
207
|
+
|
|
208
|
+
## トラブルシューティング
|
|
209
|
+
|
|
210
|
+
### PyPIアップロード時の問題
|
|
211
|
+
|
|
212
|
+
1. **認証エラー**
|
|
213
|
+
```
|
|
214
|
+
解決策: API トークンの確認、~/.pypirc の設定確認
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
2. **パッケージ名の重複**
|
|
218
|
+
```
|
|
219
|
+
解決策: pyproject.toml の name フィールドを変更
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
3. **バージョンの重複**
|
|
223
|
+
```
|
|
224
|
+
解決策: pyproject.toml の version を更新
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### スタンドアロンビルド時の問題
|
|
228
|
+
|
|
229
|
+
1. **モジュールが見つからない**
|
|
230
|
+
```
|
|
231
|
+
解決策: --hidden-import オプションでモジュールを明示的に指定
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
2. **データファイルが含まれない**
|
|
235
|
+
```
|
|
236
|
+
解決策: --add-data オプションでデータファイルを指定
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
3. **実行ファイルサイズが大きい**
|
|
240
|
+
```
|
|
241
|
+
解決策: --exclude-module で不要なモジュールを除外
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## 継続的デプロイメント
|
|
245
|
+
|
|
246
|
+
GitHub Actionsを使用した自動デプロイメントの設定例:
|
|
247
|
+
|
|
248
|
+
```yaml
|
|
249
|
+
# .github/workflows/deploy.yml
|
|
250
|
+
name: Deploy to PyPI
|
|
251
|
+
|
|
252
|
+
on:
|
|
253
|
+
release:
|
|
254
|
+
types: [published]
|
|
255
|
+
|
|
256
|
+
jobs:
|
|
257
|
+
deploy:
|
|
258
|
+
runs-on: ubuntu-latest
|
|
259
|
+
steps:
|
|
260
|
+
- uses: actions/checkout@v3
|
|
261
|
+
- name: Set up Python
|
|
262
|
+
uses: actions/setup-python@v4
|
|
263
|
+
with:
|
|
264
|
+
python-version: '3.10'
|
|
265
|
+
- name: Install dependencies
|
|
266
|
+
run: |
|
|
267
|
+
python -m pip install --upgrade pip
|
|
268
|
+
pip install build twine
|
|
269
|
+
- name: Build package
|
|
270
|
+
run: python -m build
|
|
271
|
+
- name: Publish to PyPI
|
|
272
|
+
env:
|
|
273
|
+
TWINE_USERNAME: __token__
|
|
274
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
275
|
+
run: twine upload dist/*
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
このガイドに従って、tree-sitter-analyzerを効果的に配布し、幅広いユーザーに提供できます。
|