|
3 | 3 | Changelog |
4 | 4 | ========= |
5 | 5 |
|
| 6 | +5.0.0 |
| 7 | +----- |
| 8 | + |
| 9 | +:Released: 18.02.2025 |
| 10 | +:Full Changelog: `v4.1.0...v5.0.0 <https://github.com/useblocks/sphinx-needs/compare/4.2.0...98c630fca17f9575d86b6b1df7714263ae731425>`__ |
| 11 | + |
| 12 | +This release includes a number of changes, |
| 13 | +to bring more clarity to the needs data structure and post-processing steps. |
| 14 | +In most cases it should not be breaking, |
| 15 | +but may be in some corner cases. |
| 16 | + |
| 17 | +- β¨ Add ``c.this_doc()`` check for use in directive ``:filter:`` option :pr:`1393` and :pr:`1405` |
| 18 | + |
| 19 | + This allows for filtering of needs only in the same document as the |
| 20 | + directive itself, e.g. |
| 21 | + |
| 22 | + .. code-block:: rst |
| 23 | +
|
| 24 | + .. needextend:: c.this_doc() and status is None |
| 25 | + :status: open |
| 26 | +
|
| 27 | + This works for all common filtered directives, see :ref:`filter_current_page` |
| 28 | + |
| 29 | +- β»οΈ Remove ``full_title`` need field and only trim generated titles :pr:`1407` |
| 30 | + |
| 31 | + The existence of both ``title`` and ``full_title`` is confusing and unnecessary (in most cases these are equal), and so ``full_title`` is removed. |
| 32 | + |
| 33 | + Trimming (when :ref:`needs_max_title_length` is set) is now only applied to auto-generated titles, |
| 34 | + as per the documentation in :ref:`needs_title_from_content` |
| 35 | + |
| 36 | +- β»οΈ Make ``needextend`` argument declarative :pr:`1391` |
| 37 | + |
| 38 | + The argument for ``needextend`` can refer to either a single need ID or |
| 39 | + filter function. |
| 40 | + Currently, the format cannot be known until all needs have been |
| 41 | + processed, and it is resolved during post-processing. |
| 42 | + This is problematic for (a) user readability, (b) improving processing |
| 43 | + performance and issue feedback |
| 44 | + |
| 45 | + This PR slightly modifies the argument processing to allow for two |
| 46 | + "explicit" formats: |
| 47 | + |
| 48 | + - ``<ID>``, if the argument is enclosed in ``<>`` it is always processed as a single ID |
| 49 | + - ``"filter string"``, if the argument is enclosed in ``""`` it is always processed as a filter string |
| 50 | + |
| 51 | + See :ref:`needextend` for more information. |
| 52 | + |
| 53 | +- β»οΈ Remove back link manipulation from ``needextend`` :pr:`1386` |
| 54 | + |
| 55 | + Back links are computed at the end of the need post-processing, after |
| 56 | + ``needextend`` have been applied. |
| 57 | + |
| 58 | + Back links should always be in-sync with forward links, therefore it |
| 59 | + doesn't make sense to modify back links in this way. |
| 60 | + |
| 61 | +- β»οΈ Do not process dynamic functions on internal need fields :pr:`1387` and :pr:`1406` |
| 62 | + |
| 63 | + For most "internal" need fields it does not make sense that these would |
| 64 | + be dynamic, and anyway this would fail since their values are not string |
| 65 | + types. |
| 66 | + |
| 67 | + Dynamic function processing is now skipped, for core fields that |
| 68 | + should not be altered by the user. |
| 69 | + The following fields are allowed to contain dynamic functions: |
| 70 | + |
| 71 | + - ``status`` |
| 72 | + - ``tags`` |
| 73 | + - ``style`` |
| 74 | + - ``constraints`` |
| 75 | + - all ``needs_extra_options`` |
| 76 | + - all ``needs_extra_links`` |
| 77 | + - all ``needs_global_options`` |
| 78 | + |
| 79 | +- β»οΈ Remove ``delete`` from internal needs and ``needs.json`` :pr:`1347` |
| 80 | + |
| 81 | + The ``:delete:`` option on a need directive deletes a need before |
| 82 | + creating/storing it, therefore it is impossible for it to be |
| 83 | + anything other than ``False``. |
| 84 | + Storing the field on a need is misleading, because it suggests that the |
| 85 | + need will be deleted, which is not possible with the current sphinx-needs logic. |
| 86 | + |
| 87 | +- π Add type warnings of extra options in external/import reads :pr:`1389` |
| 88 | + |
| 89 | + Currently, the value of all extra options is expected to be a string; |
| 90 | + other types are not supported in various aspects of sphinx-needs (such |
| 91 | + as ``needextend``, dynamic functions and filtering), and in-fact are |
| 92 | + already silently converted to strings during the reads. |
| 93 | + |
| 94 | + The warnings ``needs.mistyped_external_values`` and ``needs.mistyped_import_values`` are added for non-string values, |
| 95 | + for ``needs_external_needs`` and ``needimport`` sources respectively. |
| 96 | + |
| 97 | +- π§ Synchronize list splitting behaviour in ``need`` and ``needextend`` directives :pr:`1385` |
| 98 | + |
6 | 99 | 4.2.0 |
7 | 100 | ----- |
8 | 101 |
|
9 | 102 | :Released: 07.01.2025 |
10 | | -:Full Changelog: `v4.1.0...v4.2.0 <https://github.com/useblocks/sphinx-needs/compare/4.1.0...1114e72c011e77524f332eddcc9621fefd4ddbdf>`__ |
| 103 | +:Full Changelog: `v4.1.0...v4.2.0 <https://github.com/useblocks/sphinx-needs/compare/4.1.0...4.2.0>`__ |
11 | 104 |
|
12 | 105 | - β¬οΈ Drop Python 3.8 and Sphinx 6 |
13 | 106 | - β¨ Add :ref:`needs_import_keys` configuration :pr:`1379` |
|
0 commit comments