petervizi / python-eeml

A python package for generating eeml documents.
http://petervizi.github.com/python-eeml
GNU General Public License v3.0
43 stars 11 forks source link

Added support for <datapoints /> #17

Closed andig closed 11 years ago

andig commented 11 years ago

Hope this is good enough as it's my first git/python thing ever published...

andig commented 11 years ago

Added and fixed testcase. However 3 test cases were already failing for me from the beginning:

Finding files... done. Importing test modules ... done.

ERROR: test_good_create_doc (test_eeml.TestEEML)

Traceback (most recent call last): File "C:/data/workspace/python-eeml-andig/tests\test_eeml.py", line 105, in test_good_create_doc id=1) TypeError: init() got an unexpected keyword argument 'id'

ERROR: test_good_data (test_eeml.TestEEML)

Traceback (most recent call last): File "C:/data/workspace/python-eeml-andig/tests\test_eeml.py", line 46, in test_good_data unit=u) TypeError: init() got an unexpected keyword argument 'id'

ERROR: test_good_environment (test_eeml.TestEEML)

Traceback (most recent call last): File "C:/data/workspace/python-eeml-andig/tests\test_eeml.py", line 81, in test_good_environment id=1) TypeError: init() got an unexpected keyword argument 'id'


Ran 6 tests in 0.016s

FAILED (errors=3)

petervizi commented 11 years ago

Please take a look at the branch andig-integrate. I made a small modification on the used data structure: I would prefer (value, datetime) pairs instead of maps. I think it's faster to write a pair than a map. Let me know how you like it.

andig commented 11 years ago

This looks fine, I don't really need the dict, just seemed obvious. But you've taken away the option to pass 'at' in as datetime or string. I also found that the rest of the code seems to support datatime and time sometimes for this purpose which seems slightly inconsistent (hint: rather have static helper function perform this for us?) Did you have a chance to verify the 3 other errors I had seen?

andig commented 11 years ago

any chance to get this into mainline?

petervizi commented 11 years ago

Sorry andig, I had a busy weekend, didn't have the chance to get to this. I'll try my best to get it integrated tonight.