Skip to content

geotribu/qchat-qfield-plugin

Repository files navigation

QChat - QField plugin

🎳 Tests 🧹 Lint pre-commit.ci status 🚀 Release

Latest release License: GPL v2 QField

QChat client in QField, let's chat with your GIS fellows on the field !

  • See QChat: the QGIS plugin and QChat client in QGIS.
  • QChat client compatible with the gischat backend.
  • QField users can target the qchat.geotribu.net instance, the one configured by default.

Installation

You can follow the QField documentation regarding plugin installation.

The URL to install the QChat plugin is:

https://github.com/geotribu/qchat-qfield-plugin/releases/latest/download/qfchat-latest.zip

Or flash this QR code directly within QField :

QR code to download latest QfChat plugin version


Development

  • Install precommit tools with:
pre-commit install
  • Create a symlink from the qfield-plugin-qchat repository into your QField documents / plugins local repository.

  • Install the QField Plugin Reloader plugin for an easier reloading workflow.

Tests locally

Note

QGIS4 must be installed on the test machine!

  • Install uv locally:
python3 -m pip install uv --break-system-packages
  • Create local virtualenv with system packages and sync:
uv venv --system-site-packages
uv sync
  • Add system packages to local virtual env (hacky):
SITE_PACKAGES=$(uv run python -c "import site; print(site.getsitepackages()[0])")
echo "/usr/share/qgis/python" > "$SITE_PACKAGES/qgis.pth"
  • Test that imports are fine:
uv run python -c "import qgis; print(qgis.__file__)"
uv run python -c "import PyQt6; print(PyQt6.__file__)"
uv run python -c "from PyQt6.QtCore import QT_VERSION_STR; print(QT_VERSION_STR)"

Note

Tested on Ubuntu 26.04, only...

  • Clone QField locally, e.g.:
git clone --depth 1 [--branch release-4_2] https://github.com/opengisch/QField.git
  • Run tests:
uv run pytest tests -v --qgis_disable_gui

Translate the plugin

  • install the required tools:
sudo apt install qt6-tools-dev-tools
  • generate the translations strings:
/usr/lib/qt6/bin/lupdate qfield-plugin-qchat/translations.pro
  • open the generated .ts files with Qt Linguist, using the GUI or the command line:
/usr/lib/qt6/bin/linguist qfield-plugin-qchat/main_fr.ts
  • compile the translations to .qm files:
/usr/lib/qt6/bin/lrelease qfield-plugin-qchat/main_fr.ts

Bump a new release

  1. Make sure the version key is updated in the plugin's metadata file.

  2. Make sure the pyproject.toml version is updated, e.g. with uv version --bump minor.

  3. Create a new tag on the main branch, e.g. git tag 1.4, then git push origin 1.4. A workflow will then create the GitHub release.

Note

It is recommended to regularly prune the tags locally with git fetch --prune --prune-tags, since PR workflows might create some temporary ones.


Shout out to @nirvn, the initiator of this QField plugin. Thanks for the amazing work !

About

QField plugin - QChat client

Topics

Resources

License

Stars

5 stars

Watchers

5 watching

Forks

Contributors