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
Ensure tags are copied and presented when moving Collections #4277
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
37ef9a9
Copy tags on HDCA, add tags when dictifying
pvanheus f0e5ec1
Merge branch 'dev' of github.com:pvanheus/galaxy into dev
pvanheus 37cb522
copy tags using tag manager
pvanheus bf8b156
Move tag copying into HasTags mixin
pvanheus 484d581
Remove inheritance from object in HasTags
pvanheus 35d67ea
Put back inheritance from object in HasTags
pvanheus File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works the same way, but I prefer the more explicit
object
, if we could leave that here. HasTags must come before Dictifiable right? MRO mess is why we may have pulled back from some of these mixins, IIRC.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason it was done this was is because HasTags inherits from
object
and callssuper()
in order to let Dictifiable create the original dictionary (to which it adds the 'tags' key). I changed it in my latest commit to not inherit fromobject
and usesuper()
so will see if that breaks anything. Specifically I'm concerned about theThis stuff certainly isn't straightforward to navigate in Python. If I understand it correctly, there should be a path from the subclass
to_dict()
up through the inheritance chain so that the last thing mentioned in the list is the one that actually creates the dictionary, everything else before it usessuper()
to get a dictionary and then adds to that dict.My latest change has broken that principle so it might have broken the chain, since now HasTags and Dictifiable both have a
to_dict()
method that creates a dictionary. Not sure if the testing will catch this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted back to the
HasTags
inherits fromobject
way of doing things and then removedobject
from the inheritance list. Looks like the only way to tame the MRO beast.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrmm. Yeah, my concern is that that approach isn't scalable for mixins. I'll tinker with a few things and see what I can come up with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. In the meantime 37cb522 is the simple solution for the bug this addresses.