Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions oqtopus/gui/plugin_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,19 @@ def __copyZipToDirectoryClicked(self):
if not install_destination:
return

install_filename = os.path.join(
install_destination,
f"{self.__plugin_name}_{self.__current_module_package.name}.zip",
Copy link
Member

Choose a reason for hiding this comment

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

Isn't id instead of name?

Copy link
Member Author

Choose a reason for hiding this comment

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

Name is the name of the release, the result is like that teksi_wastewater_2025.0.2.zip. There is no id inside the module package class

Copy link
Member

Choose a reason for hiding this comment

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

I've added this a couple of days ago, see https://opengisch.github.io/oqtopus/adding_modules/

I have in mind that the name contains spaces, while the id is the short name.

But I am not sure which should be used in this case, so if name is working as expected, I'm perfectly fine with it.

Copy link
Member Author

Choose a reason for hiding this comment

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

In this case, is the name of the package, not the module. Name should be exactly what is set in github as a release name, for example 2025.0.2 or 2025.0.2rc12.
So it can have spaces, but QGIS doesn't have problems installing from a zip file with spaces in the name.

)

# Copy the plugin package to the selected directory
try:
shutil.copy2(asset_plugin.package_zip, install_destination)
shutil.copy2(asset_plugin.package_zip, install_filename)

QMessageBox.information(
self,
self.tr("Plugin copied"),
self.tr(f"Plugin package has been copied to '{install_destination}'."),
self.tr(f"Plugin package has been copied to '{install_filename}'."),
)
except Exception as e:
QMessageBox.critical(
Expand Down