From 0b01d3f078113135261df79bd1bd32cbfe75be16 Mon Sep 17 00:00:00 2001
From: Florian Spreckelsen <f.spreckelsen@indiscale.com>
Date: Wed, 7 Aug 2024 10:01:05 +0200
Subject: [PATCH] DOC: Improve docstrings in loadFiles

---
 src/caosadvancedtools/loadFiles.py | 35 ++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/src/caosadvancedtools/loadFiles.py b/src/caosadvancedtools/loadFiles.py
index 24b7ddc3..1c7d7bf9 100755
--- a/src/caosadvancedtools/loadFiles.py
+++ b/src/caosadvancedtools/loadFiles.py
@@ -181,7 +181,12 @@ def create_re_for_file_list(files, localroot, remoteroot):
 
 def loadpath(path, include, exclude, prefix, dryrun, forceAllowSymlinks, caosdbignore=None,
              localpath=None):
-    """Make all files in `path` available to the LinkAhead server as FILE entities.
+    """Make all files in `path` available to the LinkAhead server as
+    FILE entities.
+
+    Notes
+    -----
+    Run ``linkahead-loadfiles --help`` for more information and examples.
 
     Parameters
     ----------
@@ -190,9 +195,31 @@ def loadpath(path, include, exclude, prefix, dryrun, forceAllowSymlinks, caosdbi
         available as seen by the linkahead server (i.e., the path from
         within the Docker container in a typical LinkAhead Control
         setup.)
-    include : str
-        
-    
+    include : str or None
+        Regular expression matching the files that will be
+        included. If None, all files are matched. This is ignored if a
+        `caosdbignore` is provided.
+    exclude : str or None
+        Regular expression matching files that are to be included.
+    prefix : str
+        The prefix under which the files are to be inserted into
+        LinkAhead's file system.
+    dryrun : bool
+        Whether a dryrun should be performed.
+    forceAllowSymlinks : bool
+        Whether symlinks in the `path` to be inserted should be
+        processed.
+    caosdbignore : str, optional
+        Path to a caosdbignore file that defines which files shall be
+        included and which do not. The syntax is the same as in a
+        gitignore file. You must also provide the `localpath` option
+        since the check is done locally. If this is given, any
+        `include` is ignored.
+    localpath : str, optional
+        Path of `path` on the local machine. Only needed in the
+        combination with a `caosdbignore` file since it is processed
+        locally.
+
     """
 
     if caosdbignore:
-- 
GitLab