Title: Clean up wrappers and append wrapper docs to matplotlib docs · Issue #43 · proplot-dev/proplot · GitHub
Open Graph Title: Clean up wrappers and append wrapper docs to matplotlib docs · Issue #43 · proplot-dev/proplot
X Title: Clean up wrappers and append wrapper docs to matplotlib docs · Issue #43 · proplot-dev/proplot
Description: This is a follow-up to #37 and #42. I think my current approach of documenting wrappers separately from the functions to which they apply is very cumbersome and confusing for new users (many of whom don't really know what a "wrapper" is)...
Open Graph Description: This is a follow-up to #37 and #42. I think my current approach of documenting wrappers separately from the functions to which they apply is very cumbersome and confusing for new users (many of who...
X Description: This is a follow-up to #37 and #42. I think my current approach of documenting wrappers separately from the functions to which they apply is very cumbersome and confusing for new users (many of who...
Opengraph URL: https://github.com/proplot-dev/proplot/issues/43
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Clean up wrappers and append wrapper docs to matplotlib docs","articleBody":"This is a follow-up to #37 and #42.\r\n\r\nI think my current approach of documenting wrappers separately from the functions to which they apply is very cumbersome and confusing for new users (many of whom don't really know what a \"wrapper\" is). The old approach stems only from a lack of imagination.\r\n\r\nA better approach would be to:\r\n\r\n1. Concatenate call signatures, parameter tables, and header descriptions from the wrappers and the original matplotlib documentation. When users call `help(ax.plot)`, they get usage info for the wrappers *and* the matplotlib method. Would look something like this:\r\n\r\n```less\r\nHelp on function plot in module proplot.axes\r\n\r\nplot(self, ...) # concatenated call signature from wrappers and matplotlib\r\n -----------------------\r\n ProPlot documentation\r\n -----------------------\r\n Summary. Wrapper 1 summary. Wrapper 2 summary. ... Wrapper N summary.\r\n\r\n Parameters # concatenated parameter table\r\n ----------\r\n ...params from wrapper1\r\n ...params from wrapper2\r\n ...\r\n ...params from wrapperN\r\n\r\n --------------------------\r\n Matplotlib documentation\r\n --------------------------\r\n Original docstring placed here in its entirety.\r\n```\r\n\r\n2. Add an option to my `sphinx-automodapi` fork that *removes* the matplotlib parameters when concatenating parameter tables. Matplotlib has some funky local sphinx extensions that will get messed up -- and anyway we don't want to copy their documenation onto our website. Would look something like this:\r\n\r\n```less\r\nplot(self, ...) # concatenated call signature\r\n Summary. Wrapper 1 summary. Wrapper 2 summary. ... Wrapper N summary.\r\n\r\n Parameters\r\n -----------\r\n ...params from wrapper1\r\n ...params from wrapper2\r\n ...\r\n ...params from wrapperN\r\n\r\n Other parameters\r\n ----------------\r\n *args, **kwargs\r\n Passed to \u003cmatplotlib native function\u003e.\r\n\r\n```\r\n\r\nThis will have the following implications:\r\n\r\n* All wrapper-related features will be documented as `Axes` class methods. There will no longer be a `Functions` table in the `Axes classes and related wrappers` section of the online documentation.\r\n* Method-specific wrappers like `plot_wrapper` will be defined directly on the `Axes` with `def plot`.\r\n* \"Bulk\" wrappers like `standardize_1d` will be hidden and *no longer documented explicitly *-- they will only be documented on the individual methods to which they apply.\r\n* \"Bulk\" wrappers can be easily split up into separate functions, helping eliminate method-specific behavior inside the wrappers, e.g. the `if name == 'contour'` statements inside of `cmap_features`.\r\n\r\nThis will be tricky but I think it is really necessary to reduce new user confusion. It also has the added benefit of making it easier to merge features with matplotlib if matplotlib developers feel so inclined.\r\n\r\nIt should involve borrowing from matplotlib's `docstring.py` file and using the `inspect.getdoc` and `inspect.signature` functions (for the latter see [this post](https://stackoverflow.com/a/33112180/4970632)).","author":{"url":"https://github.com/lukelbd","@type":"Person","name":"lukelbd"},"datePublished":"2019-09-15T22:48:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/43/proplot/issues/43"}
| 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:a8eb1bde-8982-2a36-93e7-4ce8c3c7aa79 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A384:EDC08:127AA39:17AA3E6:697DFD7B |
| html-safe-nonce | d13103be6a6fba47928895af08d74d1afc2d890dff5653027b74c9aac8203abb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzg0OkVEQzA4OjEyN0FBMzk6MTdBQTNFNjo2OTdERkQ3QiIsInZpc2l0b3JfaWQiOiI1MzIzNTM2NjQwMDI1NDI3MzIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9e0f8a126337987ec100ee8778ca5aae6b689a37a8725f7fa6e9c13673c1d327 |
| hovercard-subject-tag | issue:493796019 |
| 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/proplot-dev/proplot/43/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca9825d61cddc983aae45c74c87d3c62715026dd0e60fd2b98ac9293ee3e379d/proplot-dev/proplot/issues/43 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca9825d61cddc983aae45c74c87d3c62715026dd0e60fd2b98ac9293ee3e379d/proplot-dev/proplot/issues/43 |
| og:image:alt | This is a follow-up to #37 and #42. I think my current approach of documenting wrappers separately from the functions to which they apply is very cumbersome and confusing for new users (many of who... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lukelbd |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/proplot-dev/proplot git https://github.com/proplot-dev/proplot.git |
| octolytics-dimension-user_id | 108025793 |
| octolytics-dimension-user_login | proplot-dev |
| octolytics-dimension-repository_id | 113293661 |
| octolytics-dimension-repository_nwo | proplot-dev/proplot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 113293661 |
| octolytics-dimension-repository_network_root_nwo | proplot-dev/proplot |
| 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 | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width