]> git.ipfire.org Git - thirdparty/patchwork.git/log
thirdparty/patchwork.git
9 years agoparser: Add patch_get_filenames()
Laurent Pinchart [Sat, 28 Nov 2015 12:14:38 +0000 (10:14 -0200)] 
parser: Add patch_get_filenames()

The function returns the list of files touched by a patch, after
stripping the leading component of the path name.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agomodels: Add DelegationRule object
Laurent Pinchart [Sat, 28 Nov 2015 12:14:37 +0000 (10:14 -0200)] 
models: Add DelegationRule object

Delegation rules are used to automatically set the delegate of a patch
based on the files touched by the patch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotox: 'flake' -> 'flake8'
Stephen Finucane [Tue, 12 Jan 2016 18:57:53 +0000 (18:57 +0000)] 
tox: 'flake' -> 'flake8'

The 'flake8' target specified the wrong dependendency. Resolve this.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoparsearchive: Handle duplicates
Stephen Finucane [Thu, 17 Dec 2015 17:29:32 +0000 (17:29 +0000)] 
parsearchive: Handle duplicates

The parsearchive tool can be used to load missing messages sourced
from mailman or another source. In this use case, there's a good
possibility that at least some of the messages found in the archive
are already stored in patchwork. Handle this case by ignoring these
duplicates.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoparsearchive: Fix import bug
Stephen Finucane [Thu, 17 Dec 2015 17:11:24 +0000 (17:11 +0000)] 
parsearchive: Fix import bug

A bug was introduced in the Python 3 port - the 'bin' folder is not a
module and therefore relative imports should not be used. Resolve this.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoparsemail: Parse Mailman-formatted addresses
Stephen Finucane [Wed, 16 Dec 2015 12:02:02 +0000 (12:02 +0000)] 
parsemail: Parse Mailman-formatted addresses

If loading archives from mailman, it is useful to parse and format
addresses such that they are proper emails.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopep8: Manually resolve remaining issues
Stephen Finucane [Sun, 29 Nov 2015 21:08:44 +0000 (21:08 +0000)] 
pep8: Manually resolve remaining issues

The 'autopep8' tool can't do everything, and it is necessary to resolve
some final issues. Most of these issues fall under the following
categories:

  E501  line too long
  E241  multiple spaces after ','
  F401  'module' imported but unused
  F841  local variable 'name' is assigned to but never used

It is also necessary to insert '# noqa' comments to hide some F403
errors ('unable to detect undefined names') where 'import *' is useful.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopep8: Autoresolve most PEP8 issues
Stephen Finucane [Sun, 29 Nov 2015 21:07:54 +0000 (21:07 +0000)] 
pep8: Autoresolve most PEP8 issues

...using the 'autopep8' tool.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotox: Remove ignored PEP8 errors and directories
Stephen Finucane [Sun, 29 Nov 2015 18:58:41 +0000 (18:58 +0000)] 
tox: Remove ignored PEP8 errors and directories

Remove the following 'ignore' errors:

  E121-128,131  various visual indentation errors
  E251          spaces around keyword / parameter equals
  H405          multi-line docstring must have summary line

The only error remaining is E129, which is technically not part of the
PEP8 standard and contributes in practice besides lots of manual line
wrapping.

In addition, there's no good reason why the tests directory shouldn't
be assessed like everything else - tests are still code and, as such,
should be held to the same standards..

Finally, include the 'pwclient' script which should not be ignored.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopy3: Remove all deprecated UnitTest calls
Stephen Finucane [Sun, 29 Nov 2015 07:35:39 +0000 (07:35 +0000)] 
py3: Remove all deprecated UnitTest calls

Remove the likes of 'failUnlessEqual' and 'assertEquals', which have
been deprecated and cause warnings in Django 1.6 with Python 3.4.

https://docs.python.org/2/library/unittest.html#deprecated-aliases

This allows us to remove an item from the TODO list.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopy3: Resolve unicode issues
Stephen Finucane [Sun, 29 Nov 2015 06:53:05 +0000 (06:53 +0000)] 
py3: Resolve unicode issues

Python 3 is unicode only. While many of the issues with unicode, such
as the now invalid 'u' prefix, have already been resolved, there are a
few more issues.

