|
3 | 3 | Changelog
|
4 | 4 | =========
|
5 | 5 |
|
| 6 | +5.1.0 |
| 7 | +----- |
| 8 | + |
| 9 | +:Released: 06.03.2025 |
| 10 | +:Full Changelog: `v5.0.0...v5.1.0 <https://github.com/useblocks/sphinx-needs/compare/5.0.0...9ad91a92c68899f750081f6d683473080a567cad>`__ |
| 11 | + |
| 12 | +The :ref:`needs_global_options` configuration option has been updated to a new format, |
| 13 | +to be more explicit and to allow for future improvements :pr:`1413`. |
| 14 | +The old format is currently still supported, but will emit a warning. |
| 15 | +Additionally, checks are put in place to ensure that the keys used are from the allowed set (:pr:`1410`).: |
| 16 | + |
| 17 | +- any ``needs_extra_options`` field |
| 18 | +- any ``needs_extra_links`` field |
| 19 | +- ``status`` |
| 20 | +- ``layout`` |
| 21 | +- ``style`` |
| 22 | +- ``tags`` |
| 23 | +- ``constraints`` |
| 24 | + |
| 25 | +.. code-block:: python |
| 26 | + :caption: Old format |
| 27 | +
|
| 28 | + needs_global_options = { |
| 29 | + "field1": "a", |
| 30 | + "field2": ("a", 'status == "done"'), |
| 31 | + "field3": ("a", 'status == "done"', "b"), |
| 32 | + "field4": [ |
| 33 | + ("a", 'status == "done"'), |
| 34 | + ("b", 'status == "ongoing"'), |
| 35 | + ("c", 'status == "other"', "d"), |
| 36 | + ], |
| 37 | + } |
| 38 | +
|
| 39 | +.. code-block:: python |
| 40 | + :caption: New format |
| 41 | +
|
| 42 | + needs_global_options = { |
| 43 | + "field1": {"default": "a"}, |
| 44 | + "field2": {"predicates": [('status == "done"', "a")]}, |
| 45 | + "field3": { |
| 46 | + "predicates": [('status == "done"', "a")], |
| 47 | + "default": "b", |
| 48 | + }, |
| 49 | + "field4": { |
| 50 | + "predicates": [ |
| 51 | + ('status == "done"', "a"), |
| 52 | + ('status == "ongoing"', "b"), |
| 53 | + ('status == "other"', "c"), |
| 54 | + ], |
| 55 | + "default": "d", |
| 56 | + }, |
| 57 | + } |
| 58 | +
|
6 | 59 | 5.0.0
|
7 | 60 | -----
|
8 | 61 |
|
9 | 62 | :Released: 18.02.2025
|
10 |
| -:Full Changelog: `v4.1.0...v5.0.0 <https://github.com/useblocks/sphinx-needs/compare/4.2.0...98c630fca17f9575d86b6b1df7714263ae731425>`__ |
| 63 | +:Full Changelog: `v4.2.0...v5.0.0 <https://github.com/useblocks/sphinx-needs/compare/4.2.0...5.0.0>`__ |
11 | 64 |
|
12 | 65 | This release includes a number of changes,
|
13 | 66 | to bring more clarity to the needs data structure and post-processing steps.
|
|
0 commit comments