Add development guides to docs
Implements blueprint: climate-docs Change-Id: I5e38c9609a97abd59847f7d19f79149b6f63b292
This commit is contained in:
parent
9694721629
commit
141df5400f
69
doc/source/devref/development.guidelines.rst
Normal file
69
doc/source/devref/development.guidelines.rst
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
Development guidelines
|
||||||
|
======================
|
||||||
|
|
||||||
|
Coding Guidelines
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
`PEP8 <http://legacy.python.org/dev/peps/pep-0008/>`_ checking should pass for
|
||||||
|
all Climate code. You may check it using the following command:
|
||||||
|
|
||||||
|
.. sourcecode:: console
|
||||||
|
|
||||||
|
tox -e pep8
|
||||||
|
|
||||||
|
..
|
||||||
|
|
||||||
|
Also you should keep your code clear using more code style checkings via
|
||||||
|
`pylint <http://www.pylint.org>`_:
|
||||||
|
|
||||||
|
.. sourcecode:: console
|
||||||
|
|
||||||
|
tox -e pylint
|
||||||
|
|
||||||
|
..
|
||||||
|
|
||||||
|
If you see any pep8/pylint errors in your code, it's mandatory to fix them
|
||||||
|
before sending your change on review.
|
||||||
|
|
||||||
|
Testing Guidelines
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Climate repositories have unit tests that are run on all submitted code, and it
|
||||||
|
is recommended for developers to execute them themselves to catch regressions
|
||||||
|
early. Developers are also expected to keep the test suite up-to-date with any
|
||||||
|
submitted code changes.
|
||||||
|
|
||||||
|
Unit tests might be ran in `TOX <https://testrun.org/tox/latest/>`_ environment
|
||||||
|
via commands:
|
||||||
|
|
||||||
|
.. sourcecode:: console
|
||||||
|
|
||||||
|
tox -e py27
|
||||||
|
tox -e py26
|
||||||
|
|
||||||
|
..
|
||||||
|
|
||||||
|
for Python 2.7 and Python 2.6 accordingly.
|
||||||
|
|
||||||
|
Documentation Guidelines
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Currently Climate docs are partially written on `OpenStack wiki
|
||||||
|
<https://wiki.openstack.org/wiki/Climate>`_ pages, and partially using
|
||||||
|
Sphinx / RST located in the main repo in *doc* directory. In future all of them
|
||||||
|
will be moved to Sphinx / RST (now these docs cannot be published on
|
||||||
|
readthedocs.org, because there is already existing *climate* project created on
|
||||||
|
it. Now Climate ATCs are voting to choose new name for Climate project and then
|
||||||
|
all docs will be moved to new readthedocs project).
|
||||||
|
|
||||||
|
To build Sphinx / RST docs locally run the following command:
|
||||||
|
|
||||||
|
.. sourcecode:: console
|
||||||
|
|
||||||
|
tox -e docs
|
||||||
|
|
||||||
|
..
|
||||||
|
|
||||||
|
After it you can access generated docs in *doc/build/* directory, for example,
|
||||||
|
main page - *doc/build/html/index.html*.
|
||||||
|
|
65
doc/source/devref/how.to.contribute.rst
Normal file
65
doc/source/devref/how.to.contribute.rst
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
How to contribute
|
||||||
|
=================
|
||||||
|
|
||||||
|
Getting started
|
||||||
|
---------------
|
||||||
|
|
||||||
|
* Create `Github <https://github.com/stackforge/climate>`_ account if you don't
|
||||||
|
have one
|
||||||
|
* Make sure you have git options *user.name* and *user.email* set in git by
|
||||||
|
typing:
|
||||||
|
|
||||||
|
.. sourcecode:: console
|
||||||
|
|
||||||
|
git config --list. If not, configure them.
|
||||||
|
|
||||||
|
..
|
||||||
|
|
||||||
|
* Create `Launchpad <https://launchpad.net/climate>`_ account if you don't have
|
||||||
|
one
|
||||||
|
* Create `OpenStack profile <https://www.openstack.org/profile/>`_
|
||||||
|
* Login to `OpenStack Gerrit <https://review.openstack.org/>`_ using your
|
||||||
|
Launchpad ID
|
||||||
|
|
||||||
|
* Sign up your `OpenStack Individual Contributor License Agreement
|
||||||
|
<https://review.openstack.org/#/settings/agreements>`_
|
||||||
|
* Check that your email is listed in `Gerrit identities
|
||||||
|
<https://review.openstack.org/#/settings/web-identities>`_
|
||||||
|
|
||||||
|
* Subscribe to Climate-related projects on
|
||||||
|
`OpenStack Gerrit <https://review.openstack.org/>`_. Go to your
|
||||||
|
settings and in the watched projects add *stackforge/climate*,
|
||||||
|
*stackforge/climate-nova* and *stackforge/python-climateclient*
|
||||||
|
|
||||||
|
As all bugs/blueprints are listed in `Climate Launchpad
|
||||||
|
<https://launchpad.net/climate/>`_, you may keep track on them and choose some
|
||||||
|
to work on.
|
||||||
|
|
||||||
|
How to keep in touch with community
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
* If you're not subscribed to `OpenStack general mailing list
|
||||||
|
<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>`_ or to
|
||||||
|
`OpenStack development mailing list
|
||||||
|
<http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>`_, do
|
||||||
|
that. Climate-related emails must be send with **[climate]** in its subject.
|
||||||
|
* All questions may be asked on our IRC channel #openstack-climate on
|
||||||
|
`freenode <http://freenode.net>`_
|
||||||
|
* We also have weekly meetings on #openstack-meeting
|
||||||
|
`freenode IRC channel <https://wiki.openstack.org/wiki/Meetings/Climate>`_
|
||||||
|
|
||||||
|
Your first commit to Climate
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Checkout corresponding Climate repository from `Github
|
||||||
|
<https://github.com/stackforge/climate>`_
|
||||||
|
* Take a look on how `Gerrit review process
|
||||||
|
<https://wiki.openstack.org/wiki/Gerrit_Workflow>`_ goes on in OpenStack
|
||||||
|
(read carefully `committing changes
|
||||||
|
<https://wiki.openstack.org/wiki/Gerrit_Workflow#Committing_Changes>`_ part)
|
||||||
|
* Apply and commit your changes
|
||||||
|
* Make sure all code checkings and tests have passed. See
|
||||||
|
`development guidelines <development.guidelines.html>`_ to learn more
|
||||||
|
* Send your patch to the review (you may use `git-review
|
||||||
|
<https://github.com/openstack-infra/git-review>`_ utility for that)
|
||||||
|
* Monitor status of your change on https://review.openstack.org/#/
|
@ -31,3 +31,12 @@ User guide
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
restapi/index
|
restapi/index
|
||||||
|
|
||||||
|
Development guide
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
devref/how.to.contribute
|
||||||
|
devref/development.guidelines
|
Loading…
Reference in New Issue
Block a user