Skip to content

Commit 9829d4f

Browse files
Merge origin/dev - Keep parameter naming convention (gptModelName/gptModelVersion) while adopting latest dev features
2 parents 749364d + d2bd7f4 commit 9829d4f

391 files changed

Lines changed: 41892 additions & 51484 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
# Include any files or directories that you don't want to be copied to your
2+
# container here (e.g., local build artifacts, temporary files, etc.).
3+
#
4+
# For more help, visit the .dockerignore file reference guide at
5+
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
6+
7+
**/.DS_Store
8+
**/__pycache__
9+
**/.venv
10+
**/.classpath
11+
**/.dockerignore
12+
**/.env
13+
**/.git
14+
**/.gitignore
15+
**/.project
16+
**/.settings
17+
**/.toolstarget
18+
**/.vs
19+
**/.vscode
20+
**/*.*proj.user
21+
**/*.dbmdl
22+
**/*.jfm
23+
**/bin
24+
**/charts
25+
**/docker-compose*
26+
**/compose*
27+
**/Dockerfile*
28+
**/node_modules
29+
**/npm-debug.log
30+
**/obj
31+
**/secrets.dev.yaml
32+
**/values.dev.yaml
33+
LICENSE
34+
README.md
135
# UV and Python cache directories
236
**/__pycache__/
337
**/*.py[cod]

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
max-line-length = 88
33
extend-ignore = E501
44
exclude = .venv, frontend
5-
ignore = E722,E203, W503, G004, G200, F,E711
5+
ignore = E722,E203, W503, G004, G200, F,E711,E704

.github/workflows/docker-build-and-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
DATE="${{ steps.date.outputs.date }}"
7272
GITHUB_RUN_NUMBER="${{ github.run_number }}"
7373
if [[ "$BRANCH" == "main" ]]; then
74-
BASE_TAG="latest"
74+
BASE_TAG="latest_v2"
7575
elif [[ "$BRANCH" == "dev" ]]; then
7676
BASE_TAG="dev"
7777
elif [[ "$BRANCH" == "demo" ]]; then

.github/workflows/job-deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,17 +428,17 @@ jobs:
428428
429429
# Determine image tag based on branch
430430
if [[ "$BRANCH_NAME" == "main" ]]; then
431-
IMAGE_TAG="latest"
432-
echo "Using main branch - image tag: latest"
431+
IMAGE_TAG="latest_v2"
432+
echo "Using main branch - image tag: latest_v2"
433433
elif [[ "$BRANCH_NAME" == "dev" ]]; then
434434
IMAGE_TAG="dev"
435435
echo "Using dev branch - image tag: dev"
436436
elif [[ "$BRANCH_NAME" == "demo" ]]; then
437437
IMAGE_TAG="demo"
438438
echo "Using demo branch - image tag: demo"
439439
else
440-
IMAGE_TAG="latest"
441-
echo "Using default for branch '$BRANCH_NAME' - image tag: latest"
440+
IMAGE_TAG="latest_v2"
441+
echo "Using default for branch '$BRANCH_NAME' - image tag: latest_v2"
442442
fi
443443
444444
echo "Using existing Docker image tag: $IMAGE_TAG"

.github/workflows/test.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Test Workflow with Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
paths:
9+
- 'src/backend-api/**/*.py'
10+
- 'src/backend-api/pyproject.toml'
11+
- 'src/backend-api/pytest.ini'
12+
- '.github/workflows/test.yml'
13+
pull_request:
14+
types:
15+
- opened
16+
- ready_for_review
17+
- reopened
18+
- synchronize
19+
branches:
20+
- main
21+
- dev
22+
paths:
23+
- 'src/backend-api/**/*.py'
24+
- 'src/backend-api/pyproject.toml'
25+
- 'src/backend-api/pytest.ini'
26+
- '.github/workflows/test.yml'
27+
28+
permissions:
29+
contents: read
30+
actions: read
31+
pull-requests: write
32+
33+
jobs:
34+
backend_tests:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v5
40+
41+
- name: Set up Python
42+
uses: actions/setup-python@v6
43+
with:
44+
python-version: "3.12"
45+
46+
- name: Install Backend Dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
cd src/backend-api
50+
pip install -e .
51+
pip install pytest pytest-cov
52+
53+
- name: Check if Backend Test Files Exist
54+
id: check_backend_tests
55+
run: |
56+
if [ -z "$(find src/backend-api/src/tests -type f -name 'test_*.py' 2>/dev/null)" ]; then
57+
echo "No backend test files found, skipping backend tests."
58+
echo "skip_backend_tests=true" >> $GITHUB_ENV
59+
else
60+
echo "Backend test files found, running tests."
61+
echo "skip_backend_tests=false" >> $GITHUB_ENV
62+
fi
63+
64+
- name: Run Backend Tests with Coverage
65+
if: env.skip_backend_tests == 'false'
66+
run: |
67+
cd src/backend-api
68+
PYTHONPATH=src/app pytest src/tests \
69+
-c /dev/null \
70+
--rootdir=. \
71+
--cov=src/app \
72+
--cov-report=term-missing \
73+
--cov-report=xml:reports/coverage.xml \
74+
--junitxml=pytest.xml \
75+
-v
76+
77+
- name: Pytest Coverage Comment
78+
if: |
79+
always() &&
80+
github.event_name == 'pull_request' &&
81+
github.event.pull_request.head.repo.fork == false &&
82+
env.skip_backend_tests == 'false'
83+
uses: MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
84+
with:
85+
pytest-xml-coverage-path: src/backend-api/reports/coverage.xml
86+
junitxml-path: src/backend-api/pytest.xml
87+
report-only-changed-files: true
88+
89+
- name: Skip Backend Tests
90+
if: env.skip_backend_tests == 'true'
91+
run: |
92+
echo "Skipping backend tests because no test files were found."

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"chat.tools.terminal.autoApprove": {
3+
"/^cd H:\\\\Works\\\\Code-Migration\\\\Container-Migration-Solution-Accelerator\\\\src\\\\backend-api ; python -m ruff check src/ --fix 2>&1$/": {
4+
"approve": true,
5+
"matchCommandLine": true
6+
},
7+
"npx eslint": true
8+
}
9+
}

0 commit comments

Comments
 (0)