From 83c9b97acb72329fca7b23baf6a5e456c73bc254 Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Wed, 27 Aug 2025 09:09:39 +1000 Subject: [PATCH 1/3] feature: add local dev guide md --- docs/pages/usage/local_dev_guide.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/pages/usage/local_dev_guide.md diff --git a/docs/pages/usage/local_dev_guide.md b/docs/pages/usage/local_dev_guide.md new file mode 100644 index 00000000..31d86391 --- /dev/null +++ b/docs/pages/usage/local_dev_guide.md @@ -0,0 +1,14 @@ +--- +layout: page +title: Local Development Guide +permalink: /pages/usage/local-dev-guide/ +weight: 105 +--- + +pre-reqs: + +- install python + can link to the 'setup_and_run" doc +- setup venv + can link to the "setup_and_run" doc +- npm/node/pnpm From 1b702d1ae88c9a9fe30e8014d163e4b465b71d3f Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Wed, 27 Aug 2025 11:59:25 +1000 Subject: [PATCH 2/3] feature: detailed local dev md --- .idea/aaz-dev-tools.iml | 4 +- docs/pages/usage/local_dev_guide.md | 91 +++++++++++++++++++++++++++-- 2 files changed, 88 insertions(+), 7 deletions(-) diff --git a/.idea/aaz-dev-tools.iml b/.idea/aaz-dev-tools.iml index 06c046bd..10e215e3 100644 --- a/.idea/aaz-dev-tools.iml +++ b/.idea/aaz-dev-tools.iml @@ -8,9 +8,11 @@ + + - + \ No newline at end of file diff --git a/docs/pages/usage/local_dev_guide.md b/docs/pages/usage/local_dev_guide.md index 31d86391..949cf89f 100644 --- a/docs/pages/usage/local_dev_guide.md +++ b/docs/pages/usage/local_dev_guide.md @@ -5,10 +5,89 @@ permalink: /pages/usage/local-dev-guide/ weight: 105 --- -pre-reqs: +## Prerequisites -- install python - can link to the 'setup_and_run" doc -- setup venv - can link to the "setup_and_run" doc -- npm/node/pnpm +- [Python 3.9+](https://www.python.org/downloads/) +- [Node.js 18+](https://nodejs.org/) +- [pnpm](https://pnpm.io/installation) + +--- + +## Setup + +**Create a virtual environment (if required):** + +- ```bash + python -m venv .venv + ``` + +**Activate venv:** + +- PowerShell + + ```powershell + .\.venv\Scripts\Activate.ps1 + ``` + +- Bash + + ```bash + source .venv/bin/activate + ``` + +## API (Backend) + +Set environment variables (while the virtual environment is active): + +- PowerShell + + ```powershell + # Replace with your user folder or path to the repos + $env:AAZ_PATH = "/aaz" + $env:AAZ_SWAGGER_PATH = "/azure-rest-api-specs" + $env:AAZ_SWAGGER_MODULE_PATH = "/azure-rest-api-specs/specification" + $env:AAZ_CLI_PATH = "/azure-cli" + $env:AAZ_CLI_EXTENSION_PATH = "/azure-cli-extensions" + + $env:FLASK_APP="aaz_dev.app.app:create_app" + ``` + +- Bash + + ```bash + # Replace with your user folder or path to the repos + export AAZ_PATH="/aaz" + export AAZ_SWAGGER_PATH="/azure-rest-api-specs" + export AAZ_SWAGGER_MODULE_PATH="/azure-rest-api-specs/specification" + export AAZ_CLI_PATH="/azure-cli" + export AAZ_CLI_EXTENSION_PATH="/azure-cli-extensions" + + export FLASK_APP="aaz_dev.app.app:create_app" + ``` + +**Start application:** + +- ``` + flask run --reload --port 5000 + ``` + +## Frontend: + +- Install dependencies + + ``` + pnpm install + pnpm build:typespec + pnpm build:web + pnpm run bundle + + + cd src/web + pnpm install + ``` + +- Run front-end dev server (from `src/web`) + + ``` + pnpm run dev + ``` From 9a41616a84343372783ada3070ffa470835b1b9b Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Tue, 2 Sep 2025 12:44:41 +1000 Subject: [PATCH 3/3] fix: remove changes to .iml --- .idea/aaz-dev-tools.iml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.idea/aaz-dev-tools.iml b/.idea/aaz-dev-tools.iml index 10e215e3..06c046bd 100644 --- a/.idea/aaz-dev-tools.iml +++ b/.idea/aaz-dev-tools.iml @@ -8,11 +8,9 @@ - - - \ No newline at end of file +