Skip to content

Commit 31626e9

Browse files
committed
updated README
1 parent c180407 commit 31626e9

File tree

1 file changed

+53
-8
lines changed

1 file changed

+53
-8
lines changed

README.rst

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Introduction
1+
Introduction
22
============
33

44
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ht16k33/badge/?version=latest
@@ -15,9 +15,15 @@ It supports both 16x8 and 8x8 matrices, as well as 7- and 14-segment displays.
1515
Note this library is intended for Adafruit CircuitPython's API. For a library
1616
compatible with MicroPython machine API see this library: https://github.com/adafruit/micropython-adafruit-ht16k33
1717

18-
Installation
18+
Dependencies
1919
=============
20-
This driver depends on many other libraries! Please install it by downloading
20+
This driver depends on:
21+
22+
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
23+
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
24+
25+
Please ensure all dependencies are available on the CircuitPython filesystem.
26+
This is easily achieved by downloading
2127
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
2228

2329
Usage Example
@@ -65,10 +71,49 @@ Contributions are welcome! Please read our `Code of Conduct
6571
<https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/blob/master/CODE_OF_CONDUCT.md>`_
6672
before contributing to help this project stay welcoming.
6773

68-
API Reference
69-
=============
74+
Building locally
75+
================
76+
77+
To build this library locally you'll need to install the
78+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
79+
80+
.. code-block:: shell
81+
82+
python3 -m venv .env
83+
source .env/bin/activate
84+
pip install circuitpython-build-tools
85+
86+
Once installed, make sure you are in the virtual environment:
87+
88+
.. code-block:: shell
89+
90+
source .env/bin/activate
91+
92+
Then run the build:
93+
94+
.. code-block:: shell
95+
96+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-ht16k33 --library_location .
97+
98+
Sphinx documentation
99+
-----------------------
100+
101+
Sphinx is used to build the documentation based on rST files and comments in the code. First,
102+
install dependencies (feel free to reuse the virtual environment from above):
103+
104+
.. code-block:: shell
105+
106+
python3 -m venv .env
107+
source .env/bin/activate
108+
pip install Sphinx sphinx-rtd-theme
109+
110+
Now, once you have the virtual environment activated:
111+
112+
.. code-block:: shell
70113
71-
.. toctree::
72-
:maxdepth: 2
114+
cd docs
115+
sphinx-build -E -W -b html . _build/html
73116
74-
adafruit_ht16k33/index
117+
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
118+
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
119+
locally verify it will pass.

0 commit comments

Comments
 (0)