Skip to content

Commit 0270109

Browse files
author
Shreyas-Microsoft
committed
Consolidate all src/ subprojects into single repository - remove embedded .git directories from ContentProcessor, ContentProcessorWeb, ContentProcessorWorkflow
1 parent 5954dfd commit 0270109

402 files changed

Lines changed: 65824 additions & 35341 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: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
ARG UV_VERSION=latest
2-
ARG DEBIAN_VERSION=bookworm
3-
4-
5-
FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv
6-
FROM mcr.microsoft.com/vscode/devcontainers/base:$DEBIAN_VERSION
1+
FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm
72

83
# hadolint ignore=DL3008
94
RUN apt-get update \
10-
&& apt-get install -y --no-install-recommends poppler-utils \
11-
# To remove the image size, it is recommended refresh the package cache as follows
5+
&& apt-get install -y --no-install-recommends \
6+
ca-certificates \
7+
curl \
8+
poppler-utils \
129
&& apt-get clean \
13-
&& rm -rf /var/lib/apt/lists/* \
14-
&& curl -fsSL https://aka.ms/install-azd.sh | bash
10+
&& rm -rf /var/lib/apt/lists/*
1511

16-
COPY --from=uv --chown=vscode: /uv /uvx /bin/
12+
# Install uv without using an external container image layer.
13+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
14+
&& mv /root/.local/bin/uv /usr/local/bin/uv \
15+
&& if [ -f /root/.local/bin/uvx ]; then mv /root/.local/bin/uvx /usr/local/bin/uvx; fi

src/ContentProcessor/.devcontainer/devcontainer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"name": "uv",
33
"build": {
44
"context": "..",
5-
"dockerfile": "Dockerfile",
6-
"args": {
7-
"UV_VERSION": "latest",
8-
"DEBIAN_VERSION": "bookworm"
9-
}
5+
"dockerfile": "Dockerfile"
106
},
117
"features": {
12-
"ghcr.io/dhoeric/features/hadolint:1": {}
8+
"ghcr.io/dhoeric/features/hadolint:1": {},
9+
"ghcr.io/devcontainers/features/azure-cli:1": {},
10+
"ghcr.io/azure/azure-dev/azd:latest": {},
11+
"ghcr.io/devcontainers/features/git:1": {},
12+
"ghcr.io/devcontainers/features/github-cli:1": {}
1313
},
1414
"customizations": {
1515
"vscode": {

src/ContentProcessor/.dockerignore

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,74 @@
44
# For more help, visit the .dockerignore file reference guide at
55
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
66

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
35+
# Include any files or directories that you don't want to be copied to your
36+
# container here (e.g., local build artifacts, temporary files, etc.).
37+
#
38+
# For more help, visit the .dockerignore file reference guide at
39+
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
40+
41+
**/.DS_Store
42+
**/__pycache__
43+
**/.venv
44+
**/.classpath
45+
**/.dockerignore
46+
**/.env
47+
**/.git
48+
**/.gitignore
49+
**/.project
50+
**/.settings
51+
**/.toolstarget
52+
**/.vs
53+
**/.vscode
54+
**/*.*proj.user
55+
**/*.dbmdl
56+
**/*.jfm
57+
**/bin
58+
**/charts
59+
**/docker-compose*
60+
**/compose*
61+
**/Dockerfile*
62+
**/node_modules
63+
**/npm-debug.log
64+
**/obj
65+
**/secrets.dev.yaml
66+
**/values.dev.yaml
67+
LICENSE
68+
README.md
69+
# Include any files or directories that you don't want to be copied to your
70+
# container here (e.g., local build artifacts, temporary files, etc.).
71+
#
72+
# For more help, visit the .dockerignore file reference guide at
73+
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
74+
775
**/.DS_Store
876
**/__pycache__
977
**/.venv
@@ -153,6 +221,15 @@ cython_debug/
153221
# VS Code
154222
.vscode/
155223

