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

Targets Workflow #320

Merged
merged 7 commits into from Aug 21, 2017

Conversation

Projects
None yet
2 participants
@tokejepsen
Copy link
Member

tokejepsen commented Aug 18, 2017

Motivation

This PR is to enable a workflow where you can define targets to aim you plugins for.

The targets work the same as the family, but will eventually be implemented in the GUIs differently.

tokejepsen added some commits Aug 18, 2017

Merge branch 'master' into targets_workflow
# Conflicts:
#	tests/test_plugin.py
@tokejepsen

This comment has been minimized.

Copy link
Member

tokejepsen commented Aug 21, 2017

@mottosso What do you think about this solution?

Targets works in a similar way to families, but instead of comparing instances to a plugins targets, the plugins are filtered by the registered targets pyblish.api.registered_targets.

Since all plugins are registered with * as targets, this workflow is backwards compatible with existing plugins that has not overwritten the targets attribute.

Expecting pyblish-qml and pyblish-lite to implement a method for registering targets per session, so you can do this:

import pyblish_qml

pyblish_qml.show(targets=["custom_target"])
@@ -236,6 +238,37 @@ def plugins_by_host(plugins, host):
return compatible


def plugins_by_targets(plugins):

This comment has been minimized.

@mottosso

mottosso Aug 21, 2017

Member

Let's pass in targets ourselves, so it resembles the other by_something() functions.

def plugins_by_targets(plugins, targets)

@mottosso

This comment has been minimized.

Copy link
Member

mottosso commented Aug 21, 2017

Since all plugins are registered with * as targets, this workflow is backwards compatible with existing plugins that has not overwritten the targets attribute.

Goooood. That is critically important, thanks for testing and pointing this out.

Very well done. Just that one nitpick, then I'm happy to merge.

tokejepsen added some commits Aug 21, 2017

@tokejepsen

This comment has been minimized.

Copy link
Member

tokejepsen commented Aug 21, 2017

All ready for a merge :)

Arguments:
plugins (list): List of plugins
families (list): Families with which to compare against

This comment has been minimized.

@mottosso

mottosso Aug 21, 2017

Member

Don't forget about this little fella.

This comment has been minimized.

@tokejepsen

tokejepsen Aug 21, 2017

Member

Good spot!

@mottosso

This comment has been minimized.

Copy link
Member

mottosso commented Aug 21, 2017

Looks good to me.

@tokejepsen

This comment has been minimized.

Copy link
Member

tokejepsen commented Aug 21, 2017

Ready for merge and release :)

@mottosso

This comment has been minimized.

Copy link
Member

mottosso commented Aug 21, 2017

Would you be kind enough to make a release statement for this one? Ideally with an example or two, along with motivation and usecase.

I've added you to the contributors list, where I thought you already were but there you go. :)

@mottosso mottosso merged commit 0a35611 into pyblish:master Aug 21, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.1%) to 95.172%
Details

@tokejepsen tokejepsen deleted the tokejepsen:targets_workflow branch Aug 21, 2017

@tokejepsen

This comment has been minimized.

Copy link
Member

tokejepsen commented Aug 21, 2017

Would you be kind enough to make a release statement for this one?

Sure, but I think I have done the versioning up incorrectly. Its currently 1.5.6, but it should be 1.5.0, right?

@mottosso

This comment has been minimized.

Copy link
Member

mottosso commented Aug 21, 2017

Ah, yes that's true. You can fudge the number without a PR for this one, just hit the edit button on GitHub and make that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment