diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..f4243ad --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,3 @@ +python: + version: 3 +requirements_file: requirements.txt diff --git a/README.rst b/README.rst index 34104e8..60ddd9e 100644 --- a/README.rst +++ b/README.rst @@ -65,13 +65,6 @@ Pixels can be then be read by doing: print(amg.pixels) -API Reference -============= - -.. toctree:: - :maxdepth: 2 - - api Contributing ============ diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100644 index 0000000..5aca983 Binary files /dev/null and b/docs/_static/favicon.ico differ diff --git a/api.rst b/docs/api.rst similarity index 100% rename from api.rst rename to docs/api.rst diff --git a/conf.py b/docs/conf.py similarity index 96% rename from conf.py rename to docs/conf.py index 124993c..42aff26 100644 --- a/conf.py +++ b/docs/conf.py @@ -18,7 +18,7 @@ # import os import sys -sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ @@ -54,7 +54,7 @@ source_suffix = '.rst' # source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'README' +master_doc = 'index' # General information about the project. project = u'Adafruit AMG88xx Library' @@ -89,7 +89,7 @@ language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md'] # The reST default role (used for this markup: `text`) to use for all # documents. @@ -113,6 +113,12 @@ default_role = "any" # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + +# If this is True, todo emits a warning for each TODO entries. The default is False. +todo_emit_warnings = True + # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] diff --git a/docs/examples.rst b/docs/examples.rst new file mode 100644 index 0000000..5f60f80 --- /dev/null +++ b/docs/examples.rst @@ -0,0 +1,8 @@ +Pixel test +------------ + +Ensure your device works with this test: + +.. literalinclude:: ../examples/pixel_test.py.py + :caption: examples/pixel_test.py.py + :linenos: diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..78b6940 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,46 @@ +.. include:: ../README.rst + +Table of Contents +================= + +.. toctree:: + :maxdepth: 4 + :hidden: + + self + +.. toctree:: + :caption: Examples + + examples + +.. toctree:: + :caption: API Reference + :maxdepth: 3 + + api + +.. toctree:: + :caption: Tutorials + +.. toctree:: + :caption: Related Products + + +.. toctree:: + :caption: Other Links + + Download + CircuitPython Reference Documentation + CircuitPython Support Forum + Discord Chat + Adafruit Learning System + Adafruit Blog + Adafruit Store + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search`