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
22b53f7a
Verified
Commit
22b53f7a
authored
3 months ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
STY, DOC: A few small changes to documentation and regression test.
parent
9f926381
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!217
TST: Make NamedTemporaryFiles Windows-compatible
,
!216
TST: Make NamedTemporaryFiles Windows-compatible
Pipeline
#60650
passed
3 months ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caoscrawler/converters/converters.py
+4
-4
4 additions, 4 deletions
src/caoscrawler/converters/converters.py
unittests/test_issues.py
+2
-2
2 additions, 2 deletions
unittests/test_issues.py
with
6 additions
and
6 deletions
src/caoscrawler/converters/converters.py
+
4
−
4
View file @
22b53f7a
...
...
@@ -1295,17 +1295,17 @@ class YAMLFileConverter(SimpleFileConverter):
def
match_name_and_value
(
definition
,
name
,
value
):
"""
Take match definitions from the definition argument and apply regular expression to name and
possibly value
possibly value
.
one of the keys
'
match_name
'
and
"
match
'
needs to be available
in definition
'
match_value
'
is optional
Exactly
one of the keys
``
match_name
``
and
``
match
`` must exist
in
``
definition
``,
``
match_value
``
is optional
Returns
-------
out:
None, if match_name or match lead to no match. Otherwise, returns a dictionary with the
matched groups, possibly including matches from using match_value
matched groups, possibly including matches from using
`definition[
"
match_value
"
]`
"""
if
"
match_name
"
in
definition
:
...
...
This diff is collapsed.
Click to expand it.
unittests/test_issues.py
+
2
−
2
View file @
22b53f7a
...
...
@@ -218,8 +218,8 @@ def test_issue_112(converter_registry):
if
rec
.
name
==
"
event_a
"
:
assert
rec
.
get_property
(
"
event_time
"
)
is
not
None
assert
rec
.
get_property
(
"
event_time
"
).
value
==
"
2025-02-06
"
el
if
rec
.
name
==
"
event_b
"
:
#
This should not have
match
ed
if
rec
.
name
==
"
event_b
"
:
#
`date` field is empty, so there must be no
match
assert
rec
.
get_property
(
"
event_time
"
)
is
None
if
rec
.
name
==
"
event_c
"
:
assert
rec
.
get_property
(
"
event_time
"
)
is
not
None
...
...
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