Skip to content
Snippets Groups Projects
Verified Commit 0ad4e8e3 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

Merge branch 'f-loadfiles-doc' into f-xlsx-json

parents c6fc8880 7266d0f2
No related branches found
No related tags found
4 merge requests!100WIP: Filling XLSX: Seems to be working.,!94ENH: add framework for converting json schema into table templates,!93Filling XLSX: Everything except multiple choice.,!92ENH: xlsx template generator
Pipeline #48084 failed
......@@ -129,7 +129,14 @@ def create_re_for_file_list(files, localroot, remoteroot):
def loadpath(path, include, exclude, prefix, dryrun, forceAllowSymlinks, caosdbignore=None,
localpath=None):
localpath=None) -> dict:
"""
Returns
-------
inserted: dict
A dict with the files to be included for each of the ``include`` elements.
"""
if caosdbignore:
# create list of files and create regular expression for small chunks
......@@ -146,6 +153,7 @@ def loadpath(path, include, exclude, prefix, dryrun, forceAllowSymlinks, caosdbi
else:
includes = [include]
inserted = {}
# if no caosdbignore file is used, this iterates over a single include
for include in includes:
if dryrun:
......@@ -177,8 +185,9 @@ def loadpath(path, include, exclude, prefix, dryrun, forceAllowSymlinks, caosdbi
logger.info(
f"Made new files accessible: {len(files)}, combined size: {convert_size(totalsize)} ")
inserted[include] = files
return
return inserted
def main(argv=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment