Fix all the current brokeness

Add missing files and tweaks so that the automated
CI/flake8/pep8/docs/... and such work correctly.

Change-Id: I838b02bf0037569065b7c7914f4a68b92d7ebd6a
This commit is contained in:
Joshua Harlow 2015-04-01 10:46:24 -07:00
parent e4233022fa
commit 154a2ee413
13 changed files with 131 additions and 51 deletions

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=stackforge/cloud-init.git

View File

@ -1,37 +0,0 @@
=====================
Hacking on cloud-init
=====================
To get changes into cloud-init, the process to follow is:
* If you have not already, be sure to sign the CCA:
- `Canonical Contributor Agreement`_
* fork from github, create a branch and make your changes
- ``git clone https://github.com/cloud-init/cloud-init.git``
- ``cd cloud-init``
- ``echo hack``
* Check test and code formatting / lint and address any issues:
- ``tox``
* Commit / ammend your changes
Before review, make good commit messages with one line summary
followed by empty line followed by expanded comments.
- ``git commit``
* Push to branch to github:
- ``git push``
* Make a pull request.
Then, someone on cloud-init team.
Feel free to ping and/or join #cloud-init on freenode (irc) if you have any questions.
.. _Canonical Contributor Agreement: http://www.canonical.com/contributors
.. _Scott Moser: https://launchpad.net/~smoser
.. _Joshua Harlow: https://launchpad.net/~harlowja

40
HACKING.rst Normal file
View File

@ -0,0 +1,40 @@
=====================
Hacking on cloud-init
=====================
To get changes into cloud-init, the process to follow is:
* Fork from github, create a branch and make your changes
- ``git clone https://github.com/stackforge/cloud-init``
- ``cd cloud-init``
- ``echo hack``
* Check test and code formatting / lint and address any issues:
- ``tox``
* Commit / ammend your changes (before review, make good commit messages with
one line summary followed by empty line followed by expanded comments).
- ``git commit``
* Push to branch to http://review.openstack.org:
- ``git-review``
Then be patient and wait (or ping someone on cloud-init team).
* `Core reviewers/maintainers`_
Remember the more you are involved in the project the more beneficial it is
for everyone involved (including yourself).
**Contacting us:**
Feel free to ping the folks listed above and/or join ``#cloud-init`` on
`freenode`_ (`IRC`_) if you have any questions.
.. _Core reviewers/maintainers: https://review.openstack.org/#/admin/groups/665,members
.. _IRC: irc://chat.freenode.net/cloud-init
.. _freenode: http://freenode.net/

8
MANIFEST.in Normal file
View File

@ -0,0 +1,8 @@
include AUTHORS
include ChangeLog
include README.rst
exclude .gitignore
exclude .gitreview
global-exclude *.pyc

View File

@ -1,4 +0,0 @@
Cloud Init
==========
cloud-init initializes systems for cloud environments.

38
README.rst Normal file
View File

@ -0,0 +1,38 @@
Cloud-init
==========
*Cloud-init initializes systems for cloud environments.*
Join us
-------
- http://launchpad.net/cloud-init
Testing and requirements
------------------------
Requirements
~~~~~~~~~~~~
TBD
Tox.ini
~~~~~~~
Our ``tox.ini`` file describes several test environments that allow to test
cloud-init with different python versions and sets of requirements installed.
Please refer to the `tox`_ documentation to understand how to make these test
environments work for you.
Developer documentation
-----------------------
We also have sphinx documentation in ``docs/source``.
*To build it, run:*
::
$ python setup.py build_sphinx
.. _tox: http://tox.testrun.org/

View File

@ -1,4 +1,8 @@
pbr # 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.
pbr>=0.6,!=0.7,<1.0
six>=1.7.0 six>=1.7.0
pyyaml pyyaml
jsonpatch jsonpatch

View File

@ -3,20 +3,18 @@ name = cloudinit
version = 1.9.0 version = 1.9.0
summary = cloud initialisation magic summary = cloud initialisation magic
description-file = description-file =
README.md README.rst
author = Scott Moser author = Scott Moser
author-email = scott.moser@canonical.com author-email = scott.moser@canonical.com
home-page = http://launchpad.net/cloud-init/ home-page = http://launchpad.net/cloud-init/
classifier = classifier =
Environment :: Console Environment :: Console
Environment :: OpenStack
Environment :: Cloud Environment :: Cloud
Intended Audience :: Information Technology Intended Audience :: Information Technology
Intended Audience :: System Administrators Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: OS Independent Operating System :: OS Independent
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7 Programming Language :: Python :: 2.7
Programming Language :: Python :: 3 Programming Language :: Python :: 3
Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.3
@ -34,4 +32,5 @@ console_scripts =
cloud-init = cloudinit.shell:main cloud-init = cloudinit.shell:main
[build_sphinx] [build_sphinx]
source-dir = doc/ source-dir = doc/source
build-dir = doc/build

View File

@ -1,6 +1,15 @@
#!/usr/bin/env python #!/usr/bin/env python
import setuptools 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( setuptools.setup(
setup_requires=['pbr'], setup_requires=['pbr'],
pbr=True) pbr=True)

View File

@ -1,3 +1,14 @@
# 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.
httpretty>=0.7.1 httpretty>=0.7.1
mock mock
nose nose
# For doc building
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
oslosphinx
# For style checking
hacking<0.11,>=0.10.0

18
tox.ini
View File

@ -1,7 +1,7 @@
[tox] [tox]
minversion = 1.6 minversion = 1.6
skipsdist = True skipsdist = True
envlist = py27, py34, docs, flake envlist = py27, py34, docs, pep8
[tox:jenkins] [tox:jenkins]
downloadcache = ~/cache/pip downloadcache = ~/cache/pip
@ -13,13 +13,21 @@ deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = nosetests {posargs} commands = nosetests {posargs}
[testenv:flake] [testenv:pep8]
deps = {[testenv]deps}
commands = flake8 {posargs} commands = flake8 {posargs}
deps = flake8
[testenv:docs] [testenv:docs]
deps = sphinx deps = {[testenv]deps}
commands = python setup.py build_sphinx commands = python setup.py build_sphinx
[testenv:venv]
deps = {[testenv]deps}
commands = {posargs}
[flake8] [flake8]
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build builtins = _
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
# TODO(harlowja): fix these up...
ignore = H102,H104,H105