-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added missing docstrings to test_configs file #3194 #3205
base: dev
Are you sure you want to change the base?
Conversation
Thanks @JinHuang0101 - I'll see if we can get it reviewed and into the next release. |
@JinHuang0101 can you please tell us how much of these docstrings was generated by AI? We are trying to figure out what role AI is going to play in our dev process going forward, and it would help to know. thanks - @gvwilson |
Hi @gvwilson, Yeah, I should've made a note about this in the PR. Here is my rationale and workflow: Overall Rationale: At the same time, manually writing all the missing docstrings and inline comments can be time-consuming and labor-intensive for both original contributors and newcomers. I thought that generating technical documentation like this could be an ideal task for LLMs, as long as they accurately understand the code and produce clear explanations. If done well, this could save open-source contributors a lot of time and effort, allowing them to focus more on coding. My Workflow:
The docstrings generated by these models were largely in alignment with my understanding (about 95%). Since docstrings are a form of technical documentation, I didn’t significantly alter the machine-like tone. However, I acknowledge that I might have misunderstood some functions, which could lead to inaccuracies in the generated docstrings. If that’s the case, it’s likely because I didn’t fully grasp the function in the first place—hence, a more experienced contributor might need to approve or request changes. Thoughts: However, if you're interested in exploring how AI can handle relatively simple tasks like these in coding, I believe this could be a valuable way to save programmers' time while also improving the maintainability of open-source projects. I thought it was worth experimenting with, given that it doesn’t pose much direct risk to the program’s functionality. Let me know what you think, and thank you in advance for the conversation! |
Thanks for the detailed explanation @JinHuang0101 - I think this is a really interesting use case, and we (our team, our company, and our whole profession) need to think pretty hard about when, where, and how to use these tools. Looking at this particular change, I don't think the AI-generated docstrings add very much information that isn't in the name of the test functions, but that doesn't mean they're not useful. We're trying to get our next Dash release out the door right now - I will try to prioritize review of this after that's finished. Thanks for your patience - @gvwilson cc @ndrezn |
1a614d3
to
1db3990
Compare
Hi @gvwilson, thank you so much for the detailed feedback! I modified my prompts asking the AI models to improve the previous docstrings with more details and explanations. The docstrings are now revamped and updated. I reviewed the improvements and amended the code in my existing PR. I think they are richer, more explanatory now, adding more value to the code. Let me know what you think! Thanks! |
Start with a description of this PR. Then edit the list below to the items that make sense for your PR scope, and check off the boxes as you go!
Added missing docstrings to test_configs file #3194
Contributor Checklist
optionals
CHANGELOG.md