Skip to content

fix: include pandas in filesystem extra#4123

Open
fengjikui wants to merge 1 commit into
dlt-hub:develfrom
fengjikui:codex/filesystem-pandas-dependency
Open

fix: include pandas in filesystem extra#4123
fengjikui wants to merge 1 commit into
dlt-hub:develfrom
fengjikui:codex/filesystem-pandas-dependency

Conversation

@fengjikui

Copy link
Copy Markdown

Summary

  • add pandas to the filesystem optional extra so dlt[filesystem] installs the dependency used by dlt.sources.filesystem.read_csv
  • add a CLI init regression test that keeps the filesystem extra aligned with the generated filesystem pipeline examples

Why

dlt init filesystem postgres generates requirements that rely on the filesystem extra, but the filesystem example calls read_csv(), whose implementation imports pandas directly. Without pandas in the extra, users can install the generated requirements and still hit a missing dependency when running the example.

Fixes #3876.

Validation

  • uv run --extra hub pytest tests/workspace/cli/test_init_command.py::test_filesystem_extra_installs_read_csv_dependency tests/workspace/cli/test_init_command.py::test_init_command_core_source_requirements_with_extras -q -> 3 passed
  • uv run --extra filesystem python - <<'PY' ... confirmed editable metadata exposes pandas<3,>=2.3.0; extra == 'filesystem'
  • uv run python tools/check_dependency_changes.py origin/devel HEAD reports the intended optional dependency addition: [filesystem]: + pandas<3,>=2.3.0

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.

Pipeline example dependencies don't include an install of pandas to support read_csv

1 participant