Skip to content

Commit 8f9d2c4

Browse files
committed
updated README
1 parent 0ec2158 commit 8f9d2c4

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

README.rst

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Introduction
1010
:target: https://discord.gg/nBQh6qu
1111
:alt: Discord
1212
13+
.. image:: https://travis-ci.org/adafruit/Adafruit_CircuitPython_OneWire.svg?branch=master
14+
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_OneWire
15+
:alt: Build Status
16+
1317
Classes for use in communicating with devices on a 1-Wire bus.
1418

1519
Dependencies
@@ -35,14 +39,6 @@ Usage Example
3539
print("ROM={}\tFamily=0x{:02x}".format(d.rom, d.family_code))
3640
3741
38-
API Reference
39-
=============
40-
41-
.. toctree::
42-
:maxdepth: 2
43-
44-
api
45-
4642
Contributing
4743
============
4844

@@ -73,3 +69,27 @@ Then run the build:
7369
.. code-block:: shell
7470
7571
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-onewire --library_location .
72+
73+
Sphinx documentation
74+
-----------------------
75+
76+
Sphinx is used to build the documentation based on rST files and comments in the code. First,
77+
install dependencies (feel free to reuse the virtual environment from above):
78+
79+
.. code-block:: shell
80+
81+
python3 -m venv .env
82+
source .env/bin/activate
83+
pip install Sphinx sphinx-rtd-theme
84+
85+
Now, once you have the virtual environment activated:
86+
87+
.. code-block:: shell
88+
89+
cd docs
90+
sphinx-build -E -W -b html . _build/html
91+
92+
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
93+
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
94+
locally verify it will pass.
95+

0 commit comments

Comments
 (0)