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 II (use `add_devices`) #602

Closed h-mayorquin closed 2 years ago

h-mayorquin commented 2 years ago

A continuation of #601 and chained to it: 1) Some minor modification in the add_device function so a device is not created again if it already exists. 2) Code reduction in write_segmentation by using the add_device function. 3) Eliminate code to add the subject in the write_segmentation 4) Make the default metadata more flat in its definition.

codecov[bot] commented 2 years ago

Codecov Report

Merging #602 (8a78f80) into main (29b2bcf) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #602      +/-   ##
==========================================
+ Coverage   88.38%   88.42%   +0.03%     
==========================================
  Files          59       59              
  Lines        3221     3222       +1     
==========================================
+ Hits         2847     2849       +2     
+ Misses        374      373       -1     
Flag Coverage Δ
unittests 88.42% <100.00%> (+0.03%) :arrow_up:

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

Impacted Files Coverage Δ
...version_tools/tools/roiextractors/roiextractors.py 81.10% <100.00%> (+0.46%) :arrow_up: