👌Remove the need item for src-trace#39
Merged
Merged
Conversation
- updated TCs - updated docs
There was a problem hiding this comment.
Pull Request Overview
This PR removes the automatic creation of "srctrace" type need items by the src-trace directive, addressing issues #15 and #38. The directive now focuses solely on extracting and rendering need items from source code without creating its own need item.
- Removed the requirement for title argument and id option in the
src-tracedirective - Eliminated the creation of "srctrace" type need items that were automatically generated
- Updated documentation and test files to reflect the new simplified directive usage
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/sphinx_codelinks/sphinx_extension/directives/src_trace.py | Removed need creation logic, title requirement, and ID handling functions |
| tests/doc_test/*/index.rst | Updated directive usage to remove title arguments |
| tests/data/sphinx/index.rst | Updated directive usage to remove title arguments |
| tests/snapshots/test_src_trace/*.doctree.xml | Removed expected "srctrace" need items from test snapshots |
| docs/source/development/change_log.rst | Added changelog entry documenting the behavior change |
| docs/source/components/directive.rst | Updated directive examples to remove title and id requirements |
| docs/source/basics/quickstart.rst | Updated quickstart example to remove title argument |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ubmarco
requested changes
Sep 30, 2025
Co-authored-by: Marco Heinemann <marco.heinemann@useblocks.com>
Co-authored-by: Marco Heinemann <marco.heinemann@useblocks.com>
Co-authored-by: Marco Heinemann <marco.heinemann@useblocks.com>
Co-authored-by: Marco Heinemann <marco.heinemann@useblocks.com>
Co-authored-by: Marco Heinemann <marco.heinemann@useblocks.com>
ubmarco
approved these changes
Sep 30, 2025
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.
Issue
#15
#38
TLDR
Removed the need item created and typed by the directive
src-trace.Details
Directive
src-tracecreates the need item typed bysrctraceand it doesn't have any use cases so far. Instead, it draws conflicts with the Sphinx-Needs configuration. For example, ifneeds_id_reqiredorneeds_statusesis enabled, the error occurs when generating thesrctraceneed item. In order to fix it, the extra need item generated bysrc-traceis removed.