-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
3 additions
and
40 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,30 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
/*************************************************************************** | ||
LDMP - A QGIS plugin | ||
This plugin supports monitoring and reporting of land degradation to the UNCCD | ||
and in support of the SDG Land Degradation Neutrality (LDN) target. | ||
------------------- | ||
begin : 2017-05-23 | ||
git sha : $Format:%H$ | ||
copyright : (C) 2017 by Conservation International | ||
email : [email protected] | ||
***************************************************************************/ | ||
""" | ||
import os | ||
import sys | ||
import tempfile | ||
|
||
import numpy as np | ||
from qgis.testing import unittest | ||
|
||
from LDMP.calculate import ldn_make_prod5 | ||
from LDMP.calculate import ldn_recode_state | ||
from LDMP.calculate import ldn_recode_traj | ||
from LDMP.calculate import ldn_total_by_trans | ||
from LDMP.calculate import ldn_total_deg_f | ||
from LDMP.calculate_ldn import DlgCalculateLDNSummaryTableAdmin | ||
from LDMP.calculate_ldn import ldn_total_by_trans_merge | ||
from LDMP.test import add_default_bands_to_map | ||
|
||
|
||
|
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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
qgis_setup.sh | ||
qgis_setup.sh LDMP | ||
|
||
# FIX default installation because the sources must be in "trends.earth parent folder | ||
rm -rf /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/trends.earth | ||
ln -sf /tests_directory/LDMP /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/trends.earth | ||
ln -sf /tests_directory/LDMP /usr/share/qgis/python/plugins/trends.earth | ||
|
||
pip3 install -r /tests_directory/requirements.txt | ||
pip3 install -r /tests_directory/requirements-dev.txt |
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 |
---|---|---|
@@ -1,19 +1,3 @@ | ||
@echo off | ||
REM Run docker tests on your local machine | ||
|
||
set PLUGIN_NAME="LDMP" | ||
set CONTAINER=trendsearth_qgis_1 | ||
|
||
set DOCKER_RUN_COMMAND=docker exec -it %CONTAINER% sh -c | ||
|
||
REM docker-compose down -v | ||
docker-compose up -d | ||
|
||
%DOCKER_RUN_COMMAND% "qgis_setup.sh %PLUGIN_NAME%" | ||
%DOCKER_RUN_COMMAND% "rm -f /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/%PLUGIN_NAME%" | ||
%DOCKER_RUN_COMMAND% "ln -s /tests_directory/LDMP/ /root/.local/share/QGIS/QGIS3/profiles/default/python/plugins/%PLUGIN_NAME%" | ||
docker cp trends.earth_test_user_credentials.json %CONTAINER%:/tests_directory/LDMP/test/trends.earth_test_user_credentials.json | ||
docker cp trends.earth_admin_user_credentials.json %CONTAINER%:/tests_directory/LDMP/test/trends.earth_admin_user_credentials.json | ||
|
||
REM Run the tests | ||
%DOCKER_RUN_COMMAND% "cd /tests_directory && /usr/bin/test_runner/qgis_testrunner.sh LDMP.test.testplugin" | ||
docker-compose exec -T qgis-testing-environment qgis_testrunner.sh LDMP.test.testplugin |
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