Skip to content

Administrators guide

Pilot area data

This section deals with making updates to the data of the pilot study area (Bushback Ridge). This needs to be done in the GitHub repository, or locally on the repository clone, and then pushed into the repository. The change can be made as follows:

The following JSON files needs to be considered when doing this, all of which are stored in "src/cplus_plugin/data/default"

  • activities.json
  • ncs_pathways.json
  • priority_weighted_layers.json

Activities

In this file existing activities can be edited (e.g. change name or description), be removed or a new activity can be added. Here is a quick overview of an activity stored in the JSON file

  • Each activity contains the following elements:
    • uuid: A Universally unique identifier (UUID) for the activity
    • name: A unique name for the activity
    • description: Detailed description of the activity
    • pwls_ids: UUIDs of the priority weighted layers associated with the activity
    • style: The style which will be applied to the activity
  • Editing these will have an effect on the activity in the plugin

Implementation model json

When adding a new activity to the list (or a UUID needs to change), the user needs to provide a UUID. This can be done as follows:

  • Open a UUID generator. Other UUID generators can also be used, but the provided link will suffice
  • Best will be to make use of version 4
  • Click Generate a version 4 UUID
  • Copy and paste the newly generated UUID

UUID generator

To remove an activity from the list of activities, an administrator can simply remove the entry in the JSON file. Remove this text to remove an activity:

Remove model

To update the list of priority weighted layers for an activity, the ID needs to be retrieved:

  • Open the priority_weighted_layers.json file
  • Each available PWL will be listed under "layers"
  • Cope and paste the UUID that needs to be added to the activity pwls_ids field
  • Save the file

PWL UUID

A section on PWL editing will soon follow.

NCS pathways

An administrator can access/edit the NCS pathways as follows:

  • Open the ncs_pathways.json file
  • Here is a description of each element:
    • uuid: A unique identifier for the pathway
    • name: Unique title for the pathway
    • description: Detailed description of the pathway
    • path: Directory with file name for the pathway data
    • layer_type: Zero (0) for rasters, one (1) for vector layers
    • carbon_paths: A list of the carbon footprint rasters. This should be a directory with the raster name. Tif is the preferred format
  • Editing these elements will make changes to the pilot area data in the plugin

PWL UUID

When adding a new pathway to the list (or a UUID needs to change), the user needs to provide a UUID. This can be done as follows:

  • Open a UUID generator. Other UUID generators can also be used, but the provided link will suffice
  • Best will be to make use of version 4
  • Click Generate a version 4 UUID
  • Copy and paste the newly generated UUID

UUID generator

To remove a pathway from the list of layers, an administrator can simply remove the entry in the JSON file. Remove this text to remove an activity:

Remove model

Priority weighted layers

Do the following to change/add/remove priority weighted layers for the pilot study area

  • Open the priority_weighted_layers.json file
  • Here is a description of each element:
    • uuid: A unique ID for the PWL
    • name: Unique name for the PWL
    • description: A detailed description of the PWL
    • selected: Whether the PWL should be selected on default
    • path: A directory with file name for the PWL data. This should be a raster
  • Changing the above values will have an impact on the data in the plugin for the pilot study area

PWL example

When adding a new PWL to the list (or a UUID needs to change), the user needs to provide a UUID. This can be done as follows:

  • Open a UUID generator. Other UUID generators can also be used, but the provided link will suffice
  • Best will be to make use of version 4
  • Click Generate a version 4 UUID
  • Copy and paste the newly generated UUID

To remove a PWL from the list of layers, an administrator can simply remove the entry in the JSON file. Remove this text to remove a PWL:

PWL example

Bugs and suggestions

This section relates to creating an issue for when a bug is found in the plugin, or if the user has a suggested improvement for the plugin.

  • Go to the CPLUS repository
  • Click on the Issues tab
  • Click on New Issue (see Figure 1)
  • Title: Short, but descriptive
  • Description: Detailed description. If it's a bug, an explanation on how to replicate the bug will be best. Screenshots of the bug or suggestion will also be helpful

GitHub issue

Figure 1: An example of a new GitHub issue

  • Select a Label (e.g. bug, enhancement, etc.) as shown in Figure 2

Issue label

Figure 2: Selecting a label for an issue

  • Select the CPLUS Project (Figure 3). This will add the issue/task to the project board

Issue project

Figure 3: Selecting a Project for an issue

  • The end result should be similar to Figure 4.

GitHub issue example

Figure 4: An example of a finalized issue

  • Click Submit new issue

The issue will now be submitted to the GitHub repository and be available to the developers.

Staging version of the plugin

When a pull requested is performed, an automatic staging version is created. This will allow a developer to test their changes to the plugin with other changes which has not been merged into the main branch. Another advantage of this approach is to show the client to progress of the plugin.

Get the staging version

  • Go to the repository: https://github.com/ConservationInternational/cplus-plugin
  • To the right there is a section named Releases

admin github releases

  • Click on Latest release
  • Download the cplus_plugin.zip file if you want to install the plugin in QGIS
  • Developers will likely be interested in Source code (zip) and Source code (tar.gz) options

admin release latest

  • See user/installation on how to install a QGIS plugin

If you want to have a look at past versions of the plugin:

  • On the repository page, click on Releases
  • A list of option will appear
  • Choose the version you are interested in, and follow the steps discussed above

admin release past


Last update: October 2, 2024
Back to top