Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Creating Documentation

Music: Living Voyage by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 license. creativecommons.org/licenses/by/4.0

00:00 In the last lesson, Gemini kind of helped us to get the todolist running and also created an empty README file along the way. So now it’s time to fill this README file and ask Gemini to create project documentation for you.

00:16 For example, “Can you write detailed installation and usage instructions for this project?”

00:30 And Gemini comes back with a new README file and asks you if it should create it, and shows you a very small bit of the file. If you have a look at the beginning of this code, it says, first 154 lines hidden.

00:47 That is not ideal. You could now go to ‘Modify with external editor’ and have a look at the current state in an external editor. But another option that you’re having is pressing Ctrl+S to show more lines.

01:02 And once you have clicked Ctrl+S, you can scroll up to see the full file that Gemini wants to create. Now here in our README file, this is pretty nice.

01:13 We see the whole file. We can go through it and see what changes Gemini would do. However, if you are working with very big files, you might even exceed the maximum of your terminal, and this variant doesn’t work.

01:29 So that is the point where this terminal AI assistant might not be ideal for you, and you want to combine it, at least, with some external editor here. Right now, with the README file, it’s fine.

01:40 Let’s have a quick glance over what Gemini tells us about the project. It now says it’s a Gemini Todolist. That’s because I named the folder Gemini Todolist.

01:53 So yeah, Gemini, it’s yours now. And then there are installation instructions, and I’m very happy to see now that Gemini also picked up on the creating and activating virtual environment bit.

02:06 And then there is the pip install command.

02:09 Scrolling a little bit down, we can see the usage, general syntax, and the different commands. So all of this really looks nice. Let’s not go into everything at the moment right now,

02:23 but it really looks like it’s a very thorough README file. If you are creating files for you, it’s a good idea to have a closer look at the file and really be sure that you’re not adding anything that is not correct, or you are not agreeing to.

02:40 For the sake of this video course, let’s speed things up here a bit and say, yes, it looks fine. I haven’t read everything, but I trust you, Gemini, because why shouldn’t I, and allow the edit once.

02:53 And once you press Enter, Gemini writes the README file and lets you know that it’s ready for the next command.

Become a Member to join the conversation.