Skip to content
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

Question: a build system #13

Open
sglyon opened this issue Oct 7, 2013 · 14 comments
Open

Question: a build system #13

sglyon opened this issue Oct 7, 2013 · 14 comments

Comments

@sglyon
Copy link

sglyon commented Oct 7, 2013

What if we have a sublime-build that would open the ipynb in the browser and reload that browser so we can see updated markdown/code results?

@maximsch2
Copy link
Owner

That's an interesting suggestion. I was thinking that maybe it will be even better to somehow serve ipynb file locally instead of saving it (maybe already rendered as html) and asking the browser to reload it - that way it will be faster (I am using IPython Notebook over the ssh tunnel and it takes considerable time to open some large notebooks) and there will be less chance of accidentally overwriting it. Patches are of course welcome.

@sglyon
Copy link
Author

sglyon commented Oct 11, 2013

So, if I understand your comment, one possible way to do this would be to write out a temporary (local) version of the notebook, use nbconvert to write static html, serve that , and then clean up the temporary ipynb and html when we are done?

@maximsch2
Copy link
Owner

Yes, I think we can even put nbconvert into the plugin's source tree and
call it directly, that way we will not depend on nbconvert being installed.

Maxim Grechkin

On Fri, Oct 11, 2013 at 12:20 PM, Spencer Lyon [email protected]:

So, if I understand your comment, one possible way to do this would be to
write out a temporary local version of the notebook, use nbconvert to write
static html, serve that , and then clean up the temporary ipynb and html
when we are done?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-26164352
.

@sglyon
Copy link
Author

sglyon commented Oct 11, 2013

Good idea.

I'm experienced in python development, but not with sublime, so I might have some routine questions along the way. One of of which is:

Do we need to make sure that IPython (and our local nbconvert) is available to Sublime's internal python?

@maximsch2
Copy link
Owner

Yes. I think we can just put full IPython into external folder and import
it from there (we already have a small portion of it for manipulating
ipython notebooks). Additional problem will be Python 2 vs Python 3: we
should either have two copies of IPython for ST2 and ST3 or just drop ST2
support (probably easier way).

Maxim Grechkin

On Fri, Oct 11, 2013 at 12:29 PM, Spencer Lyon [email protected]:

Good idea.

I'm experienced in python development, but not with sublime, so I might
have some routine questions along the way. One of of which is:

Do we need to make sure that IPython (and our local nbconvert) is
available to Sublime's internal python?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-26165131
.

@sglyon
Copy link
Author

sglyon commented Oct 11, 2013

Sounds good.

I'd say we might as well pull in IPython 1.0+ so that it has nbconvert included. Do you have a preference for anything else?

@maximsch2
Copy link
Owner

No, overall idea sounds fine. We might want to look at something like
LiveReload to do reloading smarter later down the road, but for now that's
not important.

I also think we can just consider ST2 support dropped - so you don't have
to worry about it. I'll try to set up Package Control to point to the
latest version supporting ST2 for legacy users.

For ST3, you will probably need to run 2to3 on ipython source code to
convert it to py3k.

Maxim Grechkin

On Fri, Oct 11, 2013 at 12:52 PM, Spencer Lyon [email protected]:

Sounds good.

I'd say we might as well pull in IPython 1.0+ so that it has nbconvert
included. Do you have a preference for anything else?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-26166992
.

@sglyon
Copy link
Author

sglyon commented Oct 11, 2013

Great, I'm on ST3 and everyone I know that uses sublime is also on it, so I think that should be fine.

I believe that IPython supports python 3.X, you would just need to call ipython3 from the command line instead of ipython.

Do you still see a need to run 2to3 on it?

@maximsch2
Copy link
Owner

I think we used to have to run 2to3 several months ago (look at
external/copy_ipython_subset.sh). Btw, we might want to keep that script
and strip down IPython from stuff that we don't need to reduce package size.

Maxim Grechkin

On Fri, Oct 11, 2013 at 1:02 PM, Spencer Lyon [email protected]:

Great, I'm on ST3 and everyone I know that uses sublime is also on it, so
I think that should be fine.

I believe that IPython supports python 3.X, you would just need to call
ipython3 from the command line instead of ipython.

Do you still see a need to run 2to3 on it?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-26167788
.

@maximsch2
Copy link
Owner

I've just submitted a pull request for package_control_channel, that will
split ST2 and ask Package Control to install plugin from separate branch
for ST2. We are now safe to drop ST2 support in master branch. I'll push
some changes soon to make it apparent.

Maxim Grechkin

On Fri, Oct 11, 2013 at 1:06 PM, Maxim Grechkin [email protected] wrote:

I think we used to have to run 2to3 several months ago (look at
external/copy_ipython_subset.sh). Btw, we might want to keep that script
and strip down IPython from stuff that we don't need to reduce package size.

Maxim Grechkin

On Fri, Oct 11, 2013 at 1:02 PM, Spencer Lyon [email protected]:

Great, I'm on ST3 and everyone I know that uses sublime is also on it, so
I think that should be fine.

I believe that IPython supports python 3.X, you would just need to call
ipython3 from the command line instead of ipython.

Do you still see a need to run 2to3 on it?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-26167788
.

@sglyon
Copy link
Author

sglyon commented Oct 11, 2013

Sounds good. If i have some time, I'll make an attempt to implement for ST3 in the next day or two

@maximsch2
Copy link
Owner

IPython now supports both Python 2 and 3 from single codebase: http://mail.scipy.org/pipermail/ipython-dev/2013-October/012551.html. So there is no need for 2to3 conversion, making this issue a little easier.

@maximsch2
Copy link
Owner

Btw, new version of ST3 allows picture preview in separate tabs, this sounds like steps away from allowing pictures to be inserted into the document, and then we can replicate the whole IPython Notebook system

@sglyon
Copy link
Author

sglyon commented Dec 20, 2013

That would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants