Skip to content

Commit 4bac82a

Browse files
committed
updated README
1 parent 6515c56 commit 4bac82a

File tree

1 file changed

+58
-8
lines changed

1 file changed

+58
-8
lines changed

README.rst

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ over I2C. Its available on `Adafruit as a breakout <https://www.adafruit.com/pro
1616

1717
Dependencies
1818
=============
19+
This driver depends on:
1920

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>`_.
2327

2428
Usage Notes
2529
===========
@@ -46,10 +50,56 @@ Then, construct the thermometer class:
4650
# Finally, read the temperature property and print it out
4751
print(t.temperature)
4852
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
5199
52-
.. toctree::
53-
:maxdepth: 2
100+
cd docs
101+
sphinx-build -E -W -b html . _build/html
54102
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

Comments
 (0)