needextract

New in version 0.5.1.

needextract generates copies of filtered needs with custom layout and style.

It supports custom creation of extracts from existing needs. For instance, a supplier could get a copy of requirements but would not see all the internal meta-data.

Example

.. needextract::
   :filter: type == 'feature'
   :layout: clean
   :style: green_border

Note

needextract supports the full filtering possibilities of Sphinx-Needs. Please read Filtering needs for more information.

needextract supports also arguments as filter string. It works like the option filter, but also supports need ID as filter argument.

Example

.. needextract:: FEATURE_3
   :layout: clean
   :style: green_border

Note

arguments and option filter can’t be used at the same time.

Options

layout

:layout: overwrites the need-specific layout option and sets the same layout for each need. The original need provides the style information, if not overwritten by style.

See Layouts for a list of available layouts.

Example

.. needextract::
   :filter: id in ['FEATURE_3', 'FEATURE_4']
   :layout: focus_r

Result

Feature: Connect to external services FEATURE_3 ../_images/arrow-right-circle.svg
tags: introduction
links outgoing: SPEC_1
links incoming: extend_test_001

Sphinx-Needs can request issues and other data from external services like GitHub.

Embed tickets, requirements and other external information from specific services into your documentation by using Services.

Feature: Automated data handling FEATURE_4 ../_images/arrow-right-circle.svg
tags: introduction
links outgoing: SPEC_1

To handle complex data chains between needs, you can use Dynamic functions to load and set changeable data automatically during the documentation generation phase.

style

:style: overwrites the need-specific style option and sets the same style for each need. The original need provides the layout information , if not overwritten by layout.

See Styles for a list of available styles.

Example

.. needextract::
   :filter: id in ['FEATURE_3', 'FEATURE_4']
   :style: blue_border

Result

Feature: Connect to external services FEATURE_3 ../_images/arrow-right-circle.svg
tags: introduction
links outgoing: SPEC_1
links incoming: extend_test_001

Sphinx-Needs can request issues and other data from external services like GitHub.

Embed tickets, requirements and other external information from specific services into your documentation by using Services.

Feature: Automated data handling FEATURE_4 ../_images/arrow-right-circle.svg
tags: introduction
links outgoing: SPEC_1

To handle complex data chains between needs, you can use Dynamic functions to load and set changeable data automatically during the documentation generation phase.