unified-font-object / ufoNormalizer

A tool that will normalize the XML and other data inside of a UFO.
Other
51 stars 19 forks source link

add --float-precision option, fix duplicateUFO and add more tests #34

Closed anthrotype closed 8 years ago

anthrotype commented 8 years ago

Timestamps sometimes may change even though the content of files does not (e.g. the file is 'touched' but not modified). I don't like when git detect changes in lib.plist only because the timestamps have changed, but the content isn't. Git itself tracks changes using hashes rather than timestamps, and can tell me exactly the list of files which have been modified. So when I keep a UFO under version control, I want to be able to tell the normalizer to not store the timestamps.

In a follow-up PR, I'll add a --subpaths option that applies the normalization only to the specified set of files. The latter can be used in conjunction with --no-modtimes to pass the ufonormalizer the list of files modified as per git diff --name-only.

In addition, the current PR adds --float-precision command line option. The special value of -1 means no rounding (i.e., repr()).

coveralls commented 8 years ago

Coverage Status

Coverage increased (+2.5%) to 94.787% when pulling b02f765effcd2d598ce8d7a0417f22073b727ed1 on daltonmaag:no-modtimes into 7e73825295011d3ea9c7993d2a810db86f1da2bb on unified-font-object:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+2.7%) to 94.989% when pulling 1d6eeee6480cdc60de2b2ad4665960cb22b24177 on daltonmaag:no-modtimes into 7e73825295011d3ea9c7993d2a810db86f1da2bb on unified-font-object:master.

anthrotype commented 8 years ago

I just removed the commit about ignoring the timestamps (and changed the title of the pull request). I left the other commits (which is minor stuff anyway). I was not fully convinced about it. I'll see if I can find a better solution.