ganga-devs / ganga

Ganga is an easy-to-use frontend for job definition and management
GNU General Public License v3.0
100 stars 159 forks source link

Make jobs.select behave in a more sane way #47

Open rob-c opened 8 years ago

rob-c commented 8 years ago

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

alexanderrichards commented 8 years ago

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

rob-c commented 8 years ago

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