Skip to content

Instantly share code, notes, and snippets.

@has2k1
Last active August 25, 2023 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save has2k1/0f55e60029563445536c555fb355cf12 to your computer and use it in GitHub Desktop.
Save has2k1/0f55e60029563445536c555fb355cf12 to your computer and use it in GitHub Desktop.
Quartodo Docstring Specification
<!-- package.module.some_function -->
<!--
The docstring for some_function, the type information may come
from type annotations.
"""
Title of Some Function
Some more description of some function
Parameters
----------
x : int
The value of the first dimension.
*args : float
The values for any other dimensions.
r : int, default=1
The radius of the base shape.
**kwargs : dict
Extra paramters passed onto the core function.
Returns
-------
float
The returned value of some function.
See Also
--------
package.module.another_function_1: Just check it out.
package.module.another_function_2: Check this one out too.
"""
-->
<section id="package-module-some_function">
<!--
The class can be one of
function, method, class, class-property, module-property
in sphinx:
class-property is property
module-property is data
-->
<div class="function">
<dl>
<dt>
<p class="signature" id="package.module.some_function">
<!-- The code will be tokenised and highlight markup added -->
<code>package.module.some_function(x: float, *args, r: int=1, **kwargs)</code>
</p>
</dt>
<dd>
<p>Title of Some Function</p>
<p>Some more description of some function</p>
<div class="parameter-return-list">
<!-- This can be styled in CSS as display: grid -->
<dl>
<dt><span>Parameters</span></dt>
<dd>
<div class="parameter-list">
<dl>
<dt>
<code>
<span class="parameter-name">x</span>
<span class="parameter-annotation-sep">:</span>
<span class="parameter-annotation">float</span>
</code>
</dt>
<dd><p>The value of the first dimension.</p></dd>
<dt>
<code>
<span class="parameter-name">*args</span>
<span class="parameter-annotation-sep">:</span>
<span class="parameter-annotation">float</span>
</code>
</dt>
<dd><p>The values for any other dimensions.</p></dd>
<dt>
<code>
<span class="parameter-name">r</span>
<span class="parameter-annotation-sep">:</span>
<span class="parameter-annotation">int</span>
<span class="parameter-default-sep">=</span>
<span class="parameter-default">1</span>
</code>
</dt>
<dd><p>The radius of the base shape.</p></dd>
<dt>
<code>
<span class="parameter-name">**kwargs</span>
<span class="parameter-annotation-sep">:</span>
<span class="parameter-annotation">dict</span>
</code>
</dt>
<dd><p>Extra paramters passed onto the core function.</p></dd>
</dl>
</div>
</dd>
<dt><span>Returns</span></dt>
<dd>
<div class="result-list">
<dl>
<dt><span class="result-type">float</span></dt>
<dd><p>The returned value of some function.</p></dd>
</dl>
</div>
</dd>
</dl>
</div>
<div class="admonition see-also">
<p class="admonition-title">See Also</p>
<dl>
<dt>
<a href="x.html" title="package.module.another_function_1">
<code>package.module.another_function_1</code>
</a>
</dt>
<dd><p>Just check it out.</p></dd>
<dt>
<a href="x.html" title="package.module.another_function_2">
<code>package.module.another_function_2</code>
</a>
</dt>
<dd><p>Check this one out too.</p></dd>
</dl>
</div>
<!--
Other parts follow e.g.
- Notes
- Examples
These are not processed in any special way by quartodoc. But they are
within the data description (dd) of the object being documented.
-->
</dd>
</dl>
</div>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment