Skip to content

Commit

Permalink
Check doc style and refactor linters configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mstajdohar committed Sep 6, 2016
1 parent 190c292 commit a122638
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 32 deletions.
5 changes: 0 additions & 5 deletions .pep8rc

This file was deleted.

10 changes: 2 additions & 8 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ persistent=yes
# usually to register additional checkers.
load-plugins=

# DEPRECATED
#include-ids=no

# DEPRECATED
#symbols=no


[MESSAGES CONTROL]

Expand Down Expand Up @@ -54,7 +48,6 @@ load-plugins=
disable=R,I0011,I0012,W0613,W0511,W0232,W0142,C1001,W0102



[REPORTS]

# Set the output format. Available formats are text, parseable, colorized, msvs
Expand All @@ -68,7 +61,7 @@ output-format=text
files-output=no

# Tells whether to display a full report or only the messages
reports=yes
reports=no

# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
Expand Down Expand Up @@ -221,6 +214,7 @@ generated-members=REQUEST,acl_users,aq_parent,objects,id,_instance,_class_name,F
[FORMAT]

# Maximum number of characters on a single line.
# Django coding style guidelines allow up to 119 characters
max-line-length=119

# Regexp for a line that is allowed to be longer than the limit.
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ env:
- RESOLWE_POSTGRESQL_USER=postgres
- RESOLWE_POSTGRESQL_PORT=5432

# NOTE: Specifying Python versions is just to make the Travis CI's web UI a
# little prettier
# NOTE: Explicit Python versions make Travis job description more informative
matrix:
include:
- env: TOX_ENV=py27
Expand Down
6 changes: 5 additions & 1 deletion docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ Added
- Support loading JSON from a file if the string passed to the ``basic:json:``
field is a file.

Changed
-------
- Refactor linters, check PEP 8 and PEP 257

Fixed
=====
-----
- Fix pylint warnings


Expand Down
15 changes: 14 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
[bdist_wheel]
# code is written to work on both Python 2 and Python 3
universal=1
universal = 1

[pep8]
# Django coding style guidelines allow up to 119 characters
max-line-length = 119
# Ignore E127: checked by pylint
# E127 continuation line over-indented for visual indent
ignore = E127
exclude = migrations,setup.py

[pydocstyle]
match-dir = (?!tests|migrations|\.).*
match = (?!setup).*.py
add-select = D404
15 changes: 6 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,25 @@
'pyyaml>=3.11',
'jsonschema>=2.4.0',
'six>=1.10.0',
'Sphinx>=1.4.6',
],
extras_require = {
'docs': [
# XXX: Intersphinx URLs are broken when using non-default inventory
# (like in Django's case) with Sphinx 1.4.3+
# Bug report: https://github.com/sphinx-doc/sphinx/issues/2789
'Sphinx==1.4.2',
'sphinx_rtd_theme',
],
'package': [
'twine',
'wheel',
],
'test': [
'coverage>=3.7.1',
'pep8>=1.6.2',
'pylint>=1.4.3',
'testfixtures>=4.10.0',
'check-manifest',
'coverage>=4.2',
'pycodestyle>=2.0.0',
'pydocstyle>=1.0.0',
'pylint>=1.6.4',
'readme_renderer',
'resolwe-runtime-utils>=1.1.0',
'Sphinx==1.4.2',
'testfixtures>=4.10.0',
],
},

Expand Down
14 changes: 8 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
envlist = py{27,34,35},docs,linters,packaging
skip_missing_interpreters = True

# NOTE: Don't use 'deps = .[<extra-requirements>]' tox option since we want Tox
# to install the package from sdist first
# NOTE: Don't use 'deps = .[<extra-requirements>]' tox option since we
# want Tox to install the package from sdist first

[testenv]
commands =
Expand All @@ -30,10 +30,12 @@ ignore_errors = True
commands =
# install testing requirements
pip install .[test]
# run pylint and only check errors
pylint --rcfile .pylintrc --reports=no resolwe
# run pep8
pep8 --config=.pep8rc resolwe
# run pylint
pylint resolwe
# check PEP 8
pycodestyle resolwe
# check PEP 257
pydocstyle resolwe

[testenv:packaging]
commands =
Expand Down

0 comments on commit a122638

Please sign in to comment.