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
e475d013
Verified
Commit
e475d013
authored
Feb 21, 2024
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Documentation, formatting, typos, error messages.
parent
f733fbf7
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!160
STY: styling
,
!156
Test for unmergeable entities
Pipeline
#47688
passed
Feb 21, 2024
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
setup.cfg
+2
-2
2 additions, 2 deletions
setup.cfg
src/caoscrawler/crawl.py
+2
-2
2 additions, 2 deletions
src/caoscrawler/crawl.py
src/caoscrawler/identifiable_adapters.py
+8
-7
8 additions, 7 deletions
src/caoscrawler/identifiable_adapters.py
src/doc/README_SETUP.md
+4
-1
4 additions, 1 deletion
src/doc/README_SETUP.md
with
16 additions
and
12 deletions
setup.cfg
+
2
−
2
View file @
e475d013
This diff is collapsed.
Click to expand it.
src/caoscrawler/crawl.py
+
2
−
2
View file @
e475d013
...
...
@@ -761,8 +761,8 @@ class Crawler(object):
# 1. Is it in the cache of already checked Records?
if
self
.
treated_records_lookup
.
get_any
(
record
,
identifiable
)
is
not
None
:
treated_record
=
self
.
treated_records_lookup
.
get_any
(
record
,
identifiable
)
# Since the identifiables are the same, treated_record and record actually
describe
# the same ob
e
jct.
# Since the identifiables are the same, treated_record and record actually
#
describe
the same obj
e
ct.
# We merge record into treated_record in order to prevent loss of information
self
.
_merge_identified
(
treated_record
,
record
,
try_to_merge_later
,
all_records
)
referencing_entities
=
self
.
create_reference_mapping
(
all_records
)
...
...
This diff is collapsed.
Click to expand it.
src/caoscrawler/identifiable_adapters.py
+
8
−
7
View file @
e475d013
...
...
@@ -221,23 +221,24 @@ startswith: bool, optional
for
prop
in
registered_identifiable
.
properties
:
if
prop
.
name
.
lower
()
!=
"
is_referenced_by
"
:
continue
for
given
rt
in
prop
.
value
:
for
looking_for_
rt
in
prop
.
value
:
found
=
False
if
given
rt
==
"
*
"
:
if
looking_for_
rt
==
"
*
"
:
for
val
in
referencing_entities
.
values
():
if
len
(
val
)
>
0
:
found
=
True
refs
.
extend
(
val
)
else
:
rt_and_children
=
get_children_of_rt
(
given
rt
)
rt_and_children
=
get_children_of_rt
(
looking_for_
rt
)
for
rtname
in
rt_and_children
:
if
(
rtname
in
referencing_entities
):
refs
.
extend
(
referencing_entities
[
rtname
])
found
=
True
if
not
found
:
raise
NotImplementedError
(
f
"
An identifying property:
\n
"
f
"
\n
Identifying PROPERTY
\n
{
prop
.
name
}
"
f
"
Could not find referencing entities of type(s):
{
prop
.
value
}
\n
"
f
"
for registered identifiable:
\n
{
registered_identifiable
}
\n
"
f
"
There were
{
len
(
referencing_entities
)
}
referencing entities to choose from.
"
)
return
refs
...
...
@@ -260,8 +261,8 @@ startswith: bool, optional
def
get_identifiable
(
self
,
record
:
db
.
Record
,
referencing_entities
=
None
):
"""
r
etrieve the registered identifiable and fill the property values to create an
identifiable
R
etrieve the registered identifiable and fill the property values to create an
identifiable
.
Args:
record: the record for which the Identifiable shall be created.
...
...
This diff is collapsed.
Click to expand it.
src/doc/README_SETUP.md
+
4
−
1
View file @
e475d013
...
...
@@ -4,7 +4,10 @@
see INSTALL.md
## Run Unit Tests
Run
`pytest unittests`
.
1.
Install additional dependencies:
-
h5py
2.
Run
`pytest unittests`
.
## Documentation ##
We use sphinx to create the documentation. Docstrings in the code should comply
...
...
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