提交 6cc53c22 authored 作者: Simon Lefrancois's avatar Simon Lefrancois 提交者: GitHub

Merge pull request #5596 from slefrancois/doc_v_fix

Fix doc version switch and unverbose PR GPU tests
......@@ -77,4 +77,4 @@ THEANO_GPUARRAY_TESTS="theano/gpuarray/tests \
theano/sandbox/tests/test_rng_mrg.py:test_GPUA_full_fill \
theano/scan_module/tests/test_scan.py:T_Scan_Gpuarray"
FLAGS="init_gpu_device=$DEVICE,gpuarray.preallocate=1000,mode=FAST_RUN,on_opt_error=raise,on_shape_error=raise,cmodule.age_thresh_use=604800"
THEANO_FLAGS=${FLAGS} time nosetests -v --with-xunit --xunit-file=theanogpuarray_tests.xml ${THEANO_GPUARRAY_TESTS}
THEANO_FLAGS=${FLAGS} time nosetests --with-xunit --xunit-file=theanogpuarray_tests.xml ${THEANO_GPUARRAY_TESTS}
......@@ -20,13 +20,13 @@
// Get current version
var current_version = url.match(version_regex)[0]
current_version = current_version.substring(1, current_version.length - 1)
// Add current version in case versions.json is unavailable
if (current_version != "theano" && current_version != "html") {
ver = current_version.replace("theano_versions/", "")
versions_dir[ver] = current_version
}
function build_vswitch() {
// Build HTML string for version selector, based on ReadTheDocs theme's versions.html
......@@ -38,33 +38,33 @@
vswitch.push('<span class="rst-current-version" data-toggle="rst-current-version">');
vswitch.push('<span class="fa fa-book"></span>');
vswitch.push('v: ', vlabel, ' ');
vswitch.push('<span class="fa fa-caret-down"></span>');
vswitch.push('<span class="fa fa-caret-down"></span>');
vswitch.push('</span>');
vswitch.push('<div class="rst-other-versions">');
vswitch.push('<dl>');
vswitch.push('<div class="rst-other-versions">');
vswitch.push('<dl>');
vswitch.push('<dt>Versions</dt>');
for (var version in versions_dir) {
var new_url = url.replace(url.match(version_regex)[0], '/' + versions_dir[version] + '/');
vswitch.push('<dd><a href=\"', new_url, '\">', version, '</a></dd>');
vswitch.push('<dd><a href=\"', new_url, '\">', version, '</a></dd>');
}
vswitch.push('</dl>');
vswitch.push('<dl>');
vswitch.push('<dl>');
vswitch.push('<dt>Downloads</dt>');
var pdf_url = root_url + current_version + "/theano.pdf"
vswitch.push('<dd><a href=\"', pdf_url, '\">', 'PDF', '</a></dd>');
vswitch.push('</dl>');
vswitch.push('<dl>');
vswitch.push('</dl>');
vswitch.push('<dl>');
vswitch.push('<dt>On GitHub</dt>');
var git_master = "https://github.com/Theano/Theano"
vswitch.push('<dd><a href=\"', git_master + '\">', 'Fork me', '</a></dd>');
vswitch.push('</dl>');
vswitch.push('</dl>');
vswitch.push('</div>');
vswitch.push('</div>');
vswitch.push('</div>');
vswitch.push('</div>');
return vswitch.join('');
}
......@@ -75,10 +75,13 @@
if (vlabel == 'theano') {
vlabel = 'release';
}
else if (vlabel != "dev") {
vlabel = '';
}
var vswitch = ['<div class="rst-versions-up" data-toggle="rst-versions" role="note" aria-label="versions" align=center>'];
vswitch.push('<span class="rst-current-version" data-toggle="rst-current-version">');
vswitch.push(vlabel);
vswitch.push('<span class="fa fa-caret-down"></span>');
vswitch.push(' <span class="fa fa-caret-down"></span>');
vswitch.push('</span>');
vswitch.push('</div>');
return vswitch.join('');
......@@ -99,6 +102,6 @@
$('.version_switcher_placeholder').html(build_vswitch());
$('.version_switcher_placeholder_up').html(build_vswitch_up());
});
}
}
});
})();
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论