From f96951189b779d8e6ff6b3907f0585e4734907b4 Mon Sep 17 00:00:00 2001 From: Manu Ponnapati Date: Fri, 25 Oct 2024 22:06:54 -0700 Subject: [PATCH 01/16] docs --- .github/workflows/docs.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..abd041c5 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,26 @@ +name: docs + +on: [push, pull_request, workflow_dispatch] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install dependencies + run: | + pip install sphinx sphinx_rtd_theme myst_parser + - name: Sphinx build + run: | + sphinx-build docs _build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: docs + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true \ No newline at end of file From 388bd136d6543a26dcf7a84d5d0ed289da5d0bb7 Mon Sep 17 00:00:00 2001 From: Manu Ponnapati Date: Fri, 25 Oct 2024 22:23:21 -0700 Subject: [PATCH 02/16] save changes --- .github/workflows/docs.yml | 47 ++++++++++++++++++++++---------------- docs/Makefile | 20 ++++++++++++++++ docs/conf.py | 35 ++++++++++++++++++++++++++++ docs/core.rst | 7 ++++++ docs/env.rst | 7 ++++++ docs/env_client.rst | 7 ++++++ docs/index.rst | 14 ++++++++++++ docs/main.rst | 7 ++++++ docs/make.bat | 35 ++++++++++++++++++++++++++++ docs/message.rst | 7 ++++++ docs/modules.rst | 14 ++++++++++++ docs/render.rst | 7 ++++++ docs/tools.rst | 45 ++++++++++++++++++++++++++++++++++++ docs/utils.rst | 7 ++++++ 14 files changed, 239 insertions(+), 20 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/conf.py create mode 100644 docs/core.rst create mode 100644 docs/env.rst create mode 100644 docs/env_client.rst create mode 100644 docs/index.rst create mode 100644 docs/main.rst create mode 100644 docs/make.bat create mode 100644 docs/message.rst create mode 100644 docs/modules.rst create mode 100644 docs/render.rst create mode 100644 docs/tools.rst create mode 100644 docs/utils.rst diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index abd041c5..a1bdedfa 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,26 +1,33 @@ name: docs -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: write +on: + push: + branches: + - main # Change to your default branch + - docs + pull_request: + branches: + - main # Optional: build on pull requests to the main branch + - docs jobs: - docs: + build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - name: Install dependencies - run: | - pip install sphinx sphinx_rtd_theme myst_parser - - name: Sphinx build - run: | - sphinx-build docs _build - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - publish_branch: docs - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true \ No newline at end of file + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install sphinx sphinx_rtd_theme + + - name: Build the Sphinx documentation + working-directory: ./docs + run: make html + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_build/html diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d4bb2cbb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..7de65d53 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,35 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os +import sys +sys.path.insert(0, os.path.abspath('../src/aviary')) + +project = 'aviary' +copyright = '2024, FutureHouse' +author = 'FutureHouse' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.napoleon', + 'sphinx.ext.viewcode', + 'sphinx.ext.autosummary', +] + +autosummary_generate = True + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] diff --git a/docs/core.rst b/docs/core.rst new file mode 100644 index 00000000..d194de38 --- /dev/null +++ b/docs/core.rst @@ -0,0 +1,7 @@ +core module +=========== + +.. automodule:: core + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/env.rst b/docs/env.rst new file mode 100644 index 00000000..cf32d370 --- /dev/null +++ b/docs/env.rst @@ -0,0 +1,7 @@ +env module +========== + +.. automodule:: env + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/env_client.rst b/docs/env_client.rst new file mode 100644 index 00000000..eb6b42aa --- /dev/null +++ b/docs/env_client.rst @@ -0,0 +1,7 @@ +env\_client module +================== + +.. automodule:: env_client + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..33173a83 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,14 @@ +.. aviary documentation master file, created by + sphinx-quickstart on Fri Oct 25 22:15:51 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +aviary documentation +==================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + modules + diff --git a/docs/main.rst b/docs/main.rst new file mode 100644 index 00000000..eace87b8 --- /dev/null +++ b/docs/main.rst @@ -0,0 +1,7 @@ +main module +=========== + +.. automodule:: main + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000..32bb2452 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/message.rst b/docs/message.rst new file mode 100644 index 00000000..c96f9d6c --- /dev/null +++ b/docs/message.rst @@ -0,0 +1,7 @@ +message module +============== + +.. automodule:: message + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules.rst b/docs/modules.rst new file mode 100644 index 00000000..bbf59431 --- /dev/null +++ b/docs/modules.rst @@ -0,0 +1,14 @@ +aviary +====== + +.. toctree:: + :maxdepth: 4 + + core + env + env_client + main + message + render + tools + utils diff --git a/docs/render.rst b/docs/render.rst new file mode 100644 index 00000000..ab7f6ed2 --- /dev/null +++ b/docs/render.rst @@ -0,0 +1,7 @@ +render module +============= + +.. automodule:: render + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/tools.rst b/docs/tools.rst new file mode 100644 index 00000000..d49769a0 --- /dev/null +++ b/docs/tools.rst @@ -0,0 +1,45 @@ +tools package +============= + +Submodules +---------- + +tools.argref module +------------------- + +.. automodule:: tools.argref + :members: + :undoc-members: + :show-inheritance: + +tools.base module +----------------- + +.. automodule:: tools.base + :members: + :undoc-members: + :show-inheritance: + +tools.server module +------------------- + +.. automodule:: tools.server + :members: + :undoc-members: + :show-inheritance: + +tools.utils module +------------------ + +.. automodule:: tools.utils + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: tools + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/utils.rst b/docs/utils.rst new file mode 100644 index 00000000..44cef9ed --- /dev/null +++ b/docs/utils.rst @@ -0,0 +1,7 @@ +utils module +============ + +.. automodule:: utils + :members: + :undoc-members: + :show-inheritance: From 1f9c8a458d81bf8cd7a09474a118eefd3f51df52 Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 22:28:41 -0700 Subject: [PATCH 03/16] Update docs.yml --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a1bdedfa..a20d864c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,10 +24,10 @@ jobs: - name: Build the Sphinx documentation working-directory: ./docs - run: make html + run: cd docs && make html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_build/html + publish_dir: _build/html From a1b07cff23f16780b10098a3e892120f17d1493e Mon Sep 17 00:00:00 2001 From: Manu Ponnapati Date: Fri, 25 Oct 2024 22:33:57 -0700 Subject: [PATCH 04/16] Docs --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a20d864c..9208a205 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: - name: Build the Sphinx documentation working-directory: ./docs - run: cd docs && make html + run: make html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 From 76ff99951d8bec4eb1ce6a8dbcb7a1834f601582 Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 22:39:48 -0700 Subject: [PATCH 05/16] Update docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9208a205..a1bdedfa 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,4 +30,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/html + publish_dir: docs/_build/html From 9deb07ff3caa88b2ec477528e8082e4fd6f2cbfd Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 23:07:48 -0700 Subject: [PATCH 06/16] Update docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a1bdedfa..37a9d437 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: - name: Build the Sphinx documentation working-directory: ./docs - run: make html + run: sphinx-apidoc -o . ../src/aviary && make clean && make html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 From 18954387d4c107aa2ac6deb1d901119aa1095084 Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 23:10:42 -0700 Subject: [PATCH 07/16] Update docs.yml --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 37a9d437..14580596 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,4 +30,5 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: docs publish_dir: docs/_build/html From 74c41d5f100894f9c955feda1f753f93b594c6e7 Mon Sep 17 00:00:00 2001 From: Manu Ponnapati Date: Fri, 25 Oct 2024 23:18:08 -0700 Subject: [PATCH 08/16] workflow --- .github/workflows/docs.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 14580596..d550ab92 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: check out + uses: actions/checkout@v3 + with: + ref: docs - uses: actions/setup-python@v4 - name: Install dependencies run: | @@ -30,5 +33,5 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: docs + publish_branch: gh-pages publish_dir: docs/_build/html From ec3404dca76cd1dcd2a20d9c96df78e95d30803c Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 23:24:28 -0700 Subject: [PATCH 09/16] Update docs.yml --- .github/workflows/docs.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d550ab92..a7c84c55 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,9 +25,13 @@ jobs: python -m pip install --upgrade pip pip install sphinx sphinx_rtd_theme + - name: Generate .rst files using sphinx-apidoc + working-directory: ./docs + run: sphinx-apidoc -o . ../src/aviary + - name: Build the Sphinx documentation working-directory: ./docs - run: sphinx-apidoc -o . ../src/aviary && make clean && make html + run: make html - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 From bb0ff83a6a4f78ff39854629872f6e6ee2ae750a Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 23:34:28 -0700 Subject: [PATCH 10/16] Update docs.yml --- .github/workflows/docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a7c84c55..d87b3bd4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,9 @@ jobs: - name: Generate .rst files using sphinx-apidoc working-directory: ./docs run: sphinx-apidoc -o . ../src/aviary - + - name: Clean previous builds + working-directory: ./docs + run: make clean - name: Build the Sphinx documentation working-directory: ./docs run: make html From 0724ad3394b351a3fabfe01c0506299949138e3a Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 23:43:52 -0700 Subject: [PATCH 11/16] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..9c10569d --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +aviary.bio From be8a485960c719f8d0782830867e2a6f981262cb Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 23:49:57 -0700 Subject: [PATCH 12/16] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index 9c10569d..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -aviary.bio From a9cbbc14562310d961f5555220c34952fc27a393 Mon Sep 17 00:00:00 2001 From: Manvitha Ponnapati Date: Fri, 25 Oct 2024 23:54:06 -0700 Subject: [PATCH 13/16] Update docs.yml --- .github/workflows/docs.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d87b3bd4..d9871a17 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,13 +24,15 @@ jobs: run: | python -m pip install --upgrade pip pip install sphinx sphinx_rtd_theme - - - name: Generate .rst files using sphinx-apidoc - working-directory: ./docs - run: sphinx-apidoc -o . ../src/aviary + - name: Clean previous builds working-directory: ./docs run: make clean + + - name: Generate .rst files using sphinx-apidoc + working-directory: ./docs + run: sphinx-apidoc -o . ../src/aviary + - name: Build the Sphinx documentation working-directory: ./docs run: make html From c5420f4bc46262c4b6e8fe15a4db5cf47fad5c55 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sat, 26 Oct 2024 03:36:47 -0700 Subject: [PATCH 14/16] Addressing PR comments --- .github/workflows/docs.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d9871a17..5f852e50 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,20 +5,14 @@ on: branches: - main # Change to your default branch - docs - pull_request: - branches: - - main # Optional: build on pull requests to the main branch - - docs + workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - - name: check out - uses: actions/checkout@v3 - with: - ref: docs + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 - name: Install dependencies run: | @@ -41,5 +35,5 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_branch: gh-pages + cname: aviary.bio publish_dir: docs/_build/html From 26a4e3f8aecc49c641ccda328cff27cadbddfc1a Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sat, 26 Oct 2024 03:41:10 -0700 Subject: [PATCH 15/16] Update docs.yml --- .github/workflows/docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5f852e50..54780ea3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ name: docs on: push: branches: - - main # Change to your default branch + - main - docs workflow_dispatch: @@ -13,11 +13,14 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: docs - uses: actions/setup-python@v4 - name: Install dependencies run: | python -m pip install --upgrade pip pip install sphinx sphinx_rtd_theme + pip install . - name: Clean previous builds working-directory: ./docs From 8615550fe061b7f71595bc1d4607ca2ae28a035f Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sat, 26 Oct 2024 03:42:45 -0700 Subject: [PATCH 16/16] Update docs.yml --- .github/workflows/docs.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 54780ea3..dfda2d68 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,14 +13,12 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: docs - uses: actions/setup-python@v4 - name: Install dependencies run: | python -m pip install --upgrade pip pip install sphinx sphinx_rtd_theme - pip install . + pip install .[all] - name: Clean previous builds working-directory: ./docs