Repository navigation
Conversation
recursive_attributes returns a numerical path to traverse the object tree. While having implemented it, it has never been used in the current code which still prefer to traverse through the entire object. This commits lets the boiler plate and test to replace the iteration over objects, and prefer the lookup.
If a reference has an invalid or missing nameOfRefClass-attribute, or invalid version attribute, we here test if we correctly update/repair the original reference.
We have implemented in the past methods to identify location within objects. Likely due to bit rot or brain rot this lookup was not found anymore. Unlike attrgetter or the advanced method safe_attrgetter in this repository, we are only using integers. Hence the method is tied to the locally generated classes. The only location we actually store the paths now are in the unknown database. When an unknown object is resolved, and their version or name_of_ref_class does not match. We want to update the reference to match the actual object. The current implementation iterates the entire object again, while this implementation knows exactly where in the object to look. One could argue that if one object has multiple references, it could be more efficient to interate over all references, but not in the implementation that currently remained. Benchmarking should still give an impression what improvements can be achieved using this new codepath. But it is the boilerplate to open the door for another fix.
The value now stores: - id, version, name_of_ref_class (NL:ARR:ScheduledStopPoint:1, 1, ScheduledStopPoint) - referinging class (ScheduledStopPointRef) - path (ServiceJourneyPattern/StopPointInJourneyPattern/ScheduledStopPointRef)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As provided in #169 an ambigious object reference (abstract reference or invalid name of ref class) may point to a duplicate id. This pull request is intended to resolve this issue.