-
Notifications
You must be signed in to change notification settings - Fork 532
ENH: IO interfaces to JSON files #1020
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
Conversation
this looks good. could you please update the changes file? |
@satra sorry, I forgot about that. Fixed. |
return outputs | ||
|
||
|
||
class JSONFileSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): |
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.
how about adding an input that accepts a dictionary?
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.
Sorry @satra, I don't understand what you mean :S.
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.
something like in_dict = Dict(desc='input JSON dictionary')
so that you can pass a dictionary output of another node directly into the jsonsink node? and it will populate the relevant fields.
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 I see 👍
should we consider: this would allow connecting multiple nodes to the same JSONsink. |
Conflicts: CHANGES
Hi @satra, I've been thinking this around, but I can't see what would be a good end to this PR. From your last comment, I don't see why it is not possible to connect multiple nodes to the same JSONSink, provided with you specify the input in input_names. Regarding your considerations, I'd prefer not to go for b), as I'm not fond of the datasink formulation. I find it particularly cumbersome (of course, this is just one opinion). Regarding a), you mean that every time |
happy to entertain other thoughts on that. but we will leave it for a separate issue.
i meant that this input acts as an accumulator, but i can now see how that wouldn't be great. let's merge this and then consider the datasink formulation (also what an alternative to becoming less cumbersome would be). |
A grabber/sink pair to read/write parameters from json files.