Skip to content

[TST]: increase unit test coverage  #26864

Open

Description

@tacaswell

Problem

Although we nominally support units through all of our plotting APIs, this is not through tested (unfortunately this is a case where code coverage is not super informative). The address this issue we would like to add a "smoke test" (does it run without smoke coming out?) of every plotting method using "unit-full" data. The most common "unit-full" data is likely datetime, thus we are going to use datetime and timedelta values as the vehicle to exhaustively test which of the methods correctly handle units.

This is the tracking issue for this work.

Process

  1. Fork Matplotlib and get set up for development. See https://matplotlib.org/devdocs/devel/contribute.html#contribute-code for detailed instructions of setting up a local or codespaces development environment. For this work it is not strictly necessary to have a development version of Matplotlib installed, just an up-to-date installation (mpl 3.8.0) as the tested behavior should be stable.
  2. Select a method to work on (for GHC OSD we will use slack and zoom to make sure we de-conflict!)
  3. Develop a short example that exercises passing dates or time deltas into the plotting methods. Try to exercise as many of the inputs (and their combinations) as practical with the datetimes.
    1. If you have a working example open a Pull request adding the example as a body to the correct test method in lib/matplotlib/tests/test_datetime.py. Please include an image of the generated plot in the description of the PR and cross reference this issue (by including #26864 in the PR description body). This is modeled for ax.plot (I took the easiest one ;) ) in Add datetime testing skeleton #26859.
    2. If you find a method that should support datetime input but does not, open a new bug with the broken code and similarly reference this issue.
    3. If passing datetime / united data to the method does not make any sense or it should not work open a PR removing that test method and similarly reference this issue.

Task list

Activity

  1. added this to the v3.9.0 milestone on Sep 21, 2023
  2. github-actions commented on Sep 21, 2023

    @github-actions

    Good first issue - notes for new contributors

    This issue is suited to new contributors because it does not require understanding of the Matplotlib internals. To get started, please see our contributing guide.

    We do not assign issues. Check the Development section in the sidebar for linked pull requests (PRs). If there are none, feel free to start working on it. If there is an open PR, please collaborate on the work by reviewing it rather than duplicating it in a competing PR.

    If something is unclear, please reach out on any of our communication channels.

  3. seohyeonlee2020 commented on Sep 22, 2023

    @seohyeonlee2020
    Contributor

    Hello! I'll take Axes.scatter

  4. tgmiller5 commented on Oct 1, 2023

    @tgmiller5

    Hello, I will take the axes.bar

  5. ayushrathore111 commented on Oct 3, 2023

    @ayushrathore111

    hii @tacaswell
    I'll start working on Axes.boxplot.
    thank you.

  6. ksunden commented on Oct 3, 2023

    @ksunden
    Member

    Note we are testing matplotlib unit support here, so please use numpy/matplotlib/datetime only in these tests (e.g. not pandas)

  7. kots14 commented on Oct 4, 2023

    @kots14
    Contributor

    Hi @tacaswell
    I'm starting to work on Axes.contour.

  8. Quetzalcoatl29 commented on Oct 5, 2023

    @Quetzalcoatl29

    Hi @tacaswell I'd like to be assigned on one or more tasks

  9. rcomer commented on Oct 5, 2023

    @rcomer
    Member

    Hi @Quetzalcoatl29, we do not assign tasks. Please work on whichever one you like. If you comment to say which you are starting on, as others have done, then that will help to prevent duplication of effort.

  10. 58 remaining items

  11. EthanZheng11 commented on Dec 9, 2023

    @EthanZheng11

    I will work on Axes.tricontourf.

  12. jhimanish commented on Dec 10, 2023

    @jhimanish

    Hi, I'm new to Open-Source Contributions but I'd like to contribute towards this project. I can work on creating a test for axes.streamplot.
    Thank you

  13. added 2 commits that reference this issue on Dec 10, 2023
  14. ksunden commented on Dec 11, 2023

    @ksunden
    Member

    I do believe we now have PRs (at least) opened for each of these.

    Thank you to all of the first time contributors who helped get us this far.

  15. Elllllllvin commented on Dec 20, 2023

    @Elllllllvin

    Hello , I would like to tackle the Axes.quiver if you don't mind, since i notice that it has not been solved yet.

  16. ksunden commented on Dec 20, 2023

    @ksunden
    Member

    Please note that we have an open PR for Quiver, and we generally prefer the earlier PR when possible. #27407

  17. removed
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Dec 20, 2023
  18. ksunden commented on Dec 20, 2023

    @ksunden
    Member

    I'm removing the good first issue tag because we have PRs at least started for all points here.

  19. Elllllllvin commented on Dec 20, 2023

    @Elllllllvin

    Please note that we have an open PR for Quiver, and we generally prefer the earlier PR when possible. #27407

    Thank you for your reply. I just noticed that the previous #27407 did not fully solve the problem. It only tested X and did not test Y, and the previous pull request has not been merged, so I thought I could continue to contribute to this issue.

  20. modified the milestones: v3.9.0, v3.10.0 on Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions