2.4 KiB
Contributing to Anvil
General
Anvil is written in python (we should be compatible with python >= 2.6
).
Anvil's official repository is located on GitHub at: https://github.com/yahoo/Openstack-Anvil.git.
Besides the master branch that tracks the OpenStack trunk
tags will maintained for all OpenStack releases starting with essex
.
The primary script in anvil is smithy
, which performs the bulk of the work for anvil's use cases (it acts as the main program entry-point).
A number of additional scripts/goodies can be found in the tools
directory that may or may not be useful to you.
Documentation
Please create documentation in the docs/
folder which will be synced with:
http://readthedocs.org/docs/anvil/
This will suffice until a more official documentation site can be made.
Style
- Please attempt to follow pep8 for all code submitted.
- Please also attempt to run pylint all code submitted.
- Please also attempt to run the yaml validation if you adjust any yaml files in the
conf
directory.
Use: ./checks.sh
to aid in running the 3 checks listed.
Environment Variables
- The
OS_*
environment variables should be the only ones used for all authentication to OpenStack clients as documented in the CLI Auth wiki page.
Documentation
Documentation should all be written in markdown or rst. Although github does support other formats it seems better just to stabilize on one of those.
Style Commandments
- Read http://www.python.org/dev/peps/pep-0008/
- Read http://www.python.org/dev/peps/pep-0008/ again
- Read on
Overall
- Put two newlines between top-level code (funcs, classes, etc)
- Put one newline between methods in classes and anywhere else
- Do not write "except:", use "except Exception:" at the very least
- Include your name with TODOs as in "#TODO(termie)"
- Do not name anything the same name as a built-in or reserved word
Imports
- Do not import objects, only modules
- Do not import more than one module per line
- Do not make relative imports
- Order your imports by the full module path
- Organize your imports in lexical order (TBD)