Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid fails on async processes in notebooks #353

Open
huard opened this issue Feb 2, 2021 · 3 comments
Open

Avoid fails on async processes in notebooks #353

huard opened this issue Feb 2, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@huard
Copy link
Contributor

huard commented Feb 2, 2021

Description

Some notebooks include async processes, which fail when run by our test suite because the next cells does not wait for the async cell to complete.

Potential solutions

  • Add time.sleep() either at the end of the cell, or in another hidden cell (include {"hide_input": true} into the cell) so it does not appear in the rendered HTML.
  • Use IPython's await, but this probably requires upstream birdy/owslib modification (ie. use asyncio)
@Zeitsperre
Copy link
Contributor

I know I suggested it on slack, but I'm really not a fan of the time.sleep() approach. It still has the potential to fail (assuming that a process or the network it's run on is too slow) and testing an artificially slowed down notebook is annoying on a performance setup.

Would it be reasonable to open a ticket on owslib and birdy to ask for this functionality? I'm sure @cehbrecht has thoughts on this.

@Zeitsperre Zeitsperre added the enhancement New feature or request label Feb 2, 2021
@huard
Copy link
Contributor Author

huard commented Feb 2, 2021

I'm not sure exactly what we want. I suggest this is something we defer to the maintenance phase, and we do some initial exploration before proposing anything to owslib.

@tlvu
Copy link
Contributor

tlvu commented Feb 2, 2021

I also thought about this, few options, all just hypothesis:

  • Add a loop to pool on the ready/done status.
  • Add an environment var that during automation run, set the async flag to false. This assume we do not need to test the async feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants