Commit Graph
911 Commits
Author SHA1 Message Date
David Lechner 466d8d6c86 @pybricks/ide-docs v2.0.0 @pybricks/ide-docs/v2.0.0 2021-11-19 19:59:19 -06:00
David Lechner e77b3dcf4d v3.1.0rc1 v3.1.0rc1 2021-11-19 19:42:07 -06:00
David Lechner b6d1eef2a1 pybricks.iodevices.LWP3Device: add api and docs
This adds docs and API stubs for pybricks.iodevices.LWP3Device.

Fixes: https://github.com/pybricks/support/issues/534
2021-11-19 19:31:53 -06:00
David Lechner 20cb5fdde5 doc: make all titles sentence case
This makes the casing of titles consistent throughout the docs.

Fixes: https://github.com/pybricks/pybricks-api/issues/75
2021-11-19 19:30:57 -06:00
David Lechner 2f574e8c03 pybricks.pupdevices.ColorLightMatrix: add api and docs
This adds the SPIKE 3x3 Color Light Matrix to the API and docs.
2021-11-19 19:30:57 -06:00
David Lechner 9d8531a85b npm/ide-docs: move npm packaging to separate directory
This makes a clean separation between the packaging and the docs.
2021-11-19 19:30:57 -06:00
David Lechner fee122cf33 CHANGELOG: move to top level
This makes the CHANGELOG easy to find.
2021-11-19 16:37:38 -06:00
David Lechner f42ed06d4f doc/main/CHANGELOG: use keepachangelog.com recommendations
This updates the changelog to use keepachangelog.com recommendations
to make it consistent with other Pybricks changelogs.
2021-08-30 13:29:38 -05:00
David Lechner a8126f0bed doc/main: fix dir in package.json
Another case of a missed ide to main directory.
2021-08-30 12:20:44 -05:00
David Lechner 2c4685f594 doc/main: add TAG make option
This splits the Sphinx tag option from SPHINXOPTS. This allows us to
specify the tag without having to remember to add -W and -t. It also
fixes not being able to specify the tag with make.bat on Windows.

While we are touching this, redundant SOURCEDIR uses are removed (main
is already the default) and the .github/workflows/publish-ide-docs.yml
script is fixed (ide directory no longer exists).
@pybricks/ide-docs/v1.6.0
2021-08-30 12:14:34 -05:00
David Lechner 8b0f98d25b @pybricks/ide-docs v1.6.0 2021-08-30 11:12:05 -05:00
Laurens Valk dd2e6e8603 ubuiltins.int: Document from_bytes manually.
Sphinx fails to show the docsting for class methods. Since we have very few of them, it is easier to just document this one manually

Fixes https://github.com/pybricks/pybricks-api/issues/86
2021-08-22 12:15:42 +02:00
Laurens Valk a0f4818e26 ubuiltins.int: Document it. 2021-08-06 14:59:45 +02:00
Laurens Valk af23c10566 ubuiltins.float: Document it.
Override typed docstrings in order to hide types like SupportsFloat.
2021-08-06 14:58:19 +02:00
Laurens Valk d7096dad80 ubuiltins.complex: Document it.
Override typed docstrings in order to hide types like SupportsFloat and SupportsComplex.

Avoid use of ``real`` and ``imag``, since both ``a`` and ``b`` can be
either.

Also reduce number of overloads by letting ``b`` default to 0, which is true in practice.

See also https://github.com/pybricks/pybricks-api/issues/84
2021-08-06 14:25:00 +02:00
Laurens Valk 1d2b1f0307 rtd-requirements: Update to Sphinx 4.1
See https://github.com/pybricks/pybricks-api/issues/70
2021-08-06 10:47:14 +02:00
Laurens Valk 9945b43713 pyproject: Update to Sphinx 4.1.
Also bump to a development version of sphinx-rtd-theme that supports Sphinx 4.

Fixes https://github.com/pybricks/pybricks-api/issues/70
2021-08-06 10:40:26 +02:00
Laurens Valk 4124e1dd4e doc/common/conf: Drop unused imports.
These prevent us from upgrading Sphinx and they aren't being used anyway.

