Testing¶
Contents:
Contributors will want to test their changes against a baseline to ensure no regression appear.
S1-Tiling tests are not part of an integrated continous workflow. They are meant to be run on an on-demand basis.
At this moment we only have a single end-to-end test on S2 33NWB tile on S1 images acquired in January 2020.
The baseline¶
There are two ways to obtain the baseline:
Either we have given you an authentication token to the S3 server where we have stored the current baseline.
In that case, thanks to MinIO client, you can:
first and once: register your machine to the S3 server we use
mc config host add minio-otb https://s3.orfeo-toolbox.org/ <access-key> <secret-key> --api S3v4
then retrieve the baseline data thanks to
mc cp --recursive minio-otb/s1-tiling/baseline /some/local/path
Instead of
mc
, you can also userclone
– which is for instance already installed on CNES clusters.Or you’ll need to first establish the baseline from a version of S1Tiliing known to work correctly, before introducing any change.
Organise the S1 images downloaded into a directory named
inputs
and the results into a directory namedexpected
.
Running the tests¶
S1 Tiling tests depend on pytest. You can see all the supported options with:
pytest --help
In particular they depend on the following options:
-
--baselinedir
=BASELINEDIR
¶ Directory where the baseline is.
-
--outputdir
=OUTPUTDIR
¶ Directory where the S2 products will be generated.
Warning
Don’t forget to clean it eventually.
-
--tmpdir
=TMPDIR
¶ Directory where the temporary files will be generated.
Warning
Don’t forget to clean it eventually.
-
--srtmdir
=SRTMDIR
¶ Directory where SRTM files are – default value:
$SRTM_DIR
-
--download
¶
Download the input files with eodag instead of using the compressed ones from the baseline. If true, raw S1 products will be downloaded into
tmpdir/inputs
.