4

I've created a python plugin for QGIS. Before I upload it to the QGIS plugins repository, I was doing some testing to make sure it works. In Github, I forked the master repository and created a working branch. My development version in QGIS has been this branch I created. The plugin works, exists in my QGIS plugins folder, and is called "eco-valuator-CreateAndExportPrintLayout", as this is the name of the GitHub branch I was working in : enter image description here

I merged my development branch with the master branch (link above). Now if I download this repository from the master branch, the folder is called "eco-valuator-master". If I put this folder in with the rest of my plugin folders, QGIS doesn't like it. The plugin is listed as "Installed" if I go to "Manage/Install Plugins" but doesn't show in the processing toolbar (where this plugin should be) The photo below shows the one in question, highlighted: enter image description here

Lastly, if I manually change the name of the folder from "eco-valuator-master" to "eco-valuator-CreateAndExportPrintLayout", the plugin works. So obviously the issue is with the folder name.

However, I can't find any file within that folder that contains the folder's name, so why is this affecting the way the plugin works in QGIS?

When looking at the config file, it lists the name of the folder will be "ecosystem_service_valuator". Does this impact what is happening? Maybe after I upload the plugin to the QGIS plugins repository, this will be a non-issue?

  • 2
    I can't answer too much. I didn't try test. FYI, your config file can be safely removed if you don't use pb_tool.I python plugin can be 3 files, the init file, metadata.txt and the your plugin.py. I personnaly always use the same folder name, the main plugin name, I have some imports doing from MyPlugin import foo so I can't change the plugin folder name! – etrimaille Apr 15 at 1:15
  • Thanks @etrimaille. After uploading the plugin to the QGIS plugins repository, in the end the folder names were not a problem and the issue solved itself. – Erich Purpur Apr 16 at 17:48
  • 1
    I think you should add yu comment as an answer @etrimaille – Fran Raga Apr 17 at 11:20
3

After uploading the plugin to the QGIS repository, in the end the folder names were not a problem and the issue solved itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.