Commit Graph
430 Commits
Author SHA1 Message Date
David Lechner e3d0d51c9f config: drop versioneer
This removes versioneer for versioning. The version depends on the
pybricks-micropython version targeted so it doesn't make sense to use
automatic versioning here.
2020-03-18 17:30:42 -05:00
David Lechner 21cef2f8c8 api: remove __init__.py
pybricks is a namespace, not a module, so it cannot have __init__.py. Otherwise there can be no other packages installed that use the pybricks namespace.
2020-03-18 17:19:48 -05:00
David Lechner 3e8f311860 config: drop setup.py
poetry is used for build system, so setup.py is no longer needed
2020-03-18 17:19:48 -05:00
David Lechner 803c57aa8e config: html_context is no longer dependant on ON_RTD
This refactors duplicated code.
2020-03-18 14:03:50 -05:00
David Lechner e4d1547f83 doc: move css overrides to template
Hopefully this should fix small fonts when docs are published on RDT.org.
2020-03-18 13:51:24 -05:00
Laurens Valk aa343d017f doc/robotics: add note for when to change settings 2020-03-17 15:47:54 +01:00
Laurens Valk 9c8df9941f config: let doc8 ignore egg info 2020-03-17 15:37:20 +01:00
Laurens Valk 1158e4e45a api/builtins/Motor: separate methods for stop
stop(Stop.COAST)
stop(Stop.BRAKE)
stop(Stop.HOLD)

becomes

stop()
brake()
hold()

This is easier to type and remember.
2020-03-17 15:19:55 +01:00
Laurens Valk 1c576d5b11 api/builtins/Motor: rename stop_type kwarg
All point-to-point maneuvers come to a controlled stop before the stop
mode kicks in. Therefore it is more accurate to rename stop_type to
then, as this argument controls what happens after stopping,
so it reads: then=Stop.HOLD.
2020-03-17 15:19:27 +01:00
Laurens Valk 65888a825d api/robotics: revert stop type for stop()
Partially reverts b25227ec5b

This stays coast by default. This way, stop() remains the best way to release all torque from a motor. Also, it ensures that stopping a running motor or drivebase is smooth by default.
2020-03-15 20:44:21 +01:00
Laurens Valk d282d38836 doc/builtins/DCMotor: a DCMotor cannot hold 2020-03-15 20:36:38 +01:00
Laurens Valk 9dd1f45ccd doc: drop default argument in docstring
This is visible in the function definition, so no need to repeat it.
2020-03-15 20:35:36 +01:00
David Lechner 0c611fabab doc/conf.py: add contentui css when building on readthedocs.org 2020-03-13 13:07:08 -05:00
David Lechner 61b58e1886 rtd-requirements: new file for readthedocs.org
readthedocs.org needs to know which packages to install to build the
docs.
2020-03-13 11:35:21 -05:00
David Lechner b3e8728f69 update pybricks-projects submoudle 2020-03-13 10:10:01 -05:00
David Lechner 96fe4f59e0 CONTRIBUTING: new contributor guide 2020-03-13 09:45:29 -05:00
David Lechner 8b986525f7 New AUTHORS.md file
This file lists specific copyright holders and project maintainers.
It will also include any future contributors.
2020-03-13 09:45:29 -05:00
David Lechner abe24cf289 api/builtin: add missing DCMotor.stop() method
This was missing. It also has a different default value
from the Motor class, so Motor overrides this method.
2020-03-12 12:52:27 -05:00
David Lechner 6ed6ec0378 api: remove empty () on class declarations
Python allows this syntax and some even consider it good style.
2020-03-12 12:46:09 -05:00
David Lechner b25227ec5b api/Motor,DriveBase: change default stop to HOLD
This reflects a change in the implmentation
2020-03-07 16:24:42 -06:00
David Lechner 13845c9c08 vscode: associate .inc files with ReST 2020-03-06 13:05:06 -06:00
David Lechner cab16f6af7 api/media/ev3dev: add Image/screen save method
This was overlooked previously.
2020-03-06 12:59:42 -06:00
David Lechner d97b15c23d poetry: move dev dependencies
Development depedencies should be categoriezed as such, otherwise users who install the stubs package will also get these depedencies.
2020-03-06 11:39:49 -06:00
David Lechner be9623dc9f Update PyPI info 2020-03-06 11:34:55 -06:00
David Lechner 46c9fca6e9 poetry: install venv in project driectory
This way, the venv is not hidden away in some cache directory somewhere hard to find.
2020-03-06 11:29:04 -06:00
Laurens Valk 86890adc18 pybricks-projects: update snippets and projects 2020-03-05 16:54:02 +01:00
Laurens Valk ffae01fd0c config: move project specifics to own conf.py
Each target doc build can have it own parameters.
2020-03-05 14:07:31 +01:00
Laurens Valk a1dce8e50e config: use doc agnostic paths for images
Allow files like messaging .rst to be included without having to copy the images.
2020-03-05 13:05:34 +01:00
Laurens Valk e0ec45b58d config: relax poetry Python version
Allow older Python versions to support older CI configs.
2020-03-05 11:26:59 +01:00
Laurens Valk ab44385275 config: make travis use poetry 2020-03-05 10:36:46 +01:00
Laurens Valk 674a7f3e9d config: switch from pipenv to poetry
RTD does not support pipenv
2020-03-05 10:36:46 +01:00
Laurens Valk 066983a5e1 LICENSE: Update year and authors
Also add SPDX-License-Identifier: MIT to API source files for clarity.
2020-03-05 10:33:48 +01:00
Laurens Valk feed562373 config: remove inkscape dependency for travis
Diagrams are no longer built on the CI.
2020-03-04 11:51:00 +01:00
Laurens Valk 3c317967af config: separate make target for diagrams
Separate the build step and commit the output to the repository. This way the docs can be built on platforms that do not have inkscape, such as readthedocs.

