From 469f9fbebd935ebfb3bece59d3dd446ba5650fa2 Mon Sep 17 00:00:00 2001 From: Artem Goncharov Date: Wed, 8 May 2019 14:10:39 +0200 Subject: [PATCH] Fix pep8 and docs build problems - fix few pep8 complains - integrated upper-constraints - uncapped Sphinx to use upper-constraints cap - removed deprecated oslosphinx Change-Id: I1abffe16975e5e2c9ca1059dd866d605b9485bf9 --- doc/requirements.txt | 3 +-- doc/source/conf.py | 1 - test-requirements.txt | 3 +-- tools/jsonToRst.py | 2 +- tox.ini | 4 ++-- working_materials/tabulate_scores.py | 4 ++-- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 64780122..025ea152 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,6 +2,5 @@ pygments demjson doc8 jsonschema -oslosphinx -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 +Sphinx sphinxcontrib.datatemplates diff --git a/doc/source/conf.py b/doc/source/conf.py index 85a8e17b..6d7556cd 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -31,7 +31,6 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.viewcode', - 'oslosphinx', 'sphinxcontrib.datatemplates', ] diff --git a/test-requirements.txt b/test-requirements.txt index 64780122..025ea152 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,6 +2,5 @@ pygments demjson doc8 jsonschema -oslosphinx -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 +Sphinx sphinxcontrib.datatemplates diff --git a/tools/jsonToRst.py b/tools/jsonToRst.py index 4b78e3d2..75fbd428 100755 --- a/tools/jsonToRst.py +++ b/tools/jsonToRst.py @@ -167,7 +167,7 @@ this specification.""") outFile.write('-' * (len(event) + 20) + '\n\n') names = sorted(desig[event].keys()) - if len(names) is 0: + if len(names) == 0: outFile.write('None') outlines = [] diff --git a/tox.ini b/tox.ini index f3695474..04d2d4c8 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,8 @@ skipsdist = True basepython=python2.7 setenv = VIRTUAL_ENV={envdir} -deps = -r{toxinidir}/test-requirements.txt +deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} + -r{toxinidir}/test-requirements.txt [testenv:venv] basepython = python3 @@ -84,4 +85,3 @@ commands= whitelist_externals = sh bash - diff --git a/working_materials/tabulate_scores.py b/working_materials/tabulate_scores.py index 8b6f9d90..a27296b3 100755 --- a/working_materials/tabulate_scores.py +++ b/working_materials/tabulate_scores.py @@ -182,9 +182,9 @@ with open(args.score_file_name) as filehandle: # the JSON file, denote that it has scored high enough # to be included in the Guideline with an asterisk. if total >= int(json_data['metadata']['scoring']['cutoff_score']): - meets_criteria = '*' + meets_criteria = '*' else: - meets_criteria = '' + meets_criteria = '' # Now write the total score to a couple of places. # Put it in the tabulated file.