Many of these issues are related to HTTPResponse.content, which returns
bytes and needs to be "decoded" in order to perform actions like
concatenation with str objects (unicode). Where possible, make use of
assertContains, per the Django documentation (http://bit.ly/1lRDYie),
else fall back to including a 'decode' statement.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopy3: max does not accept 'None'
Stephen Finucane [Sun, 29 Nov 2015 06:51:14 +0000 (06:51 +0000)] 
py3: max does not accept 'None'

max(n, None), where n is a valid number, is valid in Python 2 but not
Python 3. Replace these calls with something that works in both
versions of Python.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopy3: Fix Django models Python3 compatibility
Stephen Finucane [Thu, 15 Oct 2015 21:35:42 +0000 (22:35 +0100)] 
py3: Fix Django models Python3 compatibility

Per suggestions from the Django porting guide:

    https://docs.djangoproject.com/en/1.8/topics/python3/

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopy3: "Modernize" code base
Stephen Finucane [Thu, 26 Nov 2015 19:43:37 +0000 (19:43 +0000)] 
py3: "Modernize" code base

Run code through the 'modernize' application to fix Python 3
compatibility while also retaining Python 2 backwards compatibility.

There are some key changes made to the autogenerated code:

* Don't wrap 'items()' in 'list' for for loops - it's not necessary
* Don't wrap 'keys()' in 'list' - just drop 'keys()'
* Use Django's version of six rather than the upstream one

Many of the issues found are based upon the changed definitions of the
map, keys and items functions, along with the removal of the iteritems
function and reduce keyword.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotrivial: Reorder imports
Stephen Finucane [Thu, 26 Nov 2015 19:26:02 +0000 (19:26 +0000)] 
trivial: Reorder imports

Imports are easier to read if they are grouped by type (standard
library, third party, application) and organised alphabetically. Make
it so.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agopy3: Add required 'future' imports
Stephen Finucane [Thu, 26 Nov 2015 18:24:59 +0000 (18:24 +0000)] 
py3: Add required 'future' imports

These are quite limited as patchwork only supports Python 2.6+. As
such, only the 'print_function' and 'absolute_import' statements are
required.

Found using 'modernize'

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agorequirements: Update version of dateutil used
Stephen Finucane [Thu, 26 Nov 2015 17:29:19 +0000 (17:29 +0000)] 
requirements: Update version of dateutil used

The version of dateutil currently used does not support Python3, so
instead use the latest version.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotox: Add Python 3.4 targets
Stephen Finucane [Thu, 26 Nov 2015 17:16:48 +0000 (17:16 +0000)] 
tox: Add Python 3.4 targets

These don't currently pass, but they will allow for testing as Python
3 compatibility is added.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotox: Fix bug in 'coverage' target
Stephen Finucane [Thu, 3 Dec 2015 22:05:01 +0000 (22:05 +0000)] 
tox: Fix bug in 'coverage' target

The '--noinput' argument for './manage.py test' was in the wrong place.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agorequirements: Fix bug in 'requirements-dev.txt'
Stephen Finucane [Thu, 26 Nov 2015 17:28:05 +0000 (17:28 +0000)] 
requirements: Fix bug in 'requirements-dev.txt'

There was a circular dependency. Resolve this.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agobin/parsearchive: Add rudimentary archive parsing
Stephen Finucane [Wed, 15 Apr 2015 15:44:23 +0000 (16:44 +0100)] 
bin/parsearchive: Add rudimentary archive parsing

Add simple parsing of mbox archive files, as downloaded from a Mailman
instance. Currently this does not report errors or provide statistics
of any form.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agobin/parsemail: Use logging instead of prints
Stephen Finucane [Wed, 15 Apr 2015 16:03:47 +0000 (17:03 +0100)] 
bin/parsemail: Use logging instead of prints

This is more useful for helpful dialog messages. Without this it is
necessary to add prints to figure out why patches aren't parsed.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agobin/parsemail: Support user-provided list ID
Stephen Finucane [Fri, 13 Nov 2015 03:32:51 +0000 (03:32 +0000)] 
bin/parsemail: Support user-provided list ID

Sometimes mails won't contain the headers necessary to extract a
mailing list's ID (for example: mails downloaded from Mailman
archives). However, should the user already know the correct mailing
list ID then this extraction is not necessary.

Allow the user to provide a mailing list ID by the command line.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotrivial: Cleanup of 'bin/parsemail'
Stephen Finucane [Fri, 13 Nov 2015 03:21:03 +0000 (03:21 +0000)] 
trivial: Cleanup of 'bin/parsemail'

