Archive for Freeseer

UCOSP week 9

So this is the last week of UCOSP I’ve finished the RSS plugin and the plugin documentation which were my main goals for the term. I think that I’ve got a god start on a csv importer plugin based on my current progress I son’t see myself finishing up the csv plugin as part of this semester, but it was more thrown in there as an afterthought since I finished the RSS importer plugin and didn’t have enough time to work on a PyQt implementation of the RSS plugin.

My goals for last week were:

  • Fix csv plugin, and finish tests.
  • Rebase tutorial to make sure it is caught up with master & implement final code review suggestions
  • Revise design doc based on current progress.
  • Refactor database.py to use working CSV importer plugin.
  • (If have time) do report and screen-cast for the academic portion of this course.

What I Accomplished Last week:

  • Worked on fixing CSV importer plugin code, but I’m not sure if I did the test_add_talks_from_csv() properly (although it works on my local machine, I did push it though for review).
  • Worked on implementing suggestions for csv plugin per code review.
  • Rebased tutorial, apparently made a mistake with my rebase, but Dennis said he was able to take a patch of the change
  • Worked on polishing up my design document.

Challenges I faced this week:

  • Rebasing errors
  • Tests for csv plugin

Plans for next week:

  • Do report and screen-cast for the academic portion of this course.
  • Finish up design doc based on current progress.
  • Keep working CSV importer plugin (wont necessarily finish this for the end of this semester, but I intent to keep working on it).

UCOSP week 8

This week was a week.

My goals for last week were:

  • Revise design doc based on current progress.
  • Implement tests for the CSV importer plugin, and
  • Refactor database.py CSV importer code to a plugin format.

What I Accomplished Last week:

  • Wrote CSV importer code to a plugin format, but tests failing so I have to fix that.
  • Refactored RSS plugin code according to code review, rebased according to guidelines.
  • Updated plugin system tutorial, according to code review, and rebased to master (need to do again).

Challenges I faced this week:

  • Rebasing code, lots of fun took me over 4 hours to get it right due to conflicts and such.
  • Tests failing on csv plugin, need to fix, need some other tests.
  • I had a term project due Monday (today) & 2 more are due this upcoming Friday.
  • Plumbing & renovation hell (long story).

Plans for next week:

  • Fix csv plugin, and finish tests.
  • Rebase tutorial to make sure it is caught up with master & implement final code review suggestions
  • Revise design doc based on current progress.
  • Refactor database.py to use working CSV importer plugin.
  • (If have time) do report and screen-cast for the academic portion of this course.

UCOSP week 7

My goals for last week were:

  • Finish documenting the plugin creation steps and create the tutorial.
  • Design tests for a Qt-based parser class for the RSS importer plugin
  • Revise design doc based on current progress.

What I Accomplished Last week:

  • Finish documenting the plugin creation steps and create the tutorial.
  • revisited the documentation for using PyQt to implement a parser for the RSS importer plugin

Challenges I faced was:

  • Another round of midterms and some term projects deadlines coming up in the next week to week  and a half.

I also have reviewed the documentation for implementing an XML parser and I don’t think I would be able to successfully make one in the time that I have left in this term, so I plan on creating some notes and adding them to the open issue for whoever ends up creating the Qt-based XML parser.

I did, however, also look at the CSV importing code in the database.py file and I think that it would be fairly straightforward to refactor that code into an importer plugin and then have the database.py file call and use the plugin as it does with the rss importer plugin.

Plans for next week:

Issue 151 also lists having a css importer plugin so what I want to work on that this week:

  • Revise design doc based on current progress.
  • Implement tests for the CSV importer plugin, and
  • Refactor database.py CSV importer code to a plugin format.

UCOSP week 6

Well I underestimated how long it would take me to successfully implement the code review suggestions this week but I was able to implement all the suggestions and significantly refactor and clean up the plugin design this week.

My goals for last week were:

  • Implement suggestions per code review.
  • Finish documenting the plugin creation steps and create a tutorial.
  • Design tests for a Qt-based parser class for the RSS importer plugin
  • Revise design doc based on current progress.

What I Accomplished Last week:

  • Implement suggestions per code review (this took up all my scheduled UCOSP time for the week & them some).

Challenges I faced was:

  • There were a few code review suggestions that I had difficulty implementing at first without breaking the tests. I think the biggest problem was that I tried making too many changes in one go and then when something was not quite right then it was too hard to track it down. After a few attempts I decided to break it down into much smaller steps and then I would implement a small change, run the test suite and if everything passed, move on to the next change. Not only did that method work better, but I think it’s more in keeping with an agile philosophy.

Plans for next week:

  • Finish documenting the plugin creation steps and create the tutorial.
  • Design tests for a Qt-based parser class for the RSS importer plugin
  • Revise design doc based on current progress.

