@@ -6,40 +6,41 @@ Communication
66-------------
77
88IRC Channel
9- ===========
9+ ~~~~~~~~~~~
10+
1011The OpenStackClient team doesn't have regular meetings so if you have
1112questions or anything you want to discuss, come to our channel:
1213#openstack-sdks
1314
15+
1416Testing
1517-------
1618
1719Tox prerequisites and installation
18- ==================================
20+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1921
2022Install the prerequisites for Tox:
2123
2224* On Ubuntu or Debian:
2325
2426 .. code-block :: bash
2527
26- $ apt-get install gcc gettext python -dev libxml2-dev libxslt1-dev \
28+ $ apt-get install gcc gettext python3 -dev libxml2-dev libxslt1-dev \
2729 zlib1g-dev
2830
2931 You may need to use pip install for some packages.
3032
31-
3233* On RHEL or CentOS including Fedora:
3334
3435 .. code-block :: bash
3536
36- $ yum install gcc python -devel libxml2-devel libxslt-devel
37+ $ yum install gcc python3 -devel libxml2-devel libxslt-devel
3738
3839 * On openSUSE or SUSE linux Enterprise:
3940
4041 .. code-block :: bash
4142
42- $ zypper install gcc python -devel libxml2-devel libxslt-devel
43+ $ zypper install gcc python3 -devel libxml2-devel libxslt-devel
4344
4445 Install python-tox:
4546
@@ -59,7 +60,7 @@ To run the full suite of tests maintained within OpenStackClient.
5960 virtualenvs. You can later use the ``-r `` option with ``tox `` to rebuild
6061 your virtualenv in a similar manner.
6162
62- To run tests for one or more specific test environments(for example, the most
63+ To run tests for one or more specific test environments (for example, the most
6364common configuration of the latest Python version and PEP-8), list the
6465environments with the ``-e `` option, separated by spaces:
6566
@@ -70,7 +71,7 @@ environments with the ``-e`` option, separated by spaces:
7071 See ``tox.ini `` for the full list of available test environments.
7172
7273Running functional tests
73- ========================
74+ ~~~~~~~~~~~~~~~~~~~~~~~~
7475
7576OpenStackClient also maintains a set of functional tests that are optimally
7677designed to be run against OpenStack's gate. Optionally, a developer may
@@ -90,7 +91,7 @@ To run a specific functional test:
9091 $ tox -e functional -- --regex functional.tests.compute.v2.test_server
9192
9293 Running with PDB
93- ================
94+ ~~~~~~~~~~~~~~~~
9495
9596Using PDB breakpoints with ``tox `` and ``testr `` normally does not work since
9697the tests fail with a `BdbQuit ` exception rather than stopping at the
@@ -109,8 +110,32 @@ For reference, the `debug`_ ``tox`` environment implements the instructions
109110.. _`debug` : https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests
110111
111112
112- Building the Documentation
113- --------------------------
113+ Coding Style
114+ ------------
115+
116+ OpenStackClient uses `flake8 `__ along with `hacking `__, an OpenStack-specific
117+ superset of ``flake8 `` rules, to enforce coding style. This can be run manually
118+ using ``tox ``:
119+
120+ .. code-block :: bash
121+
122+ $ tox -e pep8
123+
124+ Alternatively, you can use the `pre-commit framework `__ to allow running of
125+ some linters on each commit. This must be enabled locally to function:
126+
127+ .. code-block :: bash
128+
129+ $ pip install --user pre-commit
130+ $ pre-commit install --allow-missing-config
131+
132+ .. __ : https://flake8.pycqa.org/en/latest/
133+ .. __ : https://docs.openstack.org/hacking/latest/user/hacking.html
134+ .. __ : https://pre-commit.com/
135+
136+
137+ Documentation
138+ -------------
114139
115140The documentation is generated with Sphinx using the ``tox `` command. To
116141create HTML docs, run the commands:
@@ -121,6 +146,7 @@ create HTML docs, run the commands:
121146
122147 The resultant HTML will be in the ``doc/build/html `` directory.
123148
149+
124150Release Notes
125151-------------
126152
@@ -156,6 +182,7 @@ To run the commands and see results:
156182
157183 At last, look at the generated release notes files in ``releasenotes/build/html `` in your browser.
158184
185+
159186Testing new code
160187----------------
161188
174201 $ pip install -e .
175202
176203 Standardize Import Format
177- =========================
204+ ~~~~~~~~~~~~~~~~~~~~~~~~~
178205
179206More information about Import Format, see `Import Order Guide
180207<https://docs.openstack.org/hacking/latest/user/hacking.html#imports> `__.
@@ -193,7 +220,7 @@ The import order shows below:
193220 {{begin your code}}
194221
195222 Example
196- ~~~~~~~
223+ ^^^^^^^
197224
198225.. code-block :: python
199226
0 commit comments