-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathpyproject.toml
More file actions
198 lines (177 loc) · 5.76 KB
/
pyproject.toml
File metadata and controls
198 lines (177 loc) · 5.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
exclude = [
"build",
"build.*",
"*build",
"*build.*",
"*.build",
"*.build.*",
"**build**",
]
# Include YAML and MD files for system defaults configuration
[tool.setuptools.package-data]
"idp_common.config.system_defaults" = ["*.yaml", "*.md"]
[project]
name = "idp_common"
version = "0.5.3"
description = "Common utilities for GenAI IDP Accelerator patterns"
authors = [{ name = "AWS", email = "noreply@amazon.com" }]
requires-python = ">=3.12,<3.14"
dependencies = [
"boto3==1.42.0", # Core dependency for AWS services
"jsonschema>=4.25.1",
"pydantic>=2.12.0",
"deepdiff>=6.0.0",
"PyYAML>=6.0.0", # Required for YAML configuration parsing
]
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
# Optional dependencies for each component
[project.optional-dependencies]
# Core utilities only - minimal dependencies
core = []
# Development only dependencies
dev = [
"python-dotenv (>=1.1.0,<2.0.0)",
"ipykernel (>=6.29.5,<7.0.0)",
"jupyter (>=1.1.1,<2.0.0)",
]
# Image handling dependencies
image = [
"Pillow==12.1.1",
"pypdfium2>=5.5.0", # PDF page extraction for discovery multi-section support
]
# OCR module dependencies
ocr = [
"Pillow==12.1.1",
"pypdfium2>=5.5.0",
"amazon-textract-textractor[pandas]==1.9.2",
"numpy==1.26.4",
"pandas==2.2.3",
"openpyxl==3.1.5",
"python-docx==1.2.0",
]
# Classification module dependencies
classification = [
"Pillow==12.1.1", # For image handling
]
# Extraction module dependencies
extraction = [
"Pillow==12.1.1", # For image handling
]
# Assessment module dependencies
assessment = [
"Pillow==12.1.1", # For image handling
"aws-lambda-powertools>=3.2.0", # Structured logging and observability
]
# Evaluation module dependencies
evaluation = [
"stickler-eval==0.1.4",
"genson==1.3.0", # For automatic JSON Schema generation from data
"munkres>=1.1.4", # For Hungarian algorithm (legacy, may be removed)
"numpy==1.26.4", # For numeric operations
# Explicitly prevent ruamel-yaml C extensions (they require compilation in Lambda)
"ruamel-yaml>=0.17.0,<0.19.0; python_version>='3.10'", # Pure Python YAML, no C extensions
]
# Rule validation module dependencies
rule_validation = [
# No additional dependencies needed - uses only base dependencies
]
# Reporting module dependencies
reporting = [
"pyarrow==20.0.0", # For Parquet conversion
]
# Appsync module dependencies
appsync = ["requests<3.0.0,>=2.32.3"]
# Agents module dependencies
agents = [
"strands-agents==1.14.0; python_version>='3.10'",
"strands-agents-tools==0.2.22; python_version>='3.10'",
"bedrock-agentcore>=0.1.1; python_version>='3.10'", # Specifically for the code interpreter tool
]
# Code intelligence module dependencies
code_intel = [
"requests==2.33.0",
"strands-agents==1.14.0",
"strands-agents-tools==0.2.22",
"bedrock-agentcore>=0.1.1",
"PyYAML>=6.0.0",
"pathspec>=0.11.0",
"chardet>=5.0.0"
]
# Document service factory dependencies (includes both appsync and dynamodb support)
# This includes all dependencies needed for both backends
docs_service = [
"requests==2.33.0", # Required for appsync module (dynamodb only needs boto3 which is core)
"aws-xray-sdk>=2.14.0", # Required for X-Ray tracing
]
# Testing dependencies
test = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-xdist>=3.3.1", # For parallel test execution
"requests (>=2.32.3,<3.0.0)",
"pyarrow==20.0.0",
"PyYAML==6.0.2",
"openpyxl==3.1.5",
"python-docx==1.2.0",
"moto[s3]==5.1.8", # For mocking AWS services in tests
"Pillow==12.1.1", # Required for image processing in assessment tests
"rich>=13.0.0", # Required for publish tests
"idp_common[agentic-extraction]", # Required for agentic_idp tests
# "s3fs==2023.12.2", # Required for criteria validation tests - disabled till we fix package dependencies
"moto>=5.1.8",
"pytest-asyncio>=1.1.0",
"typer>=0.19.2",
"ruff>=0.14.0",
"deepdiff>=6.0.0", # Required for BDA blueprint service tests
"datamodel-code-generator>=0.25.0", # Required for schema/pydantic generator tests
"mypy-boto3-bedrock-runtime>=1.39.0", # Required for bedrock_utils tests
# Evaluation module dependencies (from evaluation group)
"stickler-eval==0.1.4",
"genson==1.3.0",
"munkres>=1.1.4",
"numpy==1.26.4",
"build==1.3.0",
]
# Full package with all dependencies
all = [
"stickler-eval==0.1.4",
"genson==1.3.0",
"Pillow==12.1.1",
"pypdfium2>=5.5.0",
"amazon-textract-textractor[pandas]==1.9.2",
"munkres>=1.1.4",
"numpy==1.26.4",
"pandas==2.2.3",
"requests==2.33.0",
"pyarrow==20.0.0",
"openpyxl==3.1.5",
"python-docx==1.2.0",
"strands-agents==1.14.0; python_version>='3.10'",
"strands-agents-tools==0.2.22; python_version>='3.10'",
"bedrock-agentcore>=0.1.1; python_version>='3.10'",
# "s3fs==2023.12.2" - - disabled till we fix package dependencies
]
agentic-extraction = [
"jsonpatch==1.33",
"strands-agents==1.14.0 ; python_full_version >= '3.10'",
"pandas>=2.2.3",
"pypdfium2>=5.5.0", # Apache-2.0 OR BSD-3-Clause licensed (replaces AGPL-licensed PyMuPDF)
"email-validator>=2.3.0",
"tabulate>=0.9.0",
"aws-lambda-powertools>=3.2.0", # Structured logging and observability
"datamodel-code-generator>=0.25.0", # Generate Pydantic models from JSON Schema
"mypy-boto3-bedrock-runtime>=1.39.0", # Type stubs for bedrock_utils.py
]
[project.urls]
"Homepage" = "https://github.com/aws-samples/sample-genai-idp"
[dependency-groups]