-
Notifications
You must be signed in to change notification settings - Fork 59
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
[rfc]changing Task initialization syntax closes #295 #305
base: master
Are you sure you want to change the base?
Conversation
…puts to the python function has to be includded in inputs dictionary (and not in kwargs); for Shell/ContainerTask everything but the default input fields (executable, args, image, bindings) also has to be provided in the inputs dictionary
Codecov Report
@@ Coverage Diff @@
## master #305 +/- ##
==========================================
+ Coverage 82.87% 86.11% +3.23%
==========================================
Files 20 20
Lines 3253 3262 +9
Branches 861 864 +3
==========================================
+ Hits 2696 2809 +113
+ Misses 404 291 -113
- Partials 153 162 +9
Continue to review full report at Codecov.
|
this is an api breaking change and let's take a decision on this and update the few repos that we have that use pydra |
@satra - so you don't want to have it today/tomorrow release. |
i mean this is as good a time as any, but perhaps we should ask a few people. because once changed, we would unlikely change it back. |
@satra - you're right, should give more time. I wasn't planning to change tutorial before accepting this (pretty sure that won't discover anything new after changes in tests), but let me know if you want me to do it |
i think we can have people look at this and if they agree we make another release soon after, but let's leave this out of the immediate release. |
@satra - i have to say that I like out current syntax, after all these changes I started thinking that perhaps it could be kept as an option, i.e. if |
@effigies and @oesteban - would love your input on this. i agree with dorota's last comment. that it would make it much easier in most cases to take kwargs as input fields if there is no clash. but allow for inputs keyword if a user choses. @djarecka - since the issue here is about clashes with potential attributes of the classes. perhaps we can check if the input spec has a field that clashes and in those cases force people to use inputs. |
I think that seems fine. I'm very likely to develop patterns where I can be very consistent, whether that's avoiding parameters that clash or always using inputs, but we don't have to make it impossible to do otherwise. |
@satra - but perhaps we should not allow for mixing, i.e. some inputs in |
yes no mixing. |
We really let this one fall by the wayside. Going to need to be redone post-#662. |
Types of changes
Summary
changing syntax for adding input fields during initialization (see discussion in #295)
inputs
dictionary (and not askwargs
)ShellCommandTask
andContainerTask
everything but the default input fields (executable
,args
,image
,bindings
) also has to be provided in theinputs
dictionaryChecklist
(we are using
black
: you canpip install pre-commit
,run
pre-commit install
in thepydra
directoryand
black
will be run automatically with each commit)Acknowledgment