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

update flytekit docs theme, fix index links #439

Merged
merged 7 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ attrs==20.3.0
# pytest
black==20.8b1
# via
# -c requirements.txt
# -r dev-requirements.in
# flake8-black
click==7.1.2
Expand Down
1 change: 1 addition & 0 deletions doc-requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.[all]
-e file:.#egg=flytekit

furo
sphinx
sphinx-gallery
sphinx-prompt
Expand Down
35 changes: 18 additions & 17 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ ansiwrap==0.8.4
# via papermill
appdirs==1.4.4
# via black
astroid==2.5.1
appnope==0.1.2
# via
# ipykernel
# ipython
astroid==2.5.2
# via sphinx-autoapi
async-generator==1.10
# via nbclient
Expand All @@ -28,15 +32,16 @@ bcrypt==3.2.0
# via paramiko
beautifulsoup4==4.9.3
# via
# furo
# sphinx-code-include
# sphinx-material
black==20.8b1
# via papermill
bleach==3.3.0
# via nbconvert
boto3==1.17.39
boto3==1.17.40
# via sagemaker-training
botocore==1.20.39
botocore==1.20.40
# via
# boto3
# s3transfer
Expand All @@ -61,7 +66,6 @@ cryptography==3.4.7
# via
# -r doc-requirements.in
# paramiko
# secretstorage
css-html-js-minify==2.5.5
# via sphinx-material
dataclasses-json==0.5.2
Expand All @@ -86,6 +90,8 @@ entrypoints==0.3
# papermill
flyteidl==0.18.26
# via flytekit
furo==2021.3.20b30
# via -r doc-requirements.in
gevent==21.1.2
# via sagemaker-training
greenlet==1.0.0
Expand All @@ -100,24 +106,20 @@ idna==2.10
# via requests
imagesize==1.2.0
# via sphinx
importlib-metadata==3.7.3
importlib-metadata==3.9.1
# via keyring
inotify_simple==1.2.1
# via sagemaker-training
ipykernel==5.5.0
ipykernel==5.5.2
# via flytekit
ipython-genutils==0.2.0
# via
# nbformat
# traitlets
ipython==7.21.0
ipython==7.22.0
# via ipykernel
jedi==0.18.0
# via ipython
jeepney==0.6.0
# via
# keyring
# secretstorage
jinja2==2.11.3
# via
# nbconvert
Expand Down Expand Up @@ -152,7 +154,7 @@ markupsafe==1.1.1
# via jinja2
marshmallow-enum==1.5.1
# via dataclasses-json
marshmallow==3.10.0
marshmallow==3.11.0
# via
# dataclasses-json
# marshmallow-enum
Expand All @@ -177,7 +179,7 @@ nbformat==5.1.2
# papermill
nest-asyncio==1.5.1
# via nbclient
numpy==1.20.1
numpy==1.20.2
# via
# flytekit
# pandas
Expand Down Expand Up @@ -273,22 +275,20 @@ requests==2.25.1
# papermill
# responses
# sphinx
responses==0.13.1
responses==0.13.2
# via flytekit
retry==0.9.2
# via flytekit
retrying==1.3.3
# via sagemaker-training
s3transfer==0.3.6
# via boto3
sagemaker-training==3.7.3
sagemaker-training==3.7.4
# via flytekit
scantree==0.0.1
# via dirhash
scipy==1.6.2
# via sagemaker-training
secretstorage==3.3.1
# via keyring
six==1.15.0
# via
# bcrypt
Expand Down Expand Up @@ -327,6 +327,7 @@ sphinx-prompt==1.4.0
sphinx==3.5.3
# via
# -r doc-requirements.in
# furo
# sphinx-autoapi
# sphinx-code-include
# sphinx-copybutton
Expand Down
33 changes: 33 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}

.sidebar-logo {
max-width: 30%;
}


.sidebar-tree .reference.external:after {
content: none;
}

div.sphx-glr-download a {
color: #4300c9;
background-color: rgb(241, 241, 241);
background-image: none;
border: 1px solid rgb(202, 202, 202);
}

div.sphx-glr-download a:hover {
background-color: rgb(230, 230, 230);
box-shadow: none;
}

div.sphx-glr-thumbcontainer a.headerlink {
display: none;
}

div.sphx-glr-thumbcontainer:hover {
border-color: white;
box-shadow: none;
}
18 changes: 18 additions & 0 deletions docs/source/_templates/sidebar/brand.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<a class="sidebar-brand{% if logo %} centered{% endif %}" href="{{ home_page }}">
{% block brand_content %}
{%- if logo %}
<div class="sidebar-logo-container">
<img class="sidebar-logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</div>
{%- endif %}
{%- if theme_light_logo and theme_dark_logo %}
<div class="sidebar-logo-container">
<img class="sidebar-logo only-light" src="{{ pathto('_static/' + theme_light_logo, 1) }}" alt="Light Logo"/>
<img class="sidebar-logo only-dark" src="{{ pathto('_static/' + theme_dark_logo, 1) }}" alt="Dark Logo"/>
</div>
{%- endif %}
{% if not theme_sidebar_hide_name %}
<span class="sidebar-brand-text">{{ docstitle }}</span>
{%- endif %}
{% endblock brand_content %}
</a>
57 changes: 26 additions & 31 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,55 +87,50 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_material"
html_theme = "furo"
html_title = "Flyte Docs"

