From 5344ac5ea14f2c499204ec6261726e4899624984 Mon Sep 17 00:00:00 2001 From: jce <28319872+JasperCraeghs@users.noreply.github.com> Date: Tue, 18 Oct 2022 21:21:02 +0200 Subject: [PATCH 1/3] Count valid warning of self_test again --- tools/doc-warnings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/doc-warnings.json b/tools/doc-warnings.json index dcb3ad6a..72122e76 100644 --- a/tools/doc-warnings.json +++ b/tools/doc-warnings.json @@ -1,8 +1,8 @@ { "sphinx": { "enabled": true, - "min": 23, - "max": 23, + "min": 24, + "max": 24, "exclude": [ "WARNING: the mlx.traceability extension is not safe for parallel reading", "WARNING: doing serial read" From 8b8a360de5a2574ccb65258d3876d8e1dd95adee Mon Sep 17 00:00:00 2001 From: jce <28319872+JasperCraeghs@users.noreply.github.com> Date: Wed, 19 Oct 2022 10:07:48 +0200 Subject: [PATCH 2/3] Don't yield relation if there are no targets --- mlx/traceable_item.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlx/traceable_item.py b/mlx/traceable_item.py index 04033724..88950b71 100644 --- a/mlx/traceable_item.py +++ b/mlx/traceable_item.py @@ -60,7 +60,8 @@ def all_relations(self): targets.update(self.explicit_relations[relation]) if relation in self.implicit_relations: targets.update(self.implicit_relations[relation]) - yield relation, natsorted(targets) + if targets: + yield relation, natsorted(targets) @staticmethod def _add_relations(relations_of_self, relations_of_other): From d2e73fe893bc3d5489aa47af1aa3fdefaa703c9e Mon Sep 17 00:00:00 2001 From: jce <28319872+JasperCraeghs@users.noreply.github.com> Date: Wed, 19 Oct 2022 16:03:53 +0200 Subject: [PATCH 3/3] Test item-relink after item-link --- doc/unit_test.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/unit_test.rst b/doc/unit_test.rst index de2c4d5f..10124de4 100644 --- a/doc/unit_test.rst +++ b/doc/unit_test.rst @@ -10,6 +10,8 @@ Unit Tests Unit Tests for mlx.traceability ------------------------------- +.. test item-link defined before item-relink and item definitions: item-link shall always be processed first + .. item-relink:: :remap: RQT-ATTRIBUTES_FAKE :target: RQT-ATTRIBUTES @@ -57,4 +59,15 @@ Unit Tests for mlx.traceability :validates: RQT-MATRIX .. item:: UTEST_ITEM_DIRECTIVE-MAKE_INTERNAL_ITEM_REF_SHOW_CAPTION - :validates: RQT-CAPTION + +.. test item-relink defined after item-link and item definitions: item-link shall always be processed first + +.. item-link:: + :sources: nonexistent_item + :targets: RQT-CAPTION + :type: validates + +.. item-relink:: + :remap: nonexistent_item + :target: UTEST_ITEM_DIRECTIVE-MAKE_INTERNAL_ITEM_REF_SHOW_CAPTION + :type: validated_by