How to "publish" a sage worksheet permanently?

89 views
Skip to first unread message

Stan Schymanski

unread,
Aug 26, 2016, 4:55:17 AM8/26/16
to sage-support
Dear all,

I have been using sagemath for research for many years now, and I am extremely happy with it. For my latest papers, I would like to make the sage code available to the public, so that people can follow through what I did and re-use the code for their own data. The journal's guidelines also ask to make any relevant data and code available. Of course, I could just upload it to some generic data server, but it would be so great to also make it available on a sage server, which would render the worksheets correctly and where people could start working with it straight away. I believe that this would make a lot more scientists aware of the benefits of sagemath.

There used to be several open sagemath servers around, but the ones I used previously have disappeared, probably at the same time as sagemath cloud (SMC) made its appearance. I gather that SMC is commercial, meant to generate funds for the further development of sagemath. I hope it takes off. However, this also means that SMC is likely not the right place to permanently publish worksheets, as they would be taken down once I stop paying the fees for some reason. Can anyone suggest a suitable place for that? The minimum requirement is that the worksheet can be viewed and downloaded. Being able to execute and modify cells would be a bonus, and long-term availability (permalink?) would be another bonus. I haven't seen any "public" worksheets on SMC, in the way the old sage servers worked. Would there be scope to create such a space in SMC, so to say as an advertisement?

Henri Girard

unread,
Aug 26, 2016, 4:59:34 AM8/26/16
to sage-s...@googlegroups.com

Why don't you create a github it will show it with nbviewer automatically ?

Here is mine (not specially interesting) but apparently all your work could be view :)

https://github.com/aishenri

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Dima Pasechnik

unread,
Aug 26, 2016, 5:26:21 AM8/26/16
to sage-support


On Friday, August 26, 2016 at 9:55:17 AM UTC+1, Stan Schymanski wrote:
Dear all,

I have been using sagemath for research for many years now, and I am extremely happy with it. For my latest papers, I would like to make the sage code available to the public, so that people can follow through what I did and re-use the code for their own data. The journal's guidelines also ask to make any relevant data and code available. Of course, I could just upload it to some generic data server, but it would be so great to also make it available on a sage server, which would render the worksheets correctly and where people could start working with it straight away. I believe that this would make a lot more scientists aware of the benefits of sagemath.

There used to be several open sagemath servers around, but the ones I used previously have disappeared, probably at the same time as sagemath cloud (SMC) made its appearance. I gather that SMC is commercial, meant to generate funds for the further development of sagemath. I hope it takes off. However, this also means that SMC is likely not the right place to permanently publish worksheets, as they would be taken down once I stop paying the fees for some reason.

SMC has free accounts, too. I think you can publish your worksheets just fine with a free SMC acount; 
however, they cannot be sagenb worksheets, as SMC does not support them (it does support its own notebook format, as well as jupyter Python/Sage notebooks)

Stan Schymanski

unread,
Aug 26, 2016, 5:28:40 AM8/26/16
to sage-support
Wow, I didn't realise ipynb worksheets get rendered on github! How did you do this? I looked at this one: https://github.com/aishenri/julexample/blob/master/phaseportraitplots-test.ipynb, downloaded and uploaded to SMC, but couldn't open it there. Not sure what I did wrong. If one could make the worksheets be displayed nicely in github and then add instructions for how to get them somewhere to be able to edit, such as SMC, that would already take us a long way. If this also works for sws worksheets, this would satisfy 2 of my requirements, permanent, and rendered. Do you know if it would work with sws? Can you explain a bit more?

Henri Girard

unread,
Aug 26, 2016, 5:47:27 AM8/26/16
to sage-s...@googlegroups.com

Well you know I am not an expert. But I am in France and SMC in europa is often slow and even one can't use it !

As I used ijulia, they told me I should create a github (in fact I had it created long ago, but wasn't able to use it... But things fortunatly improved and I saw, that nbviewer was automatically working : Great !)

So for ipynb there shouldn't be any problem. For sws I guess it's different, I haven't try it anywere as it seems to need a server. I use it in local. That's why I convert all my sws in ipynb.

That's the mails which help me created github and using it

http://julia-programming-language.2336112.n4.nabble.com/I-have-done-few-examples-where-can-I-put-them-at-disposition-td43483.html
Hope this help ?
Henri

Henri Girard

unread,
Aug 26, 2016, 5:52:57 AM8/26/16
to sage-s...@googlegroups.com

Here is a link from an excellent lecture :

https://github.com/jrjohansson/scientific-python-lectures

Stan Schymanski

unread,
Aug 26, 2016, 7:04:24 AM8/26/16
to sage-support
Ah, I found the "Share..." button on SMC, which then allows to publish. Here is an example: https://cloud.sagemath.com/projects/34b4b62a-2621-47c8-9bda-cde3a855f995/files/v-notch.sagews
It appears that .sws (i.e. sagenb worksheets) get automatically converted to .sagews, which seems to work in SMC. I guess that in the long term, I will have to get away from sagenb and start using jupyter? What a shame, as sagenb works just great.
Then, maybe a combination of github and SMC will be the best approach.

Stan Schymanski

unread,
Aug 26, 2016, 7:05:59 AM8/26/16
to sage-support
Awesome, thanks! How did you convert sws to ipynb?? By hand?
Cheers
Stan

HG

unread,
Aug 26, 2016, 7:19:58 AM8/26/16
to sage-support
Yes... But I have read somewhere there is a convert tool ? As I need to practice I did it by hand.
I know that smc  can convert them in smc file and maybe you can download it in ipynb because SMC is well develop in this domain.
Cheers
Henri

Dima Pasechnik

unread,
Aug 26, 2016, 7:25:55 AM8/26/16
to sage-support


On Friday, August 26, 2016 at 12:19:58 PM UTC+1, HG wrote:
Yes... But I have read somewhere there is a convert tool ? As I need to practice I did it by hand.
I know that smc  can convert them in smc file and maybe you can download it in ipynb because SMC is well develop in this domain.

on a standalone sage installation one can run 

   sage --notebook=export

and links therein for details.

Stan Schymanski

unread,
Aug 26, 2016, 8:35:04 AM8/26/16
to sage-support
Thanks, I saw this, but it didn't work in my installed sage 7.2. Currently upgrading to 7.3. I couldn't find out which version of sage #19877 was merged into.

Henri Girard

unread,
Aug 26, 2016, 9:45:30 AM8/26/16
to sage-s...@googlegroups.com
I forgot to tell you that you have two (at least I know) nbviewer like
in local : inotebook (deb ubuntu/debian) and nbviewer installed for
local use. You said you wished people can read or use your porjects,
that's what I with git when I find something interesting I get it in
local and then I can work on it with jupyter. Then after working on it
on local one can published it again.
Regards
Henri
Message has been deleted
Message has been deleted

Stan Schymanski

unread,
Aug 26, 2016, 11:01:39 AM8/26/16
to sage-support
I have upgraded to sage 7.3 and now "sage --notebook=export --list" does something but fails with "No such file or directory". Do I need to provide the path to my sagenb notebook somehow? If I just do "./sage -notebook", it finds and opens my sagenb notebook, so I don't understand what is going on. Thanks again for your help!
Reply all
Reply to author
Forward
0 new messages