65 Commits

Author SHA1 Message Date
Hoolean
871f1be53b Build, test, and show support for Python 3.13
This commit repeats at least some of the steps we took for 3.12:

- 9b1dae4765b419778f8721caf9d0a6e05c2758eb
- eda6fa5cfbdfaf1d54cf391ed9c86b72288882a2
2024-10-07 22:28:58 +01:00
Cosimo Lupo
963aeec1c1 tox.ini: exclude pytest !=8.0.1,!=8.0.2
Fixes #3458 (or rather works around it)
2024-03-04 15:55:13 +00:00
Hugo van Kemenade
eda6fa5cfb Add support for Python 3.12 2023-09-29 10:33:59 +03:00
Cosimo Lupo
32ee866ee4
require at least pytest >= 7.0.0, fixes issue with monkeypath.setenv in autouse=True fixture
Fixes https://github.com/fonttools/fonttools/issues/3078
2023-05-25 12:23:12 +01:00
Cosimo Lupo
31cb8c0a96
define 'noextra' tox env, fold 'nolxml' into that one
and keep all pinned test dependencies inside a single requirements.txt, previously lxml was defined only inside tox.ini
2023-05-24 16:30:57 +01:00
Cosimo Lupo
7f4fe17e5b
Drop Python3.7, require 3.8+
Revert "Revert "Merge pull request #2879 from fonttools/drop-py37""

This reverts commit f21e6768a7e970e3ec0f3c4b818f47f8dfd1c92b.

Which in turn, reverted https://github.com/fonttools/fonttools/pull/2879
2023-02-02 15:34:11 +00:00
Nikolaus Waxweiler
698d8fb387 Add black to lint job
And rename tox' "mypy" env to "lint".
2022-12-13 11:26:00 +00:00
Cosimo Lupo
cf28372e2d
cerry-pick packaging & ci changes from reverted PR #2879 2022-11-14 13:48:39 +00:00
Cosimo Lupo
f21e6768a7
Revert "Merge pull request #2879 from fonttools/drop-py37"
This reverts commit 66a3ec90713375aec5a95d1698ef1521fd432918, reversing
changes made to 82b90236f839fc9fc8e694ddcdee0ad1604d30ec.

A major user of fontTools, RoboFont, will need a bit more time to wean itself from Python 3.7.
We can delay this change by a few more months to give them time to upgrade.
2022-11-14 13:39:18 +00:00
Cosimo Lupo
4baa08c722
tox.ini: force pip to install --only-binary=lxml 2022-11-03 11:54:06 +00:00
Cosimo Lupo
7834cf31cc
tox.ini: update envlist to drop 7 and add 11 2022-11-03 11:39:39 +00:00
Cosimo Lupo
b36247de21
use lxml==4.9.0; 4.9.1 wheel can't be installed on M1 macs
https://github.com/fonttools/fonttools/issues/2676

I hope they fix that in the next release...
2022-11-03 11:33:52 +00:00
Cosimo Lupo
cd6bc3b79e
tox.ini: bump lxml version so we get precompiled wheels for python3.11 2022-11-03 11:26:13 +00:00
Cosimo Lupo
361544ffe2 bump lxml==4.6.4 version to latest 2021-11-15 17:08:55 +00:00
Cosimo Lupo
64299aa4b1 drop Python 3.6, require >= 3.7
3.10 is out next week, while 3.6 reaches end of life by the end of this year.
It's time to require 3.7 or greater, so we can finally use built-in dataclasses and more.

Fixes https://github.com/fonttools/fonttools/issues/2350
2021-09-27 13:21:08 +02:00
Cosimo Lupo
c990a5b4e0
tox.ini: also test on py39 by default 2020-12-09 15:21:39 +00:00
Nikolaus Waxweiler
018a798fdd Add GitHub Actions integration 2020-11-20 10:06:27 +00:00
Cosimo Lupo
933e394105
tox.ini: add download=true to install latest pip inside tox virtualenv 2020-09-28 19:55:12 +01:00
Nikolaus Waxweiler
7a5138d91b Add mypy CI job 2020-09-16 15:13:50 +01:00
Cosimo Lupo
3d705b29de
add 'fontTools' package to default pytest testpaths
so that it will run the embedded doctests when simply invoking 'pytest' with no arguments

see https://github.com/fonttools/fonttools/pull/1957#issuecomment-629116982
2020-05-15 10:42:59 +01:00
Cosimo Lupo
c1f6b4d0f1
tox: add skip_missing_interpreters=true
https://tox.readthedocs.io/en/latest/config.html#conf-skip_missing_interpreters

