Skip to content

Commit

Permalink
deploy: 6781777
Browse files Browse the repository at this point in the history
  • Loading branch information
machow committed Dec 11, 2023
1 parent 9baeecb commit 5b53bb6
Show file tree
Hide file tree
Showing 15 changed files with 619 additions and 1,083 deletions.
194 changes: 77 additions & 117 deletions api/MdRenderer.render.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,69 +20,6 @@
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>


Expand Down Expand Up @@ -471,11 +408,13 @@ <h1 class="quarto-secondary-nav-title"></h1>
<h2 id="toc-title">On this page</h2>

<ul>
<li><a href="#quartodoc.MdRenderer.render" id="toc-quartodoc.MdRenderer.render" class="nav-link active" data-scroll-target="#quartodoc.MdRenderer.render">MdRenderer.render</a>
<ul class="collapse">
<li><a href="#parameters" id="toc-parameters" class="nav-link" data-scroll-target="#parameters">Parameters</a></li>
<li><a href="#examples" id="toc-examples" class="nav-link" data-scroll-target="#examples">Examples</a></li>
</ul></li>
<li><a href="#quartodoc.MdRenderer.render" id="toc-quartodoc.MdRenderer.render" class="nav-link active" data-scroll-target="#quartodoc.MdRenderer.render">MdRenderer.render</a></li>
<li><a href="#text--" id="toc-text--" class="nav-link" data-scroll-target="#text--">text —-</a></li>
<li><a href="#note-this-can-be-a-number-of-things.-for-example-opening-docstring-text" id="toc-note-this-can-be-a-number-of-things.-for-example-opening-docstring-text" class="nav-link" data-scroll-target="#note-this-can-be-a-number-of-things.-for-example-opening-docstring-text">note this can be a number of things. for example, opening docstring text,</a></li>
<li><a href="#or-a-section-with-a-header-not-included-in-the-numpydoc-standard" id="toc-or-a-section-with-a-header-not-included-in-the-numpydoc-standard" class="nav-link" data-scroll-target="#or-a-section-with-a-header-not-included-in-the-numpydoc-standard">or a section with a header not included in the numpydoc standard</a></li>
<li><a href="#admonition--" id="toc-admonition--" class="nav-link" data-scroll-target="#admonition--">admonition —-</a></li>
<li><a href="#note-this-can-be-a-see-also-warnings-or-notes-section" id="toc-note-this-can-be-a-see-also-warnings-or-notes-section" class="nav-link" data-scroll-target="#note-this-can-be-a-see-also-warnings-or-notes-section">note this can be a see-also, warnings, or notes section</a></li>
<li><a href="#from-the-googledoc-standard" id="toc-from-the-googledoc-standard" class="nav-link" data-scroll-target="#from-the-googledoc-standard">from the googledoc standard</a></li>
</ul>
</nav>
</div>
Expand All @@ -486,58 +425,79 @@ <h2 id="toc-title">On this page</h2>

