@@ -10,6 +10,10 @@ Introduction
10
10
:target: https://adafru.it/discord
11
11
:alt: Discord
12
12
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
+
13
17
CircuitPython driver for TSL2561 Light Sensor.
14
18
15
19
Dependencies
@@ -43,10 +47,50 @@ Contributions are welcome! Please read our `Code of Conduct
43
47
<https://github.com/adafruit/Adafruit_CircuitPython_CircuitPython_TSL2561/blob/master/CODE_OF_CONDUCT.md> `_
44
48
before contributing to help this project stay welcoming.
45
49
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
48
92
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.
51
96
52
- api
0 commit comments