Skip to content

Commit adfded3

Browse files
committed
Fix documentation building for ReadTheDocs
Signed-off-by: Willem Pienaar <git@willem.co>
1 parent 3b6d993 commit adfded3

27 files changed

+897
-34
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ dmypy.json
185185
*.code-workspace
186186

187187
# Protos
188-
sdk/python/docs/source
189188
sdk/python/docs/html
190189
sdk/python/feast/protos/
191190
sdk/go/protos/

.readthedocs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ formats:
99
python:
1010
version: 3.7
1111
install:
12-
- requirements: sdk/python/docs/requirements.txt
13-
- path: sdk/python/
14-
method: setuptools
12+
- requirements: sdk/python/docs/requirements.txt

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
[![integration-tests](https://github.com/feast-dev/feast/actions/workflows/integration_tests.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/integration_tests.yml)
1010
[![linter](https://github.com/feast-dev/feast/actions/workflows/linter.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/linter.yml)
1111
[![Docs Latest](https://img.shields.io/badge/docs-latest-blue.svg)](https://docs.feast.dev/)
12-
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/feast-dev/feast/blob/master/LICENSE)
12+
[![Python API](https://img.shields.io/readthedocs/feast/master?label=Python%20API)](http://rtd.feast.dev/)
13+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue)](https://github.com/feast-dev/feast/blob/master/LICENSE)
1314
[![GitHub Release](https://img.shields.io/github/v/release/feast-dev/feast.svg?style=flat&sort=semver&color=blue)](https://github.com/feast-dev/feast/releases)
1415

1516
## Overview

sdk/python/docs/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ help:
1515

1616
.PHONY: help Makefile source
1717

18-
clean-source:
19-
rm -rf $(PROJECT_ROOT)/sdk/python/docs/source
20-
2118
clean-html:
2219
rm -rf $(PROJECT_ROOT)/sdk/python/docs/html
2320

24-
build-api-source: clean-source
21+
build-api-source:
2522
sphinx-apidoc -f -o source $(PROJECT_ROOT)/sdk/python/feast
2623
cp conf.py index.rst source/
2724

sdk/python/docs/index.rst

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
Feast Python API Documentation
22
=============================
33

4-
Client
4+
5+
Feature Store
6+
---------------------------
7+
8+
.. automodule:: feast.feature_store
9+
:members:
10+
:undoc-members:
11+
:show-inheritance:
12+
13+
Config
514
==================
615

7-
.. automodule:: feast.client
16+
.. automodule:: feast.repo_config
817
:members:
18+
:exclude-members: load_repo_config
919

1020
Data Source
1121
==================
@@ -22,6 +32,12 @@ Entity
2232
:members:
2333

2434

35+
Feature View
36+
==================
37+
38+
.. automodule:: feast.feature_view
39+
:members:
40+
2541
Feature Table
2642
==================
2743

@@ -34,17 +50,3 @@ Feature
3450
.. automodule:: feast.feature
3551
:inherited-members:
3652
:members:
37-
38-
Constants
39-
==================
40-
41-
.. automodule:: feast.constants
42-
:members:
43-
:exclude-members: AuthProvider, ConfigMeta
44-
45-
Config
46-
==================
47-
48-
.. automodule:: feast.repo_config
49-
:members:
50-
:exclude-members: load_repo_config

sdk/python/docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ grpcio-tools==1.31.0
22
mypy==0.790
33
mypy-protobuf==1.24
44
firebase-admin==4.5.2
5-
google-cloud-datastore==2.1.0
5+
google-cloud-datastore==2.1.0
6+
-e "./sdk/python/[ci]"

sdk/python/docs/source/conf.py

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Feast documentation build configuration file, created by
4+
# sphinx-quickstart on Sat Nov 30 15:06:53 2019.
5+
#
6+
# This file is execfile()d with the current directory set to its
7+
# containing dir.
8+
#
9+
# Note that not all possible configuration values are present in this
10+
# autogenerated file.
11+
#
12+
# All configuration values have a default; values that are commented out
13+
# serve to show the default.
14+
15+
# If extensions (or modules to document with autodoc) are in another directory,
16+
# add these directories to sys.path here. If the directory is relative to the
17+
# documentation root, use os.path.abspath to make it absolute, like shown here.
18+
#
19+
import os
20+
import sys
21+
22+
import sphinx_rtd_theme
23+
24+
sys.path.insert(0, os.path.abspath("../../feast"))
25+
sys.path.insert(0, os.path.abspath("../.."))
26+
27+
28+
# -- General configuration ------------------------------------------------
29+
30+
# If your documentation needs a minimal Sphinx version, state it here.
31+
#
32+
# needs_sphinx = '1.0'
33+
34+
# Add any Sphinx extension module names here, as strings. They can be
35+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36+
# ones.
37+
extensions = [
38+
"sphinx.ext.doctest",
39+
"sphinx.ext.intersphinx",
40+
"sphinx.ext.todo",
41+
"sphinx.ext.coverage",
42+
"sphinx.ext.mathjax",
43+
"sphinx.ext.ifconfig",
44+
"sphinx.ext.viewcode",
45+
"sphinx.ext.githubpages",
46+
"sphinx.ext.napoleon",
47+
"sphinx.ext.autodoc",
48+
"sphinx_rtd_theme",
49+
]
50+
51+
# Add any paths that contain templates here, relative to this directory.
52+
templates_path = ["_templates"]
53+
54+
# The suffix(es) of source filenames.
55+
# You can specify multiple suffix as a list of string:
56+
#
57+
# source_suffix = ['.rst', '.md']
58+
source_suffix = ".rst"
59+
60+
# The master toctree document.
61+
master_doc = "index"
62+
63+
# General information about the project.
64+
project = "Feast"
65+
copyright = "2021, Feast Authors"
66+
author = "Feast Authors"
67+
68+
# The version info for the project you're documenting, acts as replacement for
69+
# |version| and |release|, also used in various other places throughout the
70+
# built documents.
71+
#
72+
# The short X.Y version.
73+
74+
# TODO: Add the below versions back to documentation building.
75+
# version = (
76+
# os.popen("git describe --tags $(git rev-list --tags --max-count=1)").read().strip()
77+
# )
78+
# The full version, including alpha/beta/rc tags.
79+
# release = (
80+
# os.popen("git describe --tags $(git rev-list --tags --max-count=1)").read().strip()
81+
# )
82+
83+
# The language for content autogenerated by Sphinx. Refer to documentation
84+
# for a list of supported languages.
85+
#
86+
# This is also used if you do content translation via gettext catalogs.
87+
# Usually you set "language" from the command line for these cases.
88+
language = None
89+
90+
# List of patterns, relative to source directory, that match files and
91+
# directories to ignore when looking for source files.
92+
# This patterns also effect to html_static_path and html_extra_path
93+
exclude_patterns = []
94+
95+
# The name of the Pygments (syntax highlighting) style to use.
96+
pygments_style = "sphinx"
97+
98+
# If true, `todo` and `todoList` produce output, else they produce nothing.
99+
todo_include_todos = True
100+
101+
102+
# -- Options for HTML output ----------------------------------------------
103+
104+
# The theme to use for HTML and HTML Help pages. See the documentation for
105+
# a list of builtin themes.
106+
#
107+
html_theme = "sphinx_rtd_theme"
108+
109+
# Theme options are theme-specific and customize the look and feel of a theme
110+
# further. For a list of options available for each theme, see the
111+
# documentation.
112+
#
113+
html_theme_options = {}
114+
115+
# Add any paths that contain custom static files (such as style sheets) here,
116+
# relative to this directory. They are copied after the builtin static files,
117+
# so a file named "default.css" will overwrite the builtin "default.css".
118+
html_static_path = ["_static"]
119+
120+
121+
# -- Options for HTMLHelp output ------------------------------------------
122+
123+
# Output file base name for HTML help builder.
124+
htmlhelp_basename = "Feastdoc"
125+
126+
127+
# -- Options for LaTeX output ---------------------------------------------
128+
129+
latex_elements = {
130+
# The paper size ('letterpaper' or 'a4paper').
131+
#
132+
# 'papersize': 'letterpaper',
133+
# The font size ('10pt', '11pt' or '12pt').
134+
#
135+
# 'pointsize': '10pt',
136+
# Additional stuff for the LaTeX preamble.
137+
#
138+
# 'preamble': '',
139+
# Latex figure (float) alignment
140+
#
141+
# 'figure_align': 'htbp',
142+
}
143+
144+
# Grouping the document tree into LaTeX files. List of tuples
145+
# (source start file, target name, title,
146+
# author, documentclass [howto, manual, or own class]).
147+
latex_documents = [
148+
(master_doc, "Feast.tex", "Feast Documentation", "Feast Authors", "manual")
149+
]
150+
151+
152+
# -- Options for manual page output ---------------------------------------
153+
154+
# One entry per manual page. List of tuples
155+
# (source start file, name, description, authors, manual section).
156+
man_pages = [(master_doc, "feast", "Feast Documentation", [author], 1)]
157+
158+
159+
# -- Options for Texinfo output -------------------------------------------
160+
161+
# Grouping the document tree into Texinfo files. List of tuples
162+
# (source start file, target name, title, author,
163+
# dir menu entry, description, category)
164+
texinfo_documents = [
165+
(
166+
master_doc,
167+
"Feast",
168+
"Feast Documentation",
169+
author,
170+
"Feast",
171+
"One line description of project.",
172+
"Miscellaneous",
173+
)
174+
]
175+
176+
177+
# Example configuration for intersphinx: refer to the Python standard library.
178+
intersphinx_mapping = {"https://docs.python.org/": None}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
feast.infra package
2+
===================
3+
4+
Submodules
5+
----------
6+
7+
feast.infra.gcp module
8+
----------------------
9+
10+
.. automodule:: feast.infra.gcp
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
feast.infra.key\_encoding\_utils module
16+
---------------------------------------
17+
18+
.. automodule:: feast.infra.key_encoding_utils
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
feast.infra.local\_sqlite module
24+
--------------------------------
25+
26+
.. automodule:: feast.infra.local_sqlite
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
feast.infra.provider module
32+
---------------------------
33+
34+
.. automodule:: feast.infra.provider
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
Module contents
40+
---------------
41+
42+
.. automodule:: feast.infra
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
feast.loaders package
2+
=====================
3+
4+
Submodules
5+
----------
6+
7+
feast.loaders.abstract\_producer module
8+
---------------------------------------
9+
10+
.. automodule:: feast.loaders.abstract_producer
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
feast.loaders.file module
16+
-------------------------
17+
18+
.. automodule:: feast.loaders.file
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
feast.loaders.ingest module
24+
---------------------------
25+
26+
.. automodule:: feast.loaders.ingest
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
feast.loaders.yaml module
32+
-------------------------
33+
34+
.. automodule:: feast.loaders.yaml
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
Module contents
40+
---------------
41+
42+
.. automodule:: feast.loaders
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:

0 commit comments

Comments
 (0)