Skip to content

Commit dd023f1

Browse files
fix: Merge Dev to Main
2 parents fd31b0b + 143de68 commit dd023f1

File tree

24 files changed

+116
-63
lines changed

24 files changed

+116
-63
lines changed

.github/workflows/build-docker-image.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,46 @@ name: Build and Push Docker Images
33
on:
44
push:
55
branches: [main, dev, demo, hotfix]
6+
paths:
7+
- 'src/ContentProcessor/src/**'
8+
- 'src/**/Dockerfile'
9+
- 'src/**/requirements.txt'
10+
- 'src/**/pyproject.toml'
11+
- 'src/ContentProcessorAPI/app/**'
12+
- 'src/ContentProcessorAPI/helpers/**'
13+
- 'src/ContentProcessorWeb/src/**'
14+
- 'src/ContentProcessorWeb/public/**'
15+
- 'src/ContentProcessorWeb/package.json'
16+
- 'src/ContentProcessorWeb/package-lock.json'
17+
- 'src/ContentProcessorWeb/yarn.lock'
18+
- 'src/ContentProcessorWeb/tsconfig.json'
19+
- 'src/ContentProcessorWeb/config-overrides.js'
20+
- 'src/ContentProcessorWeb/nginx-custom.conf'
21+
- 'src/ContentProcessorWeb/env.sh'
22+
- '.github/workflows/build-docker-image.yml'
623
pull_request:
724
branches: [main, dev, demo, hotfix]
825
types: [opened, ready_for_review, reopened, synchronize]
26+
paths:
27+
- 'src/ContentProcessor/src/**'
28+
- 'src/**/Dockerfile'
29+
- 'src/**/requirements.txt'
30+
- 'src/**/pyproject.toml'
31+
- 'src/ContentProcessorAPI/app/**'
32+
- 'src/ContentProcessorAPI/helpers/**'
33+
- 'src/ContentProcessorWeb/src/**'
34+
- 'src/ContentProcessorWeb/public/**'
35+
- 'src/ContentProcessorWeb/package.json'
36+
- 'src/ContentProcessorWeb/package-lock.json'
37+
- 'src/ContentProcessorWeb/yarn.lock'
38+
- 'src/ContentProcessorWeb/tsconfig.json'
39+
- 'src/ContentProcessorWeb/config-overrides.js'
40+
- 'src/ContentProcessorWeb/nginx-custom.conf'
41+
- 'src/ContentProcessorWeb/env.sh'
42+
- 'infra/**/*.bicep'
43+
- 'infra/**/*.json'
44+
- 'azure.yaml'
45+
- '.github/workflows/build-docker-image.yml'
946
workflow_dispatch:
1047

1148
jobs:

.github/workflows/deploy-linux.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ on:
33
push:
44
branches:
55
- main
6+
paths:
7+
- 'src/ContentProcessor/src/**'
8+
- 'src/**/Dockerfile'
9+
- 'src/**/requirements.txt'
10+
- 'src/**/pyproject.toml'
11+
- 'src/ContentProcessorAPI/app/**'
12+
- 'src/ContentProcessorAPI/helpers/**'
13+
- 'src/ContentProcessorWeb/src/**'
14+
- 'src/ContentProcessorWeb/public/**'
15+
- 'src/ContentProcessorWeb/package.json'
16+
- 'src/ContentProcessorWeb/package-lock.json'
17+
- 'src/ContentProcessorWeb/yarn.lock'
18+
- 'src/ContentProcessorWeb/tsconfig.json'
19+
- 'src/ContentProcessorWeb/config-overrides.js'
20+
- 'src/ContentProcessorWeb/nginx-custom.conf'
21+
- 'src/ContentProcessorWeb/env.sh'
22+
- '.github/workflows/deploy-linux.yml'
623
workflow_dispatch:
724
inputs:
825
azure_location:

.github/workflows/deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- 'infra/**'
9+
- 'src/**'
10+
- 'tests/e2e-test/**'
11+
- 'azure.yaml'
12+
- '.github/workflows/deploy.yml'
13+
- '.github/workflows/test-automation.yml'
714
schedule:
815
- cron: "0 9,21 * * *" # Runs at 9:00 AM and 9:00 PM GMT
916
workflow_dispatch:

.github/workflows/pylint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: PyLint
22

3-
on: [push]
3+
on:
4+
push:
5+
paths:
6+
- 'src/**/*.py'
7+
- 'tests/**/*.py'
8+
- '.flake8'
9+
- 'src/**/requirements.txt'
10+
- 'src/**/pyproject.toml'
11+
- '.github/workflows/pylint.yml'
412

