Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
62423c1
Fix Display class on stretch. (#424)
ddemidov Oct 28, 2017
31876c7
fix travis link (#426)
moriarty Oct 29, 2017
5e55114
Replaces print statement with built in function (#428)
moriarty Oct 29, 2017
fa7f41f
Add gitter.im badge (#427)
ddemidov Oct 30, 2017
9760f1e
Remove "connected" attribute (#402)
WasabiFan Nov 14, 2017
50219c6
Proposed implementation for issue #403 (#431)
EricPobot Nov 23, 2017
4d18f10
Fix description of EV3 color sensor's "ambient" mode (#436)
vagoston Dec 8, 2017
afd5ccd
Fix documentation for Motor.position_sp
ddemidov Jan 8, 2018
9ede4c0
Separate GyroBalancer drive control loop from balance loop (#432)
gregcowell Jan 11, 2018
babd44d
Bring documentation up-to-date with the develop branch
ddemidov Jan 8, 2018
92aac67
Spell out evdev dependency for readthedocs
ddemidov Jan 8, 2018
d74b525
Don't use a list if we look for a single driver. (#444)
ensonic Jan 12, 2018
b2d5230
Rename namespace: ev3dev -> ev3dev2 (#412)
WasabiFan Jan 29, 2018
34f68c0
ev3dev#1026: Sound.speak does not work with double quotes (#443)
amandaoneal Jan 30, 2018
ee0f4b9
EV3-G API: ultrasonic sensor #364 (#445)
dwalton76 Jan 31, 2018
6b1adc2
"address" argument on LEDs #422 (#446)
dwalton76 Jan 31, 2018
f050a43
one line import #420 (#447)
dwalton76 Feb 1, 2018
a99d198
Replace pkg_resources with __file__/glob combination (#458)
ddemidov Apr 30, 2018
aede8e9
Update display for 4.14 kernel (#462)
ddemidov May 20, 2018
5b71fdc
Update brickpi names for ev3dev-2.0.0 kernel (#460)
dlech May 23, 2018
7092ab1
Add test which writes to a property
WasabiFan Jul 12, 2018
5a8d229
Manually mark device files as group-writable on Travis
WasabiFan Jul 13, 2018
b6c1e9c
Initial set of updates to documentation for Stretch (#411)
WasabiFan Jul 17, 2018
6602523
debian: update control file for ev3dev-lang-python 2.x (#482)
dlech Jul 17, 2018
64f480b
Fix PyPi deploy config on Travis
WasabiFan Jul 19, 2018
94563ab
Update pypi credentials for travis
ddemidov Jul 19, 2018
6a533ef
Update setup.py (#487)
dlech Jul 19, 2018
46e029b
debian: update Maintainer field with team email (#488)
dlech Jul 19, 2018
dc6be59
Update README badges
WasabiFan Jul 28, 2018
d61fd9f
Improve clarity of motor docs (#489)
WasabiFan Jul 28, 2018
c627380
Port fixes from 1.2.0 tag to stretch release branch; update EV3 port …
WasabiFan Jul 28, 2018
e5c2a4b
Accept unit classes in motor groups (#480)
WasabiFan Jul 29, 2018
b9fb2b1
Sync README, docs and code behavior (#490)
WasabiFan Jul 29, 2018
9caaa83
Update package metadata for PyPi (#491)
WasabiFan Jul 29, 2018
fae581f
Update docs links in display class
WasabiFan Jul 29, 2018
fb16e89
Remove obsolete file
WasabiFan Jul 30, 2018
0434dc3
Update changelog for 2.0.0-beta1 release
WasabiFan Jul 30, 2018
775dfd0
Update issue template for library V2 (#493)
WasabiFan Aug 2, 2018
06a8341
Improve speed integer and rename "speed_pct" to "speed" (#500)
WasabiFan Aug 31, 2018
8b1d8aa
Use Pillow manipulation logic for grey-to-RGB conversion on EV3 to im…
WasabiFan Aug 31, 2018
bcd8acc
Handle errors in attrbute getter; fix unit __str__
WasabiFan Sep 11, 2018
f931414
Fix play_tone method (#513)
WasabiFan Sep 12, 2018
8bbec51
Optimistically check the mode of the sensor before setting it on prop…
WasabiFan Sep 12, 2018
5a18ee4
Fix IR sensor and Sound class links in upgrading guide (#522)
WasabiFan Sep 15, 2018
31c2e89
Flexible relative movement and improved parameter handling (#523)
WasabiFan Sep 23, 2018
ba448e9
Micropython support (#514)
WasabiFan Sep 23, 2018
f3a5b77
Update changelog for v2.0.0-beta2
WasabiFan Sep 23, 2018
9df9b90
Minor docs wording improvements (#530)
WasabiFan Sep 30, 2018
f2315a6
Fix evdev name for buttons on EV3 (#529)
WasabiFan Sep 30, 2018
3d8c1b3
Add note about remote two-button limit
WasabiFan Oct 4, 2018
066c3e6
Rename rate_and_angle to angle_and_rate (#538)
dwalton76 Oct 28, 2018
3f02757
MoveJoyStick should use SpeedPercent (#537)
dwalton76 Oct 28, 2018
ab360a1
brickpi(3) raise exception if LargeMotor not used for a motor (#549)
dwalton76 Nov 6, 2018
307d81e
wait_until_not_moving should consider 'running holding' as 'not movin…
dwalton76 Nov 7, 2018
e991879
Added DistanceValue classes (#550)
dwalton76 Nov 7, 2018
a8371a9
suppress unittest ResourceWarning messages (#556)
dwalton76 Nov 7, 2018
b209cab
motor: remove speed 0, degrees 0, etc checks (#553)
dwalton76 Nov 7, 2018
a8603d3
Sound: removed play() in favor of play_file() (#552)
dwalton76 Nov 7, 2018
69ae735
MoveDifferential (#536)
dwalton76 Nov 7, 2018
8bd7024
GyroSensor wait_until_angle_changed_by added direction_sensitive opti…
dwalton76 Nov 8, 2018
1308e11
Display: correct xy variable names passed to Display.rectangle() (#557)
dwalton76 Nov 8, 2018
3a59bb9
Use specific filter to ignore only ResourceWarnings in test runs (#560)
WasabiFan Nov 10, 2018
cfa20db
cache attributes that never change (#564)
dwalton76 Nov 13, 2018
4709e88
MotorSet off() vs stop() (#563)
dwalton76 Nov 13, 2018
9708857
Add port name constants for stacked brickpi3s (#562)
dwalton76 Nov 21, 2018
ddac973
brickpi(3) support use of the Motor class (#566)
dwalton76 Nov 22, 2018
5c97757
Make new stacked BrickPi port name constants available to import (#572)
omartin2010 Dec 14, 2018
cd135e1
motors.py: added missing parameter 'motors' to MotorSet.is_stalled (#…
v-gar Dec 15, 2018
e19014d
Update changelog for is_stalled fix
WasabiFan Dec 15, 2018
052bf15
docs: Replace deprecated pip call with launching in separate process …
WasabiFan Dec 19, 2018
c9fa616
Fix call to "off" when MoveJoystick.on is called with joystick center…
WasabiFan Dec 19, 2018
e0feed7
Split other.rst into individual pages for each class/purpose (#574)
WasabiFan Dec 23, 2018
a992ed5
IR sensor "proximity" is object proximity, not distance to the remote…
WasabiFan Dec 23, 2018
db5a522
Remove obsolete INPUT_AUTO and OUTPUT_AUTO (#580)
WasabiFan Dec 23, 2018
23f036e
Update CONTRIBUTING.rst (#582)
WasabiFan Dec 23, 2018
4bc2e6d
Expose ev3dev2.version.__version__ as ev3dev2.__version__ (#581)
WasabiFan Dec 23, 2018
dddcc70
Add new debian binary package for MicroPython (#577)
WasabiFan Dec 25, 2018
6253b1d
Add docs page on port name constants (#585)
WasabiFan Dec 31, 2018
3210781
Rename namespace: ev3dev -> ev3dev2 (#590)
remvee Jan 20, 2019
ca41321
Update changelog for v2.0.0-beta3
WasabiFan Feb 2, 2019
14ca0e0
Allow Display.text_pixels() to receive a loaded font or a font string…
Mar 20, 2019
aa984a6
Revert "wait_until_not_moving should consider 'running holding' as 'n…
dwalton76 Mar 24, 2019
a61e5f3
Sound: fallback to regular case of 'note' if uppercase is not found (…
dwalton76 Mar 24, 2019
f54a822
Fix GyroAngle.reset() (#609)
dlech Mar 25, 2019
9d6c694
LED animation support (#567)
dwalton76 Mar 28, 2019
ab4dfd0
Update tests/README to include sphinx-build instructions (#604)
dwalton76 Mar 28, 2019
dbafcd9
HDMI display support for raspberry pi based platforms (#610)
dwalton76 Apr 6, 2019
6f6161e
Fix name of EV3 Gyro sensor TILT-ANG mode (#618)
dlech Apr 13, 2019
78dd8bc
MoveDifferential odometry support (#615)
dwalton76 Apr 18, 2019
9a136e5
Avoid poll(None) if no timeout specified (#622)
dwalton76 Apr 22, 2019
4d86295
StopWatch class (#631)
dwalton76 May 13, 2019
2e3cfbd
micropython support for LED animations (#634)
dwalton76 May 14, 2019
ba10ffc
micropython support for Sound (#632)
dwalton76 May 19, 2019
78fc30c
Micropython buttons support (#639)
dwalton76 May 30, 2019
475b386
Initial draft of MicroPython docs (#611)
WasabiFan May 30, 2019
9490222
PID Line follower (#630)
dwalton76 Jul 25, 2019
208e7a4
Updated README, FAQ, and CONTRIBUTING documentation (#653)
bpmerkel Jul 28, 2019
31e1b2d
Console() implementation (#649)
bpmerkel Jul 28, 2019
0842e69
Console() rows/columns, echo, and cursor properties; doc corrections …
bpmerkel Aug 18, 2019
a1e4882
Distribution in changelog is now the codename
WasabiFan Aug 18, 2019
74f5b05
Update changelog for 2.0.0-beta4 release
WasabiFan Aug 18, 2019
e233cc0
add console and stopwatch to Debian rules file (#658)
bpmerkel Aug 18, 2019
8f6c5d4
Update changelog for 2.0.0-beta5 release
WasabiFan Aug 18, 2019
b1fa000
Improve contributing guide for issues and add micropython to FAQ (#662)
WasabiFan Aug 22, 2019
5f9677f
Ask for micropython-ev3dev2 version in issue template
WasabiFan Aug 25, 2019
eee1c38
Fix gyro sensor reset (#692)
dlech Nov 24, 2019
ae357b7
Add gyro sensor reset fix to changelog
WasabiFan Nov 24, 2019
53b88d6
Update changelog for 2.0.0 release
WasabiFan Nov 25, 2019
1d27b5b
Ignore Debian package tags for PyPi versioning
WasabiFan Nov 25, 2019
141daa6
Fix Button process() on Micropython
WasabiFan Dec 21, 2019
133ee6e
Add seconds and elapsed checks to stopwatch (#667)
WasabiFan Dec 28, 2019
18d7785
Adds Gyro Support to MoveTank (#697)
nshenoy Dec 29, 2019
cfb2f70
Update changelog
WasabiFan Dec 29, 2019
2664ff9
Add rest notes to sound.Sound.play_song() (#701)
dwalton76 Dec 30, 2019
f321ad6
LED animation fix duration None (#703)
dwalton76 Dec 30, 2019
11e17c9
RPyC update docs and make it easier to use (#700)
dwalton76 Jan 11, 2020
19508df
use double backticks consistently in docstrings (#710)
dwalton76 Jan 12, 2020
27ac6f3
MoveDifferential: use gyro for better accuracy (#705)
dwalton76 Jan 15, 2020
579b8eb
Revert "MoveDifferential: use gyro for better accuracy (#705)"
Jan 17, 2020
706c789
format code via yapf (#716)
dwalton76 Jan 20, 2020
d9fbf79
MoveDifferential: use gyro for better accuracy (#718)
dwalton76 Feb 9, 2020
028e788
Fix code formatting in contributing guide
WasabiFan Feb 22, 2020
981e6b2
MoveTank turn_degrees convert speed to SpeedValue object (#724)
dwalton76 Mar 21, 2020
9f49526
Add link to BrickPi example in README
WasabiFan Mar 23, 2020
45452dc
Add docs links to brickpi3 sensor example
WasabiFan Mar 23, 2020
d8d98e0
Flake8 (#723)
dwalton76 Mar 23, 2020
0a01596
Update changelog for 2.1.0 release
WasabiFan Mar 23, 2020
83ef815
Upgrade to python3.8 on Travis
WasabiFan Mar 23, 2020
f17c434
Use new .readthedocs.yml rather than manual pip invocation (#729)
WasabiFan Mar 23, 2020
a232135
Add release instructions to contributing guide (#730)
WasabiFan Mar 24, 2020
7d9540c
Pin Sphinx to version 2.4.4 on Travis builds (#735)
WasabiFan Apr 14, 2020
0703bdc
Fix spelling in LED example: cyle -> cycle
WasabiFan Jul 11, 2020
b9aa81b
Add sleep to infinite loop example in README (#755)
dlech Aug 1, 2020
f62864c
Clarify ideal WAV audio format
WasabiFan Aug 23, 2020
1e308e1
Fix Lab color space conversion
kairosmeer Jan 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .flake8.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[flake8]
max-line-length = 120
max-complexity = 40
ignore =
W504
exclude =
.git
./ev3dev2/auto.py
./tests/fake-sys/
./venv
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ __pycache__
dist
*.egg-info
RELEASE-VERSION
ev3dev/version.py
ev3dev2/version.py
build
_build/
docs/_build/
.idea
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

formats: all

python:
version: 3.7
install:
- requirements: docs/requirements.txt
28 changes: 22 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
language: python
env:
- USE_MICROPYTHON=false
- USE_MICROPYTHON=true
python:
- 3.4
- 3.8
cache:
pip: true
directories:
- ~/micropython
- ~/.micropython
sudo: false
git:
depth: 100
install:
- pip install Pillow
- pip install evdev
- if [ $USE_MICROPYTHON = false ]; then pip install Pillow Sphinx==2.4.4 sphinx_bootstrap_theme recommonmark evdev==1.0.0 && pip install -r ./docs/requirements.txt; fi
- if [ $USE_MICROPYTHON = true ]; then ./.travis/install-micropython.sh && MICROPYTHON=~/micropython/ports/unix/micropython; fi
script:
- ./tests/api_tests.py
- chmod -R g+rw ./tests/fake-sys/devices/**/*
- if [ $USE_MICROPYTHON = false ]; then python3 -W ignore::ResourceWarning tests/api_tests.py; fi
- if [ $USE_MICROPYTHON = true ]; then $MICROPYTHON tests/api_tests.py; fi
- if [ $USE_MICROPYTHON = false ]; then sphinx-build -nW -b html ./docs/ ./docs/_build/html; fi
deploy:
provider: pypi
user: Denis.Demidov
password:
secure: W13pXc2pp2A9gBUDz2QW/K3OfDT/cn/iapkW6NMdkwRQ+CL7MWXsY2qayfxs6QPfR5W7838pmMXogLOie70n8Hov5/XIrou+dEz/xh6If2VFG41KUz/tP9cy1yUhDYeADn5I+mr+8Yrh59OkHkaeZH1EFndbsxY4pyXV0DT+FNVg4eLc8sE5ZCfa/itVdsqp8M4xrMe8NO/ldnFEIHFymyEMTZHR5qoJD+Uk+AGMR4cSeSuOrZixnSLpQViZDFHpwej6F1LrreLltbT9ChjSEmdPAr1Jp1ReQfuD+vBzUMkhVfZyEo+fY1x8FZVPrTAEtbJGDhvTAsrV1KTgPqanMyyrCIG+OWfCSYYPyg7MYbAJVfB+P0BRp1cm2D5oFrpAZE129oVtATOykQarFzzRFhH4Tyc04WriyY/greEAe58MqYoJAZXUIe/JLf9+GLdjBKD07+q7QMZvyEEdsDCPYkqKQeuwrWZ/JlpWO5rmy12L23aYzvJqhcKo9LZQOY8LkmFmxuxt7k5eb/3iZ1trhj/lwoLLSu8l29B8cK3dax38URie0x9bMMhQRxaO59JQuhGuu0sNHiuFQHs6wLs/V8ff1IZIlRSlzztqIP3KW514TEdsFIuF0Gpn5wvagAXFbSnyxAUUTy81eQjY/ExTiUHKfU3zjluaAYGt9zjF0Bc=
secure: cTDN4WMJEjxZ0zwFwkLPpOIOSG/1JlHbQsHzd/tV9LfjBMR0nJR5HrmyiIO1TE5Wo6AFSFd7S3JmKdEnFO1ByvN/EFtsKGRUR9L6Yst4KfFi4nHwdZ7vgPTV0nNdvgC1YM/3bx8W8PcjFSm/k8awx7aicwXj09yDA8ENTf5XedaX22Z+9OKhb1mKola1cqEoc0GwaYzd8UX0Ruwh9/6RRbvTt7zn8BCZc9vIVqNd6mZgBWY9zAU40ZZsjYORbiZmDNCygEI+RViZ51M58WYkPPhoivzcG9em8DMRS7SC3CjWGapiOaXUHa3Fhnn+IQ+Q8Xv9YU5+qmj65MWQy3SSnMnvuxmrLf4aLoOlSJUMhDarjni4tdBOTX5PdOkdmhskyQt1DqDrw0+WhPItYfGe5zQfQwqW+YOpGbOipAeU+844arPo5jvZG/IOBX2qVUwdSxo8Y/98ocjqoZOq8b5xkWtJef0Kh1RCkp1bR2XELQVe76qeWqQxWz3OPqq+wK3xeNvj5kMQmytl3dCEB//D6UcES7Qr8YxD+LWoaIf32JIj/4LaCXXuxMVH+PJ68Oc72/ox0qLmXK0qhbea2QvaqXyGDrO+a2X6VbMdH32D2xHzH4Mg75xLnXnSaFvGovhYl1zEVcYUDioxrXZEuDmymGf9nH2mivJ24Fon6u+C3QQ=
on:
tags: true
repo: rhempel/ev3dev-lang-python
condition:
- $TRAVIS_TAG != ev3dev-stretch/*
- $USE_MICROPYTHON = false
repo: ev3dev/ev3dev-lang-python
25 changes: 25 additions & 0 deletions .travis/install-micropython.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
set -ex

if [ -e ~/micropython/ports/unix/micropython ]; then
# the micropython binary already exists, which means that the cached folder was restored
exit 0
fi

cd ~/

# Build micropython from source
# TODO: cache micropython build output
git clone --recurse-submodules https://github.com/micropython/micropython.git --depth 1 --branch v1.9.4 --quiet
cd ./micropython/ports/unix
make axtls
make

# Install upip
~/micropython/tools/bootstrap_upip.sh

# Install micropython library modules
~/micropython/ports/unix/micropython -m upip install micropython-unittest micropython-os micropython-os.path micropython-shutil micropython-io micropython-fnmatch micropython-numbers micropython-struct micropython-time micropython-logging micropython-select micropython-fcntl
# Make unittest module show error output; will run until failure then print first error
# See https://github.com/micropython/micropython-lib/blob/f20d89c6aad9443a696561ca2a01f7ef0c8fb302/unittest/unittest.py#L203
sed -i 's/#raise/raise/g' ~/.micropython/lib/unittest.py
3 changes: 3 additions & 0 deletions .yapf.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[style]
based_on_style = pep8
COLUMN_LIMIT = 120
160 changes: 116 additions & 44 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,68 +1,140 @@
Contributing to the Python language bindings for ev3dev
=======================================================

This repository holds the pure Python bindings for peripheral
devices that use the drivers available in the ev3dev_ distribution.
for embedded systems.
This repository holds the Python bindings for ev3dev_, ev3dev-lang-python.

Contributions are welcome in the form of pull requests - but please
take a moment to read our suggestions for a happy maintainer (me) and
even happier users.

The ``master`` branch
---------------------

This is where the latest tagged version lives - it changes whenever
we release a tag that gets released.

The ``develop`` branch
----------------------
Opening issues
--------------

This is the branch that is undergoing active development intended
for the next tagged version that gets released to ``master``.
Please make sure you have read the FAQ_. If you are still encountering your
problem, open an issue, and ensure that the questions asked by the issue
template are completely answered with correct info. This will make it much
easier for us to help you!

Please make sure that your pull requests are against the
``develop`` branch.
Submitting Pull Requests
------------------------

Before you issue a Pull Request
-------------------------------

This is a hobby for me, I get no compensation for the work I do
on this repo or any other contributions to ev3dev_. That does not
make me special, it's the same situation that everyone involved
in the project is in.
Contributions are welcome in the form of pull requests - but please
take a moment to read our suggestions for happy maintainers and
even happier users.

Therefore, do not count on me to test your PR before I do the
merge - I will certainly review the code and if it looks OK I will
just merge automatically.
Sometimes, it isn't easy for us to pull your suggested change and run
rigorous testing on it. So please help us out by validating your changes
and mentioning what kinds of testing you did when you open your PR.
Please also consider adding relevant tests to ``api_tests.py`` and documentation
changes within the ``docs`` directory.

I would ask that you have at least tested your changes by running
a test script on your target of choice as the generic ``robot`` user
that is used by the ``Brickman`` UI for ev3dev_.
The ``ev3dev-stretch`` branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please do not run as ``root`` or your own user that may have group
memberships or special privileges not enjoyed by ``robot``.
This is where the latest version of our library lives. It targets
``ev3dev-stretch``, which is the current stable version of ev3dev.
We publish releases from this branch.

If your change breaks or changes an API
---------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Breaking changes are discouraged, but sometimes they are necessary. A
more common change is to add a new function or property to a class.
If you add a new parameter to an existing function, give it a default value
so as not to break existing code that calls the function.

Either way, if it's more than a bug fix, please add enough text to the
comments in the pull request message so that I can paste it into the
draft release notes that I keep running for the next release out of
master.
comments in the pull request message so that we know what was updated
and can easily discuss the breaking change and add it to the release
notes.

If your change addresses an Issue
---------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bug fixes are always welcome, especially if they are against known
Bug fixes are always welcome, especially if they are against known
issues!

When you send a pull request that addresses an issue, please add a
note something like ``Fixes #24`` in the PR so that we get linkage
back to the specific issue.
When you send a pull request that addresses an issue, please add a
note of the format ``Fixes #24`` in the PR so that the PR links back
to its relevant issue and will automatically close the issue when the
PR is merged.

Building and testing changes on the EV3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In an SSH terminal window with an EV3 with Internet access,
run the following commands:
(recall that the default ``sudo`` password is ``maker``)

```shell
git clone https://github.com/ev3dev/ev3dev-lang-python.git
cd ev3dev-lang-python
sudo make install
```

To update the module, use the following commands:

.. code-block:: bash

cd ev3dev-lang-python
git pull
sudo make install


If you are developing micropython support, you can take a shortcut
and use the following command to build and deploy the micropython
files only:

.. _ev3dev: http://ev3dev.org

.. code-block:: bash

cd ev3dev-lang-python
sudo make micropython-install

To re-install the latest release, use the following command:


.. code-block:: bash

sudo apt-get --reinstall install python3-ev3dev2

Or, to update your current ev3dev2 to the latest release, use the
following commands:


.. code-block:: bash

sudo apt update
sudo apt install --only-upgrade micropython-ev3dev2

Publishing releases
-------------------

#. Update the changelog, including a correct release date. Use ``date -R`` to get correctly-formatted date.
#. Commit the changelog. By convention, use message like ``Update changelog for 2.1.0 release``.
#. Build/update pbuilder base images: ``OS=debian DIST=stretch ARCH=amd64 pbuilder-ev3dev base`` and ``OS=raspbian DIST=stretch ARCH=armhf pbuilder-ev3dev base``.
#. ``./debian/release.sh`` and enter passwords/key passphrases as needed
#. ``git push``
#. ``git push --tags``
#. ``git tag -d stable``
#. ``git tag stable``
#. ``git push --tags --force``
#. ``git tag -a 2.1.0 -m "python-ev3dev2 PyPi release 2.1.0"``
#. ``git push --tags``

Note that push order is important; the CI server will get confused if you push
other tags pointing to the same commit after you push the PyPi release tag. This
doesn't actually cause release issues, but does mark the CI builds as "failed"
because it tried to publish the same release again.

**Check all of the following after release is complete:**

- Emails from package server don't include any errors
- All Travis CI builds succeeded
- New release is available on PyPi
- Release tags are up on GitHub
- ReadTheDocs is updated

- ReadTheDocs "stable" version points to latest release
- There is an explicit version tag for the last-released version (exeption: ``2.1.0``)
- There is an explicit version tag for this version (you will likely need to manually activate it)
- All ReadTheDocs builds succeeded

.. _ev3dev: http://ev3dev.org
.. _FAQ: https://python-ev3dev.readthedocs.io/en/ev3dev-stretch/faq.html
6 changes: 3 additions & 3 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!--
Before we can help you, we need some information about what you are trying to do and what software you are using.
If you are reporting a bug or asking a usage question, please fill out the information below; otherwise you can delete this template.
Please fill out the information below.
-->

- **ev3dev version:** PASTE THE OUTPUT OF `uname -r` HERE
- **ev3dev-lang-python version:**
- **ev3dev-lang-python version:** INSERT ALL VERSIONS GIVEN BY `dpkg-query -l {python3,micropython}-ev3dev*` HERE

<!-- Now tell us about what you were trying to do, and include any error messages you received. Be specific and include any involved code, please! -->
<!-- Now tell us about what you were trying to do, and include any error messages you received. Be specific and include any involved code, please! Make sure to include your import statements as well. -->

1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include git_version.py
include spec_version.py
include RELEASE-VERSION
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Makefile to assist developers while modifying and testing changes before release
# Note: to re-install a release of EV3DEV2, use `sudo apt-get --reinstall install python3-ev3dev2`
OUT := build
MPYCROSS := /usr/bin/mpy-cross
MPYC_FLAGS := -v -v -mcache-lookup-bc
PYS := $(shell find ./ev3dev2 -type f \( -iname "*.py" ! -iname "setup.py" \))
MPYS := $(PYS:./%.py=${OUT}/%.mpy)
vpath %.py .

${OUT}/%.mpy: %.py
@mkdir -p $(dir $@)
${MPYCROSS} ${MPYC_FLAGS} -o $@ $<

install:
python3 setup.py install

micropython-install: ${MPYS}
cp -R $(OUT)/* /usr/lib/micropython/

clean:
find . -name __pycache__ | xargs rm -rf
find . -name *.pyc | xargs rm -rf

format:
yapf --style .yapf.cfg --in-place --exclude tests/fake-sys/ --recursive .
python3 -m flake8 --config=.flake8.cfg .
Loading