Skip to content

Commit 831c5f0

Browse files
committed
versioned and update docs
1 parent bd1fae9 commit 831c5f0

4 files changed

Lines changed: 60 additions & 25 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A Sphinx extension for discovering, linking, and documenting source code across
55
## Features
66

77
- **Source Discovery**: Automatically discover source files in your project
8-
- **Virtual Documentation**: Generate documentation from code without modifying source files
8+
- **Analyse**: Parse source codes and extract specified markers with their metadata
99
- **Code Linking**: Create intelligent links between code elements
1010
- **Sphinx Integration**: Seamless integration with existing Sphinx documentation
1111

@@ -28,7 +28,7 @@ Full documentation: https://codelinks.useblocks.com
2828
## Components
2929

3030
- **Source Discovery** ([`src/sphinx_codelinks/source_discover`](src/sphinx_codelinks/source_discover)): Code analysis and discovery
31-
- **Virtual Docs** ([`src/sphinx_codelinks/virtual_docs`](src/sphinx_codelinks/virtual_docs)): Documentation generation
31+
- **Analyse** ([`src/sphinx_codelinks/analyse`](src/sphinx_codelinks/analyse)): Documentation generation
3232
- **Sphinx Extension** ([`src/sphinx_codelinks/sphinx_extension`](src/sphinx_codelinks/sphinx_extension)): Sphinx integration
3333
- **Command Line** ([`src/sphinx_codelinks/cmd.py`](src/sphinx_codelinks/cmd.py)): CLI interface
3434

docs/source/development/change_log.rst

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,39 @@
33
Changelog
44
=========
55

6-
.. _release:0.1.2:
6+
.. _`release:1.0.0`:
7+
8+
1.0.0
9+
-----
10+
11+
:Released: 12.08.2025
12+
13+
New and Improved
14+
................
15+
16+
- ✨ Added a new ``analyse`` CLI command and corresponding API.
17+
18+
The ``analyse`` command parses source files (Python, C/C++) and extracts markers from comments.
19+
It can extract three types of markers, as documented in the :ref:`analyse <analyse>` section:
20+
21+
- One-line need definitions
22+
- Need ID references
23+
- Marked RST blocks
24+
25+
The extracted markers and their metadata are saved to a JSON file for further processing.
26+
27+
- 🔨 Replaced ``virtual_docs`` with the new ``analyse`` module.
28+
29+
The ``virtual_docs`` feature, which handled one-line need definitions (:ref:`OneLineCommentStyle <oneline>`),
30+
has been migrated into the new ``analyse`` module and removed from the core.
31+
The caching feature of ``virtual_docs`` is temporarily removed and may be reintroduced later.
32+
33+
- 🔨 Updated the ``src-trace`` Sphinx directive.
34+
35+
The ``src-trace`` directive now uses the new ``analyse`` API instead of the old ``virtual_docs`` one.
36+
Note that the configuration files for ``src-trace`` and the ``analyse`` CLI are not yet compatible; this will be addressed in a future release.
37+
38+
.. _`release:0.1.2`:
739

840
0.1.2
941
-----
@@ -24,7 +56,7 @@ Fixes
2456
Local links between docs and one-line need definitions work correctly, when :ref:`src_dir <source_dir>` in multiple
2557
project configurations point at different locations.
2658

27-
.. _release:0.1.1:
59+
.. _`release:0.1.1`:
2860

2961
0.1.1
3062
-----

docs/source/development/roadmap.rst

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,34 @@
33
Roadmap
44
=======
55

6-
Other Comment styles
7-
--------------------
6+
Command-Line Interface
7+
----------------------
88

9-
Currently, only ``C/C++`` comment style is supported.
10-
The other comment styles for different programming languages are planed, such as:
9+
- Introduce configurable ``--verbose`` and ``--quiet`` logging options.
1110

12-
- Python
13-
- Rust
14-
- YAML
15-
- SyML
11+
Configuration Files
12+
-------------------
1613

17-
Nested .gitignore
18-
-----------------
14+
- Unify TOML configuration for the ``src-trace`` directive and the ``analyse`` CLI.
15+
- Support automatic discovery of TOML configuration files (e.g., ``pyproject.toml``).
16+
- Discourage global configuration in TOML files to promote project-specific settings.
17+
- Improve integration with the ``ubCode`` and ``Sphinx-Needs`` ecosystems.
1918

20-
``CodeLinks`` respects ``.gitignore`` file, but if the .gitignore files are nested, it's not supported.
21-
Respecting nested ``.gitignore`` in the context of the git repositories is planned.
19+
Source Code Parsing
20+
-------------------
2221

23-
Flexible way to define Sphinx-Needs need items in source code
24-
-------------------------------------------------------------
22+
- Introduce a configurable option to strip leading characters (e.g., ``*``) from commented RST blocks.
23+
- Enrich tagged scopes with additional metadata.
24+
- Extend language support by adding parsers for more comment styles, including:
2525

26-
The only way to define ``Sphinx-Needs`` need items is through ``one-line comment style``.
27-
Raw RST text and multi-lines comments style are planned to support
26+
- Rust
27+
- YAML
28+
- SyML
2829

29-
Export needs.json
30-
-----------------
30+
- Enhance ``.gitignore`` handling to support nested ``.gitignore`` files.
3131

32-
To facilitate CI workflow and enhance the portability of ``need items`` defined in source code,
33-
we plan to have the feature to export the needs defined in source code to a JSON file.
32+
Defining Needs in Source Code
33+
-----------------------------
34+
35+
- Introduce flexible ways to define ``Sphinx-Needs`` items in source code, such as using raw RST text and multi-line comments.
36+
- Implement a feature to export needs defined in source code to a ``needs.json`` file, improving CI workflows and portability.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sphinx-codelinks"
3-
version = "0.1.2"
3+
version = "1.0.0"
44
description = "Fast Source Code Traceability for Sphinx-Needs"
55
authors = [{ name = "team useblocks", email = "info@useblocks.com" }]
66
maintainers = [

0 commit comments

Comments
 (0)