513
jobs:
614
build:

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
- main
77
- dev
88
- demo
9+
paths:
10+
- 'src/**/*.py'
11+
- 'tests/**/*.py'
12+
- 'src/**/requirements.txt'
13+
- 'src/**/pyproject.toml'
14+
- 'src/**/pytest.ini'
15+
- 'src/**/conftest.py'
16+
- '.github/workflows/test.yml'
917
pull_request:
1018
types:
1119
- opened
@@ -16,6 +24,14 @@ on:
1624
- main
1725
- dev
1826
- demo
27+
paths:
28+
- 'src/**/*.py'
29+
- 'tests/**/*.py'
30+
- 'src/**/requirements.txt'
31+
- 'src/**/pyproject.toml'
32+
- 'src/**/pytest.ini'
33+
- 'src/**/conftest.py'
34+
- '.github/workflows/test.yml'
1935

2036
jobs:
2137
backend_tests:

docs/DeploymentGuide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ You can run this solution in [VS Code Dev Containers](https://code.visualstudio.
132132
</details>
133133

134134
<details>
135-
<summary><b>Option 3:Deploy in Visual Studio Code (WEB)</b></summary>
135+
<summary><b>Option 3: Deploy in Visual Studio Code (WEB)</b></summary>
136136

137137
### Visual Studio Code (WEB)
138138

@@ -313,7 +313,7 @@ When creating your environment name, follow these rules:
313313
- **No special characters** (-, _, spaces, etc.)
314314
- **Examples:** `cpsapp01`, `mycontentapp`, `devtest123`
315315

316-
> **💡 Tip:** Use a descriptive prefix + environment + suffix to form a a unique string
316+
> **💡 Tip:** Use a descriptive prefix + environment + suffix to form a unique string
317317

318318
#### Deployment Steps
319319

src/ContentProcessor/src/libs/azure_helper/model/content_understanding.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Word(BaseModel):
1919
polygon: Optional[List[float]] = None
2020

2121
@field_validator("polygon", mode="after")
22+
@classmethod
2223
def parse_polygon(cls, value, info: ValidationInfo):
2324
"""
2425
Providing comparability with Azure Documenent Document Intelligence Service API result.
@@ -51,6 +52,7 @@ class Line(BaseModel):
5152
polygon: Optional[List[float]] = None
5253

5354
@field_validator("polygon", mode="after")
55+
@classmethod
5456
def parse_polygon(cls, value, info: ValidationInfo):
5557
source_str = info.data.get("source", "")
5658
if source_str.startswith("D(") and source_str.endswith(")"):
@@ -73,6 +75,7 @@ class Paragraph(BaseModel):
7375
polygon: Optional[List[float]] = None
7476

7577
@field_validator("polygon", mode="after")
78+
@classmethod
7679
def parse_polygon(cls, value, info: ValidationInfo):
7780
source_str = info.data.get("source", "")
7881
if source_str.startswith("D(") and source_str.endswith(")"):

src/ContentProcessor/src/libs/pipeline/entities/pipeline_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def download_file(self, account_url: str, container_name: str, file_path: str):
8181
StorageBlobHelper(
8282
account_url=account_url, container_name=container_name
8383
).download_file(
84-
container_name=self.process_id, blob_name=self.name, file_path=file_path
84+
container_name=self.process_id, blob_name=self.name, download_path=file_path
8585
)
8686

8787
def upload_stream(self, account_url: str, container_name: str, stream: bytes):

src/ContentProcessor/src/libs/pipeline/entities/pipeline_message_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def add_exception(self, exception: BaseException):
6969
)
7070

7171
@abstractmethod
72-
def save_to_persistent_storage(self):
72+
def save_to_persistent_storage(self, account_url: str, container_name: str):
7373
raise NotImplementedError("Method not implemented")
7474

7575
class Config:

src/ContentProcessor/src/libs/pipeline/entities/pipeline_status.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def get_previous_step_result(self, current_step_name: str) -> Optional[StepResul
9090
return self.get_step_result(previous_step)
9191

9292
def save_to_persistent_storage(self, account_url: str, container_name: str):
93-
pass
9493
# raise NotImplementedError
9594
"""
9695
Save the current PipelineStatus to persistent storage.
@@ -131,7 +130,6 @@ def _move_to_next_step(self, step_name: str):
131130
self.last_updated_time = datetime.datetime.now(
132131
datetime.timezone.utc
133132
).strftime("%Y-%m-%dT%H:%M:%S.%fZ")
134-
pass
135133

136134
self.completed_steps.append(step_name)
137135
# Remove current step from the remaining steps

0 commit comments

Comments
 (0)