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

{doc} Refine authoring commands doc #17236

Merged
merged 10 commits into from
Apr 12, 2021
Merged

{doc} Refine authoring commands doc #17236

merged 10 commits into from
Apr 12, 2021

Conversation

Juliehzl
Copy link
Contributor

@Juliehzl Juliehzl commented Mar 9, 2021

Description

Current doc page is out of date. Here is to adjust the doc with latest azure cli developer tooling.

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

@yonzhan yonzhan added this to the S184 milestone Mar 9, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 9, 2021

doc

Juliehzl and others added 3 commits March 11, 2021 10:42
Co-authored-by: Feiyue Yu <iamyfy@163.com>
Co-authored-by: Feiyue Yu <iamyfy@163.com>
Co-authored-by: Feiyue Yu <iamyfy@163.com>
If your commands aren't showing with `az`, use `az --debug` to help debug. There could have been an exception
thrown whilst attempting to load your module.


<a name="heading_author_command_mod"></a>Authoring command modules
------
Currently, all command modules should start with `azure-cli-`.
When the CLI loads, it search for packages installed that start with that prefix.

The `example_module_template` directory gives an example command module with other useful examples.
Copy link
Member

Choose a reason for hiding this comment

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

The example_module_template directory no longer exists, right? This line can also be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

```

Also, you can run `az` and if your command module contributes any commands, they should appear.
If your command module contributes any commands, they should appear with `az`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If your command module contributes any commands, they should appear with `az`.
If your command module contributes any commands, they should appear when running `az`.

Make it more clear with a verb.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -79,6 +63,10 @@ Command modules should have the following structure:
`-- HISTORY.rst
```

You could create these files manually, or [create a module with `azdev cli create`](https://azurecliprod.blob.core.windows.net/videos/04%20-%20AzdevCliCreate.mp4).

You could also consider using [Code-gen tool](https://azurecliprod.blob.core.windows.net/videos/04%20-%20AzdevCliCreate.mp4) to generate code automatically.
Copy link
Member

@fengzhou-msft fengzhou-msft Mar 12, 2021

Choose a reason for hiding this comment

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

The link is not right for Code-gen.

Shall we move Code-gen above azdev cli create as it is more recommended now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good check!

```

Also, you can run `az` and if your command module contributes any commands, they should appear.
If your command module contributes any commands, they should appear when running `az`.
Copy link
Member

Choose a reason for hiding this comment

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

What is "they"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

commands

cd azure-cli
virtualenv env
git clone https://github.com/Azure/azure-cli-extensions.git
python -m venv env
source env/bin/activate
Copy link
Member

Choose a reason for hiding this comment

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

You assume it is Linux environment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. It is a simple example and for more information about setting up environment, link to https://github.com/Azure/azure-cli-dev-tools#setting-up-your-development-environment for details.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a hint "This is script for Linux"?

@yonzhan yonzhan modified the milestones: S185, S186 Apr 10, 2021
@Juliehzl Juliehzl merged commit 4471575 into Azure:dev Apr 12, 2021
@Juliehzl Juliehzl deleted the doc2 branch April 12, 2021 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants