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
e9cc1739
Commit
e9cc1739
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
meal
parent
c699d6e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caosadvancedtools/cfood.py
+4
-4
4 additions, 4 deletions
src/caosadvancedtools/cfood.py
src/caosadvancedtools/crawler.py
+3
-3
3 additions, 3 deletions
src/caosadvancedtools/crawler.py
with
7 additions
and
7 deletions
src/caosadvancedtools/cfood.py
+
4
−
4
View file @
e9cc1739
...
...
@@ -94,7 +94,7 @@ class AbstractCFood(object):
raise
NotImplementedError
()
@classmethod
def
cook
(
cls
,
crawled_file
):
def
cook
(
cls
,
crawled_file
,
**
kwargs
):
"""
possibly checks for existing CFoods whether the match should be
added or whether a new CFood instance needs to be returned
...
...
@@ -110,7 +110,7 @@ class AbstractCFood(object):
None: otherwise
"""
return
cls
()
return
cls
(
crawled_file
,
**
kwargs
)
@classmethod
def
match
(
cls
,
string
):
...
...
@@ -426,8 +426,8 @@ class CMeal(object):
suitable
=
True
for
group
in
cls
.
matching_groups
:
if
(
group
not
in
match
or
group
not
in
cfood
.
match
or
if
(
group
not
in
match
.
groupdict
()
or
group
not
in
cfood
.
match
.
groupdict
()
or
match
.
group
(
group
)
==
cfood
.
match
.
group
(
group
)):
suitable
=
False
...
...
This diff is collapsed.
Click to expand it.
src/caosadvancedtools/crawler.py
+
3
−
3
View file @
e9cc1739
...
...
@@ -102,9 +102,9 @@ class Crawler(object):
Cfood
.
__class__
.
__name__
,
crawled_file
.
path
))
try
:
cfoods
.
append
(
Cfood
(
crawled_file
,
access
=
self
.
access
,
verbosity
=
self
.
verbosity
,
guard
=
self
.
guard
))
cfoods
.
append
(
Cfood
.
cook
(
crawled_file
,
access
=
self
.
access
,
verbosity
=
self
.
verbosity
,
guard
=
self
.
guard
))
except
Exception
as
e
:
traceback
.
print_exc
()
print
(
e
)
...
...
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