Skip to content

Commit

Permalink
Merge pull request #1116 from IntelPython/refac/docs-new-setup-skbuild
Browse files Browse the repository at this point in the history
Update docs for scikit-build 25fb36f
  • Loading branch information
github-actions[bot] committed Aug 22, 2023
1 parent fa83add commit d72385f
Show file tree
Hide file tree
Showing 49 changed files with 484 additions and 488 deletions.
4 changes: 2 additions & 2 deletions dev/_sources/getting_started.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Building from source
--------------------

``numba-dpex`` can be built from source using either ``conda-build`` or
``setuptools``.
``setuptools`` (with ``scikit-build`` backend).

Steps to build using ``conda-build``:

Expand Down Expand Up @@ -70,7 +70,7 @@ first step.
# Create a conda environment that hass needed dependencies installed
conda create -n numba-dpex-env \
dpctl dpnp numba dpcpp-llvm-spirv llvmdev pytest \
scikit-build cmake dpctl dpnp numba dpcpp-llvm-spirv llvmdev pytest \
-c intel -c conda-forge
# Activate the environment
conda activate numba-dpex-env
Expand Down
22 changes: 22 additions & 0 deletions dev/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down Expand Up @@ -670,6 +674,16 @@ dd {
margin-left: 30px;
}

.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}

.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}

dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -738,6 +752,14 @@ abbr, acronym {
cursor: help;
}

.translated {
background-color: rgba(207, 255, 207, 0.2)
}

.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}

/* -- code displays --------------------------------------------------------- */

pre {
Expand Down
3 changes: 1 addition & 2 deletions dev/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
Expand Down
26 changes: 17 additions & 9 deletions dev/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string

const _displayItem = (item, searchTerms) => {
const _displayItem = (item, searchTerms, highlightTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;

const [docName, title, anchor, descr, score, _filename] = item;

Expand All @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
requestUrl = contentRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
requestUrl = contentRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
if (descr) {
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
// highlight search terms in the description
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
Expand All @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
});
Search.output.appendChild(listItem);
};
Expand All @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
searchTerms
searchTerms,
highlightTerms,
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms);
_displayItem(results.pop(), searchTerms, highlightTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms),
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
5
);
}
Expand Down Expand Up @@ -360,7 +368,7 @@ const Search = {
// console.info("search results:", Search.lastresults);

// print the results
_displayNextItem(results, results.length, searchTerms);
_displayNextItem(results, results.length, searchTerms, highlightTerms);
},

/**
Expand Down
16 changes: 13 additions & 3 deletions dev/_static/sphinx_highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
}

span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
rest,
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);

if (isInSVG) {
const rect = document.createElementNS(
Expand Down Expand Up @@ -140,5 +145,10 @@ const SphinxHighlight = {
},
};

_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});
13 changes: 6 additions & 7 deletions dev/api_reference/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


<!DOCTYPE html>


Expand Down Expand Up @@ -38,15 +37,15 @@
<link rel="preload" as="font" type="font/woff2" crossorigin href="../_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />

<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />

<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=e353d410970836974a52" />
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=e353d410970836974a52" />

<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/documentation_options.js?v=8a448e45"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'api_reference/index';</script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand Down Expand Up @@ -476,7 +475,7 @@
<article class="bd-article" role="main">

<span class="target" id="index"></span><section id="api-reference">
<h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this heading">#</a></h1>
<h1>API Reference<a class="headerlink" href="#api-reference" title="Link to this heading">#</a></h1>
<p>Coming soon</p>
</section>

Expand Down Expand Up @@ -549,7 +548,7 @@ <h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to

<div class="footer-item">
<p class="sphinx-version">
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
<br/>
</p>
</div>
Expand Down
27 changes: 13 additions & 14 deletions dev/contribution_guide.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


<!DOCTYPE html>


Expand Down Expand Up @@ -38,15 +37,15 @@
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />

<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />

<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=e353d410970836974a52" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=e353d410970836974a52" />

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/documentation_options.js?v=8a448e45"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'contribution_guide';</script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -480,27 +479,27 @@
<article class="bd-article" role="main">

<span class="target" id="contributions"></span><section id="contribution-guide">
<h1>Contribution Guide<a class="headerlink" href="#contribution-guide" title="Permalink to this heading">#</a></h1>
<h1>Contribution Guide<a class="headerlink" href="#contribution-guide" title="Link to this heading">#</a></h1>
<section id="classification-of-contributions">
<h2>Classification of Contributions<a class="headerlink" href="#classification-of-contributions" title="Permalink to this heading">#</a></h2>
<h2>Classification of Contributions<a class="headerlink" href="#classification-of-contributions" title="Link to this heading">#</a></h2>
</section>
<section id="development-cycle">
<h2>Development Cycle<a class="headerlink" href="#development-cycle" title="Permalink to this heading">#</a></h2>
<h2>Development Cycle<a class="headerlink" href="#development-cycle" title="Link to this heading">#</a></h2>
</section>
<section id="issues-and-pull-requests">
<h2>Issues and Pull Requests<a class="headerlink" href="#issues-and-pull-requests" title="Permalink to this heading">#</a></h2>
<h2>Issues and Pull Requests<a class="headerlink" href="#issues-and-pull-requests" title="Link to this heading">#</a></h2>
</section>
<section id="coding-guidelines">
<h2>Coding Guidelines<a class="headerlink" href="#coding-guidelines" title="Permalink to this heading">#</a></h2>
<h2>Coding Guidelines<a class="headerlink" href="#coding-guidelines" title="Link to this heading">#</a></h2>
</section>
<section id="unit-testing">
<h2>Unit Testing<a class="headerlink" href="#unit-testing" title="Permalink to this heading">#</a></h2>
<h2>Unit Testing<a class="headerlink" href="#unit-testing" title="Link to this heading">#</a></h2>
</section>
<section id="documentation">
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this heading">#</a></h2>
<h2>Documentation<a class="headerlink" href="#documentation" title="Link to this heading">#</a></h2>
</section>
<section id="tips-for-developers">
<h2>Tips for Developers<a class="headerlink" href="#tips-for-developers" title="Permalink to this heading">#</a></h2>
<h2>Tips for Developers<a class="headerlink" href="#tips-for-developers" title="Link to this heading">#</a></h2>
</section>
</section>

Expand Down Expand Up @@ -593,7 +592,7 @@ <h2>Tips for Developers<a class="headerlink" href="#tips-for-developers" title="

<div class="footer-item">
<p class="sphinx-version">
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
<br/>
</p>
</div>
Expand Down
17 changes: 8 additions & 9 deletions dev/examples.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


<!DOCTYPE html>


Expand Down Expand Up @@ -38,15 +37,15 @@
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />

<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />

<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=e353d410970836974a52" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=e353d410970836974a52" />

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/documentation_options.js?v=8a448e45"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'examples';</script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -480,20 +479,20 @@
<article class="bd-article" role="main">

<span class="target" id="examples"></span><section id="list-of-examples">
<h1>List of examples<a class="headerlink" href="#list-of-examples" title="Permalink to this heading">#</a></h1>
<h1>List of examples<a class="headerlink" href="#list-of-examples" title="Link to this heading">#</a></h1>
<div class="admonition-todo admonition" id="id2">
<p class="admonition-title">Todo</p>
<p>Provide list of examples for numba-dpex</p>
</div>
<section id="benchmarks">
<h2>Benchmarks<a class="headerlink" href="#benchmarks" title="Permalink to this heading">#</a></h2>
<h2>Benchmarks<a class="headerlink" href="#benchmarks" title="Link to this heading">#</a></h2>
<div class="admonition-todo admonition" id="id3">
<p class="admonition-title">Todo</p>
<p>Provide instructions for dpbench</p>
</div>
</section>
<section id="jupyter-notebooks">
<h2>Jupyter* Notebooks<a class="headerlink" href="#jupyter-notebooks" title="Permalink to this heading">#</a></h2>
<h2>Jupyter* Notebooks<a class="headerlink" href="#jupyter-notebooks" title="Link to this heading">#</a></h2>
<div class="admonition-todo admonition" id="id4">
<p class="admonition-title">Todo</p>
<p>Provide instructions for Jupyter Notebook samples</p>
Expand Down Expand Up @@ -585,7 +584,7 @@ <h2>Jupyter* Notebooks<a class="headerlink" href="#jupyter-notebooks" title="Per

<div class="footer-item">
<p class="sphinx-version">
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
<br/>
</p>
</div>
Expand Down
11 changes: 5 additions & 6 deletions dev/genindex.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


<!DOCTYPE html>


Expand Down Expand Up @@ -37,15 +36,15 @@
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />

<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />

<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=e353d410970836974a52" />
<link rel="preload" as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=e353d410970836974a52" />

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/documentation_options.js?v=8a448e45"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'genindex';</script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -554,7 +553,7 @@ <h2 id="N">N</h2>

<div class="footer-item">
<p class="sphinx-version">
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
<br/>
</p>
</div>
Expand Down
Loading

0 comments on commit d72385f

Please sign in to comment.