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
c51e5876
Commit
c51e5876
authored
1 year ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
DOC/API: name of ifelse was changed to submatch
parent
c233f07f
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!160
STY: styling
,
!126
Transformers
Pipeline
#45810
failed
1 year ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caoscrawler/transformer_functions.py
+6
-3
6 additions, 3 deletions
src/caoscrawler/transformer_functions.py
with
6 additions
and
3 deletions
src/caoscrawler/transformer_functions.py
+
6
−
3
View file @
c51e5876
...
@@ -27,9 +27,12 @@ import re
...
@@ -27,9 +27,12 @@ import re
from
typing
import
Any
from
typing
import
Any
def
ifelse
(
in_value
:
Any
,
in_parameters
:
dict
):
def
submatch
(
in_value
:
Any
,
in_parameters
:
dict
):
"""
returns the first argument if it does NOT match the reg exp of
'
match
'
stored in the second
"""
argument, other wise the value of
'
then
'
stored in the second argument is returned.
Substitute the variable if it matches the regexp stored in
"
match
"
.
Returns the
"
in
"
value if it does NOT match the reg exp of
'
match
'
.
Otherwise (if it matches) the value of
'
then
'
stored in the second argument is returned.
"""
"""
if
"
match
"
not
in
in_parameters
or
"
then
"
not
in
in_parameters
:
if
"
match
"
not
in
in_parameters
or
"
then
"
not
in
in_parameters
:
raise
RuntimeError
(
"
Mandatory parameters missing.
"
)
raise
RuntimeError
(
"
Mandatory parameters missing.
"
)
...
...
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