zarr-developers / numcodecs

A Python package providing buffer compression and transformation codecs for use in data storage and communication applications.
http://numcodecs.readthedocs.io
MIT License
125 stars 87 forks source link

Allow VLenUTF8 to encode a read-only source #515

Closed ivirshup closed 2 months ago

ivirshup commented 6 months ago

Allow read-only arrays to be encoded with VLenUTF8

Arguably this should be tested and potentially fixed for all codecs.

Question: Is this implementation fine? I've done very little Cython, so I have no idea if there are any downsides to this.

TODO:

pep8speaks commented 6 months ago

Hello @ivirshup! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2024-03-12 20:26:51 UTC
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.91%. Comparing base (1be12d3) to head (47f1afe).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #515 +/- ## ======================================= Coverage 99.91% 99.91% ======================================= Files 59 59 Lines 2336 2339 +3 ======================================= + Hits 2334 2337 +3 Misses 2 2 ``` | [Files](https://app.codecov.io/gh/zarr-developers/numcodecs/pull/515?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zarr-developers) | Coverage Δ | | |---|---|---| | [numcodecs/tests/test\_vlen\_utf8.py](https://app.codecov.io/gh/zarr-developers/numcodecs/pull/515?src=pr&el=tree&filepath=numcodecs%2Ftests%2Ftest_vlen_utf8.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zarr-developers#diff-bnVtY29kZWNzL3Rlc3RzL3Rlc3Rfdmxlbl91dGY4LnB5) | `100.00% <100.00%> (ø)` | |