diff --git a/.gitreview b/.gitreview new file mode 100644 index 00000000..429807bd --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=stackforge/cloud-init.git diff --git a/HACKING.md b/HACKING.md deleted file mode 100644 index 5b13bc1f..00000000 --- a/HACKING.md +++ /dev/null @@ -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 diff --git a/HACKING.rst b/HACKING.rst new file mode 100644 index 00000000..a5726261 --- /dev/null +++ b/HACKING.rst @@ -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/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..23800499 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,8 @@ +include AUTHORS +include ChangeLog +include README.rst +exclude .gitignore +exclude .gitreview + +global-exclude *.pyc + diff --git a/README.md b/README.md deleted file mode 100644 index 836d4e51..00000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Cloud Init -========== - -cloud-init initializes systems for cloud environments. diff --git a/README.rst b/README.rst new file mode 100644 index 00000000..f6158254 --- /dev/null +++ b/README.rst @@ -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/ diff --git a/doc/conf.py b/doc/source/conf.py similarity index 100% rename from doc/conf.py rename to doc/source/conf.py diff --git a/doc/contents.rst b/doc/source/contents.rst similarity index 100% rename from doc/contents.rst rename to doc/source/contents.rst diff --git a/requirements.txt b/requirements.txt index 5b25c10e..7c19a071 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 pyyaml jsonpatch diff --git a/setup.cfg b/setup.cfg index f026daa7..13a20d67 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,20 +3,18 @@ name = cloudinit version = 1.9.0 summary = cloud initialisation magic description-file = - README.md + README.rst author = Scott Moser author-email = scott.moser@canonical.com home-page = http://launchpad.net/cloud-init/ classifier = Environment :: Console - Environment :: OpenStack Environment :: Cloud Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 @@ -34,4 +32,5 @@ console_scripts = cloud-init = cloudinit.shell:main [build_sphinx] -source-dir = doc/ +source-dir = doc/source +build-dir = doc/build diff --git a/setup.py b/setup.py index ed58d0f2..e14585b0 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,15 @@ #!/usr/bin/env python + 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 index 3c5b22cb..8dedde52 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 mock 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 diff --git a/tox.ini b/tox.ini index 3f3d9810..c64afdcf 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 1.6 skipsdist = True -envlist = py27, py34, docs, flake +envlist = py27, py34, docs, pep8 [tox:jenkins] downloadcache = ~/cache/pip @@ -13,13 +13,21 @@ deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = nosetests {posargs} -[testenv:flake] +[testenv:pep8] +deps = {[testenv]deps} commands = flake8 {posargs} -deps = flake8 [testenv:docs] -deps = sphinx +deps = {[testenv]deps} commands = python setup.py build_sphinx +[testenv:venv] +deps = {[testenv]deps} +commands = {posargs} + [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