Runing `tox` with no options runs the tests agaist all the python
environments listed in the `tox.ini`'s `envlist` (currently 3.6, 3.7 and 3.8).

Before this change, if any of these versions was not available, tox would exit with an error. Now it will simply continue (with a warning).

This can be useful when on a developer box, one might only have a subset of all our supported interpreters installed but we don’t want to mark the build as failed because of it.

Note that on the CI I am passing the opposite command line switch to override this setting, because there I want to make sure none of the specified interpreters is skipped.
2020-05-15 10:06:35 +01:00
Cosimo Lupo
9690282f21
don't install lmxl when running '-nolxml' tests
in .travis/run.sh we call tox -e py-nolxml with the XML-related tests
to verify that they work despite lxml not being installed (using ElementTree
backend).
If we install lxml in requirements.txt unconditionally, then we are not
testing the absence of lxml...
2020-04-02 19:51:13 +01:00
Cosimo Lupo
111a1c199a
also run tests with cu2qu compiled with cython 2020-04-02 19:31:08 +01:00
Cosimo Lupo
f66425997f
Enable testing on Python 3.8 2020-03-12 18:31:41 +00:00
Cosimo Lupo
fd5ea97124
tox.ini: pin pytest==5.1.1 to workaround issue with caplog fixture on windows
https://ci.appveyor.com/project/fonttools/fonttools/builds/27126458/job/iomtsu4prflws4xu
2019-09-10 16:03:53 +02:00
Cosimo Lupo
421715b751
travis/appveyor: no longer run tests on python2.7 2019-08-02 11:56:28 +01:00
Cosimo Lupo
ab9472d3ab
tox.ini: use pytest-randomly to randomize test execution
https://github.com/pytest-dev/pytest-randomly
2019-06-11 13:25:27 +01:00
Cosimo Lupo
87894641c0 pytest 4.0 doesn't recognize module name if listed in 'testpaths'
'fontTools' is not a folder name, but the import name of the package
where we have some doctests to be discovered and run.

even though we have --pyargs option (which makes pytest first attempt
to treat any positional arguments as module import names), with the
latest pytest 4.0.0 our tests started to fail as if the new pytest
is evaluating the default 'testpaths' (as defined in setup.cfg, used
when no arguments are supplied to pytest) _before_ the --pyargs
option, and thus it thinks that 'fontTools' is a directory name
instead of a package name...

This a workaround. It also means that if one runs `pytest` without
arguments, only the tests inside `Tests` directory are going to be
run automatically, and not also the doctests inside fontTools package.

