-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make QuPath extension installer not depend on Fiji #2
Comments
You can install QuPath extension just by mv or untar the jar extension file in the QuPath Extension Path. |
@NicoKiaru Can help you with this Issue ? |
If you find a way, that'd be nice (I'm also pinging @petebankhead), but I'm not sure it's super obvious. I'll try to summarize the goal of the installer, what's being achieved here, and what's not being achieved. GoalHere's the goal of the installer scripts:
What's achievedRegarding point 2:
All this logic is probably pretty annoying to do in bash, or at least it's far above what I can do.
What's not achievedNow there are some issues:
|
Would the ability to set it from the command line help? I was recently thinking of adding the ability to set the extension directory as a potential command line argument, although I'm not entirely sure how straightforward that will be...
If I remember correctly, QuPath looks for extensions in subdirectories. If you aren't doing it already, could you put all your jars into a subdirectory and then just remove that when it's not needed? I guess conflicts could happen, but they probably could anyway... In any case, QuPath's whole extension loading mechanism needs a rethink. Hopefully v0.5.x will have some improvements, but nothing very major or advanced. |
Could the QuPath extension follow a guidelines ? like make a sub-directory by extension in the QuPath Extension directory if different jar are needed ? or have is version number in it's name. So we can make a script which analyse the QuPath subdir and replace a version by another ? |
Could you not already do that with your own extensions, without anything needing to check on QuPath's side? QuPath's extension mechanism isn't very advanced - I'm expecting that most will just be a single jar. I know the BIOP ones are more complicated, but I think you're doing more advanced stuff with QuPath extensions than anyone else I know :) I agree QuPath ought to look for version info and try to use it when available though. That's potentially a small enough change to try to get into v0.5.0 if I find time to work on it. I think proper extension support would require QuPath to make use of ClassLoaders in a more advanced way... but that's a much bigger, longer-term change. |
Changing the QuPath updater mechanism goes way beyond this issue I believe. So far it's ok for us, we need a few extra dependencies that hold in a zip, and as of now, to my knowledge, no conflict showed up. After, if some conflicting situation show up, I guess it will time to dig into this nightmare of resolving dependencies and conflicts, and probably try to re-use what's existing instead of re-inventing a dependency solver (on the Fiji side, the dependencies declared in pom and the use of maven is doing fine, with a pretty large codebase, but that's also probably working thanks to @ctrueden and team constant efforts). Jgo may be worth a look as well (https://github.com/scijava/jgo) Anyway, as far as this issue is concerned, I would go for:
@petebankhead when you write a CLI to set the extension folder, is it for setting the extension 'permanently' or just during the script execution time ?
|
I think the problem here is that there are common dependencies for different extensions. |
(side note I'm happy so far that the extension we provide are pretty stable, so far the Warpy extension dates from 2021 and is working great, the ABBA extension bugfix and API improvements did not lead to users complaints since its initial release in 2021. That's also thanks to Pete would did not break anything from v0.3 to v0.4 ;-) |
That's the bit that prompted
I think it makes most sense to do it just for the current execution and make no permanent changes. What do you think?
I think it exists in Java, and sounds like it could also be a command line option in QuPath (which could also be provided 'permanently' by modifying the
Would it make things better or worse if these were bundled with QuPath itself? We're just starting to explore the use of imglib2 elsewhere in the software. |
Yes, makes sense. So far I did not use QuPath with a CLI (except maybe for this issue), but I can see how it could help to specify a subset of extension during a script execution.
Is it possible ?? This would be awesome. But I could not find a way to set java preferences using Java options. It's not written on the Preferences API (https://docs.oracle.com/javase/8/docs/api/java/util/prefs/Preferences.html). And googling this question do not return any OS-independent solution. Maybe I missed it. With the current QuPath code, I do not think it's possible to set the extension folder for all users (https://github.com/qupath/qupath/blob/b3a59e880a9feef1b0b449189d72ffab3890e38e/qupath-gui-fx/src/main/java/qupath/lib/gui/prefs/PathPrefs.java#L816-L821)
I think it's a neutral change (except for a transition period where I should avoid duplications). Regarding setting preferences in command line, @romainGuiet wrote this groovy script and pref file to set the extension folder (https://github.com/BIOP/renku-helpers/tree/main/qupath) but again, it's not system wide. Also, if I go for this direction for the bash scripts, this means creating an xml file with bash. |
Is awk and gsub function installed with git bash ? If yes you can setup the cfgfile in a single line of code. |
I was imagining it would require a core QuPath change to optionally use For now, the most relevant think you can do is to provide a custom preference location. The relevant code is at I think it would look something like this:
Not sure if that helps with anything, but I've found it useful during development. |
Currently installing an extension on QuPath require running a script on Fiji -> that's not optimal
The text was updated successfully, but these errors were encountered: