[PATCH 3/4] REST: move SeriesFilter below StateFilter

2017-07-16 Thread Philippe Pepiot
So the first can use the second in its declaration. Signed-off-by: Philippe Pepiot <p...@philpep.org> --- patchwork/api/filters.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py index 9966543..7bf574d

[PATCH 1/4] REST: move StateField to a new 'field' module

2017-07-16 Thread Philippe Pepiot
So it can be reused in multiple modules avoiding circular imports. Signed-off-by: Philippe Pepiot <p...@philpep.org> --- patchwork/api/embedded.py | 1 + patchwork/api/fields.py | 61 +++ patchwork/api/patch.py

[PATCH 4/4] REST: allow to filter series by patch state

2017-07-16 Thread Philippe Pepiot
In series list API, allow to filter series having at least a patch in given state(s). Signed-off-by: Philippe Pepiot <p...@philpep.org> --- patchwork/api/filters.py | 4 +++- patchwork/tests/test_rest_api.py | 22 ++ 2 files changed, 25 insertions(+), 1 de

Re: [PATCH 1/4] REST: move StateField to a new 'field' module

2017-07-16 Thread Philippe Pepiot
On 07/16/2017 09:32 PM, Philippe Pepiot wrote: > So it can be reused in multiple modules avoiding circular imports. > > Signed-off-by: Philippe Pepiot <p...@philpep.org> > --- > patchwork/api/embedded.py | 1 + > patchw

[PATCH 2/4] REST: expose patch state in series list and detail views

2017-07-16 Thread Philippe Pepiot
This allow to display state for each patch or the series in list and detail API view. Signed-off-by: Philippe Pepiot <p...@philpep.org> --- patchwork/api/embedded.py | 3 ++- patchwork/api/series.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/patchwo

Re: [PATCH 3/4] parser: allow to handle multiple projects under the same list

2017-07-07 Thread Philippe Pepiot
On 05/30/2017 09:54 PM, Stephen Finucane wrote: > On Tue, 2017-05-30 at 10:37 -0700, Sean Farley wrote: >> Andrew Donnellan <andrew.donnel...@au1.ibm.com> writes: >> >>> On 30/05/17 08:50, Stephen Finucane wrote: >>>> On Sat, 2017-05-27 at 20:17 +02

Multiple patchwork projects under the same mailing list

2017-05-27 Thread Philippe Pepiot
This series allow to handle multiple patchwork projects under the same mailing list using subject prefixes. This help to handle patch lists separately for each project and simplify integration with CI servers since one project map to one reference repository.

[PATCH 1/4] tests: pass all arguments using kwargs

2017-05-27 Thread Philippe Pepiot
Signed-off-by: Philippe Pepiot <p...@philpep.org> --- patchwork/tests/test_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py index 57a3f0d..14f9f72 100644 --- a/patchwork/tests/test_parser.py

[PATCH 4/4] parser: remove subject_prefix from imported patch

2017-05-27 Thread Philippe Pepiot
When a patch is imported on a project that have a `subject_prefix`, remove it from the prefixes since it's a redundant information with the project. --- patchwork/parser.py| 3 ++- patchwork/tests/test_parser.py | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git

Re: [RFC PATCH] REST: enable token authentication

2017-05-26 Thread Philippe Pepiot
On 05/25/2017 10:47 AM, Andrew Donnellan wrote: > Token authentication is generally viewed as a more secure option for API > authentication than storing a username and password. > > Django REST Framework gives us a TokenAuthentication class and an authtoken > app that we can use to generate

Re: [PATCH 6/6] REST: Resolve issues with filters

2017-05-17 Thread Philippe Pepiot
On 05/16/2017 07:20 PM, Stephen Finucane wrote: On Tue, 2017-05-16 at 17:38 +0100, Stephen Finucane wrote: On Tue, 2017-05-16 at 11:04 +0200, Philippe Pepiot wrote: On 05/16/2017 01:14 AM, Stephen Finucane wrote: Turns out filtering patches using a series string wasn't as easy as we thought

Re: [PATCH] REST: allow filtering patch by hash

2017-05-04 Thread Philippe Pepiot
On 05/04/2017 05:07 PM, Philippe Pepiot wrote: This allow to get related patches for a given hash. For instance this could be used to find quickly relevant mail threads while looking at a single applied patch. I rejected my patch after realizing that patchwork hash is different than commit

Re: [PATCH 1/2] lib: Update uWSGI, nginx config files

2017-05-04 Thread Philippe Pepiot
On 05/02/2017 01:56 AM, Stephen Finucane wrote: diff --git a/lib/uwsgi/patchwork.ini b/lib/uwsgi/patchwork.ini index 04a9837..d67837c 100644 --- a/lib/uwsgi/patchwork.ini +++ b/lib/uwsgi/patchwork.ini @@ -1,6 +1,7 @@ [uwsgi] -plugins = python27 +# change this to python3 if running Patchwork

[PATCH] models: Series plural name is Series

2017-05-04 Thread Philippe Pepiot
By default django use verbose_name + s which lead 'Seriess' displayed in admin interface. Signed-off-by: Philippe Pepiot <philippe.pep...@logilab.fr> --- patchwork/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/models.py b/patchwork/models.py index a336219..4

[PATCH] REST: filter patches by state name

2017-05-03 Thread Philippe Pepiot
Since we display the name of the state in the serialized patch, also filter by name instead of primary key. Also this will be consistent with the current documentation examples (curl 'https://patchwork.example.com/api/patches?state=under-review') Signed-off-by: Philippe Pepiot <philippe.

[PATCH] parser: detect mercurial series markers

2017-04-28 Thread Philippe Pepiot
Unlike git, Mercurial series marker uses the format "M of N", handle this in the subject parser. Test code original author is Andrew Shadura <andrew.shad...@collabora.co.uk> Signed-off-by: Philippe Pepiot <philippe.pep...@logilab.fr> --- patchwork/parser.py