Skip to content

Commit

Permalink
Fix import in the Processing provider example
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and DelazJ committed Dec 12, 2024
1 parent a254723 commit 6535db3
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions docs/pyqgis_developer_cookbook/processing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ If you want to add your existing plugin to Processing, you need to add some code
:skipif: True

from qgis.core import QgsApplication
from processing_provider.provider import Provider
from .processing_provider.provider import Provider

class YourPluginName():
class YourPluginName:

def __init__(self):
self.provider = None
Expand All @@ -92,7 +92,7 @@ If you want to add your existing plugin to Processing, you need to add some code

from qgis.core import QgsProcessingProvider

from processing_provider.example_processing_algorithm import ExampleProcessingAlgorithm
from .example_processing_algorithm import ExampleProcessingAlgorithm


class Provider(QgsProcessingProvider):
Expand Down Expand Up @@ -129,5 +129,18 @@ If you want to add your existing plugin to Processing, you need to add some code
file <python/plugins/processing/script/ScriptTemplate.py>` and
update it according to your needs.

You should have a tree similar to this :

.. code-block:: bash
└── your_plugin_root_folder
├── __init__.py
├── LICENSE
├── metadata.txt
└── processing_provider
├── example_processing_algorithm.py
├── __init__.py
└── provider.py
#. Now you can reload your plugin in QGIS and you should see your example
script in the Processing toolbox and modeler.

0 comments on commit 6535db3

Please sign in to comment.