Skip to content

geotiff: extract input validators into _validation.py (#1813 step 4) #1882

Closed

Description

@brendancol

Reason

Five validators in xrspatial/geotiff/__init__.py (_validate_3d_writer_dims L114, _validate_dtype_cast L316, _validate_tile_size L1105, _validate_chunks_arg L1968, _validate_tile_size_arg L2022) are pure leaves over numpy types and string constants. They are called from to_geotiff, read_geotiff_dask, and read_geotiff_gpu; consolidating them lets later backend extractions stay focused on backend logic.

Proposal

Move them to xrspatial/geotiff/_validation.py. Re-import from __init__.py for the entry points still inline. Existing validator-specific tests (test_band_validation_1673.py, test_geotiff_band_bool_rejection_1786.py, the tile-size tests) continue to exercise behaviour through the public surface; the #1813 parity matrix is the regression backstop.

Refs: #1813.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI design and consistencyenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions