Requirements#
Functional Requirements#
ID |
Title |
Status |
Refinement |
Satisfy |
Test |
---|---|---|---|---|---|
SVG Link Identification |
implemented |
tsc_int_00001 |
|||
Standard Sphinx Reference Resolution |
implemented |
tsc_int_00001 |
|||
Sphinx-Needs Reference Resolution |
implemented |
tsc_int_00003 |
|||
SVG File Modification |
implemented |
tsc_int_00001, tsc_int_00003 |
|||
SVG Output Preservation |
implemented |
tsc_int_00001 |
|||
Build Process Compatibility |
implemented |
tsc_int_00001 |
|||
Performance Efficiency |
open |
||||
Scalability for Multiple SVGs |
open |
||||
Informative Logging |
implemented |
tsc_int_00002, tsc_int_00004 |
|||
Configurable Verbosity Level |
implemented |
tsc_int_00004 |
The system shall parse SVG files to accurately identify all <a> elements and extract the values of their xlink:href attributes. |
The system shall resolve standard Sphinx cross-references (e.g., :ref:`target`, :doc:`target`) found in xlink:href attributes to their corresponding relative or absolute HTML URIs within the Sphinx build output. |
The system shall resolve Sphinx-Needs references (e.g., :need:`MY_NEED_ID`) found in xlink:href attributes to their corresponding HTML URIs based on the needs.json output, if needs_build_json is enabled. |
The system shall modify the xlink:href attributes within the SVG files by replacing the original Sphinx or Sphinx-Needs reference patterns with the resolved URIs. |
The system shall write the modified SVG content back to the original file path, ensuring the output remains a valid and well-formed SVG. |
Nonfunctional Requirements#
ID |
Title |
Status |
Refinement |
Satisfy |
Test |
---|---|---|---|---|---|
SVG Link Identification |
implemented |
tsc_int_00001 |
|||
Standard Sphinx Reference Resolution |
implemented |
tsc_int_00001 |
|||
Sphinx-Needs Reference Resolution |
implemented |
tsc_int_00003 |
|||
SVG File Modification |
implemented |
tsc_int_00001, tsc_int_00003 |
|||
SVG Output Preservation |
implemented |
tsc_int_00001 |
|||
Build Process Compatibility |
implemented |
tsc_int_00001 |
|||
Performance Efficiency |
open |
||||
Scalability for Multiple SVGs |
open |
||||
Informative Logging |
implemented |
tsc_int_00002, tsc_int_00004 |
|||
Configurable Verbosity Level |
implemented |
tsc_int_00004 |
The extension shall seamlessly integrate into the standard Sphinx build process and execute its logic during the build-finished event without introducing errors that halt the build. |
The SVG parsing and modification process shall be optimized to ensure minimal impact on the overall Sphinx build time, particularly for projects with a large number of SVG diagrams. |
The system shall efficiently handle the processing of a large number of SVG files (e.g., hundreds or thousands) within a single Sphinx build, without encountering memory exhaustion or excessively long processing times. |
The system shall provide clear and informative log messages for successful reference resolutions and warnings for unresolved references, to aid users in understanding the extension’s operations and troubleshooting. |
The system shall allow users to configure the verbosity level of the extension’s logging output via a Sphinx configuration option in conf.py. |