CI: Fix and simplify the dvc-diff workflow#2549
Merged
Conversation
Contributor
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)DetailsAdded images
Modified images
Report last updated at commit bf5c6f6 |
Contributor
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)DetailsAdded images
Modified images
Report last updated at commit befa95b |
michaelgrund
approved these changes
May 31, 2023
weiji14
approved these changes
May 31, 2023
Member
weiji14
left a comment
There was a problem hiding this comment.
Just a small suggestion, but otherwise looks good!
pygmt/tests/test_basemap.py
Outdated
Comment on lines
+14
to
+24
| fig.basemap(region=[10, 70, -3, 8], projection="X10c/6c", frame="afg") | ||
| return fig | ||
|
|
||
|
|
||
| @pytest.mark.mpl_image_compare | ||
| def test_basemap_loglog(): | ||
| def test_basemap_added(): | ||
| """ | ||
| Create a loglog basemap plot. | ||
| Create a simple basemap plot. | ||
| """ | ||
| fig = Figure() | ||
| fig.basemap( | ||
| region=[1, 10000, 1e20, 1e25], | ||
| projection="X16cl/12cl", | ||
| frame=["WS", "x2+lWavelength", "ya1pf3+lPower"], | ||
| ) | ||
| fig.basemap(region=[10, 70, -20, 20], projection="X10c/6c", frame="afg") |
Member
There was a problem hiding this comment.
Revert changes in b7ad43b before merging
Remember to do the revert!
| body: ${{ steps.image-diff.outputs.report }} | ||
| edit-mode: replace | ||
| # create/update PR comment | ||
| cml comment update report.md |
Member
There was a problem hiding this comment.
Nice that this simplifies so many lines of code!
Comment on lines
44
to
46
| # Produce the markdown diff report, which should look like: | ||
| # ## Summary of changed images | ||
| # |
Member
There was a problem hiding this comment.
Could update the preview a little bit below here
# | Status | Path |
# |----------|-------------------------------------|
# | added | pygmt/tests/baseline/test_image.png |
# | deleted | pygmt/tests/baseline/test_image2.png |
# | modified | pygmt/tests/baseline/test_image3.png |
+
+ ## Image diff(s)
+
+ <details>
+ ...
+ </details>
+
+ Report last updated at commit abcdef
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description of proposed changes
Fix the dvc-diff workflow by setting up nodejs to v16, following the workaround in iterative/cml#1377.
The dvc-diff report was posted using
peter-evans/find-commentandpeter-evans/create-or-update-commentin the old workflow. These steps are removed and the diff report is posted using a single commandcml comment update report.md.Comment #2549 (comment) is the comment posted by the old workflow and #2549 (comment) is the comment posted by the new workflow (i.e.,
cml comment update report.md).TODO: