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
913c7319
Commit
913c7319
authored
3 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
bfa5a598
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
Treat dependencies among identifiables
Pipeline
#9726
passed
3 years ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
integrationtests/filldb.sh
+1
-0
1 addition, 0 deletions
integrationtests/filldb.sh
integrationtests/insert_some.py
+19
-0
19 additions, 0 deletions
integrationtests/insert_some.py
with
20 additions
and
0 deletions
integrationtests/filldb.sh
+
1
−
0
View file @
913c7319
...
...
@@ -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 /
This diff is collapsed.
Click to expand it.
integrationtests/insert_some.py
0 → 100644
+
19
−
0
View file @
913c7319
#!/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
()
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