add_function docs unclear
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
The docstring for `instrument.base.add_function()` is very unclear.
In particular the Args are unclear and the Returns is unclear.
Args could be improved by adding `call_cmd` as an explicit (required) argument and explaining what it does.
It is not clear when the return of this function is ever used.
The docs of `instrument.function.function` are much clearer and seem to refer to the same thing. Exactly how this works/gets called is very opaque at the moment.
Similar things can be said about `instrument.base.add_parameter()` however I have not looked into that with as much detail.
Suggestions for improvement.
1. explicit example
2. reference to how and when it should be used
3. documentation in only one place, either in the `instrument.add_function` or in the `function.function`
4. reference the one place where the good docs are from the other place where people will look for it.
Contributor guide
Research direction
Start with the docstrings for instrument.base.add_function() and instrument.function.function, comparing their Args and Returns sections. Trace how add_function() and add_parameter() are called to confirm the role of call_cmd and when the return value is used. Done means the documentation has a clear example, explains when and how to use the functions, and cross-references a single authoritative description.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100