UCOSP week 5

My old laptop finally kicked the bucket on Tuesday but I wasn’t able to get a new one till Saturday so I ended up getting my ten hours for the week in on the weekend.

My goals for last week were:

  • Refactor database.py to use the RSS importer plugin instead of built in-function.
  • Finish documenting the plugin creation steps and create a tutorial.
  • There are some more tests I’d like to write for the RSS importer plugin
  • I’m going to look at auto-generated PyQt files and see if I can figure out why tests fail on my machine because of it (even though they pass on Travis)
  • Revise design doc based on current progress.

What I Accomplished Last week:

  • Refactor database.py to use the RSS importer plugin instead of built in-function
  • Refactored rss_feedparser plugin to be more compliant with PEP8 and “the python way of doing things”
  • Took a look at the tests failing due to auto-generated PyQt files, still not sure what’s up with it on my system.

Challenges I faced was:

  • Determining the proper way to call the plugin and getting tests to pass once I was using the rss_feedparser plugin, had to put in a lot of time and do some heavy debugging to find an obscure error that was causing the rss feed importer to completely fail.

Plans for next week:

  • Implement suggestions per code review.
  • Finish documenting the plugin creation steps and create a tutorial.
  • Design tests for a Qt-based parser class for the RSS importer plugin
  • Revise design doc based on current progress.

UCOSP week 4

This week was rather eventful: 3 midterms, a project due, a sick 1-year-old at home, several job interviews and multiple offers (I now have a really promising job lined up for January). So considering the week I’m satisfied with what I accomplished.

My goals for last week were:

  • Get Freeseer working on my Mint USB install.
  • Finish designing & implementing tests for the importer plugin.
  • Implement importer as a plugin, refactor database.py to use importer plugin instead of built in-function

What I Accomplished Last week:

  • Got Freeseer working on my Mint USB install.
  • Designed & implemented test for the importer plugin.
  • Implement RSS importer as a plugin, after some setbacks, got tests to pass.

Plans for next week:

  • Refactor database.py to use the RSS importer plugin instead of built in-function.
  • Finish documenting the plugin creation steps and create a tutorial.
  • There are some more tests I’d like to write for the RSS importer plugin
  • I’m going to look at resources_rc and see if I can figure out why tests fail on my machine because of it (even though they pass on Travis)
  • Revise design doc based on current progress.

UCOSP week 3

I found that my goals for the week were a little light so I added a few more items to my list and wrote a little code. So far a lot of my project has been research but I believe that I’m getting to the point where I will be able to produce a lot more in the way of code.

My goals for last week were:

  • Research how to properly implement unit tests for Freeseer and python.
  • Plan my basic design for the proof-of-concept general importer plugin.

What I Accomplished Last week:

  • Researched how to properly implement unit tests for Freeseer and python.
  • Planned basic design for the proof-of-concept general importer plugin.
  • Created a simple ‘IImporter’ class that extends the IBackendPlugin class and a open pull request for my work on issue #151
  • Worked on my tutorial for Plugin creation.
  • Began listing tests I will need to write next week.

Obstacles I faced this week:

I ran into some issues with my laptop (an old HP) while running Virtualbox (periodic freezing and system crashes) I ended up doing a bunch of troubleshooting but can’t seem to find the exact cause. At this point I would normally do a factory reset but I found out that my restore partition was corrupted, so short of buying a win 7 disk or a new laptop I’ve been trying other options. I have some proprietary windows-only software installed on my laptop that I need for classes this semester and so wiping it and installing Linux isn’t really an option right now. I did play with dual booting but it wasn’t really working so I tried to install Linux on a bootable SD card which also didn’t work for some reason, but I was finally able to make a persistent bootable USB with Linux Mint this weekend so I should just need to install the dependencies and clone Freeseer on my Mint install and then I should be able to have everything working.

Plans for next week:

  • Get Freeseer working on my Mint USB install (tonight).
  • Finish designing & implementing tests for the importer plugin.
  • Implement importer as a plugin, refactor database.py to use importer plugin instead of built in-function.

Potential Challenges for next week:

  • I have 3 midterms and a project proposal due this week.

Alternate goals:

  • Depending on how far I get on the importer plugin I would also like to finish writing the plugin tutorial and submit a Freeseer-docs pull request.

UCOSP week 2

I really took the opportunity to dig into the Yapsy api and the code of the PluginManager this week. I started drafting notes for the  tutorial on using the plugin management system with Freeseer. The basic version for writing a new plugin is: write a config file ‘some-plugin-name.freeseer-plugin’ add a directory ‘some-plugin-name’ (the names must be the same) in the __init__.py file in the directory write a class that extends one of the IPlugin sub-classes add other useful code to that same directory as needed. That’s the brief version, I’m fleshing out a more polished version (will post when ready).

