From 155c53316e8ec1d336e1ece9b80cee5891d8464b Mon Sep 17 00:00:00 2001 From: Sunny Carter Date: Fri, 5 May 2023 16:29:58 +0100 Subject: [PATCH] dev instructions --- src/aosm/setup.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/aosm/setup.md diff --git a/src/aosm/setup.md b/src/aosm/setup.md new file mode 100644 index 00000000000..72158ac3d44 --- /dev/null +++ b/src/aosm/setup.md @@ -0,0 +1,46 @@ +### Prerequisites + +1. `python 3.8+` + + +### Dev environment setup + +Follow [https://github.com/Azure/azure-cli-dev-tools](https://github.com/Azure/azure-cli-dev-tools) + +Clone both azure-cli and azure-cli-extensions +```bash +# Go into your git clone of az-cli-extensions +cd az-cli-extensions + +# Create a virtual environment to run in +python3.8 -m venv ~/.virtualenvs/az-cli-env +source ~/.virtualenvs/az-cli-env/bin/activate + +# Ensure you have pip +python -m pip install -U pip + +# Install azdev +pip install azdev + +# Install all the python dependencies you need +azdev setup --cli /home/developer/code/azure-cli --repo . + +# Add the extension to your local CLI +azdev extension add aosm +``` +### VSCode environment setup. + +Make sure your VSCode is running in the same python virtual environment + +### Linting and Tests +```bash +azdev style aosm +azdev linter --include-whl-extensions aosm +(Not written any tests yet) +azdev test aosm +``` +You can use python-static-checks in your dev environment if you want, to help you: +```bash +pip3 install -U --index-url https://pkgs.dev.azure.com/msazuredev/AzureForOperators/_packaging/python/pypi/simple/ python-static-checks==4.0.0 +python-static-checks fmt +```