@@ -43,13 +43,13 @@ jsonref = "~0.2"
4343jsonschema = " ~4.17.3" # 4.18 has some significant breaking changes: https://github.com/python-jsonschema/jsonschema/releases/tag/v4.18.0
4444packaging = " *" # Transitive dependency used directly in code
4545pandas = " 2.2.2"
46- psutil = " 6.1.0"
46+ psutil = " 6.1.0" # TODO: Remove if unused
4747pydantic = " ^2.7"
4848pyrate-limiter = " ~3.1.0"
4949python-dateutil = " ^2.9.0"
5050python-ulid = " ^3.0.0"
5151PyYAML = " ^6.0.1"
52- rapidfuzz = " ^3.10.1"
52+ rapidfuzz = " ^3.10.1" # TODO: Remove if unused
5353requests = " *"
5454requests_cache = " *"
5555typing-extensions = " *" # Transitive dependency used directly in code
@@ -60,14 +60,14 @@ cohere = { version = "4.21", optional = true }
6060fastavro = { version = " ~1.8.0" , optional = true }
6161langchain = { version = " 0.1.16" , optional = true }
6262langchain_core = { version = " 0.1.42" , optional = true }
63- markdown = { version = " *" , optional = true }
64- openai = { version = " 0.27.9" , extras = [" embeddings" ], optional = true }
63+ markdown = { version = " *" , optional = true } # TODO: Remove if unused
64+ openai = { version = " 0.27.9" , extras = [" embeddings" ], optional = true } # Used indirectly by langchain library
6565pdf2image = { version = " 1.16.3" , optional = true }
66- "pdfminer.six" = { version = " 20221105" , optional = true }
66+ "pdfminer.six" = { version = " 20221105" , optional = true } # Used indirectly by unstructured library
6767pyarrow = { version = " ^19.0.0" , optional = true }
68- pytesseract = { version = " 0.3.10" , optional = true }
69- python-calamine = { version = " 0.2.3" , optional = true }
70- python-snappy = { version = " 0.7.3" , optional = true }
68+ pytesseract = { version = " 0.3.10" , optional = true } # Used indirectly by unstructured library
69+ python-calamine = { version = " 0.2.3" , optional = true } # Used indirectly by unstructured library
70+ python-snappy = { version = " 0.7.3" , optional = true } # Used indirectly by unstructured library
7171tiktoken = { version = " 0.8.0" , optional = true }
7272nltk = { version = " 3.9.1" , optional = true }
7373# This will ensure that even when you run poetry install or pip install, the compatible version of numpy will always be chosen.
@@ -76,7 +76,7 @@ numpy = "<2"
7676unstructured = { version = " 0.10.27" , extras = [" docx" , " pptx" ], optional = true }
7777"unstructured.pytesseract" = { version = " >=0.3.12" , optional = true }
7878pyjwt = " ^2.8.0"
79- cryptography = " >=44.0.0,<45.0.0"
79+ cryptography = " >=44.0.0,<45.0.0" # Constrained as transitive dependency due to a bug in newer versions
8080pytz = " 2024.2"
8181orjson = " ^3.10.7"
8282serpyco-rs = " ^1.10.2"
@@ -201,24 +201,30 @@ poetry_extras = ["file-based", "vector-db-based"]
201201poe_tasks = [" check-ci" ]
202202mount_docker_socket = true
203203
204+ [tool .deptry ]
205+ exclude = [
206+ " bin" ,
207+ " docs" ,
208+ " unit_tests" ,
209+ ]
210+
204211[tool .deptry .per_rule_ignores ]
205212# This is a mapping of rules and package names to be ignored for that rule.
206213
207- # DEP001: Unused direct dependencies - packages that are declared as dependencies but not imported
208- # https://deptry.com/rules-violations/#unused -dependencies-dep001
214+ # DEP001: Project should not contain missing dependencies.
215+ # https://deptry.com/rules-violations/#missing -dependencies-dep001
209216DEP001 = [
210- # Optional dependencies that might be imported conditionally
211- " dagger" , # Used in bin scripts but not a core dependency
212- " source_declarative_manifest" # Used in tests but not a core dependency
217+ # These are imported but not declared:
218+ " dagger" , # Used in ` bin` scripts but not in main code
219+ " source_declarative_manifest" # Imported only in dynamic import tests, not in main code
213220]
214221
215- # DEP002: Missing dependencies - packages that are imported but not declared as dependencies
222+ # DEP002:
216223# https://deptry.com/rules-violations/#missing-dependencies-dep002
217224DEP002 = [
218- # Dependencies that are imported indirectly through other packages
219- " sqlalchemy" , # Used through extras
220- # Optional dependencies in extras
221- " psutil" ,
225+ " cryptography" , # Constrained as transitive dependency due to a bug in newer versions
226+
227+ # TODO: Remove these dependencies if not needed:
222228 " rapidfuzz" ,
223229 " cohere" ,
224230 " markdown" ,
@@ -230,23 +236,20 @@ DEP002 = [
230236 " python-snappy" ,
231237 " tiktoken" ,
232238 " unstructured.pytesseract" ,
233- " cryptography"
234239]
235240
236241# DEP003: Transitive dependencies - packages that are imported directly
237242# https://deptry.com/rules-violations/#transitive-dependencies-dep003
238243DEP003 = [
239244 # Transitive dependencies that are imported directly
240- " pydantic_core" # Pydantic internals
245+ " pydantic_core" # Pydantic internals, no need to define as separate dependency
241246]
242247
243248# DEP004: Dev dependencies imported in main code - packages that are imported in non-test code but declared as dev dependencies
244249# https://deptry.com/rules-violations/#misplaced-development-dependencies-dep004
245250DEP004 = [
246- " pdoc" , # Only used for generating documentation. Not a runtime dependency.
247- " pytest" , # Test dependencies
248- " freezegun" , # Test dependencies
249- " requests_mock" , # Test dependencies
250- " _pytest" , # Test dependencies
251- " pympler" # Test dependencies
251+ # The `airbyte_cdk.test.utils` module is main code.
252+ # These should probably be declared in a `tests` extra (TODO):
253+ " pytest" ,
254+ " requests_mock" ,
252255]
0 commit comments