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
a6392966
Commit
a6392966
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
Revert "MAINT: do first all the matches and then identifiables"
This reverts commit 2be8416b34517103a9f88846fad7f3905aab5a05.
parent
10774288
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
+0
-15
0 additions, 15 deletions
src/caosadvancedtools/cfood.py
src/caosadvancedtools/crawler.py
+0
-5
0 additions, 5 deletions
src/caosadvancedtools/crawler.py
with
0 additions
and
20 deletions
src/caosadvancedtools/cfood.py
+
0
−
15
View file @
a6392966
...
...
@@ -78,7 +78,6 @@ class AbstractCFood(object):
self
.
to_be_updated
=
db
.
Container
()
self
.
identifiables
=
db
.
Container
()
self
.
verbose
=
verbose
self
.
attached_ones
=
[]
@staticmethod
def
get_re
():
...
...
@@ -128,19 +127,8 @@ class AbstractCFood(object):
if
len
(
self
.
to_be_updated
)
==
0
:
return
get_ids_for_entities_with_names
(
self
.
to_be_updated
)
print
(
self
.
to_be_updated
)
self
.
to_be_updated
.
update
()
def
attach
(
self
,
crawled_file
):
self
.
attached_ones
.
append
(
crawled_file
)
def
looking_for
(
self
,
crawled_file
):
"""
should set the instance variable Container with the identifiables
"""
return
False
@staticmethod
# move to api?
def
set_parents
(
entity
,
names
):
...
...
@@ -191,9 +179,6 @@ def assure_object_is_in_list(obj, containing_object, property_name,
containing_object
.
add_property
(
property_name
,
value
=
[],
datatype
=
db
.
LIST
(
property_name
))
current_list
=
containing_object
.
get_property
(
property_name
).
value
if
not
isinstance
(
current_list
,
list
):
current_list
=
[
current_list
]
contained
=
False
for
el
in
current_list
:
...
...
This diff is collapsed.
Click to expand it.
src/caosadvancedtools/crawler.py
+
0
−
5
View file @
a6392966
...
...
@@ -106,11 +106,6 @@ class Crawler(object):
if
self
.
verbose
and
matches
>
1
:
print
(
"
Attention: More than one matching cfood!
"
)
for
crawled_file
in
sorted
(
files
,
key
=
lambda
x
:
x
.
path
):
for
cfood
in
cfoods
:
if
cfood
.
looking_for
(
crawled_file
):
cfood
.
attach
(
crawled_file
)
for
cfood
in
cfoods
:
try
:
cfood
.
create_identifiables
()
...
...
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