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

monodocs uses flytekit/flytectl index rst file #4720

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 6 additions & 4 deletions docs/_ext/import_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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>",
Expand All @@ -337,6 +337,7 @@
"flytesnacks/tutorials",
"flytesnacks/integrations",
],
"dev_build": bool(int(os.environ.get("MONODOCS_DEV_BUILD", 1))),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will set this to 0 by default when the next flyte release happens

}

# Define these environment variables to use local copies of the projects. This
Expand Down Expand Up @@ -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):
Expand Down
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
Expand Up @@ -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:

Expand Down Expand Up @@ -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.
```

Expand Down Expand Up @@ -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>
```

Expand Down
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.

Loading