Do some cleanup of the script, removing excess whitespace and imports,
localising variables where possible etc. This file still isn't py3
compatible but it's getting there.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agomanagement: Create 'rehash' command
Stephen Finucane [Tue, 24 Nov 2015 04:04:43 +0000 (04:04 +0000)] 
management: Create 'rehash' command

The rehash script, though undocumented and possibly unused at the
moment, likely has some value to some users. Howver, it makes more
sense to provide this command as a management command like 'retag'.
Do this.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agosettings: Add console email backend
Stephen Finucane [Sat, 21 Nov 2015 17:22:22 +0000 (17:22 +0000)] 
settings: Add console email backend

Requiring configuration of an email server and email recipients for
debugging of email-based features is impractical. Use the console
backend provided by Django as the development default.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agologin: add link to password reset
aldot [Tue, 10 Nov 2015 20:53:09 +0000 (21:53 +0100)] 
login: add link to password reset

Refurbished version from 2010

Doesn't mention the username in the mail but in the confirmation step.
Essentially the templates are all optional but they do look better (and
more integrated in patchwork) than the default django admin thing.

No testing beyond some bored clicking here and there.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoCleanup requirements
Stephen Finucane [Thu, 12 Nov 2015 06:01:29 +0000 (06:01 +0000)] 
Cleanup requirements

* python-dateutil is only used in tests, so remove it from the
  production requirements
* mysqlclient is prefered to MySQLdb, so use that [1]
* selenium does not have its version fixed, so resolve that

[1] https://docs.djangoproject.com/en/1.8/ref/databases/#mysql-db-api-drivers

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agodocs: Document all the 'PW_' environment variables
Stephen Finucane [Thu, 12 Nov 2015 05:40:53 +0000 (05:40 +0000)] 
docs: Document all the 'PW_' environment variables

These are found in multiple places across the code. It would be helpful
to document them for the user.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoRework configurable 'PW_TEST_DB_xxx' settings
Stephen Finucane [Thu, 12 Nov 2015 05:17:45 +0000 (05:17 +0000)] 
Rework configurable 'PW_TEST_DB_xxx' settings

There are a number of environment variables that users can set to
configure different aspects of their testing environment. Rework these
like so:

* People use PostgreSQL, so make it as easy as possible for them to
  develop and test against it. Add a 'PW_TEST_DB_TYPE' setting
* Attempt to use defaults for the username and password in settings
* Allow the user to configure the database name, if they so wish

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoAdd requirements-test.txt
Stephen Finucane [Thu, 12 Nov 2015 04:54:31 +0000 (04:54 +0000)] 
Add requirements-test.txt

It's annoying that Django is not installed by default when setting up
a development environment. This is currently necessary because tox
uses these requirements files and it needs to test against multiple
versions of Django. Resolve this issue by adding a 'requirements-test'
file, thus allowing for Django-ful and Django-less scenarios.

This also allows us to delete 'requirements-base', which was a good
idea but alas contained too few options to really be viable. A little
duplication is better here.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoMove requirements into base directory
Stephen Finucane [Thu, 12 Nov 2015 04:48:29 +0000 (04:48 +0000)] 
Move requirements into base directory

These are documentation and therefore don't belong in the documentation
directory. The base directory is the usual location for these files, so
move them there.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotests: Save the test project
Damien Lespiau [Tue, 15 Sep 2015 20:12:07 +0000 (21:12 +0100)] 
tests: Save the test project

create_email() can use the default project for its mail. If that is the
case, chances are we are going to use that email later in a test where
we'll want that project to exist.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotests: Make sure all emails have a valid msgid
Damien Lespiau [Thu, 5 Jun 2014 00:27:08 +0000 (01:27 +0100)] 
tests: Make sure all emails have a valid msgid

Messages ids will be used by the Series code as the way to uniquely
identify series. We must ensure every single email that goes through the
parser has a valid msgid to not fail once we parse series.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agodocs: Remove 'apps' from paths
Damien Lespiau [Wed, 30 Sep 2015 16:41:43 +0000 (17:41 +0100)] 
docs: Remove 'apps' from paths

The patchwork directory structure has moved away from putting the
Django app(s) into 'apps/'

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agodocs: Fix a few code blocks
Damien Lespiau [Sun, 4 Oct 2015 13:34:59 +0000 (14:34 +0100)] 
docs: Fix a few code blocks

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviwed-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agodocs: Remove unhelpful command
Damien Lespiau [Sun, 4 Oct 2015 13:35:00 +0000 (14:35 +0100)] 
docs: Remove unhelpful command

