Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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-pylib
Commits
c6f14140
Commit
c6f14140
authored
3 months ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Update compare_entities docstring
parent
3af22cc5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!175
BUG: Request responses without the "Set-Cookie" header no longer overwrite the...
,
!165
Compare_entities diff uses id instead of name where needed
Pipeline
#58576
passed
3 months ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/linkahead/apiutils.py
+9
-4
9 additions, 4 deletions
src/linkahead/apiutils.py
with
9 additions
and
4 deletions
src/linkahead/apiutils.py
+
9
−
4
View file @
c6f14140
...
...
@@ -196,16 +196,20 @@ def compare_entities(entity0: Optional[Entity] = None,
that are missing in the other entity, and the
'
properties
'
dict contains
properties and SPECIAL_ATTRIBUTES if they are missing or different from
their counterparts in the other entity.
The key used to represent a parent or property is the entities name if the
The key used to represent a parent in the parent list or a
property in the property dictionary is the entity
'
s name if the
name is present for both compared entities, the id otherwise.
The value of the properties dict for each listed property is again a dict
detailing the differences between this property and its counterpart.
The characteristics that are checked to determine whether two properties
match are the following:
- datatype
- importance
- value
- datatype
- importance
- value
If any of these characteristics differ for a property, the respective
string (datatype, importance, value) is added as a key to the dict of the
property with its value being the characteristics value,
...
...
@@ -244,6 +248,7 @@ def compare_entities(entity0: Optional[Entity] = None,
entity and an int or str also checks whether
the int/str matches the name or id of the
entity, so Entity(id=100) == 100 ==
"
100
"
.
"""
# ToDo: Discuss intended behaviour
# Questions that need clarification:
...
...
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