-
Notifications
You must be signed in to change notification settings - Fork 5
Closed as not planned
Closed as not planned
Copy link
Description
I'd love help brainstorming and organizing a class structure for creating PRs that inject either docstrings or examples into existing code. Here are some of the things that need to happen. I'll focus on example creation in the ideas below. A similar modular design would exist for docstrings.
- Locate functions that need examples (maybe have none, maybe have 1, maybe return a dataframe that we can browse to manually look for some). We've already got code to identify functions that are missing the examples section at DOC: Examples in docstrings – tracking issue numpy/numpy#21351 (comment). This function has to be run on the dev version of NumPy to be current. As for missing docstrings, there are plenty of private functions missing docstrings, which provide a great testing ground for this (but aren't wanted/needed in the code base?).
- Given a function that is missing examples, generate more (number to generate could be a parameter). Example functions used in few-shot prompting could be a parameter. Maybe letting the script randomly (or via some other option) select methods from the corresponding class file that already have examples would be better than manual. Maybe do both. Mostly we need at least one way to generate a new example. This is the AI part.
- Given an example and a function, inject the example into the source code.
- Build the docs and verify that there are no errors (minus the single error that occurs from the Warning messages related to serial writing).
- Run the example tester on the example code and verify all tests pass.
- It would be nice to have something create a file (like a Jupyter notebook or something) that we can manually open to view and test the changes ourselves.
- Create a branch, add the changed file to that branch, commit the changes to that branch (with an appropriate commit message including an AI generated tag).
- Push recent changes to GitHub. This one will require we configure authentication appropriately. This step could be left to manual until we find a secure way to do this on Nebari.
Metadata
Metadata
Assignees
Labels
No labels