Skip to content

Commit 4cd702f

Browse files
committed
WL11898: Core API v1 alignment
This worklog resolves the inconsistencies related to missing elements of the Core DevAPI on all connectors implementations. Tests were added/changed for regression.
1 parent 4c3d6ca commit 4cd702f

36 files changed

+3778
-113
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Sphinx ReadTheDocs theme.
2+
3+
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
4+
5+
"""
6+
from os import path
7+
8+
__version__ = '0.3.1'
9+
__version_full__ = __version__
10+
11+
12+
def get_html_theme_path():
13+
"""Return list of HTML theme paths."""
14+
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
15+
return cur_dir
16+
17+
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
18+
def setup(app):
19+
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
2+
3+
{% if page_source_suffix %}
4+
{% set suffix = page_source_suffix %}
5+
{% else %}
6+
{% set suffix = source_suffix %}
7+
{% endif %}
8+
9+
{% if meta is defined and meta is not none %}
10+
{% set check_meta = True %}
11+
{% else %}
12+
{% set check_meta = False %}
13+
{% endif %}
14+
15+
{% if check_meta and 'github_url' in meta %}
16+
{% set display_github = True %}
17+
{% endif %}
18+
19+
{% if check_meta and 'bitbucket_url' in meta %}
20+
{% set display_bitbucket = True %}
21+
{% endif %}
22+
23+
{% if check_meta and 'gitlab_url' in meta %}
24+
{% set display_gitlab = True %}
25+
{% endif %}
26+
27+
<div role="navigation" aria-label="breadcrumbs navigation">
28+
29+
<ul class="wy-breadcrumbs">
30+
{% block breadcrumbs %}
31+
<li><a href="{{ pathto(master_doc) }}">{{ _('Docs') }}</a> &raquo;</li>
32+
{% for doc in parents %}
33+
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
34+
{% endfor %}
35+
<li>{{ title }}</li>
36+
{% endblock %}
37+
{% block breadcrumbs_aside %}
38+
<li class="wy-breadcrumbs-aside">
39+
{% if hasdoc(pagename) %}
40+
{% if display_github %}
41+
{% if check_meta and 'github_url' in meta %}
42+
<!-- User defined GitHub URL -->
43+
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
44+
{% else %}
45+
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
46+
{% endif %}
47+
{% elif display_bitbucket %}
48+
{% if check_meta and 'bitbucket_url' in meta %}
49+
<!-- User defined Bitbucket URL -->
50+
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
51+
{% else %}
52+
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode|default("view") }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
53+
{% endif %}
54+
{% elif display_gitlab %}
55+
{% if check_meta and 'gitlab_url' in meta %}
56+
<!-- User defined GitLab URL -->
57+
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
58+
{% else %}
59+
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
60+
{% endif %}
61+
{% elif show_source and source_url_prefix %}
62+
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
63+
{% elif show_source and has_source and sourcename %}
64+
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
65+
{% endif %}
66+
{% endif %}
67+
</li>
68+
{% endblock %}
69+
</ul>
70+
71+
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
72+
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
73+
{% if next %}
74+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
75+
{% endif %}
76+
{% if prev %}
77+
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
78+
{% endif %}
79+
</div>
80+
{% endif %}
81+
<hr/>
82+
</div>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<footer>
2+
{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
3+
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
4+
{% if next %}
5+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
6+
{% endif %}
7+
{% if prev %}
8+
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
9+
{% endif %}
10+
</div>
11+
{% endif %}
12+
13+
<hr/>
14+
15+
<div role="contentinfo">
16+
<p>
17+
{%- if show_copyright %}
18+
{%- if hasdoc('copyright') %}
19+
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
20+
{%- else %}
21+
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
22+
{%- endif %}
23+
{%- endif %}
24+
25+
{%- if build_id and build_url %}
26+
{% trans build_url=build_url, build_id=build_id %}
27+
<span class="build">
28+
Build
29+
<a href="{{ build_url }}">{{ build_id }}</a>.
30+
</span>
31+
{% endtrans %}
32+
{%- elif commit %}
33+
{% trans commit=commit %}
34+
<span class="commit">
35+
Revision <code>{{ commit }}</code>.
36+
</span>
37+
{% endtrans %}
38+
{%- elif last_updated %}
39+
{% trans last_updated=last_updated|e %}<br />Last updated on {{ last_updated }}.{% endtrans %}
40+
{%- endif %}
41+
42+
</p>
43+
</div>
44+
45+
{%- if show_sphinx %}
46+
{% trans %}Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}.
47+
{%- endif %}
48+
49+
{%- block extrafooter %} {% endblock %}
50+
51+
</footer>
52+
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
{# TEMPLATE VAR SETTINGS #}
2+
{%- set url_root = pathto('', 1) %}
3+
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
4+
{%- if not embedded and docstitle %}
5+
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
6+
{%- else %}
7+
{%- set titlesuffix = "" %}
8+
{%- endif %}
9+
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
10+
11+
<!DOCTYPE html>
12+
<!--[if IE 8]><html class="no-js lt-ie9" lang="{{ lang_attr }}" > <![endif]-->
13+
<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ lang_attr }}" > <!--<![endif]-->
14+
<head>
15+
<meta charset="utf-8">
16+
{{ metatags }}
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
18+
{% block htmltitle %}
19+
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
20+
{% endblock %}
21+
22+
{# FAVICON #}
23+
{% if favicon %}
24+
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
25+
{% endif %}
26+
{# CANONICAL URL #}
27+
{% if theme_canonical_url %}
28+
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
29+
{% endif %}
30+
31+
{# CSS #}
32+
33+
{# OPENSEARCH #}
34+
{% if not embedded %}
35+
{% if use_opensearch %}
36+
<link rel="search" type="application/opensearchdescription+xml"
37+
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
38+
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
39+
{% endif %}
40+
41+
{% endif %}
42+
43+
{# RTD hosts this file, so just load on non RTD builds #}
44+
{%- if not READTHEDOCS %}
45+
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
46+
{%- endif %}
47+
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
48+
{%- for css in css_files %}
49+
{%- if css|attr("rel") %}
50+
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
51+
{%- else %}
52+
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
53+
{%- endif %}
54+
{%- endfor %}
55+
{%- for cssfile in extra_css_files %}
56+
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
57+
{%- endfor %}
58+
59+
{%- block linktags %}
60+
{%- if hasdoc('about') %}
61+
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
62+
{%- endif %}
63+
{%- if hasdoc('genindex') %}
64+
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
65+
{%- endif %}
66+
{%- if hasdoc('search') %}
67+
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
68+
{%- endif %}
69+
{%- if hasdoc('copyright') %}
70+
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
71+
{%- endif %}
72+
{%- if next %}
73+
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
74+
{%- endif %}
75+
{%- if prev %}
76+
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
77+
{%- endif %}
78+
{%- endblock %}
79+
{%- block extrahead %} {% endblock %}
80+
81+
{# Keep modernizr in head - http://modernizr.com/docs/#installing #}
82+
<script src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
83+
84+
</head>
85+
86+
<body class="wy-body-for-nav">
87+
88+
{% block extrabody %} {% endblock %}
89+
<div class="wy-grid-for-nav">
90+
91+
{# SIDE NAV, TOGGLES ON MOBILE #}
92+
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
93+
<div class="wy-side-scroll">
94+
<div class="wy-side-nav-search">
95+
{% block sidebartitle %}
96+
97+
{% if logo and theme_logo_only %}
98+
<a href="{{ pathto(master_doc) }}">
99+
{% else %}
100+
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
101+
{% endif %}
102+
103+
{% if logo %}
104+
{# Not strictly valid HTML, but it's the only way to display/scale
105+
it properly, without weird scripting or heaps of work
106+
#}
107+
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="Logo"/>
108+
{% endif %}
109+
</a>
110+
111+
{% if theme_display_version %}
112+
{%- set nav_version = release %}
113+
{% if READTHEDOCS and current_version %}
114+
{%- set nav_version = current_version %}
115+
{% endif %}
116+
{% if nav_version %}
117+
<div class="version">
118+
{{ nav_version }}
119+
</div>
120+
{% endif %}
121+
{% endif %}
122+
123+
{% include "searchbox.html" %}
124+
125+
{% endblock %}
126+
</div>
127+
128+
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
129+
{% block menu %}
130+
{#
131+
The singlehtml builder doesn't handle this toctree call when the
132+
toctree is empty. Skip building this for now.
133+
#}
134+
{% if 'singlehtml' not in builder %}
135+
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
136+
collapse=theme_collapse_navigation|tobool,
137+
includehidden=theme_includehidden|tobool,
138+
titles_only=theme_titles_only|tobool) %}
139+
{% endif %}
140+
{% if global_toc %}
141+
{{ global_toc }}
142+
{% else %}
143+
<!-- Local TOC -->
144+
<div class="local-toc">{{ toc }}</div>
145+
{% endif %}
146+
{% endblock %}
147+
</div>
148+
</div>
149+
</nav>
150+
151+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
152+
153+
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
154+
<nav class="wy-nav-top" aria-label="top navigation">
155+
{% block mobile_nav %}
156+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
157+
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
158+
{% endblock %}
159+
</nav>
160+
161+
162+
<div class="wy-nav-content">
163+
{%- block content %}
164+
{% if theme_style_external_links|tobool %}
165+
<div class="rst-content style-external-links">
166+
{% else %}
167+
<div class="rst-content">
168+
{% endif %}
169+
{% include "breadcrumbs.html" %}
170+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
171+
{%- block document %}
172+
<div itemprop="articleBody">
173+
{% block body %}{% endblock %}
174+
</div>
175+
{% if self.comments()|trim %}
176+
<div class="articleComments">
177+
{% block comments %}{% endblock %}
178+
</div>
179+
{% endif%}
180+
</div>
181+
{%- endblock %}
182+
{% include "footer.html" %}
183+
</div>
184+
{%- endblock %}
185+
</div>
186+
187+
</section>
188+
189+
</div>
190+
{% include "versions.html" %}
191+
192+
{% if not embedded %}
193+
194+
<script type="text/javascript">
195+
var DOCUMENTATION_OPTIONS = {
196+
URL_ROOT:'{{ url_root }}',
197+
VERSION:'{{ release|e }}',
198+
LANGUAGE:'{{ language }}',
199+
COLLAPSE_INDEX:false,
200+
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
201+
HAS_SOURCE: {{ has_source|lower }},
202+
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
203+
};
204+
</script>
205+
{%- for scriptfile in script_files %}
206+
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
207+
{%- endfor %}
208+
209+
{% endif %}
210+
211+
{# RTD hosts this file, so just load on non RTD builds #}
212+
{% if not READTHEDOCS %}
213+
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
214+
{% endif %}
215+
216+
<script type="text/javascript">
217+
jQuery(function () {
218+
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
219+
});
220+
</script>
221+
222+
{%- block footer %} {% endblock %}
223+
224+
</body>
225+
</html>

0 commit comments

Comments
 (0)