Skip to content

Commit 84c2070

Browse files
kwagyemanclaude
andcommitted
docs: Clean up conf.py, rebrand titles, settle AWB/AGC in examples.
conf.py: - Drop the legacy version-widget context (micropy_version, micropy_all_versions, url_pattern, cur_version, all_versions, downloads, is_release) — these fed the old sphinx-rtd-theme versions.html template that was deleted in the Shibuya switch. - Drop micropy_authors (unused) and htmlhelp_basename (only used by the htmlhelp builder, which we don't run). - Drop pygments_style="sphinx" — Shibuya overrides via its theme.conf (github-light-default / github-dark-default). - Bump intersphinx Python URL from 3.5 to 3. - Rebrand project to "OpenMV MicroPython" and update LaTeX, man, and Texinfo titles to match. index.rst, license.rst: - Title rewrites match the new project name. Landing examples: - Insert ``csi0.snapshot(time=2000)`` after camera setup so AWB/AGC have time to stabilize before each script's main loop. Hero badge + footer: lowercase "docs" in the build-stamp wording. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 09e137d commit 84c2070

5 files changed

Lines changed: 27 additions & 37 deletions

File tree

docs/conf.py

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
# documentation root, use os.path.abspath to make it absolute, like shown here.
2222
sys.path.insert(0, os.path.abspath("."))
2323

24-
# The MICROPY_VERSION env var should be "vX.Y.Z" (or unset).
25-
micropy_version = os.getenv("MICROPY_VERSION") or "latest"
26-
micropy_all_versions = (os.getenv("MICROPY_ALL_VERSIONS") or "latest").split(",")
27-
url_pattern = "%s/en/%%s" % (os.getenv("MICROPY_URL_PREFIX") or "/",)
28-
2924
# =============================================================================
3025
# Documentation versions and build date — bump these for each release.
3126
# =============================================================================
@@ -41,14 +36,8 @@
4136
# Build date is computed automatically each time Sphinx runs.
4237
build_date = _dt.date.today().strftime("%d %b %Y")
4338

44-
# The members of the html_context dict are available inside topindex.html
39+
# Values exposed to topindex.html and footer templates.
4540
html_context = {
46-
"cur_version": micropy_version,
47-
"all_versions": [(ver, url_pattern % ver) for ver in micropy_all_versions],
48-
"downloads": [
49-
("PDF", url_pattern % micropy_version + "/micropython-docs.pdf"),
50-
],
51-
"is_release": micropy_version != "latest",
5241
"openmv_version": openmv_version,
5342
"micropython_version": micropython_version,
5443
"build_date": build_date,
@@ -70,6 +59,7 @@
7059
csi0.reset()
7160
csi0.pixformat(csi.RGB565)
7261
csi0.framesize(csi.VGA)
62+
csi0.snapshot(time=2000) # let AWB/AGC stabilize
7363
7464
# Built-in single-class person detector model.
7565
model = ml.Model("/rom/yolov8n_192.tflite",
@@ -94,6 +84,7 @@
9484
csi0.reset()
9585
csi0.pixformat(csi.RGB565)
9686
csi0.framesize(csi.QVGA)
87+
csi0.snapshot(time=2000) # let AWB/AGC stabilize
9788
csi0.auto_gain(False)
9889
csi0.auto_whitebal(False)
9990
@@ -119,6 +110,7 @@
119110
csi0.pixformat(csi.RGB565)
120111
csi0.framesize(csi.VGA)
121112
csi0.window((400, 400)) # square window for best results
113+
csi0.snapshot(time=2000) # let AWB/AGC stabilize
122114
123115
model = ml.Model("/rom/blazeface_front_128.tflite",
124116
postprocess=BlazeFace(threshold=0.4))
@@ -140,6 +132,7 @@
140132
csi0.reset()
141133
csi0.pixformat(csi.RGB565)
142134
csi0.framesize(csi.QVGA)
135+
csi0.snapshot(time=2000) # let AWB/AGC stabilize
143136
csi0.auto_gain(False)
144137
145138
clock = time.clock()
@@ -160,6 +153,7 @@
160153
csi0.reset()
161154
csi0.pixformat(csi.RGB565)
162155
csi0.framesize(csi.QVGA)
156+
csi0.snapshot(time=2000) # let AWB/AGC stabilize
163157
csi0.auto_gain(False)
164158
csi0.auto_whitebal(False)
165159
@@ -188,6 +182,7 @@
188182
csi0.pixformat(csi.GRAYSCALE)
189183
csi0.framesize(csi.VGA)
190184
csi0.window((640, 80)) # narrow strip for fast linear scanning
185+
csi0.snapshot(time=2000) # let AWB/AGC stabilize
191186
csi0.auto_gain(False)
192187
csi0.auto_whitebal(False)
193188
@@ -212,6 +207,7 @@
212207
csi0.pixformat(csi.RGB565)
213208
csi0.framesize(csi.VGA)
214209
csi0.window((400, 400)) # square window for the model
210+
csi0.snapshot(time=2000) # let AWB/AGC stabilize
215211
216212
# Connections between the 21 keypoints — palm + 5 fingers.
217213
hand_lines = ((0, 1), (1, 2), (2, 3), (3, 4), (0, 5), (5, 6),
@@ -246,9 +242,6 @@ def _render_landing_code(src):
246242
k: _render_landing_code(v) for k, v in _landing_examples_src.items()
247243
}
248244

249-
# Authors used in various parts of the documentation.
250-
micropy_authors = "MicroPython authors and contributors"
251-
252245

253246
# -- General configuration ------------------------------------------------
254247

@@ -279,7 +272,7 @@ def _render_landing_code(src):
279272
master_doc = "index"
280273

281274
# General information about the project.
282-
project = "MicroPython"
275+
project = "OpenMV MicroPython"
283276
copyright = "The OpenMV MicroPython Documentation is Copyright © 2014-2026 by OpenMV, Damien P. George, and others."
284277

285278
# The version info for the project you're documenting, acts as replacement for
@@ -393,8 +386,9 @@ def _render_landing_code(src):
393386
# output. They are ignored by default.
394387
# show_authors = False
395388

396-
# The name of the Pygments (syntax highlighting) style to use.
397-
pygments_style = "sphinx"
389+
# Note: Shibuya overrides the Pygments style via its own theme.conf
390+
# (`github-light-default` / `github-dark-default`), so we don't set
391+
# ``pygments_style`` here.
398392

399393
# A list of ignored prefixes for module index sorting.
400394
# modindex_common_prefix = []
@@ -509,10 +503,6 @@ def _render_landing_code(src):
509503
# This is the file name suffix for HTML files (e.g. ".xhtml").
510504
# html_file_suffix = None
511505

512-
# Output file base name for HTML help builder.
513-
htmlhelp_basename = "MicroPythondoc"
514-
515-
516506
# -- Options for LaTeX output ---------------------------------------------
517507

518508
latex_elements = {
@@ -532,8 +522,8 @@ def _render_landing_code(src):
532522
latex_documents = [
533523
(
534524
master_doc,
535-
"MicroPython.tex",
536-
"MicroPython Documentation",
525+
"OpenMV-MicroPython.tex",
526+
"OpenMV MicroPython Documentation",
537527
"OpenMV, Damien P. George, and others",
538528
"manual",
539529
),
@@ -569,8 +559,8 @@ def _render_landing_code(src):
569559
man_pages = [
570560
(
571561
"index",
572-
"micropython",
573-
"MicroPython Documentation",
562+
"openmv-micropython",
563+
"OpenMV MicroPython Documentation",
574564
["OpenMV, Damien P. George, and others"],
575565
1,
576566
),
@@ -588,11 +578,11 @@ def _render_landing_code(src):
588578
texinfo_documents = [
589579
(
590580
master_doc,
591-
"MicroPython",
592-
"MicroPython Documentation",
581+
"OpenMV-MicroPython",
582+
"OpenMV MicroPython Documentation",
593583
"OpenMV, Damien P. George, and others",
594-
"MicroPython",
595-
"One line description of project.",
584+
"OpenMV-MicroPython",
585+
"OpenMV firmware documentation, built on MicroPython.",
596586
"Miscellaneous",
597587
),
598588
]
@@ -611,4 +601,4 @@ def _render_landing_code(src):
611601

612602

613603
# Example configuration for intersphinx: refer to the Python standard library.
614-
intersphinx_mapping = {"python": ("https://docs.python.org/3.5", None)}
604+
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
MicroPython documentation and references
2-
========================================
1+
OpenMV MicroPython documentation
2+
================================
33

44
.. toctree::
55

docs/license.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
MicroPython license information
2-
===============================
1+
OpenMV MicroPython license information
2+
======================================
33

44
The MIT License (MIT)
55

docs/templates/components/foot-copyright.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="sy-foot-copyright">
22
<p class="omv-build-stamp">
3-
For OpenMV firmware v{{ openmv_version|e }} &middot; based on MicroPython v{{ micropython_version|e }} &middot; Docs built {{ build_date|e }} &middot; Copyright &copy; 2014-2026 by OpenMV, Damien P. George, and others.
3+
For OpenMV firmware v{{ openmv_version|e }} &middot; based on MicroPython v{{ micropython_version|e }} &middot; docs built {{ build_date|e }} &middot; Copyright &copy; 2014-2026 by OpenMV, Damien P. George, and others.
44
</p>
55
<p>
66
Made with

docs/templates/topindex.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@
753753
<div class="omv-hero-inner">
754754
<span class="omv-hero-badge">
755755
<span class="dot"></span>
756-
For OpenMV firmware v{{ openmv_version|e }} &middot; based on MicroPython v{{ micropython_version|e }} &middot; Docs built {{ build_date|e }}
756+
For OpenMV firmware v{{ openmv_version|e }} &middot; based on MicroPython v{{ micropython_version|e }} &middot; docs built {{ build_date|e }}
757757
</span>
758758
<h1>Machine vision,<br>made simple.</h1>
759759
<p class="lead">Live face detection, AprilTag tracking, QR scanning, and YOLO. All on-device in pure MicroPython. No host computer, no cloud.</p>

0 commit comments

Comments
 (0)