Summary
The converters use make use the async Evo SDK objects. This means they have to run with an event loop. Typically that can be done with asyncio.run(...). That doesn't work for the converters when they are run from jupyter, because it runs its own event loop, and asyncio is not allowing the event loop to be re-entered or for a new one to be created. We used nest_asyncio to try to sidestep this issue, but that caused problems. nest_asyncio was working for a while, but it stopped working when we tried using the converter in the context of a more sophisticated notebook widget.
The potential ways to solve this problem are:
- Make the converter functions async, so that they can use jupyter's event loop.
- Encapsulate the async Evo SDK calls, putting them on another thread with their own event loop.
- Avoid calling async function on the Evo SDK
The decision was made to do (1).
Acceptance Criteria
[ ] All converters have async functions
[ ] The synchronous publish_geoscience_objects_sync is removed
[ ] nest_asyncio is removed from the repository, both its references and as a dependency
[ ] Make network operations concurrent where applicable. For example, use a gather in publish_geoscience_objects.
Out of Scope
DUF (it has already been done by this point)
Definition of Done
Summary
The converters use make use the async Evo SDK objects. This means they have to run with an event loop. Typically that can be done with
asyncio.run(...). That doesn't work for the converters when they are run from jupyter, because it runs its own event loop, and asyncio is not allowing the event loop to be re-entered or for a new one to be created. We usednest_asyncioto try to sidestep this issue, but that caused problems.nest_asynciowas working for a while, but it stopped working when we tried using the converter in the context of a more sophisticated notebook widget.The potential ways to solve this problem are:
The decision was made to do (1).
Acceptance Criteria
[ ] All converters have
asyncfunctions[ ] The synchronous
publish_geoscience_objects_syncis removed[ ]
nest_asynciois removed from the repository, both its references and as a dependency[ ] Make network operations concurrent where applicable. For example, use a gather in
publish_geoscience_objects.Out of Scope
DUF (it has already been done by this point)
Definition of Done