Rewrite docstrings
See original GitHub issueCurrently we blindly copy dask.array and dask.dataframe docstrings from NumPy and Pandas. This allows us to avoid rewriting hundreds of docstrings.
However, this fails when the dask operation and the numpy/pandas operation differ slightly, as often occurs when we support only a subset of functionality. This appears to be confusing users who inspect our documentation, try something out, and then receive an error when it doesn’t work (see this example).
There are some efforts to mitigate this, for example derived_from
takes a list of unavailable arguments to add to the docstring. However this keyword argument is virtually unused.
Some solutions
- Crowd-sourced effort to rewrite docstrings manually
- Add disclaimer to all wrapped functions that it is merely a copy
- ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:14 (10 by maintainers)
Top Results From Across the Web
Rewriting Python docstrings with a metaclass - Jessica Hamrick
Rewriting Python docstrings with a metaclass ... First (lines 32–43), we rewrite the docstrings for the functions given in attrs .
Read more >python - How to programmatically change the docstrings in a file
This is exactly what you want to do: 1- Access the docstring of every method and modify it to include the default values....
Read more >Python Docstrings (With Examples) - Programiz
Python docstrings are the string literals that appear right after the definition of a function, method, class, or module. Let's take an example....
Read more >A Python Module for intelligent reuse of docstrings — docrep ...
A Python Module for intelligent reuse of docstrings. What's this? The docrep workflow; Installation; How to add custom sections; API Reference. Disclaimer.
Read more >Python - convert docstring styles - Krystian Safjan's Blog
When refactoring the project one might want to change docstring style e.g. from numpy-style to google-style. At this point tool like Pyment ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I’ve been using dask - thanks for the work. So its time to start giving back. For start, I’m happy to work on this, #1592 and #1606 and see how I get on with. Also happy to sync with anyone already doing so.
Should put in a pr over the coming days.
Talking with @jsignell, we may want to just strip out parameters that aren’t supported by dask.
Rather than
We’d have
or put that next to the dask disclaimer.