-
Notifications
You must be signed in to change notification settings - Fork 5
WIP #139 attempt4 --- Implement pseudo-compound-classes. #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Tasqu
wants to merge
30
commits into
master
Choose a base branch
from
#139_attempt4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
ENTITY NAMES NEED TO BE UNIQUE!
Compound RelationshipClasses are separated from the rest, as they need to be treated separately and split into "subclasses"
Original unit tests pass.
Not all of the unit tests I designed for superclass functionality can work as intended with the current pseudo-structure, but at least SpineOpt performance shouold not drastically suffer.
Is this ultimately worth it? This function cannot fix e.g. parameter mappings. The correct place to do this would be in the database, but that's the problem isn't it?
I realized I didn't have to account for the `env_dict` and `_RelationshipClass` separately.
Still could be improved by disallowing `Symbol`, but that would require fixing convenience function generation to treat superclasses differently.
When `extend=true`, already resolved subclasses would be re-evaluated into `Nothing`
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.
Since Spine-DB-API and SpineOpt both support and aim to use "superclasses" and "compound classes", SpineInterface needs to support them as well. Unfortunately, "true" implementation would have required deep renovations of SpineInterface structures, which I couldn't pull off without demolishing a lot of code optimization by @manuelma, essentially murdering the performance and usability of SpineInterface. Thus, I had to implement "pseudo-compound-classes" to replicate the required functionality with minimal impacts to performance critical parts of the code.
In essence, superclasses function similar enough to their Spine-DB-API counterparts:
However, "pseudo-compound-classes" work quite differently to their Spine-DB-API counterparts:
EntityClassesas dimensions ofEntityClasses, so instead:<superclass_name>__<byclass1>__<byclass2>__...)Considerations:
Fixes #139
Checklist before merging