Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
axsaucedo committed Mar 8, 2021
1 parent ccad34e commit f17e612
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Tempo

![GitHub](https://img.shields.io/badge/Version-0.1.0-green.svg)
![GitHub](https://img.shields.io/badge/Python-3.5—3.8-blue.svg)
![GitHub](https://img.shields.io/badge/License-Apache-black.svg)]

# ⏳ Tempo: The Production MLOps Software Development Kit

An open source SDK to streamline workflows to productionise machine learning models at scale.

## Overview

Tempo provides a unified interface to multiple MLOps projects that enable data scientists to deploy and productionise machine learning systems.

104 changes: 104 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

find_package(Doxygen REQUIRED)

# Parameters to be replaced in Doxifile.in as "@VAR@"
file(GLOB_RECURSE DOXYGEN_INPUT_FILES_RAW
${PROJECT_SOURCE_DIR}/src/include/kompute/*.hpp)
# Need to do a string replace as files have to be
# space separated and with double quotes
string(REPLACE ";" "\" \""
DOXYGEN_INPUT_FILES "${DOXYGEN_INPUT_FILES_RAW}")
set(DOXYGEN_OUTPUT_DIR
${CMAKE_CURRENT_BINARY_DIR}/doxygen)
# DOXIGEN_DOT_PATH is also set automatically

# Parameters only used inside cmake script
set(DOXYGEN_INDEX_FILE
${DOXYGEN_OUTPUT_DIR}/html/index.html)
set(DOXYGEN_XML_PATH
${DOXYGEN_OUTPUT_DIR}/xml/)
set(DOXYFILE_IN
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
set(SPHINX_SOURCE
${CMAKE_CURRENT_SOURCE_DIR})
set(SPHINX_BUILD
${CMAKE_CURRENT_BINARY_DIR}/sphinx)
set(CODECOV_DOCS_DIR
${SPHINX_BUILD}/codecov/)
set(CODECOV_DOCS_INDEX_FILE
${CODECOV_DOCS_DIR}/index.html})

# Perform replacement with cmake vars inside Doxifine.in
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)

file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR})
add_custom_command(
OUTPUT ${DOXYGEN_INDEX_FILE}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
MAIN_DEPENDENCY ${DOXYFILE_IN} ${DOXYFILE_OUT}
COMMENT "Generating docs"
)

if(KOMPUTE_OPT_CODE_COVERAGE)
add_custom_target(gendoxygen ALL
DEPENDS ${DOXYGEN_INDEX_FILE} ${CODECOV_DOCS_INDEX_FILE})
else()
add_custom_target(gendoxygen ALL
DEPENDS ${DOXYGEN_INDEX_FILE})
endif()

#####################################################
########### CODECOV DOCS ###############
#####################################################

add_custom_command(
OUTPUT ${CODECOV_DOCS_INDEX_FILE}
COMMAND ${CMAKE_COMMAND}
-E copy_directory
${CODECOV_DIR_HTML}
${CODECOV_DOCS_DIR}
COMMAND ${CMAKE_COMMAND}
-E copy
${PROJECT_SOURCE_DIR}/docs/assets/gcov.css
${CODECOV_DOCS_DIR}/gcov.css
DEPENDS codecov_genhtml)

#####################################################
########### Sphinx ###############
#####################################################

find_package(Sphinx REQUIRED)

add_custom_target(gensphinx ALL
COMMAND
${SPHINX_EXECUTABLE} -b html
${SPHINX_SOURCE} ${SPHINX_BUILD}
-Dbreathe_projects.Kompute=${DOXYGEN_XML_PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS gendoxygen
COMMENT "Generating documentation with Sphinx")

# Copy the output doxygen html files
add_custom_target(gendocsall ALL
COMMAND ${CMAKE_COMMAND}
-E copy_directory
${DOXYGEN_OUTPUT_DIR}/html/
${SPHINX_BUILD}/doxygen/
# Copy the CNAME file from the repo
COMMAND ${CMAKE_COMMAND}
-E copy
${PROJECT_SOURCE_DIR}/CNAME
${SPHINX_BUILD}/CNAME
# Create assets directory
COMMAND ${CMAKE_COMMAND}
-E make_directory
${SPHINX_BUILD}/_static/assets/
# Copy the custom asset folder
COMMAND ${CMAKE_COMMAND}
-E copy_directory
${PROJECT_SOURCE_DIR}/docs/assets/
${SPHINX_BUILD}/_static/assets/
DEPENDS gensphinx)

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)
52 changes: 52 additions & 0 deletions docs/assets/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

/*
@media (max-width: 1200px) {
.md-header-nav__button {
color: #fff;
background-color: #ef5350 !important;
border-radius: 5px;
}
}
.md-nav__title--site {
display: none;
}
h1, h2, h3, h4, h5, h6 {
color:white !important;
}
.md-container, .md-main, .md-nav, .md-nav__list {
background-color: #252632 !important;
color: #fff;
}
.md-header, .md-tabs {
background-color: #ad152c !important;
}
pre, code {
background-color: #181820 !important;
color: #fff !important;
}
a {
color: #ff9292;
}
a:hover {
color: #fff;
}
.md-nav__item a {
color: #36D3D9;
}
.md-nav__item a:hover {
color: #0091ea;
}
.md-source {
color: #fff;
}
*/


103 changes: 103 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# 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 -----------------------------------------------------
import sys
import os
import kp
import sphinx_material

project = 'Tempo MLOps'
copyright = '2020, Seldon Technologies'
html_title = "Tempo MLOps"
author = 'Seldon Technologies'

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


# -- 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.autodoc",
# Creates .nojekyll config
'sphinx.ext.githubpages',
# Converts markdown to rst
"m2r2"
]
source_suffix = ['.rst', '.md']

# 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 = ['_build', 'Thumbs.db', '.DS_Store']

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# Chosen Themes:
# * https://github.com/bashtage/sphinx-material/
# * https://github.com/myyasuda/sphinx_materialdesign_theme
html_theme = 'sphinx_material'

if html_theme == 'sphinx_material':
html_theme_options = {
'google_analytics_account': '',
'base_url': 'https://tempo.seldon.io',
'color_primary': 'teal',
'color_accent': 'light-blue',
'repo_url': 'https://github.com/SeldonIO/tempo/',
'repo_name': 'Tempo',
'globaltoc_depth': 2,
'globaltoc_collapse': False,
'globaltoc_includehidden': False,
"repo_type": "github",
"nav_links": [
{
"href": "https://github.com/EthicalML/vulkan-kompute/",
"internal": False,
"title": "Tempo Repo",
},
]
}

extensions.append("sphinx_material")
html_theme_path = sphinx_material.html_theme_path()
html_context = sphinx_material.get_html_context()

html_sidebars = {
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
}

# 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']

html_css_files = [
'assets/custom.css',
]


4 changes: 4 additions & 0 deletions docs/genindex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. This file is a placeholder and will be replaced
Code index
##########
33 changes: 33 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

Tempo Docs Home
==========================================

Documentation Index (as per sidebar)
--------

.. toctree::
:titlesonly:
:caption: Python Documentation:

Quickstart <overview/quickstart>

.. toctree::
:titlesonly:
:caption: Examples:

Explainers <notebooks/explainer.nblink>

.. toctree::
:titlesonly:
:caption: Relevant Links:

MLServer Documentation <https://github.com/SeldonIO/mlserver>
Seldon Core Documentation <https://docs.seldon.io/projects/seldon-core/en/latest/>
KFServing Documentation <https://www.kubeflow.org/docs/components/serving/kfserving/>


High Level Overview (from README)
--------

.. mdinclude:: ../README.md

4 changes: 4 additions & 0 deletions docs/overview/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Tempo Quickstart Guide
###########

7 changes: 7 additions & 0 deletions docs/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Sphinx==3.2.1
sphinx_material==0.0.30
breathe==4.20.0
m2r2==0.2.5
nbsphinx==0.8.2
nbsphinx-link==1.1.0

0 comments on commit f17e612

Please sign in to comment.