Skip to main content

QGIS plugin for visualizing quality check results.

Project description

quality-result-gui

QGIS plugin for visualizing quality check results.

Plugin

Not implemented yet.

Library

To use this library as an external dependency in your plugin or other Python code, install it using pip install quality-result-gui and use imports from the provided quality_result_gui package. If used in a plugin, library must be installed in the runtime QGIS environment or use qgis-plugin-dev-tools to bundle your plugin with runtime dependencies included.

Minimal working example (with JSON file)

For quality dock widget to work, a subclass of QualityResultClient needs to be first implemented. Instance of the created API client class is then passed to QualityErrorsDockWidget. For a real-world application, a separate backend application is needed for checking data quality and provide the quality check results for the QGIS plugin.

Example of the expected api response can be seen in this file. Example parser class for json response is also provided for the following example to work:

import json

from qgis.utils import iface

from quality_result_gui.api.quality_api_client import QualityResultClient
from quality_result_gui.api.types.quality_error import QualityErrorsByPriority
from quality_result_gui.ui.quality_errors_dock import QualityErrorsDockWidget
from quality_result_gui_plugin.dev_tools.response_parser import QualityErrorResponse


class ExampleQualityResultClient(QualityResultClient):

    def get_results(self) -> Optional[List[QualityErrorsByPriority]]:
        """
        Retrieve latest quality errors from API

        Returns:
            None: if no results available
            List[QualityErrorsByPriority]: if results available

        Raises:
            QualityResultClientError: if request fails
            QualityResultServerError: if check failed in backend
        """
        full_path_to_json = "some-path/example_quality_errors.json"
        example_response = json.loads(Path(full_path_to_json).read_text())

        return QualityErrorResponse(example_response).errors_by_priority

    def get_crs(self) -> QgsCoordinateReferenceSystem:
        return QgsCoordinateReferenceSystem("EPSG:3067")



api_client = ExampleQualityResultClient()
quality_errors_dialog = QualityErrorsDockWidget(api_client, iface.mainWindow())
quality_errors_dialog.show()

Development of quality-result-gui

See development readme.

License & copyright

Licensed under GNU GPL v3.0.

This tool is part of the topographic data production system developed in National Land Survey of Finland. For further information, see:

Contact details: eero.hietanen@maanmittauslaitos.fi

Copyright (C) 2022 National Land Survey of Finland.

CHANGELOG

0.0.3 - 2022-12-15

  • Fix: Use glob paths for missing build resource files

0.0.2 - 2022-12-14

  • Fix: Fix missing ui and svg files by including them in setuptools build

0.0.1 - 2022-12-14

  • Initial release: QGIS dock widget for visualizing quality check results

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quality-result-gui-0.0.3.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

quality_result_gui-0.0.3-py3-none-any.whl (65.5 kB view details)

Uploaded Python 3

File details

Details for the file quality-result-gui-0.0.3.tar.gz.

File metadata

  • Download URL: quality-result-gui-0.0.3.tar.gz
  • Upload date:
  • Size: 47.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for quality-result-gui-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9b2b74a5c26b42e6136cdf4f44a4ac76d1851dc67930b1b3ff84de17373c72ae
MD5 f031141fcafea87e7d0ed97937416eea
BLAKE2b-256 ff5d225bf68a2df3c12e705a00375046e2281f24c024e00dc0fe75d736a85c13

See more details on using hashes here.

File details

Details for the file quality_result_gui-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for quality_result_gui-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4e422e6a3e7abf3b3eba9b592cc6e31568d18fe91d362feb791f50ca7087b2dd
MD5 1acbb3b8ffb92ca48c5eaa9801f54a46
BLAKE2b-256 f14842687e5e092539cc3ce3232ae368db2b00933bee8f5e22245a9c1c12591a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page