-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Dynamic map tutorial #470
Dynamic map tutorial #470
Conversation
Sounds good. How can people see the output in the tutorial before it's completed? It's hard to make any use of it when there are no images yet. Can people safely use Github's browser-based editing, to avoid problems with squashing? That's an easy way to fix typos, and avoids having a local copy of the branch to get confused about later. |
Or are the images available via the Travis builds above (if so, can this page include a link to it to make it easy for people to find?) |
Good point. Once a build is triggered, it will be viewable on build.holoviews.org but that might change if a different documentation PR is built. I guess, in the ideal case we could have PR specific parts of the website but that would require a fair bit of effort to configure. Anyway, any such PRs should like to the website and I've given an example by making an edit above.
Yes, for things like typo fixes that is a good idea. For bigger edits, you really need a notebook to work in so I see now way to avoid checking out a branch. Maybe someone should offer an online service to edit the JSON in notebooks without running a live server. A business opportunity perhaps? :-) |
I have an idea that would be easy to implement but I'm not sure how useful it would be. Instead of worrying about build.holoviews.org getting clobbered, we could easy have a zip of the website available to download after the build (static link). So then if someone could grab this zip immediately after the build and make it available (somehow), then at least we could have persistent snapshots of the website as a PR progresses. What do you think? Edit: To be clear, what I'm not sure about is how to make hosting such zip files easy. |
Well that was easy: simple_test.txt.zip I wonder if there is a size limit though.... Edit: I also wonder about persistence - surely GitHub has to clean up these files at some point. |
Ok. I've found some information here. In summary:
This is not enough to hold the tutorial notebook HTML (42.2MB zipped) but would be enough for any single notebook that is being worked on. Would that be useful? |
The zip could be useful, but it requires a few extra steps, so probably most people would just want to click on a link at build.holoviews.org. However, when I click there, I don't see any obvious way to reach the Dynamic Map tutorial; e.g. http://build.holoviews.org/Tutorials/DynamicMap.html doesn't work. Probably it would be more useful to put in a link directly to the appropriate tutorial file. BTW, I think the filename should be Dynamic_Map (with an underscore) to match the other tutorials. And the PR should include editing the Tutorial index to show how to reach this tutorial. |
Sure. I'll make the change now. I've had a think about snapshots and found it hard to find a system I like. Cycling a fixed number of S3 bins hardly helps as any URL would keep changing. Accumulating website builds for PRs isn't great as we have to pay for S3 storage. In general, I don't want to open up a can of worms because anything involving buildbot and S3 requires a fair bit of effort to configure. Here is what I would like:
The most interesting idea I have is to use Google Drive as it is possible to allow anyone to upload files to a google drive (holoviews@gmail.com). You can make a public web form to interface with the drive as you can see in this video. There is a tiny bit of code involved and you can easily deploy a Google App. Here is the API and really only one core function is needed for our purposes: DriveApp.createFile('New HTML File', '<b>Hello, world!</b>', MimeType.HTML); This could let us grab the HTML from the build and easily turn it into a file on google drive which immediately is returned as a URL to the snapshot. Anyway, as I said there is very little code involved (less than 80 lines adapting the example in the video) but I won't work on that now (getting a minimal DynamicMap tutorial is more important). |
Ok, I'm done for tonight. I triggered a website build so here is a WIP preview: |
3f39c3a
to
210fe19
Compare
@jbednar @philippjfr The first draft is complete! It may not be polished but it does cover all the core content... Have a look here - unfortunately, we now encounter the biggest problem with Other than general polish, here are the things I want to do:
@philippjfr It is interesting that a |
I'll continue to make fixes and changes and I'll rebuild the website once I've accumulated enough of them. Till then, keep an eye out to see if I've addressed any comments you have in the following commit messages. |
My first comment (other than, yay!), is that yes, it would be great if the static copy of the notebook would show some limited subset of the dynamic functionality, as for DynamicMap+HoloMap. Otherwise the website is very confusing! |
@jbednar I've had a think about this and it is mostly not possible, unfortunately, The issue is that the boring automaton that is the website building script has no desire to fiddle around sliders like any sensible human would. :-) This means that unless an explicit cache filling operation is used (described in the tutorial) the cache will always be nearly empty. No displayed Sadly, @philippjfr thinks getting this working for the matplotlib backend (maybe the bokeh backend is ok?) is too much effort right now. I guess if the bokeh backend doesn't have this issue (not tried it yet) we could use that instead. My main objection then would be that this tutorial isn't about bokeh and matplotlib is always the safest backend to assume people have available. |
83207f5
to
5f1615e
Compare
In [7]: looks pretty if you use the cursor keys; it makes Moire patterns. |
b8ea066
to
dfa1e1e
Compare
Just completed a new build: http://build.holoviews.org/Tutorials/Dynamic_Map.html Thanks to Philipp, the first frame now always show. There has been a fair bit added but there are a few things that I haven't mentioned yet:
As for functionality, everything is now working the way I want which means I think we are ready for the 1.4.3 release unless some major bugs crop up. |
But you can't index it by just specifying the value of each dimension, generating the result dynamically as if it were a function call?
Can you explain what happens in that case? It looks like all dimensions proceed in parallel? |
I'll have tutorial edits shortly. |
Happy to have it merged; looks great! |
Thanks for the edits! I'll run a website build now to have a look. It would have been nice to see you have a go running a build yourself using the new system! As a quick reminder: Show all checks -> s3-reference-data-cache -> Details -> Update website.
Oops! I obviously got confused myself and yes, if the key exists in the cache it returns that, otherwise it computes a new element.
Open mode is always displayed as a linear sequence that matches the sequence of In other words, the generator can specify a linear path through some high-dimensional space as you move along the sequence. If you cast a multi-dimensional open mode I think that is worth demonstrating and there are a few other bits I would like to mention - a quick example of styling, a quick description of overlays and I'll try to move away from the sine rings for some variety. @philippjfr There should also be at least one note about normalization. If I remember correctly, you only get axiswise normalization and the only way to normalize across |
Reading through the edits now. One general convention we should decide on is how to write 'Elements'. In my opinion, it shouldn't be capitalized unless we really mean the class in which case it should be Here this would mean 'subclasses of the real class |
I've updated the central example to something less boring than the sine rings. This new example demonstrates both styling and overlays. Right now the end of the bounded section has an intermittent bug that we hope to fix shortly. |
I've gone through the Tutorial and it seems great overall. It has a large number of examples for all the different modes which is probably most important, and goes into a good amount of detail. I'd be happy to see this merged immediately but I'll wait for you to add a small blurb about normalization, i.e. having to define dimension ranges. |
I've added a small section about normalization so I think I've covered all the material I intended to. I'll run a website build now and if you are happy with it, please go ahead and merge. In a few minutes, the page will be updated here. |
02f288b
to
88a080f
Compare
The page is now updated. If you think it is ok or any changes are small ones we can do on master, please merge. |
Turns out we need to make some changes to the testing script before new tutorials can get testing data (the script skips testing if it finds no reference data). I've open an issue about this #498 so I think we might as well merge now as we can't tackle that immediately. |
Great work on this! Merging. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
In addition to adding an important new tutorial, I would like to use this PR to achieve a number of things:
Until now, writing a new tutorial has been a daunting task. What has happened is that a tutorial begins life on someone's hard drive where it slowly grows until it suddenly appears for everyone to see in a nearly complete form. Often I've found such tutorials languish till they get forgotten or deleted.
I think we should work in a more incremental fashion using pull requests:
There is one downside of this approach: I don't want to swamp the main repository with small documentation updates/fixes as the tutorial grows. For this reason, I suggest the following:
I hope this approach will make it less of a hurdle to add new notebooks and docs. To start this tutorial, I've added a simple dynamic map example based on the sine rings we introduce in the existing tutorials.
Edit: After a website build is triggered, this PR can be previewed on build.holoviews.org .