Skip to content

264 update to latest sphinx needs version#271

Open
JuReMq wants to merge 3 commits intodevelopfrom
264-update-to-latest-sphinx-needs-version
Open

264 update to latest sphinx needs version#271
JuReMq wants to merge 3 commits intodevelopfrom
264-update-to-latest-sphinx-needs-version

Conversation

@JuReMq
Copy link
Contributor

@JuReMq JuReMq commented Mar 9, 2026

No description provided.

@JuReMq JuReMq requested a review from cuinixam March 9, 2026 15:41
@JuReMq JuReMq linked an issue Mar 9, 2026 that may be closed by this pull request
@JuReMq JuReMq force-pushed the 264-update-to-latest-sphinx-needs-version branch from a54bd98 to 0f6ef93 Compare March 9, 2026 15:53
@JuReMq JuReMq force-pushed the 264-update-to-latest-sphinx-needs-version branch from 0f6ef93 to ab8baab Compare March 9, 2026 16:01
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Test Results

191 tests   191 ✅  3m 52s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit ab8baab.

Automatically generated by python-semantic-release
source_suffix = extension_configs["source_suffix"]

# Import default SPL sphinx-needs configuration
needs_from_toml = ".venv/Lib/site-packages/spl_core/report_generation/ubproject.toml"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a Windows only path (Lib/site-packages). On Linux/macOS it would be lib/pythonX.Y/site-packages. It should be resolved dynamically, e.g.:

from importlib.resources import files
needs_from_toml = str(files("spl_core.report_generation").joinpath("ubproject.toml"))

needs_global_options = SplSphinx.default_needs_global_options

# Provide all config values to jinja
html_context = {
Copy link
Contributor

Choose a reason for hiding this comment

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

The html_context is updated based on files known to spl-core (autoconf and sphinx build config).
Because these files and the environment variables are generated by spl-core it makes sense to move this logic to the spl-core sphinx report generation module.
See a similar example here: https://github.com/cuinixam/SPLed/blob/33524bc316be5682618ed90523be4d5883c6f1b8/conf.py#L45

from sphinx_needs.need_item import NeedItem, NeedPartItem


def sple_tr_link(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there no way to keep the name of this method tr_link and use it to override the default sphinx needs tr_link implementation?
If we change the name, one must change in all test files in all SPLs from tr_link to sple_tr_link.

{ option = "fulfills", incoming = "is fulfilled by", outgoing = "fulfills" },
{ option = "refines", incoming = "is refined by", outgoing = "refines" },
{ option = "implements", incoming = "is implemented by", outgoing = "implements" },
{ option = "results", incoming = "results from", outgoing = "results" },
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we change from is resulted from to results from?
This change requires that we update the test_report_template.txt in all SPLs.

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.

Update to latest sphinx-needs version

2 participants