From 47b27127f29d22c1459fb6cb78647a7c8b6e9713 Mon Sep 17 00:00:00 2001 From: Kenn Cartier Date: Wed, 14 Aug 2024 09:12:38 -0700 Subject: [PATCH] Added documentation --- tests/resources/README.md | 2 -- .../resources/layer_dumps_for_br_lauro_de_freitas/README.md | 4 ++++ .../layer_dumps_for_br_lauro_de_freitas/__init__.py | 0 .../layers_for_br_lauro_de_freitas.qgs | 0 .../test_write_layers_to_geotiff.py | 6 ++++++ 5 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 tests/resources/README.md create mode 100644 tests/resources/layer_dumps_for_br_lauro_de_freitas/README.md create mode 100644 tests/resources/layer_dumps_for_br_lauro_de_freitas/__init__.py rename tests/resources/{ => layer_dumps_for_br_lauro_de_freitas}/layers_for_br_lauro_de_freitas.qgs (100%) rename tests/resources/{ => layer_dumps_for_br_lauro_de_freitas}/test_write_layers_to_geotiff.py (95%) diff --git a/tests/resources/README.md b/tests/resources/README.md deleted file mode 100644 index 7250a3ee..00000000 --- a/tests/resources/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# QGIS project files -QGIS files are used for testing layers geotiff files diff --git a/tests/resources/layer_dumps_for_br_lauro_de_freitas/README.md b/tests/resources/layer_dumps_for_br_lauro_de_freitas/README.md new file mode 100644 index 00000000..d4dc9447 --- /dev/null +++ b/tests/resources/layer_dumps_for_br_lauro_de_freitas/README.md @@ -0,0 +1,4 @@ +# QGIS manual analysis for Lauro de Freitas, Brazil +Folder contains: +1. Test code that can be set to output the layers as geotiff files. Execution is controlled by a "master switch" +1. A QGIS file used for manually inspecting the generated geotiff files diff --git a/tests/resources/layer_dumps_for_br_lauro_de_freitas/__init__.py b/tests/resources/layer_dumps_for_br_lauro_de_freitas/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/resources/layers_for_br_lauro_de_freitas.qgs b/tests/resources/layer_dumps_for_br_lauro_de_freitas/layers_for_br_lauro_de_freitas.qgs similarity index 100% rename from tests/resources/layers_for_br_lauro_de_freitas.qgs rename to tests/resources/layer_dumps_for_br_lauro_de_freitas/layers_for_br_lauro_de_freitas.qgs diff --git a/tests/resources/test_write_layers_to_geotiff.py b/tests/resources/layer_dumps_for_br_lauro_de_freitas/test_write_layers_to_geotiff.py similarity index 95% rename from tests/resources/test_write_layers_to_geotiff.py rename to tests/resources/layer_dumps_for_br_lauro_de_freitas/test_write_layers_to_geotiff.py index e27aaa1f..fa9082ef 100644 --- a/tests/resources/test_write_layers_to_geotiff.py +++ b/tests/resources/layer_dumps_for_br_lauro_de_freitas/test_write_layers_to_geotiff.py @@ -1,3 +1,5 @@ +# This code is mostly intended for manual execution + import pytest import os import shutil @@ -25,7 +27,11 @@ from tests.resources.bbox_constants import BBOX_BR_LAURO_DE_FREITAS_1 from tools.general_tools import create_temp_folder +# RUN_DUMPS is the master control for whether the writes and tests are executed +# Setting RUN_DUMPS to True turns on code execution. +# Values should normally be set to False to avoid unnecessary execution. RUN_DUMPS = False +# Both the tests and QGIS file are implemented for the same bounding box in Brazil. BBOX = BBOX_BR_LAURO_DE_FREITAS_1 @pytest.mark.skipif(RUN_DUMPS == False, reason='Skipping since RUN_DUMPS set to False')