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

Relax dependency versions? #32

Closed
haesleinhuepf opened this issue Aug 27, 2022 · 11 comments
Closed

Relax dependency versions? #32

haesleinhuepf opened this issue Aug 27, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@haesleinhuepf
Copy link

Hi @bauerdavid ,

first of all congrats to this great plugin! Here in Dresden many people are using it. I would like to add it to a plugin-collection: devbio-napari to ship it together with other plugins to collaborators. However, there is a tiny issue with pinned dependencies in napari-nd-annotator, which limits who can install it.

Would it be possible to change napari == 0.4.15 to napari <= 0.4.15 in these two places?

Furthermore, would it be possible to change vispy == 0.9.6 to vispy <= 0.9.6 in this place?

Thanks for considering! Let me know what you think.

Best,
Robert

@bauerdavid
Copy link
Owner

Hey @haesleinhuepf,
thank you very much, I'm glad you can put the plugin to use! :)
The napari version was fixed to 0.4.15 due to some problems arising when using 0.4.16. However, as napari will continue to evolve, this plugin should follow these changes as well. Also I already had some discussion about that version fix with some other users. So I will soon take a look at this issue and make it work with newer napari versions as well.
As for vispy, I decided to fix its version because of napari/napari#4415 (I just realized that you were the one to post this issue! I was sure that I've seen your name somewhere 😄). I will check that also when the plugin is compatible with the new napari version.

@haesleinhuepf
Copy link
Author

Hi @bauerdavid ,

just one thing because I'm not sure if I was clear. I hope that your plugin supports older versions (napari<=0.4.15), because the devbio-napari distribution I mentioned also doesn't support 0.4.16. Thus, I don't care much about 0.4.16, I care more about 0.4.11-0.4.15 because they are quite common in the field. The problems in 0.4.16 will hopefully go away with 0.4.17 at some point ;-)

Thanks!
Robert

@haesleinhuepf
Copy link
Author

As for vispy, I decided to fix its version because of napari/napari#4415 (I just realized that you were the one to post this issue! I was sure that I've seen your name somewhere 😄). I will check that also when the plugin is compatible with the new napari version.

That's why I have this in devbio-napari:
https://github.com/haesleinhuepf/devbio-napari/blob/master/setup.cfg#L58-L59

@bauerdavid
Copy link
Owner

Yup, you were clear, but of course I misread it... Unfortunately if I recall correctly, there were some functionalities which depend heavily on newer versions of napari. But I will check whether that's possible.

@haesleinhuepf
Copy link
Author

No pressure. Thanks for the feedback! 🌞

@bauerdavid
Copy link
Owner

bauerdavid commented Aug 30, 2022

I reverted napari to 0.4.11, but didn't spend too much time with it, because I realized that supporting all these versions of napari might(!) require a huge amount of work, mostly because of the bounding box layer.

Between different releases napari sometimes changes its package structure, and (of course) built-in layers are changed accordingly, not to mention other changes in these layers. If we would want to make the BoundingBoxLayer compatible with every version of napari since 0.4.11, this might require a lot of version specific code (probably implemented as multiple-branch 'if-elif'-s). But note that I did not do a detailed analysis, this is rather a gut feeling.
edit: I started working on supporting both 0.4.15 and 0.4.16 version of napari (a thing another user requested), and it actually did really take making some 'if-else'-s and version checking.

I'm afraid I won't be able to make this happen. But if you or anyone else wanted to take a look at this and check if it's feasible, I would be more than happy to collaborate 🙂

As for vispy, I am thinking maybe the easiest solution would be to lift the version restriction, as it is not related to the plugin, but to napari, and having vispy<=0.9.6 would cause conflicts with later versions of napari.

@haesleinhuepf
Copy link
Author

I'm afraid I won't be able to make this happen.

No problem. I really didn't want to create any pressure.

and it actually did really take making some 'if-else'-s and version checking.

Just out of curiosity: did you upload that code to GitHub? I would like to take a look.

Thanks again for considering!

@bauerdavid
Copy link
Owner

Sure! This is the commit: da82a5f

@bauerdavid
Copy link
Owner

Hey @haesleinhuepf,
due to reasons unrelated to your problem, the bounding box layer was moved to a separate Python package. Releases from now on will depend on this package (napari-bbox). This allowed to modify the code to make napari-nD-annotator compatible with older napari versions (down to 0.4.11). There's one issue though, users still cannot use the bounding box layer and related functionality (e.g. cropping layers) with versions below 0.4.15. Other tools (interpolation, minimal contour etc.) are available for napari>=0.4.11 (although the plugin is not compatible with 0.4.17 yet). I hope this solution helps 🙂.
The next release will contain the modifications, stay tuned!

David

@bauerdavid
Copy link
Owner

Hey @haesleinhuepf,
the new version of the plugin is out. As mentioned in my previous comment, it works with napari>=0.4.11, except for the bounding box functionality, which is available from 0.4.15. If you install the plugin as before (plugin manager or pip), than by default bounding boxes will not be available. Bounding box layer can be installed in multiple ways:

  1. install the annotator as pip install napari-nD-annotator[all]
  2. install the napari-bbox plugin either from pip or the plugin manager
    Feel free to try it!

Best wishes,
David

@haesleinhuepf
Copy link
Author

Awesome, big thanks for working on this @bauerdavid !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants