Skip to content

Commit

Permalink
Deployed 6704bc9 to latest with MkDocs 1.5.3 and mike 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
docs-bot committed Oct 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
0 parents commit c619f63
Showing 119 changed files with 173,415 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
2,254 changes: 2,254 additions & 0 deletions latest/404.html

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions latest/_templates/python/material/attribute.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{{ log.debug("Rendering " + attribute.path) }}

<div class="doc doc-object doc-attribute">
{% with html_id = attribute.path %}

{% if root %}
{% set show_full_path = config.show_root_full_path %}
{% set root_members = True %}
{% elif root_members %}
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
{% set root_members = False %}
{% else %}
{% set show_full_path = config.show_object_full_path %}
{% endif %}

{% if not root or config.show_root_heading %}

{% filter heading(heading_level,
role="data" if attribute.parent.kind.value == "module" else "attr",
id=html_id,
class="doc doc-heading",
toc_label=attribute.name,
)
%}

{% if config.separate_signature %}
<span class="doc doc-object-name doc-attribute-name">{% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif %}</span>
{% else %}
{% filter highlight(language="python", inline=True) %}
{% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif %}
{% if attribute.annotation %}: {{ attribute.annotation }}{% endif %}
{% endfilter %}
{% endif %}

{% with labels = attribute.labels %}
{% include "labels.html" with context %}
{% endwith %}

{% endfilter %}

{% if config.separate_signature %}
{% filter highlight(language="python", inline=False) %}
{% filter format_code(config.line_length) %}
{% if show_full_path %}{{ attribute.path }}{% else %}{{ attribute.name }}{% endif %}
{% if attribute.annotation %}: {{ attribute.annotation|safe }}{% endif %}
# {% if attribute.value %} = {{ attribute.value|safe }}{% endif %}
{% endfilter %}
{% endfilter %}
{% endif %}

{% else %}
{% if config.show_root_toc_entry %}
{% filter heading(heading_level,
role="data" if attribute.parent.kind.value == "module" else "attr",
id=html_id,
toc_label=attribute.path if config.show_root_full_path else attribute.name,
hidden=True) %}
{% endfilter %}
{% endif %}
{% set heading_level = heading_level - 1 %}
{% endif %}

<div class="doc doc-contents {% if root %}first{% endif %}">
{% with docstring_sections = attribute.docstring.parsed %}
{% include "docstring.html" with context %}
{% endwith %}
</div>

{% endwith %}
</div>
115 changes: 115 additions & 0 deletions latest/_templates/python/material/class.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{{ log.debug("Rendering " + class.path) }}

<div class="doc doc-object doc-class">
{% with html_id = class.path %}

{% if root %}
{% set show_full_path = config.show_root_full_path %}
{% set root_members = True %}
{% elif root_members %}
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
{% set root_members = False %}
{% else %}
{% set show_full_path = config.show_object_full_path %}
{% endif %}

{% if not root or config.show_root_heading %}

{% filter heading(heading_level,
role="class",
id=html_id,
class="doc doc-heading",
toc_label=class.name) %}

{% if config.separate_signature %}
<span class="doc doc-object-name doc-class-name">{% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}</span>
{% elif config.merge_init_into_class and "__init__" in class.members -%}
{%- with function = class.members["__init__"] -%}
{%- filter highlight(language="python", inline=True) -%}
{% if show_full_path %}{{ class.path }}{% else %}class {{ class.name }}{% endif %}
{%- include "signature.html" with context -%}
{%- endfilter -%}
{%- endwith -%}
{% else %}
{% filter highlight(language="python", inline=True) %}
{% if show_full_path %}{{ class.path }}{% else %}class {{ class.name }}{% endif %}
{% endfilter %}
{% endif %}

{% with labels = class.labels %}
{% include "labels.html" with context %}
{% endwith %}

{% endfilter %}

{% if config.separate_signature and config.merge_init_into_class %}
{% if "__init__" in class.members %}
{% with function = class.members["__init__"] %}
{% filter highlight(language="python", inline=False) %}
{% filter format_signature(config.line_length) %}
{% if show_full_path %}{{ class.path }}{% else %}{{ class.name }}{% endif %}
{% include "signature.html" with context %}
{% endfilter %}
{% endfilter %}
{% endwith %}
{% endif %}
{% endif %}

{% else %}
{% if config.show_root_toc_entry %}
{% filter heading(heading_level,
role="class",
id=html_id,
toc_label=class.path if config.show_root_full_path else class.name,
hidden=True) %}
{% endfilter %}
{% endif %}
{% set heading_level = heading_level - 1 %}
{% endif %}

<div class="doc doc-contents {% if root %}first{% endif %}">
{% if config.show_bases and class.bases %}
<p class="doc doc-class-bases">
Bases: {% for expression in class.bases -%}
<code>{% include "expression.html" with context %}</code>{% if not loop.last %}, {% endif %}
{% endfor -%}
</p>
{% endif %}

{% with docstring_sections = class.docstring.parsed %}
{% include "docstring.html" with context %}
{% endwith %}

{% if config.merge_init_into_class %}
{% if "__init__" in class.members and class.members["__init__"].has_docstring %}
{% with docstring_sections = class.members["__init__"].docstring.parsed %}
{% include "docstring.html" with context %}
{% endwith %}
{% endif %}
{% endif %}

