@@ -10,6 +10,10 @@ Introduction
10
10
:target: https://discord.gg/nBQh6qu
11
11
:alt: Discord
12
12
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
+
13
17
CircuitPython driver for the VL53L0X distance sensor.
14
18
15
19
Dependencies
@@ -26,7 +30,7 @@ This is easily achieved by downloading
26
30
Usage Example
27
31
=============
28
32
29
- See usage in the examples/simpletest .py file.
33
+ See usage in the examples/vl53l0x_simpletest .py file.
30
34
31
35
Contributing
32
36
============
@@ -35,10 +39,49 @@ Contributions are welcome! Please read our `Code of Conduct
35
39
<https://github.com/adafruit/Adafruit_CircuitPython_vl53l0x/blob/master/CODE_OF_CONDUCT.md> `_
36
40
before contributing to help this project stay welcoming.
37
41
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
40
81
41
- .. toctree ::
42
- :maxdepth: 2
82
+ cd docs
83
+ sphinx-build -E -W -b html . _build/html
43
84
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