Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0154caf

Browse files
authored
Merge pull request python-security#152 from bcaller/tox-travis
Tox, travis and requirements
2 parents fbca4d2 + d55cbc0 commit 0154caf

6 files changed

Lines changed: 21 additions & 27 deletions

File tree

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ language: python
22
python:
33
- "3.6"
44
install:
5-
- pip install -r requirements.txt
6-
- pip install codeclimate-test-reporter flake8
5+
- pip install codeclimate-test-reporter 'coverage>=4.0,<4.4' flake8
76
before_script:
87
# stop the build if there are Python syntax errors or undefined names
98
- flake8 . --count --exclude=examples --select=E901,E999,F821,F822,F823 --show-source --statistics
10-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
11-
- flake8 . --count --exclude=examples --exit-zero --max-complexity=10 --max-line-length=127 --statistics
129
script:
13-
- python -m tests
1410
- coverage run -m tests
11+
- flake8 . --count --exclude=examples --max-complexity=11 --max-line-length=127 --show-source --statistics
12+
- coverage report --include=tests/* --fail-under 100
13+
- coverage report --include=pyt/* --fail-under 91
1514
after_script:
1615
- codeclimate-test-reporter

pyt/usage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import argparse
22
import os
33
import sys
4-
from datetime import datetime
54

65

76
default_blackbox_mapping_file = os.path.join(

requirements-dev.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@
3030
'Programming Language :: Python :: 3.6'
3131
],
3232
keywords=['security', 'vulnerability', 'web', 'flask', 'django', 'static-analysis', 'program-analysis'],
33-
install_requires=[
34-
'graphviz>=0.4.10',
35-
'requests>=2.12',
36-
'GitPython>=2.0.8'
37-
],
33+
install_requires=[],
3834
entry_points={
3935
'console_scripts': [
4036
'pyt = pyt:main'

tox.ini

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
[tox]
2-
envlist = py36
2+
envlist = py36,cover,lint
33

44
[testenv]
5+
deps = mock
6+
commands =
7+
python -m tests
8+
9+
[testenv:cover]
510
whitelist_externals = coverage
6-
deps = -rrequirements-dev.txt
11+
deps =
12+
coverage>=4.0,<4.4
13+
mock
714
commands =
815
coverage erase
916
coverage run tests
1017
coverage report --include=tests/* --fail-under 100
1118
coverage report --include=pyt/* --fail-under 91
19+
20+
[testenv:lint]
21+
deps =
22+
flake8
23+
pre-commit
24+
commands =
1225
pre-commit run
13-
flake8 . --count --exclude=examples,venv,.tox --select=E901,E999,F821,F822,F823 --show-source --statistics
14-
flake8 . --count --exclude=examples,venv,.tox,dist --exit-zero --max-complexity=10 --max-line-length=127 --statistics
26+
flake8 . --count --exclude=examples,.env,venv,.tox --show-source --statistics --max-complexity=11 --max-line-length=127 --statistics

0 commit comments

Comments
 (0)