Skip to content

Commit

Permalink
Add readthedoc configuration for autodoc (#42)
Browse files Browse the repository at this point in the history
* doc: Add sample outputs and docstring to perp and dex

* fix: Change the function used to set the path in doc conf

* feat: Add readthedoc configuration

* feat: add requirements for autodoc

Co-authored-by: matthiasmatt <[email protected]>
  • Loading branch information
matthiasmatt and matthiasmatt authored Aug 4, 2022
1 parent 75044d0 commit 85a1999
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
44 changes: 44 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# These requirements were autogenerated by pipenv
# To regenerate from the project's Pipfile, run:
#
# pipenv lock --requirements
#

-i https://pypi.org/simple
aiocron==1.8
asn1crypto==1.5.1
asyncio==3.4.3
base58==2.1.1; python_version >= '3.5'
bech32==1.2.0
bip32==3.1
certifi==2022.6.15; python_version >= '3.6'
cffi==1.15.1
charset-normalizer==2.1.0; python_version >= '3.6'
coincurve==17.0.0
croniter==1.3.5; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
cytoolz==0.12.0; implementation_name == 'cpython'
ecdsa==0.18.0
ed25519==1.5
eip712-structs==1.1.0
eth-hash==0.3.3; python_version >= '3.5' and python_version < '4'
eth-typing==3.1.0; python_version < '3.11' and python_version >= '3.6'
eth-utils==2.0.0; python_version >= '3.6' and python_version < '4'
grpcio-tools==1.47.0
grpcio==1.47.0
hdwallets==0.1.2
idna==3.3; python_version >= '3.5'
mnemonic==0.20
protobuf==3.20.1
pycparser==2.21
pysha3==1.0.2
python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
python-dotenv==0.20.0
pytz-deprecation-shim==0.1.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
requests==2.28.1
setuptools==63.3.0; python_version >= '3.7'
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
toolz==0.12.0; python_version >= '3.5'
tzdata==2022.1; python_version >= '3.6'
tzlocal==4.2; python_version >= '3.6'
urllib3==1.26.11; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'
2 changes: 1 addition & 1 deletion docs/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ nibiru
======

.. toctree::
:maxdepth: 4
:maxdepth: 6

nibiru
21 changes: 21 additions & 0 deletions docs/source/nibiru.composers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
nibiru.composers package
========================

Submodules
----------

nibiru.composers.pricefeed module
---------------------------------

.. automodule:: nibiru.composers.pricefeed
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: nibiru.composers
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/source/nibiru.proto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
nibiru.proto package
====================

Module contents
---------------

.. automodule:: nibiru.proto
:members:
:undoc-members:
:show-inheritance:
20 changes: 19 additions & 1 deletion docs/source/nibiru.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ Subpackages
-----------

.. toctree::
:maxdepth: 4
:maxdepth: 6

nibiru.clients
nibiru.composers
nibiru.proto
nibiru.sdks

Submodules
Expand All @@ -29,6 +31,14 @@ nibiru.common module
:undoc-members:
:show-inheritance:

nibiru.composer module
----------------------

.. automodule:: nibiru.composer
:members:
:undoc-members:
:show-inheritance:

nibiru.constant module
----------------------

Expand Down Expand Up @@ -61,6 +71,14 @@ nibiru.sdk module
:undoc-members:
:show-inheritance:

nibiru.test\_utils module
-------------------------

.. automodule:: nibiru.test_utils
:members:
:undoc-members:
:show-inheritance:

nibiru.transaction module
-------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/source/nibiru.sdks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subpackages
-----------

.. toctree::
:maxdepth: 4
:maxdepth: 6

nibiru.sdks.tx

Expand Down

0 comments on commit 85a1999

Please sign in to comment.