User:Miriya52/week5

Refer to project glossary for acronyms and definitions. Week 5: January 2 - 6

Objectives
Write functions to pass unittest. Travis enabled.

Progress Update

 * I have been copying the pyslet.xml data structures and models to a simplified version at pyslet.gift, conforming to Python 3 only.
 * I added most unittests to test gift.structures, that don't rely on parsing logic.

Debugging Travis test error
One issue I encountered towards the end of the week, is that as of this commit, the unittests pass when I run tox manually from MacOS. However, it runs into a TypeError on TravisCI. On TravisCI, it is running it on Linux.

The TypeError is thrown from this line, from the original unittests. I traced it and found that os.sep is a str, while .endswith(arg) expects arg to be type. Calling .endswith in my py3 virtualenv on MacOS doesn't throw a TypeError. Also, the original unittests pass, so it's only running my unittests for python 3.5 on Travis that has this issue.

I think I may disable this test for now, and start working on the parsing logic.

Plan for next week

 * I will be at Wikimedia Developer Summit in San Francisco from Jan 9 - 11.
 * The end of next week and following week, Jan 16-20, I plan to tackle the GIFT parsers. The logic in the GIFT parsers will be quite different than the QTI xml parser.

Need to implement:
 * gift.structures.Document.generate_gift: generator that yields serialised GIFT
 * gift.structures.Document.write_gift: writes serialised GIFT to an output stream
 * gift.parsers