From cc828047a2bf9e1c2e4dfae74984d29206a95706 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 6 Jan 2022 15:55:37 +0800 Subject: [PATCH 01/10] Fix UnicodeDecodeError with shapefiles for plot and plot3d --- pygmt/src/plot.py | 10 ++++------ pygmt/src/plot3d.py | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/pygmt/src/plot.py b/pygmt/src/plot.py index 5f627383517..8345c065916 100644 --- a/pygmt/src/plot.py +++ b/pygmt/src/plot.py @@ -229,15 +229,13 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): and data.geom_type.isin(["Point", "MultiPoint"]).all() ): # checking if the geometry of a geoDataFrame is Point or MultiPoint kwargs["S"] = "s0.2c" - elif ( - "S" not in kwargs and kind == "file" - ): # checking that the data is a file path to set default style + elif "S" not in kwargs and kind == "file" and data.endswith(".gmt"): + # checking that the data is a file path to set default style try: with open(which(data), mode="r", encoding="utf8") as file: line = file.readline() - if ( - "@GMULTIPOINT" in line or "@GPOINT" in line - ): # if the file is gmt style and geometry is set to Point + if "@GMULTIPOINT" in line or "@GPOINT" in line: + # if the file is gmt style and geometry is set to Point kwargs["S"] = "s0.2c" except FileNotFoundError: pass diff --git a/pygmt/src/plot3d.py b/pygmt/src/plot3d.py index 27164eda470..42fc2faf143 100644 --- a/pygmt/src/plot3d.py +++ b/pygmt/src/plot3d.py @@ -199,15 +199,13 @@ def plot3d( and data.geom_type.isin(["Point", "MultiPoint"]).all() ): # checking if the geometry of a geoDataFrame is Point or MultiPoint kwargs["S"] = "u0.2c" - elif ( - "S" not in kwargs and kind == "file" - ): # checking that the data is a file path to set default style + elif "S" not in kwargs and kind == "file" and data.endswith(".gmt"): + # checking that the data is a file path to set default style try: with open(which(data), mode="r", encoding="utf8") as file: line = file.readline() - if ( - "@GMULTIPOINT" in line or "@GPOINT" in line - ): # if the file is gmt style and geometry is set to Point + if "@GMULTIPOINT" in line or "@GPOINT" in line: + # if the file is gmt style and geometry is set to Point kwargs["S"] = "u0.2c" except FileNotFoundError: pass From 6edca912756beb4121de5268c952d48e723f7751 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 24 Feb 2022 22:32:02 +0800 Subject: [PATCH 02/10] Add a new test for plotting shapefiles --- .../baseline/test_plot_shapefile.png.dvc | 4 + pygmt/tests/data/RidgeTest.dbf | Bin 0 -> 3293 bytes pygmt/tests/data/RidgeTest.gmt | 105 ++++++++++++++++++ pygmt/tests/data/RidgeTest.prj | 1 + pygmt/tests/data/RidgeTest.shp | Bin 0 -> 1724 bytes pygmt/tests/data/RidgeTest.shx | Bin 0 -> 124 bytes pygmt/tests/test_plot.py | 12 ++ 7 files changed, 122 insertions(+) create mode 100644 pygmt/tests/baseline/test_plot_shapefile.png.dvc create mode 100644 pygmt/tests/data/RidgeTest.dbf create mode 100644 pygmt/tests/data/RidgeTest.gmt create mode 100644 pygmt/tests/data/RidgeTest.prj create mode 100644 pygmt/tests/data/RidgeTest.shp create mode 100644 pygmt/tests/data/RidgeTest.shx diff --git a/pygmt/tests/baseline/test_plot_shapefile.png.dvc b/pygmt/tests/baseline/test_plot_shapefile.png.dvc new file mode 100644 index 00000000000..c2a13316351 --- /dev/null +++ b/pygmt/tests/baseline/test_plot_shapefile.png.dvc @@ -0,0 +1,4 @@ +outs: +- md5: 75277741d098cf7a0bad7869b574afc9 + size: 24178 + path: test_plot_shapefile.png diff --git a/pygmt/tests/data/RidgeTest.dbf b/pygmt/tests/data/RidgeTest.dbf new file mode 100644 index 0000000000000000000000000000000000000000..54fc804af2e8c0899998469ad259c7b29cbf94ec GIT binary patch literal 3293 zcmd^AO>dkq5Jky3>NV;qf54S(V8Oki#i6LnhYV4a69Q~jw41a__R{{F{?h z9FcqTlf+&EE#gB@)2{p8o7<*kk;!O z$~Ha{wryi^|G&{7 SLqT!l(HRl}qdot@y?+FOywxE9 literal 0 HcmV?d00001 diff --git a/pygmt/tests/data/RidgeTest.gmt b/pygmt/tests/data/RidgeTest.gmt new file mode 100644 index 00000000000..1da6365aab4 --- /dev/null +++ b/pygmt/tests/data/RidgeTest.gmt @@ -0,0 +1,105 @@ +# @VGMT1.0 @GLINESTRING +# @R-39.5848/-28.3229/33.0656/44.3014 +# @Je4326 +# @Jp"+proj=longlat +datum=WGS84 +no_defs " +# @Jw"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]" +# @NPLATEID1|GPGIM_TYPE|TYPE|FROMAGE|TOAGE|NAME|DESCR|FEATURE_ID|PLATEID2|L_PLATE|R_PLATE|RECON_METH|SPREAD_ASY|REGION_NO|REF_NO|STRING_NO|TYPE_NO|TYPE_NO_AD|COLOUR|NPOINTS +# @Tdouble|string|string|double|double|string|string|string|double|double|double|string|double|double|double|double|double|string|double|double +# FEATURE_DATA +> +# @D101|gpml:MidOceanRidge|RI|0.000000000000000|-999.000000000000000|"Reykjanes"||GPlates-1389768d-90d9-42e8-95fa-5b441c7fb297|304|0|0||0.000000000000000|92|1|7|1||5|57 +-28.3229 44.3014 +-28.371 44.1811 +-28.4257 44.199 +-28.4434 44.1443 +-28.4463 44.0954 +-28.4735 44.0269 +-28.4886 43.9327 +-28.5103 43.8392 +-28.5286 43.7624 +-28.7955 43.7719 +-28.8334 43.6971 +-28.8841 43.626 +-28.9364 43.4911 +-29.0063 43.3874 +-29.0994 43.2097 +-29.1737 43.077 +-29.3101 43.0849 +-29.3108 43.0237 +-29.3264 42.9539 +-29.3505 42.8359 +-29.3758 42.7278 +-29.3147 42.7148 +-29.3218 42.6737 +-29.3402 42.6067 +-29.36 42.53 +-29.3897 42.415 +-29.4283 42.2861 +-29.2223 42.2888 +-29.2285 42.233 +-29.2442 42.1805 +-29.2445 42.0824 +-29.2612 41.9269 +-29.1583 41.9123 +-29.1967 41.803 +-29.2144 41.6796 +-29.247 41.5257 +-29.2837 41.3845 +-29.3199 41.2457 +-29.2247 41.2098 +-29.2391 41.1228 +-29.2591 40.9825 +-29.2778 40.869 +-29.3081 40.7027 +-29.3399 40.5659 +-29.5671 40.5991 +-29.5711 40.5529 +-29.5749 40.4674 +-29.5949 40.3809 +-29.6282 40.2908 +-29.6382 40.2059 +-29.6535 40.1068 +-29.58 40.1051 +-29.588 40.0739 +-29.6102 40.0342 +-29.6087 39.9929 +-29.762 39.3973 +-29.9062 39.3866 +> +# @D101|gpml:MidOceanRidge|RI|0.000000000000000|-999.000000000000000|"Klitgord"||GPlates-53da72c0-30ba-4fee-9240-df8468b1c915|714|0|0||0.000000000000000|91|1|10|1||5|20 +-29.9062 39.3866 +-30.4279 38.387 +-30.6063 38.3996 +-31.0731 37.6793 +-31.3683 37.7048 +-31.5147 37.2837 +-32.2698 37.375 +-32.2971 37.4118 +-32.3909 37.1394 +-32.6448 37.176 +-32.7066 37.0349 +-32.9468 37.0643 +-33.0039 36.9175 +-33.2235 36.9432 +-33.3173 36.6931 +-33.5941 36.741 +-33.7725 36.1848 +-33.9852 36.22 +-34.0539 36.0716 +-34.174 36.103 +> +# @D101|gpml:MidOceanRidge|RI|0.000000000000000|-999.000000000000000|"Dietmar"||GPlates-0067db63-b172-42e9-9020-fbca230de033|714|0|0||0.000000000000000|91|1|11|1||5|14 +-34.174 36.103 +-34.294 35.736 +-34.414 35.736 +-34.745 35.146 +-36.336 35.368 +-36.637 34.751 +-36.787 34.751 +-36.877 34.552 +-37.057 34.577 +-37.237 34.154 +-37.357 34.179 +-37.628 33.603 +-39.279 33.879 +-39.5848 33.0656 diff --git a/pygmt/tests/data/RidgeTest.prj b/pygmt/tests/data/RidgeTest.prj new file mode 100644 index 00000000000..f45cbadf007 --- /dev/null +++ b/pygmt/tests/data/RidgeTest.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/pygmt/tests/data/RidgeTest.shp b/pygmt/tests/data/RidgeTest.shp new file mode 100644 index 0000000000000000000000000000000000000000..ac7ec2491e0bb37f72f54116750e0e035e98de6f GIT binary patch literal 1724 zcmZuydsIzX7{97vL`j-bVZ3Vc$aqxK6IK!`uPGx!((H4tS=Pi^cmMI7`|WS<@AvqQO!k$w?30gXK#QhK z#(uIRzAuj7yr@K7x8iNVi2!#R`fc6g$>CpXBURhXRq)B}|9{y_ChOH8*2>;J>iFAc zf+ij}O;?pDKdQwNWp?lP_B`i7<;YvF12`O3*y1$7NCl29b^G3ga(MK4*Y#*)72IXl zTDO!#?e9j0M(e9!iPf4?SjOQaEvtbx{Z-Ibcy`)1D>+Obu_bD$rV3_PpS))f%b|Dd zfur*~C=53D`Ydl9hgTQgXbyQyA$V`#OwR-kZMajO>31ny?eMx+aEU|n`*Ar}8Y#rD zsyys_gG06}&AyI8#R9gWk;8ihS$_<#q_FJufQO~694<@@^1oe1q3dN-Lv}Bsu2({# z)s{|OW=zoi?cm7TObR9L-)F8EPcTqybRz}nUTy@9O0UW4lPH|u{#$wqi_M}mGCz-_ zU>M^1e2W*sit2H}#xWFP<<)rZ3)v*|HoGVy@#d6nhZbNMXa)u0B4dXt*}fb=(=9Vt$4Zs z4Q0C7Q_=|Tf5Qk;2@o0`Q!sujK@rw!2i9-UW&dg0*?r?L%q*WM0Ar){+D?MIYOGpq z%>*cz!7}p*N;sGZkkiTpT}Y5*&C2~nM*xEZQ}4!XWBH2?KZ<0rOMi`V3F!pAM8WqJ zK=MI0!B?l5P_+b*&dnky@!qWj_stng^ef)uaYzY0y~=Eq!fGzRqS;vo!lcX?5EMj)tI7tZ^DFb3`vK+DCRJoD)6eWa-!q=DMFj3$& zJTx;|IR(g3qWdPV)?u6+`?MK4x##oHX&>=t;z&U0u!B4duL_^r#~hHU=Ju~gc&L)q zYxJEA*p<+Jt2Xt0z9*m>A0CwZ7uPTK1C;!?o`*3{b;>5LWc5;4ciJcNFxEcp(vNEZ znG5nFqIh`4#z0m!;FwE#=T1cPuy>t@^Nu3GvtexD`0#LBr5WAtG9W|Wur7dyA4Fmr z0oR(J-cV@7gJ@sVcYu<=hVYQG^VOuL-XF0158D;YCSU9D!1@v)PyEy@?wKp%uFIDA z^!!g>d|{@*)TgWD*7XY5P1)qM`VdQYpR2&1+4wq`rhtGG&P+kP+ONe5kofZ8)$=V- z0nFVYCl`E(&oMd`5jF4%YI{;jx@a=jb2>XnE^e9@@`i jI~(5*4HdBWS(WSjN*<-YuK-ASc}f&z8P^8T^E>n}H0=)Z*&MjhSnM`M&CLP3 Zb`((~1_s6l3=B+SK+zpQ`Vx@t002%?6tVyS literal 0 HcmV?d00001 diff --git a/pygmt/tests/test_plot.py b/pygmt/tests/test_plot.py index 5f695a72790..62d013e51e0 100644 --- a/pygmt/tests/test_plot.py +++ b/pygmt/tests/test_plot.py @@ -544,3 +544,15 @@ def test_plot_ogrgmt_file_multipoint_non_default_style(): style="c0.2c", ) return fig + + +@pytest.mark.mpl_image_compare +def test_plot_shapefile(): + """ + Make sure that plot works for shape file. + + See https://github.com/GenericMappingTools/pygmt/issues/1616. + """ + fig = Figure() + fig.plot(data=os.path.join(TEST_DATA_DIR, "RidgeTest.shp"), pen="1p") + return fig From f7f928626f0f72d50a9be9178570ab1fbb6533de Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 27 Feb 2022 15:16:23 +0800 Subject: [PATCH 03/10] Remove data files and use caches from the GMT server --- pygmt/tests/data/RidgeTest.dbf | Bin 3293 -> 0 bytes pygmt/tests/data/RidgeTest.prj | 1 - pygmt/tests/data/RidgeTest.shp | Bin 1724 -> 0 bytes pygmt/tests/data/RidgeTest.shx | Bin 124 -> 0 bytes pygmt/tests/test_plot.py | 4 ++-- 5 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 pygmt/tests/data/RidgeTest.dbf delete mode 100644 pygmt/tests/data/RidgeTest.prj delete mode 100644 pygmt/tests/data/RidgeTest.shp delete mode 100644 pygmt/tests/data/RidgeTest.shx diff --git a/pygmt/tests/data/RidgeTest.dbf b/pygmt/tests/data/RidgeTest.dbf deleted file mode 100644 index 54fc804af2e8c0899998469ad259c7b29cbf94ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3293 zcmd^AO>dkq5Jky3>NV;qf54S(V8Oki#i6LnhYV4a69Q~jw41a__R{{F{?h z9FcqTlf+&EE#gB@)2{p8o7<*kk;!O z$~Ha{wryi^|G&{7 SLqT!l(HRl}qdot@y?+FOywxE9 diff --git a/pygmt/tests/data/RidgeTest.prj b/pygmt/tests/data/RidgeTest.prj deleted file mode 100644 index f45cbadf007..00000000000 --- a/pygmt/tests/data/RidgeTest.prj +++ /dev/null @@ -1 +0,0 @@ -GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/pygmt/tests/data/RidgeTest.shp b/pygmt/tests/data/RidgeTest.shp deleted file mode 100644 index ac7ec2491e0bb37f72f54116750e0e035e98de6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1724 zcmZuydsIzX7{97vL`j-bVZ3Vc$aqxK6IK!`uPGx!((H4tS=Pi^cmMI7`|WS<@AvqQO!k$w?30gXK#QhK z#(uIRzAuj7yr@K7x8iNVi2!#R`fc6g$>CpXBURhXRq)B}|9{y_ChOH8*2>;J>iFAc zf+ij}O;?pDKdQwNWp?lP_B`i7<;YvF12`O3*y1$7NCl29b^G3ga(MK4*Y#*)72IXl zTDO!#?e9j0M(e9!iPf4?SjOQaEvtbx{Z-Ibcy`)1D>+Obu_bD$rV3_PpS))f%b|Dd zfur*~C=53D`Ydl9hgTQgXbyQyA$V`#OwR-kZMajO>31ny?eMx+aEU|n`*Ar}8Y#rD zsyys_gG06}&AyI8#R9gWk;8ihS$_<#q_FJufQO~694<@@^1oe1q3dN-Lv}Bsu2({# z)s{|OW=zoi?cm7TObR9L-)F8EPcTqybRz}nUTy@9O0UW4lPH|u{#$wqi_M}mGCz-_ zU>M^1e2W*sit2H}#xWFP<<)rZ3)v*|HoGVy@#d6nhZbNMXa)u0B4dXt*}fb=(=9Vt$4Zs z4Q0C7Q_=|Tf5Qk;2@o0`Q!sujK@rw!2i9-UW&dg0*?r?L%q*WM0Ar){+D?MIYOGpq z%>*cz!7}p*N;sGZkkiTpT}Y5*&C2~nM*xEZQ}4!XWBH2?KZ<0rOMi`V3F!pAM8WqJ zK=MI0!B?l5P_+b*&dnky@!qWj_stng^ef)uaYzY0y~=Eq!fGzRqS;vo!lcX?5EMj)tI7tZ^DFb3`vK+DCRJoD)6eWa-!q=DMFj3$& zJTx;|IR(g3qWdPV)?u6+`?MK4x##oHX&>=t;z&U0u!B4duL_^r#~hHU=Ju~gc&L)q zYxJEA*p<+Jt2Xt0z9*m>A0CwZ7uPTK1C;!?o`*3{b;>5LWc5;4ciJcNFxEcp(vNEZ znG5nFqIh`4#z0m!;FwE#=T1cPuy>t@^Nu3GvtexD`0#LBr5WAtG9W|Wur7dyA4Fmr z0oR(J-cV@7gJ@sVcYu<=hVYQG^VOuL-XF0158D;YCSU9D!1@v)PyEy@?wKp%uFIDA z^!!g>d|{@*)TgWD*7XY5P1)qM`VdQYpR2&1+4wq`rhtGG&P+kP+ONe5kofZ8)$=V- z0nFVYCl`E(&oMd`5jF4%YI{;jx@a=jb2>XnE^e9@@`i jI~(5*4HdBWS(WSjN*<-YuK-ASc}f&z8P^8T^E>n}H0=)Z*&MjhSnM`M&CLP3 Zb`((~1_s6l3=B+SK+zpQ`Vx@t002%?6tVyS diff --git a/pygmt/tests/test_plot.py b/pygmt/tests/test_plot.py index 823302e36f2..d72b02df250 100644 --- a/pygmt/tests/test_plot.py +++ b/pygmt/tests/test_plot.py @@ -545,10 +545,10 @@ def test_plot_ogrgmt_file_multipoint_non_default_style(): @pytest.mark.mpl_image_compare def test_plot_shapefile(): """ - Make sure that plot works for shape file. + Make sure that plot works for shapefile. See https://github.com/GenericMappingTools/pygmt/issues/1616. """ fig = Figure() - fig.plot(data=os.path.join(TEST_DATA_DIR, "RidgeTest.shp"), pen="1p") + fig.plot(data="@RidgeTest.shp", pen="1p") return fig From a461183f92ccfafa00d0e9c4abf370d60113841e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 27 Feb 2022 15:17:16 +0800 Subject: [PATCH 04/10] Cache files --- pygmt/helpers/testing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pygmt/helpers/testing.py b/pygmt/helpers/testing.py index 2b57b8e37e1..a398f3c30d5 100644 --- a/pygmt/helpers/testing.py +++ b/pygmt/helpers/testing.py @@ -172,6 +172,10 @@ def download_test_data(): # Other cache files "@EGM96_to_36.txt", "@MaunaLoa_CO2.txt", + "@RidgeTest.shp", + "@RidgeTest.shx", + "@RidgeTest.dbf", + "@RidgeTest.prj", "@Table_5_11.txt", "@Table_5_11_mean.xyz", "@fractures_06.txt", From 4c6e3c0bf4043b1125792870b648cc2800900232 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 27 Feb 2022 15:17:58 +0800 Subject: [PATCH 05/10] Enable data cache workflow in PR --- .github/workflows/cache_data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 38ae7be8d18..deb3f3e0737 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -3,7 +3,7 @@ name: Cache data on: # Uncomment the 'pull_request' line below to manually re-cache data artifacts - # pull_request: + pull_request: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0' From 47ea523e4726823ef0b41956c556c2e74fb498bd Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 27 Feb 2022 15:18:56 +0800 Subject: [PATCH 06/10] Remove RidgeTest.gmt --- pygmt/tests/data/RidgeTest.gmt | 105 --------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 pygmt/tests/data/RidgeTest.gmt diff --git a/pygmt/tests/data/RidgeTest.gmt b/pygmt/tests/data/RidgeTest.gmt deleted file mode 100644 index 1da6365aab4..00000000000 --- a/pygmt/tests/data/RidgeTest.gmt +++ /dev/null @@ -1,105 +0,0 @@ -# @VGMT1.0 @GLINESTRING -# @R-39.5848/-28.3229/33.0656/44.3014 -# @Je4326 -# @Jp"+proj=longlat +datum=WGS84 +no_defs " -# @Jw"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]" -# @NPLATEID1|GPGIM_TYPE|TYPE|FROMAGE|TOAGE|NAME|DESCR|FEATURE_ID|PLATEID2|L_PLATE|R_PLATE|RECON_METH|SPREAD_ASY|REGION_NO|REF_NO|STRING_NO|TYPE_NO|TYPE_NO_AD|COLOUR|NPOINTS -# @Tdouble|string|string|double|double|string|string|string|double|double|double|string|double|double|double|double|double|string|double|double -# FEATURE_DATA -> -# @D101|gpml:MidOceanRidge|RI|0.000000000000000|-999.000000000000000|"Reykjanes"||GPlates-1389768d-90d9-42e8-95fa-5b441c7fb297|304|0|0||0.000000000000000|92|1|7|1||5|57 --28.3229 44.3014 --28.371 44.1811 --28.4257 44.199 --28.4434 44.1443 --28.4463 44.0954 --28.4735 44.0269 --28.4886 43.9327 --28.5103 43.8392 --28.5286 43.7624 --28.7955 43.7719 --28.8334 43.6971 --28.8841 43.626 --28.9364 43.4911 --29.0063 43.3874 --29.0994 43.2097 --29.1737 43.077 --29.3101 43.0849 --29.3108 43.0237 --29.3264 42.9539 --29.3505 42.8359 --29.3758 42.7278 --29.3147 42.7148 --29.3218 42.6737 --29.3402 42.6067 --29.36 42.53 --29.3897 42.415 --29.4283 42.2861 --29.2223 42.2888 --29.2285 42.233 --29.2442 42.1805 --29.2445 42.0824 --29.2612 41.9269 --29.1583 41.9123 --29.1967 41.803 --29.2144 41.6796 --29.247 41.5257 --29.2837 41.3845 --29.3199 41.2457 --29.2247 41.2098 --29.2391 41.1228 --29.2591 40.9825 --29.2778 40.869 --29.3081 40.7027 --29.3399 40.5659 --29.5671 40.5991 --29.5711 40.5529 --29.5749 40.4674 --29.5949 40.3809 --29.6282 40.2908 --29.6382 40.2059 --29.6535 40.1068 --29.58 40.1051 --29.588 40.0739 --29.6102 40.0342 --29.6087 39.9929 --29.762 39.3973 --29.9062 39.3866 -> -# @D101|gpml:MidOceanRidge|RI|0.000000000000000|-999.000000000000000|"Klitgord"||GPlates-53da72c0-30ba-4fee-9240-df8468b1c915|714|0|0||0.000000000000000|91|1|10|1||5|20 --29.9062 39.3866 --30.4279 38.387 --30.6063 38.3996 --31.0731 37.6793 --31.3683 37.7048 --31.5147 37.2837 --32.2698 37.375 --32.2971 37.4118 --32.3909 37.1394 --32.6448 37.176 --32.7066 37.0349 --32.9468 37.0643 --33.0039 36.9175 --33.2235 36.9432 --33.3173 36.6931 --33.5941 36.741 --33.7725 36.1848 --33.9852 36.22 --34.0539 36.0716 --34.174 36.103 -> -# @D101|gpml:MidOceanRidge|RI|0.000000000000000|-999.000000000000000|"Dietmar"||GPlates-0067db63-b172-42e9-9020-fbca230de033|714|0|0||0.000000000000000|91|1|11|1||5|14 --34.174 36.103 --34.294 35.736 --34.414 35.736 --34.745 35.146 --36.336 35.368 --36.637 34.751 --36.787 34.751 --36.877 34.552 --37.057 34.577 --37.237 34.154 --37.357 34.179 --37.628 33.603 --39.279 33.879 --39.5848 33.0656 From 67c58e5b71f78954d3c8cfb0366e19b1b555c937 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 27 Feb 2022 15:35:03 +0800 Subject: [PATCH 07/10] Disable cache data workflow in PR --- .github/workflows/cache_data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index deb3f3e0737..38ae7be8d18 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -3,7 +3,7 @@ name: Cache data on: # Uncomment the 'pull_request' line below to manually re-cache data artifacts - pull_request: + # pull_request: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0' From b4e2583369d85784cd75fd1aca9798b621f526e9 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 28 Feb 2022 20:17:16 +0800 Subject: [PATCH 08/10] Fix formatting --- pygmt/tests/test_plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/tests/test_plot.py b/pygmt/tests/test_plot.py index 56b39f81bf6..629935a047f 100644 --- a/pygmt/tests/test_plot.py +++ b/pygmt/tests/test_plot.py @@ -552,8 +552,8 @@ def test_plot_shapefile(): fig = Figure() fig.plot(data="@RidgeTest.shp", pen="1p") return fig - - + + def test_plot_dataframe_incols(): """ Make sure that the incols parameter works for pandas.DataFrame. From 8c617b3c3e8739d60723ec9177490d1a6378c590 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 1 Mar 2022 08:16:29 +0800 Subject: [PATCH 09/10] Trigger data cache in PR --- .github/workflows/cache_data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 38ae7be8d18..deb3f3e0737 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -3,7 +3,7 @@ name: Cache data on: # Uncomment the 'pull_request' line below to manually re-cache data artifacts - # pull_request: + pull_request: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0' From 3712edca6a6a38a3ce1c23eb58d126dc21043411 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 1 Mar 2022 08:56:23 +0800 Subject: [PATCH 10/10] Disable data cache in PR --- .github/workflows/cache_data.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index deb3f3e0737..38ae7be8d18 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -3,7 +3,7 @@ name: Cache data on: # Uncomment the 'pull_request' line below to manually re-cache data artifacts - pull_request: + # pull_request: # Schedule runs on 12 noon every Sunday schedule: - cron: '0 12 * * 0'