mbox series

[0/7] Add support for multiple filters

Message ID 20180411161338.420-1-stephen@that.guru
Headers show
Series Add support for multiple filters | expand

Message

Stephen Finucane April 11, 2018, 4:13 p.m. UTC
When writing git-pw, it was assumed that one could specify a filter
multiple times and it would be applied that way. This turned out to be a
false assumption and only the latest filter is applied. This is
confusing and prevents a number of possible usecases. Fix this.

Stephen Finucane (7):
  REST: Use UserFilter for patch delegates
  REST: Simplify ModelMultiChoiceField
  REST: Use ModelMultipleChoiceField
  REST: Remove ProjectFilterMixin
  REST: Rename Filter -> FilterSet
  REST: Use ModelMultipleChoiceField for other fields
  REST: Use DRF-specific filterset

 patchwork/api/bundle.py                            |   4 +-
 patchwork/api/check.py                             |   4 +-
 patchwork/api/cover.py                             |   4 +-
 patchwork/api/event.py                             |   4 +-
 patchwork/api/filters.py                           | 162 ++++++++++++---------
 patchwork/api/patch.py                             |   4 +-
 patchwork/api/series.py                            |   4 +-
 patchwork/tests/api/test_patch.py                  |  15 +-
 .../improved-rest-filtering-bf68399270a9b245.yaml  |  10 +-
 9 files changed, 129 insertions(+), 82 deletions(-)

Comments

Stephen Finucane May 9, 2018, 8:22 a.m. UTC | #1
On Wed, 2018-04-11 at 17:13 +0100, Stephen Finucane wrote:
> When writing git-pw, it was assumed that one could specify a filter
> multiple times and it would be applied that way. This turned out to be a
> false assumption and only the latest filter is applied. This is
> confusing and prevents a number of possible usecases. Fix this.

Will I respin this or are you happy to address the comments at merge
time, Daniel?

Stephen

> Stephen Finucane (7):
>   REST: Use UserFilter for patch delegates
>   REST: Simplify ModelMultiChoiceField
>   REST: Use ModelMultipleChoiceField
>   REST: Remove ProjectFilterMixin
>   REST: Rename Filter -> FilterSet
>   REST: Use ModelMultipleChoiceField for other fields
>   REST: Use DRF-specific filterset
> 
>  patchwork/api/bundle.py                            |   4 +-
>  patchwork/api/check.py                             |   4 +-
>  patchwork/api/cover.py                             |   4 +-
>  patchwork/api/event.py                             |   4 +-
>  patchwork/api/filters.py                           | 162 ++++++++++++---------
>  patchwork/api/patch.py                             |   4 +-
>  patchwork/api/series.py                            |   4 +-
>  patchwork/tests/api/test_patch.py                  |  15 +-
>  .../improved-rest-filtering-bf68399270a9b245.yaml  |  10 +-
>  9 files changed, 129 insertions(+), 82 deletions(-)
>
Daniel Axtens May 9, 2018, 3:09 p.m. UTC | #2
Stephen Finucane <stephen@that.guru> writes:

> On Wed, 2018-04-11 at 17:13 +0100, Stephen Finucane wrote:
>> When writing git-pw, it was assumed that one could specify a filter
>> multiple times and it would be applied that way. This turned out to be a
>> false assumption and only the latest filter is applied. This is
>> confusing and prevents a number of possible usecases. Fix this.
>
> Will I respin this or are you happy to address the comments at merge
> time, Daniel?
I can do it at merge this morning. I'll let you know if anything goes
wrong and I need a respin.

Regards,
Daniel

>
> Stephen
>
>> Stephen Finucane (7):
>>   REST: Use UserFilter for patch delegates
>>   REST: Simplify ModelMultiChoiceField
>>   REST: Use ModelMultipleChoiceField
>>   REST: Remove ProjectFilterMixin
>>   REST: Rename Filter -> FilterSet
>>   REST: Use ModelMultipleChoiceField for other fields
>>   REST: Use DRF-specific filterset
>> 
>>  patchwork/api/bundle.py                            |   4 +-
>>  patchwork/api/check.py                             |   4 +-
>>  patchwork/api/cover.py                             |   4 +-
>>  patchwork/api/event.py                             |   4 +-
>>  patchwork/api/filters.py                           | 162 ++++++++++++---------
>>  patchwork/api/patch.py                             |   4 +-
>>  patchwork/api/series.py                            |   4 +-
>>  patchwork/tests/api/test_patch.py                  |  15 +-
>>  .../improved-rest-filtering-bf68399270a9b245.yaml  |  10 +-
>>  9 files changed, 129 insertions(+), 82 deletions(-)
>>
Daniel Axtens May 9, 2018, 4:32 p.m. UTC | #3
Daniel Axtens <dja@axtens.net> writes:

> Stephen Finucane <stephen@that.guru> writes:
>
>> On Wed, 2018-04-11 at 17:13 +0100, Stephen Finucane wrote:
>>> When writing git-pw, it was assumed that one could specify a filter
>>> multiple times and it would be applied that way. This turned out to be a
>>> false assumption and only the latest filter is applied. This is
>>> confusing and prevents a number of possible usecases. Fix this.
>>
>> Will I respin this or are you happy to address the comments at merge
>> time, Daniel?
> I can do it at merge this morning. I'll let you know if anything goes
> wrong and I need a respin.

Tweaked, merged, pushed; let me know if I've stuffed anything up
dramatically.

Are we right to do an rc2 now that we have every feature we want?

Regards,
Daniel

>
> Regards,
> Daniel
>
>>
>> Stephen
>>
>>> Stephen Finucane (7):
>>>   REST: Use UserFilter for patch delegates
>>>   REST: Simplify ModelMultiChoiceField
>>>   REST: Use ModelMultipleChoiceField
>>>   REST: Remove ProjectFilterMixin
>>>   REST: Rename Filter -> FilterSet
>>>   REST: Use ModelMultipleChoiceField for other fields
>>>   REST: Use DRF-specific filterset
>>> 
>>>  patchwork/api/bundle.py                            |   4 +-
>>>  patchwork/api/check.py                             |   4 +-
>>>  patchwork/api/cover.py                             |   4 +-
>>>  patchwork/api/event.py                             |   4 +-
>>>  patchwork/api/filters.py                           | 162 ++++++++++++---------
>>>  patchwork/api/patch.py                             |   4 +-
>>>  patchwork/api/series.py                            |   4 +-
>>>  patchwork/tests/api/test_patch.py                  |  15 +-
>>>  .../improved-rest-filtering-bf68399270a9b245.yaml  |  10 +-
>>>  9 files changed, 129 insertions(+), 82 deletions(-)
>>>
Stephen Finucane May 9, 2018, 5:03 p.m. UTC | #4
On Thu, 2018-05-10 at 02:32 +1000, Daniel Axtens wrote:
> Daniel Axtens <dja@axtens.net> writes:
> 
> > Stephen Finucane <stephen@that.guru> writes:
> > 
> > > On Wed, 2018-04-11 at 17:13 +0100, Stephen Finucane wrote:
> > > > When writing git-pw, it was assumed that one could specify a filter
> > > > multiple times and it would be applied that way. This turned out to be a
> > > > false assumption and only the latest filter is applied. This is
> > > > confusing and prevents a number of possible usecases. Fix this.
> > > 
> > > Will I respin this or are you happy to address the comments at merge
> > > time, Daniel?
> > 
> > I can do it at merge this morning. I'll let you know if anything goes
> > wrong and I need a respin.
> 
> Tweaked, merged, pushed; let me know if I've stuffed anything up
> dramatically.

Looks all good to me.

> Are we right to do an rc2 now that we have every feature we want?

If it's alright with you, let's hold off til Friday. I'd like to finish
up and send that fix I have for the '/events' API endpoint but it's
already late here.

Stephen

> Regards,
> Daniel
> 
> > 
> > Regards,
> > Daniel
> > 
> > > 
> > > Stephen
> > > 
> > > > Stephen Finucane (7):
> > > >   REST: Use UserFilter for patch delegates
> > > >   REST: Simplify ModelMultiChoiceField
> > > >   REST: Use ModelMultipleChoiceField
> > > >   REST: Remove ProjectFilterMixin
> > > >   REST: Rename Filter -> FilterSet
> > > >   REST: Use ModelMultipleChoiceField for other fields
> > > >   REST: Use DRF-specific filterset
> > > > 
> > > >  patchwork/api/bundle.py                            |   4 +-
> > > >  patchwork/api/check.py                             |   4 +-
> > > >  patchwork/api/cover.py                             |   4 +-
> > > >  patchwork/api/event.py                             |   4 +-
> > > >  patchwork/api/filters.py                           | 162 ++++++++++++---------
> > > >  patchwork/api/patch.py                             |   4 +-
> > > >  patchwork/api/series.py                            |   4 +-
> > > >  patchwork/tests/api/test_patch.py                  |  15 +-
> > > >  .../improved-rest-filtering-bf68399270a9b245.yaml  |  10 +-
> > > >  9 files changed, 129 insertions(+), 82 deletions(-)
> > > >
Daniel Axtens May 9, 2018, 11:36 p.m. UTC | #5
Stephen Finucane <stephen@that.guru> writes:

> On Thu, 2018-05-10 at 02:32 +1000, Daniel Axtens wrote:
>> Daniel Axtens <dja@axtens.net> writes:
>> 
>> > Stephen Finucane <stephen@that.guru> writes:
>> > 
>> > > On Wed, 2018-04-11 at 17:13 +0100, Stephen Finucane wrote:
>> > > > When writing git-pw, it was assumed that one could specify a filter
>> > > > multiple times and it would be applied that way. This turned out to be a
>> > > > false assumption and only the latest filter is applied. This is
>> > > > confusing and prevents a number of possible usecases. Fix this.
>> > > 
>> > > Will I respin this or are you happy to address the comments at merge
>> > > time, Daniel?
>> > 
>> > I can do it at merge this morning. I'll let you know if anything goes
>> > wrong and I need a respin.
>> 
>> Tweaked, merged, pushed; let me know if I've stuffed anything up
>> dramatically.
>
> Looks all good to me.
>
>> Are we right to do an rc2 now that we have every feature we want?
>
> If it's alright with you, let's hold off til Friday. I'd like to finish
> up and send that fix I have for the '/events' API endpoint but it's
> already late here.

No worries.

Regards,
Daniel
>
> Stephen
>
>> Regards,
>> Daniel
>> 
>> > 
>> > Regards,
>> > Daniel
>> > 
>> > > 
>> > > Stephen
>> > > 
>> > > > Stephen Finucane (7):
>> > > >   REST: Use UserFilter for patch delegates
>> > > >   REST: Simplify ModelMultiChoiceField
>> > > >   REST: Use ModelMultipleChoiceField
>> > > >   REST: Remove ProjectFilterMixin
>> > > >   REST: Rename Filter -> FilterSet
>> > > >   REST: Use ModelMultipleChoiceField for other fields
>> > > >   REST: Use DRF-specific filterset
>> > > > 
>> > > >  patchwork/api/bundle.py                            |   4 +-
>> > > >  patchwork/api/check.py                             |   4 +-
>> > > >  patchwork/api/cover.py                             |   4 +-
>> > > >  patchwork/api/event.py                             |   4 +-
>> > > >  patchwork/api/filters.py                           | 162 ++++++++++++---------
>> > > >  patchwork/api/patch.py                             |   4 +-
>> > > >  patchwork/api/series.py                            |   4 +-
>> > > >  patchwork/tests/api/test_patch.py                  |  15 +-
>> > > >  .../improved-rest-filtering-bf68399270a9b245.yaml  |  10 +-
>> > > >  9 files changed, 129 insertions(+), 82 deletions(-)
>> > > >