Граф коммитов

31 Коммитов

Автор SHA1 Сообщение Дата
Dave Hunt d659d0dbec
Migrate test_switch_repo to Travis suite (#2956) 2017-11-17 09:48:05 +00:00
Dave Hunt 9fd3c72241
Bug 1340305 - Allow Selenium tests to be run locally 2017-11-09 12:55:25 +00:00
Ed Morley 204b2ea49a Bug 1378118 - Disable unused auto-loaded pytest plugins
This stops the broken mozlog plugin being loaded, which was preventing
us updating to newer pytest. Other unused plugins have also been
disabled, to avoid future issues and improve pytest load times.
2017-07-04 14:18:13 +01:00
Ed Morley de0f8d7f47 Bug 1370279 - Improve pytest test collection performance
Before this change running pytest with no arguments took 51 seconds
to just collect the list of tests to run (`pytest --collect-only`),
since the entire source directory was scanned (including the 18,000
files in `node_modules`).

Now it takes only 3.7 seconds.
2017-06-05 17:57:48 +01:00
Ed Morley 64583c1924 Bug 1370279 - Prevent conflicts with jenkins pytest configuration
This fixes the `ConftestImportFailure` exception seen when trying
to run pytest in Vagrant after bug 1286686 landed.
2017-06-05 17:57:48 +01:00
Ed Morley da7f1bdc7d Bug 1370279 - Move pytest configuration to setup.cfg
Since it keeps everything test/lint/tool related in one place, so
easier to keep ignore paths in sync and less repo clutter.
2017-06-05 17:57:48 +01:00
Rebecca Billings 1d1f651ce4 Bug 1286686 - Import Selenium tests from treeherder-tests repo (#2302)
Initially these will continue to be run in Jenkins, however later they
will be converted to run on Travis along with the existing local
Selenium tests.
2017-05-16 23:27:45 +01:00
Ed Morley c1dfddc5f6 Bug 1348375 - Re-enable flake8 rule F401
Since it's actually needed to catch unused imports, albeit it's a bit
more strict than it used to be, so required some fix-ups before it could
be re-enabled.
2017-03-20 13:18:21 +00:00
Ed Morley f91611f646 Bug 1334329 - Stop ignoring linter errors in migration files
Now that we're on Django 1.10 (which doesn't add unused imports) and the
old migrations have been removed we no longer need to ignore them and
risk hiding real breakage.
2017-02-27 17:14:50 +00:00
James Graham 067aad46bd Bug 1337726 - Disable E129 pyflakes lint.
This demands a weird style when using
if (something and
    something_else):

which is not really helpful to code readability.
2017-02-10 00:21:10 +00:00
Ed Morley 0f20ff2569 Bug 1333092 - Update to newer flake8, pycodestyle (pep8) & pyflakes
flake8 has been updated to support the newer versions of pycodestyle
(formerly named pep8) and pyflakes. Some of the new checks are too noisy
so have been added to the ignore list.

Changes:

http://flake8.pycqa.org/en/latest/release-notes/index.html
https://gitlab.com/pycqa/flake8/compare/2.5.4...3.2.1

https://github.com/PyCQA/pycodestyle/blob/master/CHANGES.txt
https://github.com/PyCQA/pycodestyle/compare/1.5.7...2.2.0

https://github.com/PyCQA/pyflakes/blob/master/NEWS.txt
https://github.com/PyCQA/pyflakes/compare/1.0.0...1.3.0

https://github.com/PyCQA/mccabe/blob/master/README.rst#changes
https://github.com/PyCQA/mccabe/compare/0.4.0...0.5.3
2017-01-23 16:30:25 +00:00
Ed Morley 80dd4cf2ec Bug 1333092 - Fix flake8 E402: module level import not at top of file
treeherder/config/wsgi.py:17:1: E402 module level import not at top of file
treeherder/config/wsgi.py:18:1: E402 module level import not at top of file
2017-01-23 16:30:25 +00:00
Ed Morley 7cce7b2fa7 Bug 1308354 - Remove SCL3-specific code now we're on Heroku 2016-10-24 18:55:03 +01:00
William Lachance 2b150f36bf Make flake8/pep8 ignore perf migrations as well 2016-04-04 11:12:34 -04:00
James Graham 99bd93c4f6 Don't run pylint in the migrations directory 2016-03-22 17:04:33 +00:00
Ed Morley b2ecb99390 Bug 1213230 - Remove peep.py
Since it's now unused.
2016-02-15 12:06:17 +00:00
Ed Morley 1e599b6681 Bug 1192957 - Add config for isort
It can now be run with just `isort` and will do the right thing.

The chosen multi-class import style is:

from third_party import (lib1,
                         lib2,
                         lib3
                         ...)

See the docs added in a later commit, or:
https://github.com/timothycrosley/isort/blob/develop/README.rst
https://github.com/timothycrosley/isort/wiki/isort-Settings
2015-10-02 17:54:48 +01:00
James Graham 525f5912e8 Bug 1201852 - Allow E125 and E129 errors in pyflakes.
These forbid common constructs, notably
if (foo and
    bar):

which has no basis in PEP8 or sanity. In modern pyflakes only E129 would have to be permitted
but Ubuntu 14.04 has an older version which lumps this in with some other cases in E125.
2015-09-15 19:01:47 +01:00
Ed Morley 90ba77e596 Bug 1192801 - Remove per-file MPL boilerplate since it's unnecessary
The MPL 2.0 terms state that as long as a LICENSE file is present, the
per-file header text is not required. See "Exhibit A" at the end of:
https://www.mozilla.org/MPL/2.0/
2015-08-18 23:32:11 +01:00
Ed Morley b4720652d6 Bug 1181529 - Update peep to v2.4.1
* Tolerates `pip.__version__` being missing, which can happen in arcane
  situations during error handling, obscuring informative tracebacks.
* flake8 warnings are fixed again, so peep.py can be removed from the
  exclude list.

https://github.com/erikrose/peep/releases/tag/2.4.1
https://github.com/erikrose/peep/compare/2.4...2.4.1
2015-07-08 12:39:30 +01:00
Ed Morley 58813b0c51 Bug 1169916 - Stop using Cython to build the log parser
Since it only speeds up parsing by a few percent of total runtime, and
is therefore not worth the added complexity for deployment and local
hack-test-debug cycles when working on the log parser.

The .gitignore and update.py entries will be removed in a later commit,
once the stage/prod src directories have been cleaned up.
2015-06-30 14:51:57 +01:00
Ed Morley acbc0b6d36 Bug 1169915 - flake8/pep8: Check *.pyx files too
flake8/pep8 default to just checking *.py, but we have Cython .pyx files
in treeherder/log_parser/.
2015-05-30 13:52:05 +01:00
Ed Morley be4c2b5d04 Bug 1166901 - Exclude the node_modules directory from flake8/pep8 2015-05-27 22:18:23 +01:00
Jonathan French 19b71bc4b4 Bug 1164881 - Add MPL2.0 headers to recent treeherder repo files 2015-05-14 11:45:26 -04:00
Ed Morley 461e28b3fb Bug 1155160 - Remove the now unused vendor directory 2015-04-22 11:23:39 +01:00
Ed Morley 29ca673205 Bug 1143350 - Check in peep v2.2
We're checking this in so we have a known good starting point in the
chain of trust. It also simplifies our deployment requirements.

peep.py was taken from:
https://github.com/erikrose/peep/archive/2.2.tar.gz

The only alteration made was the addition of the licence block at the
top of the file, taken from LICENCE in the peep repo.
2015-03-19 12:12:01 +00:00
Ed Morley 036b8aa5fc Bug 1138902 - Adjust linter configs
* Turn on warnings in test code.
* Set strictness explicitly to medium, since it's currently at 'None'.
* Explicitly set the list of requirements files, since otherwise
  unnecessary packages will be installed, slowing down the landscape.io
  run.
* Disable pep8/pyflakes, since they are already run as part of the
  Travis job.
2015-03-06 12:08:39 +00:00
Ed Morley 66600b27e3 Bug 1133362 - flake8: Add explanation for the duplicated config 2015-02-16 21:10:10 +00:00
Ed Morley 835b6f3105 Bug 1133362 - flake8/pep8: Ignore error types that pep8 does by default
Defining 'ignore' ourselves overwrites the default ignore list. This
adds in the current pep8 ignore list, to ensure we don't re-enable noisy
error types inadvertently.
2015-02-16 21:10:10 +00:00
Ed Morley 8dc18ebb8d Bug 1133362 - flake8/pep8: Add __pycache__ to exclude
It's in the default exclude list for pep8, and we clobber this by
setting our own.
2015-02-16 21:10:09 +00:00
Ed Morley c3ca042b86 Bug 1107523 - Add config file for pep8 and flake8 2015-01-20 13:21:42 +00:00