parent
980f14236f
commit
ff04eb0905
3 changed files with 54 additions and 45 deletions
35
.travis.yml
Normal file
35
.travis.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
sudo: false
|
||||||
|
dist: xenial
|
||||||
|
language: python
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- python: 3.5
|
||||||
|
env: TOXENV=py35
|
||||||
|
- python: 3.6
|
||||||
|
env: TOXENV=py36
|
||||||
|
- python: 3.7
|
||||||
|
env: TOXENV=py37
|
||||||
|
- python: pypy3
|
||||||
|
env: TOXENV=pypy3
|
||||||
|
- python: 3.5
|
||||||
|
env: TOXENV=pep8
|
||||||
|
- python: 3.7
|
||||||
|
env: TOXENV=pep8
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.cache/pip
|
||||||
|
|
||||||
|
install:
|
||||||
|
- pip install tox
|
||||||
|
- if [[ $TOXENV == py* ]]; then pip install coveralls; fi
|
||||||
|
|
||||||
|
script:
|
||||||
|
- tox
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- if [[ $TOXENV == py* ]]; then coveralls; fi
|
8
setup.py
8
setup.py
|
@ -10,9 +10,13 @@ setup(
|
||||||
author_email='solvik@solvik.fr',
|
author_email='solvik@solvik.fr',
|
||||||
license='Apache2',
|
license='Apache2',
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
packages=['netbox_agent'],
|
||||||
use_scm_version=True,
|
use_scm_version=True,
|
||||||
packages=find_packages(),
|
install_requires=[
|
||||||
install_requires=find_packages(),
|
'pynetbox==4.0.6',
|
||||||
|
'netaddr==0.7.19',
|
||||||
|
'netifaces==0.10.9',
|
||||||
|
],
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
keywords=['netbox'],
|
keywords=['netbox'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|
56
tox.ini
56
tox.ini
|
@ -9,7 +9,7 @@ envlist =
|
||||||
mypy
|
mypy
|
||||||
pep8
|
pep8
|
||||||
docs
|
docs
|
||||||
skip_missing_interpreters = true
|
skip_missing_interpreters = True
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# Use the more relaxed max line length permitted in PEP8.
|
# Use the more relaxed max line length permitted in PEP8.
|
||||||
|
@ -22,48 +22,18 @@ import-order-style = google
|
||||||
# Inform flake8-import-order plugin that `fact` should be treated as a local package name.
|
# Inform flake8-import-order plugin that `fact` should be treated as a local package name.
|
||||||
application-import-names = netbox_agent
|
application-import-names = netbox_agent
|
||||||
|
|
||||||
# [testenv]
|
[testenv]
|
||||||
# setenv =
|
# This is required in order to get UTF-8 output inside of the subprocesses
|
||||||
# COVERAGE_FILE = .coverage.{envname}
|
# that our tests use.
|
||||||
# deps =
|
setenv = LC_CTYPE = en_US.UTF-8
|
||||||
# -r{toxinidir}/requirements.txt
|
# Pass Display down to have it for the tests available
|
||||||
# -r{toxinidir}/dev-requirements.txt
|
passenv = DISPLAY TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
|
||||||
# commands =
|
whitelist_externals=convert
|
||||||
# # Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
|
deps =
|
||||||
# # Use -Werror to treat warnings as errors.
|
-r{toxinidir}/requirements.txt
|
||||||
# # Must ignore a DeprecationWarnings triggered in pytest until the following are fixed:
|
|
||||||
# # https://github.com/pytest-dev/pytest/issues/1403
|
|
||||||
# # https://github.com/pytest-dev/pytest/issues/4507
|
|
||||||
# # Must ignore DeprecationWarnings in virtualenv site.py only if supporting Travis CI
|
|
||||||
# # Python 3.5 environments that bundle an older version of virtualenv.
|
|
||||||
# python -bb \
|
|
||||||
# -Werror -Wignore:::_pytest.assertion.rewrite -Wignore:::_pytest.tmpdir -Wignore:::site \
|
|
||||||
# -m pytest --cov="{envsitepackagesdir}/fact"
|
|
||||||
|
|
||||||
# [testenv:coverage]
|
|
||||||
# skip_install = true
|
|
||||||
# depends = py35,py36,py37
|
|
||||||
# # Set blank setenv to overwrite setenv from [testenv] (inherited).
|
|
||||||
# setenv =
|
|
||||||
# deps =
|
|
||||||
# -r{toxinidir}/dev-requirements.txt
|
|
||||||
# commands =
|
|
||||||
# coverage combine
|
|
||||||
# coverage html
|
|
||||||
|
|
||||||
# [testenv:mypy]
|
|
||||||
# skip_install = true
|
|
||||||
# setenv =
|
|
||||||
# deps =
|
|
||||||
# -r{toxinidir}/requirements.txt
|
|
||||||
# -r{toxinidir}/dev-requirements.txt
|
|
||||||
# commands =
|
|
||||||
# mypy src
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
skip_install = true
|
|
||||||
setenv =
|
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/dev-requirements.txt
|
flake8
|
||||||
commands =
|
pep8-naming
|
||||||
flake8 netbox_agent tests
|
commands = flake8 {toxinidir}/netbox_agent {toxinidir}/tests
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue