Skip to content

Commit

Permalink
Add flow endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ljtill committed Jan 28, 2025
1 parent 689ee65 commit 66e4239
Show file tree
Hide file tree
Showing 23 changed files with 463 additions and 434 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"image": "mcr.microsoft.com/devcontainers/base:noble",
"features": {
"ghcr.io/ljtill/features/task:latest": {
"version": "3.40.1"
"version": "3.41.0"
}
},
"customizations": {
Expand Down
40 changes: 19 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
id: infra-auth
run: az login --identity

- name: Apply Infrastructure
id: infra-apply
run: task infra-apply
- name: Deploy Infrastructure
id: infra-deploy
run: task infra-deploy

- name: Destroy Infrastructure
id: infra-destroy
Expand All @@ -56,15 +56,9 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build API Service
id: app-build-api
run: task app-build-api
env:
CI: false

- name: Build UI Service
id: app-build-ui
run: task app-build-ui
- name: Build Application
id: app-build
run: task app-build
env:
CI: false

Expand All @@ -83,18 +77,22 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy Flows
id: flow-deploy
run: task flow-deploy
- name: Build Flows
id: flow-build
run: task flow-build

- name: Deploy Agent Flows
id: flow-deploy-agent
run: task flow-deploy-agent
id: flow-create-agent
run: task flow-create-agent

- name: Deploy Evaluation Flows
id: flow-deploy-eval
run: task flow-deploy-eval
id: flow-create-eval
run: task flow-create-eval

- name: Deploy Review Flows
id: flow-create-review
run: task flow-create-review

- name: Deploy ML Endpoints
id: flow-deploy-ml
run: task flow-deploy-
id: flow-deploy
run: task flow-deploy
96 changes: 39 additions & 57 deletions .task/app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.40.1"
version: "3.41.0"

tasks:
app-build:
Expand All @@ -8,35 +8,20 @@ tasks:
- task: deps-setup
aliases:
- ab
dir: app
cmds:
- task: app-build-api
- task: app-build-ui

app-build-api:
desc: Build API service.
silent: true
deps:
- task: deps-setup
aliases:
- aba
dir: app/api
cmds:
- echo -e "\033[0;32mBuilding API...\033[0m"
- python3 -m venv .venv
- .venv/bin/pip3 install -r requirements.txt
- |
echo -e "\033[0;32mBuilding API...\033[0m"
pushd api/
python3 -m venv .venv
.venv/bin/pip3 install -r requirements.txt
popd
app-build-ui:
desc: Build UI service.
silent: true
deps:
- task: deps-setup
aliases:
- abu
dir: app/ui
cmds:
- echo -e "\033[0;32mBuilding UI...\033[0m"
- npm install --no-fund --no-audit
- npm run build
echo -e "\033[0;32mBuilding UI...\033[0m"
pushd ui/
npm install --no-fund --no-audit
npm run build
popd
app-clean:
desc: Remove build artifacts.
Expand All @@ -45,34 +30,19 @@ tasks:
- task: deps-setup
aliases:
- ac
dir: app
cmds:
- task: app-clean-api
- task: app-clean-ui

app-clean-api:
desc: Remove API build artifacts.
silent: true
deps:
- task: deps-setup
aliases:
- aca
dir: app/api
cmds:
- echo -e "\033[0;32mRemoving API artifacts...\033[0m"
- rm -rf .venv
- rm -rf www
- |
echo -e "\033[0;32mRemoving API artifacts...\033[0m"
pushd app/api
rm -rf .venv
rm -rf www
popd
app-clean-ui:
desc: Remove UI build artifacts.
silent: true
deps:
- task: deps-setup
aliases:
- acu
dir: app/ui
cmds:
- echo -e "\033[0;32mRemoving UI artifacts...\033[0m"
- rm -rf node_modules
echo -e "\033[0;32mRemoving UI artifacts...\033[0m"
pushd app/ui
rm -rf node_modules
popd
app-deploy:
desc: Deploy application to App Service.
Expand Down Expand Up @@ -107,14 +77,26 @@ tasks:
--src-path "$ZIP_PATH" \
--type zip
app-logs:
desc: Show application logs.
silent: true
aliases:
- al
dir: infra
cmds:
- |
echo -e "\033[0;32mShowing logs...\033[0m"
az webapp log tail -g $(terraform output -raw resource_group) -n $(terraform output -raw webapp_name)
api-run:
desc: Launch local API instance.
silent: true
dir: app/api
deps:
- task: deps-setup
aliases:
- ar
dir: app/api
cmds:
- echo -e "\033[0;32mLaunching API...\033[0m"
- .venv/bin/python3 -m uvicorn main:app --reload
- |
echo -e "\033[0;32mLaunching API...\033[0m"
.venv/bin/python3 -m uvicorn main:app --reload
Loading

0 comments on commit 66e4239

Please sign in to comment.