Using and Mastering Cookiecutter Transcripts
Chapter: Conclusion
Lecture: Finish line

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Congratulations, you've made it to the end of this course,
0:05 and not only did you make it through the course
0:08 you now have a new magic power- it's called cookiecutter.
0:11 So the question is what are you going to build now?
0:15 I think you should take this moment, pause this video
0:18 and write down three things you think could be made better with cookiecutter
0:22 and then make a plan to create at least one of those over the next month
0:27 if we all did that, think how many cool things we could create
0:30 with cookiecutter in just a really short time.
0:34 So congratulations, I hope you feel as you've gained
0:36 a lot of knowledge about cookiecutter
0:38 that you can now use this new tool to do amazing things
0:41 both with your own project, as well as other cookiecutter templates
0:44 that people have already created and published to the pantry full of cookies.
0:49 Let's do a quick lightning review. So we started out in this course
0:52 by discussing what is cookiecutter and when to use it
0:56 and you saw that cookiecutter is a project template creation framework
1:00 we can take these templates, we can run them
1:03 we can create any sort of project it doesn't have to be Python
1:06 even though the implementation is Python.
1:08 We saw that we can create Atari games C++ applications
1:11 JavaScript apps all sorts of stuff;
1:14 we talked about some of the advanced features, running cookiecutter
1:17 with no inputs, great for continuous integration and unit tests,
1:20 things like that; running it with the replay option so that it just reruns
1:25 whatever we configure it to run, again this is good
1:29 for when you're building your own temple
1:31 it's good when you're doing continuous integration
1:33 and you don't want to take the default
1:35 we also saw that it can be annoying to type in answer
1:37 questions like what's your name, what's your e mail
1:39 what's your gituhub account name and things like that continuously
1:41 so we can create a global default file that solves that once and for all.
1:45 We talked about creating templates, we'd start with the cookiecutter.json file
1:50 that has the prompts as well as things like extensions,
1:54 files that we should not transform, copy without render things like that
1:57 we talked about the folder structure naming our folder things like
2:01 {{cookiecutter.project_name}} something like this
2:05 we saw that we can create dependent properties
2:07 that the cookiecutter.json is not just a static thing
2:10 but it kind of comes to life as it evaluates top to bottom
2:13 so we can put Jinja expressions in here
2:15 and do a lot of cool things there for the most advanced features
2:18 we would use hooks, we have a pre generation hook
2:21 and a post generation hook
2:24 and we also have a choice variable
2:27 if you've got a small restricted set of things
2:29 like the template engine you want to use for a web framework
2:31 a choice variable would be great.
2:34 We saw that we can take this concept of creating templates in a program
2:38 and make it even better, recall we made our game maker application
2:43 and it can make hi-lo, it can make pong, and it can make hangman
2:46 and instead of just having the general prompts and inputs that cookiecutter gives
2:51 we actually wrote a program that would take in that information
2:54 verify it if it was wrong it asked the question again
2:57 and get everything ready to go and then it would create the game
3:01 using the underlying cookiecutter template programmatically
3:05 so we would call cookiecutter.main.cookiecutter one as a package
3:10 one as a sub package, the final part is the method we would call that
3:12 and of course we want to leverage the default values
3:15 so we could work with the config sub module and pull in the default values
3:19 for whoever joining this minimize a number of questions
3:22 or at least make it nicer for them and we created our little app
3:25 the game maker, and it presented itself
3:27 more nicely as sort of a project creation thing
3:30 I didn't have to know anything about projection for the most part
3:33 because it just delegated all that information
3:36 and that functionality to cookiecutter;
3:39 we went through a few case studies
3:41 we talked about Beeware, OpenStack and Pyramid
3:43 and how all three of these projects are making heavy use of cookiecutter
3:46 and how there's some really interesting stuff happening there;
3:49 we shared our template, in fact,
3:51 I can tell you that the time of this recording now my template
3:55 that I used as an example in this section
3:58 is now officially part of the pantry full of cookies
4:01 on the cookiecutter site, so that process
4:03 I took you through that work for me at least, that was great.
4:06 And finally we talked about modifying cookiecutter
4:09 there was a feature that I- or behavior let's say, not a feature, behavior
4:13 I didn't like and I've talked about it throughout the course
4:15 that the yaml file, the parsing of is too strict and having a new line at the end
4:20 is really frustrating we went through and we saw how we could fix that
4:23 in fact I did a little bit of back and forth with those guys
4:26 and now that is also accepted and should be officially part of cookiecutter
4:31 so that shouldn't be a problem anymore, you can use that technique
4:33 to modify cookiecutter for whatever your needs are.
4:36 Look at that, this is a ton of stuff that you've learned
4:39 and now you should be really empowered to do cool stuff with cookiecutter.
4:43 But, before you go don't forget to take the code with you
4:45 visit,
4:49 and star this and fork this so that you have everything
4:53 that we've done, everything we've created throughout the course
4:57 with you forever.
4:59 I've done a small amount of reorganization
5:01 because I noticed as I was doing things live it got a little messy sometimes
5:05 I had multiple projects generated next to the temple at itself
5:08 and so it might not look identical but it should be very very similar
5:11 and self explanatory to what you saw us to together on the screen.
5:16 Thanks so much for taking this course I'll see you online! Bye.