posit-dev / posit-dev/positron
Add a Python "code action" to generate a docstring for a Python function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
Originally posted by @Mkranj in https://github.com/posit-dev/positron/discussions/10506:
in the Edit pane. Similar to Rstudio's "Insert Roxygen Skeleton", I'd love to see that replicated for R code, and a similar docstring being created for Python code.
The syntax to be used (R or Python) could be gleaned from the current file extension.
We used a code action to do this in R in https://github.com/posit-dev/ark/pull/809, and I think it would be best to access that functionality available in a similar way.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Edit pane's code-action integration and review the code-actions approach described in posit-dev/ark#809. Use the current file extension to determine Python syntax, and consider the work complete when a Python function can invoke an action that generates its docstring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, r, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100