-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
disallow gaussian smooth output as input #2239
Conversation
e999145
to
d2e0d01
Compare
@@ -1496,6 +1496,9 @@ def _is_valid_item(self, data): | |||
def not_from_plugin(data): | |||
return data.meta.get('Plugin', None) is None | |||
|
|||
def not_from_this_plugin(data): |
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.
Do you think in the future we would need a generic version of this, maybe something like this?
def not_from_this_plugin(data): | |
def not_from_plugin(data, plugin_name="self"): |
For example, is there a situation where we would say "plugin X cannot take output from plugin Y"?
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 current framework doesn't allow for that (there is no way to set the kwargs that would get passed on). Instead, the plugin could create and pass its own callable to the filter:
def not_from_something_specific(data):
return data.meta.get('Plugin', None) not in ('something', 'specific')
dataset.add_filter(not_from_something_specific)
or if we find we re-use something often, we could migrate it directly into the dataset component.
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.
OK, fine as-is then. If it is not easy, no point to worry about use case that does not yet exist.
d2e0d01
to
e0a1fd6
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2239 +/- ##
=======================================
Coverage 91.62% 91.63%
=======================================
Files 148 148
Lines 16535 16538 +3
=======================================
+ Hits 15151 15154 +3
Misses 1384 1384
☔ View full report in Codecov by Sentry. |
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.
LGTM. Thanks!
Description
This pull request excludes the output from the gaussian smooth plugin to be a valid input back into the plugin, preventing a vertical "shift" after clicking the smooth button when only one input data was available.
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.