100 Commits
Author SHA1 Message Date
David Lechner b28f768bec pybricks.lwp3device: Show compatibility.
It has come up a few times recently that this wasn't clear.
2025-01-25 11:02:54 -06:00
David LechnerandLaurens Valk 3335042218 ubuiltins: add set class
Add type stubs and docs for builtin `set` type.

Issue: https://github.com/pybricks/support/issues/402
2023-10-26 09:21:41 +02:00
David Lechner 821a3e4455 pybricks.*: add MaybeAwaitable types
Many blocking functions now return Awaitable[T] when the async run
loop is running. The static analysis tools don't have a way of
knowing this, so the best we can do is return both types so that
x = method() and x = await method() both work mostly as expected.
2023-06-12 17:04:09 -05:00
David Lechner 41b9ce71dd pybricks.tools: add read_input_byte()
This adds stubs and docs for the new `pybricks.tools.read_input_byte()`
function.
2023-06-12 11:06:20 -05:00
David Lechner 6d69f04fe5 docs/cityhub: add ble.broadcast
A workaround has been implemented in the firmware so this is available
now.
2023-05-23 13:37:05 -05:00
David Lechner dd1d167ad9 pyproject: drop alpha status
We accidentally published the last few versions as alpha. It should
have been beta to match the firmware.
2023-05-19 14:59:25 -05:00
David Lechner 4dc289ad61 pybricks.common.BLE.broadcast: fix missing `
This caused bad formatting.
2023-05-16 16:02:13 -05:00
David Lechner bc592b4469 npm/jedi: v1.9.0 2023-05-16 15:45:40 -05:00
David Lechner 784c7ec5fc jedi: v1.9.0
Update pybricks package for next beta.
2023-05-16 15:43:09 -05:00
David Lechner 9e2bac457a github/workflows/publish-ide-docs: poetry install --only=doc
We don't need to install other dependencies to build the docs.
2023-05-16 15:39:14 -05:00
David Lechner 61d18ebe6f @pybricks/ide-docs v2.9.0 2023-05-16 15:33:45 -05:00
David Lechner ff0b767e3e v3.3.0a5 2023-05-16 15:27:22 -05:00
David LechnerandGitHub 3274cef849 pybricks.common: Add new BLE class.
This adds a new BLE class that is used for connectionless broadcasting/
observing on hubs with built-in Bluetooth Low Energy.

Also see https://github.com/pybricks/pybricks-micropython/pull/158.
2023-05-16 14:46:53 -05:00
David Lechner b4ff3af36d pyproject: split lint and doc dependencies
This allows a subset of dependencies to be installed if needed and
allows sharing requirements with readthedocs.
2023-05-10 14:35:08 -05:00
David Lechner 8e5891d9e8 all: spelling
Misc spelling fixes.
2023-05-10 14:16:15 -05:00
David Lechner 7de67852f7 vscode: change to ms-python.black-formatter
Microsoft is breaking out various Python tools into separate extensions.
2023-05-10 13:43:49 -05:00
David Lechner 31d3a117d6 doc/main/conf: update copyright year 2023-04-21 17:39:28 -05:00
David Lechner 263fe3a1cb npm/jedi: v1.8.0 2023-04-21 17:31:17 -05:00
David Lechner db8de447d5 jedi: v1.8.0 2023-04-21 17:26:38 -05:00
David Lechner 46d6189eb1 jedi: update pybricks package version
also bump python requirement since Pyodide is now using Python 3.11.
2023-04-21 17:24:47 -05:00
David Lechner 2278c7bcda @pybricks/ide-docs v2.8.0 2023-04-21 17:10:51 -05:00
David Lechner 4da3618428 v3.3.0b4 2023-04-21 17:00:18 -05:00
David Lechnerandlaurensvalk 3c36010c04 pybricks.ev3devices: Fix Gyro direction parameter name.
The actual implemented name is `direction`, not `positive_direction`.

Fixes: https://github.com/pybricks/support/issues/509
2023-03-20 13:56:16 +01:00
David Lechner eea8ff0924 examples/ev3/bluetooth: remove 3rd party dependency
Since Python 3.10, RFCOMM sockets are available in Python on Windows
so we no longer need 3rd party code.

Fixes: pybricks/support#902
2023-01-06 14:17:29 -06:00
David Lechner 8c673ab280 github: update actions/checkout to v3
This fixes deprecation warnings about node v12.
2022-12-28 16:16:01 -06:00
David Lechner 73477169ae npm/jedi: v1.7.0
Update pybricks_jedi package to v1.7.0 and bump version for release.
2022-12-28 16:13:28 -06:00
David Lechner 5ccc60c177 jedi/pyproject: v1.7.0 2022-12-28 16:09:37 -06:00
David Lechner 93c4fcc884 jedi: add update_user_modules() function
This function will be used to fix import completion of user module
names in Pybricks Code.

Issue: https://github.com/pybricks/support/issues/759
2022-12-28 16:06:47 -06:00
David Lechner aa72605e99 jedi: fix code completion for local _*
This fixes code completion for identifier names starting with "_" in
the local ("__main__") file.
2022-12-28 15:33:33 -06:00
David Lechner 8ee725722f jedi: fix completion of builtin types
Completions for `x.` where `x` is an instance of a builtin type was
broken because of filtering on the `builtins` modules. This extends
the filtering to allow attributes available on common builtin types
in Pybricks MicroPython.
2022-12-28 15:33:33 -06:00
David Lechner 236bda5f31 ubuiltins.round: Fix example.
The example did not have proper line breaks between statements.

Also add an additional example using f-strings.
2022-12-28 14:09:18 -06:00
David Lechner 36ee3bd9ef pyproject: v3.2.0 2022-12-20 15:46:44 -06:00
David Lechner 16a0621e03 @pybricks/ide-docs v2.7.0 2022-12-20 11:05:36 -06:00
David Lechner f7314bc1bc npm/images: v1.3.0
Bump version for release to npm.
2022-12-19 11:16:57 -06:00
David Lechner f14bbc3a36 npm/images: add DFU Windows driver images
This will be used in Pybricks Code for Windows driver installation
instructions.
2022-12-19 11:15:37 -06:00
David Lechner 98e7d814b1 npm/jedi/build: update @pybricks/jedi package version to v1.6.0
Update version for release to npm.
2022-12-09 15:28:11 -06:00
David Lechner 0117e50599 npm/jedi/build: update pybricks-jedi Python package to v1.6.0 2022-12-09 15:26:57 -06:00
David Lechner b4b17d6f55 jedi/pyproject: bump version to v1.6.0
Getting ready to publish to PyPI.
2022-12-09 15:19:53 -06:00
David Lechner a074c60c9e jedi/pyproject: fix authors
The expected format is "Name <email>".
2022-12-09 15:18:56 -06:00
David Lechner 9f80deec4a jedi/pyproject: bump pybricks package to v3.2.0c1 2022-12-09 15:17:12 -06:00
David Lechner 0655d807e4 github: fix job name in publish-jedi workflow
Fixes: https://github.com/pybricks/pybricks-api/issues/124
2022-12-09 15:13:41 -06:00
David Lechner ef7fa7bcfc @pybricks/ide-docs v2.6.0 2022-12-09 15:11:03 -06:00
David Lechner edf0f56675 github: simplify release-to-pypi action
We can just let pipx install poetry for us and we don't need a special
Python install or to run `poetry install`.

Also update action versions while we are touching this.
2022-12-09 15:05:10 -06:00
David Lechner 00f1c95ab2 pyproject: v3.2.0c1
Update `pybricks` package version for release to PyPI.
2022-12-09 15:03:27 -06:00
David Lechner 8bfc2e10c8 doc: Use Pybricks blue.
This changes the navbar background color to use the official Pybricks
blue color.
2022-12-08 17:16:32 -06:00
David Lechner e939c14fee docs/main/{prime,essential}hub: Remove beta note.
We are close to final release, so these are no longer considered beta.
2022-12-07 16:31:19 -06:00
David Lechnerandlaurensvalk 3418c8320c doc/common/css/ide: improve styling of field list
The default style of using a grid with two columns wastes space when
displayed in a narrow pane, like in Pybricks Code. Using flex with
column direction makes it flow from top to bottom.

Fixes: https://github.com/pybricks/support/issues/832
2022-12-07 20:21:47 +01:00
David Lechner 3a60d40bac @pybricks/ide-docs v2.4.0 2022-11-11 11:39:47 -06:00
David Lechner cb0dee3e99 npm/jedi: v1.3.0
Update `pybricks_jedi` Python package to v1.3.0.
2022-11-11 11:36:31 -06:00
David Lechner 19673da32e jedi/pyproject: v1.3.0 2022-11-11 11:31:02 -06:00
David Lechner b8b5652cb6 jedi: update pybricks package to v3.2.0b5 2022-11-11 11:30:01 -06:00
David Lechner 7b4953bc5f pyproject: v3.2.0b5
Update version for `pybricks` Python package release.
2022-11-11 11:24:57 -06:00
David Lechner 62f6fc85a5 jedi: fix code completion for Color and Icon
The pybricks.parameters.Color and Icon types were not working with Jedi
for code completion since the constants were never assigned a value.
2022-11-10 12:23:24 -06:00
David Lechner 3a805b0ca9 npm/images: v1.2.0 2022-11-03 13:03:19 -05:00
David Lechner b84fed1de9 npm/images: add hub-inventor.png file to package 2022-10-28 12:38:07 -05:00
David Lechner d49bc548c7 npm/images: new @pybricks/images package v1.0.0 2022-10-28 12:21:27 -05:00
David Lechner 4573fd2760 LICENSE: update copyright year 2022-10-21 13:14:13 -05:00
David Lechner 2a23c2e81d npm/jedi: v1.1.0
- Update pybricks_jedi Python package dependency.
- Bump JavaScript package version for release.
2022-10-21 13:08:14 -05:00
David Lechner fe126de264 npm/pybricks-docs: v2.3.0
New JavaScript package release for v3.2.0b4 docs.
2022-10-21 12:59:25 -05:00
David Lechner b290f7dc6b github: update jedi action dependencies
Update to current Ubuntu LTS and actions.

This fixes deprecation warnings about node v12 and fixes wrong python
version used by poetry.
2022-10-21 12:55:28 -05:00
David Lechner 9127afdcbc jedi: pybricks_jedi v1.2.0
Bump pybricks_jedi package version for release.
2022-10-21 12:51:43 -05:00
David Lechner 7ee1f66556 jedi: update pybricks package
This updates the pybricks package dependency to v3.2.0b4.
2022-10-21 12:51:00 -05:00
David Lechner f5422e9c90 v3.2.0b4 2022-10-21 12:39:27 -05:00
David Lechner 40fc2588f9 pybricks._common.System: add storage method
This adds stubs, docs and code completion tests for the System.storage()
method.

This was added to Pybricks MicroPython in:
https://github.com/pybricks/pybricks-micropython/commit/246ebea25d25d5a3e4a4e62ebd031491a409c923
2022-10-21 12:35:34 -05:00
David Lechnerandlaurensvalk 96be47f21b doc/main/pupdevices/motor: Fix center example.
This fixes the include for the centering example to link it to the correct source file.

Fixes: https://github.com/pybricks/support/issues/734#issuecomment-1272329217
2022-10-10 09:20:00 +02:00
David Lechner bfa0b69e93 npm/jedi: fix exports and copy extra files
The export keys were wrong and the README and CHANGELOG files were
missing the the final package.
2022-09-07 20:19:23 -05:00
David Lechner f664757ef3 npm/jedi: new js package
This adds a new javascript package for distributing the pybricks-jedi
Python package and it's dependencies via the npm ecosystem for use in
Pybricks Code.
2022-09-07 20:10:34 -05:00
David Lechner b747520d1c jedi: add LICENSE file
This adds a LICENSE file to the jedi directory specifically for the
pybricks-jedi Python package. Poetry will automatically pick up this
file and include it in the distributed package.
2022-09-07 19:41:23 -05:00
David Lechner 2a963b2a0b poetry: update dependencies
This fixes:

    Invalid PEP 440 version: '5.1.0.dev20220527.dev-20220527'
2022-09-05 16:58:56 -05:00
David LechnerandDavid Lechner 7c62a2833a doc/main/images: add temporary essentialhub images
We don't have proper images yet, so we are adding copies of the Prime
hub images for now to not take up space in git history with temporary
images and to at least have something so the docs will build.
2022-06-29 12:08:33 -05:00
David LechnerandDavid Lechner 03ee7f74e8 doc/pup/essentialhub: fix bit rot
This fixes bitrot for PR #96. Also fixes a few minor issues where
changes were missed.
2022-06-29 12:08:33 -05:00
David Lechner e467bb57c9 pybricks_jedi/v1.1.0 2022-06-26 00:10:04 -05:00
David Lechner 33d0c9fa49 v3.2.0b1-r3 2022-06-26 00:00:11 -05:00
David Lechner e95386e23e jedi: improve signature information
This fixes numerous issues where jedi provided incomplete or poorly
formatted signatures and docstrings.

Issue: https://github.com/pybricks/pybricks-code/issues/932
2022-06-25 23:54:49 -05:00
David Lechner a758eaa1db github/build: don't run build on tags
This is almost always redundant.
2022-06-24 15:37:59 -05:00
David Lechner 470eebd1c5 github/jedi: fix working directory in publish job
This was building the pybricks package instead of the pybricks_jedi
package because it was using the wrong directory.
2022-06-24 15:29:02 -05:00
David Lechner 37cdd2a83b v3.2.0b1-r2 2022-06-24 15:14:42 -05:00
David Lechner a2d9c33eb5 jedi: add new pybricks_jedi package
This package will be used in Pybricks Code to provide some intellesense
operations.
2022-06-24 14:52:45 -05:00
David Lechner c77aedcd8a @pybricks/ide-docs v2.2.0 2022-06-02 10:44:03 -05:00
David Lechner 7b9209681c @pybricks/ide-docs v2.1.0 2022-06-02 10:40:55 -05:00
David Lechner 2ba7edab0c pybricks.ev3/pupdevices: fix Motor code completion
The Microsoft Python extension for VS code doesn't include imports in
type hints, so the Motor type wasn't working properly. We can fix this
by wrapping the import type in a new, empty class definition.

The DCMotor class was also missing from ev3devices and the typing for
the overloaded reset_angle method in pupdevices was missing. These are
fixed as well.
2022-02-21 10:59:00 -06:00
David Lechner 1259d5d33a bump version for development 2021-12-16 15:36:52 -06:00
David Lechner 098b8eb9cb v3.1.0 2021-12-16 15:36:14 -06:00
David Lechner c666009511 pybricks.geometry: add Axis.ANY
This exists in the firmware but was missing here.
2021-12-16 15:08:50 -06:00
David Lechner 7f4234fc1e pybricks._common: remove type hint for integral_range()
This was removed in e061617.

Also fix import of Axis while we are touching this file.
2021-12-16 15:07:33 -06:00
David Lechner 482289c384 pybricks.robotics: add type hint for curve()
This method was added in 30803fc.
2021-12-16 15:06:00 -06:00
David Lechner 718a28c0da @pybricks/ide-docs v2.0.1 2021-11-19 20:30:11 -06:00
David Lechner a2a375cb5c docs/pupdevices: fix broken link
The link to the color light matrix page was broken due to an invalid
file name.
2021-11-19 20:28:33 -06:00
David Lechner 466d8d6c86 @pybricks/ide-docs v2.0.0 2021-11-19 19:59:19 -06:00
David Lechner e77b3dcf4d 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).
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
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