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

Examples gallery for napari-threedee #104

Merged
merged 23 commits into from
Apr 6, 2023

Conversation

GenevieveBuckley
Copy link
Contributor

@GenevieveBuckley GenevieveBuckley commented Mar 24, 2023

Closes #99

image

mkdocs.yml Outdated Show resolved Hide resolved
@GenevieveBuckley
Copy link
Contributor Author

Here's what it looks like currently:
Screen Shot 2023-03-24 at 5 04 06 pm

@kevinyamauchi
Copy link
Collaborator

kevinyamauchi commented Mar 28, 2023

Here's what it looks like currently:

Awesome! This looks great!

I see that there are multiple "gallery subpages" in the nav. Would it be possible to make a separate subpage for the "library" examples and the "plugin examples"? You may have already inferred, but former shows how to import the actual widget and the latter shows how to use the plugin interface.

I think it isn't necessary for the initial PR, but at some point, it might be nice to see if it's possible to make the screenshot have some of the manipulators, annotators, etc. in view.

Super cool stuff, @GenevieveBuckley !

@kevinyamauchi
Copy link
Collaborator

I just saw #103. I can work on that today.

setup.cfg Outdated Show resolved Hide resolved
@GenevieveBuckley
Copy link
Contributor Author

Here's the latest gallery screenshot:

image

@GenevieveBuckley
Copy link
Contributor Author

@kevinyamauchi

I see that there are multiple "gallery subpages" in the nav. Would it be possible to make a separate subpage for the "library" examples and the "plugin examples"? You may have already inferred, but former shows how to import the actual widget and the latter shows how to use the plugin interface.

Yes, this is already done (sorry, I just named things poorly in the last screenshot, so it looked like duplicated gallery subpages, instead of being named for the plugin and library examples)

I think it isn't necessary for the initial PR, but at some point, it might be nice to see if it's possible to make the screenshot have some of the manipulators, annotators, etc. in view.

Yes, good idea for the future.

@GenevieveBuckley
Copy link
Contributor Author

Here's the latest screenshot:

image

@GenevieveBuckley GenevieveBuckley marked this pull request as ready for review March 30, 2023 02:00
@codecov-commenter
Copy link

codecov-commenter commented Mar 30, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3c83e96) 71.73% compared to head (2946830) 71.73%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #104   +/-   ##
=======================================
  Coverage   71.73%   71.73%           
=======================================
  Files          67       67           
  Lines        2827     2827           
=======================================
  Hits         2028     2028           
  Misses        799      799           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@GenevieveBuckley
Copy link
Contributor Author

One slightly weird thing to be aware of: I had to turn the screenshot flash animation OFF in napari_image_scraper, because otherwise it would turn some of the image scheenshots grey somehow.

I also don't understand your example script organisation. At first it looks like the examples are just duplicated across the "plugin" and "library" folders, but actually not all scripts are the same, and sometimes even the ones that are named the same have slightly different code and/or comments.

@GenevieveBuckley
Copy link
Contributor Author

Ok, I don't know how to initialize Qt properly on the CI.

WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found.
WARNING: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

I though adding Talley's github action might fix it, but no. How does the main napari repo do this?

@GenevieveBuckley
Copy link
Contributor Author

Hooray! Andy and Draga helped me figure out the github actions workflow.

We needed:

Copy link
Collaborator

@kevinyamauchi kevinyamauchi left a comment

Choose a reason for hiding this comment

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

Wow, this is awesome!

it looks like the --strict mkdocs build is failing because:

  • our filenames for the library and plugin examples are the same. I can fix this in a separate PR
  • there are references to non-existant API docs in the nav config. I can fix this in a separate PR.

I'm not familiar with the merits of building with/without the --strict flag. Do you think we should use it, @GenevieveBuckley ? If so, I can make the PRs I mentioned above and I think it will work :)

@kevinyamauchi
Copy link
Collaborator

kevinyamauchi commented Mar 31, 2023

@GenevieveBuckley , I went ahead and made a PR that I think should fix the the outstanding nav issues with the --strict mkdocs build: #108

edit: I see that you modified some of the examples files, so I will leave the renaming up to you.

@kevinyamauchi
Copy link
Collaborator

I also don't understand your example script organisation. At first it looks like the examples are just duplicated across the "plugin" and "library" folders, but actually not all scripts are the same, and sometimes even the ones that are named the same have slightly different code and/or comments.

Sorry, that's a bit sloppy on our side. The intention is that we have examples that both import the actual widget and launch with the plugin. The reason to show the widget import is just so folks that want to make custom widgets by composing our widgets with other know where to start. We can make sure the code is consistent in a separate PR.

@kevinyamauchi
Copy link
Collaborator

Hey @GenevieveBuckley ! I think this looks great! Is this ready for review? I saw you "marked it as ready", but the title is still WIP, so I wasn't sure. No worries either way - just wanted to check in.

@GenevieveBuckley
Copy link
Contributor Author

Sorry - forgot to edit the title, I'll take out the "WIP" bit now

@GenevieveBuckley GenevieveBuckley changed the title WIP: Examples gallery Examples gallery for napari-threedee Apr 5, 2023
Copy link
Collaborator

@kevinyamauchi kevinyamauchi left a comment

Choose a reason for hiding this comment

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

Wow, this is super cool, @GenevieveBuckley . Thank you for contributing this and for figuring out how to get it all running on CI.

I tested building it locally and it looks great. I kind of like having the examples scripts in the base repo so that they are easy for folks checking out the repo to find. I think we could adjust the CI job to copy the files from the examples directory into the docs at runtime. However, I think this PR is a standalone contribution as it establishes the infrastructure and we can iterate in future PRs.

I will leave this up for the rest of the day in case @alisterburt wants to weigh in. Otherwise, I will merge tomorrow. Thanks again!

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.

Examples gallery for the docs
3 participants