Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧪 CI: Make documentation builds fail on warnings #1005

Merged
merged 8 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ version: 2

sphinx:
configuration: docs/conf.py
builder: html
fail_on_warning: true

python:
install:
Expand Down
10 changes: 4 additions & 6 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ Released: under development
1.4.0
-----
Released: under development

* Improvement: Added Builder :ref:`needs_id_builder` added and config option :ref:`needs_build_json_per_id` in `conf.py`.
* Improvement: Reduce document build time, by memoizing the inline parse in ``build_need``
(`#968 <https://github.com/useblocks/sphinx-needs/pull/968>`_)
* Change `NeedsBuilder` format to `needs`
(`#978 <https://github.com/useblocks/sphinx-needs/pull/978>`_)
* Improvement: Suffix all warnings with ``[needs]``, and allow them to be suppressed
(`#975 <https://github.com/useblocks/sphinx-needs/pull/975>`_)
* Improvement: Reduce document build time, by memoizing the inline parse in ``build_need`` (`#968 <https://github.com/useblocks/sphinx-needs/pull/968>`_)
* Change `NeedsBuilder` format to `needs` (`#978 <https://github.com/useblocks/sphinx-needs/pull/978>`_)
* Improvement: Suffix all warnings with ``[needs]``, and allow them to be suppressed (`#975 <https://github.com/useblocks/sphinx-needs/pull/975>`_)
* Improvement: :ref:`needextend` for single needs is much faster.
* Improvement: external_needs is using cached templates to save generation time.

Expand Down
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
}

nitpicky = True
nitpick_ignore = [
("py:class", "T"),
("py:class", "sphinx_needs.debug.T"),
("py:class", "sphinx_needs.data.NeedsInfoType"),
]

# smartquotes = False

needs_debug_measurement = True
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ sphinxcontrib-programoutput
sphinx-design
click
tabulate
sphinx-immaterial==0.11.6
sphinx-immaterial==0.11.7
1 change: 0 additions & 1 deletion sphinx_needs/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def my_cool_function(a, b,c ):
:param category: Name of a category, which helps to cluster the measured functions.
:param source: Should be "internal" or "user". Used to easily structure function written by user.
:param name: Name to use for the measured. If not given, the function name is used.
:param func: Can contain a func, which shall get decorated. Not used if ``measure_time`` is used as decorator.
"""

def inner(func: T) -> T:
Expand Down