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

Update processing instructions #7140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

brccabral
Copy link

Previous instructions were not working. Need to initialize() Processing before calling for algorithms()

Previous instructions were not working. Need to `initialize()` Processing before calling for `algorithms()`
The `from qgis import processing` does work in the Python Console from QGIS GUI app, but if running a script for a custom application, the `from processing.core.Processing import Processing` must be called.
Copy link
Collaborator

@DelazJ DelazJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the quite late review.
I have some formatting suggestions.
Issue I have with this change is that the chapter is about the Python console inside QGIS, so not one you'd be using from a custom application (am I right that the one you are using here is not the QGIS embedded one?). That said, browsing the docs i can't see any other place your changes will fit in, so we can circumvent my concern by either:

  • adding it as a note
  • if you confirm that the rest of the instructions are applicable in a custom application context, we can remove the few sentences related to QGIS console and make it a general chapter on python console

@@ -41,6 +41,12 @@ with the following line:

>>> from qgis import processing

And if you are running a custom application, this is the import. Also, need to `initialize()` Processing.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing word?

Suggested change
And if you are running a custom application, this is the import. Also, need to `initialize()` Processing.
And if you are running a custom application, this is the import. Also, you need to
:meth:`initialize() <qgis.core.QgsProcessingAlgorithm.initialize>` Processing.

@@ -41,6 +41,12 @@ with the following line:

>>> from qgis import processing

And if you are running a custom application, this is the import. Also, need to `initialize()` Processing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
::

to indicate that the indentation is within a code block, otherwise you get an ugly grey vertical bar on the left

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.

None yet

2 participants