html_theme_options = {
# Set the name of the project to appear in the navigation.
"nav_title": "Flytekit Python Reference",
# Set you GA account ID to enable tracking
"google_analytics_account": "G-YQL24L5CKY",
# Specify a base_url used to generate sitemap.xml. If not
# specified, then no sitemap will be built.
"base_url": "https://github.com/lyft/flytekit",
# Set the color and the accent color
"color_primary": "deep-purple",
"color_accent": "blue",
# Set the repo location to get a badge with stats
"repo_url": "https://github.com/lyft/flyte/",
"repo_name": "flyte",
# Visible levels of the global TOC; -1 means unlimited
"globaltoc_depth": 1,
# If False, expand all TOC entries
"globaltoc_collapse": False,
# If True, show hidden TOC entries
"globaltoc_includehidden": False,
# don't include home link in breadcrumb bar, since it's included
# in the nav_links key below.
"master_doc": False,
# custom nav in breadcrumb bar
"nav_links": [
{"href": "https://flyte.readthedocs.io/", "internal": False, "title": "Flyte"},
{"href": "https://flytecookbook.readthedocs.io", "internal": False, "title": "Flytekit Tutorials"},
{"href": "index", "internal": True, "title": "Flytekit Python Reference"},
],
"light_css_variables": {
"color-brand-primary": "#4300c9",
"color-brand-content": "#4300c9",
},
"dark_css_variables": {
"color-brand-primary": "#9D68E4",
"color-brand-content": "#9D68E4",
},
}

templates_path = ["_templates"]

# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
html_sidebars = {"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]}
# 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 = []
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
html_logo = "flyte_circle_gradient_1_4x4.png"

pygments_style = "tango"
pygments_dark_style = "paraiso-dark"

html_css_files = [
"custom.css",
]

html_context = {
"home_page": "https://docs.flyte.org",
}


# -- Options for HTMLHelp output ---------------------------------------------

Expand Down
5 changes: 4 additions & 1 deletion docs/source/design/authoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ Workflows
=========
There is currently only one :py:class:`Workflow <flytekit.core.workflow.Workflow>` class.

.. autoclass:: flytekit.core.workflow.Workflow
.. autoclass:: flytekit.core.workflow.PythonFunctionWorkflow
:noindex:

Launch Plan
===========
There is also only one :py:class:`LaunchPlan <flytekit.core.launch_plan.LaunchPlan>` class.

.. autoclass:: flytekit.core.launch_plan.LaunchPlan
:noindex:

**************
Call Patterns
**************
Expand Down
5 changes: 5 additions & 0 deletions docs/source/flytekit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
:no-members:
:no-inherited-members:
:no-special-members:

.. automodule:: flytekit.core
:no-members:
:no-inherited-members:
:no-special-members:
9 changes: 0 additions & 9 deletions docs/source/generator.rst

This file was deleted.

22 changes: 8 additions & 14 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ This section of the documentation provides more detailed descriptions of the hig
API reference for specific usage details of python functions, classes, and decorators that you import to specify tasks,
build workflows, extend ``flytekit``.

.. toctree::
:maxdepth: 4
:hidden:

Getting Started <https://docs.flyte.org/en/latest/getting_started.html>
Tutorials <https://flytecookbook.readthedocs.io>
reference/index

.. toctree::
:maxdepth: 1
:caption: Design
Expand All @@ -32,17 +40,3 @@ build workflows, extend ``flytekit``.
contributing
tasks.extend
types.extend


.. toctree::
:maxdepth: 1
:hidden:

generator

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
24 changes: 24 additions & 0 deletions docs/source/reference/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#############
API Reference
#############

.. toctree::
:maxdepth: 1
:caption: API Reference
:name: apitoc

Flytekit Python <self>
Flytekit JAVA <https://github.com/spotify/flytekit-java>
Flyte Core Language Specification (FlyteIDL) <https://flyte.readthedocs.io/projects/flyteidl/en/latest/>
Flytectl <https://flytectl.readthedocs.io/en/latest/>

.. toctree::
:maxdepth: 1
:caption: Component Reference (Code docs)
:name: componentreftoc

FlytePropeller <https://pkg.go.dev/mod/github.com/flyteorg/flytepropeller>
FlyteAdmin <https://pkg.go.dev/mod/github.com/flyteorg/flyteadmin>
FlytePlugins <https://pkg.go.dev/mod/github.com/flyteorg/flyteplugins>
DataCatalog <https://pkg.go.dev/mod/github.com/flyteorg/datacatalog>

Loading