nansencenter / DAPPER

Data Assimilation with Python: a Package for Experimental Research
https://nansencenter.github.io/DAPPER
MIT License
342 stars 119 forks source link

Examples running in Colab #26

Closed patnr closed 3 years ago

patnr commented 3 years ago

Make Colab work for examples.

To install DAPPER, this should suffice:

# !pip install git+https://github.com/nansencenter/DAPPER.git

But DAPPER requires that Colab upgrades to python 3.7 (see setup.py for why), and I don't know when that will happen. Possible workarounds:

The .ipynb examples should be synced with the .py versions via jupytext, using a minimally-intrusive syntax.

Edit: maybe just use binder?

patnr commented 3 years ago

Update: Colab now runs python 3.7! So this can be implemented!

https://twitter.com/GoogleColab/status/1365062244225060865

patnr commented 3 years ago

I have now partially implemented this (see the badge in the README).

As in local Jupyter, liveplotting does not really work. But on Colab the replays don't work either. However, the static plots do work, but only if we have not done %matplotlib inline. We could implement the Colab adaptations in a separate branch, but I think it is cleaner to just make a note at the top of the notebook of the changes the user must make before running the notebook.