From 78223c726d4f194ada4fdccb040fa2e99c79d09b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Mon, 8 Jan 2024 10:51:39 +0100
Subject: [PATCH] DOC: add docstrings

---
 src/caoscrawler/transformer_functions.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/caoscrawler/transformer_functions.py b/src/caoscrawler/transformer_functions.py
index 5746cb0a..35da68f5 100644
--- a/src/caoscrawler/transformer_functions.py
+++ b/src/caoscrawler/transformer_functions.py
@@ -28,6 +28,9 @@ from typing import Any
 
 
 def ifelse(in_value: Any, in_parameters: dict):
+    """returns the first argument if it does NOT match the reg exp of 'match' stored in the second
+    argument, other wise the value of 'then' stored in the second argument is returned.
+    """
     if "match" not in in_parameters or "then" not in in_parameters:
         raise RuntimeError("Mandatory parameters missing.")
     if re.match(in_parameters["match"], in_value) is not None:
@@ -36,6 +39,9 @@ def ifelse(in_value: Any, in_parameters: dict):
 
 
 def split(in_value: Any, in_parameters: dict):
+    """calls the string 'split' function on the first argument and uses the value of the key
+    'marker' stored in the second argument
+    """
     if "marker" not in in_parameters:
         raise RuntimeError("Mandatory parameter missing.")
     if not isinstance(in_value, str):
-- 
GitLab