update read the docs config (#520)

* update read the docs config

* add hints on black code style

* add link to black

* fix path to requirements

* include submodules in build

* add submodule capabilities-data

* format as list

* post on execution on RTD

* use sphinx rtd theme 1.2.0

* add apt dependencies
This commit is contained in:
Patrick Kanzler 2023-05-18 16:33:20 +02:00 committed by GitHub
parent 66348ccc0a
commit 905e37e52e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 17 deletions

27
.readthedocs.yml Normal file
View File

@ -0,0 +1,27 @@
version: 2
formats:
- pdf
- epub
build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- graphviz
- libenchant-2-2
- gcc
- libcups2-dev
- python3-dev
sphinx:
configuration: doc/conf.py
submodules:
include:
- capabilities-data
recursive: true
python:
install:
- requirements: doc/requirements.txt
- method: pip
path: .
system_packages: true

View File

@ -17,23 +17,20 @@ Author-list
This project keeps a list of authors. This can be auto-generated by calling `./doc/generate-authors.sh`.
When contributing the first time, please include a commit with the output of this script in place.
Otherwise the integration-check will fail.
When you change your username or mail-address, please also update the `.mailmap` and the authors-list.
You can find a good documentation on the mapping-feature in the `documentation of git-shortlog <https://git-scm.com/docs/git-shortlog#_mapping_authors>`_.
You can find a good documentation on the mapping-feature in the
`documentation of git-shortlog <https://git-scm.com/docs/git-shortlog#_mapping_authors>`_.
Style-Guide
-----------
When writing code please try to stick to these rules.
PEP8
^^^^
The entire codebase adheres to the rules of PEP8.
These rules are enforced by running `flake8` in the integration-checks.
Please adhere to these rules as your contribution can only be merged if the check succeeds.
You can use flake8 or similar tools locally in order to check your code.
Apart from that the travis-log and the check by Landscape will provide you with hints.
Black Code Style
^^^^^^^^^^^^^^^^
This project is formatted with the auto formatter `black <https://github.com/psf/black>`_.
Please format your contributions with black, otherwise they will be rejected.
GIT
^^^

View File

@ -122,6 +122,7 @@ pygments_style = "sphinx"
# a list of builtin themes.
if on_rtd:
html_theme = "default"
print("recognized execution on RTD")
else:
try:
import sphinx_rtd_theme

View File

@ -2,7 +2,7 @@ pyusb
Pillow>=2.0
qrcode>=4.0
pyserial
sphinx-rtd-theme
sphinx-rtd-theme==1.2.0
setuptools
setuptools-scm
docutils>=0.12

View File

@ -1,7 +0,0 @@
formats:
- pdf
- epub
requirements_file: doc/requirements.txt
python:
version: 3
setup_py_install: true