vstinner / hachoir

Hachoir is a Python library to view and edit a binary stream field by field
http://hachoir.readthedocs.io/
GNU General Public License v2.0
613 stars 70 forks source link

Parser of Garmin fit files #70

Closed sponce closed 3 years ago

sponce commented 3 years ago

FIT stands for Flexible and Interoperable Data Transfer protocol and is used by Garmin devices.

masatake commented 3 years ago

Is "FTI" is a typo of "FIT"? It will be nice if there is a test case for the parser.

sponce commented 3 years ago

Yes, a typo. Now fixed. For the test, can you point me to an example on how you write one ?

masatake commented 3 years ago

I'm a just minor contributor so I don't know well about how to write a test but I try to explain the way.

  1. put a small "fit" input file under tests/files directory.
  2. test_fit method to TestParsers class defined in tests/test_parser.py.
  3. run the test. See https://hachoir.readthedocs.io/en/latest/hacking.html.
sponce commented 3 years ago

Thanks a lot for the help. Test added.

sponce commented 3 years ago

All comments were addressed :-)

vstinner commented 3 years ago

Merged, thanks! It's way better with tests ;-)