remove_inventory

method of dascore.core.spool.Spool source

remove_inventory(
    self ,
)-> ‘Self’

Return a spool carrying no inventory.

Any enrichment set up by Spool.enrich goes with it, since there is nothing left to enrich from. A spool with no inventory is returned unchanged in substance; as everywhere else, the original spool is left alone.

Removal sticks, including on a spool which found its inventory in its own directory: the slot is filled when the spool is opened and nothing fills it again.

Examples

import dascore as dc
from dascore.examples import inventory_patch_pair

patch, inventory = inventory_patch_pair()
spool = dc.spool(patch).attach_inventory(inventory).enrich()
plain = spool.remove_inventory()
assert "gauge_length" not in dict(plain[0].attrs)
assert spool[0].attrs.gauge_length == 10.0  # the original stands