Closed PaulSchweizer closed 4 years ago
Cool!
What does this solve? Is there an issue to reference to this?
I came across this when using the pyblish.util.integrate
function (as well as the functions for the other steps) and thought this should be fixed as it does not yield the same behaviour as the "regular" pyblish method where the plugins are pre-sorted.
Should I open a ticket? Or use things in a different way?
The best way to would be make a test, so we can ensure functionality in the future as well.
The test is are already in place, as mentioned above
This affects a core mechanic of Pyblish, and thus makes me nervous. :S
Plug-ins are sorted during discovery, I can't figure out why they'd need to be sorted again afterwards?
Maybe if you could post a reprodible?
Maybe I'm using it wrong, but I am providing a list of plugins to the collect, validate etc. functions https://github.com/pyblish/pyblish-base/blob/master/pyblish/util.py#L199
That list might not be in order, in which case it is exectuted out of order (meaning in it's given order).
I am using these functions separately for two reasons:
I can of course sort the list of plugins beforehand myself, but thought it safer if the sorting is performed inside of pyblish to avoid this inconsistency.
Of yourse there is also the possibility that the mentioned functions are not meant to be used like I am using them.
In the tests I added the above mentioned case, providing a list of plugins in the wrong order: https://github.com/pyblish/pyblish-base/pull/358/files#diff-08aca4e83f1cbb3f29db48aa9abcae9eR65
If that is not sufficient I can draft up a lengthier example, just let me know
but I am providing a list of plugins to the collect, validate etc.
Ah, yes. You should be able to pass a list of your order. If you wanted it sorted, then you can sort it before handing it in. This is expected, as you may want to actually control that order.
Ok I see, then this PR is void, thanks for clarifying!
Also updated the respective test and added venv to gitignore