From 16b37909a475c9ba5aad6a889e912711f194fbde Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Mon, 27 Jul 2015 11:29:26 +0800 Subject: [PATCH] Fix dedent for C# code, upgrade sphinx The C# include for the .NET SDK has to be indented to follow the standards. This patch fixes up the includes so that the indenting is appropriate for in-line reading of snippets Since Sphinx 1.3 is required for dedent, this changes the test requirements for the api-site repository to upgrade the sphinx version. Change-Id: I539df7bc2c08ac6b31ba8ba4b7b94cf66b3d58a4 Co-Authored-By: Liang Bo --- firstapp/source/getting_started.rst | 8 ++++++++ test-requirements.txt | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/firstapp/source/getting_started.rst b/firstapp/source/getting_started.rst index b27b168c2..80b47a69f 100644 --- a/firstapp/source/getting_started.rst +++ b/firstapp/source/getting_started.rst @@ -230,6 +230,7 @@ are familiar with running code snippets in your language of choice. .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-1 :end-before: step-2 @@ -307,6 +308,7 @@ To list the images that are available in your cloud, run some API calls: .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-2 :end-before: step-3 @@ -370,6 +372,7 @@ You can also get information about available flavors: .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-3 :end-before: step-4 @@ -442,6 +445,7 @@ image that you picked in the previous section: .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-4 :end-before: step-5 @@ -492,6 +496,7 @@ Next, choose which flavor you want to use: .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-5 :end-before: step-6 @@ -565,6 +570,7 @@ Create the instance. .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-6 :end-before: step-7 @@ -598,6 +604,7 @@ If you list existing instances: .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-7 :end-before: step-8 @@ -672,6 +679,7 @@ money. Destroy cloud resources to avoid unexpected expenses. .. literalinclude:: ../samples/dotnet/getting_started.cs :language: c# + :dedent: 3 :start-after: step-8 :end-before: step-9 diff --git a/test-requirements.txt b/test-requirements.txt index a09e7f79a..947866c4f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,7 +5,8 @@ pbr>=0.6,!=0.7,<1.0 openstack-doc-tools>=0.23 doc8 # Apache-2.0 Pygments -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 +# At least 1.3 is required for dedent in code blocks. Capped to 1.3 to not get an automatic update to any newer versions. +sphinx>=1.3,!=1.3b1,<1.4 openstackdocstheme>=1.0.7 nwdiag sphinxcontrib-nwdiag