Saturday, July 19, 2014

GSoC 2014, Week #9: Testing, testing, 1, 2, 3...

Hello everyone!

Good news! My mentor, Brian Dolbec (aka, dol-sen) has returned from the hospital! He has to take things slow but at least we know he made it out alive. Best wishes for him and I hope everything goes well for him.

In an attempt to make things as short as possible here is what has been accomplished this week:

1.) Improvements to overlay-maker class:

  1. Support for bitbucket.org mirror auto-fill info has been added. When a user now gives the overlay-maker class a bitbucket.org source URL it will now try to determine which VCS type it is, as well as the possible feed and homepage URLs.
  2. In addition to adding the support for bitbucket.org auto-fill info, the function necessary to auto-fill the info for source URLs has been cleaned up for improved maintainability.
  3. The get_input() and get_ans() functions were improved upon, to allow for a colorful interface with users, similar to the output messages of layman. This was done for overlay uniformity and to just be...pretty.
  4. Message output for the overlay-maker class has been migrated from your run-of-the-mill print() functions to the output suite that layman has readily available. Again, this brings a uniform look to the interactive sessions.
  5. The get_ans() and get_input() functions were moved to utils.py. This allows them to be where they should belong, as well as making them readily available to other classes that can make use of them (ex: db.py).

2.) Added disable and enable functionality to repos.conf files:

    Do you all remember in my last post where I mentioned the ability to disable and enable a repository in the make.conf files? Well, I discussed it over with dol-sen and we figured the best way to "disable" a repo for repos.conf files is to simply comment it out.

    Because that is the case, adding support was easy and is now readily available to be merged onto the master git branch,

3.) Began migration from doctests to test suite:

    Essentially a doctest is an in ".py" file test that was run via the python command line. It it a test that can be run to ensure that the function that is being tested, actually works. The drawback of doctests (in my humble opinion) is that they should belong in a separate place aside from the actual ".py" file that is being tested.

    If we're moving the tests to a separate place, why not just move them from doctests to the actual implementation of the test?

    That's what I aim to accomplish in this upcoming week (and what I've been working on this week).

    To see a full list of tests added to the test suite, look at the test-suite branch on my layman github repo.

 Goals for next week:

  •  Continue working on migrating docstring tests to a full test suite.
As always, to anyone interested the source code and my commits can be found on git.overlays.gentoo.org/gitweb/[1] or on github.com[2] on layman's gsoc2014 branch.

  [1]http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=shortlog;h=refs/heads/gsoc2014
  [2]https://github.com/twitch153/layman/tree/gsoc2014

With regards,
    Devan Franchini (twitch153)

No comments:

Post a Comment