Commit Graph

9 Commits

Author SHA1 Message Date
Calum Lind b7450b5082
[Docs] Bump sphinx version requirements
There are still warnings that need to be resolved but the build is
passing.
2024-01-21 15:10:47 +00:00
Calum Lind 19dba297ef
[Docs] Fix ReadTheDocs theme rendering issue
Fix rendering issues in ReadTheDocs by specifying latest version of
sphinx-rtd-theme. Normally not an issue to install this latest
dependency from doc/requirement.txt but RTD installs in the env an older
version (<0.5) before running requirements file install
thus sphinx-rtd-theme is not upgraded unless a version is specified.

See-also: https://github.com/readthedocs/sphinx_rtd_theme/issues/1115
2022-06-28 19:45:21 +01:00
Chase Sterling dabb505376
[Core] Document all exported core methods with type hints
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
2022-02-11 08:48:58 +00:00
Calum Lind 1089adb844
Revert "[Core] Document all exported core methods with type hints"
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 4096cdfdfe.

Ref: https://twistedmatrix.com/trac/ticket/9816
2022-02-05 17:50:54 +00:00
Chase Sterling 4096cdfdfe
[Core] Document all exported core methods with type hints
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
2022-02-05 17:23:50 +00:00
Calum Lind 16895b4a49
[Docs] Fix spinx-contrib-spelling build error
CI docs build was failing with the following error when using latest
sphinx-contrib-spelling 7.3.1

    error: option -j not recognized

Fixed by pinning to previous version.

GitHub-ref: https://github.com/sphinx-contrib/spelling/issues/142
2021-12-29 21:43:03 +00:00
Calum Lind 24aa48187e [Docs] Replace recommonmark with MyST parser
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
2021-12-12 18:16:21 +00: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 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