That doesn't provide much value and can be removed.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agodocs: Fix a missing 3rd person 's'
Damien Lespiau [Sun, 4 Oct 2015 13:34:58 +0000 (14:34 +0100)] 
docs: Fix a missing 3rd person 's'

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agodocs: Remove duplicated 'the'
Damien Lespiau [Sun, 4 Oct 2015 13:34:57 +0000 (14:34 +0100)] 
docs: Remove duplicated 'the'

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoretag: Properly display the final count
Damien Lespiau [Sat, 7 Nov 2015 16:49:26 +0000 (16:49 +0000)] 
retag: Properly display the final count

i == count cannot happen in the loop as i will vary from 0 to count - 1.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoretag: Remove excess line endings
Damien Lespiau [Sat, 7 Nov 2015 16:49:25 +0000 (16:49 +0000)] 
retag: Remove excess line endings

In:

    commit 544b8bbcc7ec80d94c96f181886c51b177530a95
    Author: Stephen Finucane <stephen.finucane@intel.com>
    Date:   Fri Aug 21 15:32:17 2015 +0100

        trivial: Resolve PEP8 issues with 'management'

I noted that it wasn't all trivial changes. And indeed using the
stdin/stdout wrappers change the intended behaviour by adding a new
line.

The stderr wrapper also colors the line in red. Changed the last message
to be printed on stdout, seems more logical.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
9 years ago.gitignore: patchwork/settings/production.py
aldot [Tue, 10 Nov 2015 20:53:13 +0000 (21:53 +0100)] 
.gitignore: patchwork/settings/production.py

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agoTODO: cleanup deprecated unittest aliases
aldot [Tue, 10 Nov 2015 20:53:12 +0000 (21:53 +0100)] 
TODO: cleanup deprecated unittest aliases

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
9 years agotests/test_user: Remove duplicate test
aldot [Tue, 10 Nov 2015 20:53:11 +0000 (21:53 +0100)] 
tests/test_user: Remove duplicate test

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotests: Don't use exceptions for flow control
Stephen Finucane [Sat, 7 Nov 2015 01:28:56 +0000 (01:28 +0000)] 
tests: Don't use exceptions for flow control

Using exceptions for flow control is bad. Be consistent and instead
use proper functions to check for version support. This also allows
the use of tools to automatically identify feature flags when
removing support for Django versions in the future.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agoRevert "Remove Django < 1.7 blocks"
Stephen Finucane [Sat, 7 Nov 2015 01:20:05 +0000 (01:20 +0000)] 
Revert "Remove Django < 1.7 blocks"

This reverts commit ea050ad02c61ff1f0bd03ffb02b4706817401aee.

To allow patchwork deployment on Enterpise versions of Linux, it is
necessary to continue to support Django 1.6.

10 years agoRevert "tox: Remove the '-django16' targets"
Stephen Finucane [Sat, 7 Nov 2015 01:19:35 +0000 (01:19 +0000)] 
Revert "tox: Remove the '-django16' targets"

This reverts commit 05bedc9b7678901fd6c590f32c217e1992bd290f.

To allow patchwork deployment on Enterpise versions of Linux, it is
necessary to continue to support Django 1.6.

10 years agoRevert "docs: Note removed support for Django 1.6"
Stephen Finucane [Sat, 7 Nov 2015 01:18:08 +0000 (01:18 +0000)] 
Revert "docs: Note removed support for Django 1.6"

This reverts commit c9edb41d363b0c1926c530e8dc4c39a75e615397.

To allow patchwork deployment on Enterpise versions of Linux, it is
necessary to continue to support Django 1.6.

10 years agopwclient: Integrate 'checks' endpoint
Stephen Finucane [Tue, 21 Jul 2015 17:01:13 +0000 (18:01 +0100)] 
pwclient: Integrate 'checks' endpoint

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agoviews/xmlrpc: Add 'checks' endpoint
Stephen Finucane [Mon, 27 Jul 2015 20:40:02 +0000 (21:40 +0100)] 
views/xmlrpc: Add 'checks' endpoint

This includes adding a serializer plus the endpoint itself.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
--

v2: Version now returns a tuple to allow for sematic versioning

10 years agotemplates/patch: Add check summary panel
Stephen Finucane [Sat, 25 Jul 2015 12:51:13 +0000 (13:51 +0100)] 
templates/patch: Add check summary panel

