From 4f66ac473ddbccc96a8da47cb94eba80d4ee1175 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Mon, 13 Nov 2023 14:26:27 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9A=80=20Release=20v2.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yaml | 2 +- docs/changelog.rst | 90 ++++++++++++++++++++++++++++++----- docs/conf.py | 20 +------- pyproject.toml | 4 +- sphinx_needs/__init__.py | 2 +- sphinx_needs/needs.py | 2 +- 6 files changed, 84 insertions(+), 36 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 42bb60ab7..cd375118b 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -13,7 +13,7 @@ on: tags: - '*.*.*' env: - NEEDS_VERSION: 1.3.0 + NEEDS_VERSION: 2.0.0 jobs: build: diff --git a/docs/changelog.rst b/docs/changelog.rst index 41717e271..2d85928e1 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,22 +7,86 @@ License ------- .. include:: ../LICENSE - -2.0.0 ------ -Released: under development -1.4.0 + +2.0.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 `_) -* Change `NeedsBuilder` format to `needs` (`#978 `_) -* Improvement: Suffix all warnings with ``[needs]``, and allow them to be suppressed (`#975 `_) -* Improvement: :ref:`needextend` for single needs is much faster. -* Improvement: General performance improvement (up to 50%) and less memory consumption (~40%). -* Improvement: external_needs is using cached templates to save generation time. +:Released: 13.11.2023 +:Full Changelog: `https://github.com/useblocks/sphinx-needs/compare/1.3.0...v2.0.0`_ + +Changed +....... + +* Update to Sphinx 7 and drop Python 3.7 (`#1056 `_) +* Make matplotlib dependency optional (`#1061 `_) +* Change ``NeedsBuilder`` format to ``needs`` (`#978 `_) + +New +... + +* Added Builder :ref:`needs_id_builder` and config option :ref:`needs_build_json_per_id` in ``conf.py`` (`#960 `_) +* Added `needs_reproducible_json` config option (`#1065 `_) +* Added error messages for constraint failures (`#1036 `_) + +Improved +........ + +Performance: + +* General performance improvement (up to 50%) and less memory consumption (~40%). +* ``external_needs`` now uses cached templates to save generation time. +* Improved performance for :ref:`needextend` with single needs. +* Improved performance by memoizing the inline parse in ``build_need`` (`#968 `_) +* Remove ``deepcopy`` of needs data (`#1033 `_) +* Optimize ``needextend`` filter_needs usage (`#1030 `_) +* Improve performance of needs builders by skipping document post-transforms (`#1054 `_) + +Other: + +* Improve sphinx warnings (`#975 `_, `#982 `_) + All warnings are now suffixed with ``[needs]``, and can be suppressed (see `suppress_warnings `_) +* Improve logging for static file copies (`#992 `_) +* Improve removal of hidden need nodes (`#1013 `_) +* Improve ``process_constraints`` function (`#1015 `_) +* Allow ``needextend`` directive to use dynamic functions (`#1052 `_) +* Remove some unnecessary keys from output ``needs.json`` (`#1053 `_) + +Fixed +..... + +* Fix gantt chart rendering (`#984 `_) +* Fix ``execute_func`` (`#994 `_) +* Fix adding sections to hidden needs (`#995 `_) +* Fix ``NeedImport`` logic (`#1006 `_) +* Fix creation of need title nodes (`#1008 `_) +* Fix logic for ``process_needextend`` function (`#1037 `_) +* Fix usage of reST syntax in prefix parameter of meta (`#1046 `_) + +Internal +........ + +* ๐Ÿ”ง Centralise access to sphinx-needs config to ``NeedsSphinxConfig`` (`#998 `_) +* ๐Ÿ”ง Centralise sphinx ``env`` data access to ``SphinxNeedsData`` (`#987 `_) +* ๐Ÿ”ง Consolidate needs data post-processing into ``post_process_needs_data`` function (`#1039 `_) +* ๐Ÿ”ง Add strict type checking (`#1000 `_, `#1002 `_, `#1042 `) +* ๐Ÿ”ง Replace ``Directive`` with ``SphinxDirective`` (`#986 `_) +* ๐Ÿ”ง Remove ``unwrap`` function (`#1017 `_) +* ๐Ÿ”ง Add ``remove_node_from_tree`` utility function (`#1063 `_) +* โ™ป๏ธ Refactor needs post-processing function signatures (`#1040 `_) + +* ๐Ÿ“š Simplify Sphinx-Needs docs builds (`#972 `_) +* ๐Ÿ“š Always use headless plantuml (`#983 `_) +* ๐Ÿ“š Add intersphinx (`#991 `_) +* ๐Ÿ“š Add outline of extension logic (`#1012 `_) +* ๐Ÿ“š Fixed extra links example (`#1016 `_) + +* ๐Ÿงช Remove boilerplate from test build ``conf.py`` files (`#989 `_, `#990 `_) +* ๐Ÿงช Add headless java to test builds (`#988 `_) +* ๐Ÿงช Add snapshot testing (`#1019 `_, `#1020 `_, `#1059 `_) +* ๐Ÿงช Make documentation builds fail on warnings (`#1005 `_) +* ๐Ÿงช Add testing of JS scripts using Cypress integrated into PyTest (`#1051 `_) +* ๐Ÿงช Add code coverage to CI testing (`#1067 `_) 1.3.0 ----- diff --git a/docs/conf.py b/docs/conf.py index a9f339670..ea5249393 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,31 +18,15 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os -import sys from typing import Any, Dict, List from sphinx.application import Sphinx -sys.path.append(os.path.abspath("../sphinxcontrib")) +from sphinx_needs import __version__ # -- General configuration ------------------------------------------------ -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = "1.3" -# The full version, including alpha/beta/rc tags. -release = "1.3.0" +version = release = __version__ extensions = [ "sphinx.ext.intersphinx", diff --git a/pyproject.toml b/pyproject.toml index c70835d14..d302ee5cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [tool.poetry] name = "sphinx-needs" -# !! Don't miss updates in needs.py, conf.py, changelog.rst, and .github/workflows/docker !!! -version = "1.3.0" +# !! Don't miss updates in sphinx_needs.__version__, changelog.rst, and .github/workflows/docker !!! +version = "2.0.0" description = "Sphinx needs extension for managing needs/requirements and specifications" authors = ["team useblocks "] diff --git a/sphinx_needs/__init__.py b/sphinx_needs/__init__.py index 61e4c9f42..c1e4c66d1 100644 --- a/sphinx_needs/__init__.py +++ b/sphinx_needs/__init__.py @@ -1 +1 @@ -from sphinx_needs.needs import setup # noqa: F401 +from sphinx_needs.needs import __version__, setup # noqa: F401 diff --git a/sphinx_needs/needs.py b/sphinx_needs/needs.py index 179a0274f..077d5d65b 100644 --- a/sphinx_needs/needs.py +++ b/sphinx_needs/needs.py @@ -104,7 +104,7 @@ from sphinx_needs.utils import INTERNALS, NEEDS_FUNCTIONS, node_match from sphinx_needs.warnings import process_warnings -VERSION = "1.3.0" +__version__ = VERSION = "2.0.0" NEEDS_FUNCTIONS.clear() _NODE_TYPES_T = Dict[Type[nodes.Element], Callable[[Sphinx, nodes.document, str, List[nodes.Element]], None]] From fab5238c420ebdfa68435eadbb097690a10ba300 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Mon, 13 Nov 2023 14:46:08 +0000 Subject: [PATCH 2/3] update --- docs/changelog.rst | 13 ++++++++----- docs/installation.rst | 2 ++ noxfile.py | 11 +++++++++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 2d85928e1..dedd5e435 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -13,20 +13,23 @@ License ----- :Released: 13.11.2023 -:Full Changelog: `https://github.com/useblocks/sphinx-needs/compare/1.3.0...v2.0.0`_ +:Full Changelog: `1.3.0...v2.0.0 `__ + +This release is focussed on improving the internal code-base and its build time performance, as well as improved build warnings and other functionality improvements / fixes. Changed ....... -* Update to Sphinx 7 and drop Python 3.7 (`#1056 `_) -* Make matplotlib dependency optional (`#1061 `_) -* Change ``NeedsBuilder`` format to ``needs`` (`#978 `_) +* Add Sphinx 7 support and drop Python 3.7 (`#1056 `_). + Sphinx 5, 6, 7 and Python 3.8 to 3.11 are now fully supported and tested. +* The ``matplotlib`` dependency (for ``needbar`` and ``needpie`` plots) is now optional, and should be installed with ``sphinx-needs[plotting]``, see :ref:`installation` (`#1061 `_) +* The ``NeedsBuilder`` format name is changed to ``needs`` (`#978 `_) New ... * Added Builder :ref:`needs_id_builder` and config option :ref:`needs_build_json_per_id` in ``conf.py`` (`#960 `_) -* Added `needs_reproducible_json` config option (`#1065 `_) +* Added ``needs_reproducible_json`` config option for the needs builder, see :ref:`needs_build_json` (`#1065 `_) * Added error messages for constraint failures (`#1036 `_) Improved diff --git a/docs/installation.rst b/docs/installation.rst index bccf43faa..32991a688 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,3 +1,5 @@ +.. _installation: + Installation ============ diff --git a/noxfile.py b/noxfile.py index c4a8cb9ee..467cb545e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -68,8 +68,15 @@ def pre_commit(session): session.run("pre-commit", "run", "--all-files", *session.posargs, external=True) -@session(python="3.10") +@session(python="3.11") def linkcheck(session): session.install(".[docs]") with session.chdir("docs"): - session.run("sphinx-build", "-b", "linkcheck", ".", "_build", *session.posargs, external=True) + session.run("sphinx-build", "-b", "linkcheck", ".", "_build/linkcheck", *session.posargs, external=True) + + +@session(python="3.11") +def docs(session): + session.install(".[docs]") + with session.chdir("docs"): + session.run("sphinx-build", ".", "_build", *session.posargs, external=True) From 4623cc70d161c6b777e0d35a4dcd9383b6a74054 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Mon, 13 Nov 2023 14:56:10 +0000 Subject: [PATCH 3/3] Update changelog.rst --- docs/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index dedd5e435..0cbb8d403 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -13,7 +13,7 @@ License ----- :Released: 13.11.2023 -:Full Changelog: `1.3.0...v2.0.0 `__ +:Full Changelog: `1.3.0...v2.0.0 `__ This release is focussed on improving the internal code-base and its build time performance, as well as improved build warnings and other functionality improvements / fixes.