ec-jrc / pyPoseidon

Framework for Hydrodynamic simulations
https://pyposeidon.readthedocs.io/
European Union Public License 1.2
20 stars 8 forks source link

tests: Reduce the number of tests that download SRTM over the network #42

Closed pmav99 closed 2 years ago

pmav99 commented 2 years ago

When running the tests (at least locally) the majority of the time is being spent in downloading SRTM. With this commit we reduce the number of tests that download the DEM data over the network (i.e. we do it with just a single spatial window instead of multiple ones).

This should speed up the main tests by a fair bit (e.g. from ~5 minutes down to less than 2 minutes). The tests that require --runschism should not be affected.

pmav99 commented 2 years ago

@brey For the record, running the tests with pytest -n4 should speed up the basic tests even more (e.g. the time will go down to ~40 seconds). Do take note though that -n <number> and --runschism should not be combined, because they both use multiple processes.