single-cell-data / SOMA

A flexible and extensible API for annotated 2D matrix data stored in multiple underlying formats.
MIT License
70 stars 9 forks source link

Add `close` method and context-manager operations #100

Closed thetorpedodog closed 1 year ago

thetorpedodog commented 1 year ago

This adds a close method to SOMAObject, which allows implementations to specify cleanup operations, and hooks it up to the context manager protocol by default.

Also cleans up other delete callsites to do our own delete work before calling the superclass delete.