Skip to content

feat(io): accept pathlib.Path objects in IO tasks#807

Open
Pranava-Kumar wants to merge 1 commit into
sentinel-hub:developfrom
Pranava-Kumar:feat/pathlib-support
Open

feat(io): accept pathlib.Path objects in IO tasks#807
Pranava-Kumar wants to merge 1 commit into
sentinel-hub:developfrom
Pranava-Kumar:feat/pathlib-support

Conversation

@Pranava-Kumar

Copy link
Copy Markdown

Summary

Update VectorImportTask, ExportToTiffTask, and ImportFromTiffTask to properly accept pathlib.Path objects in addition to strings for their file path parameters.

Changes

  • eolearn/io/geometry_io.py: Updated VectorImportTask.path type from str to str | os.PathLike, added os import
  • eolearn/io/raster_io.py: Updated BaseRasterIoTask.path, ExportToTiffTask.path, ImportFromTiffTask.path types

Testing

  • Unit test confirms get_base_filesystem_and_path() accepts Path objects and converts to str
  • The fs utility layer already handled Path objects; this change only propagates the correct types to the public API

Update VectorImportTask, ExportToTiffTask, and ImportFromTiffTask to
accept pathlib.Path objects in addition to strings.

The underlying get_base_filesystem_and_path utility already supports
Path conversion; this change updates the type annotations to reflect
the actual accepted types.

Adds test coverage for the Path handling path.
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.

1 participant