あなたのプラグインのリリース

Once your plugin is ready and you think the plugin could be helpful for some people, do not hesitate to upload it to 公式のpythonプラグインリポジトリ. On that page you can find also packaging guidelines about how to prepare the plugin to work well with the plugin installer. Or in case you would like to set up your own plugin repository, create a simple XML file that will list the plugins and their metadata, for examples see other plugin repositories.

公式のpythonプラグインリポジトリ

*公式の*pythonプラグインリポジトリは http://plugins.qgis.org/ で見つけることができます。

公式のリポジトリを使用するため、あなたは OSGEO web portal からOSGEO IDを入手しないといけません。

あなたがプラグインをアップロードしたら、それはスタッフによって承認され、あなたに通知されます。

TODO:
Insert a link to the governance document

許可

これらのルールは、公式のプラグインリポジトリに実装されています:

  • すべての登録ユーザは、新しいプラグインを追加することができます

  • *スタッフ*は全てのプラグインバージョンの承認と非承認を行うことができます。

  • users which have the special permission plugins.can_approve get the versions they upload automatically approved
  • users which have the special permission plugins.can_approve can approve versions uploaded by others as long as they are in the list of the plugin owners
  • 特定のプラグインは *staff*ユーザまたはプラグイン *owners*によって削除または編集できます。

  • ユーザが`plugins.can_approve`なしで新しいバージョンをアップロードした場合、プラグインのバージョンは自動的に非承認になります。

運用の信託

Staff members can grant trust to selected plugin creators setting plugins.can_approve permission through the front-end application.

The plugin details view offers direct links to grant trust to the plugin creator or the plugin owners.

検証

Plugin’s metadata are automatically imported and validated from the compressed package when the plugin is uploaded.

Here are some validation rules that you should aware of when you want to upload a plugin on the official repository:

  1. the name of the main folder containing your plugin must contain only contains ASCII characters (A-Z and a-z), digits and the characters underscore (_) and minus (-), also it cannot start with a digit
  2. metadata.txt が要求されます。

  3. all required metadata listed in metadata table must be present
  4. the version metadata field must be unique

プラグイン構造

Following the validation rules the compressed (.zip) package of your plugin must have a specific structure to validate as a functional plugin. As the plugin will be unzipped inside the users plugins folder it must have it’s own directory inside the .zip file to not interfere with other plugins. Mandatory files are: metadata.txt and __init__.py. But it would be nice to have a README and of course an icon to represent the plugin (resources.qrc). Following is an example of how a plugin.zip should look like.

plugin.zip
  pluginfolder/
  |-- i18n
  |   |-- translation_file_de.ts
  |-- img
  |   |-- icon.png
  |   `-- iconsource.svg
  |-- __init__.py
  |-- Makefile
  |-- metadata.txt
  |-- more_code.py
  |-- main_code.py
  |-- README
  |-- resources.qrc
  |-- resources_rc.py
  `-- ui_Qt_user_interface_file.ui