Skip to content

Commit 218032e

Browse files
committed
updated README
1 parent e65f537 commit 218032e

File tree

1 file changed

+49
-5
lines changed

1 file changed

+49
-5
lines changed

README.rst

+49-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Introduction
1010
:target: https://adafru.it/discord
1111
:alt: Discord
1212
13+
.. image:: https://travis-ci.org/adafruit/Adafruit_CircuitPython_TLS2561.svg?branch=master
14+
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_TLS2561
15+
:alt: Build Status
16+
1317
CircuitPython driver for TSL2561 Light Sensor.
1418

1519
Dependencies
@@ -43,10 +47,50 @@ Contributions are welcome! Please read our `Code of Conduct
4347
<https://github.com/adafruit/Adafruit_CircuitPython_CircuitPython_TSL2561/blob/master/CODE_OF_CONDUCT.md>`_
4448
before contributing to help this project stay welcoming.
4549

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

52-
api

0 commit comments

Comments
 (0)