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

document: jupyter notebooks + asyncio #12

Open
oliver-sanders opened this issue Mar 20, 2019 · 6 comments
Open

document: jupyter notebooks + asyncio #12

oliver-sanders opened this issue Mar 20, 2019 · 6 comments
Labels
content Addition or modification of documentation

Comments

@oliver-sanders
Copy link
Member

Document how to use Cylc in Jupyter Notebooks using nest_asyncio.

See:

@oliver-sanders
Copy link
Member Author

Good find @kinow cylc/cylc-flow#3015 (comment),

I'm guessing this issue is only going to affect us with Jupyter Notebooks (as we would call the async_request method from Tornado)?

My main concern with nest_asyncio would be:

I can't speak to how robust it is yet, since it seems to have only existed for a few hours

It's now had a whole two PRs merged, no activity in 2019. It's pretty simple so perhaps it's stagnant because it "it ain't broke, don't fix it".

@kinow
Copy link
Member

kinow commented Mar 21, 2019

as we would call the async_request method from Tornado

You nailed it! That definitely works! Doing response = client_1.async_request('ping_suite') returned success without the nest_asyncio.

It's now had a whole two PRs merged, no activity in 2019. It's pretty simple so perhaps it's stagnant because it "it ain't broke, don't fix it".

True, and even better if we don't need it then 🎉

@oliver-sanders
Copy link
Member Author

It would definitely be nice if Cylc worked in a Jypyter notebook though, perhaps we could detect this and use nest_asyncio as a wrapper, unless Jupyter beats us to it...

@kinow
Copy link
Member

kinow commented Mar 21, 2019

It would definitely be nice if Cylc worked in a Jypyter notebook though, perhaps we could detect this and use nest_asyncio as a wrapper, unless Jupyter beats us to it...

But users can choose now, whether they would like to use nest_asyncio, or simply call the async_request too. As long as we add somewhere in our docs a note saying they will need this, I believe we are good now 😁

image

@hjoliver
Copy link
Member

Yes let's be sure to document this. Can we keep this issue open until that is done?

@oliver-sanders oliver-sanders changed the title SuiteRuntimeClient: allow this to work in Jupyter Notebooks document: jupyter notebooks + asyncio Mar 22, 2019
@oliver-sanders
Copy link
Member Author

Sounds like a plan, have renamed issue to match.

@kinow kinow transferred this issue from cylc/cylc-flow May 27, 2019
@oliver-sanders oliver-sanders added the content Addition or modification of documentation label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Addition or modification of documentation
Projects
None yet
Development

No branches or pull requests

3 participants