<section id="quartodoc.MdRenderer.render" class="level1">
<h1>MdRenderer.render</h1>
<p><code>MdRenderer.render(self, header_level=1, show_signature=True, show_signature_annotations=False, display_name='relative', hook_pre=None, render_interlinks=False)</code></p>
<p>Render docstrings to markdown.</p>
<section id="parameters" class="level2">
<h2 class="anchored" data-anchor-id="parameters">Parameters</h2>
<table class="table">
<thead>
<tr class="header">
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>header_level</code></td>
<td><a href="https://docs.python.org/3/library/functions.html#int">int</a></td>
<td>The level of the header (e.g.&nbsp;1 is the biggest).</td>
<td><code>1</code></td>
</tr>
<tr class="even">
<td><code>show_signature</code></td>
<td><a href="https://docs.python.org/3/library/functions.html#bool">bool</a></td>
<td>Whether to show the function signature.</td>
<td><code>True</code></td>
</tr>
<tr class="odd">
<td><code>show_signature_annotations</code></td>
<td><a href="https://docs.python.org/3/library/functions.html#bool">bool</a></td>
<td>Whether to show annotations in the function signature.</td>
<td><code>False</code></td>
</tr>
<tr class="even">
<td><code>display_name</code></td>
<td><a href="https://docs.python.org/3/library/stdtypes.html#str">str</a></td>
<td>The default name shown for documented functions. Either “name”, “relative”, “full”, or “canonical”. These options range from just the function name, to its full path relative to its package, to including the package name, to its the its full path relative to its .__module__.</td>
<td><code>'relative'</code></td>
</tr>
</tbody>
</table>
<p><code>MdRenderer.render(el)</code></p>
<p>Return a string representation of an object, or layout element.</p>
<hr>
<p>render(self, el: str)</p>
<hr>
<p>render(self, el: quartodoc.layout.Page)</p>
<hr>
<p>render(self, el: quartodoc.layout.Section)</p>
<hr>
<p>render(self, el: quartodoc.layout.Interlaced)</p>
<hr>
<p>render(self, el: quartodoc.layout.Doc)</p>
<hr>
<p>render(self, el: Union[quartodoc.layout.DocClass, quartodoc.layout.DocModule])</p>
<hr>
<p>render(self, el: Union[quartodoc.layout.DocFunction, quartodoc.layout.DocAttribute])</p>
<hr>
<p>render(self, el: Union[griffe.dataclasses.Object, griffe.dataclasses.Alias])</p>
<p>Render high level objects representing functions, classes, etc..</p>
<hr>
<p>render(self, el: griffe.dataclasses.Parameters)</p>
<hr>
<p>render(self, el: griffe.dataclasses.Parameter)</p>
<hr>
<p>render(self, el: griffe.docstrings.dataclasses.DocstringSectionText)</p>
</section>
<section id="text--" class="level1">
<h1>text —-</h1>
</section>
<section id="examples" class="level2">
<h2 class="anchored" data-anchor-id="examples">Examples</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> <span class="im">from</span> quartodoc <span class="im">import</span> MdRenderer, get_object</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> renderer <span class="op">=</span> MdRenderer(header_level<span class="op">=</span><span class="dv">2</span>)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> f <span class="op">=</span> get_object(<span class="st">"quartodoc"</span>, <span class="st">"get_object"</span>)</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> <span class="bu">print</span>(renderer.render(f)[:<span class="dv">81</span>])</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">## get_object</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a>`get_object(module: <span class="bu">str</span>, object_name: <span class="bu">str</span>, parser: <span class="bu">str</span> <span class="op">=</span> <span class="st">'numpy'</span>)`</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<section id="note-this-can-be-a-number-of-things.-for-example-opening-docstring-text" class="level1">
<h1>note this can be a number of things. for example, opening docstring text,</h1>
</section>
<section id="or-a-section-with-a-header-not-included-in-the-numpydoc-standard" class="level1">
<h1>or a section with a header not included in the numpydoc standard</h1>
<hr>
<p>render(self, el: griffe.docstrings.dataclasses.DocstringSectionParameters)</p>
<hr>
<p>render(self, el: griffe.docstrings.dataclasses.DocstringParameter) -&gt; Tuple[str]</p>
<hr>
<p>render(self, el: griffe.docstrings.dataclasses.DocstringSectionAttributes)</p>
<hr>
<p>render(self, el: griffe.docstrings.dataclasses.DocstringAttribute)</p>
<hr>
<p>render(self, el: griffe.docstrings.dataclasses.DocstringSectionAdmonition)</p>
</section>
<section id="admonition--" class="level1">
<h1>admonition —-</h1>
</section>
<section id="note-this-can-be-a-see-also-warnings-or-notes-section" class="level1">
<h1>note this can be a see-also, warnings, or notes section</h1>
</section>
<section id="from-the-googledoc-standard" class="level1">
<h1>from the googledoc standard</h1>
<hr>
<p>render(self, el: quartodoc.ast.DocstringSectionWarnings)</p>
<hr>
<p>render(self, el: quartodoc.ast.DocstringSectionSeeAlso)</p>
<hr>
<p>render(self, el: quartodoc.ast.DocstringSectionNotes)</p>
<hr>
<p>render(self, el: griffe.docstrings.dataclasses.DocstringSectionExamples)</p>
<hr>
<p>render(self, el: quartodoc.ast.ExampleCode)</p>
<hr>
<p>render(self, el: quartodoc.ast.ExampleText)</p>
<hr>
<p>render(self, el: Union[griffe.docstrings.dataclasses.DocstringSectionReturns, griffe.docstrings.dataclasses.DocstringSectionRaises])</p>
<hr>
<p>render(self, el: Union[griffe.docstrings.dataclasses.DocstringReturn, griffe.docstrings.dataclasses.DocstringRaise])</p>
<hr>
<p>render(self, el)</p>


