Commit Graph

734 Commits

Author SHA1 Message Date
Florian Bruhin
0eb12b8fa0 Fix spelling 2016-03-16 06:23:39 +01:00
Florian Bruhin
236572e0f5 Check docs on Travis, take two
We don't regenerate the authors there, as that doesn't work due to Travis
cloning with --depth=50
2016-03-16 06:22:36 +01:00
Florian Bruhin
172611a1b9 Revert "Revert "Check docs on Travis""
This reverts commit cc6d2ddc1d.
2016-03-16 06:19:33 +01:00
Florian Bruhin
cc6d2ddc1d Revert "Check docs on Travis"
This reverts commit f1ec6e1e00.
--depth=50 on Travis messes up author generation
2016-03-15 23:22:19 +01:00
Florian Bruhin
f1ec6e1e00 Check docs on Travis 2016-03-15 22:46:49 +01:00
Florian Bruhin
07d31634c6 Add script to check for doc changes 2016-03-15 22:43:47 +01:00
Florian Bruhin
123de8783f ci/install.py fixup 2016-03-15 19:32:20 +01:00
Florian Bruhin
62db2c724f Try to run Docker on Travis 2016-03-15 19:25:01 +01:00
Florian Bruhin
cc94e7bfee Move ci_install.py to subdir 2016-03-15 19:20:28 +01:00
Florian Bruhin
43a4a6a3e7 Add pkg_resources._vendor.pyparsing when freezing.
This is similar to 85299d293f.
2016-03-02 08:01:47 +01:00
avk
c9bb6d0111 tests for browser.network.pastebin - code refactor 2016-02-22 20:46:22 +01:00
Florian Bruhin
d0e79b2af7 Fix lint 2016-02-19 07:39:17 +01:00
Florian Bruhin
0b362e76ea Move pylint plugins to an installed package.
This means we can now run things like running pylint --version without having
to set PYTHONPATH correctly now.

When using skip_install=true, the plugins wouldn't work as they need to import
qutebrowser.

We have to keep setting PYTHONPATH in run_pylint_on_tests.py, otherwise we get
this error I don't quite understand:

    F:  1, 0: error while code parsing: Unable to load file
    '/home/florian/proj/qutebrowser/git/__init__.py' ([Errno 2] No such
    file or directory: '...') (parse-error)
2016-02-19 07:15:09 +01:00
Florian Bruhin
67b9904772 Include pytest-xvfb properly in frozen tests 2016-02-19 06:52:19 +01:00
Florian Bruhin
504bf6eb3b Remove xvfbwrapper from freeze_tests.py. 2016-02-17 07:45:36 +01:00
Florian Bruhin
07492db9fe Merge branch 'contributing-toxhelp' of https://github.com/flv0/qutebrowser into flv0-contributing-toxhelp 2016-02-12 06:43:10 +01:00
Florian Bruhin
5b66d81f7d Include pstats for frozen tests. 2016-02-11 08:26:31 +01:00
Florian Bruhin
6d11e9ffd8 Fix lint. 2016-02-11 07:17:00 +01:00
Florian Bruhin
45935c86af Rewrite run_profile script.
There's now --profile-tool to select between various tools, a new
--profile-file option, and it uses argparse.
2016-02-11 06:48:16 +01:00
Patric Schmitz
5878cd37fa add CONTRIBUTING to index and asciidoc2html.py 2016-02-10 18:37:46 +01:00
Florian Bruhin
1a42bae627 ci_install: Cleanup, improve messages.
This cleans up the whole script, and outputs nicer folded messages.
2016-02-05 09:24:39 +01:00
Florian Bruhin
41f82b2ad4 travis: Avoid using the default GCE mirror.
We patch sources.list to use the US loudbalancer instead of the hardcoded GCE
mirror which Travis uses by default - because that seems to be quite unstable.
2016-02-05 09:23:52 +01:00
Florian Bruhin
79f83a033d Add a fake clipboard for tests
There are a lot of problems and flakiness with using a real clipboard.

Instead we now have a :debug-set-fake-clipboard command to set a text, and use
logging when getting the contents.

