Commit Graph
1038 Commits
Author SHA1 Message Date
David Lechner f5422e9c90 v3.2.0b4 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
Laurens Valk e1be50181a doc/main: Revisit and automate all renders and diagrams.
Previously, all renders were created and added manually when a newly
supported device was added to the documentation.

This commit revisits all diagrams by creating them using a single
LDRAW multi-file part model and LPUB3D building instructions file.

This makes perspective and resolution consistent across all images, and
we could update them all at once if needed.

It also removes the background from all images so they can be used
with different documentation themes.
2022-10-10 09:19:49 +02:00
Laurens Valk 52117157d8 .gitignore: Ignore LDRAW tool data. 2022-10-02 19:31:06 +02:00
Laurens Valk 7778ce96a5 setup: Ignore jedi for doc8. 2022-10-02 19:29:57 +02:00
Laurens Valk 637677dae2 jedi/poetry: Install in project.
Nested virtual environments are complicated enough, so this way we can at least get back to a clean state if we need to.
2022-09-30 16:04:33 +02:00
Laurens Valk abc00df943 pybricks.pupdevices: Avoid class-specific LightArray.
Let's minimize complicated hacks if we can help it.
2022-09-30 16:04:33 +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.
@pybricks/jedi/v1.0.1
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.
@pybricks/jedi/v1.0.0
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
The Vinh Luong (Lương Thế Vinh)andGitHub dcddf15d15 flake8: Update VSCode settings and suppress some Flake8 linting warnings.
* update VSCode settings to exclude __pycache__

* suppress some Flake8 linting warnings

* minor fix: SPHINX_BUILD env var may not be set

* decorate _PybricksEnumMeta.__dir__() with @classmethod

* flake8-ignore E501
2022-09-05 18:40:39 -05:00
The Vinh Luong (Lương Thế Vinh)andGitHub c64458d3b9 parameters: Fix wrong typing in pybricks.parameters.Stop. 2022-09-05 18:38:29 -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
Laurens Valk 6df509b66e pybricks.hubs.EssentialHub: Fix duplicate example.
Also delete reference image with the light consistent with other small hubs.
2022-07-04 15:00:41 +02:00
Laurens Valk ac9585b7a5 ubuiltins: Fix broken classmethod decorator.
Since classmethod is being redefined here, it broke Sphinx.

Fixes https://github.com/pybricks/pybricks-api/issues/86
2022-07-04 14:33:17 +02:00
Laurens Valk 0982d5d65b ubuiltins: Document int. 2022-07-04 14:33:17 +02:00
Laurens Valk 8e7f8c619e ubuiltins: Document float. 2022-07-04 14:33:17 +02:00
Laurens Valk a0b3ba1d74 ubuiltins: Document dict.
This just adds a direct reference to the Python docs.
2022-07-04 14:33:17 +02:00
Laurens Valk 3dc28579ef ubuiltins: Document bool, complex. 2022-07-04 14:33:17 +02:00
Laurens Valk 923f9df3da ubuiltins: Document input, print. 2022-07-04 14:33:17 +02:00
Laurens Valk 1665b77847 ubuiltins: Start converting signatures to new standard.
Also clarify description wherever applicable.
2022-07-04 14:33:17 +02:00
Laurens Valk 96e7e5f3d0 umath: Convert signatures to new standard. 2022-07-04 14:33:17 +02:00
Laurens Valk 1b51d71061 examples: Generate hub examples while building.
This way we don't have to commit the generated scripts.

While we do this, rename ExampleHub to ThisHub so that the common scripts can actually run.
2022-07-04 14:29:33 +02:00
Laurens Valk 9d706d719a .gitignore: Ignore .python-version. 2022-07-04 08:40:28 +02: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
Pavel LobodinskýandDavid Lechner 025147680c pybricks.hubs.EssentialHub: Added missing Hub 2022-06-29 12:08:33 -05:00
David Lechner e467bb57c9 pybricks_jedi/v1.1.0 pybricks_jedi/v1.1.0 2022-06-26 00:10:04 -05:00
David Lechner 33d0c9fa49 v3.2.0b1-r3 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.
pybricks_jedi/v1.0.0
2022-06-24 15:29:02 -05:00
David Lechner 37cdd2a83b v3.2.0b1-r2 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
Laurens Valk 6d0de1effa doc/main: Drop beta tag.
Less variants is better. Now we'll just have to add beta support for SPIKE in the next release.

Fixes https://github.com/pybricks/pybricks-api/issues/102
2022-06-10 11:31:08 +02:00
Laurens Valk 8e7fc53974 doc/main: Disable NXT and EV3 pages again.
Now that all typehints have been added, we can
revert commit 4c583a9d4e again.
2022-06-10 11:20:32 +02:00
Laurens Valk e456c8ef91 pybricks: Drop underscores on imports.
Fixes https://github.com/pybricks/pybricks-api/issues/101
2022-06-10 11:10:20 +02:00
Laurens Valk 6500440031 pybricks: Drop most ellipsis and pass instances.
See [1]: "I still prefer ... over pass. This clarifies to the readers that they are reading a stub. But if there's a docstring we need neither."

[1] https://github.com/srittau/type-stub-pep/issues/88#issuecomment-758843441

Fixes https://github.com/pybricks/pybricks-api/issues/101#issuecomment-1148780369
2022-06-10 10:46:44 +02:00
Laurens Valk 8ec1b18629 pybricks.parameters: Add typing, part 2. 2022-06-10 10:33:33 +02:00
Laurens Valk 26908040eb pybricks.common: Add CommonColorSensor class.
Fixes https://github.com/pybricks/pybricks-api/issues/103
2022-06-10 10:05:13 +02:00
Laurens Valk f67c98105a pybricks.parameters: Add typing, part 1. 2022-06-10 10:05:13 +02:00
Laurens Valk 877391dea7 pybricks.parameters: Add typing. 2022-06-10 10:05:13 +02:00
Laurens Valk fb3446ad0d pybricks.robotics: Add typing. 2022-06-10 10:05:12 +02:00
Laurens Valk 31256d70c1 pybricks.tools: Add typing. 2022-06-10 10:05:12 +02:00
Laurens Valk f87e1b48ac pybricks.messaging: Add typing. 2022-06-10 10:05:12 +02:00
Laurens Valk 6bcf6117c3 pybricks.hubs: Add typing. 2022-06-10 10:05:11 +02:00
Laurens Valk c77682f50d pybricks.iodevices: Add typing. 2022-06-10 10:05:11 +02:00
Laurens Valk 4c583a9d4e doc/main: Enable NXT and EV3 pages.
This will help us review the pages as we add typing to the documentation. Then they will be hidden again.

This commit can be cherry-picked later on if we ever enable NXT and EV3 content again.
2022-06-10 10:05:10 +02:00
Laurens Valk 0688b8dded doc/common/conf.py: Add missing units.
These are used for NXT sensors.
2022-06-10 10:05:10 +02:00