Add a table to display the checks associated with a patch. This
includes the requisite styling along with some additional filters.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
--

v3: Slight restyling per web UI rework

10 years agotemplates/patch-list: Add patch "checks" column
Stephen Finucane [Thu, 23 Jul 2015 10:54:04 +0000 (11:54 +0100)] 
templates/patch-list: Add patch "checks" column

Add a column to display the important "checks" fields for each patch.
Note that only the "completed" checks are shown (i.e. "in progress" and
"not started" checks are ignored).

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agomodels: Add properties related to checks
Stephen Finucane [Thu, 23 Jul 2015 10:53:13 +0000 (11:53 +0100)] 
models: Add properties related to checks

Add properties for 'Patch' to get the unique checks associated with
a patch, the total number of each type of check and the combined state
of the check. These will be necessary to display this information to
the user.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agomodels: Add 'check' model
Stephen Finucane [Mon, 29 Jun 2015 20:38:18 +0000 (21:38 +0100)] 
models: Add 'check' model

This will represent the status of tests executed (or executing) against
a patch. This includes a suitable migration and admin view.

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
--

v3: Remove manual SQL migrations - they're not necessary/possible for
  Django 1.7/1.8, respectively

10 years agotrivial: Cleanup of 'admin.py'
Stephen Finucane [Tue, 21 Jul 2015 17:36:41 +0000 (18:36 +0100)] 
trivial: Cleanup of 'admin.py'

Resolve some issues with the aforementioned file. These are mostly
stylistic changes.

In addition, add a missing license. The date and author are
calculated from Git logs.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotrivial: Cleanup of 'models.py'
Stephen Finucane [Thu, 30 Apr 2015 20:16:08 +0000 (21:16 +0100)] 
trivial: Cleanup of 'models.py'

Resolve some issues with the aforementioned file. These are mostly
stylistic changes.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agoRemove Django < 1.7 blocks
Stephen Finucane [Thu, 5 Nov 2015 15:52:47 +0000 (15:52 +0000)] 
Remove Django < 1.7 blocks

Seeing as we no longer support these versions of Django, there is no
need to keep these blocks around.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotox: Remove the '-django16' targets
Stephen Finucane [Mon, 2 Nov 2015 20:20:42 +0000 (20:20 +0000)] 
tox: Remove the '-django16' targets

This version of Django 1.6 is no longer supported and there is no need
to test against it.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agodocs: Note removed support for Django 1.6
Stephen Finucane [Mon, 2 Nov 2015 20:23:24 +0000 (20:23 +0000)] 
docs: Note removed support for Django 1.6

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agodocs: Emphasise the deprecation of Django 1.6
Stephen Finucane [Mon, 2 Nov 2015 20:18:04 +0000 (20:18 +0000)] 
docs: Emphasise the deprecation of Django 1.6

Though already mentioned in the CHANGELOG, the UPGRADING document
should describe plans to deprecate support for Django 1.6. This will
ensure sysadmins are not suprised when they attempt to upgrade.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agoCHANGELOG: Add XML-RPC changes
Stephen Finucane [Mon, 2 Nov 2015 20:15:35 +0000 (20:15 +0000)] 
CHANGELOG: Add XML-RPC changes

This was missed in the original patchset.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agoCHANGELOG: Add UI rework and Selenium features
Stephen Finucane [Thu, 5 Nov 2015 04:25:44 +0000 (04:25 +0000)] 
CHANGELOG: Add UI rework and Selenium features

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotests: Add a way for the user to skip selenium tests
Damien Lespiau [Tue, 8 Sep 2015 20:54:02 +0000 (21:54 +0100)] 
tests: Add a way for the user to skip selenium tests

It's a bit more convoluted to setup the test environment to work with
selenium (eg. needs a browser installed and Xorg running, ...). It's
possible someone would want to skip those.

v2: Use 'PW' prefix rather than 'PATCHWORK', per existing test
  parameters, and pass said variable through tox

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotests: Add a couple of Selenium tests
Damien Lespiau [Tue, 8 Sep 2015 18:00:11 +0000 (19:00 +0100)] 
tests: Add a couple of Selenium tests

While developing the new series UI, several bug crept in but weren't
discovered until later. All because we don't have in-browser tests to go
along the lower level tests we already have.

In particular, behaviours that need javascript to run cannot be tested
outside of a full environment with the pages being served to an actual
browser.

