-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update(docs): complete contribute section
- Loading branch information
Showing
7 changed files
with
125 additions
and
10 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Development | ||
|
||
## Environment setup | ||
|
||
Typically on Ubuntu: | ||
|
||
```bash | ||
# create virtual environment linking to system packages (for pyqgis) | ||
python3 -m venv .venv --system-site-packages | ||
source .venv/bin/activate | ||
|
||
# bump dependencies inside venv | ||
python -m pip install -U pip | ||
python -m pip install -U -r requirements/development.txt | ||
|
||
# install git hooks (pre-commit) | ||
pre-commit install | ||
``` | ||
|
||
---- | ||
|
||
## Staging (_recette_) | ||
|
||
### Project through HTTP | ||
|
||
Use the project from the repository: <https://github.com/aeag/MenuFromProject-Qgis-Plugin/raw/master/test/projets/aeag-tiny.qgz> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Documentation | ||
|
||
Project uses Sphinx to generate documentation from docstrings (documentation in-code) and custom pages written in Markdown (through the [MyST parser](https://myst-parser.readthedocs.io/en/latest/)). | ||
|
||
## Build documentation website | ||
|
||
To build it: | ||
|
||
```bash | ||
# install additional dependencies | ||
python -m pip install -U -r requirements/documentation.txt | ||
# build it | ||
sphinx-build -b html -d docs/_build/cache -j auto -q docs docs/_build/html | ||
``` | ||
|
||
Open `docs/_build/index.html` in a web browser. | ||
|
||
## Write documentation using live render | ||
|
||
```bash | ||
sphinx-autobuild -q -b html docs/ docs/_build | ||
``` | ||
|
||
Open <http://localhost:8000> in a web browser to see the HTML render updated when a file is saved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Packaging and deployment | ||
|
||
## Packaging | ||
|
||
This plugin is using the [qgis-plugin-ci](https://github.com/opengisch/qgis-plugin-ci/) tool to perform packaging operations. | ||
Under the hood, the package command is performing a `git archive` run based on `CHANGELOG.md`. | ||
|
||
Install additional dependencies: | ||
|
||
```bash | ||
python -m pip install -U -r requirements/packaging.txt | ||
``` | ||
|
||
Then use it: | ||
|
||
```bash | ||
# package a specific version | ||
qgis-plugin-ci package 1.3.1 | ||
# package latest version | ||
qgis-plugin-ci package latest | ||
``` | ||
|
||
## Release a version | ||
|
||
Through git workflow: | ||
|
||
1. Add the new version to the `CHANGELOG.md`. You can write it manually or use the auto-generated release notes by Github: | ||
1. Go to [project's releases](https://github.com/aeag/MenuFromProject-Qgis-Plugin/releases) and click on `Draft a new release` | ||
1. In `Choose a tag`, enter the new tag | ||
1. Click on `Generate release notes` | ||
1. Copy/paste the generated text from `## What's changed` until the line before `**Full changelog**:...` in the CHANGELOG.md replacing `What's changed` with the tag and the publication date | ||
1. Quit this tab without saving | ||
1. Change the version number in `metadata.txt` | ||
1. Apply a git tag with the relevant version: `git tag -a 0.3.0 {git commit hash} -m "This version rocks!"` | ||
1. Push tag to main branch: `git push origin 0.3.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Manage translations | ||
|
||
## Requirements | ||
|
||
Qt Linguist tools are used to manage translations. Typically on Ubuntu: | ||
|
||
```bash | ||
sudo apt install qttools5-dev-tools | ||
``` | ||
|
||
## Workflow | ||
|
||
1. Update `.ts` files: | ||
|
||
```bash | ||
pylupdate5 -verbose menu_from_project/resources/i18n/plugin_translation.pro | ||
``` | ||
|
||
2. Translate your text using QLinguist or directly into `.ts` files. | ||
3. Compile it: | ||
|
||
```bash | ||
lrelease menu_from_project/resources/i18n/*.ts | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.