@@ -16,10 +16,14 @@ over I2C. Its available on `Adafruit as a breakout <https://www.adafruit.com/pro
16
16
17
17
Dependencies
18
18
=============
19
+ This driver depends on:
19
20
20
- This driver depends on the `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice >`_
21
- library. Please ensure it is also available on the CircuitPython filesystem. This is easily achieved by downloading
22
- `a library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle >`_.
21
+ * `Adafruit CircuitPython <https://github.com/adafruit/circuitpython >`_
22
+ * `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice >`_
23
+
24
+ Please ensure all dependencies are available on the CircuitPython filesystem.
25
+ This is easily achieved by downloading
26
+ `the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle >`_.
23
27
24
28
Usage Notes
25
29
===========
@@ -46,10 +50,56 @@ Then, construct the thermometer class:
46
50
# Finally, read the temperature property and print it out
47
51
print (t.temperature)
48
52
49
- API Reference
50
- =============
53
+ Contributing
54
+ ============
55
+
56
+ Contributions are welcome! Please read our `Code of Conduct
57
+ <https://github.com/adafruit/Adafruit_CircuitPython_mcp9808/blob/master/CODE_OF_CONDUCT.md> `_
58
+ before contributing to help this project stay welcoming.
59
+
60
+ Building locally
61
+ ================
62
+
63
+ To build this library locally you'll need to install the
64
+ `circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools >`_ package.
65
+
66
+ .. code-block :: shell
67
+
68
+ python3 -m venv .env
69
+ source .env/bin/activate
70
+ pip install circuitpython-build-tools
71
+
72
+ Once installed, make sure you are in the virtual environment:
73
+
74
+ .. code-block :: shell
75
+
76
+ source .env/bin/activate
77
+
78
+ Then run the build:
79
+
80
+ .. code-block :: shell
81
+
82
+ circuitpython-build-bundles --filename_prefix adafruit-circuitpython-mcp9808 --library_location .
83
+
84
+ Sphinx documentation
85
+ -----------------------
86
+
87
+ Sphinx is used to build the documentation based on rST files and comments in the code. First,
88
+ install dependencies (feel free to reuse the virtual environment from above):
89
+
90
+ .. code-block :: shell
91
+
92
+ python3 -m venv .env
93
+ source .env/bin/activate
94
+ pip install Sphinx sphinx-rtd-theme
95
+
96
+ Now, once you have the virtual environment activated:
97
+
98
+ .. code-block :: shell
51
99
52
- .. toctree ::
53
- :maxdepth: 2
100
+ cd docs
101
+ sphinx-build -E -W -b html . _build/html
54
102
55
- api
103
+ This will output the documentation to ``docs/_build/html ``. Open the index.html in your browser to
104
+ view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
105
+ locally verify it will pass.
0 commit comments