Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
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 Crawler
Commits
e1a77209
Commit
e1a77209
authored
3 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-json-converter
parents
07ae221f
8b61db10
No related branches found
No related tags found
2 merge requests
!53
Release 0.1
,
!9
ENH: introduce JSON converter
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unittests/broken_cfoods/broken1.yml
+79
-0
79 additions, 0 deletions
unittests/broken_cfoods/broken1.yml
with
79 additions
and
0 deletions
unittests/broken_cfoods/broken1.yml
0 → 100644
+
79
−
0
View file @
e1a77209
Definitions
:
type
:
Definitions
#include "description.yml"
# Converter-Provenance
# DataAnalysis/project_dir/measurement/match/identifier
# Structure-Element-Provenance
# DataAnalysis/2020_SpeedOflight/2020-11-10_kram
DataAnalysis
:
# name of the converter
type
:
Directory_djskfj
match
:
DataAnalysis
subtree
:
&template
project_dir
:
# name of the first subtree element which is a converter
type
:
Directory
match
:
(?P<date>.*?)_(?P<identifier>.*)
records
:
Project
:
# this is an identifiable in this case
parents
:
-
Project
# not needed as the name is equivalent
date
:
$date
identifier
:
$identifier
subtree
:
measurement
:
# new name for folders on the 3rd level
type
:
Directory
match
:
(?P<date>[0-9]{4,4}-[0-9]{2,2}-[0-9]{2,2})(_(?P<identifier>.*))?
records
:
Measurement
:
date
:
$date
identifier
:
$identifier
project
:
$Project
subtree
:
README
:
type
:
MarkdownFile
# this is a subclass of converter File
# function signature: GeneralStore, StructureElement
# preprocessors: custom.caosdb.convert_values
match
:
^README\.md$
# how to make match case insensitive?
subtree
:
description
:
type
:
DictTextElement
match_value
:
(?P<description>.*)
match_name
:
description
records
:
Measurement
:
description
:
$description
responsible_single
:
type
:
DictTextElement
match_name
:
responsible
match_value
:
&person_regexp
((?P<first_name>.+) )?(?P<last_name>.+)
records
:
&responsible_records
Person
:
first_name
:
$first_name
last_name
:
$last_name
Measurement
:
# this uses the reference to the above defined record
responsible
:
+$Person
# each record also implicitely creates a variable
# with the same name. The "+" indicates, that
# this will become a list entry in list property
# "responsible" belonging to Measurement.
responsible_list
:
type
:
DictListElement
match_name
:
responsible
subtree
:
Person
:
type
:
TextElement
match
:
*person_regexp
records
:
*responsible_records
ExperimentalData
:
# name of the converter
type
:
Directory
match
:
ExperimentalData
subtree
:
*template
SimulationData
:
# name of the converter
type
:
Directory
match
:
SimulationData
subtree
:
*template
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