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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Merge requests
!158
F list filter
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
F list filter
f-list-filter
into
f-review-lists-and-compare
Overview
0
Commits
6
Pipelines
3
Changes
2
Merged
Henrik tom Wörden
requested to merge
f-list-filter
into
f-review-lists-and-compare
7 months ago
Overview
0
Commits
6
Pipelines
3
Changes
2
0
0
Merge request reports
Viewing commit
a10bc1ed
Prev
Next
Show latest version
2 files
+
37
−
10
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
a10bc1ed
TST: Extend compare_entities tests
· a10bc1ed
I. Nüske
authored
7 months ago
src/linkahead/apiutils.py
+
4
−
0
View file @ a10bc1ed
Edit in single-file editor
Open in Web IDE
Show full file
@@ -251,12 +251,16 @@ def compare_entities(entity0: Optional[Entity] = None,
@@ -251,12 +251,16 @@ def compare_entities(entity0: Optional[Entity] = None,
# - Should there be a more detailed comparison of parents without id?
# - Should there be a more detailed comparison of parents without id?
# - Revisit filter - do we care about RecordType when matching?
# - Revisit filter - do we care about RecordType when matching?
# How to treat None?
# How to treat None?
# - Should matching of parents also take the recordtype into account
# for parents that have a name but no id?
# Suggestions for enhancements:
# Suggestions for enhancements:
# - For the comparison of entities in value and properties, consider
# - For the comparison of entities in value and properties, consider
# keeping a list of traversed entities, not only look at first layer
# keeping a list of traversed entities, not only look at first layer
# - Make the empty_diff functionality faster by adding a parameter to
# - Make the empty_diff functionality faster by adding a parameter to
# this function so that it returns after the first found difference?
# this function so that it returns after the first found difference?
# - Add parameter to restrict diff to some characteristics
# - Add parameter to restrict diff to some characteristics
# - Implement comparison of date where one is a string and the other is
# datetime
if
entity0
is
None
and
old_entity
is
None
:
if
entity0
is
None
and
old_entity
is
None
:
raise
ValueError
(
"
Please provide the first entity as first argument (`entity0`)
"
)
raise
ValueError
(
"
Please provide the first entity as first argument (`entity0`)
"
)
if
entity1
is
None
and
new_entity
is
None
:
if
entity1
is
None
and
new_entity
is
None
:
Loading