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

pin all criticall pacakages in plugin installer #139

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Czaki
Copy link
Contributor

@Czaki Czaki commented Mar 9, 2025

This is my proposition for pining of dependency.

Instead of adding lower/upper bound for packages, Pin all packages that are critical to napari (list is currently incomplete)

We may not know about problematic versions, and maybe we should not allow for that without using external tools for environment management

@Czaki
Copy link
Contributor Author

Czaki commented Mar 9, 2025

@psobolewskiPhD please see this as an alternative to #138.
This PR is to show idea, may need some tests, especially for conda env.

CRITICAL_PACKAGES_PIN_CONDA = [
f"{pkg}={parse_version(package_version(pkg)).base_version}"
for pkg in CRITICAL_PACKAGES
] # + QT_BACKENDS_PIN
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 do not know how to prevent installing additional backend on conda.

@psobolewskiPhD
Copy link
Member

psobolewskiPhD commented Mar 9, 2025

@Czaki yeah i dont see anything easy. i think there would need to be a Qtbackend virtual package.
Otherwise, I think we'd need to have a recipe for a dummy package that we adjust the run_constraints of and then build the dummy package and install into the environment. I think that would work?

Edit:
On one hand I like the approach, on the other hand, this is really restricitve. I wonder if it's overkill?
I worry it may make debugging things more difficult?

@Czaki
Copy link
Contributor Author

Czaki commented Mar 13, 2025

I think such an approach will be simpler to debug in bundled napari than "I have installed plugin and napari do not start"

@psobolewskiPhD
Copy link
Member

Bundled napari is a different beast IMO.
I think constraining more severely has to happen there, because it's not easy to just make a new env and the target user is less advanced.

@psobolewskiPhD
Copy link
Member

I almost wonder if we should split this in two:

  • bundle plugin installer (which can also maybe handle napari updates)
  • normal plugin installer, that defaults to conda or pip depending on the source of napari

@Czaki
Copy link
Contributor Author

Czaki commented Mar 13, 2025

It may be a good idea.

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