GispoCoding / cookiecutter-qgis-plugin

A QGIS Plugin template to be set up with Cookiecutter
MIT License
24 stars 4 forks source link

Name potential processing folder according to plugin_package (fix #43) #46

Closed JuhoErvasti closed 9 months ago

JuhoErvasti commented 9 months ago

If processing provider and algorithm is included rename their folder after the plugin_package option, for example "myqgisplugin_processing". This is to avoid confusion and errors with the built-in PyQGIS 'processing' package.

nmaarnio commented 8 months ago

The provider.py still tries to import processing_algorithm.py from a directory called processing. Should also be updated to myqgisplugin_processing.

nmaarnio commented 8 months ago

The remove_processing_files() in post_gen_project.py also is removing an incorrect directory and should be updated

JuhoErvasti commented 8 months ago

@nmaarnio I've prepared a fix for the post_gen_project.py but I'm not sure what you mean with the processing_algorithm.py.

from .processing_algorithm import ProcessingAlgorithm

I think the "processing" folder/package is not being referred to at all in the provider, since this is an relative import (the processing_algorithm.py being in the same folder). I haven't modified the name of the algorithm module.

nmaarnio commented 8 months ago

I noticed this while I was checking PR #41 and was in the corresponding branch. Now I switched to main and it seems the issue in the provider.py is not present there. I think there might have been some merging mistake in modernize-template since the processing directory's name is updated there, but provider.py.j2 exists still there and does not match the new directory name.

JuhoErvasti commented 8 months ago

Ah okay, I see that now. I'm going to add a suggestion to #41 then.