Repository navigation
chore(deps): upgrade to Sphinx-Needs 9.3.0 - #1079
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Approval is blocked by two unresolved critical issues: retained non-SCORE need types can abort builds, and the Sphinx-Needs upgrade triggers a warning that fails the strict documentation build.
2 open issues
What changed in this PR
This pull request upgrades the documentation stack to Sphinx-Needs 9.3.0 and adapts SCORE's metamodel integration to the updated Sphinx-Needs APIs and schema model.
Changes:
- Pins Sphinx-Needs 9.3.0 and refreshes the Python 3.12 and 3.14 dependency lockfiles.
- Migrates relocated Sphinx-Needs APIs, including
NeedsView,NeedsCoreFields, and logging support. - Separates SCORE-specific type metadata from Sphinx-Needs definitions and forwards the field schema through
needextendprocessing.
| File | Description |
|---|---|
| src/requirements.txt | Updates the Python 3.12 dependency lockfile for Sphinx-Needs 9.3.0 and its transitive dependencies. |
| src/requirements.in | Pins the direct Sphinx-Needs dependency to version 9.3.0. |
| src/requirements_py314.txt | Updates the Python 3.14 dependency lockfile for Sphinx-Needs 9.3.0 and its transitive dependencies. |
| src/extensions/score_metrics/traceability_metrics.py | Updates the NeedsView import for the Sphinx-Needs 9 API. |
| src/extensions/score_metrics/tests/test_traceability_metrics.py | Updates the traceability metrics test import for the relocated NeedsView. |
| src/extensions/score_metamodel/yaml_parser.py | Imports NeedsCoreFields from its new Sphinx-Needs module. |
| src/extensions/score_metamodel/tests/test_testcase.py | Updates the testcase test import for the relocated NeedsView. |
| src/extensions/score_metamodel/tests/test_metamodel__init__.py | Updates the metamodel initialization test import for the relocated NeedsView. |
| src/extensions/score_metamodel/tests/test_graph_checks.py | Updates the graph checks test import for the relocated NeedsView. |
| src/extensions/score_metamodel/tests/test_external_needs.py | Adjusts exporter assertions for the updated Sphinx-Needs finalization behavior. |
| src/extensions/score_metamodel/tests/test_check_options.py | Updates validation tests to use separate SCORE-specific type metadata. |
| src/extensions/score_metamodel/tests/test_check_needs_extends.py | Supplies the new field schema argument to the needextend wrapper tests. |
| src/extensions/score_metamodel/tests/rst/conf.py | Registers fixture types through the new SCORE type registration helper. |
| src/extensions/score_metamodel/log.py | Migrates the SphinxLoggerAdapter import to Sphinx's logging module. |
| src/extensions/score_metamodel/checks/tool_qualification.py | Updates the NeedsView import for the Sphinx-Needs 9 API. |
| src/extensions/score_metamodel/checks/testcase.py | Updates the testcase checker import for the relocated NeedsView. |
| src/extensions/score_metamodel/checks/graph_checks.py | Updates the graph checker import for the relocated NeedsView. |
| src/extensions/score_metamodel/checks/check_options.py | Reads SCORE-specific validation metadata separately from Sphinx-Needs type definitions. |
| src/extensions/score_metamodel/checks/check_needs_extends.py | Forwards the Sphinx-Needs field schema through needextend processing and updates its processor integration. |
| src/extensions/score_metamodel/checks/attributes_format.py | Reads SCORE-specific type metadata separately from Sphinx-Needs type definitions. |
| src/extensions/score_metamodel/__init__.py | Registers Sphinx-Needs-compatible types separately from SCORE-specific type definitions and validation rules. |
Review effort: Lite
Use the faster document-local needextend filter evaluation while retaining Python 3.12 support. Register SCORE validation rules separately from Sphinx-Needs type definitions and forward the field schema in the needextend hook. Signed-off-by: Alexander Lanin <Alexander.Lanin@etas.com>
91c19b0 to
33f3fc3
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The SCORE validation pass applies same-document needextend directives in source order, while Sphinx-Needs 9.3 applies them by (extend_priority, docname, lineno); when directives with different priorities set or replace the same field, validation can inspect a different intermediate Need state than the application pass, potentially causing false policy violations or missing real ones.
2 open issues
2 resolved since last review
Review effort: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
The Sphinx-Needs upgrade changes filter and needextend semantics and generated outputs across Python 3.12 and 3.14. Full Bazel/Sphinx integration builds could not be run in this review context, so compatibility of those changes remains unverified.
2 open issues
Review effort: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
The scenario dependency change may leave the Bazel lockfile stale, and because CI uses strict lockfile validation, scenario resolution could fail; please verify the lockfile is regenerated consistently with the module changes.
2 open issues
Review effort: Lite
|
Documentation preview for this pull request is available at: |
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Seems good. 💯
More changes than anticipated but actually less than I thought after looking through the changelogs
There was a problem hiding this comment.
🔵 Needs a closer look
The module dependency change may leave the Bazel lockfile out of sync, creating uncertainty about whether the end-to-end test setup will run successfully and requiring human review before approval.
No open issues 🎉
2 resolved since last review
Review effort: Lite


Why
Upgrade to Sphinx-Needs 9 to reduce the cost of document-local
needextendfilters in large documentation builds while retaining Python 3.12 support. An earlier compatibility prototype with 9.3.0 reduced the Reference Integration Sphinx run from 315 to 170 seconds using the same test artifacts. This addresses the performance bottleneck described in #1075 through the upstream filter implementation.Changes
needs_typesand removes SCORE-specific keys.needextendimplementation and preserve the SCORE policy checks.The Reference Integration prototype generated its HTML and exports but reported a warning for the
needtablefilter in the ASPICE appendix fromprocess_description. The filter is written as"c.this_doc()". Sphinx-Needs 9 treats the quoted expression as a constant.