Skip to content

feat(extensions): canonical src/ bundle layout with libraries, init hooks, python modules and extensions deprecation#39

Merged
rederik76 merged 5 commits into
mainfrom
feature/init-hooks-extensions-layout
May 18, 2026
Merged

feat(extensions): canonical src/ bundle layout with libraries, init hooks, python modules and extensions deprecation#39
rederik76 merged 5 commits into
mainfrom
feature/init-hooks-extensions-layout

Conversation

@rederik76
Copy link
Copy Markdown
Collaborator

@rederik76 rederik76 commented Apr 17, 2026

Replaces the single-directory extensions/ convention with a structured src/ layout
that separates cluster libraries, spec-referenced Python, and lifecycle init scripts.
Renames extension_loader.py to bundle_loader.py to reflect its broader role.

Layout changes

  • Pipeline bundles: src/libraries/ (wheels + sys.path), src/python/ (spec Python),
    src/init/pre/ and src/init/post/ (lifecycle scripts)
  • Framework bundle: custom code lives exclusively under src/local/ (libraries/,
    python/, init/pre/, init/post/) — no top-level src/ equivalents
  • FrameworkPaths constants renamed to LOCAL_* to reflect local/ prefix; all
    *sourcePath confs resolve to src/ so constants omit the src/ segment

Deprecation

  • extensions/ on sys.path deprecated (v0.13.0), removed in v1.0.0
  • extensions/ is registered unconditionally alongside src/python/ when both exist
  • extensions/libraries/ (never shipped) dropped with no deprecation window

Code

  • extension_loader.py → bundle_loader.py; uses FrameworkPaths.LOCAL_* for
    framework paths and PipelineBundlePaths.* for bundle paths
  • dataflow_spec_builder: search paths updated to LOCAL_* framework constants
  • constants.py: FrameworkPaths gains LOCAL_* paths; PipelineBundlePaths paths
    corrected to omit redundant src/ prefix

Samples & template

  • bronze_sample migrated: extensions/libraries/ → src/python/,
    extensions/pre_init|post_init/ → src/init/pre|post/
  • New libraries demo: phonenumbers wheel in src/libraries/, installed via
    environment.dependencies; demonstrates full install→import chain
  • pipeline_bundle_template scaffolded with README.md for each new src/ directory
  • src/local/ scaffolded in framework src/ with README.md files

Docs & ADRs

  • feature_python_extensions.rst rewritten: new title, bundle context table,
    src/python/ replaces src/extensions/ throughout, environment.dependencies
    replaces libraries: whl/pypi syntax
  • feature_python_functions.rst, feature_python_source.rst: updated to src/python/
    with deprecation notices for src/extensions/
  • build_pipeline_bundle_steps.rst, build_pipeline_bundle_structure.rst: updated
    directory diagrams and added steps for libraries/python/init
  • docs/decisions/0001-bundle-src-layout.md, 0002-extensions-deprecation.md: new ADRs

Introduce pre_init and post_init hook folders executed via runpy around
initialize_pipeline(), with extensions/libraries on sys.path and legacy
flat extensions/ deprecated.
- Add extension_loader (add_extensions_libraries_to_sys_path, run_init_hooks)
- Extend constants for libraries/pre_init/post_init paths; resolve python
  function files under extensions/libraries before legacy extensions/
- Wire hooks in DLTPipelineBuilder; bump version; add unit tests
- Update docs, scaffold, samples (bronze), Cursor assets/SKILL, VERSION
@rederik76 rederik76 changed the title feat: add pipeline init hooks and extensions/libraries layout feat(extensions): add pipeline init hooks and extensions/libraries layout Apr 17, 2026
@rederik76 rederik76 self-assigned this Apr 17, 2026
rederik76 added 4 commits May 16, 2026 13:22
…tensions/

Replaces the single-directory extensions/ convention with a structured src/ layout
that separates cluster libraries, spec-referenced Python, and lifecycle init scripts.
Renames extension_loader.py to bundle_loader.py to reflect its broader role.

Layout changes
- Pipeline bundles: src/libraries/ (wheels + sys.path), src/python/ (spec Python),
  src/init/pre/ and src/init/post/ (lifecycle scripts)
- Framework bundle: custom code lives exclusively under src/local/ (libraries/,
  python/, init/pre/, init/post/) — no top-level src/ equivalents
- FrameworkPaths constants renamed to LOCAL_* to reflect local/ prefix; all
  *sourcePath confs resolve to src/ so constants omit the src/ segment

Deprecation
- extensions/ on sys.path deprecated (v0.13.0), removed in v1.0.0
- extensions/ is registered unconditionally alongside src/python/ when both exist
- extensions/libraries/ (never shipped) dropped with no deprecation window

Code
- extension_loader.py → bundle_loader.py; uses FrameworkPaths.LOCAL_* for
  framework paths and PipelineBundlePaths.* for bundle paths
- dataflow_spec_builder: search paths updated to LOCAL_* framework constants
- constants.py: FrameworkPaths gains LOCAL_* paths; PipelineBundlePaths paths
  corrected to omit redundant src/ prefix

Samples & template
- bronze_sample migrated: extensions/libraries/ → src/python/,
  extensions/pre_init|post_init/ → src/init/pre|post/
- New libraries demo: phonenumbers wheel in src/libraries/, installed via
  environment.dependencies; demonstrates full install→import chain
- pipeline_bundle_template scaffolded with README.md for each new src/ directory
- src/local/ scaffolded in framework src/ with README.md files

Docs & ADRs
- feature_python_extensions.rst rewritten: new title, bundle context table,
  src/python/ replaces src/extensions/ throughout, environment.dependencies
  replaces libraries: whl/pypi syntax
- feature_python_functions.rst, feature_python_source.rst: updated to src/python/
  with deprecation notices for src/extensions/
- build_pipeline_bundle_steps.rst, build_pipeline_bundle_structure.rst: updated
  directory diagrams and added steps for libraries/python/init
- docs/decisions/0001-bundle-src-layout.md, 0002-extensions-deprecation.md: new ADRs
@rederik76 rederik76 changed the title feat(extensions): add pipeline init hooks and extensions/libraries layout feat(extensions): canonical src/ bundle layout with libraries, init hooks, python modules and extensions deprecation May 18, 2026
@rederik76 rederik76 requested a review from haillew May 18, 2026 02:04
@rederik76 rederik76 merged commit a929983 into main May 18, 2026
@rederik76 rederik76 deleted the feature/init-hooks-extensions-layout branch May 18, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Canonical src/ bundle layout with libraries, init hooks, python modules and extensions deprecation

2 participants