From 181f0fa14f98d0df897e54e5600e12aa85042084 Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Thu, 28 Oct 2021 12:15:03 +0200
Subject: [PATCH] DOC: Add excercise to README.md

---
 README.md        | 17 +++++++++++++++--
 example_cfood.py |  5 ++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index bbd78ff..f1cf0bb 100644
--- a/README.md
+++ b/README.md
@@ -23,13 +23,26 @@ where this file resides.
 Afterwards adjust the data model, the data and the crawler implementation in 
 `example_cfood.py` as you like.
 
+## Practice your crawling
+After executing `crawl.py` you'll notice that two new experiment records with a
+date and a result have been created. However, they are lacking the information
+about their project. As an excercise on your way towards developing your own
+crawler module, try to implement an project cfood that collects the project
+information from the directory name(s) within `data` and creates or updates a
+corresponding project record. Afterwards, extend `example_cfood.py` and
+`crawl.py` such that the project information is attached to the experiment
+records.
+
 ## Contributing
 
-Thank you very much to all contributers—[past, present](https://gitlab.com/caosdb/caosdb/-/blob/dev/HUMANS.md), and prospective ones.
+Thank you very much to all contributers—[past,
+present](https://gitlab.com/caosdb/caosdb/-/blob/dev/HUMANS.md), and prospective
+ones.
 
 ### Code of Conduct
 
-By participating, you are expected to uphold our [Code of Conduct](https://gitlab.com/caosdb/caosdb/-/blob/dev/CODE_OF_CONDUCT.md).
+By participating, you are expected to uphold our [Code of
+Conduct](https://gitlab.com/caosdb/caosdb/-/blob/dev/CODE_OF_CONDUCT.md).
 
 ## License
 
diff --git a/example_cfood.py b/example_cfood.py
index e131e7d..3256645 100644
--- a/example_cfood.py
+++ b/example_cfood.py
@@ -36,12 +36,15 @@ except ImportError:
 class ExampleCFood(AbstractFileCFood):
     @classmethod
     def get_re(cls):
-        # matches for example `data/2010_TestProject/2019-02-03/README.md`
+        # matches for example `data/2010_TestProject/2019-02-03/result.yml`
         # The following groups are created (values for the above example):
         # - project_identifier: 2010_TestProject
         # - project_year: 2010
         # - project_name: TestProject
         # - date: 2019-02-03
+        #
+        # Note that the project is not used in the following example (see
+        # excercise in the README.md).
 
         return (r".*/(?P<project_identifier>"
                 r"(?P<project_year>\d{4})_?(?P<project_name>((?!/).)*))/"
-- 
GitLab