From ca91eb069bc58ada60197c7236cf666d1611b38d Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung Date: Sun, 21 Apr 2024 17:00:03 +0800 Subject: [PATCH 1/2] docs(contribute): rewrite flyte contribute docs based on 4960 Signed-off-by: Yu-Ting Hsiung --- docs/community/contribute.rst | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/community/contribute.rst b/docs/community/contribute.rst index ee84046369..cffeee0892 100644 --- a/docs/community/contribute.rst +++ b/docs/community/contribute.rst @@ -153,12 +153,28 @@ To understand how the below components interact with each other, refer to :ref:` * - **Purpose**: Deployment, Documentation, and Issues * - **Languages**: RST -To build the Flyte docs locally you will need the following prerequisites: +In the ``flyteorg/flyte`` root directory you can run ``make dev-docs`` to build the documentation locally. The generated documentation will be in the ``docs/_build/html`` directory. -* Install `conda-lock `__. -* In the ``flyteorg/flyte`` root directory you can run: - * ``make dev-docs`` to build the documentation locally. The build will be in the ``docs/_build/html`` directory. See `the script `__ for additional environment variables that can be set. - * For example, to use the local flytekit source code instead of the source code from the flyteorg/flytekit repo, run ``export FLYTEKIT_LOCAL_PATH=/path/to/flytekit`` before running ``make dev-docs``. +**Setup process** + +1. First you need to make sure you can run linux/amd64 container +2. Run the following commands to build the documentation and serve it locally + +.. prompt:: bash $ + + make dev-docs + python -m http.server --directory docs/_build/html + +3. Go to http://localhost:8000 to see the documentation. + +**Supported environment variables of** ``make dev-docs`` + +* ``DEV_DOCS_WATCH``: If set, the docs will be built and served using `sphinx-autobuild `__ for live updates. +* ``FLYTEKIT_LOCAL_PATH``: If set, the local path to flytekit will be used instead of the source code from the ``flyteorg/flytekit repo``. +* ``FLYTECTL_LOCAL_PATH``: If set, the local path to flytectl will be used instead of the source code from the ``flyteorg/flytectl repo``. +* ``FLYTESNACKS_LOCAL_PATH``: If set, the local path to flytesnacks will be used instead of the source code from the ``flyteorg/flytesnacks`` repo. + +For example, to use the local flytekit source code instead of the source code from the ``flyteorg/flytekit`` repo, run ``export FLYTEKIT_LOCAL_PATH=/path/to/flytekit`` before running ``make dev-docs``. ``flyteidl`` ************ From fc28fefb1dc9d6702155bfc6de692c3f7818a92d Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung Date: Wed, 24 Apr 2024 23:42:39 +0800 Subject: [PATCH 2/2] docs(contribute): add conda setup back as an alternative --- docs/community/contribute.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/community/contribute.rst b/docs/community/contribute.rst index cffeee0892..45dc200965 100644 --- a/docs/community/contribute.rst +++ b/docs/community/contribute.rst @@ -176,6 +176,16 @@ In the ``flyteorg/flyte`` root directory you can run ``make dev-docs`` to build For example, to use the local flytekit source code instead of the source code from the ``flyteorg/flytekit`` repo, run ``export FLYTEKIT_LOCAL_PATH=/path/to/flytekit`` before running ``make dev-docs``. +**Alternative conda setup steps** + +* Install ``conda``. + * We recommend Miniconda installed with an `official installer `__. +* Install `conda-lock `__. +* In the ``flyteorg/flyte`` root directory run: + * ``conda-lock install --name monodocs-env monodocs-environment.lock.yaml`` + * ``conda activate monodocs-env`` + * ``pip install ./flyteidl`` + ``flyteidl`` ************