Skip to content

Commit d72385f

Browse files
Merge pull request #1116 from IntelPython/refac/docs-new-setup-skbuild
Update docs for scikit-build 25fb36f
1 parent fa83add commit d72385f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+484
-488
lines changed

dev/_sources/getting_started.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Building from source
3737
--------------------
3838

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

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

@@ -70,7 +70,7 @@ first step.
7070
7171
# Create a conda environment that hass needed dependencies installed
7272
conda create -n numba-dpex-env \
73-
dpctl dpnp numba dpcpp-llvm-spirv llvmdev pytest \
73+
scikit-build cmake dpctl dpnp numba dpcpp-llvm-spirv llvmdev pytest \
7474
-c intel -c conda-forge
7575
# Activate the environment
7676
conda activate numba-dpex-env

dev/_static/basic.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ a.headerlink {
237237
visibility: hidden;
238238
}
239239

240+
a:visited {
241+
color: #551A8B;
242+
}
243+
240244
h1:hover > a.headerlink,
241245
h2:hover > a.headerlink,
242246
h3:hover > a.headerlink,
@@ -670,6 +674,16 @@ dd {
670674
margin-left: 30px;
671675
}
672676

677+
.sig dd {
678+
margin-top: 0px;
679+
margin-bottom: 0px;
680+
}
681+
682+
.sig dl {
683+
margin-top: 0px;
684+
margin-bottom: 0px;
685+
}
686+
673687
dl > dd:last-child,
674688
dl > dd:last-child > :last-child {
675689
margin-bottom: 0;
@@ -738,6 +752,14 @@ abbr, acronym {
738752
cursor: help;
739753
}
740754

755+
.translated {
756+
background-color: rgba(207, 255, 207, 0.2)
757+
}
758+
759+
.untranslated {
760+
background-color: rgba(255, 207, 207, 0.2)
761+
}
762+
741763
/* -- code displays --------------------------------------------------------- */
742764

743765
pre {

dev/_static/documentation_options.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
var DOCUMENTATION_OPTIONS = {
2-
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
1+
const DOCUMENTATION_OPTIONS = {
32
VERSION: '',
43
LANGUAGE: 'en',
54
COLLAPSE_INDEX: false,

dev/_static/searchtools.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ const _removeChildren = (element) => {
5757
const _escapeRegExp = (string) =>
5858
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
5959

60-
const _displayItem = (item, searchTerms) => {
60+
const _displayItem = (item, searchTerms, highlightTerms) => {
6161
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
62-
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
6362
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
6463
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
6564
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
65+
const contentRoot = document.documentElement.dataset.content_root;
6666

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

@@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
7575
if (dirname.match(/\/index\/$/))
7676
dirname = dirname.substring(0, dirname.length - 6);
7777
else if (dirname === "index/") dirname = "";
78-
requestUrl = docUrlRoot + dirname;
78+
requestUrl = contentRoot + dirname;
7979
linkUrl = requestUrl;
8080
} else {
8181
// normal html builders
82-
requestUrl = docUrlRoot + docName + docFileSuffix;
82+
requestUrl = contentRoot + docName + docFileSuffix;
8383
linkUrl = docName + docLinkSuffix;
8484
}
8585
let linkEl = listItem.appendChild(document.createElement("a"));
8686
linkEl.href = linkUrl + anchor;
8787
linkEl.dataset.score = score;
8888
linkEl.innerHTML = title;
89-
if (descr)
89+
if (descr) {
9090
listItem.appendChild(document.createElement("span")).innerHTML =
9191
" (" + descr + ")";
92+
// highlight search terms in the description
93+
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
94+
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
95+
}
9296
else if (showSearchSummary)
9397
fetch(requestUrl)
9498
.then((responseData) => responseData.text())
@@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
97101
listItem.appendChild(
98102
Search.makeSearchSummary(data, searchTerms)
99103
);
104+
// highlight search terms in the summary
105+
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
106+
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
100107
});
101108
Search.output.appendChild(listItem);
102109
};
@@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
115122
const _displayNextItem = (
116123
results,
117124
resultCount,
118-
searchTerms
125+
searchTerms,
126+
highlightTerms,
119127
) => {
120128
// results left, load the summary and display it
121129
// this is intended to be dynamic (don't sub resultsCount)
122130
if (results.length) {
123-
_displayItem(results.pop(), searchTerms);
131+
_displayItem(results.pop(), searchTerms, highlightTerms);
124132
setTimeout(
125-
() => _displayNextItem(results, resultCount, searchTerms),
133+
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
126134
5
127135
);
128136
}
@@ -360,7 +368,7 @@ const Search = {
360368
// console.info("search results:", Search.lastresults);
361369

362370
// print the results
363-
_displayNextItem(results, results.length, searchTerms);
371+
_displayNextItem(results, results.length, searchTerms, highlightTerms);
364372
},
365373

366374
/**

dev/_static/sphinx_highlight.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
2929
}
3030

3131
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
32+
const rest = document.createTextNode(val.substr(pos + text.length));
3233
parent.insertBefore(
3334
span,
3435
parent.insertBefore(
35-
document.createTextNode(val.substr(pos + text.length)),
36+
rest,
3637
node.nextSibling
3738
)
3839
);
3940
node.nodeValue = val.substr(0, pos);
41+
/* There may be more occurrences of search term in this node. So call this
42+
* function recursively on the remaining fragment.
43+
*/
44+
_highlight(rest, addItems, text, className);
4045

4146
if (isInSVG) {
4247
const rect = document.createElementNS(
@@ -140,5 +145,10 @@ const SphinxHighlight = {
140145
},
141146
};
142147

143-
_ready(SphinxHighlight.highlightSearchWords);
144-
_ready(SphinxHighlight.initEscapeListener);
148+
_ready(() => {
149+
/* Do not call highlightSearchWords() when we are on the search page.
150+
* It will highlight words from the *previous* search query.
151+
*/
152+
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
153+
SphinxHighlight.initEscapeListener();
154+
});

dev/api_reference/index.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
32
<!DOCTYPE html>
43

54

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

41-
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
40+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
4241

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

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

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

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

550549
<div class="footer-item">
551550
<p class="sphinx-version">
552-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
551+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
553552
<br/>
554553
</p>
555554
</div>

dev/contribution_guide.html

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
32
<!DOCTYPE html>
43

54

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

41-
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
40+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
4241

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

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

482481
<span class="target" id="contributions"></span><section id="contribution-guide">
483-
<h1>Contribution Guide<a class="headerlink" href="#contribution-guide" title="Permalink to this heading">#</a></h1>
482+
<h1>Contribution Guide<a class="headerlink" href="#contribution-guide" title="Link to this heading">#</a></h1>
484483
<section id="classification-of-contributions">
485-
<h2>Classification of Contributions<a class="headerlink" href="#classification-of-contributions" title="Permalink to this heading">#</a></h2>
484+
<h2>Classification of Contributions<a class="headerlink" href="#classification-of-contributions" title="Link to this heading">#</a></h2>
486485
</section>
487486
<section id="development-cycle">
488-
<h2>Development Cycle<a class="headerlink" href="#development-cycle" title="Permalink to this heading">#</a></h2>
487+
<h2>Development Cycle<a class="headerlink" href="#development-cycle" title="Link to this heading">#</a></h2>
489488
</section>
490489
<section id="issues-and-pull-requests">
491-
<h2>Issues and Pull Requests<a class="headerlink" href="#issues-and-pull-requests" title="Permalink to this heading">#</a></h2>
490+
<h2>Issues and Pull Requests<a class="headerlink" href="#issues-and-pull-requests" title="Link to this heading">#</a></h2>
492491
</section>
493492
<section id="coding-guidelines">
494-
<h2>Coding Guidelines<a class="headerlink" href="#coding-guidelines" title="Permalink to this heading">#</a></h2>
493+
<h2>Coding Guidelines<a class="headerlink" href="#coding-guidelines" title="Link to this heading">#</a></h2>
495494
</section>
496495
<section id="unit-testing">
497-
<h2>Unit Testing<a class="headerlink" href="#unit-testing" title="Permalink to this heading">#</a></h2>
496+
<h2>Unit Testing<a class="headerlink" href="#unit-testing" title="Link to this heading">#</a></h2>
498497
</section>
499498
<section id="documentation">
500-
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this heading">#</a></h2>
499+
<h2>Documentation<a class="headerlink" href="#documentation" title="Link to this heading">#</a></h2>
501500
</section>
502501
<section id="tips-for-developers">
503-
<h2>Tips for Developers<a class="headerlink" href="#tips-for-developers" title="Permalink to this heading">#</a></h2>
502+
<h2>Tips for Developers<a class="headerlink" href="#tips-for-developers" title="Link to this heading">#</a></h2>
504503
</section>
505504
</section>
506505

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

594593
<div class="footer-item">
595594
<p class="sphinx-version">
596-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
595+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
597596
<br/>
598597
</p>
599598
</div>

dev/examples.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
32
<!DOCTYPE html>
43

54

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

41-
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
40+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
4241

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

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

482481
<span class="target" id="examples"></span><section id="list-of-examples">
483-
<h1>List of examples<a class="headerlink" href="#list-of-examples" title="Permalink to this heading">#</a></h1>
482+
<h1>List of examples<a class="headerlink" href="#list-of-examples" title="Link to this heading">#</a></h1>
484483
<div class="admonition-todo admonition" id="id2">
485484
<p class="admonition-title">Todo</p>
486485
<p>Provide list of examples for numba-dpex</p>
487486
</div>
488487
<section id="benchmarks">
489-
<h2>Benchmarks<a class="headerlink" href="#benchmarks" title="Permalink to this heading">#</a></h2>
488+
<h2>Benchmarks<a class="headerlink" href="#benchmarks" title="Link to this heading">#</a></h2>
490489
<div class="admonition-todo admonition" id="id3">
491490
<p class="admonition-title">Todo</p>
492491
<p>Provide instructions for dpbench</p>
493492
</div>
494493
</section>
495494
<section id="jupyter-notebooks">
496-
<h2>Jupyter* Notebooks<a class="headerlink" href="#jupyter-notebooks" title="Permalink to this heading">#</a></h2>
495+
<h2>Jupyter* Notebooks<a class="headerlink" href="#jupyter-notebooks" title="Link to this heading">#</a></h2>
497496
<div class="admonition-todo admonition" id="id4">
498497
<p class="admonition-title">Todo</p>
499498
<p>Provide instructions for Jupyter Notebook samples</p>
@@ -585,7 +584,7 @@ <h2>Jupyter* Notebooks<a class="headerlink" href="#jupyter-notebooks" title="Per
585584

586585
<div class="footer-item">
587586
<p class="sphinx-version">
588-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
587+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
589588
<br/>
590589
</p>
591590
</div>

dev/genindex.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
32
<!DOCTYPE html>
43

54

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

40-
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
39+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a746c00c" />
4140

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

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

555554
<div class="footer-item">
556555
<p class="sphinx-version">
557-
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 6.2.1.
556+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
558557
<br/>
559558
</p>
560559
</div>

0 commit comments

Comments
 (0)