Skip to content

Commit

Permalink
dev instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnycarter committed May 5, 2023
1 parent 3e224a2 commit 155c533
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/aosm/setup.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 155c533

Please sign in to comment.