Skip to content

Commit 7286a1c

Browse files
Update
2 parents e11fe18 + 285132c commit 7286a1c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+417
-342
lines changed

.github/workflows/CAdeploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ jobs:
109109
- name: Update PowerBI URL
110110
if: success()
111111
run: |
112-
113112
set -e
114113
115114
COMMON_PART="-app-service"

.github/workflows/RAdeploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ jobs:
239239
- name: Send Notification on Failure
240240
if: failure()
241241
run: |
242-
243242
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
244243
245244
# Construct the email body
@@ -253,4 +252,4 @@ jobs:
253252
# Send the notification
254253
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
255254
-H "Content-Type: application/json" \
256-
-d "$EMAIL_BODY" || echo "Failed to send notification"
255+
-d "$EMAIL_BODY" || echo "Failed to send notification"

.github/workflows/build-clientadvisor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: Build ClientAdvisor Docker Images
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, dev, demo]
66
paths:
77
- ClientAdvisor/**
88
pull_request:
9-
branches: [main]
9+
branches: [main, dev, demo]
1010
types:
1111
- opened
1212
- ready_for_review
@@ -35,5 +35,5 @@ jobs:
3535
password_secret: ${{ matrix.password_secret }}
3636
app_name: ${{ matrix.app_name }}
3737
dockerfile: ${{ matrix.dockerfile }}
38-
push: true # Adjust this logic as necessary
39-
secrets: inherit
38+
push: ${{ github.event_name == 'push' && github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
39+
secrets: inherit

.github/workflows/build-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
context: .
5555
file: ${{ inputs.dockerfile }}
5656
push: ${{ inputs.push }}
57-
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.app_name}}:latest
57+
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.app_name}}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || 'latest' }}
5858
tags: |
59-
${{ inputs.registry }}/${{ inputs.app_name}}:dev
59+
${{ inputs.registry }}/${{ inputs.app_name}}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || 'latest' }}
6060
${{ inputs.registry }}/${{ inputs.app_name}}:${{ steps.date.outputs.date }}_${{ github.run_number }}

.github/workflows/build-researchassistant.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: Build ResearchAssistant Docker Images
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, dev, demo]
66
paths:
77
- ResearchAssistant/**
88
pull_request:
9-
branches: [main]
9+
branches: [main, dev, demo]
1010
types:
1111
- opened
1212
- ready_for_review
@@ -32,5 +32,5 @@ jobs:
3232
password_secret: ${{ matrix.password_secret }}
3333
app_name: ${{ matrix.app_name }}
3434
dockerfile: ${{ matrix.dockerfile }}
35-
push: true # Adjust this logic as necessary
36-
secrets: inherit
35+
push: ${{ github.event_name == 'push' && github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
36+
secrets: inherit

.github/workflows/test_client_advisor.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Unit Tests - Client Advisor
22

33
on:
44
push:
5-
branches: main
5+
branches: [main, dev]
66
# Trigger on changes in these specific paths
77
paths:
88
- 'ClientAdvisor/**'
99
pull_request:
10-
branches: main
10+
branches: [main, dev]
1111
types:
1212
- opened
1313
- ready_for_review
@@ -29,22 +29,6 @@ jobs:
2929
uses: actions/setup-python@v5
3030
with:
3131
python-version: "3.11"
32-
- name: Install Backend Dependencies
33-
run: |
34-
cd ClientAdvisor/App
35-
python -m pip install -r requirements.txt
36-
python -m pip install coverage pytest-cov
37-
- name: Run Backend Tests with Coverage
38-
run: |
39-
cd ClientAdvisor/App
40-
python -m pytest -vv --cov=. --cov-report=xml --cov-report=html --cov-report=term-missing --cov-fail-under=80 --junitxml=coverage-junit.xml
41-
- uses: actions/upload-artifact@v4
42-
with:
43-
name: client-advisor-coverage
44-
path: |
45-
ClientAdvisor/App/coverage.xml
46-
ClientAdvisor/App/coverage-junit.xml
47-
ClientAdvisor/App/htmlcov/
4832
- name: Set up Node.js
4933
uses: actions/setup-node@v3
5034
with:
@@ -63,3 +47,20 @@ jobs:
6347
path: |
6448
ClientAdvisor/App/frontend/coverage/
6549
ClientAdvisor/App/frontend/coverage/lcov-report/
50+
ClientAdvisor/App/htmlcov/
51+
- name: Install Backend Dependencies
52+
run: |
53+
cd ClientAdvisor/App
54+
python -m pip install -r requirements.txt
55+
python -m pip install coverage pytest-cov
56+
- name: Run Backend Tests with Coverage
57+
run: |
58+
cd ClientAdvisor/App
59+
python -m pytest -vv --cov=. --cov-report=xml --cov-report=html --cov-report=term-missing --cov-fail-under=80 --junitxml=coverage-junit.xml
60+
- uses: actions/upload-artifact@v4
61+
with:
62+
name: client-advisor-coverage
63+
path: |
64+
ClientAdvisor/App/coverage.xml
65+
ClientAdvisor/App/coverage-junit.xml
66+
ClientAdvisor/App/htmlcov/

.pylintrc

Lines changed: 0 additions & 13 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

ClientAdvisor/App/.flake8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[flake8]
22
max-line-length = 88
33
extend-ignore = E501, E203
4-
exclude = .venv, frontend
4+
exclude = .venv, frontend
5+

ClientAdvisor/App/app.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def create_app():
5555
app.config["TEMPLATES_AUTO_RELOAD"] = True
5656
# app.secret_key = secrets.token_hex(16)
5757
# app.session_interface = SecureCookieSessionInterface()
58-
# print(app.secret_key)
5958
return app
6059

6160

@@ -901,7 +900,6 @@ async def complete_chat_request(request_body, request_headers):
901900
# answer = "Sample response from Azure Function"
902901
# Construct the URL of your Azure Function endpoint
903902
# function_url = STREAMING_AZUREFUNCTION_ENDPOINT
904-
905903
# request_headers = {
906904
# "Content-Type": "application/json",
907905
# # 'Authorization': 'Bearer YOUR_TOKEN_HERE' # if applicable

0 commit comments

Comments
 (0)