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.coast tests to dvc #1103

Merged
merged 29 commits into from
Mar 30, 2021
Merged

Migrate Figure.coast tests to dvc #1103

merged 29 commits into from
Mar 30, 2021

Conversation

willschlitzer
Copy link
Contributor

@willschlitzer willschlitzer commented Mar 22, 2021

Changing the tests in test_coast.py to use dvc and mpl_image_compare. An update/fix to #1102.

Related to #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

@willschlitzer willschlitzer marked this pull request as ready for review March 22, 2021 22:25
pygmt/tests/test_coast.py Outdated Show resolved Hide resolved
pygmt/tests/test_coast.py Outdated Show resolved Hide resolved
@weiji14 weiji14 added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Mar 23, 2021
…arameters already tested in test_coast_aliases()
@seisman
Copy link
Member

seisman commented Mar 25, 2021

The coast wrapper is very simple and only has a few lines of codes.

As documented in the contributing guides,

The highest priority for tests should be the Python-specific code, such as numpy, pandas, and xarray objects and the virtualfile mechanism.

I feel some of the tests are unnecessary. Tests for a global map, a regional map, a map using dcw should be enough.

Edit: IMHO, only the following tests are needed:

  • test_coast_iceland
  • test_coast_world_mercator
  • test_coast_required_args
  • test_coast_dcw_single
  • test_coast_dcw_list

@seisman seisman added this to the 0.4.0 milestone Mar 25, 2021
@willschlitzer
Copy link
Contributor Author

The coast wrapper is very simple and only has a few lines of codes.

As documented in the contributing guides,

The highest priority for tests should be the Python-specific code, such as numpy, pandas, and xarray objects and the virtualfile mechanism.

I feel some of the tests are unnecessary. Tests for a global map, a regional map, a map using dcw should be enough.

Edit: IMHO, only the following tests are needed:

  • test_coast_iceland

  • test_coast_world_mercator

  • test_coast_required_args

  • test_coast_dcw_single

  • test_coast_dcw_list

Sounds good! I'll shorten it down.

@willschlitzer
Copy link
Contributor Author

@seisman @weiji14 I removed the tests that we deemed not needed and deleted the .dvc files; do I have to do anything else to fully remove these tests?

pygmt/tests/test_coast.py Outdated Show resolved Hide resolved
pygmt/tests/test_coast.py Show resolved Hide resolved
pygmt/tests/test_coast.py Show resolved Hide resolved
pygmt/tests/test_coast.py Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Mar 30, 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_coast_dcw_list.png
added pygmt/tests/baseline/test_coast_dcw_single.png
added pygmt/tests/baseline/test_coast_region.png
added pygmt/tests/baseline/test_coast_world_mercator.png

Image diff(s)

  • pygmt/tests/baseline/test_coast_dcw_list.png

  • pygmt/tests/baseline/test_coast_dcw_single.png

  • pygmt/tests/baseline/test_coast_region.png

  • pygmt/tests/baseline/test_coast_world_mercator.png

Report last updated at commit 82cd7f0

@seisman seisman merged commit c280711 into master Mar 30, 2021
@seisman seisman deleted the test-coast-dvc branch March 30, 2021 15:07
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.

3 participants