<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 12, 2015, at 6:25 AM, Mikhail Dubov <<a href="mailto:mdubov@mirantis.com" class="">mdubov@mirantis.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div style="font-size:13px" class="">Hi all,</div><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class="">when it gets to submitting & reviewing patches for the project documentation, it is very convenient to surf through the docs generated by Sphinx in a special Gate job. The problem is that Sphinx uses in gates a theme which is different from that used on ReadTheDocs. So the docs generated in gates look differently from the docs that we have on ReadTheDocs, while the desired behaviour is to have the same Sphinx theme both on ReadTheDocs and in gates.</div><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class="">There is a <a href="http://read-the-docs.readthedocs.org/en/latest/theme.html" target="_blank" class="">snippet</a> that enables the default ReadTheDocs theme locally (and also potentially in gates):</div><div style="font-size:13px" class=""><pre style="white-space:pre-wrap;font-family:Consolas,'Andale Mono WT','Andale Mono','Lucida Console','Lucida Sans Typewriter','DejaVu Sans Mono','Bitstream Vera Sans Mono','Liberation Mono','Nimbus Mono L',Monaco,'Courier New',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;line-height:1.5;overflow:auto;color:rgb(64,64,64)" class=""><span style="color:rgb(153,153,136);font-style:italic" class=""># on_rtd is whether we are on <a href="http://readthedocs.org/" target="_blank" class="">readthedocs.org</a></span>
import <span style="color:rgb(85,85,85)" class="">os</span>
<span style="color:rgb(51,51,51)" class="">on_rtd</span> <span style="font-weight:bold" class="">=</span> <span style="color:rgb(51,51,51)" class="">os</span><span style="font-weight:bold" class="">.</span><span style="color:rgb(51,51,51)" class="">environ</span><span style="font-weight:bold" class="">.</span><span style="color:rgb(51,51,51)" class="">get</span>(<span style="color:rgb(221,17,68)" class="">'READTHEDOCS'</span>, <span style="color:rgb(153,153,153)" class="">None</span>) <span style="font-weight:bold" class="">==</span> <span style="color:rgb(221,17,68)" class="">'True'</span>
<span style="font-weight:bold" class="">if</span> <span style="font-weight:bold" class="">not</span> <span style="color:rgb(51,51,51)" class="">on_rtd</span>: <span style="color:rgb(153,153,136);font-style:italic" class=""># only import and set the theme if we're building docs locally</span>
import <span style="color:rgb(85,85,85)" class="">sphinx_rtd_theme</span>
<span style="color:rgb(51,51,51)" class="">html_theme</span> <span style="font-weight:bold" class="">=</span> <span style="color:rgb(221,17,68)" class="">'sphinx_rtd_theme'</span>
<span style="color:rgb(51,51,51)" class="">html_theme_path</span> <span style="font-weight:bold" class="">=</span> [<span style="color:rgb(51,51,51)" class="">sphinx_rtd_theme</span><span style="font-weight:bold" class="">.</span><span style="color:rgb(51,51,51)" class="">get_html_theme_path</span>()]
<span style="color:rgb(153,153,136);font-style:italic" class=""># otherwise, <a href="http://readthedocs.org/" target="_blank" class="">readthedocs.org</a> uses their theme by default, so no need to specify it</span></pre></div><div style="font-size:13px" class="">The problem is that it uses the <a href="https://pypi.python.org/pypi/sphinx_rtd_theme" target="_blank" class="">sphinx_rtd_theme</a> python package, which is not included in the global requirements. What should be done then to enable that default ReadTheDocs theme in gates?</div></div><div class=""><br class=""></div><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><font color="#666666" class="">Best regards,</font><div class=""><font color="#666666" class="">Mikhail Dubov</font></div><div class=""><font color="#666666" class=""><br class=""></font></div><div class=""><span style="color:rgb(102,102,102);font-family:arial;font-size:small" class="">Engineering OPS</span><br class=""></div><div class=""><font color="#666666" class="">Mirantis, Inc.</font></div><div class=""><font color="#666666" class="">E-Mail: <a href="mailto:mdubov@mirantis.com" target="_blank" class="">mdubov@mirantis.com</a></font></div><div class=""><font color="#666666" class="">Skype: msdubov</font></div></div></div></div></div></div>
</div>
__________________________________________________________________________<br class="">OpenStack Development Mailing List (not for usage questions)<br class="">Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" class="">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br class=""><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class=""></div></blockquote></div><br class=""></div><div class="">It should be possible to simply add the dependency to the list of requirements for the docs job, in test-requirements.txt. I see you’ve done that in <a href="https://review.openstack.org/#/c/120018/" class="">https://review.openstack.org/#/c/120018/</a> and it appears to be working for the docs build itself. Are the other failures on that job related to the new dependency?<div class=""><br class=""></div><div class="">Doug</div></div><div class=""><br class=""></div></body></html>