From: Scott Shawcroft Date: Wed, 27 Jun 2018 17:53:00 +0000 (-0700) Subject: Get docs building X-Git-Tag: 0.1.0~1^2 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/2ed6f5d2c74510c8be535c2218ba74ec05a1920d Get docs building --- diff --git a/.gitignore b/.gitignore index cc5b9ac..25364da 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ _build .env build* bundles +*.DS_Store diff --git a/docs/api.rst b/docs/api.rst old mode 100644 new mode 100755 index ab40507..66bca16 --- a/docs/api.rst +++ b/docs/api.rst @@ -6,3 +6,21 @@ .. automodule:: adafruit_blinka :members: + +.. automodule:: adafruit_blinka.agnostic + :members: + +.. automodule:: adafruit_blinka.microcontroller + :members: + +.. automodule:: bitbangio + :members: + +.. automodule:: board + :members: + +.. automodule:: busio + :members: + +.. automodule:: digitalio + :members: diff --git a/docs/conf.py b/docs/conf.py old mode 100644 new mode 100755 index 5976c17..4e0f359 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,7 +2,7 @@ import os import sys -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath('../src')) # -- General configuration ------------------------------------------------ @@ -18,9 +18,10 @@ extensions = [ # Uncomment the below if you use native CircuitPython modules such as # digitalio, micropython and busio. List the modules you use. Without it, the # autodoc module docs will fail to generate with a warning. -# autodoc_mock_imports = ["digitalio", "busio"] +autodoc_mock_imports = ["machine"] -intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} +intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None), + 'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/docs/examples.rst b/docs/examples.rst old mode 100644 new mode 100755 index 83f5ffe..c174f0c --- a/docs/examples.rst +++ b/docs/examples.rst @@ -1,8 +1,5 @@ -Simple test ------------- +examples +-------- -Ensure your device works with this simple test. - -.. literalinclude:: ../examples/blinka_simpletest.py - :caption: examples/blinka_simpletest.py - :linenos: +No examples are currently available. See the `CircuitPython docs +`_ for extensive API documentation. diff --git a/docs/index.rst b/docs/index.rst old mode 100644 new mode 100755 index 8d71e1b..07e52d5 --- a/docs/index.rst +++ b/docs/index.rst @@ -20,18 +20,6 @@ Table of Contents api -.. toctree:: - :caption: Tutorials - -.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave - the toctree above for use later. - -.. toctree:: - :caption: Related Products - -.. todo:: Add any product links here. If there are none, then simply delete this todo and leave - the toctree above for use later. - .. toctree:: :caption: Other Links diff --git a/src/adafruit_blinka/__init__.py b/src/adafruit_blinka/__init__.py index 8c83305..845c802 100755 --- a/src/adafruit_blinka/__init__.py +++ b/src/adafruit_blinka/__init__.py @@ -1,5 +1,9 @@ -"""Module providing runtime utility objects to support the Micro/CircuitPython api""" +""" +`adafruit_blinka` - Runtime utility objects for re-implementation of CircuitPython API +====================================================================================== +* Author(s): cefn +""" class Enum(object): """ diff --git a/src/bitbangio.py b/src/bitbangio.py old mode 100644 new mode 100755 index 101bfff..aa679f0 --- a/src/bitbangio.py +++ b/src/bitbangio.py @@ -1,3 +1,12 @@ +""" +`bitbangio` - Bitbanged bus protocols +============================================================== + +See `CircuitPython:bitbangio` in CircuitPython for more details. + +* Author(s): cefn +""" + from adafruit_blinka import Lockable, agnostic diff --git a/src/board.py b/src/board.py old mode 100644 new mode 100755 index 536bc6b..d1c04c4 --- a/src/board.py +++ b/src/board.py @@ -22,16 +22,14 @@ """ `board` - Define ids for available pins ================================================= -Conditionally imports and re-exports a submodule, such as boards.esp8266 based on -platform introspection + +See `CircuitPython:board` in CircuitPython for more details. * Author(s): cefn """ +import sys -import gc -gc.collect() from adafruit_blinka.agnostic import board -gc.collect() if board == "feather_huzzah": from adafruit_blinka.board.feather_huzzah import * @@ -39,6 +37,7 @@ elif board == "nodemcu": from adafruit_blinka.board.nodemcu import * elif board == "pyboard": from adafruit_blinka.board.pyboard import * +elif "sphinx" in sys.modules: + pass else: raise NotImplementedError("Board not supported") -gc.collect() diff --git a/src/busio.py b/src/busio.py old mode 100644 new mode 100755 index 0c6e296..6c5e76f --- a/src/busio.py +++ b/src/busio.py @@ -1,3 +1,12 @@ +""" +`busio` - Bus protocol support like I2C and SPI +================================================= + +See `CircuitPython:busio` in CircuitPython for more details. + +* Author(s): cefn +""" + from adafruit_blinka import Enum, Lockable, agnostic class I2C(Lockable): diff --git a/src/digitalio.py b/src/digitalio.py old mode 100644 new mode 100755 index 45cada2..8fb5385 --- a/src/digitalio.py +++ b/src/digitalio.py @@ -1,8 +1,16 @@ +""" +`digitalio` - Digital input and output control +================================================= + +See `CircuitPython:digitalio` in CircuitPython for more details. + +* Author(s): cefn +""" + from machine import Pin from adafruit_blinka.agnostic import board as boardId from adafruit_blinka import Enum, ContextManaged - class DriveMode(Enum): PUSH_PULL = None OPEN_DRAIN = None