diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 558d9d342..50470f5e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.7 + rev: v0.6.8 hooks: - id: ruff args: [--fix] diff --git a/docs/changelog.rst b/docs/changelog.rst index 5ac4513b0..c7f6e95f5 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -719,10 +719,10 @@ Released: 23.04.2021 * Bugfix: No more exception raise if ``copy`` value not set inside :ref:`needs_extra_links`. * Improvement: Better log message, if required id is missing. (:issue:`112`) -* Removed: Configuration option :ref:`needs_collapse_details`. This is now realized by :ref:`layouts`. -* Removed: Configuration option :ref:`needs_hide_options`. This is now realized by :ref:`layouts`. -* Removed: Need option :ref:`need_hide_status`. This is now realized by :ref:`layouts`. -* Removed: Need option :ref:`need_hide_tags`. This is now realized by :ref:`layouts`. +* Removed: Configuration option :ref:`!needs_collapse_details`. This is now realized by :ref:`layouts`. +* Removed: Configuration option :ref:`!needs_hide_options`. This is now realized by :ref:`layouts`. +* Removed: Need option :ref:`!need_hide_status`. This is now realized by :ref:`layouts`. +* Removed: Need option :ref:`!need_hide_tags`. This is now realized by :ref:`layouts`. **WARNING**: This version changes a lot the html output and therefore the needed css selectors. So if you are using custom css definitions you need to update them. @@ -861,9 +861,9 @@ custom css definitions you need to update them. * Improvement: :ref:`dynamic_functions` are now available to support calculation of need values. * Improvement: :ref:`needs_functions` can be used to register and use own dynamic functions. * Improvement: Added :ref:`needs_global_options` to set need values globally for all needs. -* Improvement: Added :ref:`needs_hide_options` to hide specific options of all needs. +* Improvement: Added :ref:`!needs_hide_options` to hide specific options of all needs. * Bugfix: Removed needs are now deleted from existing needs.json (:issue:`68`) -* Removed: :ref:`needs_template` and :ref:`needs_template_collapse` are no longer supported. +* Removed: :ref:`!needs_template` and :ref:`!needs_template_collapse` are no longer supported. 0.2.5 ----- diff --git a/docs/configuration.rst b/docs/configuration.rst index 9783c9f25..75fe7fff0 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -2177,168 +2177,3 @@ See :ref:`runtime_debugging` for details. To activate it, set it to ``True``:: needs_debug_measurement = True - - -Removed options ---------------- - -The following options are no longer supported in the latest versions of **Sphinx-Needs**. - -.. _needs_template: - -needs_template -~~~~~~~~~~~~~~ - -*removed: 0.3.0* - -The layout of needs can be fully customized by using `jinja `__. - -If nothing is set, the following default template is used: - -.. code-block:: jinja - - .. _{{id}}: - - {% if hide == false -%} - .. role:: needs_tag - .. role:: needs_status - .. role:: needs_type - .. role:: needs_id - .. role:: needs_title - - .. rst-class:: need - .. rst-class:: need_{{type_name}} - - .. dropdown:: - :class: need - - :needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}` - {%- if status and status|upper != "NONE" %} - | status: :needs_status:`{{status}}` - {%- endif -%} - {%- if tags %} - | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}` - {%- endif %} - | links incoming: :need_incoming:`{{id}}` - | links outgoing: :need_outgoing:`{{id}}` - - {{content|indent(8) }} - - {% endif -%} - - - -Available jinja variables are: - -* type -* type_name -* type_prefix -* status -* tags -* id -* links -* title -* content -* hide - - -.. warning:: - - You must add a reference like `.. _{{id}}:` to the template. Otherwise linking will not work! - -.. _needs_template_collapse: - -needs_template_collapse -~~~~~~~~~~~~~~~~~~~~~~~ -*removed: 0.3.0* - -Defines a template used for a need with active option **collapse**. - -Default value: - -.. code-block:: jinja - - .. _{{id}}: - - {% if hide == false -%} - .. role:: needs_tag - .. role:: needs_status - .. role:: needs_type - .. role:: needs_id - .. role:: needs_title - .. rst-class:: need - .. rst-class:: need_{{type_name}} - - .. dropdown:: - :class: need - - :needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}` - :needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}` - {%- if status and status|upper != "NONE" %} - | status: :needs_status:`{{status}}` - {%- endif -%} - {%- if tags %} - | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}` - {%- endif %} - | links incoming: :need_incoming:`{{id}}` - | links outgoing: :need_outgoing:`{{id}}` - - {{content|indent(4) }} - - {% endif -%} - - -For more details please see :ref:`needs_template`. - -.. _needs_hide_options: - -needs_hide_options -~~~~~~~~~~~~~~~~~~ - -.. versionadded:: 0.3.0 - -*removed: 0.5.0* - -.. note:: - - To remove options from output in **Sphinx-Needs** version >= ``0.5.0`` you must provide your own layout, which - does not include these options. See :ref:``layouts_styles`` for more information. - -Can be used to hide specific options from general output in rendered document:: - - needs_hide_options = ['tags', 'global_option'] - -Works with local set options, extra options and global options. - -Default value: ``['hidden']`` - -The ``hidden`` option is a globally available option, which is always hidden and -can be used to easily execute :ref:`dynamic_functions`. - -Combined with :ref:`dynamic_functions` and :ref:`needs_global_options` this configuration can be used to perform -complex calculations in the background and hide any output. - -.. _needs_collapse_details: - -needs_collapse_details -~~~~~~~~~~~~~~~~~~~~~~ - -.. versionadded:: 0.2.0 - -*removed: 0.5.0* - -.. note:: - - Starting with version 0.5.0 the used :ref:`layout ` decides what the default behavior is. - To customize this behavior, you have to create your own :ref:`layout `. - -If true, need options like status, tags or links are collapsed and shown only after a click on the arrow close to the need title. - -.. code-block:: python - - # conf.py - needs_collapse_details = False - -Default value: True - -Can be overwritten for each single need by setting :ref:`need_collapse`. diff --git a/docs/directives/need.rst b/docs/directives/need.rst index 02f9eac0a..536513cbe 100644 --- a/docs/directives/need.rst +++ b/docs/directives/need.rst @@ -727,28 +727,3 @@ Customized Options Sphinx-Needs supports the definition and filtering of customized options for needs. You can read :ref:`needs_extra_options` for detailed information and examples. - - -Removed Options ---------------- - -.. note:: - - To remove options from the **Sphinx-Needs** output in ``versions >= 0.5.0``, you must provide your own layout, - which does not include these options. See :ref:`layouts_styles` for more information. - -.. _need_hide_status: - -hide_status -~~~~~~~~~~~ -*removed: 0.5.0* - -Hide the status information of a need. - -.. _need_hide_tags: - -hide_tags -~~~~~~~~~ -*removed: 0.5.0* - -Hide the tags of a need. diff --git a/docs/directives/needimport.rst b/docs/directives/needimport.rst index e1372a03a..579260ceb 100644 --- a/docs/directives/needimport.rst +++ b/docs/directives/needimport.rst @@ -82,7 +82,7 @@ hide ~~~~ You can use the ``:hide:`` option to set the **hide** tag for all imported needs. -So they do not show up but are available in ``needfilter``. +So they are not rendered on the page. collapse ~~~~~~~~