Skip to content

Commit

Permalink
update(docs): complete contribute section
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Nov 13, 2024
1 parent 34ef7c2 commit a89f8c1
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 10 deletions.
7 changes: 0 additions & 7 deletions docs/development.md

This file was deleted.

26 changes: 26 additions & 0 deletions docs/development/development.md
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>
24 changes: 24 additions & 0 deletions docs/development/documentation.md
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.
35 changes: 35 additions & 0 deletions docs/development/packaging.md
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`
24 changes: 24 additions & 0 deletions docs/development/translation.md
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
```
19 changes: 16 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@
```{toctree}
---
maxdepth: 1
caption: Others
caption: Contributing
---
history.md
development/contribute
development/environment
development/documentation
development/translation
development/packaging
development/testing
```

```{toctree}
---
maxdepth: 1
caption: Misc
---
misc/history.md
On QGIS Plugins repository <https://plugins.qgis.org/plugins/menu_from_project/>
```

Expand Down Expand Up @@ -129,7 +142,7 @@ Le projet placé dans un espace partagé du réseau, sous postgres ou un serveur

![configuration window](static/config_window_fr.png)

- Bouton ajouter un projet ("+"), puis "éditer" pour ajouter un projet .qgs, .qgz à la liste, ou coller l'URI d'un projet PostgreSQL, coller l'URL d'un projet distant. ex : https://adour-garonne.eaufrance.fr/upload/DATA/SIG/aeag-web.qgz
- Bouton ajouter un projet ("+"), puis "éditer" pour ajouter un projet .qgs, .qgz à la liste, ou coller l'URI d'un projet PostgreSQL, coller l'URL d'un projet distant. ex : <https://adour-garonne.eaufrance.fr/upload/DATA/SIG/aeag-web.qgz>

Le nom (modifiable), deviendra le titre du menu.

Expand Down
File renamed without changes.

0 comments on commit a89f8c1

Please sign in to comment.