Skip to content

Commit 5f42a97

Browse files
committed
update README
1 parent 3cc7824 commit 5f42a97

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

README.rst

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This is easily achieved by downloading
2525
Usage Example
2626
=============
2727

28-
See usage in the examples/simpletest.py file.
28+
See usage in the examples/mpr121_simpletest.py file.
2929

3030
Contributing
3131
============
@@ -34,10 +34,49 @@ Contributions are welcome! Please read our `Code of Conduct
3434
<https://github.com/adafruit/Adafruit_CircuitPython_MPR121/blob/master/CODE_OF_CONDUCT.md>`_
3535
before contributing to help this project stay welcoming.
3636

37-
API Reference
38-
=============
37+
Building locally
38+
================
39+
40+
To build this library locally you'll need to install the
41+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
42+
43+
.. code-block:: shell
44+
45+
python3 -m venv .env
46+
source .env/bin/activate
47+
pip install circuitpython-build-tools
48+
49+
Once installed, make sure you are in the virtual environment:
50+
51+
.. code-block:: shell
52+
53+
source .env/bin/activate
54+
55+
Then run the build:
56+
57+
.. code-block:: shell
58+
59+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-mpr121 --library_location .
60+
61+
Sphinx documentation
62+
-----------------------
63+
64+
Sphinx is used to build the documentation based on rST files and comments in the code. First,
65+
install dependencies (feel free to reuse the virtual environment from above):
66+
67+
.. code-block:: shell
68+
69+
python3 -m venv .env
70+
source .env/bin/activate
71+
pip install Sphinx sphinx-rtd-theme
72+
73+
Now, once you have the virtual environment activated:
74+
75+
.. code-block:: shell
3976
40-
.. toctree::
41-
:maxdepth: 2
77+
cd docs
78+
sphinx-build -E -W -b html . _build/html
4279
43-
api
80+
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
81+
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
82+
locally verify it will pass.

0 commit comments

Comments
 (0)