Commit Graph

39 Commits

Author SHA1 Message Date
Calum Lind 08c7f1960f [CI/CD] Fix Tox SSL error in Windows Travis job
The tox sdist-make step failed with SSL: CERTIFICATE_VERIFY_FAILED so
fix by install certifi to ensure updated SSL certificates are available.
2021-03-24 10:25:30 +00:00
Calum Lind 8a4ec493c0 [CI/CD] Add Travis windows build
* Added APPDATA to tox passenv so it is available to common module.
* Fixed windows path issue in httpdownloader tests
* Skipped torrentmanager test due to the following error from loading a
Linux pickled state file with a different line ending.
    ModuleNotFoundError: No module named 'deluge.core.torrentmanager\r'
* Removed appveyor build
2021-02-23 10:41:46 +00:00
Calum Lind 610a1bb313 [Lint] Update pre-commit hook and isort versions
* Fixed black hook requiring Py3.6 to installed locally. Will now assume
Py3.6+ in installed.
 * Added isort traceback in pre-commit flake8 hook fails
 * Updated versions of Black, Prettier and isort
 * Keep Flake8 at 3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638
 * New pyproject config for isort v5 with fixes for Python 2 imports.
 * Fixed travis config to run Python 3.6 for lint run. Replaced the
virtualenv with_system_site_packages config with Travis specific Python
config value so lint run doesn't attempt to append with_system_site_packages
to Python 3.6 command.
2021-01-24 20:40:20 +00:00
Calum Lind eb57412601 [Tests] Fix tox, pytest and travis issues
* Error occurring with Pytest 5.4 so pin to below that version.
 * Fix minor issues with Travis config.
 * Use full command-switches for pytest in tox config.
 * Remove pin for pip as issue with pip-wheel-metadata was fixed in 19.3
 * Remove tox-venv as causing issues of incompatible packages installed.
   The latest versions of the virtualenv package should handle these
   duties.
2020-04-12 17:37:42 +01:00
Calum Lind 8b62e50eb8 [Docs] Add spellchecking with pyenchant
- Use sphinxcontrib.spelling with custom wordlist.
- Skip the checking of the modules documents as they raise
false-positives.
- Add a setup.py spellcheck_docs command.
- Fix spelling and other issues.
- Add a doc favicon.
2019-06-15 21:06:27 +01:00
Calum Lind 957cd5dd9c [Core] Fix SimpleNamespace on Python2 2019-06-08 21:31:49 +01:00
Calum Lind 4212bd6800 [Travis] Add unit test for libtorrent 1.2
Skip test_torrent_error_resume_original_state on libtorrent 1.2 as it
is failing for an unknown reason.

Refs: #3255
2019-06-05 15:09:40 +01:00
Calum Lind 0f92ea401f [Travis] Remove Python2 tests 2019-05-22 14:14:44 +01:00
Calum Lind 260d55aeae [Travis] Fix getting version from git tags
Travis clones the git repo with a shallow depth and the git describe
command cannot find the version tag. Setting depth to 1000 should be
enough but can be increased if required.

Refs:
  https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth
  https://stackoverflow.com/a/51727114/175584
2019-05-22 12:12:54 +01:00
Calum Lind a8fac1381b [Packaging] Cleanup README for Pypi
- Set a minimal Python version 3.5 and remove universal wheels.
- Tidy up the README
- Add Project URL for issues and docs.
2019-05-22 11:15:32 +01:00
Calum Lind 65f6ede8b2 [Docs] Updates and fixes to build on Python 3
- Updates to the sphinx conf
  - Applied Mock fixes to build on Python 3.
  - Group patches at bottom of conf file.
  - Use just a major.minor for version.
  - Specify Sphinx 2.0 version requirement.
- Move requirements.txt to docs dir.
- Add readthedocs config
- Fix docstring code block rst formatting issue.
2019-05-21 15:23:45 +01:00
Calum Lind 97e7d95dd3 Cleanup tox configuration
There were issues with dependencies and tox environments under Python 3
so refactored the tox configuration to be more consistent and clearer.

- Moved travis to default to Python 3 for linting and tests.
- Fixed missing mock for cairo in sphinx config.
- Collated the base deps sections to improve readability.
- Added PYTEST_ADDOPTS env to override pytest verbosity in just tox
  tests as this was a common option being used.
- Renamed env 'testcoverage' to the more concise 'coverage' and moved
  html creation under single env as handy to have this output as well
  as report.
- Cleaned up the isort config for gtk3.
- Added `bad-continuation` to pylint config as conflcts with black
  formatting.
- Fix isort issue with bbfreeze script. This will likely be removed
  in future so just skip sorting it.
2018-11-02 08:47:57 +00:00
Calum Lind d8d094cab6 [Travis] Fix missing pygi gtk3 packages 2018-11-02 08:45:39 +00:00
Calum Lind 0b2cb7539f Cleanup Tox and CI configs
- Use the apt addon for installing libtorrent package.
- Start the py3 test sooner as it is slow to complete.
- Add if conditions for gtkui test dependencies.
- Remove Appveyor tests that are taken care of by Travis.
2018-10-10 18:50:41 +01:00
Calum Lind 6fdbf0ba5d Update tox and CI for Python 3 2018-10-10 17:57:02 +01:00
Calum Lind 9e29fe4111 [Tests] Lint with pre-commit
- Add lint section to tox.
- Replace flake8 with lint on Travis and remove commented out sections.
- Remove flake8 from appveyor to reduce sequential testing time.
2018-10-05 18:45:37 +01:00
Calum Lind 6973f96f8c [Tests] Update tox and CI configs
- Add new requirements files to make it easier to install deps.

- Tox changes
  - Update tox to use new requirements files.
  - Tweak heading styles.
  - Add development environment command `devenv`.
  - Remove testenv command as it would run on devenv creation.

- Travis changes
  - Now uses xenial as trusty is very old now.
  - Trial run disabled to speed up tests.
  - Add tox-venv for Python 3 support.
  - Only install testssl if running security tests.

- Appveyor
  - Add tox-venv for Python 3 support.
  - Use requirements file for non-tox.
  - Remove trial run to speed up testing.
2018-10-05 13:23:45 +01:00
Calum Lind 358ff74d0e [Lint] Format files with Prettier
Use Prettier to auto-format javascript, CSS and YAML files so that less
manual work is involved and style is consistent across project.
2018-10-03 18:16:09 +01:00
DjLegolas b9a9e06c1d [WebUI][Daemon] Enhance TLS Security
This applies the following for both WebUI and Daemon:
1. Raised minimal TLS version to TLSv1.2
2. Added specific cipher suite list
3. Added support for ECDSA auth keys
4. Added support for ECDHE key exchange algorithm

We disabled the ability to perform TLS/SSL renegotiation and therefore
will prevent the clients from renegotiating, which can be exploit for
DoS attacks.

New security tests now will be skipped when running `pydef` and `trial`
testenvs. To run the test, use the testenv `security` or add the environment
variable `SECURITY_TESTS` before running the tests. Also should only run when
adding to the commit message the string `SECURITY_TEST`.
2018-09-06 19:14:13 +01:00
Calum Lind 4e79ed8124 Fix tox config to install latest pip packages
Trial changed command in latest versions of twisted
2017-12-16 17:39:48 +00:00
Calum Lind 4bee1ce811 [Travis] Use current Trusty image
The issue with virtualenv site-packages was fixed: travis-ci/travis-cookbooks#878
2017-10-14 20:00:14 +01:00
Calum Lind ce3a8c0c17 [Travis] Pin to older trusty build 2017-06-17 04:00:22 +01:00
Calum Lind 3b1eeb0818 Use Ubuntu Trusty on Travis 2017-02-23 00:21:33 +00:00
Calum Lind 3ca012ee63 Change libtorrent minimum dependency to 1.1.1
* Change PPA to develop for Travis to use libtorrent 1.1
2017-01-26 12:49:55 +00:00
Calum Lind 874249655d [Tests] Replace isort test with flake8-isort
* Move the known_third_party back to setup.cfg with comments.
2016-11-25 12:43:50 +00:00
Calum Lind ac011d7f55 [Tests] Remove deprecated pip cache setting from travis config 2016-11-03 10:45:01 +00:00
Calum Lind 3a8ed2e9cb [Core] Change deprecated lt.version to lt.__version__ 2016-10-17 12:40:28 +01:00
bendikro b6b1d40516 [Tox] [Travis] Fixes to test config 2016-05-22 12:11:41 +01:00
Calum Lind ac2bbd68db [Tests] Remove flake8 complextity from travis run 2016-05-09 20:10:51 +01:00
bendikro 70d8b65f0a [WebUi] [Core] Fixes to plugin handling and WebUi plugin + tests
This should fix problems with errors occuring when failing to
enable plugins. Errors in plugin handling are handled better
and properly logged.

WebUI plugin in particular had issues when being enabled and disabled
multiple times because it was trying to create DelugeWeb component
each time it was enabled. If deluge-web is already listening on
the same port, enabling the WebUI plugin will fail, and the checkbox
will not be checked.

There are still some issues when enabling/disabling plugins by
clicking fast multiple times on the checkbox.
2016-04-18 15:49:30 +01:00
bendikro 7e971550de Set tox version==2.1.1 due to bug in latest tox 2015-11-22 13:58:37 +00:00
Calum Lind 24b8baf8cc [Travis] Disable broken TODO test 2015-09-25 18:17:29 +01:00
Calum Lind df3a3c77eb Fix travis build version issue
* version.py script requires git tags but detached HEAD in travis clone
   requires manually creating the RELEASE-VERSION.
 * Also fix relative path issue building docs.
2015-08-26 00:27:32 +01:00
bendikro 379ba33bb9 [Tests] Fix Xvfb for GTKUI tests running on TravisCI 2015-08-14 16:45:23 +01:00
bendikro 8d3ba87c63 Temporarily disable testcoverage in travis build 2014-12-01 10:52:16 +00:00
bendikro 448261394f [Tests] Changes to tests and test configs of Travis/tox
* Added pip chaching
* Added disable_new_release_check to tracker icons tests
* Fixed test_torrentview
* Require minimum tox version 1.8
* Fixed GTKUI tests and testcoverage by using xvfb on travis
* Separated the apt dependencies for commands requiering GTKUI deps
2014-12-01 10:52:16 +00:00
bendikro 8334bf9477 [Tests] Various fixes for unit tests and tox
* Added custom trial reporter for TODO with test example in test_torrentmanager.py
* Set Stats plugin tests as todo
* Disable new_release_check when running unit tests
* Added pytest.mark.slow to test_core.test_test_listen_port
* Get rid of unit test warnings (Caused by bad names in test classes)
* Removed warnings.filterwarnings in test files.
* Added separate tox target for generating test coverage HTML report.
2014-12-01 10:52:16 +00:00
Calum Lind 6a5982f3ce Small fixes for Travis and isort 2014-09-25 14:25:03 +01:00
bendikro 66f2739be7 Added .travis.yml (for travis-ci) and tox.ini files
Targets:

* Runs the unit-tests for python 2.7
* Tests unit-test coverage
* Try to build docs
* Code style checks:
  * flake8
  * isort

Codes changes:
* Fixed tests for httpdownloader (using tmp dir)
* Implemented a couple of tests for Stats plugin but they fail to run on travis

Issues:
* Can't get py26 to work because of installing libtorrent through apt and
  the option system_site_packages fails for 2.6.
2014-09-25 14:11:51 +01:00