Fixes e4c7e5abeb
2021-08-06 10:07:42 +02:00
Laurens Valk d86b5584fb ubuiltins: Type enumerate as a class.
This reverts commit a0ea0d8ca0 because of https://github.com/pybricks/pybricks-api/issues/72
2021-08-06 09:51:52 +02:00
Laurens Valk 1c01e981e0 usys: Clean up.
Add requirements, drop autodoc, and add a few cross references.
2021-08-05 16:13:50 +02:00
Laurens Valk 8a6ddf677c pybricks.pupdevices.Remote: Light examples. 2021-08-05 14:56:00 +02:00
Laurens Valk 5d4481dbb0 pybricks.pupdevices.ColorDistanceSensor: Drop duplicate example. 2021-08-05 13:45:57 +02:00
Laurens Valk 786770cff2 ubuiltins.bool: Use arguments.
https://github.com/pybricks/pybricks-api/issues/82
2021-08-05 12:49:44 +02:00
Laurens Valk 572b573d2f ubuiltins: Fix _type typos.
This was accidentally introduced via https://github.com/pybricks/pybricks-api/issues/71 by replacing too many things automatically.
2021-08-05 12:33:00 +02:00
Laurens Valk 15bd870140 ubuiltins: Use argument layout.
https://github.com/pybricks/pybricks-api/issues/82
2021-08-05 12:32:56 +02:00
Laurens Valk b101d1992d ubuiltins.print: Use English. 2021-08-05 12:32:51 +02:00
Laurens Valk b013204f88 ubuiltins.input: Say what it does.
The docstring said something about an argument, but not what this function is for.
2021-08-05 12:32:47 +02:00
Laurens Valk b3c5353dd6 ubuiltins: Reorganize page.
Fixes https://github.com/pybricks/pybricks-api/issues/80
2021-08-05 12:32:41 +02:00
Laurens Valk 0ecf536cda ubuiltins: Add compatibility everywhere.
This lets us sort everything by category or alphabetically without having to make special categories for Move Hub.
2021-08-05 12:32:37 +02:00
David LechnerandLaurens Valk f2124615ba ubuiltins: List decorators in separate section.
This moves the built-in decorators to their own section and uses
`autodecorator` to indicate they are decorators.
2021-08-05 12:32:29 +02:00
Laurens Valk 49ade9d9c6 pybricks.robotics: Show compatibility. 2021-08-05 12:32:03 +02:00
Laurens Valk 045312921e pybricks.geometry: Show compatibility. 2021-08-05 12:32:03 +02:00
Laurens Valk 39f58b9e03 pybricks.tools: Show compatibility. 2021-08-05 12:32:03 +02:00
Laurens Valk a0467b8d8e doc/common/requirements: Fix image paths.
This ensures that the requirements directive works regardless of the depth of the document in the tree.
2021-08-05 12:32:03 +02:00
Laurens Valk 4945156d9a pybricks.parameters: Show compatibility. 2021-08-05 12:32:03 +02:00
Laurens Valk 97b2de46ac pybricks.hubs: Show compatibility. 2021-08-05 12:32:03 +02:00
Laurens Valk e8d7281626 doc/common/requirements: A hub supports itself.
This way we can do the following, which is useful if it cannot be expressed in terms of other requirements.

.. pybricks-requirements:: movehub

A good example is on the specific hub page itself. The Move Hub requires the Move Hub.
2021-08-05 12:32:03 +02:00
Laurens Valk 979da8b170 pybricks.pupdevices: Show compatibility. 2021-08-05 12:32:03 +02:00
Laurens Valk ac4a913be3 doc/common/requirements: Toggle hub table.
This makes it possible to hide/unhide the compatibility table.

It is adapted from the sphinxcontrib-contentui extension: https://github.com/ulrobix/sphinxcontrib-contentui
2021-08-05 12:32:03 +02:00
Laurens Valk 31a30f380f doc/common/requirements: Rename to static.
We will work on a version that can be toggled dynamically. It will just include this static version. This keeps things simple and still lets
us use the static version as needed.
2021-08-05 12:32:03 +02:00
Laurens Valk 87dacfbf76 doc/common/extensions/requirements: Allow none.
With no requirements imposed, this means all hubs will work.
2021-08-05 12:32:03 +02:00
Laurens Valk b02895e5fc ubuiltins: Use raw strings for inline math.
This resolves the following warnings:
./src/ubuiltins/__init__.py:143:31: W605 invalid escape sequence '\l'
./src/ubuiltins/__init__.py:143:38: W605 invalid escape sequence '\l'
./src/ubuiltins/__init__.py:174:31: W605 invalid escape sequence '\l'
./src/ubuiltins/__init__.py:174:38: W605 invalid escape sequence '\l'
2021-08-05 12:32:21 +02:00
Laurens Valk 486ac60ea0 ubuiltins.bool: Clarify docs.
Avoid double and triple negatives.
2021-08-05 12:32:17 +02:00
Laurens Valk a3b6507a15 ubuiltins.bytes: Clarify docs. 2021-08-05 12:32:14 +02:00
Laurens Valk 75bc15f071 ubuiltins: Add bytearray. 2021-08-05 12:32:03 +02:00
Laurens Valk 0b9280a8df uerrno: Display on separate page.
Fixes https://github.com/pybricks/pybricks-api/issues/78
2021-08-02 11:01:20 +02:00
David LechnerandDavid Lechner 677656f669 pybricks.robotics.DriveBase: Fix arg name in type hints.
This fixes the `speed` arg name in the `DriveBase.drive()` method in the type hint file. Fixes #76.
2021-07-30 15:27:09 -05:00
Laurens Valk a8ab8b2314 pybricks.pupdevices.Motor: Add reset_angle kwarg.
Documents https://github.com/pybricks/support/issues/389
2021-07-28 16:07:53 +02:00
Laurens Valk 62bb262b96 pybricks.pupdevices.Remote: Add more examples. 2021-07-28 14:50:43 +02:00
Laurens Valk 8463206f8e pybricks.pupdevices.Remote: Add name().
https://github.com/pybricks/support/issues/404
2021-07-28 13:41:00 +02:00