catalystneuro / nwb-conversion-tools

Create NWB files by converting and combining neural data in proprietary formats and adding essential metadata.
https://nwb-conversion-tools.readthedocs.io/en/main/
BSD 3-Clause "New" or "Revised" License
25 stars 12 forks source link

Refactor write segmentation III (add summary images) #603

Closed h-mayorquin closed 2 years ago

h-mayorquin commented 2 years ago

This is related to #601 and #602

This PR deals with refactoring the part of the write_segmentation function that adds the summary images (mean and correlation). I refactored this by adding an extra function whose sole purpose is to perform this addition to nwb. I also added some tests for this newly introduced function.

Also removed an unnecessary warning statement that we had.

This requires the branch in the following PR in roiextractors: https://github.com/catalystneuro/roiextractors/pull/179

The reason being that the dummy segmentation extractor required for testing is a recent addition and the latest commit (specified in the has) also added an option for having a dummy segmentation extractor without summary images. As this runs in both our internal and data tests it is required in both requirement files

codecov[bot] commented 2 years ago

Codecov Report

Merging #603 (ab2b8b0) into main (8a78f80) will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   88.42%   88.44%   +0.02%     
==========================================
  Files          59       59              
  Lines        3222     3228       +6     
==========================================
+ Hits         2849     2855       +6     
  Misses        373      373              
Flag Coverage Δ
unittests 88.44% <100.00%> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...b_conversion_tools/tools/roiextractors/__init__.py 100.00% <ø> (ø)
...version_tools/tools/roiextractors/roiextractors.py 81.53% <100.00%> (+0.43%) :arrow_up:
h-mayorquin commented 2 years ago

Let's merge and close this as this is done in the new repo.