Sphinx-needs

Latest version: v5.1.0

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 21

21.01.2022

* Improvement: :ref:`needbar` is introduced
(:issue:`452`)
* Improvement: :ref:`needs_external_needs` supports relative path for ``base_url``.
* Improvement: ``needs.json`` schema gets checked during a :ref:`needimport`
(:issue:`456`)
* Improvement: Supports :ref:`filter_func` for :ref:`needpie`
(:issue:`400`)
* Bugfix: Changed :ref:`needgantt` strftime format string according to C89 defined value.
(:issue:`445`)
* Bugfix: :ref:`needpie` option :legend: is correctls rendered
(:issue:`448`)
* Bugfix: :ref:`needpie` figures are closed after creation, to free memory and suppress matplotlib warning
(:issue:`450`)
* Bugfix: Added implementation for simple_footer grid in Layouts Grids
(:issue:`457`)
* Bugfix: Changed :ref:`needs_external_needs` Fix issue when loading needs from URL.
(:issue:`459`)
* Bugfix: Changed :ref:`needs_external_needs` getting from URL was using parameter related to local file.
(:issue:`458`)

18.06.2021

* Improvement: Dead links (references to not found needs) are supported and configurable by :ref:`allow_dead_links`.
(:issue:`116`)
* Improvement: Introducing :ref:`need_func` to execute :ref:`dynamic_functions` inline.
(:issue:`133`)
* Improvement: Support for :ref:`!multiline_option` in templates.
* Bugfix: needflow: links for need-parts get correctly calculated.
(:issue:`205`)
* Bugfix: CSS update for ReadTheDocsTheme to show tables correctly.
(:issue:`263`)
* Bugfix: CSS fix for needtable :ref:`needtable_style_row`.
(:issue:`195`)
* Bugfix: ``current_need`` var is accessible in all need-filters.
(:issue:`169`)
* Bugfix: Sets defaults for color and style of need type configuration, if not set by user.
(:issue:`151`)
* Bugfix: :ref:`needtable` shows horizontal scrollbar for tables using datatables style.
(:issue:`271`)
* Bugfix: Using ``id_complete`` instead of ``id`` in filter code handling.
(:issue:`156`)
* Bugfix: Dynamic Functions registration working for external extensions.
(:issue:`288`)

18.02.2025

:Full Changelog: `v4.2.0...v5.0.0 <https://github.com/useblocks/sphinx-needs/compare/4.2.0...5.0.0>`__

This release includes a number of changes,
to bring more clarity to the needs data structure and post-processing steps.
In most cases it should not be breaking,
but may be in some corner cases.

- ✨ Add ``c.this_doc()`` check for use in directive ``:filter:`` option :pr:`1393` and :pr:`1405`

This allows for filtering of needs only in the same document as the
directive itself, e.g.

.. code-block:: rst

.. needextend:: c.this_doc() and status is None
:status: open

This works for all common filtered directives, see :ref:`filter_current_page`

- ♻️ Remove ``full_title`` need field and only trim generated titles :pr:`1407`

The existence of both ``title`` and ``full_title`` is confusing and unnecessary (in most cases these are equal), and so ``full_title`` is removed.

Trimming (when :ref:`needs_max_title_length` is set) is now only applied to auto-generated titles,
as per the documentation in :ref:`needs_title_from_content`

- ♻️ Make ``needextend`` argument declarative :pr:`1391`

The argument for ``needextend`` can refer to either a single need ID or
filter function.
Currently, the format cannot be known until all needs have been
processed, and it is resolved during post-processing.
This is problematic for (a) user readability, (b) improving processing
performance and issue feedback

This PR slightly modifies the argument processing to allow for two
"explicit" formats:

- ``<ID>``, if the argument is enclosed in ``<>`` it is always processed as a single ID
- ``"filter string"``, if the argument is enclosed in ``""`` it is always processed as a filter string

See :ref:`needextend` for more information.

- ♻️ Remove back link manipulation from ``needextend`` :pr:`1386`

Back links are computed at the end of the need post-processing, after
``needextend`` have been applied.

Back links should always be in-sync with forward links, therefore it
doesn't make sense to modify back links in this way.

