Skip to content

Migrate test_contour to use dvc #1146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed pygmt/tests/baseline/test_contour_from_file.png
Binary file not shown.
4 changes: 4 additions & 0 deletions pygmt/tests/baseline/test_contour_from_file.png.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
outs:
- md5: 68c12988f1bb0dbc67da560fe4d51ea2
size: 64936
path: test_contour_from_file.png
Binary file removed pygmt/tests/baseline/test_contour_matrix.png
Binary file not shown.
4 changes: 4 additions & 0 deletions pygmt/tests/baseline/test_contour_matrix.png.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
outs:
- md5: 7a8e0d23ce325cef3be12da033ab2602
size: 75839
path: test_contour_matrix.png
Binary file removed pygmt/tests/baseline/test_contour_vec.png
Binary file not shown.
4 changes: 4 additions & 0 deletions pygmt/tests/baseline/test_contour_vec.png.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
outs:
- md5: 8bae58cc9d84de9ff9c30f3d45792dc5
size: 87570
path: test_contour_vec.png
10 changes: 5 additions & 5 deletions pygmt/tests/test_contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ def test_contour_fail_no_data(data):
z=data[:, 2],
data=data,
region=region,
projection="X4i",
projection="X10c",
style="c0.2c",
color="red",
frame="afg",
pen="",
pen=True,
)


Expand All @@ -83,7 +83,7 @@ def test_contour_vec(region):
y = y.flatten()
z = (x - 0.5 * (region[0] + region[1])) ** 2 + 4 * y ** 2
z = np.exp(-z / 10 ** 2 * np.log(2))
fig.contour(x=x, y=y, z=z, projection="X4i", region=region, frame="a", pen="")
fig.contour(x=x, y=y, z=z, projection="X10c", region=region, frame="a", pen=True)
return fig


Expand All @@ -93,7 +93,7 @@ def test_contour_matrix(data, region):
Plot data.
"""
fig = Figure()
fig.contour(data=data, projection="X3i", region=region, frame="ag", pen="")
fig.contour(data=data, projection="X10c", region=region, frame="ag", pen=True)
return fig


Expand All @@ -104,6 +104,6 @@ def test_contour_from_file(region):
"""
fig = Figure()
fig.contour(
data=POINTS_DATA, projection="X4i", region=region, frame="af", pen="#ffcb87"
data=POINTS_DATA, projection="X10c", region=region, frame="af", pen="#ffcb87"
)
return fig