Skip to content

Commit 53fffea

Browse files
committed
updated README
1 parent 763385c commit 53fffea

File tree

1 file changed

+49
-6
lines changed

1 file changed

+49
-6
lines changed

README.rst

+49-6
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_VL53L0X.svg?branch=master
14+
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_VL53L0X
15+
:alt: Build Status
16+
1317
CircuitPython driver for the VL53L0X distance sensor.
1418

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

29-
See usage in the examples/simpletest.py file.
33+
See usage in the examples/vl53l0x_simpletest.py file.
3034

3135
Contributing
3236
============
@@ -35,10 +39,49 @@ Contributions are welcome! Please read our `Code of Conduct
3539
<https://github.com/adafruit/Adafruit_CircuitPython_vl53l0x/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-vl53l0x --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)