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.
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
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.
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...
'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.
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... :(
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...
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"
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.).
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.
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.
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.