From 4ea236c7863f873a7cebf652c5b4fa985a6c1239 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 27 Aug 2015 11:40:18 +0200 Subject: [PATCH] Initial structure --- .gitignore | 38 +++++++++++++++++++++++++++++++++++++ .travis.yml | 10 ++++++++++ README.rst | 2 ++ metalsmith/__init__.py | 0 metalsmith/main.py | 18 ++++++++++++++++++ metalsmith/test/__init__.py | 0 requirements.txt | 4 ++++ setup.cfg | 22 +++++++++++++++++++++ setup.py | 29 ++++++++++++++++++++++++++++ test-requirements.txt | 7 +++++++ tox.ini | 27 ++++++++++++++++++++++++++ 11 files changed, 157 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 README.rst create mode 100644 metalsmith/__init__.py create mode 100644 metalsmith/main.py create mode 100644 metalsmith/test/__init__.py create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 test-requirements.txt create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b4b8913 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +# Compiled files +*.py[co] +*.a +*.o +*.so + +# Sphinx +_build +doc/source/api/ + +# Packages/installer info +*.egg +*.egg-info +dist +build +eggs +parts +var +sdist +develop-eggs +.installed.cfg + +# Other +*.DS_Store +.idea +.testrepository +.tox +.venv +.*.swp +.coverage +cover +AUTHORS +ChangeLog +*.sqlite +*~ + +# Vagrant +.vagrant diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9aaec6a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: python +python: 2.7 +env: + - TOX_ENV=py27 + - TOX_ENV=py34 + - TOX_ENV=pep8 +install: + - pip install tox +script: + - tox -e $TOX_ENV diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..5e9ea68 --- /dev/null +++ b/README.rst @@ -0,0 +1,2 @@ +Deployment and Scheduling tool for Bare Metal +============================================= diff --git a/metalsmith/__init__.py b/metalsmith/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/metalsmith/main.py b/metalsmith/main.py new file mode 100644 index 0000000..a0171ae --- /dev/null +++ b/metalsmith/main.py @@ -0,0 +1,18 @@ +# Copyright 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +def main(): + pass diff --git a/metalsmith/test/__init__.py b/metalsmith/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3f1d8b8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +pbr>=1.6,<2.0 +python-glanceclient>=0.18.0 +python-ironicclient>=0.6.0 +python-neutronclient>=2.6.0,<3 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..46c53d3 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,22 @@ +[metadata] +name = metalsmith +summary = Deployment and Scheduling tool for Bare Metal +description-file = README.rst +license = Apache-2 +classifier = + Environment :: Console + Environment :: OpenStack + Intended Audience :: System Administrators + Intended Audience :: Information Technology + License :: OSI Approved :: Apache Software License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2 + +[files] +packages = + metalsmith + +[entry_points] +console_scripts = + metalsmith = metalsmith.main:main diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d8080d0 --- /dev/null +++ b/setup.py @@ -0,0 +1,29 @@ +# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT +import setuptools + +# In python < 2.7.4, a lazy loading of package `pbr` will break +# setuptools if some other modules registered functions in `atexit`. +# solution from: http://bugs.python.org/issue15881#msg170215 +try: + import multiprocessing # noqa +except ImportError: + pass + +setuptools.setup( + setup_requires=['pbr>=1.3'], + pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..72a44b2 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,7 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +coverage>=3.6 +doc8 # Apache-2.0 +hacking<0.11,>=0.10.0 +mock>=1.2 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..b28339a --- /dev/null +++ b/tox.ini @@ -0,0 +1,27 @@ +[tox] +envlist = py27,py34,pep8 + +[testenv] +usedevelop = True +deps = + -r{toxinidir}/test-requirements.txt +commands = + coverage run --branch --include "metalsmith*" -m unittest discover metalsmith.test + coverage report -m +setenv = PYTHONDONTWRITEBYTECODE=1 +passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY + +[testenv:venv] +commands = {posargs} + +[testenv:pep8] +basepython = python2.7 +commands = + flake8 metalsmith + doc8 README.rst + +[flake8] +max-complexity=15 + +[hacking] +import_exceptions = ironicclient.exceptions,ironic_inspector.common.i18n