From 2dd79e9e22e0418d52496e69f0b4496d45ee00f1 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Wed, 5 Aug 2015 19:48:23 +0300 Subject: [PATCH] Adds oslo cookiecutter template --- .coveragerc | 7 ++++ .gitreview | 4 ++ .mailmap | 3 ++ .testr.conf | 7 ++++ CONTRIBUTING.rst | 17 +++++++++ HACKING.rst | 4 ++ MANIFEST.in | 6 +++ README.rst | 14 +++++++ babel.cfg | 2 + doc/source/api.rst | 12 ++++++ doc/source/conf.py | 75 +++++++++++++++++++++++++++++++++++++ doc/source/contributing.rst | 5 +++ doc/source/history.rst | 1 + doc/source/index.rst | 25 +++++++++++++ doc/source/installation.rst | 7 ++++ doc/source/usage.rst | 7 ++++ openstack-common.conf | 8 ++++ oslo_windows/__init__.py | 0 requirements.txt | 5 +++ setup.cfg | 53 ++++++++++++++++++++++++++ setup.py | 29 ++++++++++++++ test-requirements.txt | 10 +++++ tox.ini | 40 ++++++++++++++++++++ 23 files changed, 341 insertions(+) create mode 100644 .coveragerc create mode 100644 .gitreview create mode 100644 .mailmap create mode 100644 .testr.conf create mode 100644 CONTRIBUTING.rst create mode 100644 HACKING.rst create mode 100644 MANIFEST.in create mode 100644 README.rst create mode 100644 babel.cfg create mode 100644 doc/source/api.rst create mode 100644 doc/source/conf.py create mode 100644 doc/source/contributing.rst create mode 100644 doc/source/history.rst create mode 100644 doc/source/index.rst create mode 100644 doc/source/installation.rst create mode 100644 doc/source/usage.rst create mode 100644 openstack-common.conf create mode 100644 oslo_windows/__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/.coveragerc b/.coveragerc new file mode 100644 index 00000000..7e1439c6 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,7 @@ +[run] +branch = True +source = windows +omit = windows/tests/*,windows/openstack/* + +[report] +ignore-errors = True diff --git a/.gitreview b/.gitreview new file mode 100644 index 00000000..6cca2de4 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/oslo.windows.git diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000..516ae6fe --- /dev/null +++ b/.mailmap @@ -0,0 +1,3 @@ +# Format is: +# +# diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 00000000..c70deba2 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,7 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ + OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ + OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ + ${PYTHON:-python} -m subunit.run discover -t ./ ./oslo_windows $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 00000000..c891a9d6 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,17 @@ +If you would like to contribute to the development of OpenStack, you must +follow the steps in this page: + + http://docs.openstack.org/infra/manual/developers.html + +If you already have a good understanding of how the system works and your +OpenStack accounts are set up, you can skip to the development workflow +section of this documentation to learn how changes to OpenStack should be +submitted for review via the Gerrit tool: + + http://docs.openstack.org/infra/manual/developers.html#development-workflow + +Pull requests submitted through GitHub will be ignored. + +Bugs should be filed on Launchpad, not GitHub: + + https://bugs.launchpad.net/oslo.windows diff --git a/HACKING.rst b/HACKING.rst new file mode 100644 index 00000000..3a0dc135 --- /dev/null +++ b/HACKING.rst @@ -0,0 +1,4 @@ +oslo.windows Style Commandments +====================================================== + +Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..c978a52d --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include AUTHORS +include ChangeLog +exclude .gitignore +exclude .gitreview + +global-exclude *.pyc diff --git a/README.rst b/README.rst new file mode 100644 index 00000000..e3bb36d6 --- /dev/null +++ b/README.rst @@ -0,0 +1,14 @@ +============ +oslo.windows +============ + +Oslo Windows library for OpenStack projects. + +Please feel here a long description which must be at least 3 lines wrapped on +80 cols, so that distribution package maintainers can use it in their packages. +Note that this is a hard requirement. + +* Free software: Apache license +* Documentation: http://docs.openstack.org/developer/oslo.windows +* Source: http://git.openstack.org/cgit/openstack/oslo.windows +* Bugs: http://bugs.launchpad.net/oslo.windows diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 00000000..15cd6cb7 --- /dev/null +++ b/babel.cfg @@ -0,0 +1,2 @@ +[python: **.py] + diff --git a/doc/source/api.rst b/doc/source/api.rst new file mode 100644 index 00000000..971225e7 --- /dev/null +++ b/doc/source/api.rst @@ -0,0 +1,12 @@ +===== + API +===== + +.. Use autodoc directives to describe the *public* modules and classes + in the library. + + If the modules are completely unrelated, create an api subdirectory + and use a separate file for each (see oslo.utils). + + If there is only one submodule, a single api.rst file like this + sufficient (see oslo.i18n). diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 00000000..58ac5c1e --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# 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. + +import os +import sys + +sys.path.insert(0, os.path.abspath('../..')) +# -- General configuration ---------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + 'sphinx.ext.autodoc', + #'sphinx.ext.intersphinx', + 'oslosphinx' +] + +# autodoc generation is a bit aggressive and a nuisance when doing heavy +# text edit cycles. +# execute "export SPHINX_DEBUG=1" in your terminal to disable + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'oslo.windows' +copyright = u'2014, OpenStack Foundation' + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +add_module_names = True + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# -- Options for HTML output -------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +# html_theme_path = ["."] +# html_theme = '_theme' +# html_static_path = ['static'] + +# Output file base name for HTML help builder. +htmlhelp_basename = '%sdoc' % project + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass +# [howto/manual]). +latex_documents = [ + ('index', + '%s.tex' % project, + u'%s Documentation' % project, + u'OpenStack Foundation', 'manual'), +] + +# Example configuration for intersphinx: refer to the Python standard library. +#intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst new file mode 100644 index 00000000..2ca75d1b --- /dev/null +++ b/doc/source/contributing.rst @@ -0,0 +1,5 @@ +============== + Contributing +============== + +.. include:: ../../CONTRIBUTING.rst diff --git a/doc/source/history.rst b/doc/source/history.rst new file mode 100644 index 00000000..69ed4fe6 --- /dev/null +++ b/doc/source/history.rst @@ -0,0 +1 @@ +.. include:: ../../ChangeLog diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 00000000..221f0691 --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,25 @@ +============== + oslo.windows +============== + +Oslo Windows library for OpenStack projects. + +Contents +======== + +.. toctree:: + :maxdepth: 2 + + installation + api + usage + contributing + history + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/doc/source/installation.rst b/doc/source/installation.rst new file mode 100644 index 00000000..f85e5b94 --- /dev/null +++ b/doc/source/installation.rst @@ -0,0 +1,7 @@ +============== + Installation +============== + +At the command line:: + + $ pip install oslo.windows diff --git a/doc/source/usage.rst b/doc/source/usage.rst new file mode 100644 index 00000000..f6026796 --- /dev/null +++ b/doc/source/usage.rst @@ -0,0 +1,7 @@ +======= + Usage +======= + +To use oslo.windows in a project:: + + import oslo_windows diff --git a/openstack-common.conf b/openstack-common.conf new file mode 100644 index 00000000..7108e1d6 --- /dev/null +++ b/openstack-common.conf @@ -0,0 +1,8 @@ +[DEFAULT] +# The list of scripts and modules to copy from oslo-incubator +# For example: +# script=tools/with_venv.sh +# module=service + +# The base module to hold the copy of openstack.common +base=oslo_windows diff --git a/oslo_windows/__init__.py b/oslo_windows/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..c299e3bb --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +# 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. + +Babel>=1.3 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..9ee914b3 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,53 @@ +[metadata] +name = oslo.windows +summary = Oslo Windows library for OpenStack projects. +description-file = + README.rst +author = OpenStack +author-email = openstack-dev@lists.openstack.org +home-page = http://launchpad.net/oslo +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 2.6 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.4 + +[files] +packages = + oslo_windows + +[pbr] +warnerrors = true + +[build_sphinx] +source-dir = doc/source +build-dir = doc/build +all_files = 1 + +[upload_sphinx] +upload-dir = doc/build/html + +[compile_catalog] +directory = oslo.windows/locale +domain = oslo.windows + +[update_catalog] +domain = oslo.windows +output_dir = oslo.windows/locale +input_file = oslo.windows/locale/oslo.windows.pot + +[extract_messages] +keywords = _ gettext ngettext l_ lazy_gettext +mapping_file = babel.cfg +output_file = oslo.windows/locale/oslo.windows.pot + +[wheel] +universal = true diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..056c16c2 --- /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'], + pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..15f08a07 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,10 @@ +# 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. + +hacking<0.11,>=0.10.0 +oslotest>=1.5.1 + +# These are needed for docs generation +oslosphinx>=2.5.0 +sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..2c110c3d --- /dev/null +++ b/tox.ini @@ -0,0 +1,40 @@ +[tox] +minversion = 1.6 +envlist = py34,py26,py27,pypy,pep8 +# NOTE(dhellmann): We cannot set skipdist=True +# for oslo libraries because of the namespace package. +#skipsdist = True + +[testenv] +# NOTE(dhellmann): We cannot set usedevelop=True +# for oslo libraries because of the namespace package. +#usedevelop = True +install_command = pip install -U {opts} {packages} +setenv = + VIRTUAL_ENV={envdir} +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = python setup.py testr --slowest --testr-args='{posargs}' + +[testenv:pep8] +commands = flake8 + +[testenv:venv] +commands = {posargs} + +[testenv:docs] +commands = python setup.py build_sphinx + +[testenv:cover] +commands = python setup.py testr --coverage --testr-args='{posargs}' + +[flake8] +# E123, E125 skipped as they are invalid PEP-8. + +show-source = True +ignore = E123,E125 +builtins = _ +exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build + +[hacking] +import_exceptions =