Skip to content

Commit 4561603

Browse files
committed
- keep root.dat also on Linux
- lib updates
1 parent b6a6802 commit 4561603

File tree

6 files changed

+46
-44
lines changed

6 files changed

+46
-44
lines changed

src/artisanlib/acaia.py

+30-29
Original file line numberDiff line numberDiff line change
@@ -92,29 +92,30 @@ class ACAIA_TIMER(IntEnum):
9292
TIMER_STATE_STARTED = 1
9393
TIMER_STATE_PAUSED = 2
9494

95+
# Acaia legacy service and characteristics UUIDs
96+
ACAIA_LEGACY_SERVICE_UUID:Final[str] = '00001820-0000-1000-8000-00805f9b34fb' # Internet Protocol Support Service # adverstised service UUID
97+
ACAIA_LEGACY_NOTIFY_UUID:Final[str] = '00002a80-0000-1000-8000-00805f9b34fb'
98+
ACAIA_LEGACY_WRITE_UUID:Final[str] = '00002a80-0000-1000-8000-00805f9b34fb' # same as notify!
99+
100+
# Acaia legacy name prefixes
101+
ACAIA_LEGACY_PEARL_NAME:Final[str] = 'PROCHBT' # Acaia Pearl
102+
ACAIA_LEGACY_LUNAR_NAME:Final[str] = 'ACAIA' # Acaia Lunar Legacy
103+
104+
# Acaia service and characteristics UUIDs
105+
ACAIA_SERVICE_UUID:Final[str] = '49535343-FE7D-4AE5-8FA9-9FAFD205E455'
106+
ACAIA_NOTIFY_UUID:Final[str] = '49535343-1E4D-4BD9-BA61-23C647249616'
107+
ACAIA_WRITE_UUID:Final[str] = '49535343-8841-43F4-A8D4-ECBE34729BB3'
108+
109+
# Acaia name prefixes
110+
ACAIA_PEARL_NAME:Final[str] = 'PEARL-' # Acaia Pearl (2021)
111+
ACAIA_PEARLS_NAME:Final[str] = 'PEARLS' # Acaia Pearl S
112+
ACAIA_LUNAR_NAME:Final[str] = 'LUNAR-' # Acaia Lunar (2021)
113+
ACAIA_CINCO_NAME:Final[str] = 'CINCO' # Acaia Cinco
114+
ACAIA_PYXIS_NAME:Final[str] = 'PYXIS' # Acaia Pyxis
95115

96116
class AcaiaBLE(ClientBLE):
97117

98-
# Acaia legacy service and characteristics UUIDs
99-
ACAIA_LEGACY_SERVICE_UUID:Final[str] = '00001820-0000-1000-8000-00805f9b34fb' # Internet Protocol Support Service # adverstised service UUID
100-
ACAIA_LEGACY_NOTIFY_UUID:Final[str] = '00002a80-0000-1000-8000-00805f9b34fb'
101-
ACAIA_LEGACY_WRITE_UUID:Final[str] = '00002a80-0000-1000-8000-00805f9b34fb' # same as notify!
102118

103-
# Acaia legacy name prefixes
104-
ACAIA_LEGACY_PEARL_NAME:Final[str] = 'PROCHBT' # Acaia Pearl
105-
ACAIA_LEGACY_LUNAR_NAME:Final[str] = 'ACAIA' # Acaia Lunar Legacy
106-
107-
# Acaia service and characteristics UUIDs
108-
ACAIA_SERVICE_UUID:Final[str] = '49535343-FE7D-4AE5-8FA9-9FAFD205E455'
109-
ACAIA_NOTIFY_UUID:Final[str] = '49535343-1E4D-4BD9-BA61-23C647249616'
110-
ACAIA_WRITE_UUID:Final[str] = '49535343-8841-43F4-A8D4-ECBE34729BB3'
111-
112-
# Acaia name prefixes
113-
ACAIA_PEARL_NAME:Final[str] = 'PEARL-' # Acaia Pearl (2021)
114-
ACAIA_PEARLS_NAME:Final[str] = 'PEARLS' # Acaia Pearl S
115-
ACAIA_LUNAR_NAME:Final[str] = 'LUNAR-' # Acaia Lunar (2021)
116-
ACAIA_CINCO_NAME:Final[str] = 'CINCO' # Acaia Cinco
117-
ACAIA_PYXIS_NAME:Final[str] = 'PYXIS' # Acaia Pyxis
118119

119120
# Acaia message constants
120121
HEADER1:Final[bytes] = b'\xef'
@@ -157,16 +158,16 @@ def __init__(self, connected_handler:Optional[Callable[[], None]] = None,
157158
self.set_heartbeat(self.HEARTBEAT_FREQUENCY) # send keep-alive heartbeat all 3-5sec; seems not to be needed any longer after sending ID on newer firmware versions!?
158159

159160
# register Acaia Legacy UUIDs
160-
for legacy_name in (self.ACAIA_LEGACY_LUNAR_NAME, self.ACAIA_LEGACY_PEARL_NAME):
161-
self.add_device_description(self.ACAIA_LEGACY_SERVICE_UUID, legacy_name)
162-
self.add_notify(self.ACAIA_LEGACY_NOTIFY_UUID, self.notify_callback)
163-
self.add_write(self.ACAIA_LEGACY_SERVICE_UUID, self.ACAIA_LEGACY_WRITE_UUID)
161+
for legacy_name in (ACAIA_LEGACY_LUNAR_NAME, ACAIA_LEGACY_PEARL_NAME):
162+
self.add_device_description(ACAIA_LEGACY_SERVICE_UUID, legacy_name)
163+
self.add_notify(ACAIA_LEGACY_NOTIFY_UUID, self.notify_callback)
164+
self.add_write(ACAIA_LEGACY_SERVICE_UUID, ACAIA_LEGACY_WRITE_UUID)
164165

165166
# register Acaia Current UUIDs
166-
for acaia_name in (self.ACAIA_PEARL_NAME, self.ACAIA_PEARLS_NAME, self.ACAIA_LUNAR_NAME, self.ACAIA_PYXIS_NAME, self.ACAIA_CINCO_NAME):
167-
self.add_device_description(self.ACAIA_SERVICE_UUID, acaia_name)
168-
self.add_notify(self.ACAIA_NOTIFY_UUID, self.notify_callback)
169-
self.add_write(self.ACAIA_SERVICE_UUID, self.ACAIA_WRITE_UUID)
167+
for acaia_name in (ACAIA_PEARL_NAME, ACAIA_PEARLS_NAME, ACAIA_LUNAR_NAME, ACAIA_PYXIS_NAME, ACAIA_CINCO_NAME):
168+
self.add_device_description(ACAIA_SERVICE_UUID, acaia_name)
169+
self.add_notify(ACAIA_NOTIFY_UUID, self.notify_callback)
170+
self.add_write(ACAIA_SERVICE_UUID, ACAIA_WRITE_UUID)
170171

171172

172173
# protocol parser
@@ -186,9 +187,9 @@ def on_connect(self) -> None:
186187
self.fast_notifications_sent = False
187188
self.slow_notifications_sent = False
188189
connected_service_UUID = self.connected()
189-
if connected_service_UUID == self.ACAIA_LEGACY_SERVICE_UUID:
190+
if connected_service_UUID == ACAIA_LEGACY_SERVICE_UUID:
190191
_log.debug('connected to Acaia Legacy Scale')
191-
elif connected_service_UUID == self.ACAIA_SERVICE_UUID:
192+
elif connected_service_UUID == ACAIA_SERVICE_UUID:
192193
_log.debug('connected to Acaia Scale')
193194
if self._connected_handler is not None:
194195
self._connected_handler()

src/artisanlib/roast_properties.py

+4
Original file line numberDiff line numberDiff line change
@@ -2567,6 +2567,7 @@ def closeEvent(self, _:Optional['QCloseEvent'] = None) -> None:
25672567
self.aw.qmc.roastpropertiesAutoOpenDropFlag = self.org_roastpropertiesAutoOpenDropFlag
25682568

25692569
self.aw.qmc.clear_last_picked_event_selection()
2570+
self.aw.eNumberSpinBox.setValue(0)
25702571

25712572
self.aw.qmc.redraw(recomputeAllDeltas=False)
25722573

@@ -5273,6 +5274,9 @@ def accept(self) -> None:
52735274
# save column widths
52745275
self.aw.qmc.energytablecolumnwidths = [self.energy_ui.datatable.columnWidth(c) for c in range(self.energy_ui.datatable.columnCount())]
52755276

5277+
self.aw.qmc.clear_last_picked_event_selection()
5278+
self.aw.eNumberSpinBox.setValue(0)
5279+
52765280
# load selected recent roast template in the background
52775281
if self.aw.loadbackgroundUUID(self.template_file,self.template_uuid):
52785282
try:

src/build-linux.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ for babeltrans in $(find dist/_internal/babel/locale-data -type f -name "*.dat")
195195
babeltrans_filename="${babeltrans##*/}"
196196
match=0
197197
for lang in ${SUPPORTED_LANGUAGES}; do
198-
if [ ${babeltrans_filename} = "${lang}.dat" ] ; then
198+
if [ ${babeltrans_filename} = "${lang}.dat" ] && [ ${babeltrans_filename} != "root.dat" ] ; then
199199
match=1
200200
break
201201
fi

src/plus/schedule.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1088,10 +1088,7 @@ def getRight(self) -> str:
10881088
return f'{weight}{task_date_str}'
10891089
except Exception as e: # pylint: disable=broad-except
10901090
# if anything goes wrong here we log an exception and return the empty string
1091-
try: # catch exception on logging exception!
1092-
_log.error(e)
1093-
except Exception as e: # pylint: disable=broad-except
1094-
pass
1091+
_log.exception(e)
10951092
return ''
10961093

10971094
def select(self) -> None:

src/requirements-dev.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
types-openpyxl>=3.1.5.20241225
1+
types-openpyxl>=3.1.5.20250306
22
types-Pillow>=10.2.0.20240822
33
types-protobuf>=5.29.1.20250208
44
types-psutil>=7.0.0.20250218
55
types-pyserial>=3.5.0.20250304
66
types-python-dateutil==2.9.0.20241206
77
types-pytz>=2025.1.0.20250204
88
types-pyyaml>=6.0.12.20241230
9-
types-requests>=2.32.0.20241016
9+
types-requests>=2.32.0.20250306
1010
types-setuptools>=75.8.2.20250305
1111
types-urllib3>=1.26.25.14
1212
types-docutils>=0.21.0.20241128
1313
lxml-stubs>=0.5.1
1414
mypy==1.15.0
1515
pyright==1.1.396
16-
ruff>=0.9.9
17-
pylint==3.3.4
16+
ruff>=0.9.10
17+
pylint==3.3.5
1818
pre-commit>=4.1.0
1919
pytest>=8.3.5
2020
pytest-cov==6.0.0
@@ -25,7 +25,7 @@ pytest-cov==6.0.0
2525
#pytest-bdd==6.1.1
2626
#pytest-benchmark==4.0.0
2727
#pytest-mock==3.11.1
28-
hypothesis>=6.127.6
28+
hypothesis>=6.128.2
2929
coverage>=7.6.12
3030
coverage-badge==1.1.2
3131
codespell==2.4.1

src/requirements.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
######
2020
# the following commented package versions are read by appveyor.yml and downloaded outside of pip.
2121
#
22-
# pyinstaller==6.11.1; platform_system='Windows'
22+
# pyinstaller==6.12.0; platform_system='Windows'
2323
# libusb==1.0.26; platform_system='Linux'
2424
# dotenv==2.8.1; platform_system='Linux' # v3.0.0 not compatible with fpm # gem installed, not pip
2525
#
@@ -46,7 +46,7 @@ portalocker==2.10.1; python_version < '3.9' # last Python 3.8 release
4646
portalocker==3.1.1; python_version >= '3.9'
4747
xlrd==2.0.1
4848
websockets==13.1; python_version < '3.9' # last Python 3.8 release
49-
websockets==15.0; python_version >= '3.9'
49+
websockets==15.0.1; python_version >= '3.9'
5050
PyYAML==6.0.2
5151
psutil==7.0.0
5252
typing-extensions==4.10.0; python_version < '3.8' # required for supporting Final and TypeDict on Python <3.8
@@ -101,7 +101,7 @@ PyQtWebEngine==5.15.6; (sys_platform=='darwin' and platform_release<'20.0') or (
101101
PyQt6==6.8.1; (sys_platform=='darwin' and platform_release>='20.0') or (platform_system=='Windows' and python_version>'3.10') or (platform_system=='Linux' and platform_machine!='aarch64')
102102
PyQt6-WebEngine==6.8.0; (sys_platform=='darwin' and platform_release>='20.0') or (platform_system=='Windows' and python_version>'3.10') or (platform_system=='Linux' and platform_machine!='aarch64')
103103
###
104-
pyinstaller==6.11.1; platform_system=='Linux' # on Windows pyinstaller is separately installed (see above)
104+
pyinstaller==6.12.0; platform_system=='Linux' # on Windows pyinstaller is separately installed (see above)
105105
###
106106
### Qt build tools not part of PyQt but required by build-derived
107107
qt5-tools==5.15.2.1.3; (platform_system=='Windows' and python_version<'3.9')
@@ -133,8 +133,8 @@ SecretStorage==3.3.3; platform_system=='Linux'
133133
### Windows specific packages
134134
###
135135
build==1.2.2.post1; platform_system=='Windows' # required to build pyinstaller bootloader
136-
pywin32==308; platform_system=='Windows'
136+
pywin32==309; platform_system=='Windows'
137137
pyinstaller-versionfile==2.1.1; platform_system=='Windows' and python_version < '3.9'
138138
pyinstaller-versionfile==3.0.0; platform_system=='Windows' and python_version >= '3.9'
139139
libusb-package==1.0.26.1; platform_system=='Windows'
140-
tzdata==2024.2; platform_system=='Windows' and python_version >= '3.9' # to prevent pyinstaller WARNING: Hidden import "tzdata" not found!
140+
tzdata==2025.1; platform_system=='Windows' and python_version >= '3.9' # to prevent pyinstaller WARNING: Hidden import "tzdata" not found!

0 commit comments

Comments
 (0)