Skip to content

Commit f6df75a

Browse files
committed
updated README
1 parent f2104c0 commit f6df75a

File tree

1 file changed

+48
-8
lines changed

1 file changed

+48
-8
lines changed

README.rst

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Introduction
66
:target: https://circuitpython.readthedocs.io/projects/CircuitPython_ADS1x15/en/latest/
77
:alt: Documentation Status
88

9-
.. image :: https://badges.gitter.im/adafruit/circuitpython.svg
10-
:target: https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
11-
:alt: Gitter
9+
.. image :: https://img.shields.io/discord/327254708534116352.svg
10+
:target: https://discord.gg/nBQh6qu
11+
:alt: Discord
1212
1313
Support for the ADS1x15 series of analog-to-digital converters. Available in 12-bit (ADS1015)
1414
and 16-bit (ADS1115) versions.
@@ -65,10 +65,50 @@ Contributions are welcome! Please read our `Code of Conduct
6565
<https://github.com/adafruit/Adafruit_CircuitPython_CircuitPython_ADS1x15/blob/master/CODE_OF_CONDUCT.md>`_
6666
before contributing to help this project stay welcoming.
6767

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

74-
api

0 commit comments

Comments
 (0)