- ♻️ Do not process dynamic functions on internal need fields :pr:`1387` and :pr:`1406`

For most "internal" need fields it does not make sense that these would
be dynamic, and anyway this would fail since their values are not string
types.

Dynamic function processing is now skipped, for core fields that
should not be altered by the user.
The following fields are allowed to contain dynamic functions:

- ``status``
- ``tags``
- ``style``
- ``constraints``
- all ``needs_extra_options``
- all ``needs_extra_links``
- all ``needs_global_options``

- ♻️ Remove ``delete`` from internal needs and ``needs.json`` :pr:`1347`

The ``:delete:`` option on a need directive deletes a need before
creating/storing it, therefore it is impossible for it to be
anything other than ``False``.
Storing the field on a need is misleading, because it suggests that the
need will be deleted, which is not possible with the current sphinx-needs logic.

- 👌 Add type warnings of extra options in external/import reads :pr:`1389`

Currently, the value of all extra options is expected to be a string;
other types are not supported in various aspects of sphinx-needs (such
as ``needextend``, dynamic functions and filtering), and in-fact are
already silently converted to strings during the reads.

The warnings ``needs.mistyped_external_values`` and ``needs.mistyped_import_values`` are added for non-string values,
for ``needs_external_needs`` and ``needimport`` sources respectively.

- 🔧 Synchronize list splitting behaviour in ``need`` and ``needextend`` directives :pr:`1385`

16.08.2023

* Improvement: Configuration option :ref:`needs_debug_measurement` added, which creates a runtime report
for debugging purposes.
(:pr:`917`)
* Bugfix: Replace hardcoded `index` with config value `root_doc`.
(:pr:`877`)
* Bugfix: Fix unbounded memory usage in pickle environment.
(:pr:`912`)
* Bugfix: Supports "None" body in Github services.
(:issue:`903`)
* Removed esbonio for :ref:`ide`.
* Removed configuration option **needs_ide_snippets_id** to support custom need ID for :ref:`ide` snippets.
* Removed configuration **needs_ide_directive_snippets** to support custom directive snippets for IDE features.
* Provided new IDE support option: VsCode extension
`Sphinx-Needs-VsCode <https://marketplace.visualstudio.com/items?itemName=useblocks.sphinx-needs-vscode>`_.
* Improvement: Added configuration option :ref:`needs_report_dead_links`, which can deactivate log messages of
outgoing dead links.
(:issue:`920`)
* Improvement: Configuration option :ref:`needs_allow_unsafe_filters` added, which allows unsafe filter for
:ref:`filter_func`.
(:issue:`831`)

13.11.2023

:Full Changelog: `1.3.0...v2.0.0 <https://github.com/useblocks/sphinx-needs/compare/1.3.0...faba19e>`__

This release is focussed on improving the internal code-base and its build time performance, as well as improved build warnings and other functionality improvements / fixes.

Changed
.......

* Add Sphinx 7 support and drop Python 3.7 (:pr:`1056`).
Sphinx 5, 6, 7 and Python 3.8 to 3.11 are now fully supported and tested.
* The ``matplotlib`` dependency (for ``needbar`` and ``needpie`` plots) is now optional, and should be installed with ``sphinx-needs[plotting]``, see :ref:`installation` (:pr:`1061`)
* The ``NeedsBuilder`` format name is changed to ``needs`` (:pr:`978`)

New
...

* Added Builder :ref:`needs_id_builder` and config option :ref:`needs_build_json_per_id` in ``conf.py`` (:pr:`960`)
* Added ``needs_reproducible_json`` config option for the needs builder, see :ref:`needs_build_json` (:pr:`1065`)
* Added error messages for constraint failures (:pr:`1036`)

Improved
........

Performance:

* General performance improvement (up to 50%) and less memory consumption (~40%).
* ``external_needs`` now uses cached templates to save generation time.
* Improved performance for :ref:`needextend` with single needs.
* Improved performance by memoizing the inline parse in ``build_need`` (:pr:`968`)
* Remove ``deepcopy`` of needs data (:pr:`1033`)
* Optimize ``needextend`` filter_needs usage (:pr:`1030`)
* Improve performance of needs builders by skipping document post-transforms (:pr:`1054`)

Other:

