Skip to content

Commit

Permalink
update docs theme (#876)
Browse files Browse the repository at this point in the history
* update docs theme

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

* remove sphinx material and readthedocs search

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

* update flytekit link

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

* update

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

* add readthedocs sphinx search

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>

* update community link

Signed-off-by: cosmicBboy <niels.bantilan@gmail.com>
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
  • Loading branch information
cosmicBboy authored and EngHabu committed Apr 30, 2021
1 parent da88980 commit de34713
Show file tree
Hide file tree
Showing 11 changed files with 182 additions and 267 deletions.
3 changes: 2 additions & 1 deletion doc-requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
furo
readthedocs-sphinx-search
sphinx
sphinx-prompt
sphinx-material
sphinx-code-include
sphinx-autoapi
sphinx-copybutton
Expand Down
42 changes: 17 additions & 25 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
#
alabaster==0.7.12
# via sphinx
astroid==2.4.2
astroid==2.5.2
# via sphinx-autoapi
babel==2.9.0
# via sphinx
beautifulsoup4==4.9.3
# via
# furo
# sphinx-code-include
# sphinx-material
certifi==2020.12.5
# via requests
chardet==4.0.0
# via requests
css-html-js-minify==2.5.5
# via sphinx-material
docutils==0.16
# via sphinx
furo==2021.3.20b30
# via -r doc-requirements.in
idna==2.10
# via requests
imagesize==1.2.0
Expand All @@ -30,36 +30,34 @@ jinja2==2.11.3
# via
# sphinx
# sphinx-autoapi
lazy-object-proxy==1.4.3
lazy-object-proxy==1.6.0
# via astroid
lxml==4.6.2
# via sphinx-material
markupsafe==1.1.1
# via jinja2
packaging==20.9
# via sphinx
pygments==2.7.4
pygments==2.8.1
# via
# sphinx
# sphinx-prompt
# sphinx-tabs
pyparsing==2.4.7
# via packaging
python-slugify[unidecode]==4.0.1
# via sphinx-material
pytz==2021.1
# via babel
pyyaml==5.4.1
# via sphinx-autoapi
readthedocs-sphinx-search==0.1.0
# via -r doc-requirements.in
requests==2.25.1
# via sphinx
six==1.15.0
# via
# astroid
# sphinx-code-include
# sphinxext-remoteliteralinclude
snowballstemmer==2.1.0
# via sphinx
soupsieve==2.2
soupsieve==2.2.1
# via beautifulsoup4
sphinx-autoapi==1.7.0
# via -r doc-requirements.in
Expand All @@ -69,20 +67,18 @@ sphinx-copybutton==0.3.1
# via -r doc-requirements.in
sphinx-issues==1.2.0
# via -r doc-requirements.in
sphinx-material==0.0.32
# via -r doc-requirements.in
sphinx-prompt==1.3.0
sphinx-prompt==1.4.0
# via -r doc-requirements.in
sphinx-tabs==2.0.1
sphinx-tabs==2.1.0
# via -r doc-requirements.in
sphinx==3.4.3
sphinx==3.5.3
# via
# -r doc-requirements.in
# furo
# sphinx-autoapi
# sphinx-code-include
# sphinx-copybutton
# sphinx-issues
# sphinx-material
# sphinx-prompt
# sphinx-tabs
# sphinxext-remoteliteralinclude
Expand All @@ -98,15 +94,11 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.4
# via sphinx
sphinxext-remoteliteralinclude==0.1.0
sphinxext-remoteliteralinclude==0.2.0
# via -r doc-requirements.in
text-unidecode==1.3
# via python-slugify
unidecode==1.2.0
# via
# python-slugify
# sphinx-autoapi
urllib3==1.26.3
# via sphinx-autoapi
urllib3==1.26.4
# via requests
wrapt==1.12.1
# via astroid
Expand Down
11 changes: 11 additions & 0 deletions rsts/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}

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

.sidebar-tree .reference.external:after {
content: none;
}
66 changes: 27 additions & 39 deletions rsts/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import sphinx.application
import sphinx.errors
sphinx.application.ExtensionError = sphinx.errors.ExtensionError

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

