From 0eca4733d6e749066be02eec356ba855d4c15ef2 Mon Sep 17 00:00:00 2001 From: Dao Cong Tien Date: Thu, 12 Jul 2018 16:34:49 +0700 Subject: [PATCH] Adds doc8 check to pep8 This patch adds doc8 check for .rst files to pep8. Files that fail doc8 check are also fixed. Ignore D001 of doc8 check. This requires lot of changes and should be done in a separated patch. Change-Id: Ie2d258e9268fe20ae7988a3b4af92a8a6973b9c6 --- doc/source/installation.rst | 6 +++--- doc/source/readme.rst | 4 ++-- doc/source/specs/provider_networks_app.rst | 2 +- lower-constraints.txt | 1 + rally-jobs/plugins/README.rst | 2 +- test-requirements.txt | 2 ++ tox.ini | 6 ++++++ 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 454d1a344..965a84810 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -60,11 +60,11 @@ Quick Start * This may take a while, once it is finished: - * You can ssh into the virtual machines: + * You can ssh into the virtual machines: `vagrant ssh devstack_controller`, `vagrant ssh devstack_compute1` or `vagrant ssh devstack_compute2` - * You can access the horizon dashboard at + * You can access the horizon dashboard at http://controller.devstack.dev * The dragonflow folder is shared between the host and the two nodes @@ -82,7 +82,7 @@ Quick Start * You can ssh into the virtual machine: `vagrant ssh devstack_aio` - * You can access the horizon dashboard at + * You can access the horizon dashboard at http://allinone.devstack.dev * The dragonflow folder is shared between the host and the VM (at diff --git a/doc/source/readme.rst b/doc/source/readme.rst index f59d714d5..22d944b5a 100644 --- a/doc/source/readme.rst +++ b/doc/source/readme.rst @@ -45,7 +45,7 @@ Meta data and cloud init In order to enable the VMs to get configuration like public keys, hostnames, etc.. you need to enable meta service. You can do it -by adding the following lines to local.conf file (before running +by adding the following lines to local.conf file (before running 'stack.sh' command): enable_service q-meta @@ -56,7 +56,7 @@ must be started. It is called meta-service-proxy and it is used to forward meta data client requests to real meta service. By default, it is started by regular q-dhcp service for each tenant. As a result 'q-meta' and 'q-dhcp' services must be enabled. - + Database configuration ----------------------- diff --git a/doc/source/specs/provider_networks_app.rst b/doc/source/specs/provider_networks_app.rst index 089eedf22..a9bcb3d21 100644 --- a/doc/source/specs/provider_networks_app.rst +++ b/doc/source/specs/provider_networks_app.rst @@ -54,7 +54,7 @@ A new provider network application that will deal with vlan and flat related flows. On setup it will create the patch ports according to bridge-network mapping -configuration parameters from the local integration bridge to the bridges +configuration parameters from the local integration bridge to the bridges connected with the provider networks. Ingress processing diff --git a/lower-constraints.txt b/lower-constraints.txt index 2d059f702..04cfea748 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -18,6 +18,7 @@ crc16==0.1.1 debtcollector==1.19.0 decorator==4.2.1 deprecation==2.0 +doc8==0.6.0 docutils==0.14 dogpile.cache==0.6.5 dulwich==0.19.0 diff --git a/rally-jobs/plugins/README.rst b/rally-jobs/plugins/README.rst index 33bec0d25..bc1fc5ea7 100644 --- a/rally-jobs/plugins/README.rst +++ b/rally-jobs/plugins/README.rst @@ -1,7 +1,7 @@ Rally plugins ============= -All *.py modules from this directory will be auto-loaded by Rally and all +All `*.py` modules from this directory will be auto-loaded by Rally and all plugins will be discoverable. There is no need of any extra configuration and there is no difference between writing them here and in rally code base. diff --git a/test-requirements.txt b/test-requirements.txt index 0b7301272..306a48066 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -18,3 +18,5 @@ redis>=2.10.0 # MIT stestr>=2.0.0 # Apache-2.0 hiredis>=0.2.0 # BSD PrettyTable<0.8,>=0.7.2 # BSD +doc8>=0.6.0 # Apache-2.0 +Pygments>=2.2.0 # BSD license diff --git a/tox.ini b/tox.ini index 14f352486..fbeccf06e 100644 --- a/tox.ini +++ b/tox.ini @@ -26,6 +26,7 @@ commands = [testenv:pep8] commands = flake8 + doc8 {posargs} neutron-db-manage --subproject dragonflow check_migration {[testenv:genconfig]commands} @@ -67,6 +68,11 @@ enable-extensions=H904,H203,H204,H205 show-source = true exclude = ./.*,dist,doc,build,tools +[doc8] +# D001: Line too long +ignore = D001 +ignore-path = .venv,.git,.tox,.tmp,*dragonflow/locale*,*lib/python*,dragonflow.egg*,doc/build,releasenotes/*,doc/source/contributor/api + [testenv:pylint] deps = {[testenv]deps}