Skip to content

Code to augment other code with docstrings and other explanatory verbiage.

Notifications You must be signed in to change notification settings

tylerneylon/auto_documenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto_documenter

This is a little script that uses gpt to add docstrings to Python code.

The current code is a work in progress. Version 1 adds a docstring to all function and method definitions. If you happen to already have a docstring on a function, you'll end up with two.

Usage:

./autodoc.py <my_code.py>

This prints output to a new file (or stdout) and does not edit the original file. This way you can run a diff and see if you like the changes.

Configuration

Choose whether you want to print to console or file: "print_to_file" to true
if, instead of printing the modified code to the console, you'd like it
printed to a new file in the output directory
Make mock calls to GPT? Set "mock_calls" to true if, instead of making calls
to GPT, you'd like to make only simulated calls. (This is useful for testing
this codebase without hitting API limits)

Contributors

About

Code to augment other code with docstrings and other explanatory verbiage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages