Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Oct 1, 2018
1 parent fe4d6b9 commit 0c92c39
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 44 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
- stage: lint
env: TOXENV=manifest
- env: TOXENV=flake8
- env: TOXENV=pylint
- env: TOXENV=pyroma
- env: TOXENV=xenon
- env: TOXENV=vulture
# docs stage
- stage: docs
env: TOXENV=doc8
Expand All @@ -28,9 +30,8 @@ jobs:

matrix:
allow_failures:
- env: TOXENV=pylint
- env: TOXENV=doc8
- env: TOXENV=docs
- env: TOXENV=xenon
- env: TOXENV=vulture

install:
- sh -c 'if [ "$TOXENV" = "py" ]; then pip install tox codecov; else pip install tox; fi'
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# 1. Build with: docker build -t bio2bel/mirbase .
# 2. Run with docker run -p 5000:5000 bio2bel/mirbase (-p maps the port)
FROM python:3.7.0
Expand Down
2 changes: 2 additions & 0 deletions doc8.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[doc8]
max-line-length = 120
80 changes: 41 additions & 39 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist =
# always keep coverage-clean first
coverage-clean
# code linters/stylers
manifest
flake8
# pylint
# documentation linters/checkers
# doc8
vulture
xenon
pyroma
readme
# docs
# the actual tests
doc8
docs
py
# always keep coverage-report last
coverage-report

[testenv]
commands = coverage run -p -m pytest --durations=20 {posargs:tests}
commands = coverage run -p -m pytest tests {posargs}
passenv = TRAVIS CI
deps =
coverage
pytest
Expand All @@ -45,32 +38,38 @@ basepython = python3
skip_install = true
deps =
flake8
flake8-bandit
flake8-colors
flake8-docstrings
flake8-import-order
flake8-docstrings>=0.2.7
flake8-import-order>=0.9
pep8-naming
flake8-colors
commands =
flake8 src/bio2bel_mirbase/ tests/ setup.py
description = Run the flake8 tool with several plugins (bandit, docstrings, import order, pep8 naming).

[testenv:pylint]
basepython = python3
deps =
pyflakes
pylint
commands =
pylint src/bio2bel_mirbase
[testenv:vulture]
deps = vulture
skip_install = true
commands = vulture src/bio2bel_mirbase/
description = Run the vulture tool to look for dead code.

[testenv:doc8]
basepython = python3
[testenv:xenon]
deps = xenon
skip_install = true
commands = xenon --max-average A --max-modules A --max-absolute B .
description = Run the xenon tool to monitor code complexity.

[testenv:mypy]
deps = mypy
skip_install = true
commands = mypy --ignore-missing-imports src/bio2bel_mirbase/
description = Run the mypy tool to check static typing on the project.

[testenv:pyroma]
deps =
sphinx
doc8
commands =
doc8 docs/source/ README.rst
description = Run the doc8 tool to check the style of the RST files in the project docs.
pygments
pyroma
skip_install = true
commands = pyroma --min=10 .
description = Run the pyroma tool to check the project's package friendliness.
[testenv:readme]
commands = rst-lint README.rst
Expand All @@ -84,7 +83,6 @@ changedir = docs
deps =
sphinx
sphinx_rtd_theme
sphinx-click
commands =
mkdir -p {envtmpdir}
cp -r source {envtmpdir}/source
Expand All @@ -93,6 +91,15 @@ commands =
cat {envtmpdir}/build/coverage/c.txt
cat {envtmpdir}/build/coverage/python.txt
[testenv:doc8]
basepython = python3
skip_install = true
deps =
sphinx
doc8
commands =
doc8 docs/source/ README.rst
[testenv:coverage-report]
deps = coverage
skip_install = true
Expand Down Expand Up @@ -132,15 +139,10 @@ commands =
[testenv:finish]
basepython = python3
skip_install = true
whitelist_externals =
/bin/git
/usr/local/bin/git
deps =
{[testenv:build]deps}
{[testenv:release]deps}
bumpversion
commands =
{[testenv:build]commands}
bumpversion release
{[testenv:release]commands}
git push
Expand Down

0 comments on commit 0c92c39

Please sign in to comment.