Skip to content
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

Migrate Figure.basemap tests to dvc #1096

Merged
merged 12 commits into from
Apr 1, 2021
Merged

Migrate Figure.basemap tests to dvc #1096

merged 12 commits into from
Apr 1, 2021

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 22, 2021

Description of proposed changes

  • Remove three tests that only test the aliases
  • Rewrite two tests using mpl_image_compare
  • Rewrite tests using long-form parameters, SI units and small figure dimensions
  • Migrate images to dvc

It would be easier to review each commit separately.

Address #1131.

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

@seisman seisman changed the title Migrate Figure.basemap tests to dvc WIP: Migrate Figure.basemap tests to dvc Mar 22, 2021
…asemap_map_scale

These three tests only test the aliases, so they're useless.
@seisman seisman changed the title WIP: Migrate Figure.basemap tests to dvc Migrate Figure.basemap tests to dvc Mar 22, 2021
@seisman seisman added this to the 0.4.0 milestone Mar 22, 2021
@seisman seisman added the maintenance Boring but important stuff for the core devs label Mar 22, 2021
@seisman seisman marked this pull request as ready for review March 22, 2021 03:06
@willschlitzer
Copy link
Contributor

@seisman Do you want us to begin updating the current tests to use dvc? I spoke to @weiji14 about it and his guidance was to wait until GMT 6.2 has been released to avoid having to update the reference images.

@seisman
Copy link
Member Author

seisman commented Mar 22, 2021

@seisman Do you want us to begin updating the current tests to use dvc? I spoke to @weiji14 about it and his guidance was to wait until GMT 6.2 has been released to avoid having to update the reference images.

See my comment #963 (comment):

Do we want to do the migration before GMT 6.2.0 or after? I prefer to do the migration before v6.2.0, although it means more work for us. After bumping GMT to 6.2.0, most tests will fail due to the changes in GMT 6.2.0, but I feel it's also a good opportunity for us to learn the GMT changes and find potential bugs by comparing the images generated by GMT 6.1.1 and 6.2.0.

FYI, one week ago, I built the PyGMT documentation using GMT 6.2.0, and found several issues with the GMT dev version (GenericMappingTools/gmt#4955), and they were all fixed in less than one week!

@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed final review call This PR requires final review and approval from a second reviewer labels Mar 22, 2021
@weiji14 weiji14 added the skip-changelog Skip adding Pull Request to changelog label Mar 23, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Mar 29, 2021

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
added pygmt/tests/baseline/test_basemap.png
added pygmt/tests/baseline/test_basemap_compass.png
added pygmt/tests/baseline/test_basemap_loglog.png
added pygmt/tests/baseline/test_basemap_map_scale.png
added pygmt/tests/baseline/test_basemap_polar.png
added pygmt/tests/baseline/test_basemap_power_axis.png
added pygmt/tests/baseline/test_basemap_rose.png
added pygmt/tests/baseline/test_basemap_winkel_tripel.png

Image diff(s)

  • pygmt/tests/baseline/test_basemap.png

  • pygmt/tests/baseline/test_basemap_compass.png

  • pygmt/tests/baseline/test_basemap_loglog.png

  • pygmt/tests/baseline/test_basemap_map_scale.png

  • pygmt/tests/baseline/test_basemap_polar.png

  • pygmt/tests/baseline/test_basemap_power_axis.png

  • pygmt/tests/baseline/test_basemap_rose.png

  • pygmt/tests/baseline/test_basemap_winkel_tripel.png

Report last updated at commit 33f61b6

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to run make format.

@weiji14
Copy link
Member

weiji14 commented Apr 1, 2021

/format

1 similar comment
@seisman
Copy link
Member Author

seisman commented Apr 1, 2021

/format

@seisman
Copy link
Member Author

seisman commented Apr 1, 2021

So typing /format in the review box doesn't work.

@seisman seisman merged commit ebdb353 into master Apr 1, 2021
@seisman seisman deleted the test-basemap branch April 1, 2021 01:09
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
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 skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants