12
Documenting Code with GenAI
In Part 3 of the book, we will introduce advanced practices from the software development lifecycle (SDLC) when working with ChatGPT, OpenAI API, and GitHub Copilot. Using the five S’s framework introduced in Chapter 4, and prompt engineering techniques introduced in Chapter 8 and Chapter 9, we will see how to productionize our Python applications.
In this chapter, we will introduce docstrings for Python objects, which already has a built-in slash command (i.e., /doc) with GitHub Copilot. We can use this slash command with the vanilla format or extend it with specific docstring requirements. Docstrings are already a feature of most IDEs as a template structure where arguments will be formatted with a fixed style, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access