8 Commits

Author SHA1 Message Date
Joe Gordon
9c87c28f5a Dedup HACKING.rst and remove any pep8 or OpenStack hacking rules
Point to OpenStack Style Guide instead of directly to pep8 (it points to
pep8). Remove any rules that are already covered in pep8 or in hacking.

This is the same format that integrated projects are using for there
hacking docs.

Change-Id: Idf35d3fafeb77428c9210b6c6a98eb8c319cc3de
2014-04-02 16:36:16 -07:00
Flavio Percoco
42efaa5600 Update HACKING file with the new structure
Implements blueprint change-marconi-structure

Change-Id: Ibfc3fa33b65ae9de7c977b22cffce97bca6bbf13
2013-09-18 13:53:27 +02:00
Flavio Percoco
34f1d68f2e Use format instead of % for string formatting
As part of keeping Marconi forward compatible, this change replaces
the usage of % for string formatting with .format.

Change-Id: Ie2b1c95f4527339953aa57cceb9b39b0988bef26
2013-09-10 15:49:43 +02:00
kgriffs
baf3d2e372 Added some de-facto style guidelines to HACKING and fixed violations
This patch adds several guidelines:

* Global constants should be ALL_CAPS (cfg => CFG)
* Prefer single-quotes over double-quotes ("foo" => 'foo')
* Place a space before TODO in comments ("#TODO" => "# TODO")

Change-Id: Ib5b5c5916744856eca2ecaa37e949a3cdc4b3bd7
2013-06-17 09:58:30 -04:00
kgriffs
8b31b2e9b0 refactor: Hoist helpers.expect into package namespace
It's silly to have to import a package's submodule directly,
since in this case that only introduces another module name
that the developer has to keep track of, just to gain access
to a solitary function. This patch hoists
marconi.tests.util.helpers.expect into marocni.tests.util so
that it can be referenced more naturally by the test author.

Accordingly, the Hacking.rst guide has been updated to allow
this sort of thing (with some discretion).

Implements: blueprint grizzly-debt
Change-Id: Iad2e4f728aa4826d99bec2c599e2947a87eb5945
2013-05-07 18:00:14 -04:00
kgriffs
a556f392c5 style: Fix flake8 and hacking errors
In the interest of conforming to the de-facto coding standard for
OpenStack projects, this patch enables all checks for flake8 and
hacking, plus fixes everything reported.

Also, several docstrings were edited for clarity and grammar.

Change-Id: If85c4e420811b6df8eb55de1b5f07a0a8acfceff
Implements: blueprint grizzly-debt
2013-05-07 09:31:20 -04:00
kgriffs
90774202e2 style(HACKING): Add notes about whitespace, naming, and wrapping
This patch is all about optimizing our coding style around readibility:

* Developers spend more time reading code than writing it.
* Newcomers have little (or no) context to draw upon when trying to understand the intent of the original author.
* Code is easier to reason about when it is self-documenting.

Change-Id: If7428195aa31104f194cb240faf5c6946d068e8d
2013-03-22 23:46:46 -04:00
Flaper Fesp
420c1e046c Added hacking file
As part of adding the hacking file, this patch adds some files taken
from nova project that will help with the coding standards validation.

Tox now uses run_pep8 for the pep8 test

Change-Id: I0784390a0b13c9694e358563d43e5442592a785e
2013-03-07 18:07:53 +01:00