From 53c10929434d323b15e1dff01fa243830c0122be Mon Sep 17 00:00:00 2001 From: Sergey Kraynev Date: Fri, 18 Dec 2015 06:30:06 -0500 Subject: [PATCH] Move all base templates to separate directory Now we can store all base templates in separate directory and use a link on these templates instead of copy-pasting it in all new directory. Change-Id: Ibc0c77642bb40303606047a54e3e198e7ef5a962 --- doc/source/conf.py | 2 +- specs/{juno/template.rst => templates/juno-template.rst} | 0 specs/{kilo/template.rst => templates/kilo-template.rst} | 0 .../{liberty/template.rst => templates/liberty-template.rst} | 0 specs/{mitaka/template.rst => templates/mitaka-template.rst} | 0 tests/test_titles.py | 4 +++- 6 files changed, 4 insertions(+), 2 deletions(-) rename specs/{juno/template.rst => templates/juno-template.rst} (100%) rename specs/{kilo/template.rst => templates/kilo-template.rst} (100%) rename specs/{liberty/template.rst => templates/liberty-template.rst} (100%) rename specs/{mitaka/template.rst => templates/mitaka-template.rst} (100%) diff --git a/doc/source/conf.py b/doc/source/conf.py index 9ac6f6a6..bebae661 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -33,7 +33,7 @@ feed_base_url = 'http://specs.openstack.org/openstack/heat-specs' feed_author = 'OpenStack Heat Team' exclude_patterns = [ - '**/template.rst', + '**/templates/*.rst', ] # Optionally allow the use of sphinxcontrib.spelling to verify the diff --git a/specs/juno/template.rst b/specs/templates/juno-template.rst similarity index 100% rename from specs/juno/template.rst rename to specs/templates/juno-template.rst diff --git a/specs/kilo/template.rst b/specs/templates/kilo-template.rst similarity index 100% rename from specs/kilo/template.rst rename to specs/templates/kilo-template.rst diff --git a/specs/liberty/template.rst b/specs/templates/liberty-template.rst similarity index 100% rename from specs/liberty/template.rst rename to specs/templates/liberty-template.rst diff --git a/specs/mitaka/template.rst b/specs/templates/mitaka-template.rst similarity index 100% rename from specs/mitaka/template.rst rename to specs/templates/mitaka-template.rst diff --git a/tests/test_titles.py b/tests/test_titles.py index f235ed53..b0018a35 100644 --- a/tests/test_titles.py +++ b/tests/test_titles.py @@ -87,11 +87,13 @@ class TestTitles(testtools.TestCase): def test_template(self): releases = [x.split('/')[1] for x in glob.glob('specs/*/')] + # ignore directory with base templates for releases + releases.remove('templates') # Ignore juno and kilo. releases.remove('juno') releases.remove('kilo') for release in releases: - with open("specs/%s/template.rst" % release) as f: + with open("specs/templates/%s-template.rst" % release) as f: template = f.read() spec = docutils.core.publish_doctree(template) template_titles = self._get_titles(spec)