There was a lot of configuration and setup work involved in week one. We evaluated tools we should use for collaboration, including the project plan document, and landed on MS365 documents so we can all contribute in a single collaborative document. We also chose Asana as our project management tool. Github was the clear winner when it came to choosing a source control platform.
Initially we chose to have two Github repositories: one for backend, one for frontend. After creating multiple pull requests we quickly realized we should just use one repository with both the frontend and backend separated in different folders to achieve what we were seeking with two repos which was overkill, so we are now only using one repo: https://github.com/aicoders-osu/osu_467_aicoder
Aside from setting up the above tools, most of my time this week was spent learning about and configuring both a Google Cloud SQL database as well as an Amazon RDS database. Initially we chose Google Cloud SQL because I saw the professor posted about a free $300 credit and we wanted to learn more about it. Since this was my first time using Google Cloud I ran into some hiccups with connecting to the database, specifically when it came to having to whitelist our IP addresses (because I didn’t know this was a thing). After adding my IP address I was able to authenticate using my Google DB username and password in a local MySQLWorkbench instance. Once I noticed that we were being charged daily for our Google database for having no data in there, I wanted to consider AWS since I know they have a free MySQL tier which is what led me to take a deeper dive into Amazon RDS. I had to spend time setting this up and configuring it, though they have an option to allow public IP addresses to connect to the database with just a username/password. This is something our team wanted: For initial development, we want to be able to authenticate into our database with only a username/password regardless of IP address. At the time of this writing, we are going with AWS RDS instead of Google Cloud, but both are up and running in the event we find another reason to switch back to Google Cloud.
Now for the good stuff! I was able to quickly ask ChatGPT for some boiler plate Python code to connect to our database. The output of ChatGPT walked me through the steps to install the Python dependencies needed, and then provided the code. What was neat is that after the code was provided, ChatGPT also tells me what needed to be replaced (our username, password, database instance, etc…). The code helped me authenticate as well as had some sample queries to get data from one of our tables, and then had a for loop to iterate and print over the results. I was surprised with how quick I got the results as well as how the platform walked me through what I needed to update! I was able to get this connected to both our Google Cloud database as well as our Amazon RDS database, leading to a successful week 1.
Example of our Python making the successful query:
Example of MySQLWorkbench working correctly:
Leave a Reply