Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[TST]: increase unit test coverage #26864

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

Open
43 of 64 tasks
tacaswell opened this issue Sep 21, 2023 · 67 comments
Open
43 of 64 tasks

[TST]: increase unit test coverage #26864

tacaswell opened this issue Sep 21, 2023 · 67 comments

Comments

@tacaswell
Copy link
Member

tacaswell commented Sep 21, 2023

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

@tacaswell tacaswell added mentored: hackathon Good first issue Open a pull request against these issues if there are no active ones! labels Sep 21, 2023
@tacaswell tacaswell added this to the v3.9.0 milestone Sep 21, 2023
@github-actions
Copy link

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.

@seohyeonlee2020
Copy link
Contributor

Hello! I'll take Axes.scatter

@tgmiller5
Copy link

Hello, I will take the axes.bar

@ksunden ksunden mentioned this issue Oct 3, 2023
5 tasks
@ayushrathore111
Copy link

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

@ksunden
Copy link
Member

ksunden commented Oct 3, 2023

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

@kots14
Copy link
Contributor

kots14 commented Oct 4, 2023

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

@Quetzalcoatl29
Copy link

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

@rcomer
Copy link
Member

rcomer commented Oct 5, 2023

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.

kots14 added a commit to kots14/matplotlib that referenced this issue Oct 6, 2023
kots14 added a commit to kots14/matplotlib that referenced this issue Oct 6, 2023
kots14 added a commit to kots14/matplotlib that referenced this issue Oct 6, 2023
@kots14
Copy link
Contributor

kots14 commented Oct 6, 2023

I'll be working on Axes.contourf next once this PR is merged.
Update: Since the previous PR is approved, without waiting further, raised another PR for contourf.

@yangyangdotcom
Copy link
Contributor

I will work on Axes.hist

Eben-Success added a commit to Eben-Success/matplotlib that referenced this issue Oct 7, 2023
@yangyangdotcom
Copy link
Contributor

I am able to write the test and run it with no failure but I am having a problem generating the graph. I tried adding plt.show() at the end of my test but that will make the test fail. Any help would be much appreciated.

kots14 added a commit to kots14/matplotlib that referenced this issue Oct 7, 2023
kots14 added a commit to kots14/matplotlib that referenced this issue Oct 7, 2023
kots14 added a commit to kots14/matplotlib that referenced this issue Oct 7, 2023
kots14 added a commit to kots14/matplotlib that referenced this issue Oct 7, 2023
@AsherHounsell
Copy link

I will work on Axes.triplot.

@EthanZheng11
Copy link

I will work on Axes.tricontourf.

@jhimanish
Copy link

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

@ksunden
Copy link
Member

ksunden commented Dec 11, 2023

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.

@Elllllllvin
Copy link

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

@ksunden
Copy link
Member

ksunden commented Dec 20, 2023

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

@ksunden ksunden removed the Good first issue Open a pull request against these issues if there are no active ones! label Dec 20, 2023
@ksunden
Copy link
Member

ksunden commented Dec 20, 2023

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

@Elllllllvin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.