This commit introduces selenium to the test suite and starts with 2
simple tests to give a taste of what it looks like.

test_default_focus: make sure we do focus the username field on the
                    login page

test_login: shows how to chain actions to test the full login phase.
            This is quite similar the lower level test, except it also
            checks we display the username once logged in.

v2: Use LiveServerTestCase for django pre-1.7
v3: Propagate the DISPLAY environment variable to have an X display
    specified for the browser
v4: Log execution of the chrome driver, useful for debugging
v5: Rebase on top of upstream
v6: Pass environmental variables to tox and ensure PEP8 compliance

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotox: Use a range of ports for live servers
Damien Lespiau [Tue, 22 Sep 2015 16:11:49 +0000 (17:11 +0100)] 
tox: Use a range of ports for live servers

From:

    https://docs.djangoproject.com/en/1.8/topics/testing/tools/#liveservertestcase

In the case where the tests are run by multiple processes in parallel
(for example, in the context of several simultaneous continuous
integration builds), the processes will compete for the same address, and
therefore your tests might randomly fail with an "Address already in use"
error. For example:

    Traceback (most recent call last):
      File
      ".../python2.7/site-packages/django/test/testcases.py",
      line 1193, in setUpClass
          raise cls.server_thread.error
          error: [Errno 98] Address already in use

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotests: Don't change settings.STATIC_URL in the XML-RPC tests
Damien Lespiau [Tue, 22 Sep 2015 16:11:46 +0000 (17:11 +0100)] 
tests: Don't change settings.STATIC_URL in the XML-RPC tests

I tracked down a weird bug where the Selenium tests supposed to serve
all static files (.css, .js. ...) weren't doing so when running the
full test suite, but everything was working when running the tests in
isolation.

Turns out one of the other tests was changing settings.STATIC_URL
mid-way without restoring the original value in tearDown() and thus
impacting other tests.

It seems that this change wasn't necessary, the XML-RPC server doesn't
server any static file anyway.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agotests: Use --noinput when running tests
Damien Lespiau [Tue, 22 Sep 2015 16:11:45 +0000 (17:11 +0100)] 
tests: Use --noinput when running tests

We don't want prompts when running tests, especially when they are run
through tox and most likely on a CI server.

When cancelling a test mid-way, the test db is not destroyed ans
subsequent runs will fail trying to create it and asking the user what
to do. --noinput will use the default answer, that is to destroy the
test db and start anew.

v2: Rebase on top of upstream
v3: Rebase, yet again.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com> (v2)
10 years agotests: Remove a spurious new line
Damien Lespiau [Tue, 22 Sep 2015 16:11:44 +0000 (17:11 +0100)] 
tests: Remove a spurious new line

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agofilters: Fix submitter display when we only have an email address
Damien Lespiau [Mon, 24 Aug 2015 16:54:08 +0000 (17:54 +0100)] 
filters: Fix submitter display when we only have an email address

I'm fairly sure I fixed that already, but here we go again. It's totally
valid to only have an email address for the submitter, so handle that
case properly.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agofilters: Submit the form when <Enter> is pressed on a closed submitter field
Damien Lespiau [Mon, 24 Aug 2015 16:49:52 +0000 (17:49 +0100)] 
filters: Submit the form when <Enter> is pressed on a closed submitter field

<Enter> when an element of the form is focused should submit the form.
Before this patch, when <Enter> was pressed on the submitter button,
nothing would happen.

So, we tweak our <Enter> handling on the submitter input a bit more:
<Enter> can be used to select the submitter from the autocompletion
list, but, when pressed a second time (ie. when the autocompletion
option has be selected and the dropdown isn't shown), we submit the
form.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agofilter: Tweak the autocompletion behaviour on <Enter>
Damien Lespiau [Mon, 24 Aug 2015 16:27:49 +0000 (17:27 +0100)] 
filter: Tweak the autocompletion behaviour on <Enter>

No patch has landed yet and we've already had feedback from users (which
is a good thing!) that didn't want to lose the "quick" submitter search
by just typing a string and pressing <Enter> without having to wait for
the autocompletion to finish.

This will also make <Enter> do something useful for input strings that
have fewer than 4 characters, the autocompletion query only triggers
after that.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch-list: Use table-condensed to display the patch list
Damien Lespiau [Fri, 21 Aug 2015 15:04:03 +0000 (16:04 +0100)] 
patch-list: Use table-condensed to display the patch list

