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

Redocs into main #67

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
paths-ignore:
- '**.rst'
- 'tests/test_vllm.py' # requires vllm to be installed

jobs:
build:
Expand All @@ -26,7 +25,7 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest
pytest --ignore=tests/test_vllm.py

contrib-readme-job:
runs-on: ubuntu-latest
Expand Down
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ pip install git+https:/zou-group/textgrad.git
**Installing textgrad with vllm**:

```sh
pip3 install textgrad[vllm]
pip install textgrad[vllm]
```

See [here](https://pip.pypa.io/en/stable/cli/pip_install/) for more details on various methods of pip installation.
Expand Down Expand Up @@ -313,6 +313,13 @@ We are grateful for all the help we got from our contributors!
<table>
<tbody>
<tr>
<td align="center">
<a href="https:/mertyg">
<img src="https://avatars.githubusercontent.com/u/29640736?v=4" width="100;" alt="mertyg"/>
<br />
<sub><b>Mert Yuksekgonul</b></sub>
</a>
</td>
<td align="center">
<a href="https:/vinid">
<img src="https://avatars.githubusercontent.com/u/2234699?v=4" width="100;" alt="vinid"/>
Expand All @@ -321,10 +328,17 @@ We are grateful for all the help we got from our contributors!
</a>
</td>
<td align="center">
<a href="https:/mertyg">
<img src="https://avatars.githubusercontent.com/u/29640736?v=4" width="100;" alt="mertyg"/>
<a href="https:/lupantech">
<img src="https://avatars.githubusercontent.com/u/17663606?v=4" width="100;" alt="lupantech"/>
<br />
<sub><b>Mert Yuksekgonul</b></sub>
<sub><b>Pan Lu</b></sub>
</a>
</td>
<td align="center">
<a href="https:/nihalnayak">
<img src="https://avatars.githubusercontent.com/u/5679782?v=4" width="100;" alt="nihalnayak"/>
<br />
<sub><b>Nihal Nayak</b></sub>
</a>
</td>
<td align="center">
Expand All @@ -335,12 +349,14 @@ We are grateful for all the help we got from our contributors!
</a>
</td>
<td align="center">
<a href="https:/lupantech">
<img src="https://avatars.githubusercontent.com/u/17663606?v=4" width="100;" alt="lupantech"/>
<a href="https:/AtakanTekparmak">
<img src="https://avatars.githubusercontent.com/u/59488384?v=4" width="100;" alt="AtakanTekparmak"/>
<br />
<sub><b>Pan Lu</b></sub>
<sub><b>Atakan Tekparmak</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https:/ruanwz">
<img src="https://avatars.githubusercontent.com/u/4874?v=4" width="100;" alt="ruanwz"/>
Expand All @@ -355,8 +371,6 @@ We are grateful for all the help we got from our contributors!
<sub><b>San </b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https:/huangzhii">
<img src="https://avatars.githubusercontent.com/u/10902358?v=4" width="100;" alt="huangzhii"/>
Expand Down
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 = source
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/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=source
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
12 changes: 12 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sphinx_autodoc_typehints
Copy link
Member

Choose a reason for hiding this comment

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

do we want to add versioning?

toml
sphinx-panels
sphinx-autobuild
sphinx_book_theme
sphinx-toolbox
sphinx-copybutton
sphinx_design
jinja2
sphinx
setuptools
textgrad
Binary file added docs/source/assets/analogy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/assets/logo_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'TextGrad'
copyright = '2024, TextGrad authors'
author = 'TextGrad authors'

# The full version, including alpha/beta/rc tags
release = '0.1.4'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.duration',
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'sphinx_book_theme'
]

autodoc_default_options = {
'members': True,
'special-members': ',__call__', # Add other special methods as needed
'undoc-members': True,
'show-inheritance': True
}


autodoc_typehints = 'description'
autosummary_generate = True # Enable autosummary
autoclass_content = 'both'

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_book_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
Loading
Loading