simularium / simulariumio

Python package that converts simulation outputs to the format consumed by the Simularium viewer website
Apache License 2.0
5 stars 3 forks source link

Feature/progress callback on converters #142

Closed ascibisz closed 1 year ago

ascibisz commented 1 year ago

Problem

Add progress callback so octopus can provide more updates on autoconversion progress Link to ticket

Solution

Added an optional arguments for a callback function and the number of updates to send to each of the converters. Also added tests.

Type of change

Open Questions:

I had difficulties testing for the cellpack converter. I was trying to use the cellpack data from the Jupiter notebook example, since it has multiple ingredients, but I couldn't actually get that example to run without throwing an error. I edited the files down to not include the "snake" ingredient, because the error was thrown in CellpackConverter._unpack_curve(), but that's silly I should go in and figure out what's actually going on here.