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

WIP docs

parent 3662b976
No related branches found
No related tags found
2 merge requests!39Release 0.4.0,!20created draft for generic analysis method
Pipeline #16472 passed
...@@ -24,26 +24,23 @@ ...@@ -24,26 +24,23 @@
# #
""" """
module description A small script that creates an Analysis Record that can be used for testing the
automated analysis pipeline.
""" """
import sys import sys
from datetime import datetime
import caosdb as db import caosdb as db
def main(): def main():
# TODO remove fixed path
script = db.File( script = db.File(
file="../src/caosadvancedtools/serverside/examples/example_script.py", file="../src/caosadvancedtools/serverside/examples/example_script.py",
path="Analysis/scripts/example_script.py", path=("AutomatedAnalysis/scripts/"
+ str(datetime.now())+"example_script.py"),
) )
try: script.insert()
script.insert()
except:
script = db.execute_query(
"FIND FILE which is stored at 'Analysis/scripts/example_script.py'",
unique=True)
da = db.Record() da = db.Record()
da.add_parent("Analysis") da.add_parent("Analysis")
...@@ -52,7 +49,6 @@ def main(): ...@@ -52,7 +49,6 @@ def main():
value=db.execute_query( value=db.execute_query(
"FIND FILE which is stored at '**/timeseries.npy'", "FIND FILE which is stored at '**/timeseries.npy'",
unique=True), unique=True),
# datatype=db.LIST(db.FILE)
) )
da.add_property("date", "2020-01-01") da.add_property("date", "2020-01-01")
da.add_property("identifier", "TEST") da.add_property("identifier", "TEST")
......
...@@ -67,6 +67,8 @@ echo "Testing im and export" ...@@ -67,6 +67,8 @@ echo "Testing im and export"
python3 test_im_und_export.py python3 test_im_und_export.py
# automated analysis # automated analysis
# for some reason the loadFiles of sim data has to be called again
python3 -m caosadvancedtools.loadFiles /opt/caosdb/mnt/extroot/SimulationData
python3 create_analysis.py python3 create_analysis.py
# Better safe than sorry: # Better safe than sorry:
......
...@@ -24,7 +24,12 @@ ...@@ -24,7 +24,12 @@
# #
""" """
module description Exemplary update script. An anlysis Record is retrieved and passed to the
generic run function which then calls the appropriate script based on the
Record.
The simple query here could be replaced with something that e.g. retrieves all
entities that where changed within a certain period of time.
""" """
import sys import sys
......
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