Skip to content

Commit

Permalink
[SDK/CLI] Refine pfazure flow create docstring for display_name param…
Browse files Browse the repository at this point in the history
…eter (#1289)

# Description

Please add an informative description that covers that changes made by
the pull request and link all relevant issues.

# All Promptflow Contribution checklist:
- [ ] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [ ] Title of the pull request is clear and informative.
- [ ] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [ ] Pull request includes test coverage for the included changes.
  • Loading branch information
0mza987 authored Nov 28, 2023
1 parent c0f94bd commit 0f49bd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/cloud/azureai/manage-flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To create a flow to Azure from local flow directory, you can use
pfazure flow create --flow <path-to-flow-folder>

# create the flow with metadata
pfazure flow create --flow <path-to-flow-folder> --set display-name=<display-name> description=<description> tags.key1=value1
pfazure flow create --flow <path-to-flow-folder> --set display_name=<display-name> description=<description> tags.key1=value1
```

After the flow is created successfully, you can see the flow summary in the command line.
Expand Down
10 changes: 7 additions & 3 deletions src/promptflow/promptflow/_cli/_pf_azure/_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,21 @@ def add_parser_flow_create(subparsers):
"""Add flow create parser to the pf flow subparsers."""
epilog = """
Use "--set" to set flow properties like:
display-name: Flow display name that will be created in remote. Default to be flow folder name + timestamp if not specified.
display_name: Flow display name that will be created in remote. Default to be flow folder name + timestamp if not specified.
type: Flow type. Default to be "standard" if not specified. Available types are: "standard", "evaluation", "chat".
description: Flow description. e.g. "--set description=<description>."
tags: Flow tags. e.g. "--set tags.key1=value1 tags.key2=value2."
Note:
In "--set" parameter, if the key name consists of multiple words, use snake-case instead of kebab-case. e.g. "--set display_name=<flow-display-name>"
Examples:
# Create a flow to azure portal with local flow folder.
pfazure flow create --flow <flow-folder-path> --set display-name=<flow-display-name> type=<flow-type>
pfazure flow create --flow <flow-folder-path> --set display_name=<flow-display-name> type=<flow-type>
# Create a flow with more properties
pfazure flow create --flow <flow-folder-path> --set display-name=<flow-display-name> type=<flow-type> description=<flow-description> tags.key1=value1 tags.key2=value2
pfazure flow create --flow <flow-folder-path> --set display_name=<flow-display-name> type=<flow-type> description=<flow-description> tags.key1=value1 tags.key2=value2
""" # noqa: E501
add_param_source = lambda parser: parser.add_argument( # noqa: E731
"--flow", type=str, help="Source folder of the flow."
Expand Down

0 comments on commit 0f49bd5

Please sign in to comment.