DOCS: Fix js and add ipython (#9995)
* js and ipython * add to suppress warnings * fixes * fixes * fixes * fixes
This commit is contained in:
parent
ff8c217e03
commit
172cbe7340
@ -51,7 +51,6 @@ set(ENABLE_OPENVINO_NOTEBOOKS OFF CACHE BOOL "Build with openvino notebooks")
|
||||
set(OMZ_DOCS_DIR "" CACHE PATH "Path to open_model_zoo documentation dir.")
|
||||
set(WORKBENCH_DOCS_DIR "" CACHE PATH "Path to workbench documentation dir.")
|
||||
set(OVMS_DOCS_DIR "" CACHE PATH "Path to model server documentation dir.")
|
||||
set(GST_DOCS_DIR "" CACHE PATH "Path to gst-video-analytics documentation dir.")
|
||||
set(GRAPH_CSV_DIR "" CACHE PATH "Path to the folder containing csv data for rendering graphs.")
|
||||
|
||||
function(build_docs)
|
||||
@ -89,6 +88,8 @@ function(build_docs)
|
||||
|
||||
# Sphinx folders, doxyrest templates and config
|
||||
set(SPHINX_CONF_IN "${DOCS_SOURCE_DIR}/conf.py")
|
||||
set(SPHINX_TEMPLATES_IN "${DOCS_SOURCE_DIR}/_templates")
|
||||
set(SPHINX_TEMPLATES_OUT "${RST_OUTPUT}/_templates")
|
||||
set(SPHINX_CONF_OUT "${RST_OUTPUT}/conf.py")
|
||||
set(SPHINX_STATIC_IN "${DOCS_SOURCE_DIR}/_static")
|
||||
set(SPHINX_STATIC_OUT "${RST_OUTPUT}/_static")
|
||||
@ -160,14 +161,6 @@ function(build_docs)
|
||||
--output_dir=${DOCS_BUILD_DIR}/ovms)
|
||||
endif()
|
||||
|
||||
# gst doc files
|
||||
if(EXISTS "${GST_DOCS_DIR}")
|
||||
get_filename_component(GST_DOCS_DIR "${GST_DOCS_DIR}" ABSOLUTE)
|
||||
list(APPEND commands COMMAND ${PYTHON_EXECUTABLE} ${DOXY_MD_FILTER}
|
||||
--input_dir=${GST_DOCS_DIR}
|
||||
--output_dir=${DOCS_BUILD_DIR}/gst)
|
||||
endif()
|
||||
|
||||
add_custom_target(preprocess_docs
|
||||
COMMENT "Preprocess documentation"
|
||||
VERBATIM)
|
||||
@ -198,6 +191,7 @@ function(build_docs)
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${DOXYGEN_MAPPING_SCRIPT} ${XML_OUTPUT} ${DOCS_BUILD_DIR} ${OpenVINO_SOURCE_DIR}/../
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${SPHINX_INDEX_IN} ${SPHINX_INDEX_OUT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${API_DOCS_IN} ${API_DOCS_OUT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${SPHINX_TEMPLATES_IN} ${SPHINX_TEMPLATES_OUT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DOXYREST_IN} ${DOXYREST_OUT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DOXYREST_SPHINX_IN} ${DOXYREST_SPHINX_OUT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${SPHINX_STATIC_IN} ${SPHINX_STATIC_OUT}
|
||||
|
58
docs/_static/js/custom.js
vendored
58
docs/_static/js/custom.js
vendored
@ -2,6 +2,16 @@ var sw_anchors = {};
|
||||
var urlSearchParams = new URLSearchParams(window.location.search);
|
||||
var sw_timer;
|
||||
|
||||
/* Doc Versions */
|
||||
var versions;
|
||||
try {
|
||||
versions = JSON.parse(data);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
versions = [];
|
||||
}
|
||||
|
||||
/* Adobe Analytics */
|
||||
var wapLocalCode = 'us-en';
|
||||
var wapSection = 'openvinotoolkit';
|
||||
@ -15,7 +25,7 @@ var wapSection = 'openvinotoolkit';
|
||||
s.appendChild(po);
|
||||
})();
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
createVersions();
|
||||
init_col_sections();
|
||||
init_switchers();
|
||||
@ -27,6 +37,13 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Determine where we'd go if clicking on a version selector option
|
||||
function getPageUrlWithVersion(version) {
|
||||
var currentURL = window.location.href;
|
||||
var newURL = currentURL.replace(getCurrentVersion(), version);
|
||||
return encodeURI(newURL);
|
||||
}
|
||||
|
||||
function getCurrentVersion() {
|
||||
var protocol = window.location.protocol + "//";
|
||||
var index = window.location.href.indexOf(protocol);
|
||||
@ -46,22 +63,13 @@ function getCurrentVersion() {
|
||||
|
||||
|
||||
function createVersions() {
|
||||
var versions;
|
||||
var currentVersion = getCurrentVersion()
|
||||
|
||||
try {
|
||||
versions = JSON.parse(data);
|
||||
}
|
||||
catch(err) {
|
||||
console.log(err);
|
||||
versions = [];
|
||||
}
|
||||
var currentVersion = getCurrentVersion();
|
||||
var versionBtn = $('#version-selector');
|
||||
versionBtn.text(currentVersion);
|
||||
versionBtn.width((currentVersion.length * 10) + 'px');
|
||||
var versionsContainer = $('[aria-labelledby="version-selector"]');
|
||||
versions.forEach(item => {
|
||||
var link = $('<a class="dropdown-item" href="#">' + item.version + '</a>');
|
||||
var link = $('<a class="dropdown-item" href="' + getPageUrlWithVersion(item.version) + '">' + item.version + '</a>');
|
||||
if (item.version === currentVersion) {
|
||||
link.addClass('font-weight-bold');
|
||||
}
|
||||
@ -75,22 +83,22 @@ function createVersions() {
|
||||
|
||||
function addTableSort() {
|
||||
var tables = $('table.table');
|
||||
tables.each(function() {
|
||||
tables.each(function () {
|
||||
var table = $(this);
|
||||
var headings = table.find('th');
|
||||
headings.each(function() {
|
||||
headings.each(function () {
|
||||
var th = $(this);
|
||||
var index = th.index();
|
||||
var sortBtn = $('<span class="sort-btn"></span>');
|
||||
th.addClass('sort-header');
|
||||
th.click(function(){
|
||||
th.click(function () {
|
||||
var counter = 0;
|
||||
sortBtn.addClass('sort-active');
|
||||
sortBy = sortBtn.data('sortby');
|
||||
var trs = table.find('tbody tr');
|
||||
sortBtn.toggleClass('ascending');
|
||||
trs.sort(function(item1, item2) {
|
||||
|
||||
trs.sort(function (item1, item2) {
|
||||
|
||||
if (sortBtn.hasClass('ascending')) {
|
||||
var text1 = $(item1).find('td').eq(index).text();
|
||||
var text2 = $(item2).find('td').eq(index).text();
|
||||
@ -116,7 +124,7 @@ function addTableSort() {
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}).map(function() {
|
||||
}).map(function () {
|
||||
var row = $(this);
|
||||
if (counter % 2 === 0) {
|
||||
row.removeClass('row-odd');
|
||||
@ -130,7 +138,7 @@ function addTableSort() {
|
||||
table.find('tbody').append(row);
|
||||
});
|
||||
|
||||
headings.each(function() {
|
||||
headings.each(function () {
|
||||
if ($(this).index() !== index) {
|
||||
$(this).find('.sort-btn').removeClass('ascending');
|
||||
$(this).find('.sort-btn').removeClass('sort-active');
|
||||
@ -144,9 +152,9 @@ function addTableSort() {
|
||||
|
||||
function initViewerJS() {
|
||||
try {
|
||||
var images =$('main img[src*="_images"]');
|
||||
images.each(function() {
|
||||
try{
|
||||
var images = $('main img[src*="_images"]');
|
||||
images.each(function () {
|
||||
try {
|
||||
new Viewer($(this).get(0));
|
||||
}
|
||||
catch (err) {
|
||||
@ -154,14 +162,14 @@ function initViewerJS() {
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(err) {
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
function init_col_sections() {
|
||||
var collapsible_sections = $('div.collapsible-section');
|
||||
collapsible_sections.each(function() {
|
||||
collapsible_sections.each(function () {
|
||||
try {
|
||||
var title = $(this).data('title') || 'Click to expand';
|
||||
var summary = $('<summary>' + title + '</summary>');
|
||||
@ -170,7 +178,7 @@ function init_col_sections() {
|
||||
$(this).wrap(details);
|
||||
summary.insertBefore($(this));
|
||||
}
|
||||
catch(err) {
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
|
2
docs/_templates/layout.html
vendored
2
docs/_templates/layout.html
vendored
@ -1,4 +1,4 @@
|
||||
{%- extends "openvino_sphinx_theme/layout.html" %}
|
||||
{%- extends "openvino_sphinx_theme/templates/layout.html" %}
|
||||
|
||||
{% block css %}
|
||||
{{ super() }}
|
||||
|
@ -59,3 +59,7 @@ openvino_docs_ie_dg_lpt_updatesharedprecisionpreserved.rst
|
||||
openvino_docs_ie_dg_lpt_variadicsplittransformation.rst
|
||||
openvino_docs_ie_plugin_dg_lp_representation.rst
|
||||
openvino_docs_ie_dg_lpt.rst
|
||||
omz_models_model_age_gender_recognition_retail_0013.rst
|
||||
omz_models_model_emotions_recognition_retail_0003.rst
|
||||
ngraph_transformation.rst
|
||||
notebooks/notebook_utils-with-output.rst
|
||||
|
@ -72,7 +72,7 @@ There are important performance caveats though: for example, the tasks that run
|
||||
|
||||
Also, if the inference is performed on the graphics processing unit (GPU), it can take little gain to do the encoding, for instance, of the resulting video, on the same GPU in parallel, because the device is already busy.
|
||||
|
||||
Refer to the [Object Detection SSD Demo](@ref omz_demos_object_detection_demo_ssd_async_README) (latency-oriented Async API showcase) and [Benchmark App Sample](../../samples/cpp/benchmark_app/README.md) (which has both latency and throughput-oriented modes) for complete examples of the Async API in action.
|
||||
Refer to the [Object Detection С++ Demo](@ref omz_demos_object_detection_demo_cpp), [Object Detection Python Demo](@ref omz_demos_object_detection_demo_python)(latency-oriented Async API showcase) and [Benchmark App Sample](../../samples/cpp/benchmark_app/README.md) (which has both latency and throughput-oriented modes) for complete examples of the Async API in action.
|
||||
|
||||
### Request-Based API and “GetBlob” Idiom <a name="new-request-based-api"></a>
|
||||
|
||||
|
@ -12,6 +12,7 @@ idna==3.3
|
||||
imagesize==1.3.0
|
||||
importlib-metadata==4.10.1
|
||||
iniconfig==1.1.1
|
||||
ipython==8.0.1
|
||||
Jinja2==3.0.3
|
||||
lxml==4.7.1
|
||||
MarkupSafe==2.0.1
|
||||
|
@ -11,7 +11,7 @@ def copy_images(input_dir: Path, output_dir: Path):
|
||||
Copy images from doxygen xml folder to sphinx folder
|
||||
"""
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
extensions = ('*.png', '*.jpg', '*.svg', '*.gif', '*.PNG', '*.JPG', '*.SVG', '*.GIF')
|
||||
extensions = ('*.png', '*.jpg', '*.jpeg', '*.svg', '*.gif', '*.PNG', '*.JPG', '*.JPEG', '*.SVG', '*.GIF')
|
||||
for extension in extensions:
|
||||
for file in input_dir.glob(extension):
|
||||
shutil.copy(file, output_dir)
|
||||
|
@ -10,8 +10,8 @@ import logging
|
||||
|
||||
INLINE_LINKS_PATTERN = r'!?\[.*?\]\(([\w\/\-\.]+\.md)\)'
|
||||
REFERENCE_LINKS_PATTERN = r'\[.+\]\:\s*?([\w\/\-\.]+\.md)'
|
||||
INLINE_IMAGES_PATTERN = r'!?\[.*?\]\(([\w\/\-\.]+\.(?:png|jpg|gif|svg))\)'
|
||||
REFERENCE_IMAGES_PATTERN = r'\[.+\]\:\s*?([\w\/\-\.]+\.(?:png|jpg|gif|svg))'
|
||||
INLINE_IMAGES_PATTERN = r'!?\[.*?\]\(([\w\/\-\.]+\.(?:png|jpg|jpeg|gif|svg))\)'
|
||||
REFERENCE_IMAGES_PATTERN = r'\[.+\]\:\s*?([\w\/\-\.]+\.(?:png|jpg|jpeg|gif|svg))'
|
||||
LABEL_PATTERN = r'\{\#(.+)\}'
|
||||
|
||||
|
||||
|
@ -87,3 +87,8 @@ no module named openvino
|
||||
title level inconsistent
|
||||
create a pipeline
|
||||
run pot cli
|
||||
found unknown command
|
||||
unable to resolve reference to \'http
|
||||
unexpected html tag
|
||||
field list ends without a blank line
|
||||
bullet list ends without a blank line
|
||||
|
Loading…
Reference in New Issue
Block a user