From 9029b5304bdd14acbca715c14f5c878e25f7aa0c Mon Sep 17 00:00:00 2001 From: Daniel Hornung <d.hornung@indiscale.com> Date: Mon, 31 May 2021 16:42:29 +0200 Subject: [PATCH] DOC: Updated documentation a bit. --- README_SETUP.md | 2 +- integrationtests/crawl.py | 2 +- .../extroot/{.cerate_dir => .create_dir} | 0 src/doc/crawler.rst | 14 +++++++++----- 4 files changed, 11 insertions(+), 7 deletions(-) rename integrationtests/extroot/{.cerate_dir => .create_dir} (100%) diff --git a/README_SETUP.md b/README_SETUP.md index 9b7b27ec..19f05163 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -34,7 +34,7 @@ For testing: 3. Start an empty (!) CaosDB instance (with the mounted extroot). The database will be cleared during testing, so it's important to use an empty instance. -4. Run `test.sh`. +4. Run `test.sh`. Note that this may modify content of the `integrationtest/extroot/` directory. ## Code Formatting `autopep8 -i -r ./` diff --git a/integrationtests/crawl.py b/integrationtests/crawl.py index bf72b5f7..65600016 100755 --- a/integrationtests/crawl.py +++ b/integrationtests/crawl.py @@ -43,7 +43,7 @@ except ModuleNotFoundError: return argparse.ArgumentParser() def print_success(text): - print("Success: "+text) + print("Success: " + text) def get_parser(): diff --git a/integrationtests/extroot/.cerate_dir b/integrationtests/extroot/.create_dir similarity index 100% rename from integrationtests/extroot/.cerate_dir rename to integrationtests/extroot/.create_dir diff --git a/src/doc/crawler.rst b/src/doc/crawler.rst index 7c95dad9..391c5458 100644 --- a/src/doc/crawler.rst +++ b/src/doc/crawler.rst @@ -75,7 +75,7 @@ The crawler can be executed directly via a python script (usually called ``crawl.py``). The script prints the progress and reports potential problems. The exact behavior depends on your setup. However, you can have a look at the example in the -`tests <https://gitlab.com/caosdb/caosdb-advanced-user-tools/-/blob/main/integrationtests/full_test/crawl.py>`__. +`tests <https://gitlab.indiscale.com/caosdb/src/caosdb-advanced-user-tools/-/blob/main/integrationtests/crawl.py>`__. .. Note:: The crawler depends on the CaosDB Python client, so make sure to install :doc:`pycaosdb <caosdb-pylib:getting_started>`. @@ -86,14 +86,18 @@ Typically, an invocation looks like: .. code:: python - python3 crawl.py "/TestData/" + python3 crawl.py /someplace/ -In this case ``/TestData/`` identifies the path to be crawled **within -the CaosDB file system**. You can browse the CaosDB file system by +.. Note:: For trying this out with the above mentioned example crawler from the integration tests, + make sure that the ``extroot`` directory in the ``integrationtests`` folder is used as + CaosDB's extroot directory,and call the crawler with ``python3 crawl.py /``. + +In this case ``/someplace/`` identifies the path to be crawled **within +CaosDB's file system**. You can browse the CaosDB file system by opening the WebUI of your CaosDB instance and clicking on “File Systemâ€. In the backend, ``crawl.py`` starts a CQL query -``FIND File WHICH IS STORED AT /TestData/**`` and crawls the resulting +``FIND File WHICH IS STORED AT /someplace/**`` and crawls the resulting files according to your customized ``CFoods``. Crawling may consist of two distinct steps: 1. Insertion of files (use -- GitLab