You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests are more reliable if the remote datasets are downloaded before running the tests, in particular if any are run in parallel. Developers only really need to worry about this once, but it still could be confusing for new contributors if tests fail because of the remote file mechanism. On the GMT-side gmt get -Dcache and gmt get -Ddata=earth -I1m -N can be used to download the data required for tests, but PyGMT does not need all these data for its tests.
Is it worth adding a new method datasets.download_test_data() that new contributors can use before testing their code to download all the necessary datasets? I think this would contain a PyGMT version of the contents of the 'Download remote data' task in the cache data workflow - then perhaps that workflow could use this method to avoid redundancy.
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered:
After we finish the migration of the baseline images to DVC, the source tarball and binary wheels won't contain baseline images. It means that users who install PyGMT via pip or conda cannot run tests.
I'm thinking if we should have a pygmt/testing.py module. The module can provide two functions:
pygmt.testing.download_baseline_images(): runs dvc init, dvc remote to setup the remote dvc repository, and dvc pull to download the baseline images
pygmt.testing.download_test_data(): downloads the data used in tests.
pygmt.testing.download_baseline_images(): runs dvc init, dvc remote to setup the remote dvc repository, and dvc pull to download the baseline images
This is not a good idea. To download the baseline images, the function must change the directory into the PyGMT installation path, runs the dvc commands to set up the dvc repository and download images. Such processes changes the pygmt installation directory (e.g., lib/python3.8/site-packages/pygmt directory). When uninstall pygmt, these files are not deleted by default, which may cause trouble for future pygmt installations.
Description of the desired feature
Tests are more reliable if the remote datasets are downloaded before running the tests, in particular if any are run in parallel. Developers only really need to worry about this once, but it still could be confusing for new contributors if tests fail because of the remote file mechanism. On the GMT-side
gmt get -Dcache
andgmt get -Ddata=earth -I1m -N
can be used to download the data required for tests, but PyGMT does not need all these data for its tests.Is it worth adding a new method
datasets.download_test_data()
that new contributors can use before testing their code to download all the necessary datasets? I think this would contain a PyGMT version of the contents of the 'Download remote data' task in the cache data workflow - then perhaps that workflow could use this method to avoid redundancy.Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: