spacetx / slicedimage

MIT License
7 stars 3 forks source link

Validation (round 1) #61

Closed joshmoore closed 5 years ago

joshmoore commented 6 years ago

Note: the new test set was generated by spacetx-fov-writer 0.0.2 given the input image&sizeX=8&sizeY=8.fake.

joshmoore commented 6 years ago

Hmmm.... ok. Needs rethinking since this is currently part of the backend as opposed to object validation:

E                   slicedimage.backends._base.ChecksumValidationError: calculated checksum 
(eb69f9cdcf27ac7be3014f7ea209ec7cc289b3af5168ec69e79231900d93d0c7) does not match 
expected checksum (...CORRUPTION...e3014f7ea209ec7cc289b3af5168ec69e79231900d93d0c7)
joshmoore commented 6 years ago

TIL: npyio requires the file handle to have seek. tifffile inspects whether it has seek and uses it if it exists.

codecov-io commented 6 years ago

Codecov Report

Merging #61 into master will increase coverage by 0.88%. The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
+ Coverage   81.12%   82.01%   +0.88%     
==========================================
  Files          18       18              
  Lines         535      567      +32     
==========================================
+ Hits          434      465      +31     
- Misses        101      102       +1
Impacted Files Coverage Δ
slicedimage/_tileset.py 95% <100%> (+5.52%) :arrow_up:
slicedimage/_tile.py 85.36% <93.75%> (+4.97%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 661c0f1...895be0f. Read the comment docs.

ttung commented 6 years ago

TIL: npyio requires the file handle to have seek. tifffile inspects whether it has seek and uses it if it exists.

Not fully correct. tifffile checks if it has seek, and if it does, it uses it. If it doesn't, it reads into a BytesIO object. :(

As a result, there is no point in building streaming support.

joshmoore commented 6 years ago

As a result, there is no point in building streaming support.

Doh.

@ttung : is there any form of validation that you can see being of value at the TileSet / Tile level at the moment? Is it worth passing in src_doc from Experiment.from_json and checking against that?

ttung commented 6 years ago

@ttung : is there any form of validation that you can see being of value at the TileSet / Tile level at the moment? Is it worth passing in src_doc from Experiment.from_json and checking against that?

Yes, I think validation for TileSets and Collections akin to what was built for sptx-format would be great. :)

joshmoore commented 6 years ago

Yes, I think validation for TileSets and Collections akin to what was built for sptx-format would be great.

Hmmm... think I could use a quick summary of what you think that entails.

joshmoore commented 5 years ago

Closing this in favor of a far future backend. :wink: