Using and Mastering Cookiecutter Transcripts
Chapter: Adding features to Cookiecutter
Lecture: Preparing source for the feature

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Now that we have cookiecutter working here, you're going to be tempted to want to just start adding your feature,
0:07 get in there and get into that source code, but let's take one step really quick so that things are a little simpler for us
0:13 in order to add this feature on a feature branch so we can make multiple features, have them all in flight at the same time, things like that.
0:21 So I'm going to switch out of the terminal to my favorite git client which is SourceTree, so I'm going to open this directory so I can get hold of it,
0:29 go over here, let's come to source tree, and let's just put cookiecutter right there ok that's my cookiecutter on GitHub, notice here you can see
0:40 it's just got all the features from when was the last from what they did, here we go, this is the last branch as you can see,
0:49 these are all modified by me on my local version this is the last branch in sync with cookiecutter itself.
0:56 When you do this, it'll probably be right at the top, so you just want to branch from there, but I'm going to find the latest one
1:02 that's in sync with the official cookiecutter repo and I'm going to create a branch because what I want to do is
1:08 do all of the work only for that feature on that one branch, so let's do that. So we'll come over here, and we'll say branch,
1:15 now here's a cool trick that you can use if you use your name or your user name or basically if you separate with slashes
1:21 you can make a hierarchy of features, so I am going to say this I'll say mikeycennedy that's my github name
1:27 and then I'm going to say forgiving YAML fix, so forgiving YAML formats not super annoying, hey you need a newline there, you forgot that version
1:38 so I'm going to checkout to this particular commit, and I'm going to go ahead and check out that new branch so I'll start working from there ok
1:48 and notice, with the / here, this will actually create like a little tree of things, which is pretty cool, so we're over here
1:54 now notice, when we did that checkout it said hey there's this virtual environment here, I don't want that, so what I'm going to do is
2:00 I'm going to say ignore everything under .env, if this pull request gets accepted you probably won't have to do this, we'll see
2:06 but we're going to just update the .gitignore to say don't check in that virtual environment it's not cross-platform anyway
2:13 so I'll just add that in real quick, ignore virtual env directory, ok, so now everything is clean in our feature branch right here,
2:23 if we go over here you can see that we have that one checked out we're on the forgiving YAML fix directory we're ready to make the code itself
2:32 actually do the code change that makes this forgiving YAML.


Talk Python's Mastodon Michael Kennedy's Mastodon