224+
# Test suite and artifacts
225+
tests/
226+
htmlcov/
227+
.coverage
228+
.coverage.*
229+
coverage.xml
230+
.pytest_cache/
231+
.hypothesis/
232+
156233
# Ignore other unnecessary files
157234
*.bak
158235
*.swp
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
applyTo: '**.py'
3+
---
4+
# Systematic Code-Quality Pass Instructions for Python Codebase
5+
6+
You are performing a systematic code-quality pass on a Python codebase. Work through every folder one at a time. For each Python file, apply ALL of the following rules, then compile-check every edited file before moving to the next folder.
7+
8+
## 1. Copyright & Module Docstring
9+
- Every `.py` file (except empty `__init__.py`) must start with:
10+
```
11+
# Copyright (c) Microsoft Corporation.
12+
# Licensed under the MIT License.
13+
```
14+
- Immediately after, add or replace the module-level docstring. It must:
15+
- Describe what the module does in 1-2 sentences.
16+
- Mention its role in the broader system (e.g., which pipeline stage, what it depends on).
17+
- NOT contain generic filler like "This module provides utilities for…"
18+
19+
## 2. Package `__init__.py`
20+
- If empty, add the copyright header and a package docstring listing sub-modules with one-line descriptions.
21+
22+
## 3. Class Docstrings
23+
- Replace generic class docstrings with structured ones:
24+
```
25+
"""One-line summary.
26+
27+
Responsibilities:
28+
1. First responsibility.
29+
2. Second responsibility.
30+
31+
Attributes:
32+
attr_name: Description.
33+
"""
34+
```
35+
- For dataclasses / Pydantic models, list all fields under "Attributes:".
36+
37+
## 4. Method / Function Docstrings
38+
- Every public and non-trivial private method must have a docstring.
39+
- Use this structure:
40+
```
41+
"""One-line summary.
42+
43+
Steps: ← only for complex multi-step methods
44+
1. First step.
45+
2. Second step.
46+
47+
Args:
48+
param: Description.
49+
50+
Returns:
51+
Description.
52+
53+
Raises:
54+
ExceptionType: When condition.
55+
"""
56+
```
57+
- Simple one-line methods (getters, delegates) get a single-line docstring.
58+
59+
## 5. Comment Cleanup — REMOVE These
60+
- **Redundant inline comments** that just restate the code:
61+
`# Create Claim_Process entry in Cosmos DB` above `new_claim_process = Claim_Process(...)`
62+
- **Banner comments** / section dividers:
63+
`############################################################`
64+
`## Initialize AgentFrameworkHelper and add it to the app ##`
65+
`############################################################`
66+
- **Commented-out code** (dead imports, print statements, old logic).
67+
- **Heritage/provenance comments** referencing deleted files:
68+
`Replaces create_quiet_logger() from quiet_logging.py`
69+
- **Placeholder comments** that describe unimplemented intent:
70+
`# Placeholder for document processing logic`
71+
- **"For demonstration" / "Here you would typically"** comments.
72+
73+
## 6. Comment Cleanup — KEEP These
74+
- **Actionable TODOs** with clear intent: `# TODO: Make configurable if needed`
75+
- **Non-obvious "why" comments** that explain a design decision:
76+
`# Avoid unbounded growth on very chatty endpoints.`
77+
- **Contract/protocol comments** that document external API behavior:
78+
`# Image files bypass the 'extract' step.`
79+
80+
## 7. Fix Stale References
81+
- Search for outdated terminology (old project names, old class names, old pipeline descriptions) and correct them to match the current code.
82+
83+
## 8. Remove Dead Code
84+
- Delete unused imports.
85+
- Delete `pass` in `else` blocks that only existed to hold a now-deleted comment.
86+
- Delete redundant assignments like `claim_id = claim_id`.
87+
- Delete duplicate imports (e.g., `import os` at module level AND inside a function).
88+
89+
## 9. Compile-Check
90+
- After finishing each folder, run `python -m py_compile <file>` on every edited file.
91+
- Fix any errors before proceeding to the next folder.
92+
93+
## Working Process
94+
1. List the directory tree of the target folder.
95+
2. Read all Python files in the folder.
96+
3. Create a TODO list for the folder (one item per file + one for compile-check).
97+
4. Edit files, marking each TODO as you go.
98+
5. Compile-check all edited files.
99+
6. Move to the next folder.
100+
101+
Start with the folder I specify and work through it completely before asking what to do next.

0 commit comments

Comments
 (0)