Dependency Management
Relevant source files
The following files were used as context for generating this wiki page:
Dependency management in flext-dbt-oracle is structured around a multi-layered architecture that integrates dbt (data build tool) with Oracle database environments using the FLEXT framework. The system manages three primary types of dependencies: core Python library dependencies, dbt adapter requirements, and runtime infrastructure constraints.
The project utilizes hatchling as its build backend and enforces strict versioning for Python (3.13) and dbt core (>=1.8.0). Management is divided into "Managed" sections, handled by automation tools like flext_infra.deps.modernizer, and "Custom" sections for project-specific needs.
Sources: pyproject.toml:7-10, rules.json:10-15, README.md:1-5
Architecture and Core Dependencies
The project's dependency graph is anchored by the FLEXT ecosystem, specifically inheriting rules and logic from flext-db-oracle. It adopts a "Modern dbt only" policy, explicitly forbidding legacy PostgreSQL dependencies often found in standard dbt environments.
Core Dependency Stack
The following table outlines the essential runtime dependencies required for the module to function:
| Package | Version Requirement | Purpose |
|---|---|---|
dbt-common | `git+https://github.com/flext-sh/dbt-common.git%40flext/relax-deps%60 | Specialized dbt core extensions |
flext-core | (unspecified version in toml) | Base framework utilities |
flext-db-oracle | >=0.7.0 | Primary Oracle database interface |
flext-meltano | (unspecified version in toml) | Singer/Meltano integration support |
pydantic | >=2.13.3 | Data validation and settings management |
oracledb | >=3.2.0 | Thin/Thick Oracle driver |
Sources: pyproject.toml:29-37, rules.json:117-127
Dependency Flow Diagram
This diagram illustrates how flext-dbt-oracle sits within the larger FLEXT and dbt ecosystem.
The project inherits its base database integration rules directly from flext-db-oracle.
Sources: rules.json:7, README.md:25-28
Development and Quality Gate Dependencies
Dependency management extends to a comprehensive set of development tools categorized under dev optional dependencies. These are strictly enforced through the FLEXT Universal Agent Engineering Core, which mandates that tests and static analysis tools like Ruff, Pyright, and Mypy are run against the entire tree, including examples/ and tests/.
Tooling Categories
- Static Analysis:
ruff,mypy,pyrefly,deptry,vulture. - Testing Framework:
pytest,pytest-cov,pytest-xdist,hypothesis. - Documentation:
mkdocs,mkdocs-material,mkdocs-mermaid2-plugin. - Security & Audit:
bandit,pip-audit,codespell.
Sources: pyproject.toml:50-128, AGENTS.md:50-60
Constraint Management and Forbidden Dependencies
The system implements a "Zero-Tolerance" policy for unauthorized dependencies to prevent environment pollution. Specifically, the adapter is designed to be isolated from PostgreSQL-specific libraries.
Forbidden Packages
The following dependencies are explicitly prohibited:
dbt-postgrespsycopg2postgresql
Sources: rules.json:128-132, rules.json:141-143
Logical Constraints
- Python Version: Strictly limited to
>=3.13,<3.14. - Modern dbt Pattern: Mandatory use of
adapter_api_version: v12. - Database Identity: Restricted to Oracle database environments only.
Sources: pyproject.toml:44, rules.json:11-15
Runtime Configuration Dependencies
Runtime dependencies are further refined into "Value" models and settings that determine how the adapter connects to and executes queries on Oracle. The FlextDbtOracleSettings class manages these via environment variables with a FLEXT_DBT_ORACLE_ prefix.
The settings provide a Typed Single Source of Truth (SSOT) that the application reads at production time.
Sources: src/flext_dbt_oracle/settings.py:16-50, src/flext_dbt_oracle/models.py:17-25
Conclusion
Dependency management in flext-dbt-oracle is a highly regulated system that prioritizes modern dbt standards and Oracle-specific optimizations while strictly excluding competing database drivers. By leveraging a managed pyproject.toml and explicit rules.json constraints, the project ensures a consistent development and runtime environment across the FLEXT ecosystem.