File tree Expand file tree Collapse file tree 1 file changed +44
-5
lines changed Expand file tree Collapse file tree 1 file changed +44
-5
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,49 @@ Contributions are welcome! Please read our `Code of Conduct
6666before 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.
You can’t perform that action at this time.
0 commit comments