project = u'Flyte'
Expand Down Expand Up @@ -55,6 +59,7 @@
"sphinx_tabs.tabs",
"sphinxext.remoteliteralinclude",
"sphinx_issues",
"sphinx_search.extension",
]

extlinks = {
Expand Down Expand Up @@ -97,45 +102,28 @@
#
html_favicon = "images/flyte_circle_gradient_1_4x4.png"
html_logo = "images/flyte_circle_gradient_1_4x4.png"
html_static_path = []
html_theme = "sphinx_material"
html_theme = "furo"
html_title = "Flyte Docs"

html_static_path = ["_static"]
templates_path = ["_templates"]

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

html_css_files = [
"custom.css",
]

html_theme_options = {
# Set the name of the project to appear in the navigation.
"nav_title": "Flyte",
# 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/flyteorg/flyte",
# 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/flyteorg/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": True,
# 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": "index", "internal": True, "title": "Flyte"},
{
"href": "https://flytecookbook.readthedocs.io",
"internal": False,
"title": "Tutorials",
},
{
"href": "https://flytekit.readthedocs.io",
"internal": False,
"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",
},
}

# Theme options are theme-specific and customize the look and feel of a theme
Expand All @@ -157,7 +145,7 @@
# 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"]}

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

Expand Down
74 changes: 74 additions & 0 deletions rsts/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.. _gettingstarted:

Getting started
---------------

.. rubric:: Estimated time: 3 minutes

Prerequisites
#############

Make sure you have `docker installed <https://docs.docker.com/get-docker/>`__ and `git <https://git-scm.com/>`__ installed, then install flytekit:

.. prompt:: bash

pip install flytekit

Clone the `flytekit-python-template <https://github.com/flyteorg/flytekit-python-template>`__ repo to create our own git repository called ``flyteexamples``:

.. prompt:: bash

git clone git@github.com:flyteorg/flytekit-python-template.git flyteexamples
cd flyteexamples


Write Your First Flyte Workflow
###############################


Let's take a look at the example workflow in `myapp/workflows/example.py <https://github.com/flyteorg/flytekit-python-template/blob/main/myapp/workflows/example.py>`__:

.. rli:: https://raw.githubusercontent.com/flyteorg/flytekit-python-template/main/myapp/workflows/example.py
:language: python

As you can see, a Flyte :std:doc:`task <generated/flytekit.task>` is the most basic unit of work in Flyte,
and you can compose multiple tasks into a :std:doc:`workflow <generated/flytekit.workflow>`. Try running and
modifying the ``example.py`` script locally.

Start a Local Flyte Backend
###########################

Once you're happy with the ``example.py`` script, run the following command in your terminal:

.. prompt:: bash

docker run --rm --privileged -p 30081:30081 -p 30082:30082 -p 30084:30084 ghcr.io/flyteorg/flyte-sandbox

When you see the message ``Flyte is ready!``, your local sandbox should be ready on http://localhost:30081/console.

Register Your Workflows
###########################

Now we're ready to ship your code to the Flyte backend by running the following command:

.. prompt:: bash

FLYTE_AWS_ENDPOINT=http://localhost:30084/ FLYTE_AWS_ACCESS_KEY_ID=minio FLYTE_AWS_SECRET_ACCESS_KEY=miniostorage make fast_register

Run Your Workflows
##################

To run a workflow, go to http://localhost:30081/console/projects/flyteexamples/workflows and then follow these steps:

1. Select the ``hello_world`` workflow
2. Click the **Launch Workflow** button in the upper right corner
3. Update the ``name`` input argument
4. Proceed to **Launch** to trigger an execution

.. rubric:: 🎉 Congratulations, you just ran your first Flyte workflow 🎉


Next Steps: Tutorials
#####################

To experience the full capabilities of Flyte, try out the `Flytekit Tutorials <https://flytecookbook.readthedocs.io/en/latest/>`__ 🛫
60 changes: 0 additions & 60 deletions rsts/getting_started/first_example.rst

This file was deleted.

26 changes: 0 additions & 26 deletions rsts/getting_started/first_run.rst

This file was deleted.

Loading

0 comments on commit de34713

Please sign in to comment.