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 I #601

Closed h-mayorquin closed 2 years ago

h-mayorquin commented 2 years ago

This is part of a join effort with @weiglszonja to refactor write_segmentation in the roiextractors module. This first PR does a couple of things: 1) It refactors the previously added function called add_imaging_plane and adds some unit tests. 2) The add_imaging_plane function is then used to refactor the write_segmentation function with some code reduction. 3) There are some other minor refactoring in documentation (add_device function) and style here and there.

h-mayorquin commented 2 years ago

@CodyCBakerPhD it seems that the windows tests are failing again even with re-running:

https://github.com/catalystneuro/nwb-conversion-tools/runs/7446674056?check_suite_focus=true https://github.com/catalystneuro/nwb-conversion-tools/runs/7446339098?check_suite_focus=true

codecov[bot] commented 2 years ago

Codecov Report

Merging #601 (29b2bcf) into main (9a9fb75) will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #601      +/-   ##
==========================================
+ Coverage   88.34%   88.38%   +0.04%     
==========================================
  Files          59       59              
  Lines        3218     3221       +3     
==========================================
+ Hits         2843     2847       +4     
+ Misses        375      374       -1     
Flag Coverage Δ
unittests 88.38% <100.00%> (+0.04%) :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 80.63% <100.00%> (+0.63%) :arrow_up:
CodyCBakerPhD commented 2 years ago

@h-mayorquin @weiglszonja FYI this stuff did not make it over to https://github.com/catalystneuro/neuroconv prior to commit I used to split so this chain of PRs will have to be ported over