Skip to content

Commit ab70b9e

Browse files
committed
updated README
1 parent 5c0210b commit ab70b9e

File tree

1 file changed

+49
-6
lines changed

1 file changed

+49
-6
lines changed

README.rst

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Introduction
1010
:target: https://discord.gg/nBQh6qu
1111
:alt: Discord
1212
13+
.. image:: https://travis-ci.org/adafruit/Adafruit_CircuitPython_TCS34725.svg?branch=master
14+
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_TCS34725
15+
:alt: Build Status
16+
1317
CircuitPython module for the TCS34725 color sensor.
1418

1519
Dependencies
@@ -26,7 +30,7 @@ This is easily achieved by downloading
2630
Usage Example
2731
=============
2832

29-
See examples/simpletest.py for an example of the module's usage.
33+
See examples/tcs34725_simpletest.py for an example of the module's usage.
3034

3135
Contributing
3236
============
@@ -35,10 +39,49 @@ Contributions are welcome! Please read our `Code of Conduct
3539
<https://github.com/adafruit/Adafruit_CircuitPython_tcs34725/blob/master/CODE_OF_CONDUCT.md>`_
3640
before contributing to help this project stay welcoming.
3741

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

0 commit comments

Comments
 (0)