Skip to content

Commit f069ddf

Browse files
committed
Python docs
1 parent 937ec7b commit f069ddf

File tree

7 files changed

+218
-2
lines changed

7 files changed

+218
-2
lines changed
4.53 KB
Loading

python/docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

python/docs/overrides/main.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% extends "base.html" %}
2+
3+
{% block content %}
4+
{% if page.nb_url %}
5+
<a href="{{ page.nb_url }}" title="Download Notebook" class="md-content__button md-icon">
6+
{% include ".icons/material/download.svg" %}
7+
</a>
8+
{% endif %}
9+
10+
{{ super() }}
11+
{% endblock content %}
12+
13+
{% block outdated %}
14+
You're not viewing the latest version.
15+
<a href="{{ '../' ~ base_url }}">
16+
<strong>Click here to go to latest.</strong>
17+
</a>
18+
{% endblock %}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
:root,
2+
[data-md-color-scheme="default"] {
3+
/* --md-heading-font: "Oswald"; */
4+
--md-primary-fg-color: #cf3f02;
5+
--md-default-fg-color: #443f3f;
6+
--boxShadowD: 0px 12px 24px 0px rgba(68, 63, 63, 0.08),
7+
0px 0px 4px 0px rgba(68, 63, 63, 0.08);
8+
}
9+
body {
10+
margin: 0;
11+
padding: 0;
12+
/* font-size: 16px; */
13+
}
14+
h1,
15+
h2,
16+
h3,
17+
h4,
18+
h5,
19+
h6 {
20+
font-family: var(--md-heading-font);
21+
font-weight: bold;
22+
}
23+
.md-typeset h1,
24+
.md-typeset h2 {
25+
font-weight: normal;
26+
color: var(--md-default-fg-color);
27+
}
28+
.md-typeset h3,
29+
.md-typeset h4 {
30+
font-weight: bold;
31+
color: var(--md-default-fg-color);
32+
}
33+
.md-button,
34+
.md-typeset .md-button {
35+
font-family: var(--md-heading-font);
36+
}
37+
.md-content .supheading {
38+
font-family: var(--md-heading-font);
39+
text-transform: uppercase;
40+
color: var(--md-primary-fg-color);
41+
font-size: 0.75rem;
42+
font-weight: bold;
43+
}

python/mkdocs.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
site_name: async-tiff
2+
repo_name: developmentseed/async-tiff
3+
repo_url: https://github.com/developmentseed/async-tiff
4+
site_description: A fast, low-level async TIFF reader powered by Rust.
5+
site_author: Development Seed
6+
# Note: trailing slash recommended with mike:
7+
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/#publishing-a-new-version
8+
site_url: https://developmentseed.org/async-tiff/
9+
docs_dir: docs
10+
11+
extra:
12+
social:
13+
- icon: "fontawesome/brands/github"
14+
link: "https://github.com/developmentseed"
15+
- icon: "fontawesome/brands/twitter"
16+
link: "https://twitter.com/developmentseed"
17+
- icon: "fontawesome/brands/linkedin"
18+
link: "https://www.linkedin.com/company/development-seed"
19+
version:
20+
alias: true
21+
provider: mike
22+
23+
nav:
24+
- "index.md"
25+
# - API Reference:
26+
# - api/rtree.md
27+
# - api/kdtree.md
28+
# - Changelog: CHANGELOG.md
29+
30+
watch:
31+
- python
32+
- docs
33+
34+
theme:
35+
language: en
36+
name: material
37+
custom_dir: docs/overrides
38+
logo: assets/logo_no_text.png
39+
palette:
40+
# Palette toggle for automatic mode
41+
- media: "(prefers-color-scheme)"
42+
toggle:
43+
icon: material/brightness-auto
44+
name: Switch to light mode
45+
46+
# Palette toggle for light mode
47+
- media: "(prefers-color-scheme: light)"
48+
primary: default
49+
accent: deep orange
50+
toggle:
51+
icon: material/brightness-7
52+
name: Switch to dark mode
53+
54+
# Palette toggle for dark mode
55+
- media: "(prefers-color-scheme: dark)"
56+
scheme: slate
57+
primary: default
58+
accent: deep orange
59+
toggle:
60+
icon: material/brightness-4
61+
name: Switch to system preference
62+
63+
font:
64+
text: Roboto
65+
code: Roboto Mono
66+
67+
features:
68+
- content.code.annotate
69+
- content.code.copy
70+
- navigation.indexes
71+
- navigation.instant
72+
- navigation.tracking
73+
- search.suggest
74+
- search.share
75+
76+
extra_css:
77+
- overrides/stylesheets/extra.css
78+
79+
plugins:
80+
- search
81+
- social
82+
- mike:
83+
alias_type: "copy"
84+
canonical_version: "latest"
85+
- mkdocstrings:
86+
enable_inventory: true
87+
handlers:
88+
python:
89+
paths: [python]
90+
options:
91+
# We set allow_inspection: false to ensure that all docstrings come
92+
# from the pyi files, not the Rust-facing doc comments.
93+
allow_inspection: false
94+
docstring_section_style: list
95+
docstring_style: google
96+
line_length: 80
97+
separate_signature: true
98+
show_root_heading: true
99+
show_signature_annotations: true
100+
show_source: false
101+
show_symbol_type_toc: true
102+
signature_crossrefs: true
103+
extensions:
104+
- griffe_inherited_docstrings
105+
106+
import:
107+
- https://docs.python.org/3/objects.inv
108+
- https://developmentseed.org/obstore/latest/objects.inv
109+
110+
# https://github.com/developmentseed/titiler/blob/50934c929cca2fa8d3c408d239015f8da429c6a8/docs/mkdocs.yml#L115-L140
111+
markdown_extensions:
112+
- admonition
113+
- attr_list
114+
- codehilite:
115+
guess_lang: false
116+
- def_list
117+
- footnotes
118+
- md_in_html
119+
- pymdownx.arithmatex
120+
- pymdownx.betterem
121+
- pymdownx.caret:
122+
insert: false
123+
- pymdownx.details
124+
- pymdownx.emoji:
125+
emoji_index: !!python/name:material.extensions.emoji.twemoji
126+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
127+
- pymdownx.escapeall:
128+
hardbreak: true
129+
nbsp: true
130+
- pymdownx.magiclink:
131+
hide_protocol: true
132+
repo_url_shortener: true
133+
- pymdownx.smartsymbols
134+
- pymdownx.superfences
135+
- pymdownx.tasklist:
136+
custom_checkbox: true
137+
- pymdownx.tilde
138+
- toc:
139+
permalink: true

python/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ dev-dependencies = [
2424
"ipykernel>=6.29.5",
2525
"maturin>=1.7.4",
2626
"mike>=2.1.3",
27-
"mkdocs-material[imaging]>=9.5.40",
27+
"mkdocs-material[imaging]>=9.6.3",
2828
"mkdocs>=1.6.1",
2929
"mkdocstrings-python>=1.13.0",
3030
"mkdocstrings>=0.27.0",
3131
"numpy>=1",
3232
"pip>=24.2",
33+
"pytest-asyncio>=0.24.0",
3334
"pytest>=8.3.3",
3435
"ruff>=0.8.4",
3536
]

python/uv.lock

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)