Comments (14)
Hi @mstimberg, I had a look and one quick fix might be to do a substitution of the tutorial notebooks for the offending quotation mark(s); something like:
re.sub(u"(\u2018|\u2019)", "'", content)
However, it might be better to hunt down the quotation marks in the brian2/tutorials folder where the notebooks for this are cloned from.
from brian2-binder.
I'm not sure if I permissions to work on this repo so I cloned it back into my space and started work on updating and overhauling it for Binder v2: https://github.com/bdevans/brian2-binder
This can be launched with: https://mybinder.org/v2/gh/bdevans/brian2-binder/v2
It currently fails when trying to move the notebooks into place however. I think we need to reconsider generate_notebooks.py as I'm not sure what the build context is when no longer using a Dockerfile.
from brian2-binder.
https://github.com/bdevans/brian2-binder/blob/1d6ed663f4b20926a4b8e223d0eb1e652540a68d/postBuild#L17
I'm not sure if I permissions to work on this repo so I cloned it back into my space and started work on updating and overhauling it for Binder v2: https://github.com/bdevans/brian2-binder
You have write permissions on brian-team/brian2-binder
, but doing it in your repo and then opening a pull request is possibly the cleanest way to do changes.
It currently fails when trying to move the notebooks into place however. I think we need to reconsider generate_notebooks.py as I'm not sure what the build context is when no longer using a Dockerfile.
From the error message it seems that it only needs a mkdir notebooks
before moving stuff. Removing #RUN
from line https://github.com/bdevans/brian2-binder/blob/1d6ed663f4b20926a4b8e223d0eb1e652540a68d/postBuild#L17 might be enough?
from brian2-binder.
Just a quick note because I'm busy all day. I had to do some work on another repo to get it working on Binder v2 because a few things have changed. Taking a look at that might help (although what I did is probably not fully correct/optimal). https://github.com/neural-reckoning/vcn_regularity/blob/master/Dockerfile
from brian2-binder.
I believe I have fixed it, although have had to restructure the directory so I think you will need to remove the "notebooks" segment of the binder links in the tutorials and examples in the Brian2 documentation. On another note, this will be Python 3 only at this point (but it should be possible to include a Python 2 kernel if you really really want to...).
from brian2-binder.
Oh, great, many thanks! I'll have a look at it tomorrow.
On another note, this will be Python 3 only at this point (but it should be possible to include a Python 2 kernel if you really really want to...).
Python 3-only is perfectly fine for this (but it reminds me that we are not always testing whether new examples work with Python 3...).
from brian2-binder.
Ok the tests pass (although the kernel restarts with the cpp_standalone tests, probably due to exceeding the 4GB RAM limit) and I'm ready to submit a pull request to merge back into the brian-team repo. The only complication is that brian-team/brian2-binder was originally forked from bdevans/brian-binder (note no "2"). I then forked brian-team/brian2-binder into a new bdevans/brian2-binder and am not sure how to do the PR now because brian-team/brian2-binder is looking at the old bdevans/brian-binder repo. Do you know how to resolve this?
from brian2-binder.
It seems you did not fork brian-team/brian2-binder on github, right (i.e. you rather cloned it and pushed it into a new github repository)? I think that's why you cannot do a PR, the fact that brian-team/brian2-binder is a fork of bdevans/brian2-binder should not matter.
I think to make everything work, you'd have to delete/rename your bdevans/brian2-binder directory, create a fork of brian-team/brian2-binder on github and then push your changes into that repository (if it has the same name, you might not even have to update the "remote", but not sure).
from brian2-binder.
I think that's why you cannot do a PR, the fact that brian-team/brian2-binder is a fork of bdevans/brian2-binder should not matter.
Sorry, I mean of bdevans/brian-binder, of course...
from brian2-binder.
It seems you did not fork brian-team/brian2-binder on github, right (i.e. you rather cloned it and pushed it into a new github repository)?
Yes that's right - sorry, I'm still learning the ins and outs of GitHub :/
Now I can't fork the main repository because "You already have a fork of this repository: bdevans/brian-binder". It would also be best not to just delete the new repository because the commits could form a useful trail of breadcrumbs e.g. in case binder reverts to using a Dockerfile. If that's the only way to do it, then so be it but I'll continue to look for another way to solve the problem first...
from brian2-binder.
Ah, I see. I think the easiest would be to actually use your bdevans/brian-binder
repository for the PR. If you push all your changes to this repository, then you can delete bdevans/brian2-binder
later (just to avoid confusion in the future, but you can also just keep it). All the commits will be included in the other repositories, so we won't actually lose anything.
Here's what I think you need to do:
Add the old brian-binder
repository as a remote to your local brian2-binder
working copy, i.e., move to your brian2-binder
directory and do:
git remote add brian-binder [email protected]:bdevans/brian-binder.git
if you use SSH authentification, or
git remote add brian-binder https://github.com/bdevans/brian-binder.git
if you use HTTPS.
You can then push directly from your brian2-binder
repository to brian-binder
. However, it would be nicer if your changes were in a branch, I guess. I.e. first do this to create a branch mybinder2
:
git checkout -b mybinder2
And then push this branch to the brian-binder
repository:
git push brian-binder mybinder2
This should work, because all changes in your local brian2-binder
repo are based on brian-team/brian2-binder
which itself is based on brian-team/brian-binder
. If we never "rewrote history", then there's a continuous line of commits and your changes should go cleanly on top of that.
Finally, you can then create a pull request from bdevans/brian-binder
to brian-team/brian2-binder
-- note that you might have to manually change the direction (normally you merge from the fork into the parent, not the other way round), i.e. brian-team/brian2-binder
should be the "base fork" and bdevans/brian-binder
should be the "head fork".
from brian2-binder.
Ok thanks Marcel - done!
Should I now delete brian2-binder and brian-binder from my GitHub account? Or should I just delete brian2-binder then perhaps rename brian-binder --> brian2-binder for consistency (or will this cause more problems)?
Also regarding the documentation, I've changed the binder badge so that it automatically opens index.ipynb (which links to all the other notebooks) rather than loading the notebook browser, so the badge in the documentation should also be updated (see the link in README badge).
from brian2-binder.
That last message from Marcel was distinctly like reading the rulebook of some strange cult.
from brian2-binder.
That last message from Marcel was distinctly like reading the rulebook of some strange cult.
There must be an interface somewhere that uses latin for git commands -- would definitely work towards making everything feel more arcane.
Should I now delete brian2-binder and brian-binder from my GitHub account? Or should I just delete brian2-binder then perhaps rename brian-binder --> brian2-binder for consistency (or will this cause more problems)?
I think deleting them might indeed make things easier for you in the future: whenever you want to make new changes, you could fork brian-team/brian2-binder
or create a new branch directly in brian-team/brian2-binder
. But it's up to you! Not sure whether renaming the brian-binder
repository will cause any issues, I guess github will handle this just fine and update the information that brian-team/brian2-binder
is a fork accordingly. Just make sure to not delete brian-team/brian2-binder
:) (I'm joking, but I already had a collaborator delete the team repository instead of his personal fork -- github makes you type out the full name, but still...)
Also regarding the documentation, I've changed the binder badge so that it automatically opens index.ipynb (which links to all the other notebooks) rather than loading the notebook browser, so the badge in the documentation should also be updated (see the link in README badge).
Ok, I'll look into this next week.
Thanks again for having fixed this issue.
(Marking this issue as fixed via #2).
from brian2-binder.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brian2-binder.