</section>
</section>

</main> <!-- /main -->
Expand Down
120 changes: 9 additions & 111 deletions api/MdRenderer.render_annotation.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,69 +20,6 @@
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>


Expand Down Expand Up @@ -474,7 +411,6 @@ <h2 id="toc-title">On this page</h2>
<li><a href="#quartodoc.MdRenderer.render_annotation" id="toc-quartodoc.MdRenderer.render_annotation" class="nav-link active" data-scroll-target="#quartodoc.MdRenderer.render_annotation">MdRenderer.render_annotation</a>
<ul class="collapse">
<li><a href="#parameters" id="toc-parameters" class="nav-link" data-scroll-target="#parameters">Parameters</a></li>
<li><a href="#examples" id="toc-examples" class="nav-link" data-scroll-target="#examples">Examples</a></li>
</ul></li>
</ul>
</nav>
Expand All @@ -486,55 +422,17 @@ <h2 id="toc-title">On this page</h2>

<section id="quartodoc.MdRenderer.render_annotation" class="level1">
<h1>MdRenderer.render_annotation</h1>
<p><code>MdRenderer.render_annotation(self, header_level=1, show_signature=True, show_signature_annotations=False, display_name='relative', hook_pre=None, render_interlinks=False)</code></p>
<p>Render docstrings to markdown.</p>
<p><code>MdRenderer.render_annotation(el)</code></p>
<p>Special hook for rendering a type annotation.</p>
<section id="parameters" class="level2">
<h2 class="anchored" data-anchor-id="parameters">Parameters</h2>
<table class="table">
<thead>
<tr class="header">
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>header_level</code></td>
<td><a href="https://docs.python.org/3/library/functions.html#int">int</a></td>
<td>The level of the header (e.g.&nbsp;1 is the biggest).</td>
<td><code>1</code></td>
</tr>
<tr class="even">
<td><code>show_signature</code></td>
<td><a href="https://docs.python.org/3/library/functions.html#bool">bool</a></td>
<td>Whether to show the function signature.</td>
<td><code>True</code></td>
</tr>
<tr class="odd">
<td><code>show_signature_annotations</code></td>
<td><a href="https://docs.python.org/3/library/functions.html#bool">bool</a></td>
<td>Whether to show annotations in the function signature.</td>
<td><code>False</code></td>
</tr>
<tr class="even">
<td><code>display_name</code></td>
<td><a href="https://docs.python.org/3/library/stdtypes.html#str">str</a></td>
<td>The default name shown for documented functions. Either “name”, “relative”, “full”, or “canonical”. These options range from just the function name, to its full path relative to its package, to including the package name, to its the its full path relative to its .__module__.</td>
<td><code>'relative'</code></td>
</tr>
</tbody>
</table>
</section>
<section id="examples" class="level2">
<h2 class="anchored" data-anchor-id="examples">Examples</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> <span class="im">from</span> quartodoc <span class="im">import</span> MdRenderer, get_object</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> renderer <span class="op">=</span> MdRenderer(header_level<span class="op">=</span><span class="dv">2</span>)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> f <span class="op">=</span> get_object(<span class="st">"quartodoc"</span>, <span class="st">"get_object"</span>)</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;&gt;&gt;</span> <span class="bu">print</span>(renderer.render(f)[:<span class="dv">81</span>])</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">## get_object</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a>`get_object(module: <span class="bu">str</span>, object_name: <span class="bu">str</span>, parser: <span class="bu">str</span> <span class="op">=</span> <span class="st">'numpy'</span>)`</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>el: An object representing a type annotation.</p>
<hr>
<p>render_annotation(self, el: NoneType) -&gt; str</p>
<hr>
<p>render_annotation(self, el: griffe.expressions.ExprName) -&gt; str</p>
<hr>
<p>render_annotation(self, el: griffe.expressions.Expr) -&gt; str</p>


</section>
Expand Down
Loading

0 comments on commit 5b53bb6

Please sign in to comment.