developmentseed / developmentseed/zarrista
Improve ergonomics of `FillValue` API by storing `DataType`
- Dominant language
- Python
- Stars
- 45
- Forks
- 2
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 7
Description
Right now our `FillValue` class is a very minimal wrapper of upstream Zarrs [`FillValue`](https://docs.rs/zarrs/latest/zarrs/array/struct.FillValue.html), which holds only a raw `Vec`.
Perhaps our `FillValue` should also hold a `DataType` so that it can be smarter about the user-facing API it presents?
Like it could have a `to_numpy` API that would then create a `np.uint8(value)` or `np.float32(value)` etc.
Then the user wouldn't have to manually convert raw bytes into a specific data type's fill value.
This would change our Python-facing `FillValue` to be _fully generic_ to being _tied to a specific array's data type_, but I think that's an improvement in ergonomics.
Contributor guide
No contributing guide indexed for this repository
Research direction
The entry point is the Python-facing FillValue wrapper, with upstream zarrs FillValue as the reference; first review how its raw Vec and DataType are currently exposed. Done means a FillValue can be associated with a DataType and provide the proposed typed to_numpy behavior without requiring manual raw-byte conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python, rust
- Domain
- backend-api-design, data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100