Skip to content

Commit

Permalink
Version 1.0.0 (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-hull committed Jul 30, 2017
1 parent 25b4ff3 commit e79e82d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 64 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ChangeLog
+------------+------------------------------------------------------------------------+------------+
| Version | Description | Date |
+============+========================================================================+============+
| **1.0.0** | * Stable release (remove all deprecated methods & parameters) | 2017/07/30 |
+------------+------------------------------------------------------------------------+------------+
| **0.11.1** | * Add Python3 compatibility for neopixels/neosegments | 2017/07/29 |
+------------+------------------------------------------------------------------------+------------+
| **0.11.0** | * Alternative WS2812 low level implementation | 2017/07/21 |
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.1
1.0.0
23 changes: 3 additions & 20 deletions luma/led_matrix/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from luma.core.interface.serial import noop
from luma.core.device import device
from luma.core.render import canvas
from luma.core.util import deprecation, observable
from luma.core.util import observable
from luma.core.virtual import sevensegment
from luma.led_matrix.segment_mapper import dot_muncher, regular

Expand Down Expand Up @@ -64,25 +64,8 @@ def __init__(self, serial_interface=None, width=8, height=8, cascaded=None, rota
raise luma.core.error.DeviceDisplayModeError(
"Unsupported display mode: {0} x {1}".format(width, height))

assert block_orientation in [0, 90, -90, 180, "horizontal", "vertical"]
if block_orientation == "vertical":
msg = (
"WARNING! block_orientation=\"vertical\" is now deprecated and "
"should be changed to block_orientation=-90 to acheive the same "
"effect. Use of \"vertical\" will be removed entirely beginning "
"v1.0.0")
deprecation(msg)
self._correction_angle = -90
elif block_orientation == "horizontal":
msg = (
"WARNING! block_orientation=\"horizontal\" is now deprecated and "
"should be changed to block_orientation=0 to acheive the same "
"effect. Use of \"horizontal\" will be removed entirely beginning "
"v1.0.0")
deprecation(msg)
self._correction_angle = 0
else:
self._correction_angle = block_orientation
assert block_orientation in [0, 90, -90, 180]
self._correction_angle = block_orientation

self.cascaded = cascaded or (width * height) // 64
self._offsets = [(y * self._w) + x
Expand Down
15 changes: 0 additions & 15 deletions luma/led_matrix/legacy.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def read_file(fname):
"pytest-cov"
]

install_deps = ["luma.core>=0.9.5"]
install_deps = ["luma.core>=1.0.0"]
if os.uname()[4].startswith("arm"):
install_deps += "rpi-ws281x"
install_deps += "ws2812"
Expand Down
19 changes: 0 additions & 19 deletions tests/test_legacy.py

This file was deleted.

8 changes: 0 additions & 8 deletions tests/test_max7219.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# See LICENSE.rst for details.

import pytest
import warnings

from luma.led_matrix.device import max7219
from luma.core.render import canvas
Expand Down Expand Up @@ -200,10 +199,3 @@ def test_block_realignment_plus180():
def test_unknown_block_orientation():
with pytest.raises(AssertionError):
max7219(serial, cascaded=2, block_orientation="sausages")


def test_deprecated_block_orientation(recwarn):
warnings.simplefilter('always')
max7219(serial, cascaded=2, block_orientation="vertical")
max7219(serial, cascaded=2, block_orientation="horizontal")
assert len(recwarn) == 2

0 comments on commit e79e82d

Please sign in to comment.