-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 g.version algorithm #53635
Add g.version algorithm #53635
Conversation
Ideally all these values would become outputs from this algorithm (so eg a model can adapt dynamically). Would you be willing to implement that? |
I'm not sure I understand what you're suggesting. Surely for adaptable models all you need is to:
My next thought was to look at a standard tool to check if a particular addon is available, and if not try to install it. I think that would be most useful. |
Ideally perhaps what we should do for both g.version and g.extension.list is detect whether it is running as part of a model and if so store the results in an output variable rather than an output file. |
I did spend quite some time looking at always saving the algorithm stdout to an output variable - I can just follow the existing code we're interacting with, but it's too complicated for me figure out the best way to do this. |
What I mean is that a html output is rather a dead end -- it's useful for a manual check of something, but restricts any use in automation (models or scripts). It would be better if we included the parsing in the algorithm so that the algorithm includes a string (or number) output value which is then super easy for use by these tools. |
… variable as well as html
I've now committed changes to store the output in an output variable as well as to html. |
With this it is easy enough to get the actual version number:
If we can get #53246 merged, a QGIS plugin could provide an algorithm description for e.g. r.stream.order, and simply do this to ensure the GRASS addon is installed:
Since we don't provide any output to show whether an addon install or uninstall was successful, it might be wise for anyone doing this to then check again if it is actually installed... |
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
Bumping so the bot doesn't kill us.
Also, I should note that there is something really inefficient about the code responsible for printing output messages to the algorithm dialog when we aren't creating an html output. Algorithms which produce a lot of output messages seem to speed up dramatically if generating an html output instead of printing to the algorithm dialog. |
@@ -0,0 +1,11 @@ | |||
g.version | |||
g.version - Display GRASS GIS version info. <p>Prints only version if run with no options checked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
QgsProcessingParameterEnum
with multiple choices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would need some more guidance on how to enable "multiple choices", but in any case, aren't checkboxes more user-friendly?
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
. |
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist. |
Description
This allows the user to check the details of the GRASS version that the GRASS processing provider is using. Useful for debugging.