Commit Graph

21 Commits (03e94fdda6e02e8dbffc2c4ade59e473bc3797fe)

Author SHA1 Message Date
Anthony Johnson 03e94fdda6
Remove extra envs from python version run with tox-travis
This stops multiple envs from running on the py27/py36 test envs
2017-06-14 15:46:56 -07:00
Anthony accc01535c Finish linting on py3ish code (#2949)
* Resolve first round of linting errors in restapi.

This is a first step and only adds docstrings, etc. It doesn't refactor any
code.

Conflicts:
	prospector-more.yml
	readthedocs/restapi/views/model_views.py

* Reduce unused params.

In several cases, we can use the provided `request` rather than access `self`
(which could make these functions easier to test in isolation). In others, the
unused args could be folded into an unnamed kwarg param.

* Don't replace section variable.

This worked as intended, but only because the overridden section variable
would later evaluate to True. Using a different variable name makes this a bit
less error-prone.

* Minor docstring update

* Fix indent on docstring

* Punt on refactoring

* Fix call args

* Try unpinning testing reqs

* Bump up prospector higher level strictness

* Linting issues: arguments-differ, len-as-condition, redefined variables

* Remove unnecessary elses

This addresses no-else-return, which removes a `return` in an `else` after an
`if` that already has a `return`. This makes the default return more obvious in
most cases.

* Fix new linting issues with import order

Also, update travis and tox config for multiple versions of python

* Another fix on travis envs
2017-06-14 09:38:03 -07:00
Hank Gay 1d055ef724 Try to simplify the tox/travis interactions. 2017-06-05 10:52:14 -04:00
Hank Gay 0d73ebe7d6 Fix wonky syntax. 2017-06-01 15:29:17 -04:00
Hank Gay e46be8510b More Travis-CI tweakery. 2017-06-01 15:07:51 -04:00
Hank Gay 3b0c307079 Add Python 3.6 to tox.ini 2017-05-30 16:45:43 -04:00
CM Lubinski 9e07061730 Add eslint using the airbnb config. (#2905)
* Add eslint using the airbnb config.

In an effort to make the JS consistent, this adds an ESLint gulp task. ESLint
is *very* configurable, and has no defaults. Instead, this reaches for
airbnb's legacy config (which covers ES5), which is one of the most popular
configurations. As a last step, it turns off all of the rules which currently
fail. We can turn them on piecemeal, or override the airbnb style to use a
different format.

Rules to prioritize (as they likely indicate bugs):
* "array-callback-return": "off",
* "eqeqeq": "off",
* "guard-for-in": "off",
* "no-inner-declarations": "off",
* "no-loop-func": "off",
* "no-mixed-operators": "off",
* "no-undef": "off",
* "no-use-before-define": "off",
* "one-var": "off",

* Lint frontend in Travis.

This adds an ESLint step to the CI service so we prevent unlinted code from
making its way in.

* Create an ESLint tox env.

By adding a tox env for eslint, we allow users to run it locally as part of
tox runs.

Thanks for the suggestion @ericholscher!

* Fix tox call to gulp lint task
2017-05-24 16:12:33 -07:00
Frederick cbec8dda84 make tests parallelizable using pytest-xdist (#2899)
Be ware that running tests in parallel may cause tests to flake.
 This commit does not make parallel test the default it only makes it possible.
2017-05-24 13:46:40 -07:00
Daniel Pope db66b8ed32 Move pytest-cov dep to tox.ini 2017-05-23 11:26:23 -07:00
Daniel Pope 3aafd9785f Add tox target to generate coverage reports 2017-05-23 11:17:48 -07:00
Anthony Johnson 862d8a2c76
Add stricter linting to prospector as second pass 2017-03-21 11:39:00 -07:00
Berker Peksag 556a672781 Speed up build process (#2312)
* We don't need all dependecies to run 'tox -e lint'
* We don't really use pytest-django but it wouldn't hurt
  setting --reuse-db
* coveralls doesn't seem to be working at the moment so
  I removed it
* Delete unused runtests.sh. 'tox -e py27' already does
  the same job.
* Cache all dependencies in Travis CI
2016-07-18 11:31:37 -07:00
Eric Holscher 85a968fa46 Fix linting 2016-05-04 09:21:56 -07:00
Eric Holscher 21d6a8533a Fix pylint-django version 2015-12-03 15:05:55 -08:00
Anthony Johnson 09bcd4b57a Fix lint command in tox
Failing due to landscapeio/prospector#146 and when using pylint <1.5, it fails
with astroid 1.4
2015-11-30 14:28:02 -08:00
Eric Holscher 43a4baa4aa Clean up linting errors 2015-08-05 11:32:23 -07:00
Anthony Johnson f41e978e0e Add tox setting to disregard local_settings.py
If you use local_settings.py for development, tox will currently try to use
those settings. This disregards local_settings inside settings.test and friends
so that there is no chance for overlap.
2015-07-27 12:39:23 -07:00
Anthony Johnson 6704a52704 👋 python 2.6 2015-07-21 19:41:38 -07:00
Anthony Johnson be7bb6e5cf Update locale on testenv in tox 2015-07-21 19:41:38 -07:00
Anthony Johnson 525bd38ec6 More tox config 2015-07-21 19:41:37 -07:00
Anthony Johnson 18f68dee96 Add test of tox running test and lint commands, update travis 2015-07-21 19:41:37 -07:00