Skip to content

Exposing API components in Readthedocs, adding examples to the Readthedocs API #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adafruit_progressbar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: MIT

"""
`progressbar_base`
`adafruit_progressbar`
================================================================================

Dynamic progress bar widget for CircuitPython displays
Expand Down
2 changes: 1 addition & 1 deletion adafruit_progressbar/horizontalprogressbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class HorizontalProgressBar(ProgressBarBase):
Using the diagrams below, the bar will fill in the following directions::

--------------------------------
| Left-to-right | 1-3 to 2-4 |
| Left-to-right | 1-3 to 2-4 |
--------------------------------
| Right-to-left | 2-4 to 1-3 |
--------------------------------
Expand Down
3 changes: 3 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ API Definition
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
.. use this format as the module name: "adafruit_foo.foo"

.. automodule:: adafruit_progressbar
:members:

.. automodule:: adafruit_progressbar.horizontalprogressbar
:members:
:show-inheritance:
Expand Down
50 changes: 50 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,53 @@ Example showing how to change the progressbar color while updating the values
.. literalinclude:: ../examples/progressbar_displayio_blinka_color_scale.py
:caption: examples/progressbar_displayio_blinka_color_scale.py
:linenos:


Vertical Simple test
--------------------

Simple test to show a vertical Progress bar

.. literalinclude:: ../examples/progressbar_vertical_simpletest.py
:caption: examples/progressbar_vertical_simpletest.py
:linenos:


MatrixPortal Example
--------------------

Progressbar using the MatrixPortal

.. literalinclude:: ../examples/progressbar_matrixportal.py
:caption: examples/examples/progressbar_matrixportal.py
:linenos:



MagTag Example
---------------

Progressbar using the MagTag

.. literalinclude:: ../examples/progressbar_magtag_simpletest.py
:caption: examples/progressbar_magtag_simpletest.py
:linenos:


DisplayIO Blinka
----------------

Progressbar using DisplayIO in Blinka

.. literalinclude:: ../examples/progressbar_displayio_blinka.py
:caption: examples/progressbar_displayio_blinka.py
:linenos:

Combined ProgressBar
--------------------

Example showing both a Vertical and an Horizontal ProgressBar

.. literalinclude:: ../examples/progressbar_combined.py
:caption: examples/progressbar_combined.py
:linenos:
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Table of Contents
.. toctree::
:caption: Tutorials

ProgressBar Basics <https://learn.adafruit.com/magtag-progress-displays/progressbar-basics>

Adafruit MagTag COVID Vaccination Percent Tracker <https://learn.adafruit.com/adafruit-magtag-covid-vaccination-percent-tracker>


.. toctree::
:caption: Related Products
Expand Down