Is there any way to sync notebooks in Datalore with a Git repository other than manually downloading every single file? Anything like rsync, scp, Git or even a properitary protocol with clients for different platforms would be helpful.
At first glance I thought that ssh login is supported, but the option in the settings allows only to set a private key for outbound connections, not a public key for inbound connections.
A workaround using IPython magic to push or pull files from Datalore elswhere should be possible, right?
Thanks for the instructions! I was curios mostly about how to download all Datalore notebooks to my computer. I’d like to store a local copy of all notebooks, just in case something goes wrong right before the presentation or so. So I guess I’d need to push the notebooks somewhere.
I think this not so easy as I thought it would be. Notebooks live in separated environments, right? So I can’t use one notebook to push all notebooks to another server. I can’t even access the notebook itself via IPython magic.
A bit off-topic: There is also no way to share downloaded files between notebooks, because they are always attached to a single notebook, right?
We’ve stumbled upon a surprising issue related to this question. Downloaded files are removed automatically sometimes when using the Datalore kernel. I guess this intended, to make the execution reproducible. But it is still very surprising and not usable in practice if files are too large. We need to download more than 1GB, so re-downloading this every time we have to change something in a cell above or restart the kernel is not really an option.
What makes it also more difficult to use might be second issue: the file browser does not show the same thing as os.path.exists(fname). I restart the kernel, clear all outputs, then execute the first two cells and refresh the file browser, but the file is still displayed:
I’m sorry, I misread your comment. Yes, this is also the expected behavior – if the file was created during the previous run, it won’t be automatically removed when the computation is stopped and re-started, and it won’t be removed even if the corresponding cell is deleted in the new run. It is definitely not very intuitive. Will add this point to the ticket.
Unfortunately, I didn’t manage to reproduce this behaviour. It is only possible to get such state within a single run – create file with the third cell, and check it from the code in the second cell – in such case os.path.exist will return “False” although the file is actually attached to the notebook.