Skip to content

Commit ad704ff

Browse files
Merge pull request #304 from microsoft/folder-structure
refactor: folder structure
2 parents e719900 + c5d43ce commit ad704ff

File tree

132 files changed

+1749
-2525
lines changed

Some content is hidden

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

132 files changed

+1749
-2525
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ jobs:
7272
- name: Build Docker Image and optionally push - Internal Registry
7373
uses: docker/build-push-action@v6
7474
with:
75-
context: .
76-
file: WebApp.Dockerfile
75+
context: ./src
76+
file: ./src/WebApp.Dockerfile
7777
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
7878
tags: |
7979
${{ steps.registry.outputs.int_registry }}/webapp:${{ steps.determine_tag.outputs.tagname }}
@@ -83,8 +83,8 @@ jobs:
8383
if: ${{ github.ref_name == 'main' }}
8484
uses: docker/build-push-action@v6
8585
with:
86-
context: .
87-
file: WebApp.Dockerfile
86+
context: ./src
87+
file: ./src/WebApp.Dockerfile
8888
push: ${{github.ref_name == 'main' }}
8989
tags: |
9090
${{ steps.registry.outputs.ext_registry }}/webapp:${{ steps.determine_tag.outputs.tagname }}

.github/workflows/node.js.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
defaults:
1717
run:
18-
working-directory: frontend
18+
working-directory: src/frontend
1919
strategy:
2020
matrix:
2121
node-version: [18.x, 21.x]
@@ -28,7 +28,8 @@ jobs:
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030
cache: 'npm'
31-
cache-dependency-path: '**/package-lock.json'
31+
cache-dependency-path: 'src/frontend/package-lock.json'
3232
- run: npm ci
33+
- run: npm install --save-dev jest-environment-jsdom # Install missing package
3334
- run: NODE_OPTIONS=--max_old_space_size=8192 npm run build --if-present
3435
- run: npm run test --if-present

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install -r requirements-dev.txt
26+
pip install -r src/requirements-dev.txt
2727
2828
# Step 3: Run all code quality checks
2929
- name: Pylint

.github/workflows/python-app.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install -r requirements-dev.txt
28+
pip install -r src/requirements-dev.txt
2929
- name: Test with pytest
3030
run: |
31-
export PYTHONPATH=$(pwd)
31+
export PYTHONPATH=$(pwd)/src
3232
pytest -v --show-capture=stdout -k "not integration"
3333
3434
test_windows:
@@ -43,8 +43,8 @@ jobs:
4343
- name: Install dependencies
4444
run: |
4545
python -m pip install --upgrade pip
46-
pip install -r requirements-dev.txt
46+
pip install -r src/requirements-dev.txt
4747
- name: Test with pytest
4848
run: |
49-
$env:PYTHONPATH=$pwd
49+
$env:PYTHONPATH="$pwd\src"
5050
pytest -v --show-capture=stdout -k "not integration"

.github/workflows/tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Install Backend Dependencies
3131
run: |
32-
python -m pip install -r requirements.txt
32+
python -m pip install -r src/requirements.txt
3333
python -m pip install coverage pytest-cov
3434
python -m pip install azure-keyvault-secrets
3535
@@ -79,21 +79,21 @@ jobs:
7979
${{ runner.os }}-node-
8080
8181
- name: Navigate to frontend directory
82-
run: cd frontend
82+
run: cd src/frontend
8383

8484
- name: Install Frontend Dependencies
8585
run: |
86-
cd frontend # Change to the frontend directory
86+
cd src/frontend # Change to the frontend directory
8787
npm install # Install dependencies from frontend/package.json
8888
8989
- name: Run Frontend Tests with Coverage
9090
run: |
91-
cd frontend # Change to the frontend directory
91+
cd src/frontend # Change to the frontend directory
9292
if npm run test -- --coverage; then
9393
echo "Tests completed, checking coverage."
9494
# Check coverage report and ensure it meets threshold
95-
if [ -f frontend/coverage/lcov-report/index.html ]; then
96-
COVERAGE=$(cat frontend/coverage/lcov-report/index.html | grep -oP 'total: \K[0-9]+(\.[0-9]+)?')
95+
if [ -f src/frontend/coverage/lcov-report/index.html ]; then
96+
COVERAGE=$(cat src/frontend/coverage/lcov-report/index.html | grep -oP 'total: \K[0-9]+(\.[0-9]+)?')
9797
if (( $(echo "$COVERAGE < 80" | bc -l) )); then
9898
echo "Coverage is below 80%, failing the job."
9999
exit 1
@@ -107,5 +107,5 @@ jobs:
107107
with:
108108
name: frontend-coverage
109109
path: |
110-
frontend/coverage/ # Correct path to frontend coverage
111-
frontend/coverage/lcov-report/ # Correct path to frontend lcov report
110+
src/frontend/coverage/ # Correct path to frontend coverage
111+
src/frontend/coverage/lcov-report/ # Correct path to frontend lcov report

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.venv
2-
frontend/node_modules
2+
33
.env
44
.azure/
55
__pycache__/
66
.ipynb_checkpoints/
7-
static
8-
scripts/config.json
7+
8+
99
venv
1010
myenv
11-
frontend/coverage
11+
1212
scriptsenv/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The documents are intended for use as sample data only.
3232

3333

3434
### Solution accelerator architecture
35-
![image](/docs/images/architecture.png)
35+
![image](/docs/images/Archimage.png)
3636

3737
<h2><img src="./docs/images/oneClickDeploy.png" width="64">
3838
<br/>

docs/images/Archimage.png

41.9 KB
Loading

package-lock.json

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

scripts/config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"data_path": "../data",
4+
"location": "eastus",
5+
"subscription_id": "ff9b5430-90ea-44c0-8a00-e488c1bf56f4",
6+
"resource_group": "rg-bsbycgen",
7+
"search_service_name": "search-594d4a19-00cd-5358-b7e1-8bba04e9e79e",
8+
"index_name": "promissory-notes-index",
9+
"chunk_size": 1024,
10+
"token_overlap": 128,
11+
"semantic_config_name": "default",
12+
"language": "en"
13+
}
14+
]

0 commit comments

Comments
 (0)