summaryrefslogtreecommitdiffstats
path: root/docs/source/conf.py
Commit message (Collapse)AuthorAge
* [Docs] Remove custom mock to fix autodoc typing errorsCalum Lind2022-02-15
| | | | | | | | | | | | | | | | | | If a libtorrent return type was specified e.g. def get_lt_status(self) -> 'lt.torrent_status' Even as a string autodoc_typehints module would raise and error: Handler <function process_docstring at 0x7f6c16c8ec10> for event 'autodoc-process-docstring' threw an exception (exception: getattr(): attribute name must be string) This was a result of using a custom mock in Sphinx autodoc config and this Mock object name or qualname returns an object instead of str. Testing with putting modules in autodoc_mock_imports again showed no issues so removing custom mock Ref: https://github.com/tox-dev/sphinx-autodoc-typehints/issues/220
* [Core] Document all exported core methods with type hintsChase Sterling2022-02-11
| | | | | | | | | | | | | | | Standardize docstrings in core.py to google standard. Remove type hints in docstrings in favor of the ones in method signatures. Use function signature type hints in autodoc generated docs. Change Deferred type hints to strings. Older versions of twisted (<21.7) don't support generic Deferred type hinting, this prevents crashes on those versions. Closes: https://github.com/deluge-torrent/deluge/pull/359
* Revert "[Core] Document all exported core methods with type hints"Calum Lind2022-02-05
| | | | | | | | | | | | | | | Typing is broken with older versions of Twisted e.g. with v21.2 deluge/deluge/core/core.py", line 404, in Core ) -> defer.Deferred[str]: TypeError: 'type' object is not subscriptable Also it might not be compatible with Python 3.6 or 3.7 with use of certain types such as dict rather than Dict This reverts commit 4096cdfdfe4fc7e42746cedd868bd7d8fea99f23. Ref: https://twistedmatrix.com/trac/ticket/9816
* [Core] Document all exported core methods with type hintsChase Sterling2022-02-05
| | | | | | | | | Standardize docstrings in core.py to google standard. Remove type hints in docstrings in favor of the ones in method signatures. Use function signature type hints in autodoc generated docs. Closes: https://github.com/deluge-torrent/deluge/pull/359
* Upgrade codebase with pyupgrade (>=py3.6)DjLegolas2021-12-29
| | | | | | | | Added pyupgrade utility with manual stage to pre-commit and run on all files. Ref: https://github.com/asottile/pyupgrade Closes: deluge-torrent/deluge#326
* Remove all Python 2 supportdeluge-2.1.0.dev0DjLegolas2021-12-28
| | | | | | | | | * Removed all __future__ imports from code * Removed all six dependencies * Removed all future_builtins imports * Removed all Python 2 related code Closes: deluge-torrent/deluge#325
* [Docs] Replace recommonmark with MyST parserCalum Lind2021-12-12
| | | | | | | | | | | We used recommonmark so that we can use markdown in sphinx but it is buggy and now so switch to better supported MyST-parser. * Fixed incorrect heading warnings in markdown. * Added sphinx toctree to markdown using directive as required by MyST. * Upgraded Sphinx to 4.3 Ref: https://myst-parser.readthedocs.io
* [Lint] Fix spelling mistakesCalum Lind2021-09-21
| | | | | | | A quick fix of some of the mistakes caught by codespell. Updated readme with new IRC server Useful to add it as part of linting checks.
* [Docs] Add spellchecking with pyenchantCalum Lind2019-06-15
| | | | | | | | | - 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.
* [Docs] Cleanup changelog and docsCalum Lind2019-06-06
|
* Simplify the get_version methodCalum Lind2019-06-06
| | | | | | | Use post segment instead of dev for non-dev tags. Default to 'deluge-' and '.dev0' to simplify getting version. Refactor to use subprocess.check_output Use deluge.common.get_version as fallback in docs conf.
* [Docs] Updates and fixes to build on Python 3Calum Lind2019-05-21
| | | | | | | | | | | - 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.
* [Docs] Fix recommonmark monkey patch and pin versionCalum Lind2019-03-29
| | | | | | The refactored patch did not work so revert it. A new release of recommonmark breaks the docs build so pin it to working version.
* [Docs] Fix formatting of exported docstringsCalum Lind2018-11-16
|
* [Dependency] Remove bundled rencodeCalum Lind2018-11-02
|
* Cleanup tox configurationCalum Lind2018-11-02
| | | | | | | | | | | | | | | | | | | 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.
* [Docs] Fix mocking external modulesCalum Lind2018-11-02
| | | | | | | | | | | | | With move to GTK3 needed to update the mocking of external modules. There is a new autodoc option `autodoc_mock_imports` so use this instead of the custom mock class. There are some build warnings output using autodoc mock: TypeError: unsupported operand type(s) for |: '_MockObject' and '_MockObject' Will resolve these later as the build passes.
* [GTK3] Change module structure from ui/gtkui to ui/gtk3Calum Lind2018-11-02
| | | | | This moves the directory structure so that there is no conflict with the old gtk2 UI. Also changes the conf and state files being loaded.
* [Docs] Move apidoc command to Sphinx configCalum Lind2018-11-02
| | | | | | | | | The apidoc modules were not being generated on ReadTheDocs because there is no way to run sphinx-apidoc manually. Moved the running of sphinx-apidoc into conf.py. Added zope.interface minimum version to fix Readthedocs warning.
* [Docs] Fix build errors getting Deluge versionCalum Lind2018-11-01
| | | | | | | | | | The use of pkg_resource.require caused an unwanted requirements lookup that errored out the sphinx build when no dependencies are installed. This is fixed by switching to pkg_resources.get_distribution. Also changed the tox docs env to not install Deluge as the setup.py now contains install_requires which is unwanted.
* [Docs] Reorganise and add sections from wikiCalum Lind2018-11-01
| | | | | | | | | | | | | | | | | | | - Change the layout and contents of docs to be better organised and follow ideas from: https://www.divio.com/blog/documentation/ - Use markdown for non-technical documents to speed up writing. - Added new sections and imported documents from Trac wiki. Build fixes: - Added a patch to fix recommonmark 0.4 and doc referencing: https://github.com/rtfd/recommonmark/issues/93 - Set docs build in tox to Py2.7 since there are problems with autodoc mocking multiple inheritance on Python 3 resulting in metaclass errors. - Supressed warning about `modules.rst` not in the toctree by creating a static `modules.rst` with `:orphan:` file directive and add to git. Also skip creating this toc file with sphinx-apidoc in setup and tox. - Simplified finding exported RPC and JSON API methods by adding an autodoc custom class directive. Removed unneeded __rpcapi.py.
* [Docs] Add markdown supportCalum Lind2018-10-04
| | | | | | | | | - Use recommonmark to enable use of markdown files in docs. - Fix theme not specified - Remove unused spelling module. - Cleanup mocking modules in conf so building docs requires only Sphinx. - Simplify tox section, including use of requirements-docs file. Added slimit dependency for sdist-ing deluge package.
* [Lint] Use Black to auto-format codeCalum Lind2018-10-03
| | | | | | | | | | | | | | | | | The move to using auto-formatter makes it easier to read, submit and speeds up development time. https://github.com/ambv/black/ Although I would prefer 79 chars, the default line length of 88 chars used by black suffices. The flake8 line length remains at 120 chars since black does not touch comments or docstrings and this will require another round of fixes. The only black setting that is not standard is the use of double-quotes for strings so disabled any formatting of these. Note however that flake8 will still flag usage of double-quotes. I may change my mind on double vs single quotes but for now leave them. A new pyproject.toml file has been created for black configuration.
* Fix the docs run failing on TravisCalum Lind2018-07-28
| | | | | | | | | | Likely that the deprecation warning from cryptography is causing the setup.py sphinx build command to return an error so the tox/travis job is marked as failing. Changing to calling the sphinx-build command directly solves this. Also updated the sphinx config for built-in napoleon and faster builds using jobs option.
* Skip Failing Tests On WindowsUnknown2018-06-02
|
* Fix files to pass new Flake8 checkersCalum Lind2018-06-01
| | | | | | | | | | | Some new flake8 checkers were added so fix these new warnings and any issues uncovered. Use add-trailing-comma to fix missing trailing commas. It does not format it as well as I would like however it was fast to change and helps with git changes in future. Removed pylint from tox due to large number of warnings.
* [Docs] Remove chardet mock to fix requests version checkCalum Lind2017-06-05
| | | | * chardet is an easily installed pure python module so doesn't need mocking.
* [Core] Refactor default add torrent flags into a constantCalum Lind2016-11-30
|
* [Lint] Fix files to pass Flake8 v3.2.0Calum Lind2016-11-17
|
* [Lint] Convert all python double quotes to single quotesCalum Lind2016-11-03
| | | | | | | | | | | | | | | | | | * A rather disruptive change but for a few reasons such as easier to read, easier type, keep consistent and javascript code uses single quotes. * There are a few exceptions for the automated process: * Any double quotes in comments * Triple double quotes for docstrings * Strings containing single quotes are left e.g. "they're" * To deal with merge conflicts from feature branches it is best to follow these steps for each commit: * Create a patch: `git format-patch -1 <sha1>` * Edit the patch and replace double quotes with single except those in comments or strings containing an unescaped apostrophe. * Check the patch `git apply --check <patchfile>` and fix any remaining issues if it outputs an error. * Apply the patch `git am < <patchfile>`
* [UI] Add gettext.ngettext to __builtin__.__dict__bendikro2016-10-30
| | | | | Handle plurality with getttext using ngettext. Added to __builtin__.__dict__ as _n
* [Docs] Autogenerate module docs with apidocbendikro2016-05-22
| | | | * Add sphinx-apidoc to setup.py build_docs
* Fix travis build version issueCalum Lind2015-08-26
| | | | | | * 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.
* Update docs testsbendikro2014-09-25
|
* minor code cleanupCalum Lind2014-09-25
|
* [Docs] More fixes for testing with toxCalum Lind2014-09-25
|
* Small fixes for Travis and isortCalum Lind2014-09-25
|
* Added .travis.yml (for travis-ci) and tox.ini filesbendikro2014-09-25
| | | | | | | | | | | | | | | | | | | 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.
* Fixes for building docsCalum Lind2014-09-25
|
* Flake8 codebaseCalum Lind2014-09-22
| | | | Fixes error E265 and E714 that have been added to newest version of pep8
* Add version fallback for sphinx build with readthedocsCalum Lind2014-09-20
|
* Fix for building sphinx docsCalum Lind2014-09-20
|
* Flake8 pass of entire codebaseCalum Lind2014-09-19
| | | | * Use the inline '# NOQA' to supress N802 lower-case warnings
* Fix building the code documentation with sphinxCalum Lind2014-02-20
| | | | | | | Updated Sphinx conf and tested with Sphinx 1.2.1 Moved webui gen_gettext script Fixed docstring warning in code Renamed console update-tracker to update_tracker
* Use a hack to get the version instead of relying on pkg_resources. This ↵Andrew Resch2010-03-24
| | | | allows the docs to be built without having to install deluge.
* Update yearAndrew Resch2010-03-24
|
* Fix some docstringsAndrew Resch2009-08-13
|
* setup automatically generating the core's rpc apiDamien Churchill2009-07-20
|
* update the docs, creating a simple structure for user orientated documentationDamien Churchill2009-07-20
|
* move docs out of the deluge packageDamien Churchill2009-07-20