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
69e07f7b
Commit
69e07f7b
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: use $ sign for in and out
parent
1937ca9a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!160
STY: styling
,
!126
Transformers
Pipeline
#45674
passed
1 year ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/caoscrawler/converters.py
+1
-1
1 addition, 1 deletion
src/caoscrawler/converters.py
src/caoscrawler/scanner.py
+1
-1
1 addition, 1 deletion
src/caoscrawler/scanner.py
unittests/test_directories/test_transformers/cfood.yml
+2
-2
2 additions, 2 deletions
unittests/test_directories/test_transformers/cfood.yml
with
4 additions
and
4 deletions
src/caoscrawler/converters.py
+
1
−
1
View file @
69e07f7b
...
...
@@ -446,7 +446,7 @@ class Converter(object, metaclass=ABCMeta):
match
=
SINGLE_VAR_RE
.
match
(
transformer
[
"
out
"
])
if
match
is
None
:
raise
RuntimeError
(
"'
out
'
of the transformer definition must specify a single
"
"
variable name
"
)
f
"
variable name
. It was
{
transformer
[
'
out
'
]
}
"
)
print
(
f
"
set
{
match
.
group
(
'
varname
'
)
}
to
{
out_value
}
"
)
values
[
match
.
group
(
'
varname
'
)]
=
out_value
...
...
This diff is collapsed.
Click to expand it.
src/caoscrawler/scanner.py
+
1
−
1
View file @
69e07f7b
...
...
@@ -211,7 +211,7 @@ def create_transformer_registry(definition: dict):
}
# Load modules and associate classes:
for
key
,
value
in
transformer_
registry
.
items
():
for
key
,
value
in
transformer_
def
.
items
():
module
=
importlib
.
import_module
(
value
[
"
package
"
])
registry
[
key
]
=
getattr
(
module
,
value
[
"
function
"
])
return
registry
...
...
This diff is collapsed.
Click to expand it.
unittests/test_directories/test_transformers/cfood.yml
+
2
−
2
View file @
69e07f7b
...
...
@@ -11,7 +11,7 @@ RootDir:
transform
:
MakeDayLong
:
in
:
$day_short
out
:
day_long
# no dollar sign here, because this is a variable name and no expression
out
:
$
day_long
functions
:
-
ifelse
:
# name of the function
match
:
Mon
# match is one specific argument
...
...
@@ -21,7 +21,7 @@ RootDir:
then
:
Tuesday
TestSplit
:
in
:
$day_short
out
:
day_split
# no dollar sign here, because this is a variable name and no expression
out
:
$
day_split
functions
:
-
split
:
marker
:
o
...
...
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