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

[WAIT TO MERGE] Flyte docs overhaul #5721

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
eb6ece9
start reorganizing
Aug 30, 2024
baa3604
update deployment docs
Sep 3, 2024
a0e5c0e
update index page
Sep 3, 2024
0f49f62
reorganize user guide
Sep 3, 2024
813fc3c
more sidebar updates
Sep 3, 2024
093503b
update concepts docs
Sep 3, 2024
accedc7
temporary tutorials and integrations index files to get build working
Sep 3, 2024
3f99e1c
renamed to cluster_deployment
Sep 3, 2024
cb5c4fa
update gitignore to match docs
Sep 3, 2024
2382300
add api reference docs structure
Sep 3, 2024
a31b08f
remove unneeded flyteidl file
Sep 3, 2024
00337f5
update docs conf
Sep 3, 2024
0350611
update with new locations of generated api docs
Sep 3, 2024
a6bc51d
add flyte api playground page
Sep 3, 2024
3da3afb
update index
Sep 3, 2024
d3be177
renamed this
Sep 3, 2024
eb58d55
add missing sidebar templates and ecosystem section
Sep 3, 2024
41f95a1
add missing sidebar
Sep 3, 2024
7470c49
add ecosystem section to index
Sep 3, 2024
8ecb2be
add quickstart guide and first workflow section back in
Sep 3, 2024
1517f86
incorporate introduction content into user guide index page
Sep 3, 2024
c272c3b
remove deprecated integrations (will move to flytesnacks/integrations)
Sep 3, 2024
9789edc
move flyte agents docs to user guide section
Sep 3, 2024
bcecdd6
update user guide index
Sep 3, 2024
ded64a7
reorganize some of the flyte fundamentals docs
Sep 3, 2024
a66348b
remove core use cases (will move to flytesnacks/tutorials)
Sep 3, 2024
e5dc72b
move optimizing tasks doc
Sep 3, 2024
8c83285
remove redundant flyte fundamentals articles - will incorporate conte…
Sep 3, 2024
c3763a4
fix toctree
Sep 3, 2024
737a992
do not copy flytekit source -- we will use autodoc instead
Sep 3, 2024
754dbd4
remove separate index page
Sep 3, 2024
b214532
move doc contribution guide from flytesnacks to community directory
Sep 3, 2024
de9a33b
placeholder TOCs
Sep 3, 2024
2be4181
move environment setup to user guide for now
Sep 3, 2024
6467cb9
turn on import and auto examples extensions for testing
Sep 3, 2024
9efe834
lots of small fixes, plus move docs from flytekit repo
Sep 3, 2024
01f5709
update conf with pydata specific theme options, update sidebar
Sep 5, 2024
96de795
update flytekit docs
Sep 5, 2024
3dbbb9e
update refs
Sep 5, 2024
8e3a1db
add new docs paths to ignore
Sep 5, 2024
5d9e55a
update Makefile with new API gen docs paths
Sep 5, 2024
91fa7cb
delete unused code
Sep 5, 2024
ecfa57b
update deployment docs refs and title
Sep 5, 2024
1c948da
update refs and remove cookbook section
Sep 5, 2024
6d7a594
update API docs paths
Sep 5, 2024
e9b43b1
add pydata theme dependency
Sep 5, 2024
c7a6e37
add plugins
Sep 5, 2024
084703a
lots of design work
Sep 9, 2024
9c7f1b5
add comments
Sep 9, 2024
89a4bd7
switch to module-based implementation of algolia docsearch
Sep 10, 2024
d74113a
remove files for old implementation of algolia docsearch
Sep 10, 2024
f1770d1
remove custom CSS and JS, since this mostly duplicates or interferes …
Sep 10, 2024
cab876e
remove empty flyteremote page for now
Sep 10, 2024
70d08fb
add version
Sep 10, 2024
1a21e17
remove placeholder directories
Sep 11, 2024
54bb72b
update find/replace logic in import module, delete unused code in module
Sep 11, 2024
e19e521
update sidebar templates
Sep 11, 2024
a6e515a
update deprecated integrations redirects
Sep 12, 2024
35fbc90
update intersphinx inventory links
Sep 12, 2024
92792dd
remove extra items from footer
Sep 16, 2024
17d72a6
update left sidebar
Sep 16, 2024
b5019e3
fix typo
Sep 16, 2024
87b751b
DOC-607 use docsearch extension and env variables for docsearch creds
Sep 18, 2024
496b9a0
add copyright to footer
Sep 18, 2024
5126b4a
remove aws sagemaker plugin documentation for now
Sep 18, 2024
6abda2c
switch back to original flytekit build process
Sep 19, 2024
c519032
start updating contributing docs
Sep 19, 2024
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
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ vendor/
/docker/sandbox-bundled/images/tar
**/bin/
docs/_tags/
docs/flytectl
docs/protos
docs/flytekit
docs/api/flytectl
docs/api/flyteidl
docs/api/flytekit/*/generated
docs/flytesnacks
docs/examples
docs/_src
docs/_projects
docs/api
docs/tests
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

clean:
rm -rf _build _src _tags api flytectl flytekit flytesnacks protos examples tests _projects
rm -rf _build _src _tags flytesnacks examples api/flytekit api/flytectl api/flyteidl
15 changes: 10 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

## Prerequisites

* `conda` (We recommend Miniconda installed with an [official installer](https://docs.conda.io/projects/miniconda/en/latest/index.html#latest-miniconda-installer-links))
Install the following prerequisites:

* `conda` (We recommend Miniconda installed with an [official installer](https://docs.conda.io/projects/miniconda/en/latest/index.html#latest-miniconda-installer-links))
* [`conda-lock`](https://github.com/conda/conda-lock)


## Set up the build environment

In the `flyteorg/flyte` root directory do:
In the `flyteorg/flyte` root directory, run the following commands:

```bash
$ conda-lock install --name monodocs-env monodocs-environment.lock.yaml
Expand All @@ -20,12 +21,16 @@ $ pip install ./flyteidl
This creates a new environment called `monodocs-env` with all the dependencies needed to build the docs. You can choose a different environment name if you like.


## Building the docs
## Build the docs

In the `flyteorg/flyte` root directory make sure you have activated the `monodocs-env` (or whatever you called it) environment and do:
In the `flyteorg/flyte` root directory, run the following command:

```bash
$ make docs
```

The resulting `html` files will be in `docs/_build/html`.
The resulting `html` files will be in `docs/_build/html`. You can view them by running the following command:

```bash
$ open docs/_build/html/index.html
```
44 changes: 1 addition & 43 deletions docs/_ext/import_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,6 @@ class Project:

VERSION_PATTERN = r"^v[0-9]+.[0-9]+.[0-9]+$"


class ListTableToc(SphinxDirective):
"""Custom directive to convert list-table into both list-table and toctree."""

has_content = True

def run(self) -> list:
return [self.parse()]

def parse(self):
"""Parses the list-table and adds a toctree"""
toc = ""

# finds all doc references in the form <doc/path>
for doc in re.findall(r"<(.+)>", self.block_text):
toc += f"\n{doc}"

container = nodes.container("")
toc = inspect.cleandoc(TOC_TEMPLATE.format(toc=toc))
table = inspect.cleandoc(TABLE_TEMPLATE.format(content=self.block_text))
content = f"{toc}\n\n{table}"

self.state.nested_parse(StringList(string2lines(content)), 0, container)
return container


def update_sys_path_for_flytekit(import_project_config: ImportProjectsConfig):
flytekit_dir = Path(import_project_config.flytekit_api_dir).resolve(strict=True)
flytekit_src_dir = flytekit_dir / "flytekit"
Expand All @@ -100,6 +74,7 @@ def update_sys_path_for_flytekit(import_project_config: ImportProjectsConfig):
if possible_plugin_dir.is_dir() and plugin_path.exists():
sys.path.insert(0, str(possible_plugin_dir))


def update_html_context(project: Project, tag: str, commit: str, config: Config):
tag_url = "#" if tag == "dev" else f"{project.source}/releases/tag/{tag}"
commit_url = f"{project.source}/tree/{commit}"
Expand Down Expand Up @@ -179,9 +154,6 @@ def import_projects(app: Sphinx, config: Config):
# remove cloned directories
shutil.rmtree(import_projects_config.clone_dir)

# add flytekit and plugins to path so that API reference can build
update_sys_path_for_flytekit(import_projects_config)

# add functions to clean up source and docstring refs
for i, (patt, repl) in enumerate(
import_projects_config.source_regex_mapping.items()
Expand Down Expand Up @@ -230,24 +202,10 @@ def replace_refs_in_docstrings(
lines[i] = text


def add_list_table_toc(app: Sphinx, docname: str, source: List[str]):
"""This replaces list-table directives in specific documents with list-table-toc.

This is important for automatically generating a toctree and list-table from
a list-table.
"""
if docname in app.config.import_projects_config["list_table_toc"]:
text = source[0]
text = re.sub(r"{list-table}", r"{list-table-toc}", text)
source[0] = text


def setup(app: Sphinx) -> dict:
app.add_config_value("import_projects_config", None, False)
app.add_config_value("import_projects", None, False)
app.add_directive("list-table-toc", ListTableToc)
app.connect("config-inited", import_projects, priority=0)
app.connect("source-read", add_list_table_toc, priority=0)

return {
"version": __version__,
Expand Down
12 changes: 0 additions & 12 deletions docs/_static/algolia-search.js

This file was deleted.

23 changes: 0 additions & 23 deletions docs/_static/algolia.css

This file was deleted.

49 changes: 0 additions & 49 deletions docs/_static/custom.css

This file was deleted.

111 changes: 0 additions & 111 deletions docs/_static/custom.js

This file was deleted.

Loading