-
-
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
Closed
Closed
Add g.version algorithm #53635
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a23672b
Add g.version algorithm
AlisterH aa9344c
Tell the user that they can run without any of the options to get jus…
AlisterH 968eaef
Minor fix to g.extension.list
AlisterH 262924c
Tweak new info in grass7.txt
AlisterH 2c69b95
refine new information in grass7.txt
AlisterH 058f9b2
Save output of g.version and g.extension.list algorithms to an output…
AlisterH 361e0d4
fix lint error
AlisterH c3db9b9
fix flake error
AlisterH 30deda0
Give output variables specific names
AlisterH 91c6afe
fix flake error this time?
AlisterH c18a5fe
g.extension.list.txt - use QgsProcessingParameterEnum
AlisterH 3b9d625
Fix flake errors from last commit
AlisterH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
python/plugins/grassprovider/description/g.extension.list.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
g.extension | ||
g.extension.list - List GRASS addons. | ||
General (g.*) | ||
QgsProcessingParameterBoolean|-l|List available extensions in the official GRASS GIS Addons repository|False | ||
QgsProcessingParameterBoolean|-c|List available extensions in the official GRASS GIS Addons repository including module description|False | ||
QgsProcessingParameterBoolean|-a|List locally installed extensions|False | ||
QgsProcessingParameterFileDestination|html|List of addons|Html files (*.html)|addons_list.html|False | ||
QgsProcessingParameterEnum|list|List|Locally installed extensions;Extensions available in the official GRASS GIS Addons repository;Extensions available in the official GRASS GIS Addons repository including module description|False|0|False | ||
QgsProcessingParameterFileDestination|html|List of addons|Html files (*.html)|addons_list.html|True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
g.version | ||
g.version - Display GRASS GIS version info. <p>Prints only version if run with no options checked. | ||
General (g.*) | ||
QgsProcessingParameterBoolean|-c|Print copyright message|False | ||
QgsProcessingParameterBoolean|-x|Print citation options|False | ||
QgsProcessingParameterBoolean|-b|Print build information|False | ||
QgsProcessingParameterBoolean|-r|Print GIS library revision number and date|True | ||
QgsProcessingParameterBoolean|-e|Print info for additional libraries|True | ||
QgsProcessingParameterBoolean|-g|Print in shell script style (with Git commit reference)|False | ||
QgsProcessingParameterBoolean|--verbose|Print verbose output|False | ||
QgsProcessingParameterFileDestination|html|Output file|Html files (*.html)|grass_version_info.html|True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
*************************************************************************** | ||
g_version.py | ||
------------------ | ||
Date : May 2023 | ||
Copyright : (C) 2023 by Alister Hood | ||
Email : alister.hood at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
*************************************************************************** | ||
""" | ||
|
||
__author__ = 'Alister Hood' | ||
__date__ = 'May 2023' | ||
__copyright__ = '(C) 2023, Alister Hood' | ||
|
||
|
||
def processInputs(alg, parameters, context, feedback): | ||
pass | ||
|
||
|
||
def convertToHtml(alg, fileName, outputs): | ||
# don't copy this for something that will have lots of data like r.stats | ||
# it will be very slow | ||
outputs['GRASS_VERSIONINFO'] = open(fileName, 'r').read() | ||
# this will read the file a second time, but calling it saves us duplicating the code here | ||
alg.convertToHtml(fileName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 choicesThere 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?