-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add download_test_data to download data files used in tests (#1310)
Co-authored-by: Wei Ji <[email protected]> Co-authored-by: Meghan Jones <[email protected]> Co-authored-by: Yao Jiayuan <[email protected]>
- Loading branch information
1 parent
aa4b8d1
commit 1ab551d
Showing
2 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,34 +17,36 @@ jobs: | |
shell: bash -l {0} | ||
|
||
steps: | ||
# Checkout current git repository | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
# fecth all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Setup Miniconda | ||
- name: Setup Miniconda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
channels: conda-forge | ||
miniconda-version: "latest" | ||
|
||
# Install GMT | ||
- name: Install GMT | ||
run: conda install -c conda-forge/label/dev gmt=6.2.0rc2 | ||
# Install GMT and other required dependencies from conda-forge | ||
- name: Install dependencies | ||
run: | | ||
conda install conda-forge/label/dev::gmt=6.2.0rc2 \ | ||
numpy pandas xarray netCDF4 packaging matplotlib | ||
# Install the package that we want to test | ||
- name: Install the package | ||
run: | | ||
python setup.py sdist --formats=zip | ||
pip install dist/* | ||
# Download remote files | ||
- name: Download remote data | ||
run: | | ||
gmt which -Ga @earth_relief_10m_p @earth_relief_10m_g \ | ||
@earth_relief_30m_p @earth_relief_30m_g \ | ||
@earth_relief_01d_p @earth_relief_01d_g \ | ||
@earth_relief_05m_p @earth_relief_05m_g | ||
# Download one tile of the 03s srtm data. | ||
# @N35E135.earth_relief_03s_g.nc is for internal use only. | ||
# The naming scheme may change. | ||
# DO NOT USE IT IN SCRIPTS. | ||
gmt which -Ga @N35E135.earth_relief_03s_g.nc | ||
# @srtm_tiles.nc is needed for 03s and 01s relief data | ||
gmt which -Ga @srtm_tiles.nc | ||
gmt which -Ga @ridge.txt @Table_5_11.txt @test.dat.nc \ | ||
@tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz \ | ||
@usgs_quakes_22.txt @fractures_06.txt | ||
python -c "from pygmt.helpers.testing import download_test_data; download_test_data()" | ||
# Upload the downloaded files as artifacts to GitHub | ||
- name: Upload artifacts to GitHub | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters