tests: disable test_run_modules::test_grainstats #1100
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The refactoring to use classes for objects rather than dictionaries breaks the
topostats grainstats
entry point thatwas introduced with #1094.
Previously the dictionary item
image=topostats_object["image"]
was passed intoprocessing.run_grainstats()
when called fromprocessing.process_grainstats()
. The refactoring requires thatimage_grain_crop=image_grain_crop
, an object of the new typeImageGrainCrops
, is now passed tograinstats
.This isn't currently possible though because
AFMReader
loads.topostats
objects and returns a dictionary and whilstthe refactoring does save the new
image_grain_crop
(/ImageGrainCrops
) the loading does not currently re-createthese structures.
For now I have disabled the test of the entry point. Once this refactoring has been merged we will have to...
TopoStats
a dependency ofAFMReader
(somewhat wary of this as it may cause headaches further down the linebut for now we'll go with it!).
AFMReader.topostats.load_topostats()
to modify thedata["grain_tensors"]["above"]
anddata["grain_tensors"]["above"]
so that they are of classImageGrainCrops
(and the associated nested classes).data["grain_tensors"]
toprocessing.run_grainstats()
(this mayrequire reconstructing to be the same as
image_grain_crop
, not sure at the moment!)EDIT : Looking at this further we have a challenge as currently only the
image_grain_crops.[above|below].full_mask_tensors
are added to thetopostats_object
which means that when we load.topostats
object it is not possible to create theImageGrainCrops
without first re-running the grain detection. This in turn means its not possible to have entry points forgrainstats
and all subsequent processing stages until we inlcude this data, at least in raw-format, when we save.topostats
objects so thatAFMReader
can recreate them on loading.I've noted this and more thoughts down in AFMReader #121.