Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-advanced-user-tools
Commits
dce18d21
Commit
dce18d21
authored
3 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
WIP docs
parent
3662b976
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!39
Release 0.4.0
,
!20
created draft for generic analysis method
Pipeline
#16472
passed
3 years ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
integrationtests/create_analysis.py
+6
-10
6 additions, 10 deletions
integrationtests/create_analysis.py
integrationtests/test.sh
+2
-0
2 additions, 0 deletions
integrationtests/test.sh
integrationtests/update_analysis.py
+6
-1
6 additions, 1 deletion
integrationtests/update_analysis.py
with
14 additions
and
11 deletions
integrationtests/create_analysis.py
+
6
−
10
View file @
dce18d21
...
@@ -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
"
)
...
...
This diff is collapsed.
Click to expand it.
integrationtests/test.sh
+
2
−
0
View file @
dce18d21
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
integrationtests/update_analysis.py
+
6
−
1
View file @
dce18d21
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment