You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Modify API functions to accept arrays of inputs #34
For some of the API methods it makes sense to pass in an array rather than a single item. For example, getSamplingFeatures( ) will accept a SamplingFeatureID as an argument, but it should accept an array of SamplingFeatureIDs. Need to list which functions and arguments for which this makes sense.
codes and ids are now expected to be a list, even if it only has a single element
@sreeder, I haven't looked at your PR yet (hopefully late today). But I would say that it'd be more user friendly if either a scalar or a list can be passed as the argument. I think this is what @horsburghwas saying when he opened this issue. It should be fairly easy to implement this via a type check and turning scalar arguments into one-element lists. eg:
I know - but there's an argument for consistency too.
@sreeder - what's your call on how difficult it would be to do both? Should we do this now or should we make this a feature request for another version?
I know - but there's an argument for consistency too.
Potato potatoh :)
No worries, I won't belabor this. It was just an opinion, and not a strong one. It sounds like you two really prefer to stick with list arguments, so just go with that.
Activity
emiliom commentedon Apr 11, 2016
@sreeder, this has been fully implemented, right? Let's close it.
sreeder commentedon Apr 11, 2016
@emiliom, I actually haven't implemented it yet. It is what I am working on now though.
emiliom commentedon Apr 11, 2016
Ok. For some reason I thought this was one of the many new capabilities now in your Dev1_0 branch.
sreeder commentedon Apr 13, 2016
@emiliom there has been a pull request created to address this issue. So if it is approved we can close this issue. Thanks
emiliom commentedon Apr 14, 2016
@sreeder, I haven't looked at your PR yet (hopefully late today). But I would say that it'd be more user friendly if either a scalar or a list can be passed as the argument. I think this is what @horsburgh was saying when he opened this issue. It should be fairly easy to implement this via a type check and turning scalar arguments into one-element lists. eg:
horsburgh commentedon Apr 14, 2016
@emiliom - we discussed this yesterday and we arrived at just using a list. A list can have one item right?
emiliom commentedon Apr 14, 2016
Of course. But allowing for a scalar argument is a bit more user-friendly, that's all.
horsburgh commentedon Apr 14, 2016
I know - but there's an argument for consistency too.
@sreeder - what's your call on how difficult it would be to do both? Should we do this now or should we make this a feature request for another version?
emiliom commentedon Apr 14, 2016
Potato potatoh :)
No worries, I won't belabor this. It was just an opinion, and not a strong one. It sounds like you two really prefer to stick with list arguments, so just go with that.
Merge Pull request #61 from ODM2/Dev1_0