Compare commits

...
Author SHA1 Message Date
David Lechner deb211bdb7 @pybricks/ide-docs v1.1.0 2021-01-28 12:31:19 -06:00
David Lechner 8a5e5c3fb4 doc/ide: styling to match Pybricks Code
We were injecting this from Pybricks code, but it caused the scroll bars
to flash when loading a page.
2021-01-28 12:31:19 -06:00
ZPhilo 2a1640f7dc examples/pup/hubs/hub_primehub: fix button
Corrected Bluetooth button name (from BT to BLUETOOTH)
2021-01-28 09:31:41 +01:00
Laurens Valk 535aac8144 config: fix missing automembers in sphinx upgrade
This setting was renamed and should now be a dictionary.

Fixes https://github.com/pybricks/pybricks-api/issues/45
2021-01-28 09:30:23 +01:00
David Lechner 00cc5ee44e poetry: move dev dependencies to dev section
Users who install this package from PyPi don't need all of the dev dependencies.
2021-01-26 11:46:32 -06:00
Laurens Valk f0b882b576 config: update to Sphinx 3.4 2021-01-26 09:18:13 +01:00
Laurens Valk 8ed45aecfb doc/nxtdevices: drop method link
For some reason, these are not working after upgrading to Sphinx 3.X, even though the same reference to conversion works just fine elsewhere.
2021-01-26 09:07:19 +01:00
David Lechner 77605e8701 github: add workflow for publishing ide-docs package 2021-01-26 08:30:48 +01:00
David Lechner b4c8242133 doc/ide: add node package
This will be used to publish the docs in a way that is easy for
pybricks-code to use.
2021-01-26 08:30:48 +01:00
David Lechner 06e01e5ac8 doc/ide: use sphinx.ext.imgmath
MathJax uses a CDN to to distribute the package. So in order to use the
docs offline, we would have to include our own copy. But it is a bit
large (50-ish MB), so it is easier to use sphinx.ext.imgmath instead
to generate svg images.

