Skip to main content

DPS 909 - Release 0.3 - Contribution Updates

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

Popular posts from this blog

DPS 909 - Release 0.2 - Hacktoberfest Week 3

I'll admit it right off: this week, I did not have a lot of time to spare for Hacktoberfest, so I was unable to tackle a new goal (out of the ones I set for myself at the start of the month). Nevertheless, I did not want to jank up the weekly momentum I had by missing a contribution, so I simply opted for a simple one instead. I found a nice project , by GitHub user vichitr , that focused on encouraging amateur contributors during Hacktoberfest, not unlike the last repo I contributed to. Instead of focusing on design patterns, vichitr's project contains a variety of issues that programmers are invited to tackle. I decided to contribute to issue #6 on the repo, which is to implement a data structure in the language of your choice. Since I was short on time for the week, I decided to contribute a threaded tree by overhauling a previous project I did as a school assignment. A threaded tree is a binary search tree that supports easy, in-order traversal of its values. Normally,

DPS 909 - Lab 3 - Hacktoberfest, and the Very Scary Repository

It's that time of year; the mornings are getting chilly, the leaves are turning, the pumpkin spice is flowing, and open source developers are getting all worked up over something called Hacktoberfest . Not to be confused with the other , similar-sounding (though arguably no less beer-filled) celebration, Hacktoberfest is a chance for open source enthusiast to truly flex their projects and contributions. Hosted by DigitalOcean , Hacktoberfest 2019 is an event running throughout the month of October that encourages activity in the open source community. It is completely free to sign up, and participants can even link their Github accounts to use as their Hacktoberfest profiles. As you may have already guessed, I will be participating in this event as my next major milestone on my journey into the world of open source. Through the miracle of APIs, even my profile picture was imported! While the prospect of diving headfirst into such a large, open source event as a beginner may s

DPS909 - Release 0.1 - A Fork in the Road

Hello friends, welcome back to my journey into the world of open source. Continuing from the last milestone (in which we explored pushing a simple app to Github), this time I begin to scratch the surface of a major aspect of open source - community contributions. For the Release 0.1 deliverable, I work alongside my fellow classmates from the DPS909 course, as we work to review and bugfix each other's work. For reference, we all created the same, simple note-taking app, but each programmer's individual preferences resulted in slightly different designs with unique source code. According to proper Github etiquette, users wishing to contribute to a project should first fork a version of the repo to their own Github account. Then, a separate branch of the repo should be made to specifically address the contribution being made. After the changes are implemented, a formal pull request should be submitted to the official project repo, so that it can be reviewed by the original auth