Skip to content

Clarify required dependencies to run unit tests #1697

@weiji14

Description

@weiji14

Description of the desired feature

Originally posted by @SimonMolinsky in pyOpenSci/software-submission#43 (comment)

  • [ ] Automated tests: Tests cover essential functions of the package and a reasonable range of inputs and conditions. All tests pass on the local machine.

Yes, the test coverage is 99% and pyGMT has a description of tests in Contributing Guide. But I have two comments here:

  1. For full test coverage you need to install not only pytest but pytest-mpl and sphinx-gallery too. Those information are presented in the documentation here but in different paragraphs. Maybe it is a good idea to rewrite this part of documentation slightly and present list of all additional packages needed for testing?
  2. The other problem is more confusing. When I run all tests then I got results with 2/3 of tests passing but there is 1/3 that fail. When I look into the test output I see a text This is expected for new tests. So I run test again and I see the same communicate. It is extremely misleading, especially for contributors - if I create new functionalities and run all tests to check if everything is ok I must manually check each failed test if it has phrase This is expected for new tests. Did I miss something?

Looks like we'll need to include a list of the test dependencies in the contributing documentation rather than hide it in https://github.com/GenericMappingTools/pygmt/blob/main/environment.yml

E.g. make a list like:

  • pytest-mpl
  • sphinx-gallery
  • dvc
  • etc

Are you willing to help implement and maintain this feature? Yes/No

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationhelp wantedHelping hands are appreciated

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions