Commit Graph

121 Commits

Author SHA1 Message Date
Wes Turner
b2b6d240a7 BLD: tox.ini: flake8: add whitelist_externals for latest tox instead of adding dep, pass posargs through 2020-02-10 17:25:54 -05:00
Takeshi KOMIYA
e7a0af807a Merge branch '2.0' 2020-01-30 23:29:32 +09:00
Takeshi KOMIYA
f8fc6075ba Merge pull request #7049 from tk0miya/test_with_docutils-0.16
Test with docutils-0.16
2020-01-23 23:48:40 +09:00
Takeshi KOMIYA
00a4c13d0b Add new extras_require: lint 2020-01-23 01:42:33 +09:00
Takeshi KOMIYA
ee28dace61 Use HEAD of html5lib on testing with py39 2020-01-23 01:11:51 +09:00
Takeshi KOMIYA
0bca63d611 Test with docutils-0.16 2020-01-23 00:50:57 +09:00
Takeshi KOMIYA
0e0930d712 test: Testing with docutils-0.16rc1 2019-12-21 11:38:31 +09:00
Takeshi KOMIYA
42f6b91333 CI: Pinning coverage < 5.0 2019-12-15 20:40:59 +09:00
Takeshi KOMIYA
faedcc48cc Fix #6887: Sphinx crashes with docutils-0.16b0 2019-12-14 13:33:12 +09:00
Takeshi KOMIYA
81736cc828 Test with docutils-0.14 (previous release) 2019-08-02 01:53:41 +09:00
Takeshi KOMIYA
5d2c8e6eb7 Add utils/doclinter.py; a documenter linter for Sphinx 2019-05-12 17:57:25 +09:00
Takeshi KOMIYA
00a5aa7301 Add extra requirements for docs (refs: #6336) 2019-05-04 12:42:17 +09:00
Takeshi KOMIYA
fcb22f2074 Merge pull request #5832 from stephenfin/bindep-integration
Add bindep integration
2019-02-17 18:25:26 +09:00
Takeshi KOMIYA
d6fc5c9095 Stop to use $SPHINX_TEST_TEMPDIR envvar
At once, we added $SPHINX_TEST_TEMPDIR to keep intermediate files of
testing to investigate the failures.  At present, we've used pytest
as a test runner.  And it keeps temporary directories of last 3
testings.  So this starts to use it instead of $SPHINX_TEST_TEMPDIR.
https://docs.pytest.org/en/latest/tmpdir.html#the-default-base-temporary-directory
2019-01-13 23:50:18 +09:00
Stephen Finucane
3e2f680af3 Add bindep integration
The bindep (BINary DEPendency automation) tool is a tool for checking
the presence of binary packages needed to use an application / library.
Use it to specify the dependencies needed to successfully pass the LaTex
tests. Only Fedora targets are currently provided.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 14:46:34 +00:00
Takeshi KOMIYA
9dfc5e7efe Add docutils-stubs to test deps 2018-12-15 02:42:43 +09:00
Jon Dufresne
fc5aedd378 Simplify tox configuration with 'extras' option
https://tox.readthedocs.io/en/latest/config.html#conf-extras

> extras(MULTI-LINE-LIST)
>
> New in version 2.4.
>
> A list of “extras” to be installed with the sdist or develop install.
> For example, extras = testing is equivalent to [testing] in a pip
> install command.
2018-11-12 08:17:22 -08:00
Takeshi KOMIYA
2810f77edd Merge branch '1.8' 2018-11-09 22:10:35 +09:00
Takeshi KOMIYA
8adb20cc42 Give install_command to tox
Since tox-3.2.0, 'usedevelop' option and 'deps=.[test,websupport]'
option have been conflicted.  As a workaround, this adds
'install_command' option to avoid the situation.
2018-11-09 00:51:13 +09:00
Takeshi KOMIYA
8b687ac304 Merge branch '1.8' 2018-11-01 01:24:12 +09:00
Takeshi KOMIYA
c2590a45c1 test: Give filterwarnings=all by ini file
Since pytest-3.9, precedence order of warning options had been
changed.  This moves ``-W all`` option into setup.cfg.

In detail, see https://github.com/pytest-dev/pytest/issues/3946
2018-10-30 00:01:39 +09:00
Jon Dufresne
b36cc52c7d Remove pypy from tox.ini
The pypy executable is Python 2 and Python 2 support was dropped in
commit 9412bd76b7.
2018-09-07 16:15:20 -07:00
Takeshi KOMIYA
aa3e590d5e Merge pull request #5370 from tk0miya/drop_deprecated_methods
Drop APIs deprecated in 2.0
2018-09-05 22:56:02 +09:00
Takeshi KOMIYA
a7cab001d9 Drop APIs deprecated in 2.0 2018-09-03 00:31:33 +09:00
Takeshi KOMIYA
98a9b50c52 Drop docutils 0.11 support 2018-08-30 01:03:57 +09:00
Takeshi KOMIYA
9412bd76b7 Drop python 2.7 and 3.4 support 2018-08-30 01:03:57 +09:00
Takeshi KOMIYA
6754b531b9 Do test with py37 2018-07-28 19:12:35 +09:00
Stephen Finucane
93589a3572 tox: Run everything but unit tests under Python 3
The demise of Python 2.7 is not far off and we intend to drop support
for it in Sphinx 2.0. As a result, there probably isn't a better time
than now to start testing with Python 3 by default. There are a couple
of advantages to this:

- flake8 is stricter under Python 3 and we don't need to ignore files
  with Python 3 syntax
- We get to dogfood Sphinx against its own documentation using Python 3
- pylint gains support for Python 3 syntax

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-06-20 09:53:29 +01:00
Takeshi KOMIYA
cd08872cc0 Fix existence check for JRE was broken 2018-03-20 23:35:42 +09:00
Takeshi KOMIYA
3430610a0f test: pass PYTEST_ADDOPTS to pytest 2018-02-04 22:48:45 +09:00
Stephen Finucane
4420b43e5a tox: Ignore distutils deprecation warning
distutils/__init__.py:4: DeprecationWarning: the imp module is
    deprecated in favour of importlib; see the module's documentation
    for alternative uses
      import imp

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-01-15 09:09:53 +00:00
Takeshi KOMIYA
23533e48b2 Update PYTHONWARNINGS on tox.ini to reduce meaningless warnings 2018-01-06 20:14:20 +09:00
Takeshi KOMIYA
e3efe5884b Fix #4378: tox: use usedevelop option instead skipsdist 2018-01-05 22:26:07 +09:00
Stephen Finucane
60e25090a3 tox: Enable 'skipsdist'
Given that we install Sphinx as part of the dependencies, there's no
reason to do it twice. Skip that step.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-29 13:02:33 +00:00
Stephen Finucane
9a3ebaaff5 Resolve warning filter issues
There's an issue with 'pkgutils' and namespace packages. This has been
reported against setuptools [1], but until this is resolved, we simply
need to live with it. Ensure said warnings are filtered from tox too and
remove some unnecessary ones.

[1] https://github.com/pypa/setuptools/issues/1111

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-29 13:02:32 +00:00
Stephen Finucane
7c0723fd46 tests: Remove 'tests/run.py'
This is no longer necessary. One test needs to be modified to deal with
how 'python -m pytest' modifies the PATH.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-29 13:02:31 +00:00
Takeshi KOMIYA
626e8980cd Merge pull request #4337 from stephenfin/the-great-toxification
The great toxification (part 6)
2017-12-27 15:29:16 +09:00
Stephen Finucane
77ca894723 tox: Report coverage to user
Run 'coverage report' after a successful coverage run. There's enough
coverage-related stuff here at this point to warrant its own section.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-24 21:24:41 +00:00
Stephen Finucane
a3f9935d95 travis: Enable codecov coverage
This necessitates adding some basic coverage-py configuration [1] and
making sure the pytest-cov plugin uses said configuration [2]. Badges
are included.

Note that we do not run the 'coverage' tox target, which is reserved for
users.

[1] https://github.com/codecov/example-python
[2] https://bitbucket.org/ned/coveragepy/issues/512/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-24 21:24:41 +00:00
Stephen Finucane
411055905c tox: Add 'PERL5LIB' to 'passenv' list
This is required by 'makeinfo'.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes #4339
2017-12-24 14:47:31 +00:00
Stephen Finucane
a2a873d58a tox: Add documentation for all targets
This should make 'tox -av' more helpful.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-19 15:55:10 +00:00
Stephen Finucane
fd1df0815b tox: Make further use of factor-conditional deps
This is how we reduce boilerplate [1]. Succinctness FTW.

[1] https://tox.readthedocs.io/en/latest/config.html#factors-and-factor-conditional-settings

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
Stephen Finucane
5d812ccefc tox: Add 'coverage' target
Enabling coverage results in an increase in runtime, and while this may
be an acceptable compromise for some developers, it's not necessarily
something we need to run all the time. Move it to a separate target so
it can be run only by those who wish to use it.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
Stephen Finucane
e243e82723 tests: Ignore tests using 'collect_ignore'
Per the pytest docs [1], this is the preferred way to ignore tests. This
necessitates removing the 'test-async' target as it no longer makes any
sense.

[1] https://docs.pytest.org/en/latest/example/pythoncollection.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
Stephen Finucane
a102e8e29b setup.py: Include 'flake8' in 'test' requirements
We are using this in our testing and actually need it for the flake8
plugin, so include this in the list of 'test' requirements.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 19:44:05 +00:00
Stephen Finucane
67753b7ce3 Remove 'test-reqs.txt'
We were never really using this file for its specified purpose [1]. Now
that we have everything cleanly organized in 'setup.py', there really
isn't any reason to keep it around. Remove it.

[1] https://caremad.io/posts/2013/07/setup-vs-requirement/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:13:09 +01:00
Stephen Finucane
eb8efce7d8 requirements: Reduce duplication
Simply installing packages will ensure that most of the dependencies in
'setup.py' are installed, meaning 'test-reqs.txt' need only contain
those necessary for testing.

The only notable change is that the 'simplejson' module is dropped from
the requirements list. This included as a dependency for the PyPy
target, but it appears that this is not necessary today (though it may
have been when the target was added in 2011).

This retains 'setup.py test' which, as noted in the tox docs [1], is
sometimes expected for downstream distribution testing. We may wish to
find a way to synchronize requirements between 'test-reqs.txt' and this
section in the future, but that's work for another day.

[1] https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:06:10 +01:00
Stephen Finucane
6086d7b608 tox: Don't bother setting 'PYTHONDONTWRITEBYTECODE'
As I've previously discovered [1], this doesn't actually do anything in
modern tox. Simply remove it.

[1] https://review.openstack.org/#/c/369986/

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
e023c296e8 tox: Pass posargs to docs
This allows us to do something like the following:

  tox -e docs -- -b man

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00
Stephen Finucane
40c8f661ef tox: Ensure 'mypy' targets runs with Python 3.x
Turns out this requires Python 3.2 at a minimum. Who knew? We don't
support Python 3.1 so simply fix to 'python3'.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 09:59:08 +01:00