Skip to content

Commit 2048a39

Browse files
Add packaging for Modulisation (#71)
1 parent 2edb05c commit 2048a39

Some content is hidden

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

60 files changed

+4498
-660
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@ RUN apt-get update && \
1212
# Set the working directory
1313
WORKDIR /app
1414

15-
# Copy the requirements file into the container
16-
COPY requirements-dev.txt .
17-
18-
# Install Python dependencies
19-
RUN pip install -r requirements-dev.txt
15+
# Install uv package manager
16+
RUN pip install uv

.github/workflows/ci-checks.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ jobs:
2626
with:
2727
python-version: ${{ env.MIN_PYTHON_VERSION }}
2828

29-
- name: Install dependencies
30-
run: pip install -r requirements-dev.txt
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v4
31+
with:
32+
enable-cache: true
33+
34+
- name: Install the project
35+
run: uv sync --only-dev
3136

3237
- name: Run pre-commit
33-
run: pre-commit run --all-files
38+
run: uv run pre-commit run --all-files

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ repos:
2929
rev: v2.1.0
3030
hooks:
3131
- id: codespell
32+
args: [--exclude-file, uv.lock]
3233

3334
- repo: https://github.com/psf/black-pre-commit-mirror
3435
rev: 23.12.1
@@ -43,3 +44,10 @@ repos:
4344
- id: ruff
4445
args: [--fix, --ignore, UP007]
4546
exclude: samples
47+
48+
- repo: https://github.com/astral-sh/uv-pre-commit
49+
# uv version.
50+
rev: 0.5.5
51+
hooks:
52+
# Update the uv lockfile
53+
- id: uv-lock

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This repo provides sample code for improving RAG applications with rich data sou
44

55
It is intended that the plugins and skills provided in this repository, are adapted and added to your new or existing RAG application to improve the response quality.
66

7+
> [!IMPORTANT]
8+
>
9+
> - This repository now uses `uv` to manage dependencies and common utilities. See [uv](https://docs.astral.sh/uv/) for more details on how to get started.
10+
711
## Components
812

913
- `./text_2_sql` contains an three Multi-Shot implementations for Text2SQL generation and querying which can be used to answer questions backed by a database as a knowledge base. A **prompt based** and **vector based** approach are shown, both of which exhibit great performance in answering sql queries. Additionally, a further iteration on the vector based approach is shown which uses a **query cache** to further speed up generation. With these plugins, your RAG application can now access and pull data from any SQL table exposed to it to answer questions.

adi_function_app/pyproject.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[project]
2+
name = "adi-function-app"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
dependencies = [
8+
"azure-functions>=1.21.3",
9+
"azure-identity>=1.19.0",
10+
"azure-search-documents>=11.6.0b8",
11+
"azure-search>=1.0.0b2",
12+
"azure-storage-blob>=12.24.0",
13+
"bs4>=0.0.2",
14+
"openai>=1.55.3",
15+
"openpyxl>=3.1.5",
16+
"pandas>=2.2.3",
17+
"python-dotenv>=1.0.1",
18+
"regex>=2024.11.6",
19+
"tenacity>=9.0.0",
20+
"azure-ai-documentintelligence==1.0.0b4",
21+
"azure-ai-textanalytics>=5.3.0",
22+
"azure-ai-vision-imageanalysis>=1.0.0",
23+
"pymupdf>=1.24.14",
24+
"aiohttp>=3.11.9",
25+
"pillow>=11.0.0",
26+
"numpy>=2.1.3",
27+
"spacy>=3.7.5",
28+
"tiktoken>=0.8.0",
29+
"en-core-web-md @ https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.7.1/en_core_web_md-3.7.1.tar.gz"
30+
]

adi_function_app/requirements.txt

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

deploy_ai_search/pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[project]
2+
name = "deploy-ai-search"
3+
version = "0.1.0"
4+
description = "Helper functions to deploy Azure AI Search"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
dependencies = [
8+
"azure-identity>=1.19.0",
9+
"azure-mgmt-web>=7.3.1",
10+
"azure-search-documents==11.6.0b8",
11+
"azure-storage-blob>=12.24.0",
12+
"python-dotenv>=1.0.1",
13+
]

deploy_ai_search/requirements.txt

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

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[project]
2+
name = "dstoolkit-text2sql-and-imageprocessing"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.12"
7+
8+
[dependency-groups]
9+
dev = [
10+
"black>=24.10.0",
11+
"ipykernel>=6.29.5",
12+
"jupyter>=1.1.1",
13+
"pre-commit>=4.0.1",
14+
"pygments>=2.18.0",
15+
"ruff>=0.8.1",
16+
]
17+
18+
[tool.uv.workspace]
19+
members = ["text_2_sql/text_2_sql_core", "text_2_sql/autogen", "deploy_ai_search", "adi_function_app", "text_2_sql/semantic_kernel"]

0 commit comments

Comments
 (0)