From 98314fa7f6786e69bd4f4cc24d94cda7cf89ec17 Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 10:45:20 +0200 Subject: [PATCH 01/11] add docs in BasicConfig --- .../common/_config/__init__.py | 30 +++++++++-- tests/test_common/test_config.py | 52 ++++++++++++++++++- 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/src/detectmatelibrary/common/_config/__init__.py b/src/detectmatelibrary/common/_config/__init__.py index 12b86205..468c0581 100644 --- a/src/detectmatelibrary/common/_config/__init__.py +++ b/src/detectmatelibrary/common/_config/__init__.py @@ -3,7 +3,7 @@ __all__ = ["ConfigMethods", "generate_detector_config", "EventsConfig", "BasicConfig"] -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from typing_extensions import Self from typing import Any, Dict @@ -23,10 +23,30 @@ class BasicConfig(BaseModel): model_config = ConfigDict(extra="forbid") - method_type: str = "default_method_type" - component_type: str = "default_type" - - auto_config: bool = False + method_type: str = Field( + default="default_method_type", + description="Indicates what type of method is." + ) + component_type: str = Field( + default="default_type", + description="Component type that the class inherent from." + ) + + auto_config: bool = Field( + default=False, + description="Runs the configuration step before the training process." + ) + + def get_docs(self) -> list[dict[str, str]]: + docs = [] + for field_name, field_info in self.model_json_schema().get("properties", {}).items(): + docs.append({ + "Name": field_name, + "Type": field_info.get("type", "unknown"), + "Default value": getattr(self, field_name), + "Description": field_info.get("description", "No description provided.") + }) + return docs def get_config(self) -> Dict[str, Any]: """Return the configuration as a dictionary.""" diff --git a/tests/test_common/test_config.py b/tests/test_common/test_config.py index d83c5960..86dfc467 100644 --- a/tests/test_common/test_config.py +++ b/tests/test_common/test_config.py @@ -8,7 +8,7 @@ ) from detectmatelibrary.common._config._formats import EventsConfig, _EventConfig from detectmatelibrary.common._config import BasicConfig -from pydantic import ValidationError +from pydantic import ValidationError, Field from tests.test_data import TEST_CONFIG import pytest import yaml @@ -22,6 +22,56 @@ def load_test_config() -> dict: config_test = load_test_config() +class DummyConfigDoc(BasicConfig): + hello: str = Field(default="Hello", description="a way to salute people") + auto_config: bool = Field( + default=True, + description="Runs the configuration step before the training process." + ) + + +class TestConfigDocs: + def test_get_configs(self): + docs = BasicConfig().get_docs() + + assert len(docs) == 3 + assert { + 'Name': 'method_type', + 'Type': 'string', + 'Default value': 'default_method_type', + 'Description': 'Indicates what type of method is.' + } in docs + assert { + 'Name': 'component_type', + 'Type': 'string', + 'Default value': 'default_type', + 'Description': 'Component type that the class inherent from.' + } in docs + assert { + 'Name': 'auto_config', + 'Type': 'boolean', + 'Default value': False, + 'Description': 'Runs the configuration step before the training process.' + } in docs + + def test_inherent_class_docs(self): + docs = DummyConfigDoc().get_docs() + + assert len(docs) == 4 + assert { + 'Name': 'auto_config', + 'Type': 'boolean', + 'Default value': True, + 'Description': 'Runs the configuration step before the training process.' + } in docs + assert { + 'Name': 'hello', + 'Type': 'string', + 'Default value': 'Hello', + 'Description': 'a way to salute people' + } in docs + + class TestConfigMethods: def test_get_method(self): config = ConfigMethods.get_method( From 21006ef3feec500f7c896a1a0018a702234332aa Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 10:53:31 +0200 Subject: [PATCH 02/11] add documentation to the coreconfig --- src/detectmatelibrary/common/core.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/detectmatelibrary/common/core.py b/src/detectmatelibrary/common/core.py index 7d52d54c..b5947233 100644 --- a/src/detectmatelibrary/common/core.py +++ b/src/detectmatelibrary/common/core.py @@ -13,6 +13,7 @@ from typing import Any, Dict, List +from pydantic import Field from detectmatelibrary.utils.persistency.component_interfaces import PersistencyOp from detectmatelibrary.utils.persistency.component_interfaces import Stoppable @@ -46,10 +47,22 @@ def __iter__(self) -> "TrainBuffer": # Core component skeleton structure ################################################ class CoreConfig(BasicConfig): - start_id: int = 10 - data_use_training: int | None = None - data_use_configure: int | None = None - use_config_data_as_training: bool = True + start_id: int = Field( + default=10, + description="Number use to start the unique ID generator." + ) + data_use_training: int | None = Field( + default=None, + description="Data use for training, if None, training is not done." + ) + data_use_configure: int | None = Field( + default=None, + description="Data use for configuration, if None, configuration is not done.", + ) + use_config_data_as_training: bool = Field( + default=True, + description="Combine the configure data in the training process if True." + ) class Component: From 7949af7563846c713f55f453c5684f2bef7eb69b Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 10:57:55 +0200 Subject: [PATCH 03/11] allow to ignore fields --- src/detectmatelibrary/common/_config/__init__.py | 5 ++++- tests/test_common/test_config.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/detectmatelibrary/common/_config/__init__.py b/src/detectmatelibrary/common/_config/__init__.py index 468c0581..ed5d37b8 100644 --- a/src/detectmatelibrary/common/_config/__init__.py +++ b/src/detectmatelibrary/common/_config/__init__.py @@ -40,11 +40,14 @@ class BasicConfig(BaseModel): def get_docs(self) -> list[dict[str, str]]: docs = [] for field_name, field_info in self.model_json_schema().get("properties", {}).items(): + description = field_info.get("description", "No description provided.") + if "<$IGNORE$>" in description: + continue docs.append({ "Name": field_name, "Type": field_info.get("type", "unknown"), "Default value": getattr(self, field_name), - "Description": field_info.get("description", "No description provided.") + "Description": description }) return docs diff --git a/tests/test_common/test_config.py b/tests/test_common/test_config.py index 86dfc467..2d3d949f 100644 --- a/tests/test_common/test_config.py +++ b/tests/test_common/test_config.py @@ -24,6 +24,7 @@ def load_test_config() -> dict: class DummyConfigDoc(BasicConfig): hello: str = Field(default="Hello", description="a way to salute people") + dont_show: str = Field(default="a", description="<$IGNORE$> dont show stuff") auto_config: bool = Field( default=True, description="Runs the configuration step before the training process." From 4d48ada48ae1262e1d76a9854d6b87b1a08989b8 Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 11:05:51 +0200 Subject: [PATCH 04/11] add docs in coredetectorconfig --- src/detectmatelibrary/common/detector.py | 28 +++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/detectmatelibrary/common/detector.py b/src/detectmatelibrary/common/detector.py index 0efc2c99..1f6564c9 100644 --- a/src/detectmatelibrary/common/detector.py +++ b/src/detectmatelibrary/common/detector.py @@ -10,6 +10,7 @@ from typing_extensions import override from typing import Dict, List, Optional, Any, cast +from pydantic import Field from detectmatelibrary.utils.persistency.component_interfaces import PersistConfig from detectmatelibrary.utils.time_format_handler import TimeFormatHandler @@ -36,14 +37,25 @@ def _extract_logIDs( class CoreDetectorConfig(CoreConfig): - component_type: str = "detectors" - method_type: str = "core_detector" - parser: str = "" - - auto_config: bool = True - events: EventsConfig | dict[str, Any] = {} - global_instances: Dict[str, _EventInstance] = {} - persist: PersistConfig | None = None + component_type: str = Field(default="detectors", description="<$IGNORE$>") + method_type: str = Field(default="core_detector", description="<$IGNORE$>") + parser: str = Field( + default="", description="Name of the parser used." + ) + + auto_config: bool = Field( + default=True, + description="Runs the configuration step before the training process." + ) + events: EventsConfig | dict[str, Any] = Field( + default={}, description=EventsConfig.__doc__, + ) + global_instances: Dict[str, _EventInstance] = Field( + default={}, description=_EventInstance.__doc__ + ) + persist: PersistConfig | None = Field( + default=None, description="Persistence configuration, if None no persistency is use." + ) class CoreDetector(CoreComponent): From b4e6fe7b5dc2c69840b6e7ed771e294be5a23982 Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 11:09:43 +0200 Subject: [PATCH 05/11] add documentation to random detector --- src/detectmatelibrary/detectors/random_detector.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/detectmatelibrary/detectors/random_detector.py b/src/detectmatelibrary/detectors/random_detector.py index 6e2f2aa8..9f4fdaa0 100644 --- a/src/detectmatelibrary/detectors/random_detector.py +++ b/src/detectmatelibrary/detectors/random_detector.py @@ -1,4 +1,4 @@ -from detectmatelibrary.common._config._formats import EventsConfig, Variable +from detectmatelibrary.common._config._formats import Variable from detectmatelibrary.common.detector import CoreDetector, CoreDetectorConfig @@ -7,14 +7,17 @@ import detectmatelibrary.schemas as schemas from typing_extensions import override -from typing import List, Any +from typing import List + +from pydantic import Field import numpy as np class RandomDetectorConfig(CoreDetectorConfig): - method_type: str = "random_detector" - - events: EventsConfig | dict[str, Any] = {} + method_type: str = Field( + default="random_detector", + description="Indicates what type of method is." + ) class RandomDetector(CoreDetector): From 0fa6f7c870d851c3fa3158e49367674b104a9c41 Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 12:18:12 +0200 Subject: [PATCH 06/11] add first code version --- docs/detectors/random_detector.md | 49 ++++++++++++++++-------- docs/examples/config/update.py | 32 ++++++++++++++++ src/detectmatelibrary/common/detector.py | 2 +- 3 files changed, 65 insertions(+), 18 deletions(-) create mode 100644 docs/examples/config/update.py diff --git a/docs/detectors/random_detector.md b/docs/detectors/random_detector.md index 5bf112d1..5175b3f9 100644 --- a/docs/detectors/random_detector.md +++ b/docs/detectors/random_detector.md @@ -11,26 +11,41 @@ The Random Detector produces randomized alerts for incoming parsed logs. It is u The detector inspects incoming ParserSchema instances and, according to its configuration, emits alerts with synthetic content. It can be configured to sample specific log variables, set thresholds or control alert frequency. Use it for integration testing, load testing, or as a simple example of a detector implementation. -## Configuration example - + +| Field | Type | Default Value| Description| +|-------|------|-----|---| +|method_type|string|random_detector|Indicates what type of method is.| +|auto_config|boolean|True|Runs the configuration step before the training process.| +|start_id|integer|10|Number use to start the unique ID generator.| +|data_use_training|unknown|None|Data use for training, if None, training is not done.| +|data_use_configure|unknown|None|Data use for configuration, if None, configuration is not done.| +|use_config_data_as_training|boolean|True|Combine the configure data in the training process if True.| +|parser|string|PARSER|Name of the parser used.| +|events|unknown|{}|Events configuration dict keyed by event_id.| +|global_instances|object|{}|Configuration for a specific instance within an event.| +|persist|unknown|None|Persistence configuration, if None no persistency is use.| + + +## Service usage + +To use it in [DetectMateService](https://github.com/ait-detectmate/DetectMateService). + + ```yaml - RandomDetector: +detectors: + : method_type: random_detector - auto_config: False - params: {} - events: - 1: - test: - params: {} - variables: - - pos: 0 - name: var1 - params: - threshold: 0. - header_variables: - - pos: level - params: {} + auto_config: true + params: + start_id: 10 + data_use_training: null + data_use_configure: null + use_config_data_as_training: true + parser: PARSER + global_instances: {} + events: {} ``` + ## Example usage diff --git a/docs/examples/config/update.py b/docs/examples/config/update.py new file mode 100644 index 00000000..01dd8229 --- /dev/null +++ b/docs/examples/config/update.py @@ -0,0 +1,32 @@ +from detectmatelibrary.detectors.random_detector import RandomDetectorConfig + +from detectmatelibrary.common.core import CoreConfig + +import yaml + + +def update_docs(config: CoreConfig, doc_path: str) -> None: + arguments = "| Field | Type | Default Value| Description|\n|-------|------|-----|---|\n" + for arg in config.get_docs(): + arguments += f"|{arg['Name']}|{arg["Type"]}|{arg["Default value"]}|{arg["Description"]}|\n" + + with open(doc_path, "r") as f: + docs = f.readlines() + + start_idx = docs.index("\n") + end_idx = docs.index("\n") + docs = docs[:start_idx + 1] + [arguments] + docs[end_idx:] + + pretty_yaml = yaml.dump( + config.to_dict(""), indent=4, default_flow_style=False, sort_keys=False + ) + pretty_yaml = "```yaml\n" + pretty_yaml + "```\n" + start_idx = docs.index("\n") + end_idx = docs.index("\n") + docs = docs[:start_idx + 1] + [pretty_yaml] + docs[end_idx:] + + with open(doc_path, "w") as f: + f.writelines(docs) + + +update_docs(RandomDetectorConfig(), doc_path="docs/detectors/random_detector.md") diff --git a/src/detectmatelibrary/common/detector.py b/src/detectmatelibrary/common/detector.py index 1f6564c9..834020a9 100644 --- a/src/detectmatelibrary/common/detector.py +++ b/src/detectmatelibrary/common/detector.py @@ -40,7 +40,7 @@ class CoreDetectorConfig(CoreConfig): component_type: str = Field(default="detectors", description="<$IGNORE$>") method_type: str = Field(default="core_detector", description="<$IGNORE$>") parser: str = Field( - default="", description="Name of the parser used." + default="PARSER", description="Name of the parser used." ) auto_config: bool = Field( From 13aa001678dd775b5a2b975fb34849b80ec79586 Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 12:30:31 +0200 Subject: [PATCH 07/11] correction of config types dpc --- docs/detectors/random_detector.md | 7 +++---- src/detectmatelibrary/common/_config/__init__.py | 16 +++++++++------- src/detectmatelibrary/common/detector.py | 2 +- tests/test_common/test_config.py | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/detectors/random_detector.md b/docs/detectors/random_detector.md index 5175b3f9..81001a5f 100644 --- a/docs/detectors/random_detector.md +++ b/docs/detectors/random_detector.md @@ -17,13 +17,12 @@ The detector inspects incoming ParserSchema instances and, according to its conf |method_type|string|random_detector|Indicates what type of method is.| |auto_config|boolean|True|Runs the configuration step before the training process.| |start_id|integer|10|Number use to start the unique ID generator.| -|data_use_training|unknown|None|Data use for training, if None, training is not done.| -|data_use_configure|unknown|None|Data use for configuration, if None, configuration is not done.| +|data_use_training|integer, null|None|Data use for training, if None, training is not done.| +|data_use_configure|integer, null|None|Data use for configuration, if None, configuration is not done.| |use_config_data_as_training|boolean|True|Combine the configure data in the training process if True.| |parser|string|PARSER|Name of the parser used.| -|events|unknown|{}|Events configuration dict keyed by event_id.| +|events|object|{}|Events configuration dict keyed by event_id.| |global_instances|object|{}|Configuration for a specific instance within an event.| -|persist|unknown|None|Persistence configuration, if None no persistency is use.| ## Service usage diff --git a/src/detectmatelibrary/common/_config/__init__.py b/src/detectmatelibrary/common/_config/__init__.py index ed5d37b8..6162d237 100644 --- a/src/detectmatelibrary/common/_config/__init__.py +++ b/src/detectmatelibrary/common/_config/__init__.py @@ -39,15 +39,17 @@ class BasicConfig(BaseModel): def get_docs(self) -> list[dict[str, str]]: docs = [] - for field_name, field_info in self.model_json_schema().get("properties", {}).items(): - description = field_info.get("description", "No description provided.") - if "<$IGNORE$>" in description: + for field_na, field_info in self.model_json_schema().get("properties", {}).items(): + desc = field_info.get("description", "No description provided.") + if "<$IGNORE$>" in desc: continue + type_ = field_info.get("type", "unknown") + if 'anyOf' in field_info: + types = [item['type'] for item in field_info['anyOf'] if 'type' in item] + type_ = ", ".join(types) + docs.append({ - "Name": field_name, - "Type": field_info.get("type", "unknown"), - "Default value": getattr(self, field_name), - "Description": description + "Name": field_na, "Type": type_, "Default value": getattr(self, field_na), "Description": desc }) return docs diff --git a/src/detectmatelibrary/common/detector.py b/src/detectmatelibrary/common/detector.py index 834020a9..ba3fe862 100644 --- a/src/detectmatelibrary/common/detector.py +++ b/src/detectmatelibrary/common/detector.py @@ -54,7 +54,7 @@ class CoreDetectorConfig(CoreConfig): default={}, description=_EventInstance.__doc__ ) persist: PersistConfig | None = Field( - default=None, description="Persistence configuration, if None no persistency is use." + default=None, description="<$IGNORE$>" ) diff --git a/tests/test_common/test_config.py b/tests/test_common/test_config.py index 2d3d949f..09cbfc86 100644 --- a/tests/test_common/test_config.py +++ b/tests/test_common/test_config.py @@ -23,7 +23,7 @@ def load_test_config() -> dict: class DummyConfigDoc(BasicConfig): - hello: str = Field(default="Hello", description="a way to salute people") + hello: str | None = Field(default="Hello", description="a way to salute people") dont_show: str = Field(default="a", description="<$IGNORE$> dont show stuff") auto_config: bool = Field( default=True, @@ -67,7 +67,7 @@ def test_inherent_class_docs(self): } in docs assert { 'Name': 'hello', - 'Type': 'string', + 'Type': 'string, null', 'Default value': 'Hello', 'Description': 'a way to salute people' } in docs From 4e44ccc87db8489047b0d882c4c0faa0180271cf Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 12:43:16 +0200 Subject: [PATCH 08/11] random template ready --- docs/detectors/random_detector.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/detectors/random_detector.md b/docs/detectors/random_detector.md index 81001a5f..b10998c3 100644 --- a/docs/detectors/random_detector.md +++ b/docs/detectors/random_detector.md @@ -1,15 +1,17 @@ # Random Detector -The Random Detector produces randomized alerts for incoming parsed logs. It is useful for testing pipelines, alert routing, and downstream consumers without needing a real detection model. +The Random Detector inspects incoming ParserSchema instances and, according to its configuration, emits alerts with synthetic content. It can be configured to sample specific log variables, set thresholds or control alert frequency. Use it for integration testing, load testing, or as a simple example of a detector implementation. + +## In/out | | Schema | Description | |------------|------------------------|--------------------| | **Input** | [ParserSchema](../schemas.md) | Structured log | | **Output** | [DetectorSchema](../schemas.md) | Generated alerts | -## Description +## Configuration arguments -The detector inspects incoming ParserSchema instances and, according to its configuration, emits alerts with synthetic content. It can be configured to sample specific log variables, set thresholds or control alert frequency. Use it for integration testing, load testing, or as a simple example of a detector implementation. +Arguments used in the initalization of the component. | Field | Type | Default Value| Description| @@ -25,9 +27,13 @@ The detector inspects incoming ParserSchema instances and, according to its conf |global_instances|object|{}|Configuration for a specific instance within an event.| +## Examples + +Examples to use the component in the DetectMate environment. + ## Service usage -To use it in [DetectMateService](https://github.com/ait-detectmate/DetectMateService). +To use it in [DetectMateService](https://github.com/ait-detectmate/DetectMateService), you can use the example bellow. ```yaml @@ -46,7 +52,9 @@ detectors: ``` -## Example usage +## Library usage + +To use it as a python script, you can follow the example bellow. ```python --8<-- "docs/examples/detectors/random_detector.py:example" From 7e4f4514b7b7b0046db35cc7eae7c5b8f8e08a3e Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 12:57:50 +0200 Subject: [PATCH 09/11] refactor code --- docs/detectors/random_detector.md | 2 ++ docs/examples/config/update.py | 58 ++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/docs/detectors/random_detector.md b/docs/detectors/random_detector.md index b10998c3..a2d41ce1 100644 --- a/docs/detectors/random_detector.md +++ b/docs/detectors/random_detector.md @@ -4,6 +4,8 @@ The Random Detector inspects incoming ParserSchema instances and, according to i ## In/out +Input and output schemas in the pipeline + | | Schema | Description | |------------|------------------------|--------------------| | **Input** | [ParserSchema](../schemas.md) | Structured log | diff --git a/docs/examples/config/update.py b/docs/examples/config/update.py index 01dd8229..12591556 100644 --- a/docs/examples/config/update.py +++ b/docs/examples/config/update.py @@ -5,28 +5,54 @@ import yaml -def update_docs(config: CoreConfig, doc_path: str) -> None: +# %% Methods +def append_docs(docs: str, start_cmd: str, end_cmd: str, add: str) -> None: + start_idx = docs.index(start_cmd) + end_idx = docs.index(end_cmd) + if start_idx < end_idx: + raise Exception(f"'{start_cmd}' should be before '{end_cmd}'") + + return docs[:start_idx + 1] + [add] + docs[end_idx:] + + +def get_arguments(config: CoreConfig) -> str: arguments = "| Field | Type | Default Value| Description|\n|-------|------|-----|---|\n" for arg in config.get_docs(): arguments += f"|{arg['Name']}|{arg["Type"]}|{arg["Default value"]}|{arg["Description"]}|\n" + return arguments - with open(doc_path, "r") as f: - docs = f.readlines() - - start_idx = docs.index("\n") - end_idx = docs.index("\n") - docs = docs[:start_idx + 1] + [arguments] + docs[end_idx:] +def config_yaml(config: CoreConfig) -> str: pretty_yaml = yaml.dump( - config.to_dict(""), indent=4, default_flow_style=False, sort_keys=False - ) - pretty_yaml = "```yaml\n" + pretty_yaml + "```\n" - start_idx = docs.index("\n") - end_idx = docs.index("\n") - docs = docs[:start_idx + 1] + [pretty_yaml] + docs[end_idx:] - - with open(doc_path, "w") as f: - f.writelines(docs) + config.to_dict(""), indent=4, default_flow_style=False, sort_keys=False + ) + return "```yaml\n" + pretty_yaml + "```\n" +def update_docs(config: CoreConfig, doc_path: str) -> None: + try: + with open(doc_path, "r") as f: + docs = f.readlines() + + docs = append_docs( + docs=docs, + start_cmd="\n", + end_cmd="\n", + add=get_arguments(config) + ) + + docs = append_docs( + docs=docs, + start_cmd="\n", + end_cmd="\n", + add=config_yaml(config) + ) + + with open(doc_path, "w") as f: + f.writelines(docs) + except Exception as e: + raise Exception(f"While updating {doc_path} -> {str(e)}") + + +# %% Documentation update update_docs(RandomDetectorConfig(), doc_path="docs/detectors/random_detector.md") From 434d2f15cc0b6dabd149fe1aef74978b67b5ef5d Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 13:02:24 +0200 Subject: [PATCH 10/11] minor correction --- docs/examples/config/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/config/update.py b/docs/examples/config/update.py index 12591556..96a2687a 100644 --- a/docs/examples/config/update.py +++ b/docs/examples/config/update.py @@ -9,7 +9,7 @@ def append_docs(docs: str, start_cmd: str, end_cmd: str, add: str) -> None: start_idx = docs.index(start_cmd) end_idx = docs.index(end_cmd) - if start_idx < end_idx: + if start_idx > end_idx: raise Exception(f"'{start_cmd}' should be before '{end_cmd}'") return docs[:start_idx + 1] + [add] + docs[end_idx:] From 1c35f5d9d072869259f9cae8ab6e94c285491bfb Mon Sep 17 00:00:00 2001 From: "angre.garcia-gomez@ait.ac.at" Date: Wed, 26 Aug 2026 13:08:05 +0200 Subject: [PATCH 11/11] remove unused methods --- src/detectmatelibrary/common/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detectmatelibrary/common/core.py b/src/detectmatelibrary/common/core.py index 41a67a4e..4752ed38 100644 --- a/src/detectmatelibrary/common/core.py +++ b/src/detectmatelibrary/common/core.py @@ -14,7 +14,7 @@ from detectmatelibrary.tools.logging import logger, setup_logging -from typing import Any, Dict, List +from typing import Any from pydantic import Field from detectmatelibrary.utils.persistency.component_interfaces import PersistencyOp