ganga icon indicating copy to clipboard operation
ganga copied to clipboard

Make jobs.select behave in a more sane way

Open rob-c opened this issue 8 years ago • 2 comments

Hi all,

This is an issue to follow on from a discussion which was on the ganag-developers list to change the interface to jobs.select to be a bit more sane and look something similar to job.select(ids=[5]). as suggested by @alexanderrichards.

I've been caught out by the 'strangeness' of the behaviour of this and as it's exposed to the users it would be nice to make this behave in a more standard way.

I think this is just a case of fixing the actual method as I don't think we make too much use of this method internally but it would probably require an entry in the changelog when it's changed.

Thanks,

Rob

rob-c avatar Nov 20 '15 15:11 rob-c

As I mentioned on the email chain. I favour a small modification to this method that essentially disallows positional arguments while only allowing keyword args that match the schema. This I think makes it a much better defined function for filtering on schema attributes

alexanderrichards avatar Nov 20 '15 15:11 alexanderrichards

It may be worth looking at this for #286 to see if there is much overlap in the code (I suspect there is)

rob-c avatar Mar 10 '16 13:03 rob-c