The situation might be different with MathJax v3, but that requires
Sphinx v4.
2021-01-26 08:30:48 +01:00
David Lechner ff22c32c24 doc/api/signaltypes: use ^{\circ} instead of ° in :math:
This works for both sphinx.ext.mathjax and sphinx.ext.imgmath.
2021-01-26 08:30:48 +01:00
David Lechner 95eb999493 doc/api/signaltypes: fix degree symbol overlapping
The degree symbol was a bit too close to the letters.
2021-01-26 08:30:48 +01:00
David Lechner 7d729a8e9e doc/ide: hide the "view source" link
Since these are meant to be offline docs and use a smaller screen area
we can omit this to keep things cleaner.
2021-01-26 08:30:48 +01:00
David Lechner c750a3cd88 doc/ide: hide prev/next buttons
In the IDE this is more of a reference and less of a book so going to
the next page doesn't make as much sense.
2021-01-26 08:30:48 +01:00
David Lechner adf6e03bc9 doc: open external links in a new window
This adds a hack to open external links in a new window. Requires Sphinx v1.8.
2021-01-26 08:30:48 +01:00
David Lechner 0466ce947f doc: override external link style on figure target
This works around https://github.com/readthedocs/sphinx_rtd_theme/pull/494#issuecomment-354063112
2021-01-26 08:30:48 +01:00
David Lechner 7abb670f66 doc/ide: hide footers
This information is duplicated in the IDE about dialog so we don't need
it in the docs.
2021-01-26 08:30:48 +01:00
21 changed files with 300 additions and 56 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Release @pybricks/ide-docs
on:
push:
tags:
- '@pybricks/ide-docs/**'
jobs:
publish_ide_docs:
runs-on: ubuntu-20.04
steps:
- name: Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install -y dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry
poetry run python -m pip install --upgrade pip
poetry run python -m pip install --upgrade setuptools
poetry install
- uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn build
working-directory: doc/ide
- run: yarn publish
working-directory: doc/ide
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
+5 -1
View File
@@ -8,7 +8,7 @@ on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9]
@@ -35,5 +35,9 @@ jobs:
run: poetry run doc8
- name: Build html docs for Read the Docs
run: poetry run make -C doc html
- name: Instal IDE docs dependencies
run: |
sudo apt-get update
sudo apt-get install dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
- name: Build html docs for Pybricks Code IDE
run: poetry run make -C doc html SOURCEDIR=ide
+2 -2
View File
@@ -248,9 +248,9 @@ temperature: °C
Temperature is measured in degrees Celcius (°C). To convert to degrees
Fahrenheit (°F) or Kelvin (K), you can use the following conversion formulas:
:math:`°\!F = °\!C \cdot \frac{9}{5} + 32`.
:math:`^{\circ}\kern1pt\!F =\kern1pt^{\circ}\kern1pt\!C \cdot \frac{9}{5} + 32`.
:math:`K = °\!C + 273.15`.
:math:`K =\kern1pt^{\circ}\kern1pt\!C + 273.15`.
.. _hue:
+42
View File
@@ -0,0 +1,42 @@
/* These styles only apply to the ide build */
.wy-breadcrumbs li.wy-breadcrumbs-aside {
display: none;
}
/* Scrollbar styling to match Pybricks Code. */
/* https://github.com/pybricks/pybricks-code/blob/master/src/index.scss */
::-webkit-scrollbar {
width: 16px;
}
.bp3-dark ::-webkit-scrollbar-track {
background: #293742;
}
::-webkit-scrollbar-track {
background: #e8e8e8;
}
.bp3-dark ::-webkit-scrollbar-thumb {
border-color: #293742;
background: #a7b6c2;
}
::-webkit-scrollbar-thumb {
border-width: 3px;
border-style: solid;
border-radius: 8px;
border-color: #e8e8e8;
background: #5c7080;
}
.bp3-dark ::-webkit-scrollbar-thumb:hover {
background: #f5f8fa;
}
::-webkit-scrollbar-thumb:hover {
background: #182026;
}
@@ -35,3 +35,9 @@ span.caption-number:after {
font-size: 60%;
margin: 0 0.2em;
}
/* don't show external link on figures */
/* https://github.com/readthedocs/sphinx_rtd_theme/pull/494#issuecomment-354063112 */
.figure > a.reference.external::after {
content: none !important;
}
+4
View File
@@ -0,0 +1,4 @@
// https://stackoverflow.com/a/62742435/1976323
$(document).ready(function () {
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank');
});
+1 -1
View File
@@ -1,5 +1,5 @@
{% extends '!footer.html' %}
{% block extrafooter %}
<div class="disclaimer">{{ disclaimer }}</div>
{% if disclaimer %}<div class="disclaimer">{{ disclaimer }}</div>{% endif %}
{% endblock %}
+9 -1
View File
@@ -130,7 +130,10 @@ nitpick_ignore = [
# -- Autodoc options ------------------------------------------------------
autodoc_member_order = 'bysource'
autodoc_default_flags = ['members', 'undoc-members']
autodoc_default_options = {
'members': True,
'undoc-members': True,
}
autoclass_content = 'both' # This ensures init arguments are not ignored
add_module_names = False # Hide module name
@@ -143,6 +146,11 @@ else:
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# a little extra javascript
html_js_files = [
'js/custom.js'
]
html_context = {
'disclaimer': _DISCLAIMER,
}
+2
View File
@@ -0,0 +1,2 @@
version-tag-prefix "@pybricks/ide-docs/v"
version-git-message "@pybricks/ide-docs v%s"
+9
View File
@@ -0,0 +1,9 @@
# 1.1.0 - 2021-01-28
## Added:
- Scrollbar styling.
# 1.0.0 - 2021-01-25
## Added:
- Sphinx build output.
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018-2021 The Pybricks Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+6
View File
@@ -0,0 +1,6 @@
# @pybricks/ide-docs
This is a Node.js package for distributing the version of the Pybricks API
docs that is embedded in IDEs.
It contains all of the files needed to serve a static web site.
+14 -4
View File
@@ -11,12 +11,22 @@ copyright = '2018-2021 The Pybricks Authors'
author = ''
_TITLE = 'Pybricks Modules and Examples'
_DISCLAIMER = 'LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are\
trademarks and/or copyrights of the LEGO Group of companies \
which does not sponsor, authorize or endorse this site.'
_DISCLAIMER = ''
html_favicon = '../common/images/favicon.ico'
html_logo = '../common/images/pybricks-logo-rtd.png'
latex_logo = '../common/images/pybricks-logo-large.png'
html_show_copyright = False
html_show_sphinx = False
html_css_files = ['css/ide.css']
imgmath_image_format = 'svg'
imgmath_use_preview = True # requires Sphinx v3
imgmath_latex_preamble = r'''
\usepackage{newtxsf}
'''
exec(open(os.path.abspath("../common/conf.py")).read())
extensions.remove('sphinx.ext.mathjax') # noqa F821
extensions.append('sphinx.ext.imgmath') # noqa F821
html_theme_options['prev_next_buttons_location'] = None # noqa F821
+24
View File
@@ -0,0 +1,24 @@
{
"name": "@pybricks/ide-docs",
"version": "1.1.0",
"description": "Special build of Pybricks API docs for embedding in an IDE.",
"repository": {
"type": "git",
"url": "https://github.com/pybricks/pybricks-api",
"directory": "doc/ide"
},
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public"
},
"author": "The Pybricks Authors",
"license": "MIT",
"files": [
"build/html/**"
],
"types": "index.d.ts",
"scripts": {
"clean": "poetry run make -C .. SOURCEDIR=ide clean",
"build": "poetry run make -C .. SOURCEDIR=ide html"
}
}
+1 -1
View File
@@ -23,7 +23,7 @@ if Button.LEFT in pressed:
hub.display.image(Icon.ARROW_LEFT_DOWN)
elif Button.RIGHT in pressed:
hub.display.image(Icon.ARROW_RIGHT_DOWN)
elif Button.BT in pressed:
elif Button.BLUETOOTH in pressed:
hub.display.image(Icon.ARROW_RIGHT_UP)
wait(3000)
Generated
+107 -38
View File
@@ -284,41 +284,46 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
[[package]]
name = "snowballstemmer"
version = "2.0.0"
description = "This package provides 26 stemmers for 25 languages generated from Snowball algorithms."
version = "2.1.0"
description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms."
category = "dev"
optional = false
python-versions = "*"
[[package]]
name = "sphinx"
version = "1.7.9"
version = "3.4.3"
description = "Python documentation generator"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
python-versions = ">=3.5"
[package.dependencies]
alabaster = ">=0.7,<0.8"
babel = ">=1.3,<2.0 || >2.0"
babel = ">=1.3"
colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""}
docutils = ">=0.11"
docutils = ">=0.12"
imagesize = "*"
Jinja2 = ">=2.3"
packaging = "*"
Pygments = ">=2.0"
requests = ">=2.0.0"
six = ">=1.5"
requests = ">=2.5.0"
snowballstemmer = ">=1.1"
sphinxcontrib-websupport = "*"
sphinxcontrib-applehelp = "*"
sphinxcontrib-devhelp = "*"
sphinxcontrib-htmlhelp = "*"
sphinxcontrib-jsmath = "*"
sphinxcontrib-qthelp = "*"
sphinxcontrib-serializinghtml = "*"
[package.extras]
test = ["mock", "pytest", "pytest-cov", "html5lib", "flake8 (>=3.5.0)", "flake8-import-order", "enum34", "mypy", "typed-ast"]
websupport = ["sqlalchemy (>=0.9)", "whoosh (>=2.0)"]
docs = ["sphinxcontrib-websupport"]
lint = ["flake8 (>=3.5.0)", "isort", "mypy (>=0.790)", "docutils-stubs"]
test = ["pytest", "pytest-cov", "html5lib", "cython", "typed-ast"]
[[package]]
name = "sphinx-rtd-theme"
version = "0.4.3"
version = "0.5.1"
description = "Read the Docs theme for Sphinx"
category = "dev"
optional = false
@@ -327,6 +332,68 @@ python-versions = "*"
[package.dependencies]
sphinx = "*"
[package.extras]
dev = ["transifex-client", "sphinxcontrib-httpdomain", "bump2version"]
[[package]]
name = "sphinxcontrib-applehelp"
version = "1.0.2"
description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books"
category = "dev"
optional = false
python-versions = ">=3.5"
[package.extras]
lint = ["flake8", "mypy", "docutils-stubs"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-devhelp"
version = "1.0.2"
description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document."
category = "dev"
optional = false
python-versions = ">=3.5"
[package.extras]
lint = ["flake8", "mypy", "docutils-stubs"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-htmlhelp"
version = "1.0.3"
description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files"
category = "dev"
optional = false
python-versions = ">=3.5"
[package.extras]
lint = ["flake8", "mypy", "docutils-stubs"]
test = ["pytest", "html5lib"]
[[package]]
name = "sphinxcontrib-jsmath"
version = "1.0.1"
description = "A sphinx extension which renders display math in HTML via JavaScript"
category = "dev"
optional = false
python-versions = ">=3.5"
[package.extras]
test = ["pytest", "flake8", "mypy"]
[[package]]
name = "sphinxcontrib-qthelp"
version = "1.0.3"
description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document."
category = "dev"
optional = false
python-versions = ">=3.5"
[package.extras]
lint = ["flake8", "mypy", "docutils-stubs"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-serializinghtml"
version = "1.1.4"
@@ -339,21 +406,6 @@ python-versions = ">=3.5"
lint = ["flake8", "mypy", "docutils-stubs"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-websupport"
version = "1.2.4"
description = "Sphinx API for Web Apps"
category = "dev"
optional = false
python-versions = ">=3.5"
[package.dependencies]
sphinxcontrib-serializinghtml = "*"
[package.extras]
lint = ["flake8"]
test = ["pytest", "sqlalchemy", "whoosh", "sphinx"]
[[package]]
name = "stevedore"
version = "3.3.0"
@@ -405,7 +457,7 @@ socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
[metadata]
lock-version = "1.1"
python-versions = "^3.8"
content-hash = "fed1de01e5e5b8a4350a07325982ee7dc3cca79e5e45029735ce104b29a5da55"
content-hash = "4d6ac2394f202eb7b9e91a510d807c6e2f56ae61ef23c28edeb5d9feaf741fc1"
[metadata.files]
alabaster = [
@@ -421,6 +473,7 @@ babel = [
{file = "Babel-2.9.0.tar.gz", hash = "sha256:da031ab54472314f210b0adcff1588ee5d1d1d0ba4dbd07b94dba82bde791e05"},
]
black = [
{file = "black-20.8b1-py3-none-any.whl", hash = "sha256:70b62ef1527c950db59062cda342ea224d772abdf6adc58b86a45421bab20a6b"},
{file = "black-20.8b1.tar.gz", hash = "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"},
]
certifi = [
@@ -593,25 +646,41 @@ six = [
{file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"},
]
snowballstemmer = [
{file = "snowballstemmer-2.0.0-py2.py3-none-any.whl", hash = "sha256:209f257d7533fdb3cb73bdbd24f436239ca3b2fa67d56f6ff88e86be08cc5ef0"},
{file = "snowballstemmer-2.0.0.tar.gz", hash = "sha256:df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52"},
{file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"},
{file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"},
]
sphinx = [
{file = "Sphinx-1.7.9-py2.py3-none-any.whl", hash = "sha256:a602513f385f1d5785ff1ca420d9c7eb1a1b63381733b2f0ea8188a391314a86"},
{file = "Sphinx-1.7.9.tar.gz", hash = "sha256:217a7705adcb573da5bbe1e0f5cab4fa0bd89fd9342c9159121746f593c2d5a4"},
{file = "Sphinx-3.4.3-py3-none-any.whl", hash = "sha256:c314c857e7cd47c856d2c5adff514ac2e6495f8b8e0f886a8a37e9305dfea0d8"},
{file = "Sphinx-3.4.3.tar.gz", hash = "sha256:41cad293f954f7d37f803d97eb184158cfd90f51195131e94875bc07cd08b93c"},
]
sphinx-rtd-theme = [
{file = "sphinx_rtd_theme-0.4.3-py2.py3-none-any.whl", hash = "sha256:00cf895504a7895ee433807c62094cf1e95f065843bf3acd17037c3e9a2becd4"},
{file = "sphinx_rtd_theme-0.4.3.tar.gz", hash = "sha256:728607e34d60456d736cc7991fd236afb828b21b82f956c5ea75f94c8414040a"},
{file = "sphinx_rtd_theme-0.5.1-py2.py3-none-any.whl", hash = "sha256:fa6bebd5ab9a73da8e102509a86f3fcc36dec04a0b52ea80e5a033b2aba00113"},
{file = "sphinx_rtd_theme-0.5.1.tar.gz", hash = "sha256:eda689eda0c7301a80cf122dad28b1861e5605cbf455558f3775e1e8200e83a5"},
]
sphinxcontrib-applehelp = [
{file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"},
{file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"},
]
sphinxcontrib-devhelp = [
{file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"},
{file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"},
]
sphinxcontrib-htmlhelp = [
{file = "sphinxcontrib-htmlhelp-1.0.3.tar.gz", hash = "sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b"},
{file = "sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f"},
]
sphinxcontrib-jsmath = [
{file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"},
{file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"},
]
sphinxcontrib-qthelp = [
{file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"},
{file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"},
]
sphinxcontrib-serializinghtml = [
{file = "sphinxcontrib-serializinghtml-1.1.4.tar.gz", hash = "sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc"},
{file = "sphinxcontrib_serializinghtml-1.1.4-py2.py3-none-any.whl", hash = "sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a"},
]
sphinxcontrib-websupport = [
{file = "sphinxcontrib-websupport-1.2.4.tar.gz", hash = "sha256:4edf0223a0685a7c485ae5a156b6f529ba1ee481a1417817935b20bde1956232"},
{file = "sphinxcontrib_websupport-1.2.4-py2.py3-none-any.whl", hash = "sha256:6fc9287dfc823fe9aa432463edd6cea47fa9ebbf488d7f289b322ffcfca075c7"},
]
stevedore = [
{file = "stevedore-3.3.0-py3-none-any.whl", hash = "sha256:50d7b78fbaf0d04cd62411188fa7eedcb03eb7f4c4b37005615ceebe582aa82a"},
{file = "stevedore-3.3.0.tar.gz", hash = "sha256:3a5bbd0652bf552748871eaa73a4a8dc2899786bc497a2aa1fcb4dcdb0debeee"},
+1 -1
View File
@@ -197,7 +197,7 @@ class UARTDevice:
port (Port): Port to which the device is connected.
baudrate (int): Baudrate of the UART device.
timeout (:ref:`time`): How long to wait
during :meth:`.read` before giving up. If you choose ``None``,
during ``read`` before giving up. If you choose ``None``,
it will wait forever.
"""
pass
+1 -1
View File
@@ -250,7 +250,7 @@ class VernierAdapter(_AnalogSensor):
Arguments:
port (Port): Port to which the sensor is connected.
conversion (callable): Function of the format :meth:`.conversion`.
conversion (callable): Function of the format ``conversion``.
This function is used to convert the raw analog voltage to the
sensor-specific output value. Each Vernier Sensor has its
own conversion function. The example given below demonstrates
+4 -4
View File
@@ -20,10 +20,10 @@ python = "^3.8"
[tool.poetry.dev-dependencies]
black = {version = "^20.8b1", allow-prereleases = true}
doc8 = "*"
flake8 = "*"
sphinx = "==1.7.9"
sphinx-rtd-theme = "==0.4.3"
doc8 = "^0.8.1"
flake8 = "^3.8.4"
Sphinx = "^3.4.3"
sphinx-rtd-theme = "^0.5.1"
toml = "^0.10.0"
[build-system]
+2 -2
View File
@@ -1,5 +1,5 @@
# This file is strictly for building docs on readthedocs.org
# See pyproject.toml for local development
Sphinx==1.7.9
sphinx-rtd-theme==0.4.3
Sphinx==3.4.3
sphinx-rtd-theme==0.5.1
toml
+1
View File
@@ -5,3 +5,4 @@ max-line-length = 88
[doc8]
ignore-path = .venv/,doc/api/build/,pybricks.egg-info/
max-line-length = 88