diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..ec396ef --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,2 @@ +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme >=2.0.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index e4c02f2..6d5f7a4 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -23,9 +23,14 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx' + 'openstackdocstheme' ] +# openstackdocstheme options +repository_name = 'openstack/oswin-tempest-plugin' +bug_project = 'os-win' +bug_tag = '' + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable @@ -57,6 +62,7 @@ pygments_style = 'sphinx' # html_theme_path = ["."] # html_theme = '_theme' # html_static_path = ['static'] +html_theme = 'openstackdocs' # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/oswin_tempest_plugin/clients/wsman.py b/oswin_tempest_plugin/clients/wsman.py index fa96952..2e6f214 100644 --- a/oswin_tempest_plugin/clients/wsman.py +++ b/oswin_tempest_plugin/clients/wsman.py @@ -33,8 +33,8 @@ def run_wsman_cmd(host, cmd, username, password=None, url = 'https://%s:5986/wsman' % host if transport_method == 'ssl': - if not (os.path.exists(cert_pem_path) and - os.path.exists(cert_key_pem_path)): + if not (os.path.exists(cert_pem_path) + and os.path.exists(cert_key_pem_path)): raise exceptions.WSManException('Could not find certificate path ' 'or certificate key path.') diff --git a/oswin_tempest_plugin/tests/_mixins/migrate.py b/oswin_tempest_plugin/tests/_mixins/migrate.py index d5135c2..e4639c8 100644 --- a/oswin_tempest_plugin/tests/_mixins/migrate.py +++ b/oswin_tempest_plugin/tests/_mixins/migrate.py @@ -69,8 +69,8 @@ class _LiveMigrateMixin(object): current_host = admin_server['OS-EXT-SRV-ATTR:host'] block_migration = (CONF.compute_feature_enabled. - block_migration_for_live_migration and - not volume_backed) + block_migration_for_live_migration + and not volume_backed) self.admin_servers_client.live_migrate_server( server['id'], diff --git a/oswin_tempest_plugin/tests/scenario/test_metrics_collection.py b/oswin_tempest_plugin/tests/scenario/test_metrics_collection.py index 7ab6cc9..c30a3ab 100644 --- a/oswin_tempest_plugin/tests/scenario/test_metrics_collection.py +++ b/oswin_tempest_plugin/tests/scenario/test_metrics_collection.py @@ -136,8 +136,8 @@ class MetricsCollectionTestCase(test_base.TestBase): start_res_id = server['id'] resources = self.telemetry_client.list_resources() res_ids = [r['id'] for r in resources - if r['original_resource_id'].startswith('instance-') and - start_res_id in r['original_resource_id']] + if r['original_resource_id'].startswith('instance-') + and start_res_id in r['original_resource_id']] self.assertEqual(1, len(res_ids)) return res_ids[0] diff --git a/setup.cfg b/setup.cfg index 555cce2..2f636ed 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,7 @@ description-file = README.rst author = Cloudbase Solutions author-email = info@cloudbasesolutions.com -home-page = https://github.com/openstack/oswin-tempest-plugin +home-page = https://opendev.org/openstack/oswin-tempest-plugin classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -26,26 +26,3 @@ packages = [entry_points] tempest.test_plugins = oswin_tempest_plugin = oswin_tempest_plugin.plugin:OSWinTempestPlugin - -[build_sphinx] -all-files = 1 -warning-is-error = 1 -source-dir = doc/source -build-dir = doc/build - -[upload_sphinx] -upload-dir = doc/build/html - -[compile_catalog] -directory = oswin_tempest_plugin/locale -domain = oswin_tempest_plugin - -[update_catalog] -domain = oswin_tempest_plugin -output_dir = oswin_tempest_plugin/locale -input_file = oswin_tempest_plugin/locale/oswin_tempest_plugin.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = oswin_tempest_plugin/locale/oswin_tempest_plugin.pot diff --git a/test-requirements.txt b/test-requirements.txt index c760fb8..bafd60a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,13 +2,11 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=3.0.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD -sphinx!=1.6.6,>=1.6.2 # BSD stestr>=2.0.0 # Apache-2.0 -oslosphinx>=4.7.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 3ef2651..2b7074b 100644 --- a/tox.ini +++ b/tox.ini @@ -7,15 +7,13 @@ ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} setenv = VIRTUAL_ENV={envdir} - BRANCH_NAME=master - CLIENT_NAME=oswin-tempest-plugin PYTHONWARNINGS=default::DeprecationWarning -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:pep8] @@ -28,15 +26,18 @@ commands = {posargs} commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] -commands = python setup.py build_sphinx +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/doc/requirements.txt +commands = sphinx-build -W -b html doc/source doc/build/html [testenv:debug] commands = oslo_debug_helper {posargs} [flake8] # E123, E125 skipped as they are invalid PEP-8. - +# W503 line break before binary operator show-source = True -ignore = E123,E125 +ignore = E123,E125,W503 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build