Skip to content

Conversation

@juiwenchen
Copy link
Contributor

@juiwenchen juiwenchen commented Sep 29, 2025

Issue

#15
#38

TLDR

Removed the need item created and typed by the directive src-trace.

Details

Directive src-trace creates the need item typed by srctrace and it doesn't have any use cases so far. Instead, it draws conflicts with the Sphinx-Needs configuration. For example, if needs_id_reqired or needs_statuses is enabled, the error occurs when generating the srctrace need item. In order to fix it, the extra need item generated by src-trace is removed.

- updated TCs
- updated docs
Copilot AI review requested due to automatic review settings September 29, 2025 11:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-trace directive
  • 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.

@juiwenchen juiwenchen requested a review from ubmarco September 30, 2025 10:07
@ubmarco ubmarco changed the title 👌Remove the need item typed by "srctrace" 👌Remove the need item for src-trace Sep 30, 2025
@juiwenchen juiwenchen merged commit dc4627b into main Sep 30, 2025
8 checks passed
@juiwenchen juiwenchen deleted the rm-src-trace-node branch September 30, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants