Skip to content

Commit 225e41b

Browse files
committed
updated README
1 parent 2d3f99b commit 225e41b

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

README.rst

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,50 @@ Contributions are welcome! Please read our `Code of Conduct
6262
<https://github.com/adafruit/Adafruit_CircuitPython_BME280/blob/master/CODE_OF_CONDUCT.md>`_
6363
before contributing to help this project stay welcoming.
6464

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

71-
api

0 commit comments

Comments
 (0)