NOAA-OWP / hydrotools

Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.
Other
54 stars 13 forks source link

Fix #99: "RuntimeError: This event loop is already running" in colab and notebook. Re-PR of #100 #130

Closed aaraney closed 3 years ago

aaraney commented 3 years ago

This is a resubmission of #100 with minor changes to the unit test added. Fixes #99.

Changes

Testing

  1. Test added to verify ModuleNotFoundError is raised. If nest_asyncio is installed, test fails.

Checklist

jarq6c commented 3 years ago

@aaraney Have you confirmed this change fixes the original google collab issue? Our other software devs may have an opinion on the general pattern, but nothing appears particularly obscene about this contribution to me.

aaraney commented 3 years ago

@aaraney Have you confirmed this change fixes the original google collab issue? Our other software devs may have an opinion on the general pattern, but nothing appears particularly obscene about this contribution to me.

Yes. Here is a colab notebook that verifies this PR resolves the previous issue.

jarq6c commented 3 years ago

Thanks for the fix!

aaraney commented 3 years ago

For sure!