Files
29d390b8950664f1d4fda709eeb09a584d42d7ab
nova /HACKING.rst

76 lines
3.3 KiB
ReStructuredText
Raw Normal View History

2010年05月27日 23:05:26 -07:00
Nova Style Commandments
=======================
2010年05月27日 23:05:26 -07:00
---------------------------
2011年07月29日 12:49:48 -04:00
This enforces a guideline defined in ``nova.openstack.common.db.sqlalchemy.session``
datetime.datetime.utcnow() to make it easy to override its return value in tests
Code that needs to be shared between virt drivers should be moved
into a common module
- [N312] using config vars from other virt drivers forbidden
Config parameters that need to be shared between virt drivers
should be moved into a common module
-------------------
For every new feature, unit tests should be created that both test and
(implicitly) document the usage of said feature. If submitting a patch for a
bug that had no unit test, a new passing unit test should be added. If a
submitted bug fix does have a unit test, be sure to add a new one that fails
without the patch and passes with the patch.
For more information on creating unit tests and utilizing the testing
Running Tests
-------------
The testing system is based on a combination of tox and testr. The canonical
create virtual environments, populate them with dependencies and run all of
It is also possible to run the tests inside of a virtual environment
you have created, or it is possible that you have all of the dependencies
installed locally already. In this case, you can interact with the testr
run --parallel`` will run it in parallel (this is the default incantation tox
http://wiki.openstack.org/testr
-------------
do this via ``tox``, simply run ``tox -evenv -- python setup.py build_sphinx``,
which will cause a virtualenv with all of the needed dependencies to be
created and then inside of the virtualenv, the docs will be created and
put into doc/build/html.
If you'd like a PDF of the documentation, you'll need LaTeX installed, and
additionally some fonts. On Ubuntu systems, you can get what you need with::
apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
tox -evenv -- python setup.py build_sphinx_latex
cd build/sphinx/latex
make
You should wind up with a PDF - Nova.pdf.