Skip to content

Commit 78367a3

Browse files
authored
Merge pull request #17 from isabelizimm/dev-prettier-docs
prettier docs
2 parents ab0b614 + b5d6bf9 commit 78367a3

16 files changed

Lines changed: 170 additions & 21 deletions

.github/workflows/docs.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ jobs:
2121
run: |
2222
python -m pip install --upgrade pip
2323
python -m pip install -e .[dev]
24-
- uses: ammaraskar/sphinx-action@master
25-
with:
26-
docs-folder: "docs/"
27-
- uses: actions/upload-artifact@v1
24+
- name: build docs
25+
run: |
26+
cd docs
27+
make html
28+
- name: save docs
29+
uses: actions/upload-artifact@v3
2830
with:
29-
name: DocumentationHTML
31+
name: docs-html
3032
path: docs/_build/html/
31-
- name: Deploy
33+
- name: publish docs
3234
uses: peaceiris/actions-gh-pages@v3
3335
with:
3436
github_token: ${{ secrets.GITHUB_TOKEN }}

docs/source/conf.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = "vetiver"
21-
copyright = "2022, Isabel Zimmerman"
21+
copyright = "2022, RStudio"
2222
author = "Isabel Zimmerman"
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = "0.1.0"
25+
release = "0.1.3"
2626

2727

2828
# -- General configuration ---------------------------------------------------
@@ -36,7 +36,8 @@
3636
"sphinx.ext.autosummary",
3737
"sphinx.ext.napoleon",
3838
"sphinx.ext.githubpages",
39-
"sphinx.ext.autodoc"
39+
"sphinx.ext.autodoc",
40+
"myst_parser"
4041
]
4142
# Add any paths that contain templates here, relative to this directory.
4243
templates_path = ["_templates"]
@@ -52,7 +53,20 @@
5253
# The theme to use for HTML and HTML Help pages. See the documentation for
5354
# a list of builtin themes.
5455
#
55-
html_theme = "alabaster"
56+
html_theme = "sphinx_book_theme"
57+
58+
html_theme_options = {
59+
"repository_url": "https://github.com/tidymodels/vetiver-python",
60+
"use_repository_button": True,
61+
"use_issues_button": True,
62+
"use_edit_page_button": True,
63+
"home_page_in_toc": True
64+
65+
}
66+
67+
html_logo = "../figures/logo.png"
68+
html_favicon = "../figures/logo.png"
69+
5670

5771
# Add any paths that contain custom static files (such as style sheets) here,
5872
# relative to this directory. They are copied after the builtin static files,

docs/source/index.rst

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,46 @@
1-
.. vetiver documentation master file, created by
2-
sphinx-quickstart on Thu Mar 3 14:13:21 2022.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
6-
Welcome to vetiver's documentation!
1+
vetiver 🏺
72
===================================
3+
The goal of vetiver is to provide fluent tooling to version, share, deploy, and monitor a trained model. Functions handle both recording and checking the model’s input data prototype, and predicting from a remote API endpoint.
4+
You can use vetiver with:
5+
6+
- `scikit-learn <https://scikit-learn.org/stable/>`_
7+
- `pytorch <https://pytorch.org/>`_
8+
9+
This website documents the public API of Vetiver (for Python). See the `main Vetiver website <https://juliasilge.github.io/vetiver.dev/>`_ for
10+
a more holistic introduction to the API. The left-hand sidebar lists the full public
11+
API, and the sections below (linked to the right-hand sidebar) break it into similar groups, based on task.
812

913
.. toctree::
1014
:maxdepth: 2
1115
:caption: Contents:
1216

17+
Version
18+
==================
19+
20+
.. currentmodule:: vetiver
21+
22+
.. autosummary::
23+
:toctree: reference/
24+
:caption: Version
1325

26+
~VetiverModel
27+
~pin_read_write.vetiver_pin_read
28+
~pin_read_write.vetiver_pin_write
1429

15-
Indices and tables
30+
Deploy
1631
==================
1732

18-
* :ref:`genindex`
19-
* :ref:`modindex`
20-
* :ref:`search`
33+
.. currentmodule:: vetiver
34+
35+
.. autosummary::
36+
:toctree: reference/
37+
:caption: Deploy
38+
39+
~VetiverAPI
40+
~VetiverAPI.run
41+
~VetiverAPI.vetiver_post
42+
~vetiver_endpoint
43+
~predict
44+
~load_pkgs
45+
~vetiver_write_app
46+
~vetiver_write_docker
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
vetiver.VetiverAPI
2+
==================
3+
4+
.. currentmodule:: vetiver
5+
6+
.. autoclass:: VetiverAPI
7+
8+
9+
.. automethod:: __init__
10+
11+
12+
.. rubric:: Methods
13+
14+
.. autosummary::
15+
16+
~VetiverAPI.__init__
17+
~VetiverAPI.run
18+
~VetiverAPI.vetiver_post
19+
20+
21+
22+
23+
24+
.. rubric:: Attributes
25+
26+
.. autosummary::
27+
28+
~VetiverAPI.app
29+
30+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vetiver.VetiverAPI.run
2+
======================
3+
4+
.. currentmodule:: vetiver
5+
6+
.. automethod:: VetiverAPI.run
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vetiver.VetiverAPI.vetiver\_post
2+
================================
3+
4+
.. currentmodule:: vetiver
5+
6+
.. automethod:: VetiverAPI.vetiver_post
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
vetiver.VetiverModel
2+
====================
3+
4+
.. currentmodule:: vetiver
5+
6+
.. autoclass:: VetiverModel
7+
8+
9+
.. automethod:: __init__
10+
11+
12+
.. rubric:: Methods
13+
14+
.. autosummary::
15+
16+
~VetiverModel.__init__
17+
18+
19+
20+
21+
22+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vetiver.load\_pkgs
2+
==================
3+
4+
.. currentmodule:: vetiver
5+
6+
.. autofunction:: load_pkgs
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vetiver.pin\_read\_write.vetiver\_pin\_read
2+
===========================================
3+
4+
.. currentmodule:: vetiver.pin_read_write
5+
6+
.. autofunction:: vetiver_pin_read
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vetiver.pin\_read\_write.vetiver\_pin\_write
2+
============================================
3+
4+
.. currentmodule:: vetiver.pin_read_write
5+
6+
.. autofunction:: vetiver_pin_write

0 commit comments

Comments
 (0)