spyglass icon indicating copy to clipboard operation
spyglass copied to clipboard

`IntervalList` cautious insert

Open CBroz1 opened this issue 10 months ago • 4 comments

Description

We have previously discussed redundancy in IntervalList in #778. This PR makes pervasive edits to the codebase to check existing entries before inserting new ones. This comes with the drawback of future mismatches between substrings of interval_list_name and other features of a given key. I would argue that substrings should not be used in this manner, and the confusion presented will be minor, as the other contents of the key takes precedence. The use of nwb_file_name in IntervalList prevents cross-session reuse of keys, so confusion should be minimized in that respect.

I've marked as draft pending the addition of documentation on this change. I welcome feedback on the structure of cautious_insert and its inclusion across the codebase

Checklist:

  • [ ] This PR should be accompanied by a release: (yes/no/unsure)
  • [ ] If release, I have updated the CITATION.cff
  • [ ] This PR makes edits to table definitions: (yes/no)
  • [ ] If table edits, I have included an alter snippet for release notes.
  • [ ] I have updated the CHANGELOG.md with PR number and description.
  • [ ] I have added/edited docs/notebooks to reflect the changes

CBroz1 avatar Apr 23 '24 21:04 CBroz1