dwhswenson / contact_map

Contact map analysis for biomolecules; based on MDTraj
GNU Lesser General Public License v2.1
42 stars 18 forks source link

Add binder links #93

Closed sroet closed 4 years ago

sroet commented 4 years ago

after pr #92 This PR adds the repective binder links to the

(@dwhswenson any place missing? for example I can add a link to each ipynb that would start binder for themself)

dwhswenson commented 4 years ago

I think README and examples should be enough. BTW, part of my upcoming examples refresh involves adding numbers to the notebooks. That will:

  1. Order them correctly in the docs (although we could do that manually)

  2. Order them correctly in the Binder listing.

sroet commented 4 years ago

I think README and examples should be enough.

Perfect, then this one is ready for a review

BTW, part of my upcoming examples refresh involves adding numbers to the notebooks. That will:

1. Order them correctly in the docs (although we could do that manually)

2. Order them correctly in the Binder listing.

Sounds great :smile:

sroet commented 4 years ago

@dwhswenson (just FYI for the possibilities of binder; the strangest binder setup I have done allows you to run Coupled-Cluster calculations in your browser Binder)

sroet commented 4 years ago

Consider that optional; if it is a pain to do, don't worry, but if it's easy, it would be nice. I don't mind having a Binder link for each page on RTD; I just didn't want to put Binder links in each ipynb, since it doesn't make sense if you've already loaded it locally.

So I got it working, but this only works for releases if the docs are build from a release install of contact_map (because it checks if the installed version of cantact map contains "dev")

[EDIT] A bit of explanation of the version setting in the notebooks. 1) If dev is part of the contact_map version we set the links to master (We assume that you want to build for latest in that case) 2) else we set the version as v+version (I assumed our tags will always have that name)

sroet commented 4 years ago

~one thing that I could not figure out: The link properly in docs/examples/index.rst can not be set depending on the version as that one does not seem to pass through jinja2 before converting to html~

nvm, fixed it

sroet commented 4 years ago

Alright, I also added jinja2 rendering for all the .rst, so you can do some logic in them as well. (All the jinja2 code in the .rst has access to all variables in the html_context dictionary.)

sroet commented 4 years ago

Thanks! Corrected that one