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

Add algorithm to manage GRASS addons #53049

Merged
merged 6 commits into from May 31, 2023
Merged

Conversation

AlisterH
Copy link
Contributor

@AlisterH AlisterH commented May 9, 2023

Description

See #53048

@github-actions github-actions bot added this to the 3.32.0 milestone May 9, 2023
@github-actions github-actions bot added the GRASS label May 9, 2023
@AlisterH
Copy link
Contributor Author

AlisterH commented May 9, 2023

There is one issue - it would be good to get rid of the "region extent" advanced parameter. But if it is possible, I'm not sure how to do it.

@AlisterH
Copy link
Contributor Author

AlisterH commented May 9, 2023

I guess the algorithm to list addons would ideally write the list to a file as well.

@nicogodet
Copy link
Member

I guess addons become an algorithm once installed. How do you manage this on QGIS side as it requires a description file to be added to processing provider ?

@AlisterH
Copy link
Contributor Author

AlisterH commented May 9, 2023

See #53048
The simplest option is for there to be a directory for user-installed description files somewhere in the QGIS profile folder. But something more complex may be wanted, to avoid having some of the same problems as the processing models folder.

@AlisterH
Copy link
Contributor Author

AlisterH commented May 9, 2023

Installing description files would be a separate operation, because people wanting to write description files will want to get the GRASS addon first.

@AlisterH
Copy link
Contributor Author

I guess the algorithm to list addons would ideally write the list to a file as well.

Done

@AlisterH
Copy link
Contributor Author

There is one issue - it would be good to get rid of the "region extent" advanced parameter. But if it is possible, I'm not sure how to do it.

I haven't sorted this out, but my last commit overrides processInputs, which is unnecessary for these algorithms and was producing error messages.

@nicogodet
Copy link
Member

This is automatically added in

param = QgsProcessingParameterExtent(
self.GRASS_REGION_EXTENT_PARAMETER,
self.tr('GRASS GIS 7 region extent'),
optional=True
)
param.setFlags(param.flags() | QgsProcessingParameterDefinition.FlagAdvanced)
self.params.append(param)

Not easily removable

@nyalldawson
Copy link
Collaborator

It might not be perfect yet, but we can always refine in follow ups...

@nyalldawson
Copy link
Collaborator

@AlisterH can you fix the failing flake test please?

@AlisterH
Copy link
Contributor Author

Done.

@nyalldawson nyalldawson merged commit 8e9901b into qgis:master May 31, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants