Skip to content

Remove the pygmt.test function from pygmt/__init__.py? #2633

@seisman

Description

@seisman

The pygmt/__init__.py file provides a test function:

def test(doctest=True, verbose=True, coverage=False, figures=True):

With this test function, users can run pygmt.test() to run the full tests.

I think we should remove this function based on the following reasons:

  1. The function was first added in commit ef1fa9c in 2017, and there is almost no changes/maintenance since then (https://github.com/GenericMappingTools/pygmt/blame/main/pygmt/__init__.py#L187).
  2. The pygmt.test() is useless for regular users, because the baseline images hosted by DVC are not available in regular pip/conda packages.
  3. For PyGMT maintainers, the Makefile provides more powerful targets like test/fulltest/doctest/test_no_images to test PyGMT, and no one has used pygmt.test before.
  4. The pygmt.test() function is not documented in the current documentation, so removing it won't cause any backward-incompatibility. Related PR: Remove "Full test" section from the installation guide #1200

Let's have a vote: 👍 for removing it and 👎 for keeping it. Or you can leave your thoughts/comments here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions