Default theme that Sphinx uses is not consistent with what we have at
https://tahoe-lafs.readthedocs.io. Being consistent with rtd might
help future doc writers.
Personally, I can't stand working without a VCS hook anymore. It saves me so much time
in context switches from revisiting and revising PRs when I see that the CI run is red.
Much better to fail before I push so I can revise while the relevant changes are fresh
in my head.
In order to start using this, one has to run `$ make build` first. Should I add that
and make other documentation changes in the wiki related to my changes in this PR?
There's no need in almost all cases to run the tests both under the coverage collector
and without it. This fixes the default set of tests to avoid that. Specifically, don't
run tests under the coverage collector by default for all environments since we don't
capture any error or failure conditions on reporting coverage anyways.
While the XML coverage report is useful for consumption by other tools, such as
currently by codecov.io in CI, it's not very useful for humans reviewing the immediate
impact of changes on coverage during local development or while monitoring CI output. I
don't think running the text report takes much more time so I don't see a downside
here.
The [Patches Trac Wiki page](https://tahoe-lafs.org/trac/tahoe-lafs/wiki/Patches) says
that users should run the `codechecks` tox environment, so this change runs it be
default as the full tox test suite eliminating the extra step.
On systems where the default Python is Python 3 (such as on recent Debian/Ubuntu
versions), then `$ tox -e codechecks` has a ton of failures related to Python 3
compatibility. This explicitly forces it to use Python 2.7 until we have Python 3
compatibility.
Without this, git fails underneath towncrier with an "error: Could not
expand include path '~/.gitcinclude'".
See: https://stackoverflow.com/q/36908041
I had added similar for `tox -e py36` in d25c8b1a.
Running "tox -e integration" takes a while. It would be helpful to
run tests from just one file. With this change, we can do that, like
so:
$ tox -e integration -- integration/test_web.py
Or even just one test, like so:
$ tox -e integration -- integration/test_web.py::test_index
With this investigating failing integration tests will be a little
easier, hopefully.
Fixes: ticket:3285
This commit contains a few small changes to fix PyInstaller frozen
builds (which were recently broken in a few ways by changes introduced
with `tahoe invite`, `tahoe daemonize`, and the addition of "setuptools
>= 28.8.0" to setup_requires) and removes a couple of hacks that are no
longer necessary to create working frozen tahoe executables with
PyInstaller.
* use 'extras' for our `[test]` additions instead of abusing 'deps'
* use 'deps' to pre-install 'incremental', which we couldn't do when we
filled it with --editable to get `[test]`
* pre-install 'incremental' to work around a bug that strikes on Travis under
OS-X-10.12 as PyPI gradually disables TLS<1.2. See ticket 2913 for details
* remove redundant configuration lines
* require tox-2.4 or newer, to get 'extras'
refs ticket:2913
https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2913
There appears to be a bug in setuptools, triggered by running "python
setup.py sdist" with setuptools==11.3 in that python's environment, on a
project whose setup.py has a setup_requires= that requests setuptools >=
28.8.0. When setuptools is upgraded from inside setup.py, it gets into a
weird hybrid state where it's using setup() keyword-argument plugins from the
newer setuptools, but those plugins reference functions that aren't present
in the older setuptools, and the sdist command fails with an import
error (module object has no attribute 'check_specifier').
We don't actually need the sdist: all our tox test environments use
"skip_install = true", because we install tahoe via the "deps" line (so we
can get the `[test]` extra, and get a faster symlink-ish "editable" install).
That install uses "pip", which uses the pip inside the new virtualenv, which
either uses a newer version of setuptools (dependent upon what version of
"virtualenv" was installed in the parent environment, next to tox) or somehow
allows setuptools to be upgraded without exposing this weird broken hybrid
state.
Either way, skipping the sdist seems to fix this problem.
refs ticket:2910
https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2910
This avoids a bug in the recent docutils-0.13.1 which throws an exception
when encountering links to SVG images. ReadTheDocs currently does the same.
https://sourceforge.net/p/docutils/bugs/301/ is probably the upstream bug.
closes ticket:2847
This introduces a py.test-based integration suite (currently just
containing magic-folder end-to-end tests). Also adds a tox environment
("integration") to run them.
The test setup is:
- a "flogtool gather" instance
- an Introducer
- five Storage nodes
- Alice and Bob client nodes
- Alice and Bob have paired magic-folders
This executes: check-debugging, check-interfaces, check-miscaptures,
find-trailing-spaces, check-umids, pyflakes.
Other changes:
* fix check-umids.py to take starting points. run it as `check-umids.py
src` instead of `check-umids.py src/allmydata/*.py`
* check-debugging: rewrite in python to run from tox: tox doesn't like
to run shell scripts.
* put check-interfaces.py last: it produces lots of warnings, but passes
anyways. The others only produce significant output if they fail.
Run with "tox -e coverage". Uses a new helper
module (allmydata.test.run_trial) to let us import+execute trial without
knowing exactly where the "trial" binary lives, which helps with using
"coverage run" under tox.
We use "--deps = --editable=.[test]" to achieve three goals:
* make tahoe and it's dependencies available for tests
* use --editable, which is faster and allows "coverage run" to get the
source filenames right
* use the [test] extra, which includes "mock"
Tox's default install command does the first, but doesn't use
--editable, so when the "deps" stage comes around, there's already a
non-editable install in place. It seems to get the [test] extra right,
but it doesn't wind up with an editable install.
So we disable the default install command and rely on the "deps" clause
instead.
One of the buildslaves (Ubuntu wily 15.10) has a very old pip-1.5.6,
which doesn't know how to "pip install" a filepath+extra (like
".[test]") unless --editable is also used.
It's convenient to have --editable set anyways (so you can do subsequent
narrow testing without re-running tox, by running ".tox/py27/bin/trial
TESTCASE" or use .tox/py27/bin/activate), so changing the dependency
from ".[test]" to "--editable=.[test]" is the easiest way to work around
that older buildslave. (I could also have upgraded the buildslave to use
a newer pip, but 15.10 is pretty recent and other people will probably
hit this too, so this way it's fixed for everybody).
refs ticket:2776
Note that Twisted doesn't do anything like Versioneer, so this will
generally show e.g. "Twisted-16.1.0" for the entire interval between
16.1.0 and 16.2.0.
Rewrote in Twisted, which lets us read/scan/print all log lines in
realtime. The output is now correctly interleaved (as well as
maintaining the stdout-vs-stderr of each message). The renamed
--warnings= logfile records all relevant lines from *both* stdout and
stderr (i.e. any that includes "DeprecationWarning"), which handles a
change (perhaps in recent Twisteds?) that emits these warnings on stdout
instead of stderr.
This runs trial against the latest (git) Twisted and Foolscap, to give
us an early warning about anything we're currently doing that will
become deprecated in their next releases.
Tox doesn't run shell pipelines, and is unhappy about running tools that
it didn't install itself (including non-python things like "make"). So
this adds misc/build_helpers/run-deprecations.py, a python script that
runs a given command (i.e. trial) and writes stdout into a separate file
where the buildbot can see it, and counts the "DeprecationWarning" lines
from the file to decide the returncode.
This ought to improve the status display on the buildbot "test
deprecations" step.
Our setup.cfg ensures that 'setup.py update_version' happens early
enough. And doing it from tox's commands= is too late anyways (because
we aren't using Versioneer, so the _version.py file must be updated
before tox installs a static copy into the virtualenv).
The buildbot's main run-trial-with-tox command has been updated to scan
for the 'tahoe --version' output and include the version string in the
buildbot results.
So use 'tox -e check-memory' instead of 'make check-memory'. The tox
version will create a virtualenv and install tahoe for you before
running the tests, removing one use of the 'tahoe @FILENAME' hack (which
was used to run a python file with a PYTHONPATH set to import tahoe's
dependencies).