Skip to content
Snippets Groups Projects
Commit bda2ff4b authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Merge branch 'f-make-deps-fail' into f-ident-deps

parents 18a9ab02 6dce8894
No related branches found
No related tags found
1 merge request!7Treat dependencies among identifiables
......@@ -7,4 +7,5 @@ python3 -m caosadvancedtools.loadFiles /opt/caosdb/mnt/extroot/SimulationData
python3 -m caosadvancedtools.loadFiles /opt/caosdb/mnt/extroot/Publications
python3 -m caosadvancedtools.loadFiles /opt/caosdb/mnt/extroot/Software
python3 insert_model.py
python3 insert_some.py
python3 crawl.py /
#!/usr/bin/env python3
import caosdb as db
from caosadvancedtools.scifolder.experiment_cfood import dm
# This inserts two identifiables. When no dependencies are possible among
# identifiables, it should not be possible to find both: the experiment
# identifiable would for example not reference the correct project Record
project = db.Record(name='2010_TestProject')
project.add_parent(name=dm.Project)
project.insert()
experiment = db.Record()
experiment.add_parent(name=dm.Experiment)
experiment.add_property(
name=dm.date, value='2019-02-03')
experiment.add_property(name=dm.Project, value=project)
experiment.add_property(
name="identifier", value="empty_identifier")
experiment.insert()
Experiment:
obligatory_properties:
recommended_properties:
date:
datatype: DATETIME
description: 'date of the experiment'
......
......@@ -3,6 +3,7 @@ OUT=/tmp/crawler.output
ls
cat pycaosdb.ini
rm -rf cache.db
set -e
echo "Clearing database"
python3 clear_database.py
echo "Testing crawler without cfoods"
......@@ -29,7 +30,6 @@ echo "run crawler"
# rename the moved file
mv extroot/DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx_back extroot/DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx
# check whether there was something UNAUTHORIZED
set -e
grep "There where unauthorized changes" $OUT
# get the id of the run which is the last field of the output string
RUN_ID=$(grep "run id:" $OUT | awk '{ print $NF }')
......
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