It's been a very busy week, between school work, work-work, and filthy cold Canadian weather. But, fortunately, I was able to get my PRs in, so let's take a look at what I did.
Internal Project - Seneca Telescope
As mentioned
last week, our Fall 2019 class of DPS 909 has initiated a project called
Telescope, which is a blog aggregation app that aims to completely overhaul the old and outdated
CDOT Planet website. For my contribution to the project, I decided to code a backend filter that detected inactive blogs. To achieve this, I drew upon some of my old experiences as an applied research assistant and followed the age-old adage - if it's data work in Node, just throw JSONs at it! All jokes aside, the method I chose was simply to parse the blog feeds, extract the latest post dates, and write them to a "redlist" JSON file if they were older than a certain threshold (I didn't want to use blacklist because that sounded too grim).
|
It's a blog feed graveyard... spooky, but a few weeks too late for the festivities. |
You can find the issue posted
here, and my pull request
here. As you can see from the PR thread, I took a bit of a review beating from our professor
@humphd. But, fixes are fixes, and it's all in the name of good quality PRs that are of value to the project! I'm glad I got the chance to do my part - even the fixes were an excellent experience!
External Project - ihatemoney
I actually happened upon this
neat little app while looking for a way to split cottage expenses among friends. Turns out they're open source, and on GitHub to boot! The way the app works is simple: you register participants to a budgeting project (which can be anything, such as going Dutch on a meal, or pitching in on a gift), add bills to a table, and the app will automatically calculate how much everyone owes each other. Very handy! It didn't take too long to find an
issue I could dig my hands into - another user of the app thought it would be a great idea to include filtering bills by various details. Not a bad idea!
|
The demo board has some... interesting entries to be sure, but no way to filter results. |
After posting to the issue thread to let everyone know I wished to try my hand at the problem, I got to work. Except I didn't really... at least not right away. That's because I ended up having a
lot of learning to do. See, the ihatemoney project was developed using
Flask, a Python-based web app framework. I had plenty of Python experience when it comes to data science, but I'd never touched Flask before, so I had to pick up the fundamentals real quick.
Next, I had to get acquainted with the development environment of the ihatemoney project, and that was where I ran into a lot of trouble. It's clear that the developers favored Linux, as there were convenient shortcuts to set up the dev environment on both
Debian and
Ubuntu. However, my local machine is running Windows 10, and while I could easily set up a virtual machine, all of my development tools were already set up just the way I liked them. Just when I thought about looking at another external project, I remembered that I had
Anaconda installed on my machine from another project I did a while ago. In case you don't know what Anaconda is... it's an amazing all-in-one distribution of Python that just never stops blessing the world with miracles. If you're thinking of getting into Python development, definitely give Anaconda a look. It literally just works, and it's saved my ass many, many times.
Through trial and error, I managed to translate the steps listed in the ihatemoney
contributions page to Anaconda, and I was able to create a
virtualenv that gave me everything I needed to begin development. After a little bit of additional confusion in getting the test server up and running, I was finally ready to begin coding.
|
It's alive! |
It took me several more hours to get truly familiar with the architecture of the project. Flask is a template-based framework that uses Pythonic inheritance to piece app components together. It took me quite a long time to follow the script logic through multiple layers of inheritance of imports. To be quite honest, the way the project was set up doesn't really lend itself to readability - there are very few code comments and the same entities receive different names as they are passed around modules. But I was already elbow-deep in the project, so... better keep going!
In the end, after overcoming my troubles, I was able to contribute a simple jQuery-based search bar that filters the list of bills based on who paid them. I submitted my
PR, and made a point to describe the pitfalls I encountered, as well as the potential for future work should they find my contributions acceptable. Given the effort I put into understanding this project, I hope the project owners respond to my PR thread soon. Once they do, I plan to add more options to my search function so it can filter based on other properties.
|
It took a lot longer to get here than it looks... |
So that's it for release 0.3! Just one more release to go. I'm looking forward to working on both Telescope and some more external contributions.
Comments
Post a Comment