sphinx-codelinks 1.4.0__tar.gz → 2.0.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.
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/PKG-INFO +24 -8
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/README.md +4 -2
- sphinx_codelinks-2.0.0/pyproject.toml +95 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/__init__.py +1 -1
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/__init__.py +0 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/analyse.py +869 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/models.py +139 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/multiline_parser.py +656 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/oneline_parser.py +450 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/analyse/preproc/libclang_parser.py +8 -3
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/analyse/preproc/loader.py +4 -4
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/projects.py +33 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/references.py +188 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/analyse/utils.py +681 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/cmd.py +69 -28
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/config.py +391 -94
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/logger.py +8 -7
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/needextend_write.py +27 -10
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/source_discover/__init__.py +0 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/source_discover/config.py +201 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/source_discover/source_discover.py +79 -10
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/__init__.py +0 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/sphinx_extension/debug.py +11 -11
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/directives/__init__.py +0 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/directives/src_trace.py +773 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/sphinx_extension/html_wrapper.py +7 -7
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/need_id_refs.py +226 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/project_analysis.py +257 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/rediscovery.py +728 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/source_tracing.py +470 -0
- sphinx_codelinks-2.0.0/src/sphinx_codelinks/sphinx_extension/string_links.py +126 -0
- sphinx_codelinks-1.4.0/pyproject.toml +0 -182
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/analyse/analyse.py +0 -524
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/analyse/models.py +0 -86
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/analyse/oneline_parser.py +0 -206
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/analyse/projects.py +0 -78
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/analyse/utils.py +0 -523
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/source_discover/config.py +0 -122
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/sphinx_extension/directives/src_trace.py +0 -343
- sphinx_codelinks-1.4.0/src/sphinx_codelinks/sphinx_extension/source_tracing.py +0 -269
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/LICENSE +0 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/analyse/preproc/__init__.py +0 -0
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/analyse/preproc/compile_db.py +1 -1
- {sphinx_codelinks-1.4.0 → sphinx_codelinks-2.0.0}/src/sphinx_codelinks/sphinx_extension/ub_sct.css +0 -0
|
@@ -1,33 +1,47 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sphinx-codelinks
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Fast Source Code Traceability for Sphinx-Needs
|
|
5
5
|
Author-email: team useblocks <info@useblocks.com>
|
|
6
6
|
Maintainer-email: Marco Heinemann <marco.heinemann@useblocks.com>, Jui-Wen Chen <jui-wen.chen@useblocks.com>
|
|
7
|
-
Requires-Python: >=
|
|
7
|
+
Requires-Python: >=3.11,<4
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Requires-Dist: comment-parser>=1.2.4
|
|
11
11
|
Requires-Dist: ignore-python>=0.3.3
|
|
12
|
-
Requires-Dist: typer>=0.16.0
|
|
13
|
-
Requires-Dist: click < 8.2
|
|
12
|
+
Requires-Dist: typer>=0.16.0
|
|
14
13
|
Requires-Dist: jsonschema
|
|
15
14
|
Requires-Dist: sphinx>=7.4,<10
|
|
16
|
-
Requires-Dist: sphinx-needs>=
|
|
15
|
+
Requires-Dist: sphinx-needs>=9.0.0,<10
|
|
16
|
+
Requires-Dist: ub-project>=1.1.0,<2
|
|
17
17
|
Requires-Dist: jinja2
|
|
18
18
|
Requires-Dist: pygments
|
|
19
|
-
Requires-Dist: docutils
|
|
19
|
+
Requires-Dist: docutils>=0.21
|
|
20
20
|
Requires-Dist: tree-sitter-cpp>=0.23.4
|
|
21
21
|
Requires-Dist: giturlparse>=0.12.0
|
|
22
22
|
Requires-Dist: tree-sitter-python>=0.23.6
|
|
23
23
|
Requires-Dist: tree-sitter~=0.25.1
|
|
24
24
|
Requires-Dist: tree-sitter-c-sharp>=0.23.1
|
|
25
|
+
Requires-Dist: tree-sitter-typescript>=0.23.2
|
|
25
26
|
Requires-Dist: tree-sitter-yaml>=0.7.1
|
|
26
27
|
Requires-Dist: tree-sitter-rust>=0.23.0
|
|
27
28
|
Requires-Dist: tree-sitter-go>=0.23.0
|
|
28
29
|
Requires-Dist: tree-sitter-json>=0.24.8
|
|
29
30
|
Requires-Dist: tree-sitter-bash>=0.25.1
|
|
31
|
+
Requires-Dist: furo>=2024.5.6 ; extra == "docs"
|
|
32
|
+
Requires-Dist: myst-parser>=4.0.0 ; extra == "docs"
|
|
33
|
+
Requires-Dist: sphinx-ai-index>=1.0.0,<2 ; extra == "docs"
|
|
34
|
+
Requires-Dist: sphinx-design>=0.6.1 ; extra == "docs"
|
|
35
|
+
Requires-Dist: sphinx-code-tabs>=0.5.5 ; extra == "docs"
|
|
36
|
+
Requires-Dist: sphinxcontrib-typer>=0.9.1 ; extra == "docs"
|
|
37
|
+
Requires-Dist: sphinxcontrib-video>=0.4.1 ; extra == "docs"
|
|
30
38
|
Requires-Dist: libclang>=16 ; extra == "libclang"
|
|
39
|
+
Project-URL: Changelog, https://github.com/useblocks/sphinx-needs/blob/master/packages/sphinx-codelinks/docs/changelog.rst
|
|
40
|
+
Project-URL: Documentation, https://codelinks.useblocks.com
|
|
41
|
+
Project-URL: Homepage, https://codelinks.useblocks.com
|
|
42
|
+
Project-URL: Issues, https://github.com/useblocks/sphinx-needs/issues
|
|
43
|
+
Project-URL: Repository, https://github.com/useblocks/sphinx-needs
|
|
44
|
+
Provides-Extra: docs
|
|
31
45
|
Provides-Extra: libclang
|
|
32
46
|
|
|
33
47
|
# Sphinx CodeLinks
|
|
@@ -51,9 +65,11 @@ Add to your `conf.py`:
|
|
|
51
65
|
|
|
52
66
|
```python
|
|
53
67
|
extensions = ['sphinx_needs', 'sphinx_codelinks']
|
|
54
|
-
src_trace_config_from_toml = "codelinks.toml"
|
|
55
68
|
```
|
|
56
69
|
|
|
70
|
+
Sphinx-CodeLinks reads its configuration from an `ubproject.toml` file next to
|
|
71
|
+
`conf.py` by default (configurable via `src_trace_config_from_toml`).
|
|
72
|
+
|
|
57
73
|
## Documentation
|
|
58
74
|
|
|
59
75
|
Full documentation: https://codelinks.useblocks.com
|
|
@@ -67,5 +83,5 @@ Full documentation: https://codelinks.useblocks.com
|
|
|
67
83
|
|
|
68
84
|
## Development
|
|
69
85
|
|
|
70
|
-
See [Development Guide](docs/
|
|
86
|
+
See [Development Guide](docs/development/) for contributing guidelines.
|
|
71
87
|
|
|
@@ -19,9 +19,11 @@ Add to your `conf.py`:
|
|
|
19
19
|
|
|
20
20
|
```python
|
|
21
21
|
extensions = ['sphinx_needs', 'sphinx_codelinks']
|
|
22
|
-
src_trace_config_from_toml = "codelinks.toml"
|
|
23
22
|
```
|
|
24
23
|
|
|
24
|
+
Sphinx-CodeLinks reads its configuration from an `ubproject.toml` file next to
|
|
25
|
+
`conf.py` by default (configurable via `src_trace_config_from_toml`).
|
|
26
|
+
|
|
25
27
|
## Documentation
|
|
26
28
|
|
|
27
29
|
Full documentation: https://codelinks.useblocks.com
|
|
@@ -35,4 +37,4 @@ Full documentation: https://codelinks.useblocks.com
|
|
|
35
37
|
|
|
36
38
|
## Development
|
|
37
39
|
|
|
38
|
-
See [Development Guide](docs/
|
|
40
|
+
See [Development Guide](docs/development/) for contributing guidelines.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "sphinx-codelinks"
|
|
3
|
+
version = "2.0.0"
|
|
4
|
+
description = "Fast Source Code Traceability for Sphinx-Needs"
|
|
5
|
+
authors = [{ name = "team useblocks", email = "info@useblocks.com" }]
|
|
6
|
+
maintainers = [
|
|
7
|
+
{ name = "Marco Heinemann", email = "marco.heinemann@useblocks.com" },
|
|
8
|
+
{ name = "Jui-Wen Chen", email = "jui-wen.chen@useblocks.com" },
|
|
9
|
+
]
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
# EQUAL to the sphinx-needs workspace root's `requires-python`, deliberately: on import
|
|
13
|
+
# `tools/src/sn_tools/check_workspace.py` check (3) compares the two strings for equality,
|
|
14
|
+
# because uv resolves one lock against the root and a member out of step with it still
|
|
15
|
+
# locks, builds and publishes -- the gap shows up only as an install failure for a user on
|
|
16
|
+
# an interpreter inside it.
|
|
17
|
+
requires-python = ">=3.11,<4"
|
|
18
|
+
dependencies = [
|
|
19
|
+
"comment-parser>=1.2.4",
|
|
20
|
+
"ignore-python>=0.3.3",
|
|
21
|
+
"typer>=0.16.0",
|
|
22
|
+
"jsonschema",
|
|
23
|
+
"sphinx>=7.4,<10",
|
|
24
|
+
# TIGHT tracking, not a compatibility range: sphinx-needs is a sibling in the workspace
|
|
25
|
+
# this package is being imported into, and `check_workspace.py` check (4) requires
|
|
26
|
+
# `>=<the sibling's current version>,<<its next major>` on every intra-workspace runtime
|
|
27
|
+
# edge. uv never validates a specifier it resolves through `workspace = true` (uv#9811),
|
|
28
|
+
# so the floor is the only statement of what was actually tested, and the cap is what
|
|
29
|
+
# stops a future major being co-installed with a wheel written against this one.
|
|
30
|
+
"sphinx-needs>=9.0.0,<10",
|
|
31
|
+
"ub-project>=1.1.0,<2",
|
|
32
|
+
"jinja2",
|
|
33
|
+
"pygments",
|
|
34
|
+
"docutils>=0.21", # the `typing` group's series
|
|
35
|
+
"tree-sitter-cpp>=0.23.4",
|
|
36
|
+
"giturlparse>=0.12.0",
|
|
37
|
+
"tree-sitter-python>=0.23.6",
|
|
38
|
+
# >=0.25.1: 0.25.0 segfaulted on linux-arm, https://github.com/tree-sitter/py-tree-sitter/issues/386
|
|
39
|
+
# Not 0.26.0: its Point getters return a borrowed ref, corrupting the heap past row 256 (py-tree-sitter#472,
|
|
40
|
+
# fixed by #466, unreleased at 2026-09-29). Once 0.26.1 ships: `>=0.25.1,!=0.26.0,<0.27`, proven by test_analyse_long_source.py
|
|
41
|
+
"tree-sitter~=0.25.1",
|
|
42
|
+
"tree-sitter-c-sharp>=0.23.1",
|
|
43
|
+
"tree-sitter-typescript>=0.23.2",
|
|
44
|
+
"tree-sitter-yaml>=0.7.1",
|
|
45
|
+
"tree-sitter-rust>=0.23.0",
|
|
46
|
+
"tree-sitter-go>=0.23.0",
|
|
47
|
+
"tree-sitter-json>=0.24.8",
|
|
48
|
+
"tree-sitter-bash>=0.25.1",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[project.optional-dependencies]
|
|
52
|
+
# libclang enables the preprocessor-aware C/C++ engine (skips comments inside
|
|
53
|
+
# inactive #if/#ifdef regions). Plain tree-sitter C/C++ extraction needs none of
|
|
54
|
+
# this, so libclang stays optional. Named after the backend, not "cpp": the
|
|
55
|
+
# engine handles C and Objective-C too, and tree-sitter already covers C++.
|
|
56
|
+
# Floor 16 (not 18): the extraction snapshots are byte-identical on libclang 16,
|
|
57
|
+
# 17 and 18 (the engine only uses get_all_skipped_ranges + comment tokenization,
|
|
58
|
+
# stable since long before 16), so support older toolchains too. No upper bound.
|
|
59
|
+
libclang = ["libclang>=16"]
|
|
60
|
+
|
|
61
|
+
# An EXTRA, not a dependency group, because Read the Docs installs extras and cannot install
|
|
62
|
+
# groups: its `python.install` block takes `extra_requirements`, and there is no equivalent
|
|
63
|
+
# for PEP 735 groups. It is also the shape a member of the sphinx-needs workspace has --
|
|
64
|
+
# the root there re-exports each member's extra (`docs-mounts = ["sphinx-mounts[docs]"]`),
|
|
65
|
+
# because `uv sync --extra` resolves against the workspace root rather than the member.
|
|
66
|
+
docs = [
|
|
67
|
+
"furo>=2024.5.6",
|
|
68
|
+
"myst-parser>=4.0.0",
|
|
69
|
+
"sphinx-ai-index>=1.0.0,<2",
|
|
70
|
+
"sphinx-design>=0.6.1",
|
|
71
|
+
"sphinx-code-tabs>=0.5.5",
|
|
72
|
+
"sphinxcontrib-typer>=0.9.1", # tracks typer's rich_utils internals: 0.9.1+ needs typer>=0.26.8 and declares it; older releases break on it
|
|
73
|
+
"sphinxcontrib-video>=0.4.1",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
[project.urls]
|
|
77
|
+
Homepage = "https://codelinks.useblocks.com"
|
|
78
|
+
Documentation = "https://codelinks.useblocks.com"
|
|
79
|
+
Repository = "https://github.com/useblocks/sphinx-needs"
|
|
80
|
+
Issues = "https://github.com/useblocks/sphinx-needs/issues"
|
|
81
|
+
Changelog = "https://github.com/useblocks/sphinx-needs/blob/master/packages/sphinx-codelinks/docs/changelog.rst"
|
|
82
|
+
|
|
83
|
+
[build-system]
|
|
84
|
+
requires = ["flit_core >=3.4,<4"]
|
|
85
|
+
build-backend = "flit_core.buildapi"
|
|
86
|
+
|
|
87
|
+
# Deliberately NO `[tool.flit.sdist]`: this distribution carries no non-Python payload, so
|
|
88
|
+
# flit's module-only sdist is byte-for-byte the shape already published on PyPI, and
|
|
89
|
+
# nothing downstream builds from it -- the git pins in the wild clone the repository.
|
|
90
|
+
# Everything else -- ruff, ty, pytest and the dependency groups -- is the ROOT's, and
|
|
91
|
+
# `tools/src/sn_tools/check_workspace.py` check (7) refuses those tables here: a member
|
|
92
|
+
# `[tool.ruff]` does not extend the root's configuration, it replaces it.
|
|
93
|
+
|
|
94
|
+
[project.scripts]
|
|
95
|
+
codelinks = "sphinx_codelinks.cmd:app"
|
|
File without changes
|