{% if config.show_source %}
{% if config.merge_init_into_class %}
{% if "__init__" in class.members and class.members["__init__"].source %}
<details class="quote">
<summary>Source code in <code>{{ class.relative_filepath }}</code></summary>
{{ class.members["__init__"].source|highlight(language="python", linestart=class.members["__init__"].lineno, linenums=True) }}
</details>
{% endif %}
{% elif class.source %}
<details class="quote">
<summary>Source code in <code>{{ class.relative_filepath }}</code></summary>
{{ class.source|highlight(language="python", linestart=class.lineno, linenums=True) }}
</details>
{% endif %}
{% endif %}

{% with obj = class %}
{% set root = False %}
{% set heading_level = heading_level + 1 %}
{% include "children.html" with context %}
{% endwith %}
</div>

{% endwith %}
</div>
74 changes: 74 additions & 0 deletions latest/_templates/python/material/function.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{{ log.debug("Rendering " + function.path) }}

<div class="doc doc-object doc-function">
{% with html_id = function.path %}

{% if root %}
{% set show_full_path = config.show_root_full_path %}
{% set root_members = True %}
{% elif root_members %}
{% set show_full_path = config.show_root_members_full_path or config.show_object_full_path %}
{% set root_members = False %}
{% else %}
{% set show_full_path = config.show_object_full_path %}
{% endif %}

{% if not root or config.show_root_heading %}

{% filter heading(heading_level,
role="function",
id=html_id,
class="doc doc-heading",
toc_label=function.name ~ "()") %}

{% if config.separate_signature %}
<span class="doc doc-object-name doc-function-name">{% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %}</span>
{% else %}
{% filter highlight(language="python", inline=True) %}
{% if show_full_path %}{{ function.path }}{% else %}def {{ function.name }}{% endif %}
{% include "signature.html" with context %}
{% endfilter %}
{% endif %}

{% with labels = function.labels %}
{% include "labels.html" with context %}
{% endwith %}

{% endfilter %}

{% if config.separate_signature %}
{% filter highlight(language="python", inline=False) %}
{% filter format_signature(config.line_length) %}
{% if show_full_path %}{{ function.path }}{% else %}{{ function.name }}{% endif %}
{% include "signature.html" with context %}
{% endfilter %}
{% endfilter %}
{% endif %}

{% else %}
{% if config.show_root_toc_entry %}
{% filter heading(heading_level,
role="function",
id=html_id,
toc_label=function.path if config.show_root_full_path else function.name,
hidden=True) %}
{% endfilter %}
{% endif %}
{% set heading_level = heading_level - 1 %}
{% endif %}

<div class="doc doc-contents {% if root %}first{% endif %}">
{% with docstring_sections = function.docstring.parsed %}
{% include "docstring.html" with context %}
{% endwith %}

{% if config.show_source and function.source %}
<details class="quote">
<summary>Source code in <code>{{ function.relative_filepath }}</code></summary>
{{ function.source|highlight(language="python", linestart=function.lineno, linenums=True) }}
</details>
{% endif %}
</div>

{% endwith %}
</div>
9 changes: 9 additions & 0 deletions latest/_templates/python/material/labels.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% if labels %}
{{ log.debug("Rendering labels") }}
<span class="doc doc-labels">
<br>
{% for label in labels|sort %}
<small class="doc doc-label doc-label-{{ label }}"><code>{{ label|replace("property", "prop")|replace("instance-attribute", "attr")|replace("dataclass", "dataclass")|replace("class-attribute", "classvar") }}</code></small>
{% endfor %}
</span>
{% endif %}
48 changes: 48 additions & 0 deletions latest/_templates/python/material/signature.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{%- if config.show_signature -%}
{{ log.debug("Rendering signature") }}
{%- with -%}

{%- set ns = namespace(has_pos_only=False, render_pos_only_separator=True, render_kw_only_separator=True, equal="=") -%}

{%- if config.show_signature_annotations -%}
{%- set ns.equal = " = " -%}
{%- endif -%}

(
{%- for parameter in function.parameters -%}
{%- if parameter.name not in ("self", "cls") or loop.index0 > 0 or not (function.parent and function.parent.is_class) -%}

{%- if parameter.kind.value == "positional-only" -%}
{%- set ns.has_pos_only = True -%}
{%- else -%}
{%- if ns.has_pos_only and ns.render_pos_only_separator -%}
{%- set ns.render_pos_only_separator = False %}/, {% endif -%}
{%- if parameter.kind.value == "keyword-only" -%}
{%- if ns.render_kw_only_separator -%}
{%- set ns.render_kw_only_separator = False %}*, {% endif -%}
{%- endif -%}
{%- endif -%}

{%- if config.show_signature_annotations and parameter.annotation is not none -%}
{%- set annotation = ": " + parameter.annotation|safe -%}
{%- endif -%}

{%- if parameter.default is not none and parameter.kind.value != "variadic positional" and parameter.kind.value != "variadic keyword" -%}
{%- set default = ns.equal + parameter.default|safe -%}
{%- endif -%}

{%- if parameter.kind.value == "variadic positional" -%}
{%- set ns.render_kw_only_separator = False -%}
{%- endif -%}

{% if parameter.kind.value == "variadic positional" %}*{% elif parameter.kind.value == "variadic keyword" %}**{% endif -%}
{{ parameter.name }}{{ annotation }}{{ default }}
{%- if not loop.last %}, {% endif -%}

{%- endif -%}
{%- endfor -%}
)
{%- if config.show_signature_annotations and function.annotation %} -> {{ function.annotation|safe }}{%- endif -%}

{%- endwith -%}
{%- endif -%}
Loading

0 comments on commit c619f63

Please sign in to comment.