Skip to content

Commit 13f98c3

Browse files
hangfeicopybara-github
authored andcommitted
fix: Correct help text formatting for adk deploy agent_engine
Merge #1250 The `Args:` section in the docstring of the `cli_deploy_agent_engine` function was causing formatting issues in the help output, with line breaks not being rendered correctly. This commit removes the redundant `Args:` section from the docstring. The help text for options is already comprehensively covered by the `help` attributes in the `@click.option` decorators, and `click` automatically lists the command's arguments. This change ensures that the help output for `adk deploy agent_engine --help` is clean, readable, and correctly formatted, relying on `click`'s standard help generation mechanisms. After the fix: (adk_test234) (base) hangfeilin@Hangfeis-MBP adk-python % adk deploy agent_engine --help Usage: adk deploy agent_engine [OPTIONS] AGENT Deploys an agent to Agent Engine. Args: agent (str): Required. The path to the agent to be deloyed. Example: adk deploy agent_engine --project=[project] --region=[region] --staging_bucket=[staging_bucket] path/to/my_agent Options: --project TEXT Required. Google Cloud project to deploy the agent. --region TEXT Required. Google Cloud region to deploy the agent. --staging_bucket TEXT Required. GCS bucket for staging the deployment artifacts. --trace_to_cloud Optional. Whether to enable Cloud Trace for Agent Engine. --adk_app TEXT Optional. Python file for defining the ADK application (default: a file named agent_engine_app.py) --temp_folder TEXT Optional. Temp folder for the generated Agent Engine source files. If the folder already exists, its contents will be removed. (default: a timestamped folder in the system temp directory). --env_file TEXT Optional. The filepath to the `.env` file for environment variables. (default: the `.env` file in the `agent` directory, if any.) --requirements_file TEXT Optional. The filepath to the `requirements.txt` file to use. (default: the `requirements.txt` file in the `agent` directory, if any.) --help Show this message and exit. COPYBARA_INTEGRATE_REVIEW=#1250 from google:fix-1191-agent-engine-help d2d0e89 PiperOrigin-RevId: 769182740
1 parent be71208 commit 13f98c3

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/google/adk/cli/cli_tools_click.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -854,22 +854,7 @@ def cli_deploy_agent_engine(
854854
):
855855
"""Deploys an agent to Agent Engine.
856856
857-
Args:
858-
agent (str): Required. The path to the agent to be deloyed.
859-
project (str): Required. Google Cloud project to deploy the agent.
860-
region (str): Required. Google Cloud region to deploy the agent.
861-
staging_bucket (str): Required. GCS bucket for staging the deployment
862-
artifacts.
863-
trace_to_cloud (bool): Required. Whether to enable Cloud Trace.
864-
adk_app (str): Required. Python file for defining the ADK application.
865-
temp_folder (str): Required. The folder for the generated Agent Engine
866-
files. If the folder already exists, its contents will be replaced.
867-
env_file (str): Required. The filepath to the `.env` file for environment
868-
variables. If it is an empty string, the `.env` file in the `agent`
869-
directory will be used if it exists.
870-
requirements_file (str): Required. The filepath to the `requirements.txt`
871-
file to use. If it is an empty string, the `requirements.txt` file in the
872-
`agent` directory will be used if exists.
857+
AGENT: The path to the agent source code folder.
873858
874859
Example:
875860

0 commit comments

Comments
 (0)