@@ -40,31 +40,33 @@ isodate = "~0.6.1"
40
40
Jinja2 = " ~3.1.2"
41
41
jsonref = " ~0.2"
42
42
jsonschema = " ~4.17.3" # 4.18 has some significant breaking changes: https://github.com/python-jsonschema/jsonschema/releases/tag/v4.18.0
43
+ packaging = " *" # Transitive dependency used directly in code
43
44
pandas = " 2.2.2"
44
- psutil = " 6.1.0"
45
+ psutil = " 6.1.0" # TODO: Remove if unused
45
46
pydantic = " ^2.7"
46
47
pyrate-limiter = " ~3.1.0"
47
48
python-dateutil = " ^2.9.0"
48
49
python-ulid = " ^3.0.0"
49
50
PyYAML = " ^6.0.1"
50
- rapidfuzz = " ^3.10.1"
51
+ rapidfuzz = " ^3.10.1" # TODO: Remove if unused
51
52
requests = " *"
52
53
requests_cache = " *"
54
+ typing-extensions = " *" # Transitive dependency used directly in code
53
55
wcmatch = " 10.0"
54
56
# Extras depedencies
55
- avro = { version = " >=1.11.2,<1.13.0" , optional = true }
57
+ avro = { version = " >=1.11.2,<1.13.0" , optional = true } # TODO: Move into dev dependencies if only used in tests
56
58
cohere = { version = " 4.21" , optional = true }
57
59
fastavro = { version = " ~1.8.0" , optional = true }
58
60
langchain = { version = " 0.1.16" , optional = true }
59
61
langchain_core = { version = " 0.1.42" , optional = true }
60
- markdown = { version = " *" , optional = true }
61
- openai = { version = " 0.27.9" , extras = [" embeddings" ], optional = true }
62
+ markdown = { version = " *" , optional = true } # TODO: Remove if unused
63
+ openai = { version = " 0.27.9" , extras = [" embeddings" ], optional = true } # Used indirectly by langchain library
62
64
pdf2image = { version = " 1.16.3" , optional = true }
63
- "pdfminer.six" = { version = " 20221105" , optional = true }
65
+ "pdfminer.six" = { version = " 20221105" , optional = true } # Used indirectly by unstructured library
64
66
pyarrow = { version = " ^19.0.0" , optional = true }
65
- pytesseract = { version = " 0.3.10" , optional = true }
66
- python-calamine = { version = " 0.2.3" , optional = true }
67
- python-snappy = { version = " 0.7.3" , optional = true }
67
+ pytesseract = { version = " 0.3.10" , optional = true } # Used indirectly by unstructured library
68
+ python-calamine = { version = " 0.2.3" , optional = true } # TODO: Remove if unused
69
+ python-snappy = { version = " 0.7.3" , optional = true } # TODO: remove if unused
68
70
tiktoken = { version = " 0.8.0" , optional = true }
69
71
nltk = { version = " 3.9.1" , optional = true }
70
72
# This will ensure that even when you run poetry install or pip install, the compatible version of numpy will always be chosen.
@@ -73,7 +75,7 @@ numpy = "<2"
73
75
unstructured = { version = " 0.10.27" , extras = [" docx" , " pptx" ], optional = true }
74
76
"unstructured.pytesseract" = { version = " >=0.3.12" , optional = true }
75
77
pyjwt = " ^2.8.0"
76
- cryptography = " >=44.0.0,<45.0.0"
78
+ cryptography = " >=44.0.0,<45.0.0" # Constrained as transitive dependency due to a bug in newer versions
77
79
pytz = " 2024.2"
78
80
orjson = " ^3.10.7"
79
81
serpyco-rs = " ^1.10.2"
@@ -102,6 +104,7 @@ types-requests = "^2.32.0.20241016"
102
104
types-python-dateutil = " ^2.9.0.20241003"
103
105
types-pyyaml = " ^6.0.12.20240917"
104
106
types-cachetools = " ^5.5.0.20240820"
107
+ deptry = " ^0.23.0"
105
108
106
109
[tool .poetry .extras ]
107
110
file-based = [" avro" , " fastavro" , " pyarrow" , " unstructured" , " pdf2image" , " pdfminer.six" , " unstructured.pytesseract" , " pytesseract" , " markdown" , " python-calamine" , " python-snappy" ]
@@ -196,3 +199,57 @@ optional_poetry_groups = ["dev"]
196
199
poetry_extras = [" file-based" , " vector-db-based" ]
197
200
poe_tasks = [" check-ci" ]
198
201
mount_docker_socket = true
202
+
203
+ [tool .deptry ]
204
+ exclude = [
205
+ " bin" ,
206
+ " docs" ,
207
+ " unit_tests" ,
208
+ ]
209
+
210
+ [tool .deptry .per_rule_ignores ]
211
+ # This is a mapping of rules and package names to be ignored for that rule.
212
+
213
+ # DEP001: Project should not contain missing dependencies.
214
+ # https://deptry.com/rules-violations/#missing-dependencies-dep001
215
+ DEP001 = [
216
+ # These are imported but not declared:
217
+ " source_declarative_manifest" # Imported only in dynamic import tests, not in main code
218
+ ]
219
+
220
+ # DEP002: Project should not contain unused dependencies.
221
+ # https://deptry.com/rules-violations/#missing-dependencies-dep002
222
+ DEP002 = [
223
+ " cryptography" , # Constrained as transitive dependency due to a bug in newer versions
224
+
225
+ # TODO: Remove these dependencies if not needed:
226
+ " avro" , # Only imported in `unit_tests` code
227
+ " psutil" ,
228
+ " rapidfuzz" ,
229
+ " cohere" ,
230
+ " markdown" ,
231
+ " openai" ,
232
+ " pdf2image" ,
233
+ " pdfminer.six" ,
234
+ " pytesseract" ,
235
+ " python-calamine" ,
236
+ " python-snappy" ,
237
+ " tiktoken" ,
238
+ " unstructured.pytesseract" ,
239
+ ]
240
+
241
+ # DEP003: Project should not use transitive dependencies.
242
+ # https://deptry.com/rules-violations/#transitive-dependencies-dep003
243
+ DEP003 = [
244
+ # Transitive dependencies that are imported directly
245
+ " pydantic_core" # Pydantic internals, no need to define as separate dependency
246
+ ]
247
+
248
+ # DEP004: Project should not use development dependencies in non-development code.
249
+ # https://deptry.com/rules-violations/#misplaced-development-dependencies-dep004
250
+ DEP004 = [
251
+ # The `airbyte_cdk.test.utils` module is main code.
252
+ # TODO: These should probably be declared within a `tests` extra:
253
+ " pytest" ,
254
+ " requests_mock" ,
255
+ ]
0 commit comments