-
Notifications
You must be signed in to change notification settings - Fork 0
✨ Analyser CLI #11
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
✨ Analyser CLI #11
Conversation
1d8c47c
to
2ccc027
Compare
Default for marker should be
while it should be
There a couple of use case of the analyzer and the downstream consumers do not know what use case is extracted.
Use cases:
An example output json can look like: [
{
"filepath": "tests/data/anchors/dummy_1.cpp",
"remote_url": "https://github.com/useblocks/sphinx-codelinks/blob/f2d8d98ca10361663191c4c96255f39db9b5f518/tests/data/anchors/dummy_1.cpp#L3",
"source_map": {
"start": {
"row": 10,
"column": 3
},
"end": {
"row": 13,
"column": 16
}
},
"marker": "@req-id:",
"type": "need-id-refs",
"need_ids": ["need_001", "need_002", "need_003", "need_004"]
},
{
"filepath": "tests/data/anchors/dummy_1.cpp",
"remote_url": "https://github.com/useblocks/sphinx-codelinks/blob/f2d8d98ca10361663191c4c96255f39db9b5f518/tests/data/anchors/dummy_1.cpp#L3",
"source_map": {
"start": {
"row": 20,
"column": 3
},
"end": {
"row": 26,
"column": 15
}
},
"type": "need",
"need": {
"id": "TEST_001",
"type": "test",
"title": "Test a function"
}
},
{
"filepath": "tests/data/anchors/dummy_1.cpp",
"remote_url": "https://github.com/useblocks/sphinx-codelinks/blob/f2d8d98ca10361663191c4c96255f39db9b5f518/tests/data/anchors/dummy_1.cpp#L3",
"source_map": {
"start": {
"row": 30,
"column": 3
},
"end": {
"row": 35,
"column": 15
}
},
"type": "rst",
"rst": "some paragraph with **bold** text and a \n\n.. test:: Test case\n :id: TEST_002\n This is a test case for the function.\n"
}
]
|
pyproject.toml
Outdated
"tree-sitter-python>=0.23.6", | ||
# Compiling issue on manylinux aarch64 image, so install from git instead of Pypi | ||
# https://github.com/tree-sitter/py-tree-sitter/issues/386#issuecomment-3101430799 | ||
"tree-sitter @ git+https://github.com/tree-sitter/py-tree-sitter", |
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.
unpinned dependency, either pick a release or refer to a commit, document that clang
is required due to this bug, also point out what's wrong.
11f83b5
to
ee18aa3
Compare
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.
Did an online review, looks good for the first version
- integated vdocs to analyse - support three types of markers - export json for other applications - support CLI and API
2cc4126
to
7597687
Compare
Add
Analyzer
:Impemented Anaylzer CLI and API
Extract the scopes such Class and Functions tagged by these markers
CLI can only be used with TOML config file
Remove Virtual Docs and integrate one-line parser into Analyzer
One-line comment pattern is integrated into
Analyzer
as one of the marker typeone-line needs
caching in Virtual Docs is removed and will bring back in the future
Adaption of Sphinx directive
src-trace
using
Analyzer
to extractOne-line needs
Config files of
src-trace
andAnaylzer CLI
are not compatible and will adapt in the future