Contributing to lakeflow_framework.contrib¶
The lakeflow_framework.contrib subpackage is the home for optional,
community-maintained integrations. It is deliberately separate from the core
framework so that:
The core
pip install lakeflow-frameworkstays lightweight with no extra dependencies.Community integrations can evolve at their own pace without affecting core stability guarantees.
Individual integrations can be gated behind their own extras (e.g.
pip install "lakeflow-framework[contrib.myintegration]").
Deployment context: wheel vs. flat DAB deploy¶
Contrib modules live inside the lakeflow_framework package tree and
therefore behave differently depending on how the framework is deployed.
Understanding both modes is important when writing or using a contrib module.
Mode |
How the framework is available |
How contrib modules are available |
|---|---|---|
Wheel install |
|
|
Flat DAB deploy |
The framework repository is cloned and deployed via
|
|
Wheel + local overlay |
Wheel installed, plus |
Same as wheel install — contrib is available from the wheel. |
Contrib vs. pipeline-bundle custom code
contrib is for reusable framework-level integrations that benefit
many teams (e.g. a connector, a utility class, an alternative logger
backend). Pipeline-specific Python — transforms, domain logic, helper
functions used by a single pipeline — belongs in the pipeline bundle under
src/local/python/ or src/python/, not in contrib.
Support policy¶
Property |
Policy |
|---|---|
Install gate |
|
Stability label |
All contrib modules carry the experimental label until explicitly graduated. Breaking changes between minor releases are allowed for experimental modules. |
Stability graduation |
A module graduates to stable via a PR that removes the experimental label and passes a core-team review. Once stable, normal semver deprecation rules apply. |
External dependencies |
Must be declared as optional extras in |
Review scope |
Maintainers review for safety and conformance with framework conventions. Feature completeness is the contributor’s responsibility. |
Adding a new contrib module¶
Create the module directory
src/lakeflow_framework/contrib/<your_module>/ ├── __init__.py └── README.rst ← required: purpose, status, external deps
Declare the extra in ``pyproject.toml``
Add a new entry under
[project.optional-dependencies]:[project.optional-dependencies] contrib = [] contrib.myintegration = ["some-third-party>=1.0"] all = ["lakeflow-framework[contrib]", "lakeflow-framework[contrib.myintegration]"]
Write a ``README.rst``
The README must state:
Purpose of the integration.
Stability label (
experimentaluntil graduated).Required external dependencies and minimum versions.
Install instructions for both deploy modes:
Wheel:
pip install "lakeflow-framework[contrib.myintegration]"Flat DAB deploy: how to install external deps as cluster libraries or via
src/local/libraries/.
Basic usage example.
Add tests
Tests for contrib modules must be gated behind the relevant extra. The easiest pattern is a
pytest.importorskipat the top of the test module:1some_dep = pytest.importorskip("some_third_party")
This ensures the test is skipped (not failed) when the extra is not installed.
Open a pull request
Follow the standard PR process in Contribution workflow. In the PR description, note:
The extra name being added.
A brief rationale for why this belongs in
contribrather than the core.Any known limitations or areas not yet covered.
Module conventions¶
Convention |
Details |
|---|---|
``__init__.py`` |
Import only what is needed. Avoid heavy imports at module-load time — use lazy imports if the external dependency is optional even within the contrib module. |
Naming |
Use |
Logging |
Use the framework logger ( |
No private framework internals |
Contrib modules must import only from the public |
See also¶
src/lakeflow_framework/contrib/README.rstin the repository — the in-source support policy document.Contribution workflow — general contribution workflow.
Set up your environment — development environment setup.