Title: [TST]: increase unit test coverage · Issue #26864 · matplotlib/matplotlib · GitHub
Open Graph Title: [TST]: increase unit test coverage · Issue #26864 · matplotlib/matplotlib
X Title: [TST]: increase unit test coverage · Issue #26864 · matplotlib/matplotlib
Description: 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 te...
Open Graph Description: 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 thi...
X Description: 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 thi...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26864
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[TST]: increase unit test coverage ","articleBody":"# Problem\n\nAlthough 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.\n\nThis is the tracking issue for this work.\n\n# Process\n\n1. 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.\n2. Select a method to work on (for GHC OSD we will use slack and zoom to make sure we de-conflict!)\n3. 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.\n 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 #26859.\n 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.\n 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.\n\n# Task list\n\n - [x] `Axes.acorr` #27427\n - [x] ~`Axes.angle_spectrum`~\n - [x] `Axes.annotate` #27222\n - [ ] `Axes.arrow` #27372\n - [x] `Axes.axhline` #27177\n - [x] `Axes.axhspan` #27139\n - [ ] `Axes.axline` #27326\n - [x] `Axes.axvline` #27208\n - [x] `Axes.axvspan` #27130 \n - [x] `Axes.bar` #27033\n - [x] `Axes.bar_label` #27431\n - [x] `Axes.barbs` #27331\n - [x] `Axes.barh` #27084\n - [ ] `Axes.boxplot` #27038\n - [x] `Axes.broken_barh` #27428\n - [x] `Axes.bxp` #27390\n - [ ] `Axes.clabel` #27490\n - [ ] ~`Axes.cohere`~\n - [x] `Axes.contour` #27013\n - [x] `Axes.contourf` #27024\n - [x] ~`Axes.csd`~\n - [x] `Axes.errorbar` #27185\n - [x] `Axes.eventplot` #27466\n - [x] `Axes.fill` #27401\n - [x] `Axes.fill_between` #27423 \n - [x] `Axes.fill_betweenx`#27425\n - [ ] `Axes.hexbin` #27475\n - [x] `Axes.hist` #27028\n - [ ] `Axes.hist2d` #27418\n - [x] `Axes.hlines` #27211\n - [x] `Axes.imshow` #27476\n - [ ] `Axes.loglog` #27435\n - [x] ~`Axes.magnitude_spectrum`~\n - [x] `Axes.matshow` #27474 \n - [ ] `Axes.pcolor` #27391\n - [ ] `Axes.pcolorfast` #27450\n - [ ] `Axes.pcolormesh` #27433 \n - [x] ~`Axes.phase_spectrum`~\n - [x] `Axes.pie` #27117\n - [x] `Axes.plot`\n - [x] `Axes.plot_date` #27037\n - [x] ~`Axes.psd`~\n - [ ] `Axes.quiver` #27407\n - [x] `Axes.quiverkey` #27449\n - [x] `Axes.scatter` #26882\n - [ ] `Axes.semilogx` #27320\n - [ ] `Axes.semilogy` #27320\n - [x] ~`Axes.specgram`~\n - [x] ~`Axes.spy`~ #27392\n - [x] `Axes.stackplot` #27114\n - [x] `Axes.stairs`#27424\n - [x] `Axes.stem` #27135\n - [x] `Axes.step` #27091 \n - [ ] `Axes.streamplot` #27489\n - [x] ~`Axes.table`~\n - [x] `Axes.text` #27142\n - [ ] `Axes.tricontour` #27494\n - [ ] `Axes.tricontourf` #27487\n - [ ] `Axes.tripcolor` #27491\n - [ ] `Axes.triplot` #27488\n - [x] `Axes.violin` #30384\n - [ ] `Axes.violinplot` #27521\n - [x] `Axes.vlines` #27410\n - [x] `Axes.xcorr` #27427\n","author":{"url":"https://github.com/tacaswell","@type":"Person","name":"tacaswell"},"datePublished":"2023-09-21T21:45:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":67},"url":"https://github.com/26864/matplotlib/issues/26864"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b0f7a626-16bf-de2c-dc55-eb076ecb7d95 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 969A:28C211:37BB29:4BCDEC:6A5142A0 |
| html-safe-nonce | a72f2bca2a11259c5b0ff2aea83ce3906a615a3e946b2a98244ddaf3b7fe42a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjlBOjI4QzIxMTozN0JCMjk6NEJDREVDOjZBNTE0MkEwIiwidmlzaXRvcl9pZCI6IjM4MDI5MzE1NDUwOTE2ODcwNzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1d15fc1f95a3454bdfe77a561f43b8fc0edbc24f5f87c4ae10b391ab517f7f02 |
| hovercard-subject-tag | issue:1907811394 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/26864/issue_layout |
| twitter:image | https://opengraph.githubassets.com/18c28b30e86e5d6258571e6f21bb14b485975a8305e02e2b18c32b3fa548cf9a/matplotlib/matplotlib/issues/26864 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/18c28b30e86e5d6258571e6f21bb14b485975a8305e02e2b18c32b3fa548cf9a/matplotlib/matplotlib/issues/26864 |
| og:image:alt | 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 thi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tacaswell |
| hostname | github.com |
| expected-hostname | github.com |
| None | e840f405b2718e8f2d55aafa9ff27dbce17e29d0c253011d05ea0fea3c78baff |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b78565f6aa43cc5323c9935ec11b22cca7bb0a62 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width