forked from google/aiyprojects-raspbian
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config and RST files for Sphinx-generated Python reference.
Each .rst file is a descriptor for a page to generate. So there's one for each major module. In cases such as aiy.assistant and aiy.voice.models, I decided it's best to create a package-level page that lists each sub-module on the same page. The overall organization is not literal to the organization in the source code. I've taken some inspiration from other Python projects and decided to organize the reference in a way that should be more intuitive to users who own a specific kit. So, there's a landing page for Voice and Vision Kit, where I list the modules that are intended for each one. I've simply reused the existing markdown pages for each kit, reorganized a bit and added links to the respective modules that are essential to each. However, some of the "kit-specific" modules are not actually restricted to those kits with hardware dependencies, so I've added descriptions where appropriate to say so (for example, the assistant library is under Voice Kit, but could be used without the Voice Bonnet). Besides all the .rst files, I've added some module summaries in the .py files, including some sample code for a couple of them. But that was merely to explore some of the tool and add a little info... This CL is not intended to fill in the code comments, but instead just get the tooling setup and enable us to publish an min-viable python reference. I've also added a custom CSS file to override some of the "read the docs" theme's defaults styles, such as code font. We can extend this in the future if we want to further match the product website. There's much more documentation to add now that it's easy to see where it's missing. Change-Id: Ia735a313e0e031bc0bd5e51fa0bed34b00d7dd5b
- Loading branch information
1 parent
5c74ce5
commit c9e505c
Showing
31 changed files
with
766 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* Custom styles for AIY Projects reference */ | ||
|
||
/* code font more like aiyprojects.withgoogle.com */ | ||
code, | ||
.rst-content tt, | ||
.rst-content code { | ||
background: #f6f6f6; | ||
border: none; | ||
padding: .1em .3em; | ||
font-size: 80%; | ||
color: #263238; | ||
} | ||
|
||
.rst-content tt.literal, | ||
.rst-content tt.literal, | ||
.rst-content code.literal { | ||
color: inherit; | ||
} | ||
|
||
/* floating elements (images) */ | ||
.attempt-right { | ||
float: right; | ||
margin: 0 0 40px 40px; | ||
max-width: calc((100% - 40px)/2); | ||
} | ||
|
||
/* Smallish screens */ | ||
@media screen and (max-width: 1000px) { | ||
.attempt-right { | ||
display: block; | ||
float: none; | ||
margin: 16px 0; | ||
max-width: 100%; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
aiy.assistant | ||
============= | ||
|
||
A collection of modules that simplify interaction with the | ||
`Google Assistant API <https://developers.google.com/assistant/sdk/>`_. | ||
|
||
These APIs are designed for the Voice Kit, but have no dependency on the Voice | ||
HAT/Bonnet specifically. However, they do require some type of sound card | ||
attached to the Raspberry Pi that can be detected by the ALSA subsystem. | ||
|
||
|
||
aiy.assistant.auth\_helpers | ||
--------------------------- | ||
|
||
.. automodule:: aiy.assistant.auth_helpers | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.assistant.grpc | ||
------------------ | ||
|
||
.. automodule:: aiy.assistant.grpc | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.assistant.library | ||
--------------------- | ||
|
||
.. automodule:: aiy.assistant.library | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
aiy.board | ||
========= | ||
|
||
.. automodule:: aiy.board |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.cloudspeech | ||
=============== | ||
|
||
.. automodule:: aiy.cloudspeech | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.leds | ||
======== | ||
|
||
.. automodule:: aiy.leds | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
aiy.pins | ||
======== | ||
|
||
.. automodule:: aiy.pins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.toneplayer | ||
============== | ||
|
||
.. automodule:: aiy.toneplayer | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.trackplayer | ||
=============== | ||
|
||
.. automodule:: aiy.trackplayer | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.vision.annotator | ||
==================== | ||
|
||
.. automodule:: aiy.vision.annotator | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.vision.inference | ||
==================== | ||
|
||
.. automodule:: aiy.vision.inference | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
aiy.vision.models | ||
================= | ||
|
||
A collection of modules that perform ML inferences with specific types of | ||
image classification and object detection models. | ||
|
||
Each of these modules has a corresponding sample app in | ||
:github:`src/examples/vision`. | ||
Also see the instructions to `run the models with the Vision Kit | ||
<https://aiyprojects.withgoogle.com/models/>`_. | ||
|
||
|
||
aiy.vision.models.dish\_classification | ||
-------------------------------------- | ||
|
||
.. automodule:: aiy.vision.models.dish_classification | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.vision.models.dish\_detection | ||
--------------------------------- | ||
|
||
.. automodule:: aiy.vision.models.dish_detection | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.vision.models.face\_detection | ||
--------------------------------- | ||
|
||
.. automodule:: aiy.vision.models.face_detection | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.vision.models.image\_classification | ||
--------------------------------------- | ||
|
||
.. automodule:: aiy.vision.models.image_classification | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.vision.models.inaturalist\_classification | ||
--------------------------------------------- | ||
|
||
.. automodule:: aiy.vision.models.inaturalist_classification | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.vision.models.object\_detection | ||
----------------------------------- | ||
|
||
.. automodule:: aiy.vision.models.object_detection | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
aiy.vision.models.utils | ||
----------------------- | ||
|
||
.. automodule:: aiy.vision.models.utils | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.voice.audio | ||
=============== | ||
|
||
.. automodule:: aiy.voice.audio | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
aiy.voice.tts | ||
============= | ||
|
||
.. automodule:: aiy.voice.tts | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Oops, something went wrong.