Skip to content

Commit 674f466

Browse files
authored
Merge pull request microsoft#143 from microsoft/gpickett-patch-6
Update main.bicep
2 parents ede7ad2 + cc2e9e3 commit 674f466

File tree

5 files changed

+102
-7
lines changed

5 files changed

+102
-7
lines changed

.azdo/pipelines/azure-dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ trigger:
44
- main
55
- master
66
- feature/azd-semantickernel
7+
- gpickett-patch-6
78

89
# Azure Pipelines workflow to deploy to Azure using azd
910
# To configure required secrets and service connection for connecting to Azure, simply run `azd pipeline config --provider azdo`
@@ -81,4 +82,4 @@ steps:
8182
env:
8283
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
8384
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
84-
AZURE_LOCATION: $(AZURE_LOCATION)
85+
AZURE_LOCATION: $(AZURE_LOCATION)

.github/workflows/azure-dev.yml

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,44 @@ on:
66
- main
77
- feature/azd-semantickernel
88
workflow_dispatch:
9-
109
permissions:
1110
contents: read
1211
id-token: write
1312
pull-requests: write
14-
1513
jobs:
1614
template_validation_job:
1715
runs-on: ubuntu-latest
1816
name: Template validation
19-
2017
steps:
2118
# Step 1: Checkout the code from your repository
2219
- name: Checkout code
2320
uses: actions/checkout@v4
2421

25-
# Step 2: Validate the Azure template using microsoft/template-validation-action
22+
# Step 2: Set up Python
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.9'
27+
28+
# Step 3: Create and populate the virtual environment
29+
- name: Create virtual environment and install dependencies
30+
run: |
31+
python -m venv .venv
32+
source .venv/bin/activate
33+
python -m pip install --upgrade pip
34+
pip install azure-mgmt-resource azure-identity azure-core azure-mgmt-subscription azure-cli-core
35+
# Install any other dependencies that might be needed
36+
pip freeze > requirements-installed.txt
37+
echo "Virtual environment created with these packages:"
38+
cat requirements-installed.txt
39+
40+
# Step 4: Create azd directory if it doesn't exist
41+
- name: Create azd directory
42+
run: |
43+
mkdir -p ./.azd || true
44+
touch ./.azd/.env || true
45+
46+
# Step 5: Validate the Azure template
2647
- name: Validate Azure Template
2748
uses: microsoft/[email protected]
2849
id: validation
@@ -33,8 +54,28 @@ jobs:
3354
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
3455
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
3556
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
58+
# Step 6: Debug output in case of failure
59+
- name: Debug on failure
60+
if: failure()
61+
run: |
62+
echo "Validation failed. Checking environment:"
63+
ls -la
64+
if [ -d ".venv" ]; then
65+
echo ".venv directory exists"
66+
ls -la .venv/bin/
67+
else
68+
echo ".venv directory does not exist"
69+
fi
70+
if [ -d "tva_*" ]; then
71+
echo "TVA directory exists:"
72+
find . -name "tva_*" -type d
73+
ls -la $(find . -name "tva_*" -type d)
74+
else
75+
echo "No TVA directory found"
76+
fi
3677
37-
38-
# Step 3: Print the result of the validation
78+
# Step 7: Print the result of the validation
3979
- name: Print result
80+
if: success()
4081
run: cat ${{ steps.validation.outputs.resultFile }}

src/backend/pyproject.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[project]
2+
name = "backend"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.11"
7+
dependencies = [
8+
"azure-ai-evaluation>=1.5.0",
9+
"azure-ai-inference>=1.0.0b9",
10+
"azure-ai-projects>=1.0.0b9",
11+
"azure-cosmos>=4.9.0",
12+
"azure-identity>=1.21.0",
13+
"azure-monitor-events-extension>=0.1.0",
14+
"azure-monitor-opentelemetry>=1.6.8",
15+
"azure-search-documents>=11.5.2",
16+
"fastapi>=0.115.12",
17+
"openai>=1.75.0",
18+
"opentelemetry-api>=1.31.1",
19+
"opentelemetry-exporter-otlp-proto-grpc>=1.31.1",
20+
"opentelemetry-exporter-otlp-proto-http>=1.31.1",
21+
"opentelemetry-instrumentation-fastapi>=0.52b1",
22+
"opentelemetry-instrumentation-openai>=0.39.2",
23+
"opentelemetry-sdk>=1.31.1",
24+
"pytest>=8.2,<9",
25+
"pytest-asyncio==0.24.0",
26+
"pytest-cov==5.0.0",
27+
"python-dotenv>=1.1.0",
28+
"python-multipart>=0.0.20",
29+
"semantic-kernel>=1.28.1",
30+
"uvicorn>=0.34.2",
31+
]

src/backend/requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ opentelemetry-exporter-otlp-proto-grpc
1313
opentelemetry-instrumentation-fastapi
1414
opentelemetry-instrumentation-openai
1515
opentelemetry-exporter-otlp-proto-http
16+
17+
semantic-kernel[azure]
18+
azure-ai-projects
19+
openai
20+
azure-ai-inference
21+
azure-search-documents
22+
azure-ai-evaluation
23+
1624
opentelemetry-exporter-otlp-proto-grpc
1725

1826
# Testing tools

src/frontend/pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[project]
2+
name = "frontend"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.11"
7+
dependencies = [
8+
"azure-identity>=1.21.0",
9+
"fastapi>=0.115.12",
10+
"jinja2>=3.1.6",
11+
"python-dotenv>=1.1.0",
12+
"python-multipart>=0.0.20",
13+
"uvicorn>=0.34.2",
14+
]

0 commit comments

Comments
 (0)