-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Clojupyter support #33
Comments
I'm not able to get the code above to work actually; I keep getting a |
Hmmm frustratingly I'm also having trouble once I've restarted everything today. I'm not clear on why this was working yesterday and not now, but presumably, there is some hidden state in jupyter that I'd loaded earlier in the session that enables this. (I had restarted the clojure kernel yesterday many times and it was still working, so it must be deeper. I was trying out some vega libs in other language kernels too earlier so perhaps something got loaded along the way). I'll try and figure out what that was at some point over the coming days and let you know. I'll leave you with a tantalizing screen-shot I took yesterday to hopefully prove I'm not completely mad... |
OK; Thanks for letting me know. I look forward to getting this working :-) Thanks for your help! |
@mikeyford Any luck figuring out how you got this to work? |
Here the same issue is persued, but then for the iclojure kernel instead of clojupyter. |
@keesterbrugge Awesome! I'm adding another namespace at |
Hi, Will try out your function as soon as I'm able to add Is that the same issue you experienced? |
Sorry, no clue. Perhaps it's a good idea to use a reproducible test environment like a docker image. |
@metasoarous does it work in a python notebook? What happens here is that when you use May it be a case of (lack of) priority between renderers? You are obviously being shown the |
@metasoarous |
@keesterbrugge Amazing! Thanks so much for sorting that out. I've merged and will push out another snapshot release soon (and hope to have a non-snapshot release on Tues). In the mean time, could you help me by telling me how to require |
The Thanks in advance. |
I can confirm that the Requiring
I'm using the snapshot of this morning. |
I've made a pull request to show how to require |
@keesterbrugge Thanks so much! The clojupyter message is awfully perplexing though. Can't imagine why markdown-to-hiccup would be posing an issue there. |
Saw something about this here: https://stackoverflow.com/questions/7233334/exceptionininitializererror-when-using-leiningen Is it possible you have a corrupt build target in your clojupyter project? Would you please try running I have to head out for a bit today, but will try to check back in later. Thanks again! |
I suspect there's a problem related to competing dependency versions. I got the following error:
I'm using lein jupyter, which depends on Clojupyter 0.1.0. There's also the potential for a conflict with the default Leiningen template, which uses Clojure 1.8.0; note that spec wasn't introduced until 1.9. However, even the latest Clojupyter depends on Clojure 1.8.0, so perhaps the problem lies elsewhere. |
@metasoarous I tried your suggestion, I did |
Thank you both @jtcbrule & @keesterbrugge. Based on @jtcbrule's comment I tried manually adding The important bits are here:
This makes it look to me like markdown-to-hiccup's usage of spec will not work without having a more recent Clojure which comes with In the mean time, I think I may have an interim solution. Fundamentally the problem is that the I'll try this out and report back. Thanks again for everyone's work helping bag this feature! |
@metasoarous I can successfully require but when I try to plot the spec it doesn't show, and I get the following error in the console I also tried version 1.5.1. I also tried the clojupyter example notebook where I had the same problem Do I need to update something? Hope this is helpful. |
Thanks for reporting @keesterbrugge. It looks like you're using Chromium, which I had noticed some bugs with regarding loading of Clojure syntax highlighting code, and also has trouble loading the data at https://vega.github.io/vega-lite/data/cars.json. However, I tried the code you pasted (with data generated as in the README), and it worked just fine. I think the specific issue you're experiencing could be related to the version of Clojupyter or Jupyter you're running. To isolate, would you please try running using the official docker container, as described in the README? This was how I got it running. If you continue to have a problem with this, would you please open a separate issue? Thanks again! |
You're right, with the docker image it does work |
@mikeyford has worked up some code for plotting from a Jupyter notebook using Clojupyter!
I'd love to see this go into an
oz.clojupyter
namespace with functionsview!
andv!
which more or less imitate the API of theoz.core
namespace as much as possible (also, take note of #32).Ideally, we'd do this so as to make clojupyter an optional dependency, wrapping all requires in a
(try ... (catch ...))
, but I'm actually having some trouble figuring out how to do this. So for now, let's just assume clojupyter will be a dependency and see if we can't relax this assumption down the road.The text was updated successfully, but these errors were encountered: