Skip to content

Commit

Permalink
tox integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Zlopez authored and Zlopez committed Oct 3, 2018
1 parent 03576bf commit 9f8b84b
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 37 deletions.
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[run]
branch = True
include =
hotness/*

[report]
fail_under = 90
precision = 2
exclude_lines =
pragma: no cover
if __name__ == .__main__.:
omit =
hotness/tests/*
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ dist
*.key
*.gpg
fedmsg.d/hotness.py
.tox/
.coverage
coverage.xml
htmlcov/

# Docs
*_build/
Expand All @@ -15,3 +19,4 @@ fedmsg.d/hotness.py
Vagrantfile
*.retry
.cache
.vagrant/
3 changes: 3 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
mock
sphinx
pytest
pytest-cov
unittest2
4 changes: 4 additions & 0 deletions devel/ansible/roles/hotness-dev/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
- tmux
- tree
- vim-enhanced
- tox
- rpm-devel
- gcc
- krb5-devel

- name: Install the-new-hotness development packages
dnf: name={{ item }} state=present
Expand Down
37 changes: 0 additions & 37 deletions hotness/tests/test_style.py

This file was deleted.

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ requests
six
fedmsg_meta_fedora_infrastructure
PyYAML
koji
psutil
moksha.hub
40 changes: 40 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[tox]
envlist = py27,py35,py36,lint,docs

[testenv]
deps =
-rdev-requirements.txt
-rrequirements.txt
whitelist_externals =
rm
commands =
rm -rf htmlcov coverage.xml
py.test --cov-config .coveragerc --cov=hotness --cov-report term \
--cov-report xml --cov-report html {posargs}


[testenv:docs]
changedir = docs
deps =
-rdev-requirements.txt
-rrequirements.txt
whitelist_externals =
mkdir
rm
commands=
mkdir -p _static
rm -rf _build
mkdir -p images
sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html


[testenv:lint]
deps =
flake8 > 3.0
commands =
python -m flake8 {posargs}

[flake8]
show-source = True
max-line-length = 100
exclude = .git,.tox,dist,*egg,build,files

0 comments on commit 9f8b84b

Please sign in to comment.