Fixes #1285.
2016-02-03 20:27:11 +01:00
Florian Bruhin
4103e7eba2 Revert "update_3rdparty: add docstring to main()"
This reverts commit 90e88ce0d0.
2016-02-01 20:09:17 +01:00
Florian Bruhin
7be296333a Merge branch 'pdfjs' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs 2016-02-01 20:07:56 +01:00
Florian Bruhin
7a268a41f6 pylint: Don't require docstring for main() funcs. 2016-02-01 20:06:49 +01:00
Daniel Schadt
90e88ce0d0 update_3rdparty: add docstring to main() 2016-02-01 18:14:24 +01:00
Daniel Schadt
63f0171d30 update_3rdparty: add option for pdfjs version
This way we can instruct update_3rdparty to download a specific version
of pdfjs, e.g. to make debugging easier or to match the version of a
system package.

Syntax:
update_3rdparty.py -p 1.2.109
or
update_3rdparty.py --pdfjs=1.2.109

If the command line argument is not given, the script will automatically
download the latest release.
2016-02-01 17:46:16 +01:00
Florian Bruhin
0e6c6d3750 Revert "ci_install: Pin virtualenv to 14.0.3 on Windows."
This reverts commit ec214f4897.
Fixed upstream in virtualenv 14.0.5.
2016-02-01 08:43:42 +01:00
Florian Bruhin
ec214f4897 ci_install: Pin virtualenv to 14.0.3 on Windows.
WORKAROUND for https://github.com/pypa/virtualenv/issues/858
2016-02-01 07:29:41 +01:00
Florian Bruhin
e9662b71f0 Move pytest arguments to pytest.ini.
Closes #1260.
2016-01-24 21:10:22 +01:00
Florian Bruhin
95fe54f010 Avoid running coverage when it's unneeded.
Unfortunately running coverage means our tests need more than a minute longer
to run.

We still run it in the following scenarios:
    - Full 'tox' run
    - On Travis CI on Linux
    - On the buildbot on Archlinux

But not anymore in the following scenarios:
    - When running 'tox -e py35' (or py34)
    - On Travis CI on OS X
    - On AppVeyor
    - On the buildbot except on Archlinux
2016-01-24 20:17:28 +01:00
Florian Bruhin
85299d293f Add pkg_resources._vendor.packaging to freeze.py.
Workaround for https://bitbucket.org/anthony_tuininga/cx_freeze/issues/175/
Also see https://github.com/pyinstaller/pyinstaller/issues/1773

This hopefully fixes AppVeyor builds.
2016-01-24 00:30:26 +01:00
Florian Bruhin
7fa0dc68bf flake8: Add flake8-pep3101 plugin.
Checks for old string formatting.
https://pypi.python.org/pypi/flake8-pep3101/
2016-01-22 19:40:10 +01:00
Florian Bruhin
d5d4e42c64 ci_install: Update Python3 for flake8 env. 2016-01-22 17:33:57 +01:00
Florian Bruhin
af0067526b ci_install: Show Python version. 2016-01-22 17:33:57 +01:00
Florian Bruhin
70cd18fc98 100% coverage for mainwindow/statusbar/prompt.py. 2016-01-11 07:14:51 +01:00
Florian Bruhin
5ddc94bc8d Whitelist prompt.py for 100% coverage check.
It has 100% due to integration tests, but no unit tests yet.
2016-01-10 23:22:44 +01:00
Florian Bruhin
8acbdda00e Don't hide stderr in link_pyqt.py.
We're just hiding useful debug information this way.
2016-01-05 19:17:56 +01:00
Florian Bruhin
2ccb4342a4 Merge branch 'Kingdread-pdfjs' 2016-01-05 19:12:57 +01:00
Florian Bruhin
e603470260 Fix asciidoc2html on Windows.
Windows needs the SystemRoot environment variable set to initialize the crypto
API, what running Python in a subprocess does.

