Reduce sphinx warnings.
This does several things to reduce the number of warnings generated in a docs build. . Only generate the {ptl,tc}.rst for the type of election we're running . use a for loop to match the undreline with the section title . Ensure that we use anonymous hyperlinks ``__ vs ``_ . tell sphinx to ignore the generated announcement as they're not linked There are still 4 left which look to me like actual bugs in sphinux/docutils rather than our RST. Change-Id: I64a12d1c49c5b71a6849ad1724ac4ae09daeb85a
This commit is contained in:
parent
6c223e6e97
commit
6744d41057
@ -91,8 +91,10 @@ def build_archive(serie, list_type):
|
||||
def build_lists(app):
|
||||
# Current candidates
|
||||
candidates_list = utils.build_candidates_list()
|
||||
render_list("ptl", candidates_list)
|
||||
render_list("tc", candidates_list)
|
||||
if not utils.is_tc_election():
|
||||
render_list("ptl", candidates_list)
|
||||
else:
|
||||
render_list("tc", candidates_list)
|
||||
|
||||
# Archived elections
|
||||
previous_toc = [
|
||||
|
@ -1,15 +1,19 @@
|
||||
======================
|
||||
{% for i in range(election|length + 4) %}={% endfor%}
|
||||
|
||||
{{ election.capitalize() }} PTL
|
||||
======================
|
||||
{% for i in range(election|length + 4) %}={% endfor%}
|
||||
|
||||
|
||||
{% for project in projects %}
|
||||
* {{ project.replace('_', ' ') }}
|
||||
|
||||
{% for candidate in candidates[project] %}{% if candidate['elected'] and 'url' in candidate %}
|
||||
* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`_
|
||||
* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__
|
||||
{% elif candidate['elected'] %}
|
||||
* {{ candidate['fullname'] }} ({{ candidate['ircname'] }}) {% if candidate['elected'] == 'INCUMBENT-PTL' %}[#IncumbentPTL]_{% else %}[#TCAppointed]_{% endif %}
|
||||
{% endif %}{% endfor %}
|
||||
* {{ candidate['fullname'] }} (\{{ candidate['ircname'] }}) {% if candidate['elected'] == 'INCUMBENT-PTL' %}[#IncumbentPTL]_{% else %}[#TCAppointed]_{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
@ -25,7 +29,8 @@ Results
|
||||
{% for project in projects %}{% if project in elections_results %}
|
||||
|
||||
* `{{ project }} <{{ elections_results[project] }}>`_
|
||||
{% endif %}{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{{ election.capitalize() }} PTL Candidates
|
||||
|
@ -1,8 +1,11 @@
|
||||
======================
|
||||
{% for i in range(election|length + 20) %}={% endfor%}
|
||||
|
||||
{{ election.capitalize() }} elected TC members
|
||||
======================
|
||||
{% for i in range(election|length + 20) %}={% endfor%}
|
||||
|
||||
|
||||
{% for candidate in candidates['TC'] %}{% if candidate['elected'] %}
|
||||
* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`_
|
||||
* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__
|
||||
{% endif %}{% endfor %}
|
||||
|
||||
Results
|
||||
@ -12,5 +15,5 @@ Results
|
||||
{{ election.capitalize() }} TC Candidates
|
||||
======================
|
||||
{% for candidate in candidates['TC'] %}
|
||||
* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`_
|
||||
* `{{ candidate['fullname'] }} ({{ candidate['ircname'] }}) <{{ candidate['url'] }}>`__
|
||||
{% endfor %}
|
||||
|
@ -71,7 +71,9 @@ copyright = u'2015, OpenStack'
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build', 'candidates/ptl.rst', 'candidates/tc.rst',
|
||||
'candidates/events.rst']
|
||||
'candidates/events.rst',
|
||||
'results/*/announce_*.rst',
|
||||
]
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
Loading…
Reference in New Issue
Block a user