diff --git a/.azure/app-cloud-e2e.yml b/.azure/app-cloud-e2e.yml index deda9b25d4600..6a0ad695d0d0d 100644 --- a/.azure/app-cloud-e2e.yml +++ b/.azure/app-cloud-e2e.yml @@ -36,6 +36,7 @@ pr: - "src/lightning/__version__.py" - "src/lightning/app/**" - "src/lightning_app/*" + - "examples/app/**" - "requirements/app/**" - "tests/integrations_app/**" - "setup.py" @@ -163,14 +164,14 @@ jobs: # This test is very important to test the main user story of lightning app. # It also e2e tests running on cloud without installing dependencies. - bash: | - rm -rf examples/lightning-quick-start || true - git clone https://github.com/Lightning-AI/lightning-quick-start examples/lightning-quick-start + rm -rf examples/app/lightning-quick-start || true + git clone https://github.com/Lightning-AI/lightning-quick-start examples/app/lightning-quick-start condition: eq(variables['name'], 'quick_start') displayName: 'Clone Quick start Repo' - bash: | - rm -rf examples/app_template_react_ui || true - git clone https://github.com/Lightning-AI/lightning-template-react examples/app_template_react_ui + rm -rf examples/app/template_react_ui || true + git clone https://github.com/Lightning-AI/lightning-template-react examples/app/template_react_ui condition: eq(variables['name'], 'template_react_ui') displayName: 'Clone Template React UI Repo' @@ -186,7 +187,7 @@ jobs: displayName: 'List pip dependency' - bash: | - ls -l examples/$(TEST_APP_NAME) + ls -l examples/app/$(TEST_APP_NAME) echo ${TEST_FILE} python -m pytest ${TEST_FILE}::test_$(TEST_APP_NAME)_example_cloud \ --timeout=540 --capture=no -v --color=yes diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 942b1045af190..7b4d5e25ede58 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -296,7 +296,7 @@ subprojects: - "src/lightning_app/*" - "tests/integrations_app/**" - "!tests/integrations_app/flagship/**" - - "examples/app_*/**" + - "examples/app/**" - "requirements/app/**" - "setup.py" - "!requirements/*/docs.txt" @@ -348,6 +348,7 @@ subprojects: - "src/lightning/__version__.py" - "src/lightning/app/**" - "src/lightning_app/*" + - "examples/app/**" - "requirements/app/**" - "tests/integrations_app/**" - "!tests/integrations_app/flagship/**" diff --git a/.github/labeler.yml b/.github/labeler.yml index 953db13adcec0..dfbba2997d93a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,7 +4,7 @@ app: - 'tests/tests_app/**' - 'tests/integrations_app/**' - 'tests/integrations_app_examples/**' - - 'examples/app_*/**' + - 'examples/app/**' - 'docs/source-app/**' - 'requirements/app/**' @@ -13,7 +13,7 @@ pl: - "src/pytorch_lightning/*" - 'tests/tests_pytorch/**' - 'tests/legacy/**' - - 'examples/pl_*/**' + - 'examples/pytorch/**' - 'docs/source-pytorch/**' - 'requirements/pytorch/**' diff --git a/.github/workflows/ci-examples-app.yml b/.github/workflows/ci-examples-app.yml index 33523756aefae..aca0e0d4f8970 100644 --- a/.github/workflows/ci-examples-app.yml +++ b/.github/workflows/ci-examples-app.yml @@ -14,7 +14,7 @@ on: - "src/lightning_app/*" - "tests/integrations_app/**" - "!tests/integrations_app/flagship/**" - - "examples/app_*/**" + - "examples/app/**" - "requirements/app/**" - "setup.py" - "!requirements/*/docs.txt" diff --git a/docs/source-app/examples/dag/dag_from_scratch.rst b/docs/source-app/examples/dag/dag_from_scratch.rst index fdee9985b6fbf..e8eef7d1e0128 100644 --- a/docs/source-app/examples/dag/dag_from_scratch.rst +++ b/docs/source-app/examples/dag/dag_from_scratch.rst @@ -35,12 +35,12 @@ First, let's define the component we need: * Processing is responsible to execute a ``processing.py`` script. * A collection of model work to train all models in parallel. -.. literalinclude:: ../../../examples/app_dag/app.py +.. literalinclude:: ../../../../examples/app/dag/app.py :lines: 53-75 And its run method executes the steps described above. -.. literalinclude:: ../../../examples/app_dag/app.py +.. literalinclude:: ../../../../examples/app/dag/app.py :lines: 77-100 ---- @@ -49,5 +49,5 @@ And its run method executes the steps described above. Step 2: Define the scheduling ***************************** -.. literalinclude:: ../../../examples/app_dag/app.py +.. literalinclude:: ../../../../examples/app/dag/app.py :lines: 103-132 diff --git a/docs/source-app/glossary/storage/drive_content.rst b/docs/source-app/glossary/storage/drive_content.rst index 07c2232db09f3..8ab7015fd7885 100644 --- a/docs/source-app/glossary/storage/drive_content.rst +++ b/docs/source-app/glossary/storage/drive_content.rst @@ -200,7 +200,7 @@ In the example below, the Drive is created by the Flow and passed to its Works. The ``Work_1`` put a file **a.txt** in the **Drive("lit://this_drive_id")** and the ``Work_2`` can list and get the **a.txt** file from it. -.. literalinclude:: ../../../examples/app_drive/app.py +.. literalinclude:: ../../../../examples/app/drive/app.py ---- diff --git a/docs/source-app/glossary/storage/drive_content_old.rst b/docs/source-app/glossary/storage/drive_content_old.rst index 5fb7ca91b5b0b..3c37f883fd31d 100644 --- a/docs/source-app/glossary/storage/drive_content_old.rst +++ b/docs/source-app/glossary/storage/drive_content_old.rst @@ -175,7 +175,7 @@ In the example below, the Drive is created by the flow and passed to its Lightni The ``Work_1`` put a file **a.txt** in the **Drive("lit://this_drive_id")** and the ``Work_2`` can list and get the **a.txt** file from it. -.. literalinclude:: ../../../examples/app_drive/app.py +.. literalinclude:: ../../../../examples/app/drive/app.py ---- diff --git a/docs/source-app/levels/basic/hello_components/run_ptl_script.py b/docs/source-app/levels/basic/hello_components/run_ptl_script.py index e9bcb16c92f6a..f1d349722e243 100644 --- a/docs/source-app/levels/basic/hello_components/run_ptl_script.py +++ b/docs/source-app/levels/basic/hello_components/run_ptl_script.py @@ -1,5 +1,5 @@ # app.py -# !curl https://raw.githubusercontent.com/Lightning-AI/lightning/master/examples/app_multi_node/pl_boring_script.py -o pl_boring_script.py +# !curl https://raw.githubusercontent.com/Lightning-AI/lightning/master/examples/app/multi_node/pl_boring_script.py -o pl_boring_script.py import lightning as L from lightning.app.components.training import LightningTrainerScript diff --git a/docs/source-app/moving_to_the_cloud.rst b/docs/source-app/moving_to_the_cloud.rst index 9b26e94e49106..86478fc2e1612 100644 --- a/docs/source-app/moving_to_the_cloud.rst +++ b/docs/source-app/moving_to_the_cloud.rst @@ -40,14 +40,14 @@ Without doing this conscientiously for every single path, your application will In the example below, a file written by **SourceFileWork** is being transferred by the flow to the **DestinationFileAndServeWork** work. The Path object is the reference to the file. -.. literalinclude:: ../examples/app_boring/app.py +.. literalinclude:: ../../examples/app/boring/app.py :emphasize-lines: 5, 22, 28, 48 In the ``scripts/serve.py`` file, we are creating a **FastApi Service** running on port ``1111`` that returns the content of the file received from **SourceFileWork** when a post request is sent to ``/file``. -.. literalinclude:: ../examples/app_boring/scripts/serve.py +.. literalinclude:: ../../examples/app/boring/scripts/serve.py :emphasize-lines: 21, 23-26 ---- @@ -64,14 +64,14 @@ In order to assemble them, you need to do two things: Here's how to expose the port: -.. literalinclude:: ../examples/app_boring/app.py +.. literalinclude:: ../../examples/app/boring/app.py :emphasize-lines: 8 :lines: 33-44 And here's how to expose your services within the ``configure_layout`` flow hook: -.. literalinclude:: ../examples/app_boring/app.py +.. literalinclude:: ../../examples/app/boring/app.py :emphasize-lines: 5 :lines: 53-57 @@ -79,7 +79,7 @@ In this example, we're appending ``/file`` to our **FastApi Service** url. This means that our ``Boring Tab`` triggers the ``get_file_content`` from the **FastAPI Service** and embeds its content as an `IFrame `_. -.. literalinclude:: ../examples/app_boring/scripts/serve.py +.. literalinclude:: ../../examples/app/boring/scripts/serve.py :lines: 23-26 diff --git a/examples/app_argparse/app.py b/examples/app/argparse/app.py similarity index 100% rename from examples/app_argparse/app.py rename to examples/app/argparse/app.py diff --git a/examples/app_boring/.gitignore b/examples/app/boring/.gitignore similarity index 100% rename from examples/app_boring/.gitignore rename to examples/app/boring/.gitignore diff --git a/examples/app_boring/app.py b/examples/app/boring/app.py similarity index 100% rename from examples/app_boring/app.py rename to examples/app/boring/app.py diff --git a/examples/app_boring/app_dynamic.py b/examples/app/boring/app_dynamic.py similarity index 100% rename from examples/app_boring/app_dynamic.py rename to examples/app/boring/app_dynamic.py diff --git a/examples/app_boring/__init__.py b/examples/app/boring/scripts/__init__.py similarity index 100% rename from examples/app_boring/__init__.py rename to examples/app/boring/scripts/__init__.py diff --git a/examples/app_boring/scripts/serve.py b/examples/app/boring/scripts/serve.py similarity index 100% rename from examples/app_boring/scripts/serve.py rename to examples/app/boring/scripts/serve.py diff --git a/examples/app_commands_and_api/app.py b/examples/app/commands_and_api/app.py similarity index 100% rename from examples/app_commands_and_api/app.py rename to examples/app/commands_and_api/app.py diff --git a/examples/app_commands_and_api/command.py b/examples/app/commands_and_api/command.py similarity index 100% rename from examples/app_commands_and_api/command.py rename to examples/app/commands_and_api/command.py diff --git a/examples/app_components/__init__.py b/examples/app/components/python/__init__.py similarity index 100% rename from examples/app_components/__init__.py rename to examples/app/components/python/__init__.py diff --git a/examples/app_components/python/app.py b/examples/app/components/python/app.py similarity index 100% rename from examples/app_components/python/app.py rename to examples/app/components/python/app.py diff --git a/examples/app_components/python/component_popen.py b/examples/app/components/python/component_popen.py similarity index 100% rename from examples/app_components/python/component_popen.py rename to examples/app/components/python/component_popen.py diff --git a/examples/app_components/python/component_tracer.py b/examples/app/components/python/component_tracer.py similarity index 100% rename from examples/app_components/python/component_tracer.py rename to examples/app/components/python/component_tracer.py diff --git a/examples/app_components/python/pl_script.py b/examples/app/components/python/pl_script.py similarity index 100% rename from examples/app_components/python/pl_script.py rename to examples/app/components/python/pl_script.py diff --git a/examples/app_components/serve/gradio/app.py b/examples/app/components/serve/gradio/app.py similarity index 100% rename from examples/app_components/serve/gradio/app.py rename to examples/app/components/serve/gradio/app.py diff --git a/examples/app_components/serve/gradio/beyonce.jpg b/examples/app/components/serve/gradio/beyonce.jpg similarity index 100% rename from examples/app_components/serve/gradio/beyonce.jpg rename to examples/app/components/serve/gradio/beyonce.jpg diff --git a/examples/app_components/serve/gradio/requirements.txt b/examples/app/components/serve/gradio/requirements.txt similarity index 100% rename from examples/app_components/serve/gradio/requirements.txt rename to examples/app/components/serve/gradio/requirements.txt diff --git a/examples/app_dag/.gitignore b/examples/app/dag/.gitignore similarity index 100% rename from examples/app_dag/.gitignore rename to examples/app/dag/.gitignore diff --git a/examples/app_dag/.lightningignore b/examples/app/dag/.lightningignore similarity index 100% rename from examples/app_dag/.lightningignore rename to examples/app/dag/.lightningignore diff --git a/examples/app_dag/app.py b/examples/app/dag/app.py similarity index 100% rename from examples/app_dag/app.py rename to examples/app/dag/app.py diff --git a/examples/app_dag/processing.py b/examples/app/dag/processing.py similarity index 100% rename from examples/app_dag/processing.py rename to examples/app/dag/processing.py diff --git a/examples/app_dag/requirements.txt b/examples/app/dag/requirements.txt similarity index 100% rename from examples/app_dag/requirements.txt rename to examples/app/dag/requirements.txt diff --git a/examples/app_display_name/.lightningignore b/examples/app/display_name/.lightningignore similarity index 100% rename from examples/app_display_name/.lightningignore rename to examples/app/display_name/.lightningignore diff --git a/examples/app_display_name/app.py b/examples/app/display_name/app.py similarity index 100% rename from examples/app_display_name/app.py rename to examples/app/display_name/app.py diff --git a/examples/app_drive/.gitignore b/examples/app/drive/.gitignore similarity index 100% rename from examples/app_drive/.gitignore rename to examples/app/drive/.gitignore diff --git a/examples/app_drive/app.py b/examples/app/drive/app.py similarity index 100% rename from examples/app_drive/app.py rename to examples/app/drive/app.py diff --git a/examples/app_hpo/README.md b/examples/app/hpo/README.md similarity index 100% rename from examples/app_hpo/README.md rename to examples/app/hpo/README.md diff --git a/examples/app_hpo/app_wi_ui.py b/examples/app/hpo/app_wi_ui.py similarity index 100% rename from examples/app_hpo/app_wi_ui.py rename to examples/app/hpo/app_wi_ui.py diff --git a/examples/app_hpo/app_wo_ui.py b/examples/app/hpo/app_wo_ui.py similarity index 100% rename from examples/app_hpo/app_wo_ui.py rename to examples/app/hpo/app_wo_ui.py diff --git a/examples/app_hpo/download_data.py b/examples/app/hpo/download_data.py similarity index 100% rename from examples/app_hpo/download_data.py rename to examples/app/hpo/download_data.py diff --git a/examples/app_hpo/hyperplot.py b/examples/app/hpo/hyperplot.py similarity index 100% rename from examples/app_hpo/hyperplot.py rename to examples/app/hpo/hyperplot.py diff --git a/examples/app_hpo/objective.py b/examples/app/hpo/objective.py similarity index 100% rename from examples/app_hpo/objective.py rename to examples/app/hpo/objective.py diff --git a/examples/app_hpo/pl_script.py b/examples/app/hpo/pl_script.py similarity index 100% rename from examples/app_hpo/pl_script.py rename to examples/app/hpo/pl_script.py diff --git a/examples/app_hpo/requirements.txt b/examples/app/hpo/requirements.txt similarity index 100% rename from examples/app_hpo/requirements.txt rename to examples/app/hpo/requirements.txt diff --git a/examples/app_hpo/utils.py b/examples/app/hpo/utils.py similarity index 100% rename from examples/app_hpo/utils.py rename to examples/app/hpo/utils.py diff --git a/examples/app_installation_commands/app.py b/examples/app/installation_commands/app.py similarity index 100% rename from examples/app_installation_commands/app.py rename to examples/app/installation_commands/app.py diff --git a/examples/app_interruptible/app.py b/examples/app/interruptible/app.py similarity index 100% rename from examples/app_interruptible/app.py rename to examples/app/interruptible/app.py diff --git a/examples/app_justpy/app.py b/examples/app/justpy/app.py similarity index 100% rename from examples/app_justpy/app.py rename to examples/app/justpy/app.py diff --git a/examples/app_justpy/requirements.txt b/examples/app/justpy/requirements.txt similarity index 100% rename from examples/app_justpy/requirements.txt rename to examples/app/justpy/requirements.txt diff --git a/examples/app_layout/app.py b/examples/app/layout/app.py similarity index 100% rename from examples/app_layout/app.py rename to examples/app/layout/app.py diff --git a/examples/app_layout/requirements.txt b/examples/app/layout/requirements.txt similarity index 100% rename from examples/app_layout/requirements.txt rename to examples/app/layout/requirements.txt diff --git a/examples/app_layout/ui1/index.html b/examples/app/layout/ui1/index.html similarity index 100% rename from examples/app_layout/ui1/index.html rename to examples/app/layout/ui1/index.html diff --git a/examples/app_layout/ui2/index.html b/examples/app/layout/ui2/index.html similarity index 100% rename from examples/app_layout/ui2/index.html rename to examples/app/layout/ui2/index.html diff --git a/examples/app_mount/app.py b/examples/app/mount/app.py similarity index 100% rename from examples/app_mount/app.py rename to examples/app/mount/app.py diff --git a/examples/app_multi_node/README.md b/examples/app/multi_node/README.md similarity index 100% rename from examples/app_multi_node/README.md rename to examples/app/multi_node/README.md diff --git a/examples/app_multi_node/pl_boring_script.py b/examples/app/multi_node/pl_boring_script.py similarity index 100% rename from examples/app_multi_node/pl_boring_script.py rename to examples/app/multi_node/pl_boring_script.py diff --git a/examples/app_multi_node/requirements.txt b/examples/app/multi_node/requirements.txt similarity index 100% rename from examples/app_multi_node/requirements.txt rename to examples/app/multi_node/requirements.txt diff --git a/examples/app_multi_node/train_any.py b/examples/app/multi_node/train_any.py similarity index 100% rename from examples/app_multi_node/train_any.py rename to examples/app/multi_node/train_any.py diff --git a/examples/app_multi_node/train_fabric.py b/examples/app/multi_node/train_fabric.py similarity index 100% rename from examples/app_multi_node/train_fabric.py rename to examples/app/multi_node/train_fabric.py diff --git a/examples/app_multi_node/train_lt.py b/examples/app/multi_node/train_lt.py similarity index 100% rename from examples/app_multi_node/train_lt.py rename to examples/app/multi_node/train_lt.py diff --git a/examples/app_multi_node/train_lt_script.py b/examples/app/multi_node/train_lt_script.py similarity index 100% rename from examples/app_multi_node/train_lt_script.py rename to examples/app/multi_node/train_lt_script.py diff --git a/examples/app_multi_node/train_pytorch.py b/examples/app/multi_node/train_pytorch.py similarity index 100% rename from examples/app_multi_node/train_pytorch.py rename to examples/app/multi_node/train_pytorch.py diff --git a/examples/app_multi_node/train_pytorch_spawn.py b/examples/app/multi_node/train_pytorch_spawn.py similarity index 100% rename from examples/app_multi_node/train_pytorch_spawn.py rename to examples/app/multi_node/train_pytorch_spawn.py diff --git a/examples/app_payload/app.py b/examples/app/payload/app.py similarity index 100% rename from examples/app_payload/app.py rename to examples/app/payload/app.py diff --git a/examples/app_pickle_or_not/app.py b/examples/app/pickle_or_not/app.py similarity index 100% rename from examples/app_pickle_or_not/app.py rename to examples/app/pickle_or_not/app.py diff --git a/examples/app_pickle_or_not/requirements.txt b/examples/app/pickle_or_not/requirements.txt similarity index 100% rename from examples/app_pickle_or_not/requirements.txt rename to examples/app/pickle_or_not/requirements.txt diff --git a/examples/app_server/app.py b/examples/app/server/app.py similarity index 100% rename from examples/app_server/app.py rename to examples/app/server/app.py diff --git a/examples/app_server_with_auto_scaler/app.py b/examples/app/server_with_auto_scaler/app.py similarity index 100% rename from examples/app_server_with_auto_scaler/app.py rename to examples/app/server_with_auto_scaler/app.py diff --git a/examples/app_template_streamlit_ui/app.py b/examples/app/template_streamlit_ui/app.py similarity index 100% rename from examples/app_template_streamlit_ui/app.py rename to examples/app/template_streamlit_ui/app.py diff --git a/examples/app_template_streamlit_ui/requirements.txt b/examples/app/template_streamlit_ui/requirements.txt similarity index 100% rename from examples/app_template_streamlit_ui/requirements.txt rename to examples/app/template_streamlit_ui/requirements.txt diff --git a/examples/app_v0/.gitignore b/examples/app/v0/.gitignore similarity index 100% rename from examples/app_v0/.gitignore rename to examples/app/v0/.gitignore diff --git a/examples/app_v0/README.md b/examples/app/v0/README.md similarity index 100% rename from examples/app_v0/README.md rename to examples/app/v0/README.md diff --git a/examples/app_v0/app.py b/examples/app/v0/app.py similarity index 100% rename from examples/app_v0/app.py rename to examples/app/v0/app.py diff --git a/examples/app_v0/emulate_ui.py b/examples/app/v0/emulate_ui.py similarity index 100% rename from examples/app_v0/emulate_ui.py rename to examples/app/v0/emulate_ui.py diff --git a/examples/app_v0/requirements.txt b/examples/app/v0/requirements.txt similarity index 100% rename from examples/app_v0/requirements.txt rename to examples/app/v0/requirements.txt diff --git a/examples/app_v0/ui/a/index.html b/examples/app/v0/ui/a/index.html similarity index 100% rename from examples/app_v0/ui/a/index.html rename to examples/app/v0/ui/a/index.html diff --git a/examples/app_v0/ui/b/index.html b/examples/app/v0/ui/b/index.html similarity index 100% rename from examples/app_v0/ui/b/index.html rename to examples/app/v0/ui/b/index.html diff --git a/examples/app_works_on_default_machine/app_v2.py b/examples/app/works_on_default_machine/app_v2.py similarity index 100% rename from examples/app_works_on_default_machine/app_v2.py rename to examples/app/works_on_default_machine/app_v2.py diff --git a/examples/app_works_on_default_machine/requirements.txt b/examples/app/works_on_default_machine/requirements.txt similarity index 100% rename from examples/app_works_on_default_machine/requirements.txt rename to examples/app/works_on_default_machine/requirements.txt diff --git a/examples/app_components/python/__init__.py b/examples/app_components/python/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/examples/app_layout/__init__.py b/examples/app_layout/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/examples/app_v0/__init__.py b/examples/app_v0/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/src/lightning/app/components/python/popen.py b/src/lightning/app/components/python/popen.py index 97569f4322a36..34b50140c5d98 100644 --- a/src/lightning/app/components/python/popen.py +++ b/src/lightning/app/components/python/popen.py @@ -68,7 +68,7 @@ def __init__( In this example, the script will be launch with the :class:`~subprocess.Popen`. - .. literalinclude:: ../../../examples/app_components/python/component_popen.py + .. literalinclude:: ../../../../examples/app/components/python/component_popen.py :language: python """ super().__init__(**kwargs) diff --git a/src/lightning/app/components/python/tracer.py b/src/lightning/app/components/python/tracer.py index 644d03a7ba1e5..e0bde7c0b5e09 100644 --- a/src/lightning/app/components/python/tracer.py +++ b/src/lightning/app/components/python/tracer.py @@ -108,14 +108,14 @@ def __init__( Even more interesting, this component works for ANY PyTorch Lightning script and its state can be used in real time in a UI. - .. literalinclude:: ../../../examples/app_components/python/component_tracer.py + .. literalinclude:: ../../../../examples/app/components/python/component_tracer.py :language: python Once implemented, this component can easily be integrated within a larger app to execute a specific python script. - .. literalinclude:: ../../../examples/app_components/python/app.py + .. literalinclude:: ../../../../examples/app/components/python/app.py :language: python """ super().__init__(**kwargs) diff --git a/src/lightning/app/components/serve/gradio_server.py b/src/lightning/app/components/serve/gradio_server.py index f6771e7d07f28..54ad83d0bff1f 100644 --- a/src/lightning/app/components/serve/gradio_server.py +++ b/src/lightning/app/components/serve/gradio_server.py @@ -31,7 +31,7 @@ class ServeGradio(LightningWork, abc.ABC): In the example below, the ``ServeGradio`` is subclassed to deploy ``AnimeGANv2``. - .. literalinclude:: ../../../examples/app_components/serve/gradio/app.py + .. literalinclude:: ../../../../examples/app/components/serve/gradio/app.py :language: python The result would be the following: diff --git a/src/lightning/app/core/flow.py b/src/lightning/app/core/flow.py index 4c5bd49ef33b5..142b24545bcac 100644 --- a/src/lightning/app/core/flow.py +++ b/src/lightning/app/core/flow.py @@ -480,7 +480,7 @@ def run(self): :header: Build your own DAG :description: Learn more DAG scheduling with examples. :col_css: col-md-4 - :button_link: ../../../examples/app_dag/dag.html + :button_link: ../../../examples/app/dag/dag.html :height: 180 :tag: Basic diff --git a/tests/integrations_app/public/__init__.py b/tests/integrations_app/public/__init__.py index 1f1db5e15eaee..5ad0242e64c01 100644 --- a/tests/integrations_app/public/__init__.py +++ b/tests/integrations_app/public/__init__.py @@ -1,3 +1,3 @@ from pathlib import Path -_PATH_EXAMPLES = Path(__file__).resolve().parents[3] / "examples" +_PATH_EXAMPLES = Path(__file__).resolve().parents[3] / "examples" / "app" diff --git a/tests/integrations_app/public/test_app_dag.py b/tests/integrations_app/public/test_app_dag.py index 08cf1429b72c0..6a2808397f365 100644 --- a/tests/integrations_app/public/test_app_dag.py +++ b/tests/integrations_app/public/test_app_dag.py @@ -9,7 +9,7 @@ @pytest.mark.cloud def test_app_dag_example_cloud() -> None: - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_dag")) as (_, _, fetch_logs, _): + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "dag")) as (_, _, fetch_logs, _): launch_log, finish_log = False, False while not (launch_log and finish_log): diff --git a/tests/integrations_app/public/test_argparse.py b/tests/integrations_app/public/test_argparse.py index 823e04886cdae..bf97d02e6f7d0 100644 --- a/tests/integrations_app/public/test_argparse.py +++ b/tests/integrations_app/public/test_argparse.py @@ -10,7 +10,7 @@ def test_app_argparse_example(): original_argv = sys.argv command_line = [ - os.path.join(_PATH_EXAMPLES, "app_argparse", "app.py"), + os.path.join(_PATH_EXAMPLES, "argparse", "app.py"), "--app_args", "--use_gpu", "--without-server", diff --git a/tests/integrations_app/public/test_boring_app.py b/tests/integrations_app/public/test_boring_app.py index fcdc4afdf5972..db210a3ae280b 100644 --- a/tests/integrations_app/public/test_boring_app.py +++ b/tests/integrations_app/public/test_boring_app.py @@ -10,7 +10,7 @@ @pytest.mark.cloud def test_boring_app_example_cloud() -> None: - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_boring"), app_name="app_dynamic.py", debug=True) as ( + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "boring"), app_name="app_dynamic.py", debug=True) as ( _, view_page, _, diff --git a/tests/integrations_app/public/test_commands_and_api.py b/tests/integrations_app/public/test_commands_and_api.py index 5a9dad9faac3d..82b59a9cbf508 100644 --- a/tests/integrations_app/public/test_commands_and_api.py +++ b/tests/integrations_app/public/test_commands_and_api.py @@ -11,7 +11,7 @@ @pytest.mark.timeout(300) @pytest.mark.cloud def test_commands_and_api_example_cloud() -> None: - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_commands_and_api")) as ( + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "commands_and_api")) as ( _, view_page, fetch_logs, diff --git a/tests/integrations_app/public/test_drive.py b/tests/integrations_app/public/test_drive.py index 994af26c266b4..b885318c0289b 100644 --- a/tests/integrations_app/public/test_drive.py +++ b/tests/integrations_app/public/test_drive.py @@ -9,7 +9,7 @@ @pytest.mark.cloud def test_drive_example_cloud() -> None: - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_drive")) as ( + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "drive")) as ( _, _, fetch_logs, diff --git a/tests/integrations_app/public/test_gradio.py b/tests/integrations_app/public/test_gradio.py index 74a80bf580797..1ed4b66e90ad3 100644 --- a/tests/integrations_app/public/test_gradio.py +++ b/tests/integrations_app/public/test_gradio.py @@ -13,7 +13,7 @@ class MyGradioServe(ServeGradio): inputs = gradio_mock.inputs.Image(type="pil") outputs = gradio_mock.outputs.Image(type="pil") - examples = [["./examples/app_components/serve/gradio/beyonce.png"]] + examples = [["./examples/app/components/serve/gradio/beyonce.png"]] def build_model(self): super().build_model() diff --git a/tests/integrations_app/public/test_installation_commands_app.py b/tests/integrations_app/public/test_installation_commands_app.py index bca178f6c8d66..f80619e12959e 100644 --- a/tests/integrations_app/public/test_installation_commands_app.py +++ b/tests/integrations_app/public/test_installation_commands_app.py @@ -10,7 +10,7 @@ def test_installation_commands_app_example_cloud() -> None: # This is expected to pass, since the "setup" flag is passed with run_app_in_cloud( - os.path.join(_PATH_EXAMPLES, "app_installation_commands"), + os.path.join(_PATH_EXAMPLES, "installation_commands"), app_name="app.py", extra_args=["--setup"], debug=True, diff --git a/tests/integrations_app/public/test_layout.py b/tests/integrations_app/public/test_layout.py index e0c6080e5aa50..af8dd2358762f 100644 --- a/tests/integrations_app/public/test_layout.py +++ b/tests/integrations_app/public/test_layout.py @@ -12,7 +12,7 @@ def test_layout_example(): result = runner.invoke( run_app, [ - os.path.join(_PATH_EXAMPLES, "app_layout", "app.py"), + os.path.join(_PATH_EXAMPLES, "layout", "app.py"), "--blocking", "False", "--open-ui", diff --git a/tests/integrations_app/public/test_multi_node.py b/tests/integrations_app/public/test_multi_node.py index 38c03cd8b35ba..e5abce7841202 100644 --- a/tests/integrations_app/public/test_multi_node.py +++ b/tests/integrations_app/public/test_multi_node.py @@ -41,7 +41,7 @@ def test_multi_node_examples(_, app_name, monkeypatch): # rewritten to use `lightning.app` imports (CI does this) # * if you installed `lightning`, then the imports in this file and mocks # need to be changed to use `lightning`. - monkeypatch.chdir(os.path.join(_PATH_EXAMPLES, "app_multi_node")) + monkeypatch.chdir(os.path.join(_PATH_EXAMPLES, "multi_node")) command_line = [app_name, "--blocking", "False", "--open-ui", "False", "--setup"] result = application_testing(LightningTestMultiNodeApp, command_line) assert result.exit_code == 0 diff --git a/tests/integrations_app/public/test_payload.py b/tests/integrations_app/public/test_payload.py index 384931b265b9e..65b6a24c1dc35 100644 --- a/tests/integrations_app/public/test_payload.py +++ b/tests/integrations_app/public/test_payload.py @@ -9,7 +9,7 @@ @pytest.mark.cloud def test_payload_example_cloud() -> None: - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_payload")) as (_, _, fetch_logs, _): + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "payload")) as (_, _, fetch_logs, _): has_logs = False while not has_logs: diff --git a/tests/integrations_app/public/test_pickle_or_not.py b/tests/integrations_app/public/test_pickle_or_not.py index d3aa2ac5c9c34..bdfaa4903e6ab 100644 --- a/tests/integrations_app/public/test_pickle_or_not.py +++ b/tests/integrations_app/public/test_pickle_or_not.py @@ -15,7 +15,7 @@ def test_pickle_or_not_example(): result = runner.invoke( run_app, [ - os.path.join(_PATH_EXAMPLES, "app_pickle_or_not", "app.py"), + os.path.join(_PATH_EXAMPLES, "pickle_or_not", "app.py"), "--blocking", "False", "--open-ui", diff --git a/tests/integrations_app/public/test_scripts.py b/tests/integrations_app/public/test_scripts.py index 7321831b67569..ff6f9f62b476d 100644 --- a/tests/integrations_app/public/test_scripts.py +++ b/tests/integrations_app/public/test_scripts.py @@ -17,7 +17,7 @@ ], ) def test_scripts(file): - _run_script(str(os.path.join(_PATH_EXAMPLES, f"app_components/python/{file}"))) + _run_script(str(os.path.join(_PATH_EXAMPLES, f"components/python/{file}"))) @pytest.mark.skip(reason="causing some issues with CI, not sure if the test is actually needed") @@ -28,7 +28,7 @@ def test_components_app_example(): result = runner.invoke( run_app, [ - os.path.join(_PATH_EXAMPLES, "app_components/python/app.py"), + os.path.join(_PATH_EXAMPLES, "components/python/app.py"), "--blocking", "False", "--open-ui", diff --git a/tests/integrations_app/public/test_template_react_ui.py b/tests/integrations_app/public/test_template_react_ui.py index c01c3330abf9f..ca414758e9947 100644 --- a/tests/integrations_app/public/test_template_react_ui.py +++ b/tests/integrations_app/public/test_template_react_ui.py @@ -10,7 +10,7 @@ @pytest.mark.cloud def test_template_react_ui_example_cloud() -> None: """This test ensures streamlit works in the cloud by clicking a button and checking the logs.""" - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_template_react_ui")) as ( + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "template_react_ui")) as ( _, view_page, fetch_logs, diff --git a/tests/integrations_app/public/test_template_streamlit_ui.py b/tests/integrations_app/public/test_template_streamlit_ui.py index 21e12ec7965f2..d4cb5686402d3 100644 --- a/tests/integrations_app/public/test_template_streamlit_ui.py +++ b/tests/integrations_app/public/test_template_streamlit_ui.py @@ -10,7 +10,7 @@ @pytest.mark.cloud def test_template_streamlit_ui_example_cloud() -> None: """This test ensures streamlit works in the cloud by clicking a button and checking the logs.""" - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_template_streamlit_ui")) as ( + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "template_streamlit_ui")) as ( _, view_page, fetch_logs, diff --git a/tests/integrations_app/public/test_v0_app.py b/tests/integrations_app/public/test_v0_app.py index 0a1346829afda..3e3fe0825109b 100644 --- a/tests/integrations_app/public/test_v0_app.py +++ b/tests/integrations_app/public/test_v0_app.py @@ -26,7 +26,7 @@ def run_once(self) -> Tuple[bool, float]: def test_v0_app_example(): command_line = [ - os.path.join(_PATH_EXAMPLES, "app_v0", "app.py"), + os.path.join(_PATH_EXAMPLES, "v0", "app.py"), "--blocking", "False", "--open-ui", @@ -65,7 +65,7 @@ def check_content(button_name, text_content): ) def test_v0_app_example_byoc_cloud() -> None: with run_app_in_cloud( - os.path.join(_PATH_EXAMPLES, "app_v0"), + os.path.join(_PATH_EXAMPLES, "v0"), extra_args=["--cluster-id", os.environ.get("LIGHTNING_BYOC_CLUSTER_ID")], ) as (_, view_page, fetch_logs, app_name): run_v0_app(fetch_logs, view_page) @@ -73,7 +73,7 @@ def test_v0_app_example_byoc_cloud() -> None: @pytest.mark.cloud def test_v0_app_example_cloud() -> None: - with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "app_v0")) as ( + with run_app_in_cloud(os.path.join(_PATH_EXAMPLES, "v0")) as ( _, view_page, fetch_logs, @@ -87,11 +87,11 @@ def test_v0_app_example_cloud() -> None: MagicMock(side_effect=ModuleNotFoundError("Module X not found")), ) def test_load_app_from_file_module_error(): - empty_app = CloudRuntime.load_app_from_file(os.path.join(_PATH_EXAMPLES, "app_v0", "app.py")) + empty_app = CloudRuntime.load_app_from_file(os.path.join(_PATH_EXAMPLES, "v0", "app.py")) assert isinstance(empty_app, LightningApp) assert isinstance(empty_app.root, EmptyFlow) def test_load_app_from_file(): - app = load_app_from_file(os.path.join(_PATH_EXAMPLES, "app_v0", "app.py")) + app = load_app_from_file(os.path.join(_PATH_EXAMPLES, "v0", "app.py")) assert isinstance(app, LightningApp) diff --git a/tests/tests_app/cli/jsons/connect_1.json b/tests/tests_app/cli/jsons/connect_1.json index 2a7a210674009..d85860d6d2d48 100644 --- a/tests/tests_app/cli/jsons/connect_1.json +++ b/tests/tests_app/cli/jsons/connect_1.json @@ -1 +1 @@ -{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/v1/state":{"get":{"summary":"Get State","operationId":"get_state_api_v1_state_get","parameters":[{"required":false,"schema":{"title":"X-Lightning-Type","type":"string"},"name":"x-lightning-type","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Post State","operationId":"post_state_api_v1_state_post","parameters":[{"required":false,"schema":{"title":"X-Lightning-Type","type":"string"},"name":"x-lightning-type","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/spec":{"get":{"summary":"Get Spec","operationId":"get_spec_api_v1_spec_get","parameters":[{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/delta":{"post":{"summary":"Post Delta","description":"This endpoint is used to make an update to the app state using delta diff, mainly used by streamlit to\nupdate the state.","operationId":"post_delta_api_v1_delta_post","parameters":[{"required":false,"schema":{"title":"X-Lightning-Type","type":"string"},"name":"x-lightning-type","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/upload_file/{filename}":{"put":{"summary":"Upload File","operationId":"upload_file_api_v1_upload_file__filename__put","parameters":[{"required":true,"schema":{"title":"Filename","type":"string"},"name":"filename","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_upload_file__filename__put"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Healthz","description":"Health check endpoint used in the cloud FastAPI servers to check the status periodically.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user/command_without_client":{"post":{"tags":["app_api"],"summary":"Command Without Client","operationId":"command_without_client_user_command_without_client_post","parameters":[{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/command/command_without_client":{"post":{"tags":["app_command"],"summary":"Command Without Client","description":"A command without a client.","operationId":"command_without_client_command_command_without_client_post","parameters":[{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/command/command_with_client":{"post":{"tags":["app_client_command"],"summary":"Command With Client","description":"A command with a client.","operationId":"command_with_client_command_command_with_client_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomConfig"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"cls_path":"examples/app_commands_and_api/command.py","cls_name":"CustomCommand"}},"/command/nested_command":{"post":{"tags":["app_command"],"summary":"Nested Command","description":"A nested command.","operationId":"nested_command_command_nested_command_post","parameters":[{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api{full_path}":{"get":{"summary":"Api Catch All","operationId":"api_catch_all_api_full_path__get","parameters":[{"required":true,"schema":{"title":"Full Path","type":"string"},"name":"full_path","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{full_path}":{"get":{"summary":"Frontend Route","operationId":"frontend_route__full_path__get","parameters":[{"required":true,"schema":{"title":"Full Path","type":"string"},"name":"full_path","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_upload_file_api_v1_upload_file__filename__put":{"title":"Body_upload_file_api_v1_upload_file__filename__put","required":["uploaded_file"],"type":"object","properties":{"uploaded_file":{"title":"Uploaded File","type":"string","format":"binary"}}},"CustomConfig":{"title":"CustomConfig","required":["name"],"type":"object","properties":{"name":{"title":"Name","type":"string"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}} +{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/v1/state":{"get":{"summary":"Get State","operationId":"get_state_api_v1_state_get","parameters":[{"required":false,"schema":{"title":"X-Lightning-Type","type":"string"},"name":"x-lightning-type","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Post State","operationId":"post_state_api_v1_state_post","parameters":[{"required":false,"schema":{"title":"X-Lightning-Type","type":"string"},"name":"x-lightning-type","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/spec":{"get":{"summary":"Get Spec","operationId":"get_spec_api_v1_spec_get","parameters":[{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/delta":{"post":{"summary":"Post Delta","description":"This endpoint is used to make an update to the app state using delta diff, mainly used by streamlit to\nupdate the state.","operationId":"post_delta_api_v1_delta_post","parameters":[{"required":false,"schema":{"title":"X-Lightning-Type","type":"string"},"name":"x-lightning-type","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Uuid","type":"string"},"name":"x-lightning-session-uuid","in":"header"},{"required":false,"schema":{"title":"X-Lightning-Session-Id","type":"string"},"name":"x-lightning-session-id","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/upload_file/{filename}":{"put":{"summary":"Upload File","operationId":"upload_file_api_v1_upload_file__filename__put","parameters":[{"required":true,"schema":{"title":"Filename","type":"string"},"name":"filename","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_upload_file__filename__put"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Healthz","description":"Health check endpoint used in the cloud FastAPI servers to check the status periodically.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user/command_without_client":{"post":{"tags":["app_api"],"summary":"Command Without Client","operationId":"command_without_client_user_command_without_client_post","parameters":[{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/command/command_without_client":{"post":{"tags":["app_command"],"summary":"Command Without Client","description":"A command without a client.","operationId":"command_without_client_command_command_without_client_post","parameters":[{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/command/command_with_client":{"post":{"tags":["app_client_command"],"summary":"Command With Client","description":"A command with a client.","operationId":"command_with_client_command_command_with_client_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomConfig"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"cls_path":"examples/app/commands_and_api/command.py","cls_name":"CustomCommand"}},"/command/nested_command":{"post":{"tags":["app_command"],"summary":"Nested Command","description":"A nested command.","operationId":"nested_command_command_nested_command_post","parameters":[{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api{full_path}":{"get":{"summary":"Api Catch All","operationId":"api_catch_all_api_full_path__get","parameters":[{"required":true,"schema":{"title":"Full Path","type":"string"},"name":"full_path","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{full_path}":{"get":{"summary":"Frontend Route","operationId":"frontend_route__full_path__get","parameters":[{"required":true,"schema":{"title":"Full Path","type":"string"},"name":"full_path","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_upload_file_api_v1_upload_file__filename__put":{"title":"Body_upload_file_api_v1_upload_file__filename__put","required":["uploaded_file"],"type":"object","properties":{"uploaded_file":{"title":"Uploaded File","type":"string","format":"binary"}}},"CustomConfig":{"title":"CustomConfig","required":["name"],"type":"object","properties":{"name":{"title":"Name","type":"string"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}