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

Add ImJoy demo plugin and badge #20

Merged
merged 13 commits into from
Aug 14, 2020
Merged

Add ImJoy demo plugin and badge #20

merged 13 commits into from
Aug 14, 2020

Conversation

oeway
Copy link
Contributor

@oeway oeway commented Aug 14, 2020

This PR add a imjoy demo plugin which can be installed by click the "launch ImJoy" badge.
It also change the imjoy plugin name to from viv-plugin to vizarr, add other meta information which will show up in the plugin installation dialog in ImJoy.

Try with this button: launch ImJoy

The demo plugin is taken from the getting started notebook, it would be cool if we can later build an ImJoy plugin for running the image registration workflow.

@@ -37,7 +38,11 @@ function App() {
useEffect(() => {
async function initImjoy() {
const { setupRPC } = await import('imjoy-rpc');
const api = await setupRPC({ name: 'viv-plugin' });
const api = await setupRPC({
name: 'vizarr',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am changing the name to vizarr here to be consistent with the web app name.

Copy link
Member

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, thanks for adding this! Just some clarification questions and then I'll get things merged.

example/VizarrDemo.imjoy.html Outdated Show resolved Hide resolved
const api = await setupRPC({
name: 'vizarr',
description: 'A minimal, purely client-side program for viewing Zarr-based images with Viv & ImJoy',
version: vizarrVersion,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a side note, how do you version kaibu? When hosting the app on gh-pages, I'm not sure of the best way to ensure older versions are available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use netlify for that, it can build different sites for releases and PRs (example) as I mentioned in another PR. The setup is very easy, you basically connect the repo and fill in the a build command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, could you test and see if you get the version work. For some reason, npm run dev didn't work for me.

Copy link
Member

@manzt manzt Aug 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, npm run dev didn't work for me.

What isn't working exactly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I change the create window src to http://127.0.0.1:3000, it doesn’t work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works now, just tried it. please ignore this, sorry.

@oeway oeway requested a review from manzt August 14, 2020 14:38
@oeway
Copy link
Contributor Author

oeway commented Aug 14, 2020

Please take a look @manzt

@manzt
Copy link
Member

manzt commented Aug 14, 2020

Looks good, but could you also update the plugin name in example/imjoy_plugin.py? I just checked out your branch and it's still viv-plugin.

@@ -53,4 +53,4 @@ async def run(self, ctx):


def run_vizarr(images, view_state=None):
api.export(Plugin(images, view_state))
api.export(Plugin(images, view_state))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't leave a comment, but the type needs to be updated above on line 47

@oeway
Copy link
Contributor Author

oeway commented Aug 14, 2020

Done!

@manzt
Copy link
Member

manzt commented Aug 14, 2020

Thanks!

@manzt manzt merged commit 83f01d8 into hms-dbmi:master Aug 14, 2020
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

Successfully merging this pull request may close these issues.

2 participants