However, we did override the whole environment instead of extending it, which
means this broke on Windows when calling asciidoc:

    Traceback (most recent call last):
      File "C:\asciidoc-8.6.9\asciidoc.py", line 9, in <module>
        import sys, os, re, time, traceback, tempfile, subprocess, codecs, locale, unicodedata, copy
      File "C:\Python27\lib\tempfile.py", line 35, in <module>
        from random import Random as _Random
      File "C:\Python27\lib\random.py", line 885, in <module>
        _inst = Random()
      File "C:\Python27\lib\random.py", line 97, in __init__
        self.seed(x)
      File "C:\Python27\lib\random.py", line 113, in seed
        a = long(_hexlify(_urandom(2500)), 16)
    WindowsError: [Error -2146893795] Provider DLL failed to initialize correctly
2016-01-05 08:00:35 +01:00
Florian Bruhin
5b68092277 Download pdfjs in build_release.py.
freeze.py now optionally includes pdfjs if it's present. This means we don't
need to download it every time to run frozen tests, but we can include it in
build_release.py when building a windows package.
2016-01-05 07:27:58 +01:00
Florian Bruhin
e05bc20885 Revert "Call update_3rdparty before freezing"
This reverts commit 384a9ad923.
2016-01-05 07:22:26 +01:00
Florian Bruhin
a97ba9aa09 Merge branch 'pdfjs' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs 2016-01-05 07:21:26 +01:00
Florian Bruhin
814e6f5959 Fix lint. 2016-01-05 07:16:39 +01:00
Florian Bruhin
eefc94fb4d Fix build_release.py with inexistent dist-dir. 2016-01-05 07:14:11 +01:00
Florian Bruhin
8ab0b5b4ac Use build_release.py to build sdist on Linux.
See #1091.
2016-01-05 06:54:37 +01:00
Florian Bruhin
8d63f2bf93 www: symlink quickstart.html correctly.
Fixes #1203.
2016-01-04 22:51:01 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Daniel Schadt
be0eb0b1cd Add pdfjs.is_available to vulture whitelist
vulture reports it as a false-positive, it's used in the tests but not
picked up by vulture.
2015-12-20 20:08:24 +01:00
Daniel Schadt
49ed04715e Remove unused tempfile import 2015-12-20 19:24:41 +01:00
Daniel Schadt
a072cf0175 Fix update_3rdparty on windows
You cannot open a file twice on windows, so the call to
urllib.request.urlretrieve was invalid, since we already opened the
temporary file. urlretrieve without a filename will automatically create
and return a temp-file, so we're fine.
2015-12-20 19:24:41 +01:00
Daniel Schadt
384a9ad923 Call update_3rdparty before freezing 2015-12-20 19:24:41 +01:00
Daniel Schadt
c3f2cb02c8 pdfjs: adjust path in scripts/dev/misc_checks.py 2015-12-20 19:24:41 +01:00
Daniel Schadt
d7d577b1fa Fix pep8/pylint 2015-12-20 19:24:41 +01:00
Daniel Schadt
0095b72e03 Update pdfjs path in freeze.py 2015-12-20 19:24:41 +01:00
Daniel Schadt
ef85d1af4c Move pdfjs and use original files
* No modified pdfjs installation needed
-> Groundwork for using a system-wide installation

* Script update_3rdparty.py to download and upack the latest pdfjs
  release
2015-12-20 19:24:41 +01:00
Daniel Schadt
60b9d7e6c3 Fix lints 2015-12-20 19:24:41 +01:00
Daniel Schadt
1882fb6006 Add pdf.js in frozen distribution 2015-12-20 19:24:41 +01:00
Florian Bruhin
f342f129c6 Refactor how use_color is set in scripts/utils. 2015-12-02 18:14:34 +01:00
Florian Bruhin
eff0e4c7cc pylint: Enable useless-suppression globally.
We deactivate it locally where needed, i.e. where we are sure it's some
platform-specific thing.
2015-12-01 23:01:09 +01:00
Florian Bruhin
109984c96e pylint: Check attr-defined-outside-init for tests. 2015-12-01 22:41:16 +01:00
Florian Bruhin
788a096150 pylint: Ignore import-error globally for tests. 2015-12-01 22:03:59 +01:00
Florian Bruhin
150a83d8f4 pylint: Remove unneeded supressions. 2015-12-01 22:03:58 +01:00
Florian Bruhin
81f522336f Do PYTHONPATH shenanigans in run_pylint_on_tests.
If we do it in tox.ini, there are two drawbacks:

