#90 configure tox

This commit is contained in:
Henning Jacobs
2017-01-14 13:42:49 +01:00
parent 850683c368
commit d3816d3274
6 changed files with 56 additions and 5 deletions

3
.gitignore vendored
View File

@@ -6,3 +6,6 @@ __pycache__
kube_ops_view/static/build/
*-secret
npm-debug.log*
.tox/
*.egg*
dist/

3
MANIFEST.in Normal file
View File

@@ -0,0 +1,3 @@
recursive-include kube_ops_view/static *
recursive-include kube_ops_view/templates *
include *.rst

View File

@@ -159,6 +159,3 @@ texinfo_documents = [
author, 'KubernetesOperationalView', 'One line description of project.',
'Miscellaneous'),
]

View File

@@ -292,7 +292,13 @@ def generate_mock_pod(index: int, i: int, j: int):
elif j % 7 == 0:
container.update(**{'ready': True, 'state': {'running': {}}, 'restartCount': 3})
containers.append(container)
pod = {'name': '{}-{}-{}'.format(names[hash_int((i + 1) * (j + 1)) % len(names)], i, j), 'namespace': 'kube-system' if j < 3 else 'default', 'labels': labels, 'phase': phase, 'containers': containers}
pod = {
'name': '{}-{}-{}'.format(names[hash_int((i + 1) * (j + 1)) % len(names)], i, j),
'namespace': 'kube-system' if j < 3 else 'default',
'labels': labels,
'phase': phase,
'containers': containers
}
if phase == 'Running' and j % 17 == 0:
pod['deleted'] = 123

32
setup.py Normal file
View File

@@ -0,0 +1,32 @@
from setuptools import find_packages, setup
def readme():
return open('README.rst', encoding='utf-8').read()
setup(
name='kube-ops-view',
packages=find_packages(),
version='0.1',
description='Kubernetes Operational View - read-only system dashboard for multiple K8s clusters',
long_description=readme(),
author='Henning Jacobs',
url='https://github.com/hjacobs/kube-ops-view',
keywords='kubernetes operations dashboard view k8s',
license='GNU General Public License v3 (GPLv3)',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'Topic :: System :: Clustering',
'Topic :: System :: Monitoring',
],
include_package_data=True, # needed to include JavaScript (see MANIFEST.in)
entry_points={'console_scripts': ['kube-ops-view = kube_ops_view.main:main']}
)

12
tox.ini
View File

@@ -1,3 +1,13 @@
[tox]
envlist=flake8
[tox:travis]
3.5=flake8
[testenv:flake8]
deps=flake8
commands=flake8
[flake8]
max-line-length=120
max-line-length=160
ignore=E402