639 Commits

Author SHA1 Message Date
Erik van Blokland
58a3667b71 Merge pull request #42 from moyogo/xmlWriter
glifLib: try importing from fontTools.misc.xmlWriter first
2016-10-13 22:50:24 +02:00
Denis Moyogo Jacquerye
e6a1a658f0 glifLib: try importing from fontTools.misc.xmlWriter first
fixes #41
2016-10-13 21:42:51 +01:00
Adrien Tétar
ce2923fec0 Merge pull request #40 from anthrotype/tests
Set up CI to run pytest with tox; prepare auto-deployment
2016-09-11 18:49:03 +02:00
Cosimo Lupo
f320554077 ufoLib.__init__: use os.path instead of slash to fix doctest failing on Windows 2016-09-11 17:44:12 +01:00
Cosimo Lupo
8db42c8e37 appveyor.yml: run tests with pytest inside tox environment 2016-09-11 17:06:39 +01:00
Cosimo Lupo
6a0790a645 .travis.yml: add (commented-out) 'deploy') section for Github and PyPI
someone with push access must encrypt the Github api token and the PyPI password
2016-09-11 17:00:13 +01:00
Cosimo Lupo
b497dce200 .travis.yml: run tests with pytest inside tox environment; sudo is not required, use the Travis container-based infrastructure (faster) 2016-09-11 17:00:13 +01:00
Cosimo Lupo
908cff36ad add tox.ini configuration file
install package and run tests in isolated virtual environments
2016-09-11 17:00:13 +01:00
Cosimo Lupo
8747da76a4 filenames.py: fix doctests for py2.py3; import unicode_literals 2016-09-11 17:00:13 +01:00
Cosimo Lupo
ee38446982 glifLib.py: use +IGNORE_EXCEPTION_DETAIL to make doctest work on both Python2 and 3
http://python3porting.com/problems.html#handling-expected-exceptions
2016-09-11 17:00:13 +01:00
Cosimo Lupo
5fb9a13957 converters.py: fix up kerningValidator doctest 2016-09-11 17:00:13 +01:00
Cosimo Lupo
730a673c3a setup.cfg: set universal wheel; use zip as sdist format; add test=pytest alias; add default pytest config 2016-09-11 17:00:13 +01:00
Cosimo Lupo
a14810a036 add requirements.txt file 2016-09-11 17:00:13 +01:00
Cosimo Lupo
6f6a10dfa2 setup.py: add pytest runner; only use setuptools, drop distutils; set version 2.0.dev1; pep8 whitespace 2016-09-11 17:00:12 +01:00
Cosimo Lupo
78f7d02d6b add MANIFEST.in to include extra files in source distribution 2016-09-11 17:00:12 +01:00
Adrien Tétar
5a80482507 Merge pull request #39 from moyogo/unicode-userName
make sure we’re passing unicode string to userNameToFileName()
2016-07-11 08:36:54 -07:00
Denis Moyogo Jacquerye
4f83f4bbe1 tests: copy doctest as unittest in test_filenames 2016-07-11 13:49:59 +01:00
Denis Moyogo Jacquerye
bb21cb7c3a userNameToFileName expects userName to be unicode strings, let it raise
if not
2016-07-11 13:49:59 +01:00
Adrien Tétar
ec0fe57545 filenames: only allow unicode in py2
i.e. restore the old behavior
2016-07-08 21:19:16 -07:00
Tal Leming
d5514cc566 Merge pull request #37 from anthrotype/no-empty-layerinfo
glifLib: don't write empty 'lib' element in layerinfo.plist
2016-06-28 10:38:37 -04:00
Cosimo Lupo
f92dcf36c1 don't write layerinfo.plist if 'lib' element is empty 2016-06-28 13:52:23 +01:00
Adrien Tétar
bac9e9b75a Merge pull request #36 from anthrotype/element-text-none
glifLib: don't raise AttributeError if element.text attribute is None
2016-06-25 16:15:01 -07:00
Cosimo Lupo
f6689faf5b glifLib: don't raise AttributeError if element.text attribute is None
When an element tree is built from code, or it is parsed from a string that was not pretty-printed (i.e. without indentation), the 'text' attribute of an Element instance can be None. So we must ensure it's not None before calling `strip()` method.
2016-06-25 19:04:24 +01:00
Tal Leming
321ea7f766 Merge pull request #33 from anthrotype/isinstance-mapping
validators: check isinstance of collections.Mapping rather than dict
2016-06-24 09:47:59 -04:00
Tal Leming
89d8cfa7eb Removing metainfo.plist is no longer expressly prohibited (it shouldn't be done though). Raise an error when removing a missing file. 2016-06-13 13:36:30 -04:00
Tal Leming
ea54c77670 Don't try to remove the root directory. 2016-06-13 13:33:31 -04:00
Tal Leming
be90029b22 Arguments were transposed. 2016-06-13 13:22:36 -04:00
Tal Leming
c864359fb2 Define writer. 2016-06-13 13:19:40 -04:00
Tal Leming
0e569793a7 The populated info objects should be written, not an empty object. 2016-06-13 13:17:36 -04:00
Tal Leming
bfba532621 Force the removal of non-empty directories during directory removal. 2016-06-13 13:13:56 -04:00
Tal Leming
15c4ff20a3 UFOLibError is now raised instead of GlifLibError. 2016-06-13 13:10:55 -04:00
Tal Leming
a0a942bc7d Make copying a directory from a source to a dest work. 2016-06-08 14:26:01 -04:00
Tal Leming
4162429c53 Flipped args. 2016-06-08 13:39:14 -04:00
Tal Leming
6043db4f11 Switch to rb mode. 2016-06-08 12:06:35 -04:00
Tal Leming
cea3ba9b43 Fix some minor issues to resolve some failing tests. 2016-06-08 11:09:37 -04:00
Tal Leming
21f36611f0 Found something hardwired to the package structure. 2016-06-08 10:31:39 -04:00
Tal Leming
76480ec37f fs.path not self._fs.path. 2016-06-08 10:31:21 -04:00
Tal Leming
82958e2711 Name the argument. 2016-06-08 10:31:07 -04:00
Tal Leming
1eebdaf84a These are no longer around. 2016-06-08 10:30:52 -04:00
Tal Leming
1ed9fb14f5 Remove some unneeded functions. 2016-06-08 09:36:57 -04:00
Tal Leming
3fa83a1924 Remove a deprecated function. 2016-06-08 09:05:43 -04:00
Tal Leming
5014279665 Don't subclass FileSystem. 2016-06-08 09:04:29 -04:00
Tal Leming
fff92b9dfd Merge branch 'master' into ufo4
# Conflicts:
#	Lib/ufoLib/glifLib.py
2016-06-07 13:27:05 -04:00
Tal Leming
c9ced7f718 Use fs.path instead of os.path. 2016-06-07 13:24:30 -04:00
Adrien Tétar
f865b4e4a9 Merge pull request #32 from anthrotype/et-warning
plistFromETree: use len(element) to check if there are subelements
2016-06-05 11:13:24 -07:00
Cosimo Lupo
971a92bfe8 glifLib: use len() to check if ElementTree.Element is empty or contains children 2016-06-05 19:07:45 +01:00
Cosimo Lupo
fed7cef3cf validators: check isinstance of collections.Mapping rather than dict
The `collections` module provides a set of abstract base classes that can be used to
test whether a class provides a particular interface (e.g. whether it is a mapping).

It's better if ufoLib uses that with `isinstance` rather than requiring instances of
`dict`, or subclasses of `dict`.
2016-06-05 16:16:02 +01:00
Cosimo Lupo
fc4f810f61 plistFromETree: use len(element) to check if there are subelements to avoid FutureWarning 2016-06-05 16:03:24 +01:00
Adrien Tétar
133b4766a3 Merge pull request #31 from unified-font-object/fix-tests
Fix tests
2016-05-31 10:01:45 -07:00
Adrien Tétar
81e6c235af glifLib: fixup contour validation code 2016-05-31 09:59:02 -07:00