-
Notifications
You must be signed in to change notification settings - Fork 15
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
Expose files in /data to the internet #116
Comments
Once we've done this, I think we should swap tutorial content of the form
for
Which will allow users to run the notebook code just as is done in the tutorial. I don't know if this will have an impact on CI testing the tutorial content, but I think it should be OK to rely on a file existing on the internet for compiling the tutorials. |
I'm not particularly keen on this idea of making tskit.load accept URLS - it's a lot of work for very marginal benefit. |
Seems perfectly reasonable to copy the data files to the webserver, though, so they can be downloaded. |
Easy enough to do this for the time being, anyway:
I'm not sure if that feels like cluttering up the top of the tutorials with an extra complicated import, but making the tutorial material easily runnable by e.g. a student seems like a big win to me. |
You could just put in a note some where saying "if you want to follow along, using this pattern". I don't think we should put all that urllib stuff in to every call, that'll really confuse people (they'll think you have to do this). |
True. But I'd really like it for people to be able to execute the notebook (or the code in it) themselves, without having a lot of sorting out to do to get it to work. I guess we could say "download the data directory to the place from where you are running the jupyter notebook", but even that's a bit technical for the average student. Just specifying a URL instead would be so much easier, which is why I'm so keen on wrapping the But perhaps you have other suggestions for how to make it easy for students to run the tutorial material themselves, now that we've taken away the binder possibility? I do think we want the code to run as-is rather than requiring the user to modify it, though. I think one of the main points of a tutorial is that someone can follow it along on their own machine, rather than just reading what we've written, so do need to make it easy to do this. |
IMO---after investing a fair bit of time into this for the msprime docs---we can either have something that links densely up with other tutorials and documentation and has a nice narrative structure, with unimportant details hidden OR have something that can be easily run in isolation as a notebook. They're just not compatible. Let's do one thing well. |
Fair enough - but I do think the tutorials are a different use-case to the docs. The tutorials are meant to be executed and experimented with by the user, surely? Otherwise they are just additional documentation, not true tutorials? So for the tutorials I suggest that we should provide a separate (derived?) notebook that "just works", and which can be downloaded and run in isolation by a user - I guess it only needs the code cells, and would simply swap any |
This sounds like an awful lot of work to me - I'm happy that people can copy the code cells into their own notebook, if they like (there's a nice copy button). I agree it would be nice if people could run the code themselves, but the technology doesn't really work right now, so (a) it's more important that the version you read works well (I'm assuming more people will read these than try to execute them); and (b) we don't try to maintain two separate versions. |
Yeah, I'd be happy with just copying too, but it would help an awful lot if we could use the URL form for loading a tree sequence in this case (or, as you say, at the top of every tutorial, repeat the mantra that they will need to do |
OK, here's another workaround. In the intro page we can say that to follow along with the tutorials in your own nodebook, you can download from GitHub the files in
For the moment, I'm strongly minded to add this code snippet to the We don't actually need them to type all that code in anyway. We can simply us the IPython
|
My thoughts on this: A large fraction of users coming to the tskit tutorials will already have a For those that need an example file, mentioning the EDIT: Just seen #120 which does this - will check that out! |
Thanks for the comments @benjeffery. I still think it may be worth sorting the web site so that these data files can be downloaded from |
It's pretty simple I think - just adding a copy to the end of the build. |
Closed in #122 |
In conjunction with tskit-dev/tskit#1566, it would be useful for the tree sequence files stored in
/data
to be available athttps://tskit.dev/tutorials/data/my_file.trees
. We could use the GitHub raw version as a URL instead (e.g.https://github.com/tskit-dev/tutorials/blob/main/data/basics.trees?raw=true
), but I think a strange GitHub url might be confusing to a new user.The text was updated successfully, but these errors were encountered: