Skip to content

Commit

Permalink
update published docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Aug 3, 2022
1 parent 70fda83 commit 5f8fa2a
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 56 deletions.
31 changes: 1 addition & 30 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,6 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}

/* Docutils 0.17 and older (footnotes & citations) */
dl.footnote > dt,
dl.citation > dt {
float: left;
Expand All @@ -627,33 +625,6 @@ dl.citation > dd:after {
clear: both;
}

/* Docutils 0.18+ (footnotes & citations) */
aside.footnote > span,
div.citation > span {
float: left;
}
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}

/* Footnotes & citations ends */

dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
Expand All @@ -665,11 +636,11 @@ dl.field-list > dt {
padding-left: 0.5em;
padding-right: 5px;
}

dl.field-list > dt:after {
content: ":";
}


dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ var DOCUMENTATION_OPTIONS = {
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: false,
ENABLE_SEARCH_SHORTCUTS: true,
};
17 changes: 8 additions & 9 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const _displayItem = (item, highlightTerms, searchTerms) => {
linkEl.href = linkUrl + "?" + params.toString() + anchor;
linkEl.innerHTML = title;
if (descr)
listItem.appendChild(document.createElement("span")).innerText =
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
else if (showSearchSummary)
fetch(requestUrl)
Expand Down Expand Up @@ -155,10 +155,8 @@ const Search = {
_pulse_status: -1,

htmlToText: (htmlString) => {
const htmlElement = document
.createRange()
.createContextualFragment(htmlString);
_removeChildren(htmlElement.querySelectorAll(".headerlink"));
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
const docContent = htmlElement.querySelector('[role="main"]');
if (docContent !== undefined) return docContent.textContent;
console.warn(
Expand Down Expand Up @@ -504,21 +502,22 @@ const Search = {
* latter for highlighting it.
*/
makeSearchSummary: (htmlText, keywords, highlightWords) => {
const text = Search.htmlToText(htmlText).toLowerCase();
const text = Search.htmlToText(htmlText);
if (text === "") return null;

const textLower = text.toLowerCase();
const actualStartPosition = [...keywords]
.map((k) => text.indexOf(k.toLowerCase()))
.map((k) => textLower.indexOf(k.toLowerCase()))
.filter((i) => i > -1)
.slice(-1)[0];
const startWithContext = Math.max(actualStartPosition - 120, 0);

const top = startWithContext === 0 ? "" : "...";
const tail = startWithContext + 240 < text.length ? "..." : "";

let summary = document.createElement("div");
let summary = document.createElement("p");
summary.classList.add("context");
summary.innerText = top + text.substr(startWithContext, 240).trim() + tail;
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;

highlightWords.forEach((highlightWord) =>
_highlightText(summary, highlightWord, "highlighted")
Expand Down
25 changes: 25 additions & 0 deletions docs/api/adios_db.models.common.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">adios_db.models.common.measurement.</span></span><span class="sig-name descname"><span class="pre">AnyUnit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#adios_db.models.common.measurement.AnyUnit" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MeasurementBase</span></code></p>
<p>This is a type for data that could be any unit_type</p>
<dl class="py method">
<dt class="sig sig-object py" id="adios_db.models.common.measurement.AnyUnit.validate">
<span class="sig-name descname"><span class="pre">validate</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#adios_db.models.common.measurement.AnyUnit.validate" title="Permalink to this definition"></a></dt>
<dd><p>a kludge – this should probably create the correct Measurement
when created instead</p>
</dd></dl>

</dd></dl>

<dl class="py class">
Expand Down Expand Up @@ -408,6 +415,15 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<span class="sig-name descname"><span class="pre">unit_type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'needleadhesion'</span></em><a class="headerlink" href="#adios_db.models.common.measurement.NeedleAdhesion.unit_type" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="adios_db.models.common.measurement.NeedleAdhesion.validate">
<span class="sig-name descname"><span class="pre">validate</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#adios_db.models.common.measurement.NeedleAdhesion.validate" title="Permalink to this definition"></a></dt>
<dd><p>Function to validate a dataclass with fields that have validate
methods. The validate methods are expected to return a list of
validation messages.</p>
<p>The top-level validator extends the existing list</p>
</dd></dl>

</dd></dl>

<dl class="py class">
Expand Down Expand Up @@ -503,6 +519,15 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<span class="sig-name descname"><span class="pre">unit_type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'unitless'</span></em><a class="headerlink" href="#adios_db.models.common.measurement.Unitless.unit_type" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="adios_db.models.common.measurement.Unitless.validate">
<span class="sig-name descname"><span class="pre">validate</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#adios_db.models.common.measurement.Unitless.validate" title="Permalink to this definition"></a></dt>
<dd><p>Function to validate a dataclass with fields that have validate
methods. The validate methods are expected to return a list of
validation messages.</p>
<p>The top-level validator extends the existing list</p>
</dd></dl>

</dd></dl>

<dl class="py class">
Expand Down
Loading

0 comments on commit 5f8fa2a

Please sign in to comment.