Skip to content

Commit

Permalink
monodocs uses flytekit/flytectl index rst file (#4720)
Browse files Browse the repository at this point in the history
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
cosmicBboy authored Jan 12, 2024
1 parent 32cde08 commit c8351be
Showing 6 changed files with 15 additions and 149 deletions.
10 changes: 6 additions & 4 deletions docs/_ext/import_projects.py
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ class ImportProjectsConfig:
flytekit_api_dir: str
source_regex_mapping: dict = field(default_factory=dict)
list_table_toc: List[str] = field(default_factory=list)
dev_build: bool = False


@dataclass
@@ -104,7 +105,7 @@ def update_sys_path_for_flytekit(import_project_config: ImportProjectsConfig):


def update_html_context(project: Project, tag: str, commit: str, config: Config):
tag_url = f"{project.source}/releases/tag/{tag}"
tag_url = "#" if tag == "dev" else f"{project.source}/releases/tag/{tag}"
commit_url = f"{project.source}/tree/{commit}"

config.html_context[f"{project.name}_tag"] = tag
@@ -152,9 +153,10 @@ def import_projects(app: Sphinx, config: Config):
[t for t in repo.tags if re.match(VERSION_PATTERN, t.name)],
key=lambda t: t.commit.committed_datetime
)
if not tags:
# If tags don't exist just use the current commit. This occurs
# when the git repo is a shallow clone.
if not tags or import_projects_config.dev_build:
# If dev_build is specified or the tags don't exist just use the
# current commit. This occurs when the git repo is a shallow
# clone.
tag_str = "dev"
commit = str(repo.head.commit)[:7]
else:
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -311,7 +311,7 @@
# from other repos.
REPLACE_PATTERNS = {
r"<flyte:deployment/index>": r"</deployment/index>",
r"<flytectl:index>": r"</flytectl_overview>",
r"<flytectl:index>": r"</flytectl/overview>",
INTERSPHINX_REFS_PATTERN: INTERSPHINX_REFS_REPLACE,
r"<auto_examples": r"<flytesnacks/examples",
r"<protos/docs/core/core:taskmetadata>": r"<ref_flyteidl.core.TaskMetadata>",
@@ -337,6 +337,7 @@
"flytesnacks/tutorials",
"flytesnacks/integrations",
],
"dev_build": bool(int(os.environ.get("MONODOCS_DEV_BUILD", 1))),
}

# Define these environment variables to use local copies of the projects. This
@@ -444,6 +445,7 @@ def filter(self, record: logging.LogRecord) -> bool:
'Error with CSV data in "csv-table" directive',
"Definition list ends without a blank line",
"autodoc: failed to import module 'awssagemaker' from module 'flytekitplugins'",
"Enumerated list ends without a blank line",
)

if msg.strip().startswith(filter_out):
107 changes: 0 additions & 107 deletions docs/flytectl_overview.rst

This file was deleted.

12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ learning and analytics.

Created at [Lyft](https://www.lyft.com/) in collaboration with Spotify,
Freenome, and many others, Flyte provides first-class support for
{doc}`Python <reference_flytekit>`,
{doc}`Python <api/flytekit/docs_index>`,
[Java, and Scala](https://github.com/flyteorg/flytekit-java). Data Scientists
and ML Engineers in the industry use Flyte to create:

@@ -102,11 +102,11 @@ Below are the API reference to the different components of Flyte:
:header-rows: 0
:widths: 20 30
* - {doc}`Flytekit <reference_flytekit>`
* - {doc}`Flytekit <api/flytekit/docs_index>`
- Flyte's official Python SDK.
* - {doc}`FlyteCTL <reference_flytectl>`
* - {doc}`FlyteCTL <flytectl/docs_index>`
- Flyte's command-line interface for interacting with a Flyte cluster.
* - {doc}`FlyteIDL <reference_flyteidl>`
* - {doc}`FlyteIDL <flytectl/docs_index>`
- Flyte's core specification language.
```

@@ -172,8 +172,8 @@ reference/swagger
:name: apitoc
:hidden:
flytekit <reference_flytekit>
flytectl <reference_flytectl>
flytekit <api/flytekit/docs_index>
flytectl <flytectl/docs_index>
flyteidl <reference_flyteidl>
```

11 changes: 0 additions & 11 deletions docs/reference_flytectl.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/reference_flytekit.md

This file was deleted.

0 comments on commit c8351be

Please sign in to comment.