Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs test #92

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
40 changes: 40 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: docs

on:
push:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add workflow_dispatch

branches:
- main
- docs
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx_rtd_theme
Comment on lines +16 to +20
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use setup-uv, tool.uv for dependencies, and uv sync

pip install .[all]

- name: Clean previous builds
working-directory: ./docs
run: make clean
Comment on lines +23 to +25
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we need this? There's no previous builds and I don't see caching here


- name: Generate .rst files using sphinx-apidoc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add support for GSM8k and HotPotQA

working-directory: ./docs
run: sphinx-apidoc -o . ../src/aviary

- 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 }}
cname: aviary.bio
publish_dir: docs/_build/html
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -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)
35 changes: 35 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -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']
7 changes: 7 additions & 0 deletions docs/core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
core module
===========

.. automodule:: core
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/env.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
env module
==========

.. automodule:: env
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/env_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
env\_client module
==================

.. automodule:: env_client
:members:
:undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -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

7 changes: 7 additions & 0 deletions docs/main.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
main module
===========

.. automodule:: main
:members:
:undoc-members:
:show-inheritance:
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions docs/message.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
message module
==============

.. automodule:: message
:members:
:undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
aviary
======

.. toctree::
:maxdepth: 4

core
env
env_client
main
message
render
tools
utils
7 changes: 7 additions & 0 deletions docs/render.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
render module
=============

.. automodule:: render
:members:
:undoc-members:
:show-inheritance:
45 changes: 45 additions & 0 deletions docs/tools.rst
Original file line number Diff line number Diff line change
@@ -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:
7 changes: 7 additions & 0 deletions docs/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
utils module
============

.. automodule:: utils
:members:
:undoc-members:
:show-inheritance:
Loading