pipenv run make -C doc diagrams
pipenv run make -C doc html
2020-03-04 11:49:21 +01:00
Laurens Valk 8861be68eb config: remove diagram builder from common
This has no image targets, so remove to avoid confusion.
2020-03-04 11:43:37 +01:00
Laurens Valk 862f881d33 config: rename _images to diagram_source
Make it clear what it really is.
2020-03-04 11:40:34 +01:00
Laurens Valk 95ee2fa885 doc: remove unused images 2020-03-04 11:32:37 +01:00
Laurens Valk 10731d019a doc/parameters: remove Align
This was already hidden from the docs, but not deleted.
2020-03-03 17:43:53 +01:00
Laurens Valk ef3d7206b0 pybricks-projects: include initial example project
Update the submodule as a first step towards reorganizing the doc build.
2020-03-03 13:20:25 +01:00
Laurens Valk 921fd74896 doc/messaging: fix typo in server/client diagram 2020-03-02 10:31:23 +01:00
David Lechner c76395d07f doc/media/ev3dev: sort images and sounds
Put image and sound files in alphabetical order. Exception made for
sorting numbers by numerical order.
2020-02-26 19:06:44 -06:00
Laurens Valk 5288a7e75d doc/iodevices/Ev3devSensor: add links and examples 2020-02-25 10:29:40 +01:00
Laurens Valk c02cc456f7 api/iodevices/Ev3devSensor: add device index
This makes it easy to find the sensor to access additional features through the ev3dev lego-sensor and lego-port classes.
2020-02-25 10:29:40 +01:00
David Lechner df6cfa30f6 api/media.ev3dev.Image: Add default args for empty()
Implementation has been changed so that omitting args gives an empty
image the same size as the screen.
2020-02-21 11:01:44 -06:00
Laurens Valk 854760feb6 api/builtins/Control: add feed_forward gain
This can be useful for motors with high internal static friction.
2020-02-20 16:34:25 +01:00
Laurens Valk a426d412bb doc/iodevices: add preliminary warning 2020-02-20 16:29:13 +01:00
Laurens Valk 0d068b17f2 api/iodevices/AnalogSensor: remove type check
This makes it consistent with the UARTDevice and I2CDevice class.

The `Ev3devSensor` class can be used instead if auto id is desired.
2020-02-20 16:23:26 +01:00
Laurens Valk b81b28d338 api/builtins/Control: add scale property 2020-02-19 19:40:44 +01:00
Laurens Valk 16e8af0f4d api/builtins/Control: add integral_rate setter 2020-02-17 14:04:50 +01:00
Laurens Valk a0fba6c2d1 api/builtins/Control: Move stalled to control
This is a control status property, so move it to the control class. This way, it is hidden from the common motor methods, and DriveBases will be able to use it too.
2020-02-17 13:55:45 +01:00