When running the test suite using tox, all tests are run, both
those in Tests folder and the doctests in fontTools.
2018-11-15 08:47:20 +00:00
Cosimo Lupo
7059296312
tox: 'twine check' already checks RST, don't need to do it again 2018-11-01 13:23:27 +00:00
Cosimo Lupo
39dd56f552
tox: add env to check package long_description using 'twine check' command
Restrucutred Text is very picky. 3.32.0 release process failed because of some broken rst.
I have to stop doing [skip ci] when I update the changelog... :(
2018-11-01 13:11:12 +00:00
Cosimo Lupo
88b6688fbd
tox: remove unnecessary 'nocov' factor
tox now allows to use exclamation mark to negate an environment factor.
2018-10-18 15:40:32 +01:00
Cosimo Lupo
b1093c8ac1
tox: add extras; allow to test with/without lxml
calling 'tox -e py37-cov-nolxml' will run tests without lxml,
using built-in ElementTree library
2018-10-18 15:40:32 +01:00
Cosimo Lupo
056bd7d967
[travis] use twine to upload to PyPI 2018-09-11 12:09:50 +02:00
Cosimo Lupo
553f23f1db
tox.ini: require at least tox >= 3.0 2018-07-25 19:14:25 +01:00
Cosimo Lupo
d79b2dd6c7
tox/appveyor: don't use TOXPYTHON env var to select basepython; write a pythonX.Y.bat wrapper instead 2018-07-25 19:03:05 +01:00
Cosimo Lupo
6105c41f34
tox.ini: add py37 env 2018-07-24 12:17:59 +01:00
Cosimo Lupo
189d158887 [travis/tox] check syntax of reStructuredText before release
I pushed a NEWS.rst with broken indentation, the PyPI page will
display plan text garbage.

Next time I'll use docutils and do `python setup.py check
--restructuredtext` before pushing a new tag.

Also, I forgot to update .travis.yml to build the dist packages
on python3.6 instead of 3.5 after I modified the tox.ini, so
the automatic release from Travis failed.

This time I had to use twine tool to upload the zip and whl
packages from my local machine to PyPI.

Sorry the mess...
2017-11-21 13:04:12 +01:00
Cosimo Lupo
943b63c7d2 [tox.ini] use python3.6 for testenv:htmlcov 2017-11-21 10:24:43 +01:00
Cosimo Lupo
e5e795ac9f
[tox] don't pass {posargs} to coverage in 'htmlcov' env
The {posargs} are global for the current tox process, and we already use them to pass additional arguments to the pytest command in the default testenv, so we can't at the same time also use them to pass options to coverage.py.

The 'htmlcov' tox environment produces the combined coverage.py report, and store it in htmlcov/index.html; this is listed in the tox.ini 'envlist', so it is run by default at every 'tox' invocation, when no explicit env list is passed via either -e option or $TOXENV variable.

The options to `coverage html` are not much interesting anyway; it's much more useful being able to, e.g., run tox for specific tests matching a string or expression:

$ tox -- -k "feaLib"
2017-04-10 12:23:12 +01:00
Cosimo Lupo
41d5db5bbc
[tox] only test on py27 and py36 when running 'tox' without arguments
When running tox locally during development, there's no need to also test python 3.5.
2.7 and 3.6 are enough, and the CI takes care of the others (3.4, 3.5, pypy, etc.).
2017-04-10 11:42:09 +01:00
Cosimo Lupo
40a61de570
[tox.in] doctests are now run as part of the same pytest command 2017-04-10 11:32:17 +01:00
Cosimo Lupo
cc08ab1050
add munkres to requirements.txt to test varLib.interpolatable 2017-03-07 11:24:16 +00:00
Miguel Sousa
8212916aa4 [varLib tests] Test for interpolatable.py 2017-03-06 03:04:45 -08:00
Cosimo Lupo
223c39f77e
[tox] also run pytest --pyargs fontTools for embedded doctests 2017-01-17 22:14:16 +00:00
Cosimo Lupo
6a6efc7877
[tox] call pytest without --pyargs option
Previously, we were using --pyargs to make sure pytest would run the test suite against the installed package, because our tests
were embedded inside the package and hence importable.

Now that they are placed in an external folder, that option is not needed.
pytest without options will run all the test modules from the default test paths as defined in setup.cfg, i.e Tests/ folder.

The tests will be run against the installed fontTools in the current tox environment.

We also pass {posargs} in the 'htmlcov' tox env, to allow passing extra options after `tox -e htmlcov -- {posargs}` to the `coverage html` command.
2017-01-17 13:29:32 +00:00
Cosimo Lupo
522d826eca
tox.ini: require coverage>=4.3
Coverage 4.3 was released, it includes this patch:
https://bitbucket.org/ned/coveragepy/pull-requests/118/check-source-isdir-not-just-exists-there/diff
2016-12-31 13:34:12 +01:00
Cosimo Lupo
61ab1e7f6d
build sdist/wheel only once for both Github and PyPI
This makes sure we upload the same files to Github Releases and PyPI.

Currently we were building them twice, with the risk of different files
being uploaded to the two repositories.
2016-12-26 19:36:08 +00:00
Cosimo Lupo
17dab6b968
tox.ini: don't skip missing interpreters as it may hide CI configuration issues 2016-12-26 18:39:38 +00:00
Cosimo Lupo
454f60f7b6
tox.ini: use coverage.py instead of pytest-cov; run in --parallel-mode; use codecov instead of coveralls
We no longer use coverage.py through the pytest-cov plugin, as it does not
support --parallel-mode (or at least I wasn't able to figure it out).
We run pytest through `coverage run -m pytest` instead, which does the same
as `pytest --cov`.

Running `tox` locally by default will now run pytest and coverage on 2.7, 3.5 and 3.6; it will then
combine coverage data from all three, and finally generate a coverage report in htmlcov/index.html

We need tp temporarily install coverage.py from the mercurial repo instead of the latest release
because we require a patch that is not available yet with coverage 4.2:
https://bitbucket.org/ned/coveragepy/pull-requests/118/check-source-isdir-not-just-exists-there/diff

Finally, I replaced Coveralls with Codecov, as the latter is better designed and also supports Appveyor.
2016-12-26 18:32:26 +00:00
Cosimo Lupo
667e291501
tox.ini: add py36 to env list
Running `tox` locally will run tests on 2.7, 3.5 and 3.6, by default; in any of these is not found, it will be skipped.
2016-12-25 18:08:00 +00:00