- We have more stuff in PYTHONPATH even if we don't when actually using
  qutebrowser.
- The separator is platform specific, so we can't easily do this in a portable
  way in tox.ini.
2015-12-01 08:07:42 +01:00
Florian Bruhin
9cce8fe825 Adjust vulture whitelist for pylint changes. 2015-12-01 07:48:33 +01:00
Florian Bruhin
6f9b02741a Switch from map() to list comprehensions. 2015-12-01 07:16:32 +01:00
Florian Bruhin
101f81844c pylint: Adjust custom checkers for astroid 1.4.
Otherwise we'd run into https://bitbucket.org/logilab/pylint/issues/711
2015-12-01 07:10:39 +01:00
Florian Bruhin
a9de97968d Make pylint shut up about ua_fetch.py. 2015-11-30 07:12:18 +01:00
Florian Bruhin
2ba55a0e77 Split generate_settings in src2asciidoc. 2015-11-30 07:11:03 +01:00
Florian Bruhin
f577da9a6b Disable App Nap on OS X on Travis. Fixes #1143. 2015-11-27 17:50:19 +01:00
Florian Bruhin
0d60ec43ed Regenerate docs. 2015-11-23 13:26:32 +01:00
Florian Bruhin
16e1a65448 Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page 2015-11-23 13:16:16 +01:00
Florian Bruhin
049102c644 Regenerate authors. 2015-11-23 11:24:40 +01:00
meles5
401f71236d pylint: disable too-many-statements 2015-11-20 21:53:28 +01:00
meles5
b9240924d2 Seperated into two lines 2015-11-20 21:39:17 +01:00
meles5
d9f1699a3b Improved website titles 2015-11-20 21:12:06 +01:00
Daniel Schadt
fe1c8ee4e8 Also add cherrypy.wsgiserver.wsgiserver3 to freeze 2015-11-20 15:27:17 +01:00
Daniel Schadt
cb40b1020c Add cherrypy.wsgiserver to frozen tests 2015-11-20 14:00:17 +01:00
Florian Bruhin
271cb47f87 Merge branch 'netrc' of https://github.com/Konubinix/qutebrowser into Konubinix-netrc 2015-11-18 20:38:57 +01:00
Daniel Schadt
3438a45b19 Merge branch 'master' into download-page 2015-11-18 19:27:26 +01:00
Florian Bruhin
202fc8a5bd Only run codecov once.
Otherwise coverage diffs make no sense...

This reverts commit daaa15396c.
2015-11-18 17:47:26 +01:00
Samuel Loury
0298fcc841 Use credentials from netrc when available 2015-11-18 16:44:45 +01:00
Florian Bruhin
a845bf22ff ci_install: Clean up PyQt URL. 2015-11-18 08:28:35 +01:00
Florian Bruhin
3251bd8419 doc: Merge "error800"/"Error 800" in author list. 2015-11-18 08:12:02 +01:00
Florian Bruhin
dcfa73cf91 AppVeyor: Use PyQt 5.5.1. 2015-11-18 08:08:40 +01:00
Florian Bruhin
89e3c2a703 Fix lint. 2015-11-18 07:43:10 +01:00
Florian Bruhin
b735d079d5 Merge branch 'www' 2015-11-18 07:02:40 +01:00
Florian Bruhin
7239f7bb68 www: Don't build unneeded files. 2015-11-18 06:54:59 +01:00
Florian Bruhin
98fbdde846 www: Remove author line/asciidoc vars from output. 2015-11-18 06:51:46 +01:00
Florian Bruhin
244d86c85a www: Make script work if output path exists. 2015-11-18 06:41:40 +01:00
Florian Bruhin
ad5988513b Fix lint. 2015-11-17 20:28:27 +01:00
Florian Bruhin
0ccd19f980 Fix lint. 2015-11-17 20:10:53 +01:00
Florian Bruhin
ea5484c3a2 Fix nitpicks. 2015-11-17 19:46:24 +01:00
Florian Bruhin
f20ffca540 Merge branch 'issue923' of https://github.com/lamarpavel/qutebrowser into lamarpavel-issue923 2015-11-17 19:43:35 +01:00
Florian Bruhin
4b531d142b Regenerate authors. 2015-11-17 19:30:51 +01:00
Lamar Pavel
d745819715 Improve script to print entries grouped by browser
The ua_fetch.py has been re-written entirely to find specific entries for
each browser based on diversity rather than sole popularity. The output
is now formatted to print the entries for each browser grouped together.
2015-11-14 15:57:24 +01:00
Florian Bruhin
9607fae935 Skip check_coverage.py with --lf. 2015-11-13 22:43:12 +01:00
Florian Bruhin
1da7996c3b Style fixes. 2015-11-13 22:27:41 +01:00
Florian Bruhin
256352024b Fix lint. 2015-11-11 22:39:17 +01:00
Florian Bruhin
ad8c9988f0 Fix lint. 2015-11-11 22:23:43 +01:00
Florian Bruhin
f0083adfb5 Remove unused import. 2015-11-11 21:14:26 +01:00
Florian Bruhin
15b77bf2e9 Fix catchlog move in run_frozen_tests.py. 2015-11-11 21:13:48 +01:00
Florian Bruhin
e25ae49c0e Use os.path.commonprefix to get common path.
os.path.commonpath is only available on Python 3.5.
2015-11-11 21:11:14 +01:00
Florian Bruhin
3680f01576 Switch to pytest 2.8.
Closes #1077.

There were two issues:

- Paths for coverage.py suddenly were absolute instead of relative, so we strip
  the common base part if that happens.

  /home/florian/proj/qutebrowser/git/qutebrowser/browser/cookies.py has 100%
  coverage but is not in perfect_files!
  /home/florian/proj/qutebrowser/git/qutebrowser/browser/http.py has 100%
  coverage but is not in perfect_files!
  [...]

- There was an io.UnsupportedOperationError in test_check_coverage.py because
  of pytest-faulthandler, so we just don't load that in the subprocess.
2015-11-11 20:57:47 +01:00
Florian Bruhin
7cddd52b2d Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page 2015-11-10 22:39:07 +01:00
Florian Bruhin
250f0e7410 Merge branch 'test-browser-cache-more' of https://github.com/lamarpavel/qutebrowser into lamarpavel-test-browser-cache-more 2015-11-10 18:57:28 +01:00
Lamar Pavel
aaf62fc6d0 Add cache tests to perfectly covered files. 2015-11-10 03:49:18 +01:00
Florian Bruhin
0162583444 Fix check_coverage.py return value. 2015-11-09 20:07:08 +01:00
Daniel
c2218f51cd Add mhtml.last_used_directory to vulture whitelist 2015-11-09 17:01:08 +01:00
Florian Bruhin
ac10fbc095 Handle qute:... handlers in run_vulture. 2015-11-04 17:45:16 +01:00
meles5
6d6ef1e386 tox fixes 2015-10-30 14:52:09 +01:00
meles5
7cb462ff82 Improved the folder-copy function 2015-10-29 16:52:38 +01:00
meles5
1488f59d8f Close file 2015-10-29 16:33:20 +01:00
meles5
f807842a52 Improved code style 2015-10-29 16:30:25 +01:00
meles5
8600acddb1 Moved everything into one block and used with to open files 2015-10-29 15:41:57 +01:00
meles5
8de3f8d487 Improved script 2015-10-27 22:24:28 +01:00
Florian Bruhin
8004508b3c wip 2015-10-27 17:57:06 +01:00
Florian Bruhin
9b104b0af7 ci_install: Update installed packages. 2015-10-27 17:54:23 +01:00
Florian Bruhin
fc573963f4 Fix lint. 2015-10-26 08:43:55 +01:00
Florian Bruhin
4e48e3d725 ci_install: Only install codecov when needed. 2015-10-26 07:37:20 +01:00
Florian Bruhin
cf623f0d8d ci_install: Also install codecov on OS X. 2015-10-26 07:34:56 +01:00
Florian Bruhin
14334dce21 Don't remove coverage.xml on CI. 2015-10-23 19:14:46 +02:00
Florian Bruhin
67a0a6b944 Try codecov. 2015-10-23 19:14:46 +02:00
Florian Bruhin
daf81f5fcd www: Working website generation. 2015-10-21 07:31:47 +02:00
Florian Bruhin
f6fffee9d3 www: Keep modified sources if building failed. 2015-10-21 07:19:04 +02:00
Florian Bruhin
b12cfa9d05 Fix filters in run_vulture.py. 2015-10-20 23:31:46 +02:00
Florian Bruhin
db350719d5 Make run_vulture.py more modular. 2015-10-20 23:25:50 +02:00
Florian Bruhin
4f4dfb1e31 Add arguments to run_vulture.py. 2015-10-20 22:48:01 +02:00
Florian Bruhin
0187dd6ac6 Add get_coredumpct_traces script. 2015-10-20 21:26:53 +02:00
Florian Bruhin
7d026efbfb Revert "travis: Patch PyQt on OS X."
This reverts commit 5fce514168.
2015-10-20 18:14:25 +02:00
Florian Bruhin
e03068ed84 Start adding website features to asciidoc2html. 2015-10-20 18:13:31 +02:00
Lamar Pavel
7703fa217b Add some UAs manually for diversity
The automatically fetched list includes popular user-agents but does not
guarantee any kind of diversity, so there are now a few statically
printed UAs from mobile browsers.
2015-10-20 17:28:22 +02:00
Florian Bruhin
71a150af22 Refactor asciidoc2html.py. 2015-10-20 06:54:43 +02:00
Lamar Pavel
332df99a77 Add docstring to new script 2015-10-20 03:28:27 +02:00
Lamar Pavel
6ebb37aa17 Update UA list and add script to fetch UAs
The script is based on a gist posted by @averrin and has been modified
to print the output according to the format expected by qutebrowser,
ready to be pasted into configtypes.py.
2015-10-20 02:52:11 +02:00
Florian Bruhin
5fce514168 travis: Patch PyQt on OS X.
This is to circumvent https://github.com/Homebrew/homebrew/issues/45114
The build takes a lot longer now, but at least it works.
2015-10-19 17:29:01 +02:00
Florian Bruhin
4bb1a37cf1 Rename travis fold name. 2015-10-15 22:22:28 +02:00
Florian Bruhin
309be9b057 Use travis_fold on ci_install.py. 2015-10-15 21:46:24 +02:00
Florian Bruhin
67ecd93326 Spell-check committing and existent. 2015-10-14 06:56:13 +02:00
Florian Bruhin
ffab11c871 Install tox for eslint on Travis. 2015-10-08 06:24:31 +02:00
Florian Bruhin
0960f229f0 Get rid of ci_run.py again. 2015-10-07 23:12:33 +02:00
Florian Bruhin
0845671165 Start Xvfb for CI from tests. 2015-10-07 23:05:39 +02:00
Florian Bruhin
94d88e280b tox: Add pytest-sugar.
Nicer test output FTW!
2015-10-07 22:13:22 +02:00
Florian Bruhin
2918f33569 Include xvfbwrapper when freezing tests. 2015-10-07 17:06:19 +02:00
Florian Bruhin
7e2ae9f39f Also install nodejs-legacy on Travis.
This is needed to get /usr/bin/node which npm/eslint seem to use.
2015-10-06 07:32:22 +02:00
Florian Bruhin
439c00f32a Run eslint on Travis.
See #773.
2015-10-06 07:10:32 +02:00
Florian Bruhin
d094a495cc Avoid apt-get on Travis if possible.
This should speed up builds as no apt-get update is needed.
2015-10-06 07:10:32 +02:00
Florian Bruhin
d9018fed14 Don't install python-dev packages on Travis.
Those don't seem to be needed anymore.
2015-10-06 07:10:32 +02:00
Florian Bruhin
aa9498bb41 Add separate testenv for vulture. 2015-10-06 07:10:32 +02:00