Skip to content

Commit 7026dc7

Browse files
committed
updated README
1 parent 91e5c49 commit 7026dc7

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

README.rst

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,49 @@ Contributions are welcome! Please read our `Code of Conduct
6666
before contributing to help this project stay welcoming.
6767

6868

69-
API Reference
70-
=============
69+
Building locally
70+
================
71+
72+
To build this library locally you'll need to install the
73+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
74+
75+
.. code-block:: shell
76+
77+
python3 -m venv .env
78+
source .env/bin/activate
79+
pip install circuitpython-build-tools
80+
81+
Once installed, make sure you are in the virtual environment:
82+
83+
.. code-block:: shell
84+
85+
source .env/bin/activate
86+
87+
Then run the build:
88+
89+
.. code-block:: shell
90+
91+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bno055 --library_location .
92+
93+
Sphinx documentation
94+
-----------------------
95+
96+
Sphinx is used to build the documentation based on rST files and comments in the code. First,
97+
install dependencies (feel free to reuse the virtual environment from above):
98+
99+
.. code-block:: shell
100+
101+
python3 -m venv .env
102+
source .env/bin/activate
103+
pip install Sphinx sphinx-rtd-theme
104+
105+
Now, once you have the virtual environment activated:
106+
107+
.. code-block:: shell
71108
72-
.. toctree::
73-
:maxdepth: 2
109+
cd docs
110+
sphinx-build -E -W -b html . _build/html
74111
75-
api
112+
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
113+
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
114+
locally verify it will pass.

0 commit comments

Comments
 (0)