For the most part the Yapsy documentation is fairly straightforward once you take the time to go through it and after I had read all the Yapsy documentation the Freeseer plugin code was fairly straightforward to follow, although I did run into a bit of confusion when I was looking at the src/freeseer/plugins directory since any plugin needs to be sub-classed from the IPlugin class and I initially couldn’t find any code that implemented IPlugin or sub-classes in the plugins folder or it’s sub-directories. So I ended asking on irc and Thanh let me know that the code was in the __init__.py files in the plugins sub-directories. I have viewed a number of the __init__.py files in other directories and they had all been empty so I had assumed that they were all empty and didn’t even check those files (I know, I know, never assume …) I felt a bit silly about that since a simple recursive grep through the code would have answered my question, but what can I say? I’m new to python and these things happen.  I did, of course, use a recursive grep to answer my other question, ‘how do the plugins actually get used by other code in the project?’ It is fairly simple, PluginManager object is instantiated and then the plugins are accessed through that object. All-in-all this is a simple and straightforward plugin system.

As I was working through things this week I decided that it would make sense to switch the order of a few of the milestones in my project document so the next 2 things I’m planing to do are: 1. research how unit testing is done in python and in this project (the documentation of this looks good so I’ll be starting there), and 2. design a proof-of-concept importer plugin. I’m planning on having both of these done by the end of the week or sooner.

UCOSP Week 1

OK this week I was only able to devote a couple hours to my Freeseer project, due to a conflict with another course project. This week I just read a bit more on how to implement a Yapsy plugin and, after consulting with the mentors, I updated the schedule in my design document to reflect this. I’ll of course be devoting extra time to Freeseer this upcoming week.

UCOSP Week 0

So as part of my final semester I’ve had the opportunity to participate in the Undergraduate Capstone Open Source Project (ucosp.ca) This ‘week’, we kicked it off with a 3-day code sprint in Toronto last Friday through Sunday. The sprint was held downtown at the Mozilla offices (we got a tour and everything, it was quite the experience) and we were able to meet our teams, make sure everything was up and running and configured properly, and began to focus on deciding what our project would be for this term. Overall it was a compressed, super useful 3 days that really helped to get things focused.

From what I understand, the purpose of this week is to clarify our projects and set goals and milestones. For this term I’m somewhat interested on working on the RSS feed-parser functionality. There is an open issue to rewrite the RSS import tool using PyQt4 so that there are less 3rd party dependencies required for the end-user to install. Also Thanh, one of the project mentors suggested that if I was going to rewrite the RSS import tool then it would make sense to address issue 151 and implement the functionality as a Freeseer plugin, using the Yapsy Plugin Manager system which is what the project uses to implement all of its other plugins. All in all, I’ve decided to go with issue #151 for my project and, if I have time, see if I can’t also make a RSS feed importer plugin so that it only depends on PyQt4 instead of both PyQt4 and the other existing 3rd-party library that is currently in use.  This week I’ve mostly researched what I need to do, and been working on developing a plan for my project.

As I’ve been researching, it’s become very obvious that documentation for how to implement a Freeseer plugin is, well, non-existent. Fortunately Yapsy is well documented, and the source-code for the project is well written so that has given me a good place to start. I’ve also noticed that there are no unit tests for the existing Freeseer feedparser functionality so I’ll need to develop some to make sure I’m maintaining functionality as I go along.  So far these are the key objectives I believe should be part of my project:

  • Implement a basic importer plugin (including unit tests) for Freeseer
  • Document the process and create a tutorial for future users on how to create a plugin for Freeseer
  • Extend the importer plugin to fully implement the existing rss-feedparser functionality (including unit tests)
  • (optionally as time permits) implement the importer plugin using only PyQt4.

As I’ve been reviewing these objectives I’ve come up with a general roadmap that looks roughly as follows:

  1. Finish researching how the Yapsy plugin system works in general, and specifically how we are implementing it in Freeseer
  2. Plan my basic OO design for the proof-of-concept general importer plugin
  3. Design (& implement) tests for the general importer plugin
  4. Implement the general importer plugin.
  5. Document the plugin creation steps and create a tutorial
  6. Write the tests to make sure the existing RSS functionality does not break with my changes.
  7. Design a RSS importer plugin that extends the general importer plugin and implements the existing RSS importer functionality
  8. Implement the RSS importer plugin, re-factoring as necessary and making sure that all tests pass.
  9. (optionally, as time permits):
    1. Research how to use only Qt to implement the RSS importer plugin
    2. Document my findings, so that a future contributor could pick up the work if necessary
    3. Design the new plugin
    4. Implement the new plugin making sure that all tests pass

Now that I’ve got all of that figured out, I just need to update my Project Design Document (which is, of course, a work-in-progress).