Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#1307)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Sewell <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and chrisjsewell authored Oct 2, 2024
1 parent cb03029 commit bfdd575
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 198 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
12 changes: 6 additions & 6 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
-----
Expand Down
165 changes: 0 additions & 165 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://jinja.pocoo.org/>`__.
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 <layouts>` decides what the default behavior is.
To customize this behavior, you have to create your own :ref:`layout <layouts>`.
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`.
25 changes: 0 additions & 25 deletions docs/directives/need.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/directives/needimport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~
Expand Down

0 comments on commit bfdd575

Please sign in to comment.