-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add_config_report_dead_links
- Loading branch information
Showing
28 changed files
with
226 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.idea | ||
.venv* | ||
.pvenv | ||
|
||
.nox | ||
node_modules | ||
|
||
.envrc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ sphinxcontrib-programoutput | |
sphinx-design | ||
click | ||
tabulate | ||
sphinx-immaterial==0.11.2 | ||
sphinx-immaterial==0.11.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/doc_test/doc_needs_filter_func_allow_dirty_filter/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = needstestdocs | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
57 changes: 57 additions & 0 deletions
57
tests/doc_test/doc_needs_filter_func_allow_dirty_filter/conf.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Configuration file for Sphinx-Needs Documentation. | ||
|
||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) | ||
|
||
# -- General configuration ------------------------------------------------ | ||
|
||
project = "Useblocks Sphinx-Needs Test" | ||
copyright = "2023, Useblocks GmbH" | ||
author = "Teams Useblocks" | ||
version = "1.0" | ||
|
||
extensions = ["sphinx_needs", "sphinxcontrib.plantuml"] | ||
|
||
needs_id_regex = "^[A-Za-z0-9_]*" | ||
|
||
needs_types = [ | ||
{"directive": "feature", "title": "Feature", "prefix": "FE_", "color": "#FEDCD2", "style": "node"}, | ||
{"directive": "usecase", "title": "Use Case", "prefix": "USE_", "color": "#DF744A", "style": "node"}, | ||
] | ||
|
||
needs_extra_options = ["ti", "tcl"] | ||
|
||
needs_extra_links = [ | ||
{ | ||
"option": "features", | ||
"incoming": "featured by", | ||
"outgoing": "features", | ||
"copy": False, | ||
"style": "#Gold", | ||
"style_part": "#Gold", | ||
}, | ||
] | ||
|
||
needs_allow_unsafe_filters = True | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ["_templates"] | ||
|
||
# Doc info | ||
source_suffix = ".rst" | ||
master_doc = "index" | ||
language = "en" | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This patterns also effect to html_static_path and html_extra_path | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
# -- Options for HTML output ---------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = "alabaster" |
14 changes: 14 additions & 0 deletions
14
tests/doc_test/doc_needs_filter_func_allow_dirty_filter/filter_func.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
def my_own_filter(needs, results, **kwargs): | ||
needs_dict = {x["id"]: x for x in needs} | ||
curr_need_id = kwargs["arg1"] | ||
link_type = kwargs["arg2"] | ||
|
||
for link_id in needs_dict[curr_need_id][link_type]: | ||
if needs_dict[curr_need_id]["ti"] == "1": | ||
needs_dict[link_id]["tcl"] = "10" | ||
elif needs_dict[curr_need_id]["ti"] == "3": | ||
needs_dict[link_id]["tcl"] = "30" | ||
else: | ||
needs_dict[link_id]["tcl"] = "unknown" | ||
|
||
results.append(needs_dict[link_id]) |
31 changes: 31 additions & 0 deletions
31
tests/doc_test/doc_needs_filter_func_allow_dirty_filter/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Needs Data to be filtered | ||
========================= | ||
|
||
.. feature:: Feature 001 | ||
:id: FE_001 | ||
|
||
Example feature 001 content. | ||
|
||
.. usecase:: Usecase 001 | ||
:id: USE_001 | ||
:ti: 1 | ||
:features: FE_001 | ||
|
||
Example tesusecaset 001 content. | ||
|
||
.. needtable:: Filter func table 001 | ||
:style: table | ||
:columns: id, title, tcl | ||
:filter-func: filter_func.my_own_filter(USE_001,features) | ||
|
||
.. usecase:: Usecase 002 | ||
:id: USE_002 | ||
:ti: 3 | ||
:features: FE_001 | ||
|
||
Example usecase 002 content. | ||
|
||
.. needtable:: Filter func table 002 | ||
:style: table | ||
:columns: id, title, tcl | ||
:filter-func: filter_func.my_own_filter(USE_002,features) |
Oops, something went wrong.