Skip to content

Commit f3cc460

Browse files
committed
updated README
1 parent 7663000 commit f3cc460

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
@@ -36,10 +36,49 @@ Contributions are welcome! Please read our `Code of Conduct
3636
<https://github.com/adafruit/Adafruit_CircuitPython_gps/blob/master/CODE_OF_CONDUCT.md>`_
3737
before contributing to help this project stay welcoming.
3838

39-
API Reference
40-
=============
39+
Building locally
40+
================
41+
42+
To build this library locally you'll need to install the
43+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
44+
45+
.. code-block:: shell
46+
47+
python3 -m venv .env
48+
source .env/bin/activate
49+
pip install circuitpython-build-tools
50+
51+
Once installed, make sure you are in the virtual environment:
52+
53+
.. code-block:: shell
54+
55+
source .env/bin/activate
56+
57+
Then run the build:
58+
59+
.. code-block:: shell
60+
61+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-gps --library_location .
62+
63+
Sphinx documentation
64+
-----------------------
65+
66+
Sphinx is used to build the documentation based on rST files and comments in the code. First,
67+
install dependencies (feel free to reuse the virtual environment from above):
68+
69+
.. code-block:: shell
70+
71+
python3 -m venv .env
72+
source .env/bin/activate
73+
pip install Sphinx sphinx-rtd-theme
74+
75+
Now, once you have the virtual environment activated:
76+
77+
.. code-block:: shell
4178
42-
.. toctree::
43-
:maxdepth: 2
79+
cd docs
80+
sphinx-build -E -W -b html . _build/html
4481
45-
api
82+
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
83+
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
84+
locally verify it will pass.

0 commit comments

Comments
 (0)