* Improve sphinx warnings (:pr:`975`, :pr:`982`)
All warnings are now suffixed with ``[needs]``, and can be suppressed (see `suppress_warnings <https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-suppress_warnings>`_)
* Improve logging for static file copies (:pr:`992`)
* Improve removal of hidden need nodes (:pr:`1013`)
* Improve ``process_constraints`` function (:pr:`1015`)
* Allow ``needextend`` directive to use dynamic functions (:pr:`1052`)
* Remove some unnecessary keys from output ``needs.json`` (:pr:`1053`)

Fixed
.....

* Fix gantt chart rendering (:pr:`984`)
* Fix ``execute_func`` (:pr:`994`)
* Fix adding sections to hidden needs (:pr:`995`)
* Fix ``NeedImport`` logic (:pr:`1006`)
* Fix creation of need title nodes (:pr:`1008`)
* Fix logic for ``process_needextend`` function (:pr:`1037`)
* Fix usage of reST syntax in prefix parameter of meta (:pr:`1046`)

Internal
........

* 🔧 Centralise access to sphinx-needs config to ``NeedsSphinxConfig`` (:pr:`998`)
* 🔧 Centralise sphinx ``env`` data access to ``SphinxNeedsData`` (:pr:`987`)
* 🔧 Consolidate needs data post-processing into ``post_process_needs_data`` function (:pr:`1039`)
* 🔧 Add strict type checking (:pr:`1000`, :pr:`1002`, :pr:`1042`)
* 🔧 Replace ``Directive`` with ``SphinxDirective`` (:pr:`986`)
* 🔧 Remove ``unwrap`` function (:pr:`1017`)
* 🔧 Add ``remove_node_from_tree`` utility function (:pr:`1063`)
* ♻️ Refactor needs post-processing function signatures (:pr:`1040`)

* 📚 Simplify Sphinx-Needs docs builds (:pr:`972`)
* 📚 Always use headless plantuml (:pr:`983`)
* 📚 Add intersphinx (:pr:`991`)
* 📚 Add outline of extension logic (:pr:`1012`)
* 📚 Fixed extra links example (:pr:`1016`)

* 🧪 Remove boilerplate from test build ``conf.py`` files (:pr:`989`, :pr:`990`)
* 🧪 Add headless java to test builds (:pr:`988`)
* 🧪 Add snapshot testing (:pr:`1019`, :pr:`1020`, :pr:`1059`)
* 🧪 Make documentation builds fail on warnings (:pr:`1005`)
* 🧪 Add testing of JS scripts using Cypress integrated into PyTest (:pr:`1051`)
* 🧪 Add code coverage to CI testing (:pr:`1067`)

11.07.2022

* Notice: **Sphinx <5.0 is no longer supported.**
* Notice: **Docutils <0.18.1 is no longer supported.**
* Improvement: Provides :ref:`needuml` for powerful, reusable Need objects.
* Improvement: Provides :ref:`needreport` for documenting configuration used in a **Sphinx-Needs** project's **conf.py**.
* Improvement: Provides initial support for Sphinx-Needs IDE language features.
(:pr:`584`)
* Improvement: Support snippet for auto directive completion for Sphinx-Needs IDE language features.
* Improvement: Added `show_top_sum` to :ref:`Needbar <needbar>` and make it possible to rotate the bar labels.
(:issue:`516`)
* Improvement: Added `needs_constraints` option. Constraints can be set for individual needs and describe properties
a need has to meet.
* Improvement: Added customizable link text of :ref:`Need <needref>`.
(`439 <https://github.com/useblocks/sphinx-needs/discussions/439>`_)
* Bugfix: Fixed lsp needs.json path check.
(:issue:`603`,
:issue:`633`)
* Bugfix: Support embedded needs in embedded needs.
(:issue:`486`)
* Bugfix: Correct references in :ref:`needtables <needtable>` to be external or internal instead of always external.
* Bugfix: Correct documentation and configuration in :ref:`need_tags` to *list* type.
* Bugfix: Handle overlapping labels in :ref:`needpie`.
(:issue:`498`)
* Bugfix: :ref:`needimport` uses source-folder for relative path calculation (instead of confdir).

Page 3 of 21

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.