Wolfram didn't like the fact we're now seeing far fewer patches on a
single page. That sounds fair enough and the table-condensed bootstrap
class removes some padding, hopefully making it better.

Suggested-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch: Capitalize "Incoming Patches"
Damien Lespiau [Mon, 16 Mar 2015 13:34:45 +0000 (13:34 +0000)] 
patch: Capitalize "Incoming Patches"

It's a title after all.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agobase: Don't put the logout button in the is_staff block
Damien Lespiau [Mon, 16 Mar 2015 13:30:00 +0000 (13:30 +0000)] 
base: Don't put the logout button in the is_staff block

Regular users didn't have their logout/profile drop down!

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch-list: Limit the number of chars to 100 for the patch subject
Damien Lespiau [Sat, 8 Nov 2014 15:43:36 +0000 (15:43 +0000)] 
patch-list: Limit the number of chars to 100 for the patch subject

It can happen that people send a patch with a huge subject, by mistake.
Make sure it can interfere too much with the list of patches.

As an email subject can include extra words compared to a patch subject
(list header, tags, ...) let's have a slightly larger limit than 72 or
80.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch: Move the submitter and date out of the details
Belén Barros Peña [Sat, 8 Nov 2014 11:56:48 +0000 (11:56 +0000)] 
patch: Move the submitter and date out of the details

Trying to reduce the number of read-only fields in details.

Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agopatch: Redesign slightly the comment headers
Belén Barros Pena [Thu, 6 Nov 2014 14:02:34 +0000 (14:02 +0000)] 
patch: Redesign slightly the comment headers

Signed-off-by: Belén Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch: Put the download links next to the "Patch" header
Belén Barros Peña [Sun, 2 Nov 2014 10:38:58 +0000 (10:38 +0000)] 
patch: Put the download links next to the "Patch" header

v2: Fix 'dowload' typo x 2 (Bryce Harrington)

Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch: Override Bootstrap's <pre> styling
Damien Lespiau [Sat, 1 Nov 2014 23:39:08 +0000 (23:39 +0000)] 
patch: Override Bootstrap's <pre> styling

To look more like what patchwork was using.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch: Pull the patch between the commit message and comments
Damien Lespiau [Sat, 1 Nov 2014 23:29:20 +0000 (23:29 +0000)] 
patch: Pull the patch between the commit message and comments

This follows a logical flow, commit message, patch then comments.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agopatch: Single out the commit message
Damien Lespiau [Sat, 1 Nov 2014 19:01:50 +0000 (19:01 +0000)] 
patch: Single out the commit message

All 'Comments' are stored the same way in the db, but I believe it's
worth making the distinction between introducing what the patch does and
eventual review comments.

v3: Fix docstrings
v2: Use two new Patch methods to retrieve the commit message and the
    other comments (called answers here) (Jeremy Kerr)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch: Remove the permalink item
Damien Lespiau [Mon, 27 Oct 2014 22:06:59 +0000 (22:06 +0000)] 
patch: Remove the permalink item

One just has to copy the URL, no real need to duplicate that fact.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agostyle: Make the submission tables use #0A0A47
Damien Lespiau [Mon, 27 Oct 2014 20:20:07 +0000 (20:20 +0000)] 
style: Make the submission tables use #0A0A47

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agoboxes: Style boxes like the patch form
Damien Lespiau [Mon, 27 Oct 2014 20:19:17 +0000 (20:19 +0000)] 
boxes: Style boxes like the patch form

Here again, a pass may be needed in the future, but for now, make things
consistent.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatchform: Minimal changes so patchform titles don't look out of place
Damien Lespiau [Mon, 27 Oct 2014 20:07:37 +0000 (20:07 +0000)] 
patchform: Minimal changes so patchform titles don't look out of place

I'd like to add editing in place in the list of patches instead of
having to select, scroll down and make the changes.

For the time being, just change the header background color and padding
space.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopaginator: Redesign the paginator
Belén Barros Peña [Thu, 9 Oct 2014 09:27:39 +0000 (10:27 +0100)] 
paginator: Redesign the paginator

A few things:

  - Use the … glyph
  - Remove the box around the page numbers
  - Slight restyling

Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopaginator: Tweak the number of pages shown
Belén Barros Peña [Thu, 9 Oct 2014 09:23:15 +0000 (10:23 +0100)] 
paginator: Tweak the number of pages shown

