Skip to content

Commit 67fa36c

Browse files
Merge remote-tracking branch 'origin/main' into PSL-US-16295
2 parents 843e0a5 + 032a46c commit 67fa36c

34 files changed

Lines changed: 808 additions & 9 deletions

.coverage

52 KB
Binary file not shown.

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
max-line-length = 88
3+
extend-ignore = E501
4+
exclude = .venv, frontend
5+
ignore = E203, W503, G004, G200

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Lines starting with '#' are comments.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# These owners will be the default owners for everything in the repo.
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Vinay-Microsoft @aniaroramsft

.github/dependabot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions dependencies
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
commit-message:
9+
prefix: "build"
10+
target-branch: "dependabotchanges"
11+
open-pull-requests-limit: 100
12+
13+
14+
- package-ecosystem: "pip"
15+
directory: "/src/ContentProcessorAPI"
16+
schedule:
17+
interval: "monthly"
18+
commit-message:
19+
prefix: "build"
20+
target-branch: "dependabotchanges"
21+
open-pull-requests-limit: 100
22+
23+
24+
25+
26+
- package-ecosystem: "npm"
27+
directory: "/src/ContentProcessorWeb"
28+
schedule:
29+
interval: "monthly"
30+
commit-message:
31+
prefix: "build"
32+
target-branch: "dependabotchanges"
33+
open-pull-requests-limit: 100
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Create-Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
create-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.workflow_run.head_sha }}
20+
21+
- uses: codfish/semantic-release-action@v3
22+
id: semantic
23+
with:
24+
tag-format: 'v${version}'
25+
additional-packages: |
26+
['conventional-changelog-conventionalcommits@7']
27+
plugins: |
28+
[
29+
[
30+
"@semantic-release/commit-analyzer",
31+
{
32+
"preset": "conventionalcommits"
33+
}
34+
],
35+
[
36+
"@semantic-release/release-notes-generator",
37+
{
38+
"preset": "conventionalcommits",
39+
"presetConfig": {
40+
"types": [
41+
{ type: 'feat', section: 'Features', hidden: false },
42+
{ type: 'fix', section: 'Bug Fixes', hidden: false },
43+
{ type: 'perf', section: 'Performance Improvements', hidden: false },
44+
{ type: 'revert', section: 'Reverts', hidden: false },
45+
{ type: 'docs', section: 'Other Updates', hidden: false },
46+
{ type: 'style', section: 'Other Updates', hidden: false },
47+
{ type: 'chore', section: 'Other Updates', hidden: false },
48+
{ type: 'refactor', section: 'Other Updates', hidden: false },
49+
{ type: 'test', section: 'Other Updates', hidden: false },
50+
{ type: 'build', section: 'Other Updates', hidden: false },
51+
{ type: 'ci', section: 'Other Updates', hidden: false }
52+
]
53+
}
54+
}
55+
],
56+
'@semantic-release/github'
57+
]
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
- run: echo ${{ steps.semantic.outputs.release-version }}
61+
62+
- run: echo "$OUTPUTS"
63+
env:
64+
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "PR Title Checker"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
merge_group:
10+
11+
permissions:
12+
pull-requests: read
13+
14+
jobs:
15+
main:
16+
name: Validate PR title
17+
runs-on: ubuntu-latest
18+
if: ${{ github.event_name != 'merge_group' }}
19+
steps:
20+
- uses: amannn/action-semantic-pull-request@v5
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pylint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PyLint
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.11"]
11+
steps:
12+
# Step 1: Checkout code
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
# Step 2: Set up Python environment
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
# Step 3: Install dependencies
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r src/ContentProcessorAPI/requirements.txt
27+
pip install flake8 # Ensure flake8 is installed
28+
29+
30+
# Step 4: Run all code quality checks
31+
- name: Pylint
32+
run: |
33+
echo "Running Pylint..."
34+
python -m flake8 --config=.flake8 --verbose .

.github/workflows/stale-bot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
6+
permissions:
7+
contents: write
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
stale:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/stale@v9
16+
with:
17+
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
18+
days-before-stale: 180
19+
days-before-close: 30

.github/workflows/test.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Test Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
- demo
9+
pull_request:
10+
types:
11+
- opened
12+
- ready_for_review
13+
- reopened
14+
- synchronize
15+
branches:
16+
- main
17+
- dev
18+
- demo
19+
20+
jobs:
21+
backend_tests:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v3
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: "3.11"
32+
33+
- name: Install Backend Dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r src/ContentProcessorAPI/requirements.txt
37+
pip install pytest-cov
38+
pip install pytest-asyncio
39+
40+
- name: Set PYTHONPATH
41+
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
42+
43+
- name: Check if Backend Test Files Exist
44+
id: check_backend_tests
45+
run: |
46+
if [ -z "$(find src/ContentProcessorAPI/app/tests -type f -name 'test_*.py')" ]; then
47+
echo "No backend test files found, skipping backend tests."
48+
echo "skip_backend_tests=true" >> $GITHUB_ENV
49+
else
50+
echo "Backend test files found, running tests."
51+
echo "skip_backend_tests=false" >> $GITHUB_ENV
52+
fi
53+
54+
- name: Run Backend Tests with Coverage
55+
if: env.skip_backend_tests == 'false'
56+
run: |
57+
pytest src/ContentProcessorAPI/app/tests
58+
pytest --cov=. --cov-report=term-missing --cov-report=xml
59+
60+
- name: Skip Backend Tests
61+
if: env.skip_backend_tests == 'true'
62+
run: echo "Skipping backend tests because no test files were found."
63+
64+
# frontend_tests:
65+
# runs-on: ubuntu-latest
66+
#
67+
# steps:
68+
# - name: Checkout code
69+
# uses: actions/checkout@v3
70+
#
71+
# - name: Set up Node.js
72+
# uses: actions/setup-node@v3
73+
# with:
74+
# node-version: "20"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ QUICK DEPLOY
5555

5656
Follow the [quick deploy steps on the deployment guide](./docs/DeploymentGuide.md) to deploy this solution to your own Azure subscription.
5757

58+
### ⚠️ Important: Check Azure OpenAI Quota Availability
59+
60+
➡️ To ensure sufficient quota is available in your subscription, please follow **[Quota check instructions guide](./docs/quota_check.md)** before you deploy the solution.
61+
5862
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/content-processing-solution-accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/content-processing-solution-accelerator) |
5963
|---|---|
6064

0 commit comments

Comments
 (0)