@@ -25,7 +25,7 @@ This is easily achieved by downloading
25
25
Usage Example
26
26
=============
27
27
28
- See usage in the examples/simpletest .py file.
28
+ See usage in the examples/mpr121_simpletest .py file.
29
29
30
30
Contributing
31
31
============
@@ -34,10 +34,49 @@ Contributions are welcome! Please read our `Code of Conduct
34
34
<https://github.com/adafruit/Adafruit_CircuitPython_MPR121/blob/master/CODE_OF_CONDUCT.md> `_
35
35
before contributing to help this project stay welcoming.
36
36
37
- API Reference
38
- =============
37
+ Building locally
38
+ ================
39
+
40
+ To build this library locally you'll need to install the
41
+ `circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools >`_ package.
42
+
43
+ .. code-block :: shell
44
+
45
+ python3 -m venv .env
46
+ source .env/bin/activate
47
+ pip install circuitpython-build-tools
48
+
49
+ Once installed, make sure you are in the virtual environment:
50
+
51
+ .. code-block :: shell
52
+
53
+ source .env/bin/activate
54
+
55
+ Then run the build:
56
+
57
+ .. code-block :: shell
58
+
59
+ circuitpython-build-bundles --filename_prefix adafruit-circuitpython-mpr121 --library_location .
60
+
61
+ Sphinx documentation
62
+ -----------------------
63
+
64
+ Sphinx is used to build the documentation based on rST files and comments in the code. First,
65
+ install dependencies (feel free to reuse the virtual environment from above):
66
+
67
+ .. code-block :: shell
68
+
69
+ python3 -m venv .env
70
+ source .env/bin/activate
71
+ pip install Sphinx sphinx-rtd-theme
72
+
73
+ Now, once you have the virtual environment activated:
74
+
75
+ .. code-block :: shell
39
76
40
- .. toctree ::
41
- :maxdepth: 2
77
+ cd docs
78
+ sphinx-build -E -W -b html . _build/html
42
79
43
- api
80
+ This will output the documentation to ``docs/_build/html ``. Open the index.html in your browser to
81
+ view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
82
+ locally verify it will pass.
0 commit comments