Lab 7

Creating the Branch

Creating a branch has become a task I do often. So often in fact I have made an alias for it. I created a script called .git_alias that I run every time I open my terminal. I did this by creating creating another script in my .profile file. This file is run every time my terminal is opened. My alias is alias go="git checkout". This allows me to type "go -b branch_name".  This was very concise and very simple to remember. This saves me the trouble of typing git checkout every time I need to go checkout a branch.

Create a CONTRIBUTING.md File

    Creating a contribution file was a very big step for me. I didn't realize that some people might want to contribute to my projects. I re-wrote my entire CLI program last week and reflected on how many people contributed on my bash scripts CLI. This helped me realize the importance of documenting my code in order for others to contribute with me while maintaining code standards. Although, my contribution.md is not fully complete I like the idea of taking a minute to reflect on what we have built and are building. This moment of reflection gives us the clarity of where we have been and where we are headed.

Add a Source Code Formatter

Adding a code formatter was simple, the hardest part was figuring out how to add a plug-in on my IDE. This was challenging since I have never added a plug in on PyCharm.

Add a Linter

Adding a linter was a painful experience! The linter continuously kept notifying me that my code had errors. Simple things like having a doc string attached to my functions was an issue. It made me realize new coding standards. I also found a new way to concatenate two if statements into one using the in syntax and giving it a tuple.

Editor/IDE Integration

For this IDE integration I added a .pylintrc file. I had to add two lines of code in order to pass all the tests. I did not take it personally, however, I have a feeling this linter hates me. It kept telling me that I had to add a doc string on my imports. I did not want to add a comment on these imports since they were straight forward. In order to remove this linter error and get my 10/10 linter score I added "disable= C0114 # missing-module-docstring" to disable the manditory module docstring.

(Optional) Add a Git Pre-Commit Hook

This was fun! I never knew that git came with commit hooks. I always saw it on big repositories and thought that was cool but I never thought I would be able to implement one! Since I have some background knowledge on how the terminal works I was able to quickly located and implement a script that runs every time someone commits code on my git projects. I am not sure If this script is passed on to the people that clone my repository, however, I am still happy that locally my code will always be clean.

Squash, Commit, Merge, Push

Im not going to lie, I got lost half way. I was in the middle of squashing 10 commits into one and I noticed something was wrong. My squashes stopped at 8/10 and was asking me a bunch of questions and asking me to run certain commands. I somehow managed to squash all the commits and push it to my github repository

Writing a Blog Post

Thanks for coming to my Blog.

 

Comments

Popular posts from this blog

Working with others

We are off! V0.1

Lab 2