-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add support for image generation via Kaleido #207
Comments
cc @jonmmease. Kaleido looks neat! Thanks for having ping-ed me. I'll look into trying to use it from plotly-scala. I guess the main hurdle should revolve around fetching the Kaleido binary from plotly-scala (as it's not too common to embed large binaries in Java libraries, we'll probably have to fetch it and cache it manually ourselves.). Don't know if I'll have the time to fully push it through. |
Hi @alexarchambault, thanks for taking a look! Whenever you're interested in thinking about this some more, let me know what if there would be a more helpful way to host the binaries. Right now I'm just including them as GitHub release artifacts. Also, just for reference, on the Python side we're not including the kaleido binaries in the main |
That approach could work for us too. We could re-package the native binaries in distinct dependencies, push those to Maven Central, and require users to add an extra dependency, like
GitHub release artifacts are fine, we can download the binaries from there during build time. Re-packaging them ourselves in JARs pushed to Maven Central would then allow users behind proxies / firewalls to download those JARs through whatever Maven Central mirror they have access to. |
Sounds great! Also, I'm chatting with @kMutagene over in plotly/Kaleido#2 and https://gist.github.com/kMutagene/77aca4941e89f96bdbf5700f45ff27b3 about potentially including an F# wrapper for Kaleido in the main Kaleido repository, and integrating into the CI process there. I'm not sure if we'll end up going this way, but wanted to mention that here in case it sounds like this approach would be easier on your end. |
Hi @alexarchambault |
fyi - I spent the weekend to work on a scala Kaleido wrapper - first working version can be found here -> https://github.com/johanneshiry/kaleido-scala currently only supports pre-downloaded binaries and has a hard coded link to the binary. I will work on the following within next weeks:
@jonmmease for the support of kaleido binary > 0.0.3 I have a question: whenever I execute another binary with version > 0.0.3 on macOS Big Sur (manually and via scala code) I end up in a dead loop with the following ouput:
Do you have any idea why this happens? Is this a known issue and I just oversaw something? If not, I will hand an issue in the kaleido repo. |
@johanneshiry Nice! Feel free to mention your project in the README of plotly-scala, or even add a whole section about it there, whenever you think it's ready. |
Okay I'll let you know. Considering the deployment to maven. Any chance to get access to the namespace |
Hi @johanneshiry, very cool! I think the error you're getting is related to chromium sandboxing. In 0.0.3, we hardcoded a few chromium flags in the bash script that launches kaleido (including
These can be passed directly as flags to the kaleido executable. Hope that helps! |
Perfect thank you :-) |
@alexarchambault the first release is almost ready for scala 2.12 and scala 2.13 - before I'm going to deploy this on another namespace, is there any chance that I can get access to deploy tot he org.plotly-scala namespace in order to have all libraries at the same place? I think this would be a more convenient way for people to find the library. Otherwise I would publish it somewhere else ... |
@alexarchambault would you mind providing an update on my last question? We started working on this internally and kind of rely on the kaleido features. Before we're going to deploy it somewhere else it would be nice to hear you thoughts/feedback on the possibility to deploy it under the same namespace!? |
@johanneshiry Sorry. Do you have a Sonatype user name already? I can open a ticket, asking for you to get the right to publish under |
No worries :-) This would be amazing - my Sonatype user name is |
Ok, the issue's there: https://issues.sonatype.org/browse/OSSRH-69717. |
@johanneshiry https://issues.sonatype.org/browse/OSSRH-69717 was just fixed, it should be good :) |
Amazing, thank you - I just finished the github actions setup for a first snapshot several minutes ago. Will give it a try :) |
Works like a charm. If you don't mind I'll prepare a few lines for the plotly-scala readme with a link to the kaleido-scala repo and hand in a PR which may close this issue then if it is merged. |
The plotly authors recently released a new tool called Kaleido, allowing to generate static images locally, without a browser. It relies on a native process running in the background. We can exchange JSON messages with that process to generate images.
The text was updated successfully, but these errors were encountered: