OSGeo / grass-addons

GRASS GIS Addons Repository
https://grass.osgeo.org/grass-stable/manuals/addons/
GNU General Public License v2.0
99 stars 150 forks source link

[Bug] CI: Which North Carolina data set to be used in tests? #674

Open neteler opened 2 years ago

neteler commented 2 years ago

I saw in one of these files a mention of the test using the North Carolina data sets, and I see it often in the tests, I assume it is always present in the testing environment. See:

When your are writing tests you can rely on having maps which are present in the NC sample location, or you can generate random maps.

(From https://grass.osgeo.org/grass80/manuals/libpython/gunittest_testing.html#test-general)

However, I'm working on a issue/PR and analyzing the CI output, and I would need a precision on which dataset is used exactly. Since there are 31 files in https://grass.osgeo.org/sampledata/north_carolina/, which is used? The CI uses https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz, but some failing tests use "basins" that I found in https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.tar.gz.

Originally posted by @echoix in https://github.com/OSGeo/grass-addons/issues/667#issuecomment-1008437667

wenzeslaus commented 2 years ago

Historically, part of the tests was using the full NC SPM dataset while another part was using the basic NC SPM dataset. The names in these two are, confusingly, not the same even for the same raster/vector maps/data. I created the alpha dataset to resolve this for the tests before a new dataset is created or, alternatively, the tests are limited to the basic dataset.

From the error in the description, it seems that the v2alpha2 dataset misses basins, so alpha3 is needed with that alternative name/copy. The proper fix is to create the v2 dataset which contains all data from the "v1" full dataset but uses the names and naming convention from the "v1" basic dataset. Additionally, tests which are using the names from the old "v1" full dataset will need to be fixed.