summaryrefslogtreecommitdiff
path: root/tox.ini
Commit message (Collapse)AuthorAge
* trivial: Feed 'patchwork.migrations' through blackStephen Finucane2020-03-19
| | | | | | | Include migrations in the flake8 checks, which should catch some simple undefined variables errors. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Add support for djangorestframework 3.11Stephen Finucane2020-02-28
| | | | | | There are no breaking changes apparent. Signed-off-by: Stephen Finucane <stephen@that.guru>
* tox: Switch non-pyNN targets to Python 3Stephen Finucane2020-02-27
| | | | | | | This is long overdue and highlights a small issue, which is easily fixed by use of Sphinx. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Revert "Remove Django 2.0 support"Daniel Axtens2019-11-05
| | | | This reverts commit f09bfd460814d7125437b0b45a183a221692584a.
* Remove Django 2.0 supportDaniel Axtens2019-11-05
| | | | | | | It's no longer supported upstream, per https://www.djangoproject.com/download/#supported-versions Signed-off-by: Daniel Axtens <dja@axtens.net>
* travis, tox: only do coverage testing in py27Daniel Axtens2019-10-29
| | | | | | | | | | | | | | | | | Currently Travis calls `tox -e coverage` unconditionally. However, the environment has py27 basepython, so all the runs only generate py27 coverage! Rather than try to untangle that, just run the coverage when run in a py27 travis environment. This makes things faster for no loss of coverage. It means that codecov has nothing to submit for the py3x environments, but that's no real loss: it would otherwise submit lots of duplicate data. We could try to improve coverage by running coverage for 27 and 3x, but given that 27 is going away, don't stress at this point. Signed-off-by: Daniel Axtens <dja@axtens.net>
* Python 3.8 supportAndrew Donnellan2019-10-24
| | | | | | | Enable Python 3.8 in our tests and list it as a supported version. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Daniel Axtens <dja@axtens.net>
* trivial: Style fixesStephen Finucane2019-09-27
| | | | | | An assortment of fixes identified through the integration of pre-commit. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Add support for djangorestframework 3.10Stephen Finucane2019-09-09
| | | | | | | This is necessary for proper Django 2.2 support. We retain support for older versions since 3.10 is Python 3-only. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Drop support for Python 3.4, add Python 3.7Stephen Finucane2019-09-08
| | | | | | | It's no longer supported upstream and the *second* last Ubuntu LTS release provides something newer. Time to move on. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Remove pwclientStephen Finucane2019-06-17
| | | | | | | | | Let's start managing this via a separate project, which will allow the client to evolve separately from the server. No redirect is added for the old '/pwclient' URL as it seems wiser to return a HTTP 404 error code. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Add support for Django 2.2Stephen Finucane2019-06-05
| | | | Signed-off-by: Stephen Finucane <stephen@that.guru>
* tox: Use 'dirhtml' builder for docsStephen Finucane2019-01-29
| | | | | | This is what we use for 'patchwork.readthedocs.io'. Signed-off-by: Stephen Finucane <stephen@that.guru>
* tox: Disable W504 ("line break after binary operator")Stephen Finucane2018-10-26
| | | | | | | | | | | This was introduced in a recent version of 'pycodestyle'. The documentation notes [1] that it is mutually exclusive with W503, which we do enforce, suggesting that we disable one or the other. Avoid the churn and stick to the older rule, which I personally prefer. [1] http://pycodestyle.pycqa.org/en/latest/intro.html#error-codes Signed-off-by: Stephen Finucane <stephen@that.guru>
* Add support for Django REST Framework 3.9Stephen Finucane2018-10-18
| | | | | | | As with 3.7 and 3.8, there are no breaking changes we need to be concerned with here. Signed-off-by: Stephen Finucane <stephen@that.guru>
* tox: Fix issues with 'bashate' targetStephen Finucane2018-10-14
| | | | | | | | We don't care about too long lines for bash so the error is disabled. The version marker is removed as it's unnecessary. Signed-off-by: Stephen Finucane <stephen@that.guru>
* 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>