We don't really need that many pages displayed in the pagination, tweak
the numbers down a bit.

Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agobase: Use a Bootstrap badge for the number of todo items
Damien Lespiau [Fri, 3 Oct 2014 00:07:11 +0000 (01:07 +0100)] 
base: Use a Bootstrap badge for the number of todo items

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agobase: Capitalize the menu items in the navbar
Damien Lespiau [Fri, 3 Oct 2014 00:03:46 +0000 (01:03 +0100)] 
base: Capitalize the menu items in the navbar

v2: Rebase on top of the "Project Info" renaming

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agobase: Group username/profile/logout with a dropdown
Damien Lespiau [Thu, 2 Oct 2014 23:55:28 +0000 (00:55 +0100)] 
base: Group username/profile/logout with a dropdown

We regoup user related information (log out and profile) in a dropdown
with the user identity as label.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch-list: Make the table header sticky
Damien Lespiau [Thu, 2 Oct 2014 23:29:43 +0000 (00:29 +0100)] 
patch-list: Make the table header sticky

So, when scrolling down the list of patches, we still get what are the
field displayed. This is espacially important as I plan to add a few
more.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopackage: Add the Sticky Table Header jQuery plugin
Damien Lespiau [Thu, 2 Oct 2014 23:29:14 +0000 (00:29 +0100)] 
package: Add the Sticky Table Header jQuery plugin

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agopatch-list: Re-design the main list of patches with Bootsrap
Belén Barros Peña [Thu, 2 Oct 2014 16:41:28 +0000 (17:41 +0100)] 
patch-list: Re-design the main list of patches with Bootsrap

A bit more spacing everywhere. Also opted for the highlight on hover
instead of the alternating row background color.

v2: Squash the patch fixing the unit tests (Jeremy Kerr)

Signed-off-by: Belén Barros Pena <belen.barros.pena@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agofilters: Rewrite the submitter autocompletion code
Damien Lespiau [Sat, 27 Sep 2014 22:44:25 +0000 (23:44 +0100)] 
filters: Rewrite the submitter autocompletion code

We now have a nice(r) autocompletion widget that will popup the list of
options directly underneath the input fild. A few changes are done in
this commit that couldn't be split any further:

- Use jQuery's $.ajax() for the completion query
- Use the application/json content type on the completion answer to
  allow jQuery to directly create an object from it instead of giving
  back a string (because of the text/plain content type)
- Crafted more logical objects in the json answer ie all properties are
  at the same level instead of the default queryset serializer that put
  the object fields in a 'field' sub-object.
- Use selectize.js for the autocompletion widget logic

A slight change in behaviour is that we now don't allow "free form"
submitter search, ie we need a valid completion to search with that
specific person (through its primary key). I didn't remove the backend
logic that allows the "free form" mechanism, but maybe we should.

v2: Squash the unit tests fixes into this patch (Jeremy Kerr)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agobase: Add selectize to the base template
Damien Lespiau [Mon, 29 Sep 2014 23:50:19 +0000 (00:50 +0100)] 
base: Add selectize to the base template

The only tricky thing is the inclusion of the EcmaScript shim for IE8.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agoselectize: Add selectize to patchwork
Damien Lespiau [Mon, 29 Sep 2014 23:43:00 +0000 (00:43 +0100)] 
selectize: Add selectize to patchwork

Turns out, it's somewhat hard to do a nice auto-completion widget and
I'd like to get replace the input field + combo box that is currently
there. So import a library that will take care of the heavy lifting for
us.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agofilters: Redesign the filters form with the help of bootstrap
Damien Lespiau [Sat, 27 Sep 2014 21:42:21 +0000 (22:42 +0100)] 
filters: Redesign the filters form with the help of bootstrap

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agofilters: Fix a typo in comment
Damien Lespiau [Sat, 27 Sep 2014 21:41:59 +0000 (22:41 +0100)] 
filters: Fix a typo in comment

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
10 years agofilters: Use a more visible and human-friendly phrasing for 'filters'
Belén Barros Peña [Sat, 27 Sep 2014 20:56:57 +0000 (21:56 +0100)] 
filters: Use a more visible and human-friendly phrasing for 'filters'

v2: Change commit message

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agopatch-list: Split the filter out of the patch table
Belén Barros Peña [Sat, 27 Sep 2014 20:54:47 +0000 (21:54 +0100)] 
patch-list: Split the filter out of the patch table

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Belén Barros Peña <belen.barros.pena@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>