Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Apr 8, 2016

Conversation

anthrotype
Copy link
Member

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
Copy link

Coverage Status

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

Cosimo Lupo added 3 commits April 8, 2016 17:56
Default is 10 decimal places. Value of -1 means no rounding: i.e. use built-in repr()

Also, backport tempfile.TemporaryDirectory to python 2.7 (can be useful for tests)
otherwise, copytree raises FileNotFoundError
@anthrotype anthrotype changed the title add option to _not_ store modification timestamps in lib.plist add --float-precision option, fix duplicateUFO and add more tests Apr 8, 2016
@coveralls
Copy link

Coverage Status

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

@anthrotype
Copy link
Member Author

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.

@miguelsousa miguelsousa merged commit b2c3eb4 into unified-font-object:master Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants