Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .azdo/pipelines/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ trigger:
- main
- master
- feature/azd-semantickernel
- gpickett-patch-6

# Azure Pipelines workflow to deploy to Azure using azd
# To configure required secrets and service connection for connecting to Azure, simply run `azd pipeline config --provider azdo`
Expand Down Expand Up @@ -81,4 +82,4 @@ steps:
env:
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
AZURE_LOCATION: $(AZURE_LOCATION)
AZURE_LOCATION: $(AZURE_LOCATION)
53 changes: 47 additions & 6 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,44 @@ on:
- main
- feature/azd-semantickernel
workflow_dispatch:

permissions:
contents: read
id-token: write
pull-requests: write

jobs:
template_validation_job:
runs-on: ubuntu-latest
name: Template validation

steps:
# Step 1: Checkout the code from your repository
- name: Checkout code
uses: actions/checkout@v4

# Step 2: Validate the Azure template using microsoft/template-validation-action
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

# Step 3: Create and populate the virtual environment
- name: Create virtual environment and install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install azure-mgmt-resource azure-identity azure-core azure-mgmt-subscription azure-cli-core
# Install any other dependencies that might be needed
pip freeze > requirements-installed.txt
echo "Virtual environment created with these packages:"
cat requirements-installed.txt
# Step 4: Create azd directory if it doesn't exist
- name: Create azd directory
run: |
mkdir -p ./.azd || true
touch ./.azd/.env || true
# Step 5: Validate the Azure template
- name: Validate Azure Template
uses: microsoft/[email protected]
id: validation
Expand All @@ -33,8 +54,28 @@ jobs:
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Step 6: Debug output in case of failure
- name: Debug on failure
if: failure()
run: |
echo "Validation failed. Checking environment:"
ls -la
if [ -d ".venv" ]; then
echo ".venv directory exists"
ls -la .venv/bin/
else
echo ".venv directory does not exist"
fi
if [ -d "tva_*" ]; then
echo "TVA directory exists:"
find . -name "tva_*" -type d
ls -la $(find . -name "tva_*" -type d)
else
echo "No TVA directory found"
fi

# Step 3: Print the result of the validation
# Step 7: Print the result of the validation
- name: Print result
if: success()
run: cat ${{ steps.validation.outputs.resultFile }}
31 changes: 31 additions & 0 deletions src/backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[project]
name = "backend"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"azure-ai-evaluation>=1.5.0",
"azure-ai-inference>=1.0.0b9",
"azure-ai-projects>=1.0.0b9",
"azure-cosmos>=4.9.0",
"azure-identity>=1.21.0",
"azure-monitor-events-extension>=0.1.0",
"azure-monitor-opentelemetry>=1.6.8",
"azure-search-documents>=11.5.2",
"fastapi>=0.115.12",
"openai>=1.75.0",
"opentelemetry-api>=1.31.1",
"opentelemetry-exporter-otlp-proto-grpc>=1.31.1",
"opentelemetry-exporter-otlp-proto-http>=1.31.1",
"opentelemetry-instrumentation-fastapi>=0.52b1",
"opentelemetry-instrumentation-openai>=0.39.2",
"opentelemetry-sdk>=1.31.1",
"pytest>=8.2,<9",
"pytest-asyncio==0.24.0",
"pytest-cov==5.0.0",
"python-dotenv>=1.1.0",
"python-multipart>=0.0.20",
"semantic-kernel>=1.28.1",
"uvicorn>=0.34.2",
]
8 changes: 8 additions & 0 deletions src/backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ opentelemetry-exporter-otlp-proto-grpc
opentelemetry-instrumentation-fastapi
opentelemetry-instrumentation-openai
opentelemetry-exporter-otlp-proto-http

semantic-kernel[azure]
azure-ai-projects
openai
azure-ai-inference
azure-search-documents
azure-ai-evaluation

opentelemetry-exporter-otlp-proto-grpc

# Testing tools
Expand Down
14 changes: 14 additions & 0 deletions src/frontend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "frontend"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"azure-identity>=1.21.0",
"fastapi>=0.115.12",
"jinja2>=3.1.6",
"python-dotenv>=1.1.0",
"python-multipart>=0.0.20",
"uvicorn>=0.34.2",
]
Loading