From c97fdd8b6555d4c4f8d628b11d1b7fcbd12cbebb Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Wed, 9 Nov 2016 03:12:51 +0000 Subject: [PATCH] Render rst file to doc/source This change renders dynamic rst file to doc/source instead of candidate directory so that they gets published by infra docs jobs. This is just to be able to access the source rst file on docs-draft.openstack.org host. Change-Id: I2435531d091ff051338c4ba9a495834d6653ab68 --- .gitignore | 6 +++--- doc/source/_exts/candidates.py | 2 +- doc/source/_exts/events.py | 2 +- doc/source/index.rst | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ff80b0c3..a0f2803d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,11 +8,11 @@ reference/projects/*.rst *.pyc AUTHORS ChangeLog -candidates/ptl.rst -candidates/tc.rst -candidates/events.rst .projects*yaml .projects*.pkl .testrepository doc/source/archive_toc.rst doc/source/*/*.rst +doc/source/ptl.rst +doc/source/tc.rst +doc/source/events.rst diff --git a/doc/source/_exts/candidates.py b/doc/source/_exts/candidates.py index e115df65..ae0e0739 100644 --- a/doc/source/_exts/candidates.py +++ b/doc/source/_exts/candidates.py @@ -30,7 +30,7 @@ def render_template(template, data, **kwargs): def render_list(list_type, candidates_list): - output_file = os.path.join(utils.CANDIDATE_PATH, "%s.rst" % list_type) + output_file = os.path.join(".", "doc", "source", "%s.rst" % list_type) template_name = "%s.jinja" % list_type template_dir = os.path.join(".", "doc", "source", "_exts") with open(output_file, "w") as out: diff --git a/doc/source/_exts/events.py b/doc/source/_exts/events.py index af5d4bfd..039865bc 100644 --- a/doc/source/_exts/events.py +++ b/doc/source/_exts/events.py @@ -42,7 +42,7 @@ def build_timer(app): outdated = '' ev['date_str'] = "%s%s, %s UTC%s" % (outdated, d, h, outdated) ev['name_str'] = "%s%s%s" % (outdated, ev['name'], outdated) - output_file = os.path.join(utils.CANDIDATE_PATH, "events.rst") + output_file = os.path.join(".", "doc", "source", "events.rst") with open(output_file, "w") as out: template_dir = os.path.join(".", "doc", "source", "_exts") loader = jinja2.FileSystemLoader(template_dir) diff --git a/doc/source/index.rst b/doc/source/index.rst index 95e99dda..eb7846c7 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -8,14 +8,14 @@ OpenStack Election ================== -.. include:: ../../candidates/events.rst +.. include:: events.rst See `Election system`_, `PTL details`_ and `TC details`_. .. Below is the official list of candidates for the current round. .. TODO: Change from ptl.rst to tc.rst when TC rounds starts -.. .. include:: ../../candidates/tc.rst +.. .. include:: tc.rst Previous elections