From aad2068896c4a339e231acca75352d3225aa2682 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 16 Apr 2020 17:43:24 +0200 Subject: [PATCH] Cleanup docs building * Switch to using sphinx-build * Fix docs warnings * Remove test-requirement and fold in requirements, we don't need two files for this docu only repo. * Remove unused requirement pytz. * Update doc requirements * Remove cruft from setup.cfg and doc/source/conf.py * Switch to Python3 Change-Id: Iae32f7daa656fca6ae80a750746215fe80d4a0d6 --- doc/source/_exts/teamtable.py | 2 +- doc/source/conf.py | 5 ----- reference/index.rst | 1 + reference/uc-election-feb2018.rst | 6 ++++-- reference/uc-election-feb2019.rst | 6 ++++-- reference/uc-election-sep2019.rst | 4 ++-- requirements.txt | 7 ++++++- setup.cfg | 8 -------- test-requirements.txt | 7 ------- tox.ini | 5 ++--- 10 files changed, 20 insertions(+), 31 deletions(-) delete mode 100644 test-requirements.txt diff --git a/doc/source/_exts/teamtable.py b/doc/source/_exts/teamtable.py index 9572a89..8a0ef00 100644 --- a/doc/source/_exts/teamtable.py +++ b/doc/source/_exts/teamtable.py @@ -72,7 +72,7 @@ class TeamTable(Table): LOG.info('loading teamtable') LOG.info('reading %s' % filename) with open(filename, 'r') as f: - _teams_yaml = yaml.load(f.read()) + _teams_yaml = yaml.safe_load(f.read()) table = nodes.table() diff --git a/doc/source/conf.py b/doc/source/conf.py index 19b8e62..6c52ec0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -134,11 +134,6 @@ html_title = 'OpenStack Governance' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1" -html_last_updated_fmt = os.popen(git_cmd).read() - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True diff --git a/reference/index.rst b/reference/index.rst index f139303..ef72bc6 100644 --- a/reference/index.rst +++ b/reference/index.rst @@ -9,3 +9,4 @@ Reference documents which need to be revised over time. charter new-uc-group-requirements + running-a-uc-election diff --git a/reference/uc-election-feb2018.rst b/reference/uc-election-feb2018.rst index f083e19..eb3525c 100644 --- a/reference/uc-election-feb2018.rst +++ b/reference/uc-election-feb2018.rst @@ -55,5 +55,7 @@ the candidate. Result ====== -| Melvin Hillsman, Amy Marrich, and Yih Leong Sun were elected. -|\* Full Results: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_f7b17dc638013045 + +Melvin Hillsman, Amy Marrich, and Yih Leong Sun were elected. + +* Full Results: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_f7b17dc638013045 diff --git a/reference/uc-election-feb2019.rst b/reference/uc-election-feb2019.rst index b4687b7..0e182b7 100644 --- a/reference/uc-election-feb2019.rst +++ b/reference/uc-election-feb2019.rst @@ -52,5 +52,7 @@ the candidate. Result ====== -| Amy Marrich, Belmiro Moreira, and John Studarus were elected. -|\* Full Results: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_8760d5969c6275f1&rkey=75d7d496f7e50780 + +Amy Marrich, Belmiro Moreira, and John Studarus were elected. + +* Full Results: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_8760d5969c6275f1&rkey=75d7d496f7e50780 diff --git a/reference/uc-election-sep2019.rst b/reference/uc-election-sep2019.rst index 03e81a0..fdb9712 100644 --- a/reference/uc-election-sep2019.rst +++ b/reference/uc-election-sep2019.rst @@ -1,6 +1,6 @@ -======================== +=========================== UC Elections September 2019 -======================== +=========================== We expect all members of our community to adhere to the highest standards of behavior during User Committee elections. diff --git a/requirements.txt b/requirements.txt index c1b7243..ebdff6c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,10 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pytz>=2013.6 # MIT + PyYAML>=3.1.0 # MIT + +docutils>=0.11,!=0.13.1 # OSI-Approved Open Source, Public Domain +sphinx>=2.0.0 # BSD +openstackdocstheme>=2.0.0 # Apache-2.0 + diff --git a/setup.cfg b/setup.cfg index f92f99e..153ccf3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,11 +7,3 @@ description-file = author = OpenStack UC author-email = user-committee@lists.openstack.org home-page = https://governance.openstack.org/uc/ - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source - -[pbr] -warnerrors = True diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 278c52a..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -# needed for doc build -docutils>=0.11,!=0.13.1 # OSI-Approved Open Source, Public Domain -sphinx>=1.5.0 # BSD -openstackdocstheme>=1.25.1 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 1c8e535..8c997e1 100644 --- a/tox.ini +++ b/tox.ini @@ -4,18 +4,17 @@ minversion = 1.6 skipsdist = True [testenv] +basepython = python3 usedevelop = True passenv = ZUUL_CACHE_DIR REQUIREMENTS_PIP_LOCATION -install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} - -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt [testenv:venv] commands = {posargs} [testenv:docs] -commands = python setup.py build_sphinx +commands = sphinx-build -W -b html doc/source doc/build/html