# QGIS Plugin tools
[![PyPI version](https://badge.fury.io/py/qgis_plugin_tools.svg)](https://badge.fury.io/py/qgis_plugin_tools)
[![Downloads](https://img.shields.io/pypi/dm/qgis_plugin_tools.svg)](https://pypistats.org/packages/qgis_plugin_tools)
![CI](https://github.com/GispoCoding/qgis_plugin_tools/workflows/Tests/badge.svg)
[![Code on Github](https://img.shields.io/badge/Code-GitHub-brightgreen)](https://github.com/GispoCoding/pytest-qgis)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
**Warning: The API is not stable yet. Function and files may move between commits.**
As it's a submodule, you can configure your GIT to auto update the submodule commit by running:
`git config --global submodule.recurse true`
The module is helping you with:
* [setting up some logging](docs/usage.md#Logging) (QgsMessageLog, file log, remote logs...)
* [fetching resources](docs/usage.md#Resource-tools) in `resources` or other folders
* [fetching compiled UI file](docs/usage.md#Resource-tools) in `resources/ui` folder
* fetching compiled translation file in `resources/i18n` folder
* removing QRC resources file easily
* translate using the `i18n.tr()` function.
* managing the release process : zip, upload on plugins.qgis.org, tag, GitHub release
* providing some common widgets/code for plugins
* [setting up a debug server](docs/usage.md#Debug-server)
## How to install it
### For a new plugin
This will create needed structure for your plugin
1. Create new plugin using [cookiecutter-qgis-plugin](https://github.com/GispoCoding/cookiecutter-qgis-plugin).
This will automatically initialize git and add qgis_plugin_tools as a submodule for the plugin.
1. Next set up the [development environment](https://github.com/GispoCoding/cookiecutter-qgis-plugin/blob/main/%7B%7Bcookiecutter.project_directory%7D%7D/docs/development.md#setting-up-development-environment),
edit metadata.txt with description etc. and commit changes.
### For existing plugin
1. Go to the root folder of your plugin code source
1. `git submodule add https://github.com/GispoCoding/qgis_plugin_tools.git`
1. To get most out of the submodule, try to refactor the plugin to use the default [plugin tree](#Plugin-tree-example)
### As external dependency
This project can also be used as an external dependency. It can be installed via pip:
```shell
pip install qgis_plugin_tools
```
The project can also be installed in editable mode, but you must use setuptool's strict mode
because of the submodule nature of the project:
```
pip install -e /path/to/qgis_plugin_tools --use-pep517 --config-settings editable_mode=strict
```
### Setting up development environment
Refer to [development](https://github.com/GispoCoding/cookiecutter-qgis-plugin/blob/main/%7B%7Bcookiecutter.project_directory%7D%7D/docs/development.md#setting-up-development-environment) documentation.
## How to use it
Refer to [usage](docs/usage.md) documentation.
## Plugin tree example
The plugin should follow the following file tree to get most out of this module.
Plugin `Foo` root folder:
* `plugin_repo` # **no '-' character!**
* **`.gitmodules`**
* `.pre-commit-config.yaml`
* `.gitattributes`
* `.gitignore`
* `.qgis-plugin-ci` # to use [qgis-plugin-ci](https://github.com/opengisch/qgis-plugin-ci)
* `pluginname` # **no '-' character!**
* `.gitignore`
* `qgis_plugins_tools/` # submodule
* **`resources/`**
* `i18n/` # Alternatively translations could use [Transifex](infrastructure/template/root/docs/development.md#Translating)
* `fi.ts`
* `fi.qm`
* `ui/`
* `main_dialog.ui`
* `icons/`
* `my_icon.svg`
* `__init__.py`
* `foo.py`
* `metadata.txt`
* `build.py`
* `test/`
Raw data
{
"_id": null,
"home_page": "https://github.com/GispoCoding/qgis_plugin_tools",
"name": "qgis-plugin-tools",
"maintainer": "Gispo Ltd.",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "info@gispo.fi",
"keywords": "qgis, QGIS, PyQGIS",
"author": "3Liz, Gispo Ltd.",
"author_email": "info@gispo.fi",
"download_url": "https://files.pythonhosted.org/packages/bc/27/9959aeb5ac2e37f5e3cc58ee0767be2eb75fb2a5840924561fdff56f7109/qgis_plugin_tools-0.5.0.tar.gz",
"platform": null,
"description": "# QGIS Plugin tools\n[![PyPI version](https://badge.fury.io/py/qgis_plugin_tools.svg)](https://badge.fury.io/py/qgis_plugin_tools)\n[![Downloads](https://img.shields.io/pypi/dm/qgis_plugin_tools.svg)](https://pypistats.org/packages/qgis_plugin_tools)\n![CI](https://github.com/GispoCoding/qgis_plugin_tools/workflows/Tests/badge.svg)\n[![Code on Github](https://img.shields.io/badge/Code-GitHub-brightgreen)](https://github.com/GispoCoding/pytest-qgis)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n\n\n\n**Warning: The API is not stable yet. Function and files may move between commits.**\n\nAs it's a submodule, you can configure your GIT to auto update the submodule commit by running:\n\n`git config --global submodule.recurse true`\n\nThe module is helping you with:\n* [setting up some logging](docs/usage.md#Logging) (QgsMessageLog, file log, remote logs...)\n* [fetching resources](docs/usage.md#Resource-tools) in `resources` or other folders\n* [fetching compiled UI file](docs/usage.md#Resource-tools) in `resources/ui` folder\n* fetching compiled translation file in `resources/i18n` folder\n* removing QRC resources file easily\n* translate using the `i18n.tr()` function.\n* managing the release process : zip, upload on plugins.qgis.org, tag, GitHub release\n* providing some common widgets/code for plugins\n* [setting up a debug server](docs/usage.md#Debug-server)\n\n## How to install it\n\n### For a new plugin\nThis will create needed structure for your plugin\n\n1. Create new plugin using [cookiecutter-qgis-plugin](https://github.com/GispoCoding/cookiecutter-qgis-plugin).\n This will automatically initialize git and add qgis_plugin_tools as a submodule for the plugin.\n1. Next set up the [development environment](https://github.com/GispoCoding/cookiecutter-qgis-plugin/blob/main/%7B%7Bcookiecutter.project_directory%7D%7D/docs/development.md#setting-up-development-environment),\n edit metadata.txt with description etc. and commit changes.\n\n### For existing plugin\n1. Go to the root folder of your plugin code source\n1. `git submodule add https://github.com/GispoCoding/qgis_plugin_tools.git`\n1. To get most out of the submodule, try to refactor the plugin to use the default [plugin tree](#Plugin-tree-example)\n\n### As external dependency\nThis project can also be used as an external dependency. It can be installed via pip:\n```shell\npip install qgis_plugin_tools\n```\n\nThe project can also be installed in editable mode, but you must use setuptool's strict mode\nbecause of the submodule nature of the project:\n```\npip install -e /path/to/qgis_plugin_tools --use-pep517 --config-settings editable_mode=strict\n```\n\n### Setting up development environment\nRefer to [development](https://github.com/GispoCoding/cookiecutter-qgis-plugin/blob/main/%7B%7Bcookiecutter.project_directory%7D%7D/docs/development.md#setting-up-development-environment) documentation.\n\n## How to use it\n\nRefer to [usage](docs/usage.md) documentation.\n\n\n## Plugin tree example\n\nThe plugin should follow the following file tree to get most out of this module.\n\nPlugin `Foo` root folder:\n* `plugin_repo` # **no '-' character!**\n * **`.gitmodules`**\n * `.pre-commit-config.yaml`\n * `.gitattributes`\n * `.gitignore`\n * `.qgis-plugin-ci` # to use [qgis-plugin-ci](https://github.com/opengisch/qgis-plugin-ci)\n * `pluginname` # **no '-' character!**\n * `.gitignore`\n * `qgis_plugins_tools/` # submodule\n * **`resources/`**\n * `i18n/` # Alternatively translations could use [Transifex](infrastructure/template/root/docs/development.md#Translating)\n * `fi.ts`\n * `fi.qm`\n * `ui/`\n * `main_dialog.ui`\n * `icons/`\n * `my_icon.svg`\n * `__init__.py`\n * `foo.py`\n * `metadata.txt`\n * `build.py`\n * `test/`\n",
"bugtrack_url": null,
"license": "GNU GPL v2.0",
"summary": "A collection of helpful tools and widgets to aid QGIS plugin tool development",
"version": "0.5.0",
"project_urls": {
"Homepage": "https://github.com/GispoCoding/qgis_plugin_tools"
},
"split_keywords": [
"qgis",
" qgis",
" pyqgis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5202028e00bfa391a34927bfec0e882b9e8d00c1c024c62d000c204ec1d6f55d",
"md5": "bbcec8cc9fd699379ba4c7e4939ccd41",
"sha256": "9589623377ab910998747e6a0cbc24e24c2ef60a12a1d3f43363ac031ca27bc4"
},
"downloads": -1,
"filename": "qgis_plugin_tools-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bbcec8cc9fd699379ba4c7e4939ccd41",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 52632,
"upload_time": "2024-05-21T11:44:25",
"upload_time_iso_8601": "2024-05-21T11:44:25.559693Z",
"url": "https://files.pythonhosted.org/packages/52/02/028e00bfa391a34927bfec0e882b9e8d00c1c024c62d000c204ec1d6f55d/qgis_plugin_tools-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bc279959aeb5ac2e37f5e3cc58ee0767be2eb75fb2a5840924561fdff56f7109",
"md5": "d503e5a148166a58b3ad5dd1cd1209f2",
"sha256": "bf02c9b4ac1ff9500873d39816722d23e3d946ecb9a22b7e0af8a03033500348"
},
"downloads": -1,
"filename": "qgis_plugin_tools-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "d503e5a148166a58b3ad5dd1cd1209f2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 46887,
"upload_time": "2024-05-21T11:44:27",
"upload_time_iso_8601": "2024-05-21T11:44:27.315262Z",
"url": "https://files.pythonhosted.org/packages/bc/27/9959aeb5ac2e37f5e3cc58ee0767be2eb75fb2a5840924561fdff56f7109/qgis_plugin_tools-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-21 11:44:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GispoCoding",
"github_project": "qgis_plugin_tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "qgis-plugin-tools"
}