summaryrefslogtreecommitdiff
path: root/tox.ini
Commit message (Collapse)AuthorAge
* Add support for Django 2.1Stephen Finucane2018-10-06
| | | | | | For once, this just works. Yay! Signed-off-by: Stephen Finucane <stephen@that.guru>
* Add support for django-filter 2.0Stephen Finucane2018-10-06
| | | | | | | | This is necessary for Django 2.1 support. We retain support for django-filter 1.0 and 1.1 as 2.0 is Python 3-only. Thankfully there is essentially zero cost in doing so for now. Signed-off-by: Stephen Finucane <stephen@that.guru>
* requirements: Start using fixed versionsStephen Finucane2018-09-22
| | | | | | | | | | | | | | Given that 'tox' doesn't actually read any of these, there's no reason to use ranges of requirements. Instead, use the latest and greatest for live instances and rely on tox to validate behavior with older versions. The selenium dependency, which is no longer required since commit bab2895f, is removed. The psycopg2 dependency is updated to use psycopg2-binary, as this avoids the need for the libpg library and removes a deprecation warning. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
* tox: Specify doctree directoryStephen Finucane2018-09-18
| | | | | | | | | Sphinx 1.8 has a change in where it places 'doctree' directories. Rather than ignore this directory via gitignore, specify where this directory should go. This will ensure future changes in Sphinx's behavior won't affect us. Signed-off-by: Stephen Finucane <stephen@that.guru>
* tox: Rework warning infrastructureStephen Finucane2018-08-26
| | | | | | | | | | | | Python 3.5's xmlrpc spews lots of ResourceWarnings that go away in 3.6, so silence them. We also see some warnings from inside the import machinery, which we also silence. Signed-off-by: Stephen Finucane <stephen@that.guru> [dja: make slightly more restrictive, reword commit message] Signed-off-by: Daniel Axtens <dja@axtens.net>
* Add support for Django 2.0Stephen Finucane2018-08-26
| | | | | | | | | | | | | | | | | | | | | | | | Nothing too complicated here except for the addition of a new compat wrapper, which will be removed again shortly. According to the Django release notes, Django should function with Python 3.4. However, it was not possible to get this functioning due to the below error: Traceback (most recent call last): File ".../patchwork/manage.py", line 11, in <module> ... File ".../django/db/models/fields/related.py", line 313, in contribute_to_class 'app_label': cls._meta.app_label.lower(), TypeError: unsupported operand type(s) for %: 'bytes' and 'dict' This does not appear to be an issue with Patchwork but the exact root cause has not been identified. As a result, only Python 3.5 and 3.6 are marked as supported for this Django version. As this is the first Python 3-only dependency we have, we need to start making use of the 'python_version' environment marker. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
* Remove support for Django 1.8, 1.9, 1.10Stephen Finucane2018-08-26
| | | | | | | | | | | | | | These are now all EOL and Debian Testing supports Django 1.11 (LTS). We can and should drop them. This change does not remove the many compat wrappers. These will be removed separately (there are a lot of them). This leaves 1.11 as the only supported version. This will be remedied shortly with the inclusion of Django 2.0 support. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
* Add support for django-filter 1.1Stephen Finucane2018-08-26
| | | | | | | There's one warning to handle here. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
* Add support for Django REST Framework 3.7, 3.8Stephen Finucane2018-08-26
| | | | | | | | No breaking changes that concern us here. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Daniel Axtens <dja@axtens.net>
* tests: Remove Selenium testsStephen Finucane2018-04-26
| | | | | | | | | | | | | | | | These were added quite some time ago in order to allow some level of UI testing. However, I've personally never used them, they're not used by the CI, and no one has shown any desire in extending them in their time here. It is time to bid these tests adieu. Removing these allows us to remove a whole load of wiring that existed just to enable these. Some of this, like the '--quick-tox' option for the Dockerfile, is retained so we don't need to use different commands for various versions of Patchwork, but the majority is just stripped out. Signed-off-by: Stephen Finucane <stephen@that.guru> Cc: Daniel Axtens <dja@axtens.net>
* tox: Add 'docs' to default environmentsStephen Finucane2018-04-14
| | | | | | | | | I'd simply run 'tox' (via docker) to validate some previous patches. Sadly that didn't catch a release note issue. Make sure this doesn't happen again by always running 'docs'. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
* travis: Run pep8 for py27 onlyStephen Finucane2018-02-03
| | | | | | | | Keep run times to a minimum. Signed-off-by: Stephen Finucane <stephen@that.guru> Acked-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Daniel Axtens <dja@axtens.net>
* Add support for Python 3.6Stephen Finucane2018-01-04
| | | | | | | | | This is simply a case of adding the required tox environment and updating the docs. We don't support Python 3.3 so the docs are updated accordingly. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net>
* Remove support for Django 1.6, 1.7Stephen Finucane2018-01-04
| | | | | | | | | | | | These versions are massively outdated and the only reason for keeping them was to allow installation on RHEL 7 using the version provided via EPEL. No one's actually using this so just kill it. This also allows us to remove support for django-filter 0.11, which was only retained for use with these older versions of Django. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net>
* tox: Add Django 1.11Stephen Finucane2017-12-03
| | | | | | | | | | | | | | | | | Add support for the latest release of Django, 1.11. This is the next LTS release (1.8 being the last one), so it's particularly important that we maintain support for this going forward. While neither the latest releases of django-rest-framework nor that of django-filter explicitly support Django 1.11, it appears that they are functional [1][2]. We can bump these packages separately when new versions are released. [1] https://github.com/encode/django-rest-framework/issues/5108 [2] https://github.com/carltongibson/django-filter/commit/1243ff7e Signed-off-by: Stephen Finucane <stephen@that.guru> Tested-by: Daniel Axtens <dja@axtens.net>
* tox: Remove '--liveserver' parameterStephen Finucane2017-12-03
| | | | | | | | | | | | This parameter is no longer supported in Django 1.11 [1]. Remove this and instead set the 'DJANGO_LIVE_TEST_SERVER_ADDRESS' environment variable, which will do the same thing for Django < 1.11 and be ignored by Django >= 1.11. [1] https://docs.djangoproject.com/en/1.11/releases/1.11/#liveservertestcase-binds-to-port-zero Signed-off-by: Stephen Finucane <stephen@that.guru> Tested-by: Daniel Axtens <dja@axtens.net>
* tox: Don't use exceptions - just warnStephen Finucane2017-05-18
| | | | | | | | It seems Django uses deprecated items in Python 3.x, meaning we can't use this. Signed-off-by: Stephen Finucane <stephen@that.guru> Fixes: 9db5cd0 ("tox: Turn deprecation notices into warnings")
* tox: Turn deprecation notices into warningsStephen Finucane2017-05-18
| | | | | | | | | | | Django does an excellent job of marking what features are going to change in upcoming releases through extensive use of the 'warnings' module. Pass the '-Werror' flag to 'manage.py' in tests, ensuring that any warnings will result in exceptions instead. This should make upgrades a mostly painless process going forward. Signed-off-by: Stephen Finucane <stephen@that.guru>
* tox: Always recreate docsStephen Finucane2017-05-04
| | | | | | | The reno extension doesn't seem to trigger an environment rebuild. Force this. Signed-off-by: Stephen Finucane <stephen@that.guru>
* requirements: Test older versions of DRF (v2)Stephen Finucane2017-04-28
| | | | | | | | | | | | | | | | | | | In commit febad055, we attempted to start testing older versions of Django REST Framework for use with older versions of Django. This work was later reverted in commit 6f2ddab6 due to issues with 'django-filter' versions. There are additional reasons for validating older versions of DRF, such as supporting the versions provide as part of distributions. It turns out that those issues aren't such a big deal and can be handled with a shim. All in all, this means we can and should support these older versions of Django REST Framework, and that is what we'll do. Note that the minimum version supported in requirements.txt is not changed as it's good practice to use the latest available version. However, that doesn't make it any less supported. Signed-off-by: Stephen Finucane <stephen@that.guru>
* docs: Add skeleton for Sphinx docsStephen Finucane2017-04-18
| | | | | | | | This is mostly the output of 'sphinx-quickstart' with all non-HTML build cruft removed and Sphinx minimum version set to 1.5. A tox target is included and the output of the docs build ignored. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Update djangorestframework from 3.5 to 3.6pyup-bot2017-04-14
|
* tox: Add 'bashate' targetStephen Finucane2017-02-06
| | | | | | | | This is not as powerful as Shellcheck (yet), but it's Python and therefore installable in a virtualenv. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net>
* Revert "requirements: Test older versions of DRF"Stephen Finucane2017-01-22
| | | | | | | | | | | | | | | | | This partially reverts commit febad055fb6609369f1a465a5eec323549c5c065. While Django REST Framework works with Django 1.6 and 1.7, the versions of Django Filters that provide DRF integration do not [1]. It doesn't really make sense to enable only partial REST API support (i.e. no filtering) for users with older Django versions and this approach will cause far too much confusion among users. Better to just drop REST API support for users with these insecure versions and encourage them to update to supported versions of Django should they wish to use these features. [1] https://github.com/carltongibson/django-filter/blob/0.15.0/CHANGES.rst Signed-off-by: Stephen Finucane <stephen@that.guru> Fixes: 0fc32337 ("REST: Integrate django-filter support")
* REST: Use generic views instead of ViewSetsStephen Finucane2016-12-23
| | | | | | | | | | | | | | | | | | | | ViewSet provide an easy way to define an API, but they don't offer much flexibility. To get them to work as expected, a lot of hacks were required. Generic views provide a more verbose, but ultimately easier to understand, version. Using generic views lets us remove the dependency of drf-nested-routers, bringing us back down to two main dependencies. It also lets us remove the AuthenticatedReadOnly permission class, as the DRF provides a similar permission class that can be used with generic views. The main user facing change is that invalid methods, such as POST on an endpoint that doesn't allow object creation, will now return a HTTP 405 (Method Not Allowed) error code rather than the HTTP 403 (Forbidden) error code previously returned. This is the semantically correct option and should have been used all along. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net>
* requirements: Test older versions of DRFStephen Finucane2016-11-18
| | | | | | | | We still care about Django 1.6 and 1.7, at least until 2.0 is released. Start testing REST functionality on these versions by using older versions. Signed-off-by: Stephen Finucane <stephen@that.guru>
* travis: Integrate with codecovStephen Finucane2016-11-01
| | | | | | | | This mostly involves enabling coverage as a default tox target. We add pep8 too, while we're at it. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net>
* requirements: Add support for Django 1.10Stephen Finucane2016-10-10
| | | | | | | | All issues around 1.10 support have been resolved. Add tox targets and extend the range of supported versions to include this release. Signed-off-by: Stephen Finucane <stephen@that.guru> Reviewed-by: Daniel Axtens <dja@axtens.net>
* tox: Don't create '.pyc' filesStephen Finucane2016-09-07
| | | | | | | | | | | In '8e58c29', code was added to delete '.pyc' files. However, this was later reverted in '9fd161' due to the increase in run time that this incurred. However, the need to avoid stale '.pyc' files still exists. To resolve this, add the 'PYTHONDONTWRITEBYTECODE' environment option to disable generation of these files. This includes a slight performance increase. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
* test: fix coverage testsDaniel Axtens2016-09-03
| | | | | | | | * ignore migrations * install dev requirements, as the dev settings are used Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
* tox: Add Python 3.5Daniel Axtens2016-09-01
| | | | | | | | | Python 3.5 is shipped with Ubuntu 16.04, and it's the new stable release. Add support for this runtime in tox. Note that Django 1.6 and 1.7 don't work with Python 3.5, so these are excluded. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
* tox: Disable F405Stephen Finucane2016-08-21
| | | | | | | | | Recent versions of tox throw a lot of errors when using star-imports. While these warnings are generally justified, the settings files require this. Since 'noqa'-ing the offending lines would be rather arduous, simply disable the warning instead. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
* Pass more environment variables through to toxDaniel Axtens2016-08-21
| | | | | | | | In order to get tox tests working, we want db host, db port, home, and xauthority. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephenfinucane@hotmail.com>
* Revert "tox: Cleanup '.pyc' files before run"Stephen Finucane2016-03-11
| | | | | | | | | This reverts commit 8e58c29f23b9cc072c003268d641f00084ce3b3b. The benefits added by this change did not outweigh the cost it introduces in test run time. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* tox: Also white list PW_TEST_DB_TYPEDamien Lespiau2016-03-08
| | | | | | | That's the variable we use to select the database backend. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* tox: Add 'venv' targetStephen Finucane2016-01-25
| | | | | | | The venv command provides access to the tox virtual environment without the need to source the actual virtualenv 'activate' file. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* tox: Cleanup '.pyc' files before runStephen Finucane2016-01-25
| | | | | | | Sometimes leftover '.pyc' files can cause tests to fail. Ensure this never happens by always removing these files on start. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* tox: Cleanup fileStephen Finucane2016-01-19
| | | | | | Remove some unnecessary code and reorder in a logical fashion Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* tox: Add django19 targetsStephen Finucane2016-01-19
| | | | Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* tox: 'flake' -> 'flake8'Stephen Finucane2016-01-12
| | | | | | The 'flake8' target specified the wrong dependendency. Resolve this. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* tox: Remove ignored PEP8 errors and directoriesStephen Finucane2015-12-03
| | | | | | | | | | | | | | | | | | | | 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>
* tox: Add Python 3.4 targetsStephen Finucane2015-12-03
| | | | | | | 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>
* tox: Fix bug in 'coverage' targetStephen Finucane2015-12-03
| | | | | | The '--noinput' argument for './manage.py test' was in the wrong place. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
* Add requirements-test.txtStephen Finucane2015-11-21
| | | | | | | | | | | | | | 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>
* Move requirements into base directoryStephen Finucane2015-11-21
| | | | | | | | 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>
* Revert "tox: Remove the '-django16' targets"Stephen Finucane2015-11-07
| | | | | | | This reverts commit 05bedc9b7678901fd6c590f32c217e1992bd290f. To allow patchwork deployment on Enterpise versions of Linux, it is necessary to continue to support Django 1.6.
* tox: Remove the '-django16' targetsStephen Finucane2015-11-05
| | | | | | | 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>
* tests: Add a way for the user to skip selenium testsDamien Lespiau2015-11-05
| | | | | | | | | | | | 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>
* tests: Add a couple of Selenium testsDamien Lespiau2015-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tox: Use a range of ports for live serversDamien Lespiau2015-11-05
| | | | | | | | | | | | | | | | | | | | | | 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>