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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Crawler
Commits
2e7cdaa5
Commit
2e7cdaa5
authored
May 21, 2024
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
DOC: a new docstring in sync_graph
parent
f588cf86
No related branches found
No related tags found
2 merge requests
!178
FIX: #96 Better error output for crawl.py script.
,
!167
Sync Graph
Pipeline
#51244
failed
May 21, 2024
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caoscrawler/sync_graph.py
+11
-0
11 additions, 0 deletions
src/caoscrawler/sync_graph.py
with
11 additions
and
0 deletions
src/caoscrawler/sync_graph.py
+
11
−
0
View file @
2e7cdaa5
...
@@ -340,6 +340,8 @@ class SyncGraph():
...
@@ -340,6 +340,8 @@ class SyncGraph():
def
_sanity_check
(
entities
:
list
[
db
.
Entity
]):
def
_sanity_check
(
entities
:
list
[
db
.
Entity
]):
"""
"""
Checks whether each record in entities has at least one parent.
Checks whether each record in entities has at least one parent.
Last review by Alexander Schlemmer on 2024-05-24.
"""
"""
for
ent
in
entities
:
for
ent
in
entities
:
if
ent
.
role
==
"
Record
"
and
len
(
ent
.
parents
)
==
0
:
if
ent
.
role
==
"
Record
"
and
len
(
ent
.
parents
)
==
0
:
...
@@ -573,6 +575,15 @@ class SyncGraph():
...
@@ -573,6 +575,15 @@ class SyncGraph():
self
.
_set_identifiable_of_node
(
other_node
)
self
.
_set_identifiable_of_node
(
other_node
)
def
_identifiable_is_needed
(
self
,
node
:
SyncNode
):
def
_identifiable_is_needed
(
self
,
node
:
SyncNode
):
"""
This function checks:
- the identifiable of node is None
- the node has all properties that are needed for the identifiable
- there are no unchecked entities that are needed for the identifiable of the node,
neither as forward or as backward references
Last review by Alexander Schlemmer on 2024-05-24.
"""
return
(
node
.
identifiable
is
None
and
not
self
.
_identity_relies_on_unchecked_entity
(
node
)
return
(
node
.
identifiable
is
None
and
not
self
.
_identity_relies_on_unchecked_entity
(
node
)
and
self
.
identifiableAdapter
.
check_identifying_props
(
node
,
raise_exception
=
False
))
and
self
.
identifiableAdapter
.
check_identifying_props
(
node
,
raise_exception
=
False
))
...
...
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