@@ -40,31 +40,33 @@ isodate = "~0.6.1"
4040Jinja2 = " ~3.1.2"
4141jsonref = " ~0.2"
4242jsonschema = " ~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
4344pandas = " 2.2.2"
44- psutil = " 6.1.0"
45+ psutil = " 6.1.0" # TODO: Remove if unused
4546pydantic = " ^2.7"
4647pyrate-limiter = " ~3.1.0"
4748python-dateutil = " ^2.9.0"
4849python-ulid = " ^3.0.0"
4950PyYAML = " ^6.0.1"
50- rapidfuzz = " ^3.10.1"
51+ rapidfuzz = " ^3.10.1" # TODO: Remove if unused
5152requests = " *"
5253requests_cache = " *"
54+ typing-extensions = " *" # Transitive dependency used directly in code
5355wcmatch = " 10.0"
5456# 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
5658cohere = { version = " 4.21" , optional = true }
5759fastavro = { version = " ~1.8.0" , optional = true }
5860langchain = { version = " 0.1.16" , optional = true }
5961langchain_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
6264pdf2image = { 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
6466pyarrow = { 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
6870tiktoken = { version = " 0.8.0" , optional = true }
6971nltk = { version = " 3.9.1" , optional = true }
7072# 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"
7375unstructured = { version = " 0.10.27" , extras = [" docx" , " pptx" ], optional = true }
7476"unstructured.pytesseract" = { version = " >=0.3.12" , optional = true }
7577pyjwt = " ^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
7779pytz = " 2024.2"
7880orjson = " ^3.10.7"
7981serpyco-rs = " ^1.10.2"
@@ -102,6 +104,7 @@ types-requests = "^2.32.0.20241016"
102104types-python-dateutil = " ^2.9.0.20241003"
103105types-pyyaml = " ^6.0.12.20240917"
104106types-cachetools = " ^5.5.0.20240820"
107+ deptry = " ^0.23.0"
105108
106109[tool .poetry .extras ]
107110file-based = [" avro" , " fastavro" , " pyarrow" , " unstructured" , " pdf2image" , " pdfminer.six" , " unstructured.pytesseract" , " pytesseract" , " markdown" , " python-calamine" , " python-snappy" ]
@@ -196,3 +199,57 @@ optional_poetry_groups = ["dev"]
196199poetry_extras = [" file-based" , " vector-db-based" ]
197200poe_tasks = [" check-ci" ]
198201mount_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