Skip to content

WIP: Refactor test_basemap_polar to use mpl_image_compare and track png files in dvc #1071

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

Closed
wants to merge 26 commits into from

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 17, 2021

Testing #1036.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

weiji14 and others added 24 commits March 11, 2021 23:19
Adding dvc package to environment.yml and
running `dvc init` to get the barebones
.dvcignore, .dvc/config & .dvc/.gitignore files.
Technically the order shouldn't matter, but most
tutorials seem to use `git push` first so follow that.
@seisman seisman force-pushed the fix-test-basemap-polar branch from 28fa478 to 901733c Compare March 18, 2021 02:30
@weiji14
Copy link
Member

weiji14 commented Mar 18, 2021

I just added a new image to my testing branch (commit b8bdb7c in #1071). However, I can't preview the image in DAGsHub: https://dagshub.com/GenericMappingTools/pygmt/src/fix-test-basemap-polar/pygmt/tests/baseline

Did you do dvc push successfully? Maybe try the sync button at the top of the page?

@seisman
Copy link
Member Author

seisman commented Mar 18, 2021

Did you do dvc push?

Yes, I already did the dvc push, and it said one file is pushed. So the CI test should work (but it will fail because I generated the image using GMT 6.2.0).

Maybe try the sync button at the top of the page?

I'm afraid we have to push the sync button to preview the image. Not sure if our collaborators can also push the button.

@seisman
Copy link
Member Author

seisman commented Mar 18, 2021

Did you do dvc push?

Yes, I already did the dvc push, and it said one file is pushed. So the CI test should work (but it will fail because I generated the image using GMT 6.2.0).

The image is correctly downloaded using dvc pull. The tests all pass, perhaps there are no changes for this image between GMT 6.1.1 and GMT 6.2.0

Maybe try the sync button at the top of the page?

I'm afraid we have to push the sync button to preview the image. Not sure if our collaborators can also push the button.

Did you push the sync button? I don't, but now I can preview the image (about 10 minutes after I run the dvc push command):

image

@weiji14
Copy link
Member

weiji14 commented Mar 18, 2021

Did you push the sync button? I don't, but now I can preview the image (about 10 minutes after I run the dvc push command):

Yeah I pushed it. I thought you did but didn't see anything when I refreshed the page, so I just pressed it...

Maybe try the sync button at the top of the page?

I'm afraid we have to push the sync button to preview the image. Not sure if our collaborators can also push the button.

They should be able to push the button, that DAGsHub repo is just a clone of the GitHub repo so shouldn't have any permissions issue (all public anyway).

Another way I've thought about to preview the image is to use cml-publish at https://github.com/iterative/setup-cml to publish the image diff as a GitHub comment in the PR. It's originally intended for tracking machine learning graphs but I think there's a way to hack it to work for our image testing use case. But 1) should finish #1037 first and 2) this will need some experimenting.

@seisman
Copy link
Member Author

seisman commented Mar 18, 2021

They should be able to push the button, that DAGsHub repo is just a clone of the GitHub repo so shouldn't have any permissions issue (all public anyway).

OK. At least we can pull the images and review them.

Base automatically changed from data_version_control to master March 18, 2021 03:57
@weiji14 weiji14 added the maintenance Boring but important stuff for the core devs label Mar 18, 2021
@seisman seisman closed this Mar 22, 2021
@seisman seisman deleted the fix-test-basemap-polar branch March 22, 2021 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants