Skip to content
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

rios.applier.apply does not pass information about the output files to the userFunction #22

Closed
gillins opened this issue Dec 13, 2018 · 3 comments
Labels
enhancement New feature or request minor

Comments

@gillins
Copy link
Member

gillins commented Dec 13, 2018

Original report by Johan Mollevik (Bitbucket: [Johan Mollevik](https://bitbucket.org/Johan Mollevik), ).


It would occationally be usefull to know which and how many output files are supplied to rios.applier.apply

To be usefull this should probably work both with multiple output fies in different variables and multiple ones in a list in the same output variables.

I see two ways this could easily be implemented, either by pre populating the output object passed to the callback or by adding the information to the info object.

Is this something you think would make sense adding to rios?

@gillins
Copy link
Member Author

gillins commented Dec 13, 2018

Original comment by Neil Flood (Bitbucket: neilflood, GitHub: neilflood).


Hi Johan,

there is a much easier way to manage this sort of thing. If the user function needs to do different things in some cases, and some of these cases have different numbers of output files on the outputs object, then you should use the otherargs object to pass in enough information for the user function to be able to make the right decisions. In most cases this just means that there are two different cases, and I pass a boolean flag on the otherargs object, and that is sufficient to make decisions in the user function. More complicated cases could arise, but it will always be true that the calling function already knows this, and so can off the right information on the otherargs object.

We have been using RIOS for many years now, in research and operationally, and we have never really needed anything more complicated than that.

Does that seem like it answers your needs?

Neil

@gillins
Copy link
Member Author

gillins commented Dec 13, 2018

Original comment by Johan Mollevik (Bitbucket: [Johan Mollevik](https://bitbucket.org/Johan Mollevik), ).


This is what I ended up doing, however I think the code looked less nice by doing this so I would have preffered another way. However this is not blocking me.

@gillins
Copy link
Member Author

gillins commented Dec 14, 2018

Original comment by Sam Gillingham (Bitbucket: gillins, GitHub: gillins).


Johan,
Can you give us an example of code that could be improved by doing this?
Sam.

@gillins gillins closed this as completed Dec 23, 2018
@gillins gillins added minor enhancement New feature or request labels Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor
Projects
None yet
Development

No branches or pull requests

1 participant