Categories
Uncategorized

Good bones!

This week has been quite a refresher. I went through old material from a previous class, CS 340 Introduction to Databases, and the Flask documentation tutorial.  A few months back I did create my own Flask web app, so I also took a look at that as well. It was actually really fun looking back at my previous work. It was my first time ever using Flask so I can see it was a bit cluttered and not very organized.

The main goal I had this week was to complete the structure and layout of our project. I wanted to get it uploaded to GitHub early on. Having a good skeleton code will make sure everyone has the same starting point and does not have to worry too much about organization and merge conflicts.

I followed the layout structure provided in the Flask tutorial here.

Project layout from Flask documentation

My layout looks similar but I modified it slightly

My project structure

Creating this tree-like structure was done using the command:

$Tree /F > output.txt

As a team, we wanted to implement features to make our codebase more robust, but let me tell you, GitHub actions and workflows were really annoying me this week! More specifically the linter. Because I created so many files, there were linting issues on a few of them. It was silly things like having an extra line or having spaces on a line.  The feeling of finally getting that green circle made all the struggles worth it though!

The other thing was to make sure all of the tests in our test folder ran. This was also so satisfying to figure out. Python unittest has a way to do this with it’s discover functionality. Here is the command:

$python -m unittest discover tests "*tests.py"

What this does is it will ‘discover’ a folder called tests and run files that have tests.py in the name.

Overall, this was a busy week for me but with it, I feel I was able to improve and feel my efforts will set up our group for success!

Finally got that green circle!

Leave a Reply

Your email address will not be published. Required fields are marked *