Continues losing connection.

Hi @ec-blaster, first of all, many thanks for this great plugin, you did a great job!
I faced a bug, maybe you will be able to help me here?
Precondition:
Connected successfully, everything works fine, MagicSwitchBot is close to my Home Assistant server.
Scenario:

I'm taking MagicSwitchBot and moving to another room (where I planned to install it);
Device lose connection;
I'm moving MagicSwitchBot back, close to Home Assistant server.

Problem:
Each minute device lose connection, staying unavailable for 1 minute and getting back online for the next minute. And it's repeating each 2 minutes, you can check screenshot of history attached. In my case I need reboot home assistant to restore normal connection.

I believe each time when device is losing connection we will have the same behaviour, and it will never get back to stable connection. Is it common issue, or something specific to my environment?

Same problem, Raspberry Pi 3 bluetooth:
2021-03-23 16:33:11 ERROR (MainThread) [magicswitchbot] MagicSwitchbot communication failed. We won't try again.
NoneType: None
2021-03-23 16:33:11 WARNING (MainThread) [custom_components.magicswitchbot.switch] Couldn't get battery level of switch.magic
2021-03-23 16:33:58 INFO (MainThread) [pyhap.hap_protocol] ('<IP_ADDRESS>', 55521): Connection made to HASS Bridge QFF1
2021-03-23 16:34:10 INFO (MainThread) [magicswitchbot] Connected to MagicSwitchbot at 34:14:B5:4A:2E:07 from hci0
2021-03-23 16:34:11 INFO (MainThread) [magicswitchbot] Command sent to MagicSwitchbot (34:14:B5:4A:2E:07): 92da5370eb71f9116ad9c294231a4c17
2021-03-23 16:34:11 INFO (MainThread) [magicswitchbot] Response: [Command = 02, Return Code = 02, Length = 1, Params = 3d]
2021-03-23 16:34:11 INFO (MainThread) [magicswitchbot] Battery level retrieved: 61
2021-03-23 16:35:08 WARNING (MainThread) [magicswitchbot] MagicSwitchbot communication error: Device disconnected
2021-03-23 16:35:08 WARNING (MainThread) [magicswitchbot] Cannot send command to MagicSwitchbot. Retrying (remaining attempts: 3)...
2021-03-23 16:35:09 WARNING (MainThread) [magicswitchbot] MagicSwitchbot communication error: Helper not started (did you call connect()?)
2021-03-23 16:35:09 WARNING (MainThread) [magicswitchbot] Cannot send command to MagicSwitchbot. Retrying (remaining attempts: 2)...
2021-03-23 16:35:09 WARNING (MainThread) [magicswitchbot] Cannot send command to MagicSwitchbot. Retrying (remaining attempts: 1)...
2021-03-23 16:35:09 ERROR (MainThread) [magicswitchbot] MagicSwitchbot communication failed. We won't try again.
NoneType: None
2021-03-23 16:35:09 WARNING (MainThread) [custom_components.magicswitchbot.switch] Couldn't get battery level of switch.magic
2021-03-23 16:36:11 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.magic fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 277, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 473, in async_device_update
raise exc
File "/config/custom_components/magicswitchbot/switch.py", line 142, in async_update
self._battery_level = self._device.get_battery()
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 628, in get_battery
ok = self._sendCommand(self.CMD_GETBAT, "01", self._retry_count)
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 438, in _sendCommand
self._connect()
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 236, in _connect
self._device = PeripheralExt(deviceAddr=self._mac,
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 37, in init
self._connect(deviceAddr, addrType, iface, timeout)
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 56, in _connect
while rsp['state'][0] == 'tryconn':
TypeError: 'NoneType' object is not subscriptable
2021-03-23 16:37:10 INFO (MainThread) [magicswitchbot] Connected to MagicSwitchbot at 34:14:B5:4A:2E:07 from hci0
2021-03-23 16:37:11 INFO (MainThread) [magicswitchbot] Command sent to MagicSwitchbot (34:14:B5:4A:2E:07): 0f936c79aa3ef83701db15cfe39a18a9
2021-03-23 16:37:11 INFO (MainThread) [magicswitchbot] Response: [Command = 02, Return Code = 02, Length = 1, Params = 3d]
2021-03-23 16:37:11 INFO (MainThread) [magicswitchbot] Battery level retrieved: 61
2021-03-23 16:38:08 WARNING (MainThread) [magicswitchbot] MagicSwitchbot communication error: Device disconnected
2021-03-23 16:38:08 WARNING (MainThread) [magicswitchbot] Cannot send command to MagicSwitchbot. Retrying (remaining attempts: 3)...
2021-03-23 16:38:09 WARNING (MainThread) [magicswitchbot] MagicSwitchbot communication error: Helper not started (did you call connect()?)
2021-03-23 16:38:09 WARNING (MainThread) [magicswitchbot] Cannot send command to MagicSwitchbot. Retrying (remaining attempts: 2)...
2021-03-23 16:38:09 WARNING (MainThread) [magicswitchbot] Cannot send command to MagicSwitchbot. Retrying (remaining attempts: 1)...
2021-03-23 16:38:09 ERROR (MainThread) [magicswitchbot] MagicSwitchbot communication failed. We won't try again.
NoneType: None
2021-03-23 16:38:09 WARNING (MainThread) [custom_components.magicswitchbot.switch] Couldn't get battery level of switch.magic
2021-03-23 16:39:10 INFO (MainThread) [magicswitchbot] Connected to MagicSwitchbot at 34:14:B5:4A:2E:07 from hci0
2021-03-23 16:39:10 INFO (MainThread) [magicswitchbot] Command sent to MagicSwitchbot (34:14:B5:4A:2E:07): e0fc5dbc7fadb10f7c3284018da37e3d
2021-03-23 16:39:10 INFO (MainThread) [magicswitchbot] Response: [Command = 02, Return Code = 02, Length = 1, Params = 3d]
2021-03-23 16:39:10 INFO (MainThread) [magicswitchbot] Battery level retrieved: 61

Thanks @eliogrin and @jampem
Yesterday I had a similar issue, but now it is running quite stable for me:

I think there are several problems here:

The bluetooth connection has a bad quality.
Something happens with the bluetooh connection that breaks from time to time if the HA node and the magicswitchbot are not near enough. I solved it by connecting an external bluetooth adapter with an extension cable. From that moment, it went fantastic.
The library I am using (bluepy) has no way to detect when the connection breaks.
So what happens is:

Every minute I check the bot battery.
If it is not connected, it tries to connect (up to 3 times).
After connecting it should read the battery level and the connection would be alive again.

That's the theory, but as I can see at your logs, if the device does not connect after 3 attempts, it stops trying and continues at the next minute.
Things to consider and that I have to fix:

The switches are polled to get their battery levels every minute.
I should allow the users to configure this scan period.
If the device does not connect in 3 seconds, it gives up.
I think this connect timeout should also be configurable, but there's a problem: I can only detect the connection fail when I am going to read the battery level, but if you set a high timeout, this blocks Home Assistant "loop", so it may affect the whole system stability. That happened to me before I set this timeout.

Definitely I have to implement some alternate strategy for the disconnection check. I'll make some tests and publish a fix as soon as possible.
In the meantime, I can advise you to get the sensors as near as possible to the HA server, or get an extension cable and a higher power bluetooth dongle.

@ec-blaster thanks for response.
Yes, I'm going to order bluetooth dongle, because of unstable connection, it's definitely not a problem on your side :).
But problem which I was raised here, is mainly about unavailability to restore stable connection after loosing it once. At least in my case I was able to restore stable connection only by restarting home assistant. Even when I put device next to my Raspberry Pi it connection wasn't back to normal.
I'm not so experienced with creating plugins, but just as an idea, is it possible to not keep connection active for the whole time? So whenever there is click action - you will establish connection and send request. At least in my case I need to change the state pretty rarely (few times per day).

In my case (and I think that also for @jampem) the connection does restore over time, I don't have to restart HA.
The problem is that it doesn't connect on time when it's needed.
So for the second question, I'm not too experienced either, neither with HA development nor Python development. My first attempt was in fact connecting every time I needed to access the switch, but in my tests, the connection time (including the time you need to get all the acknolewgments and the connection token) was taking too long to do it at the moment you needed. It could take up to 7-8 seconds to activate the switch, and I thought that would not be normal...

I tried old Epox external bluetooth dongle and 0.5 meters from dongle to switch, same same, not working:

Some thoughts while I am searching for a solution:

Did you disconnect the Magic Swtichbot devices from its smartphone app? Maybe there are 2 clients fighting when connecting to the devices. There's only a connection that can be stablished. If you connect with the app you cannot from HA, and viceversa.
There appears to be some problems using bluetooth with Raspberry:

https://stackoverflow.com/questions/65366042/bluepy-frequent-ble-disconnects-between-raspberry-pi4-and-esp32-bluetooth
https://github.com/RPi-Distro/firmware-nonfree/issues/8

Anyway I am rethinking the way the library connects, in next releases I hope to fix it.

I did disconnect Magic from my iPhone and as I said "the old SwitchBot" works ok. Also tried external bluetooth stick.

Please check the v0.0.3 release.
I hope it solves some of your connection problems...

At the moment it works perfectly ec-blaster!! Very good job!! Thank you very much!!

Raspberry 3 internal bluetooth, working little better but still some problems, I will try external bluetooth dongle soon:
2021-03-29 17:32:57 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Connected with hci1.
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Auto-disconnect scheduled for 30 seconds.
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETTOKEN command: 06010054f260aeea655114b8bfad0855
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 06, Return Code = 02, Length = 9, Params = 408b61c70102000700)
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] The current connection token is 408b61c7
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Chip type: 01, Firmware version: 2.0, Device type: 07, Password enabled: False
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETBAT command:<PHONE_NUMBER>8b61c7e94dccbb691b6d85
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 02, Return Code = 02, Length = 1, Params = 32)
2021-03-29 17:32:58 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Battery level: 50%
2021-03-29 17:33:09 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_SWITCH command:<PHONE_NUMBER>8b61c72b4d8c01d7f74171
2021-03-29 17:33:10 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 05, Return Code = 02, Length = 1, Params = 00)
2021-03-29 17:33:10 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Switch state changed successfully
2021-03-29 17:33:10 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Auto-disconnect scheduled for 30 seconds.
2021-03-29 17:33:10 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETBAT command:<PHONE_NUMBER>8b61c7af7385663f135d69
2021-03-29 17:33:11 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Communication error: Device disconnected
2021-03-29 17:33:11 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Helper not started (did you call connect()?) when checking connection state (1 of 3 attempts)
2021-03-29 17:33:11 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Helper not started (did you call connect()?) when checking connection state (2 of 3 attempts)
2021-03-29 17:33:12 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Helper not started (did you call connect()?) when checking connection state (3 of 3 attempts)
2021-03-29 17:33:12 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Communication failed. Remaining attempts: 3...
2021-03-29 17:33:16 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Connected with hci1.
2021-03-29 17:33:16 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Auto-disconnect scheduled for 30 seconds.
2021-03-29 17:33:16 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETTOKEN command: 0601003d457bb1df443a040009f8568d
2021-03-29 17:33:16 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 06, Return Code = 02, Length = 9, Params = e30f47430102000700)
2021-03-29 17:33:16 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] The current connection token is e30f4743
2021-03-29 17:33:16 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Chip type: 01, Firmware version: 2.0, Device type: 07, Password enabled: False
2021-03-29 17:33:16 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETBAT command: 02010101e30f474351ad6caed2cf0f6d
2021-03-29 17:33:17 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 02, Return Code = 02, Length = 1, Params = 32)
2021-03-29 17:33:17 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Battery level: 50%
2021-03-29 17:33:17 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Auto-disconnect scheduled for 30 seconds.
2021-03-29 17:33:23 INFO (Thread-230) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Client disconnected
2021-03-29 17:33:39 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Connected with hci1.
2021-03-29 17:33:40 WARNING (Thread-234) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Unexpected response (desc) when checking connection state (1 of 3 attempts)
2021-03-29 17:33:47 WARNING (Thread-237) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] 'NoneType' object has no attribute 'poll' when checking connection state (2 of 3 attempts)
2021-03-29 17:33:47 INFO (Thread-234) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Client disconnected
2021-03-29 17:33:47 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1629643560] 'NoneType' object has no attribute 'poll'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 141, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 642, in entity_service_call
future.result()  # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 681, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 679, in _handle_entity_call
await result
File "/config/custom_components/magicswitchbot/switch.py", line 132, in async_turn_off
if self._device.turn_off():
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 705, in turn_off
return self._sendCommand(self.CMD_SWITCH, self.PAR_SWITCHOFF, self._retry_count)
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 520, in _sendCommand
if self._connect(connect_timeout=self._connectTimeout, retries=retries):
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 282, in _connect
self._cccdDescriptor = self._userReadChar.getDescriptors(forUUID=self.UUID_NOTIFY_SET)[0]
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 208, in getDescriptors
for desc in self.peripheral.getDescriptors(self.valHandle+1, hndEnd):
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 524, in getDescriptors
resp = self._getResp('desc')
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 407, in _getResp
resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 338, in _waitResp
if self._helper.poll() is not None:
AttributeError: 'NoneType' object has no attribute 'poll'
2021-03-29 17:33:47 WARNING (Thread-237) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] 'NoneType' object has no attribute 'getState' when checking connection state (3 of 3 attempts)
2021-03-29 17:33:47 ERROR (Thread-237) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 381, in _is_connected
conn_status = self._device.getState()
AttributeError: 'NoneType' object has no attribute 'getState'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 1254, in run
self.function(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 352, in _disconnect
if not self._is_connected():
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 390, in _is_connected
self._device.disconnect()
AttributeError: 'NoneType' object has no attribute 'disconnect'
2021-03-29 17:33:58 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1629643560] 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 141, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 642, in entity_service_call
future.result()  # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 681, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 679, in _handle_entity_call
await result
File "/config/custom_components/magicswitchbot/switch.py", line 132, in async_turn_off
if self._device.turn_off():
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 705, in turn_off
return self._sendCommand(self.CMD_SWITCH, self.PAR_SWITCHOFF, self._retry_count)
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 520, in _sendCommand
if self._connect(connect_timeout=self._connectTimeout, retries=retries):
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 272, in _connect
self._device = PeripheralExt(deviceAddr=self._mac,
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 50, in init
self._connect(deviceAddr, addrType, iface, timeout)
File "/usr/local/lib/python3.8/site-packages/magicswitchbot/init.py", line 69, in _connect
while rsp['state'][0] == 'tryconn':
TypeError: 'NoneType' object is not subscriptable

Hi, @jampem, thanks for your feedback.
From what I can read at your logs, it seems like you have a quite unstable connection to the Magic Switchbot device. Your raspberry starts connecting but, in about 6 or 7 seconds max, the device falls the connection. Maybe with an USB BT dongle things get better... I don't know. In my experience, I got to connect a BT dongle with an extension cable, so that the dongle was as near as possible. I have a pair of walls in between though.
Anyway I can see an uncontrolled exception in my code, and it would be helpful if you could provide another log with DEBUG level set.
Thanks

To @jampem:  You can test now release v0.0.4. It has better exception catching. At least your logs will be cleaner and clearer, I hope

Hi, Sorry the last message was from external bluetooth dongle. Here is RB3 internal and the 0.04 ver.
And RB3 and switch are less than a meter apart:
2021-03-30 11:14:57 ERROR (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Couldn't connect to device (Failed to connect to peripheral 34:14:B5:4A:2E:07, addr type: public)
2021-03-30 11:15:00 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Connected with hci0.
2021-03-30 11:15:01 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Auto-disconnect scheduled for 30 seconds.
2021-03-30 11:15:01 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETTOKEN command: 060100191db5e34924cd86ddc38c225c
2021-03-30 11:15:02 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Communication error: Device disconnected
2021-03-30 11:15:02 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Helper not started (did you call connect()?) when checking connection state (1 of 3 attempts)
2021-03-30 11:15:02 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Helper not started (did you call connect()?) when checking connection state (2 of 3 attempts)
2021-03-30 11:15:03 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Helper not started (did you call connect()?) when checking connection state (3 of 3 attempts)
2021-03-30 11:15:03 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Communication failed. Remaining attempts: 3...
2021-03-30 11:15:05 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Connected with hci0.
2021-03-30 11:15:05 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Auto-disconnect scheduled for 30 seconds.
2021-03-30 11:15:05 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETTOKEN command: 060100733bfb8c8378f7d9c572e3abeb
2021-03-30 11:15:05 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 06, Return Code = 02, Length = 9, Params = 4e9a8fef0102000700)
2021-03-30 11:15:05 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] The current connection token is 4e9a8fef
2021-03-30 11:15:05 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Chip type: 01, Firmware version: 2.0, Device type: 07, Password enabled: False
2021-03-30 11:15:05 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_SWITCH command: 050101014e9a8fef1a857911209b5e9c
2021-03-30 11:15:06 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 05, Return Code = 02, Length = 1, Params = 00)
2021-03-30 11:15:06 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Switch state changed successfully
2021-03-30 11:15:06 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Auto-disconnect scheduled for 30 seconds.
2021-03-30 11:15:06 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Sending CMD_GETBAT command: 020101014e9a8fef5ef87bf07ca54c6b
2021-03-30 11:15:06 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Response: (Command = 02, Return Code = 02, Length = 1, Params = 32)
2021-03-30 11:15:06 INFO (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Battery level: 50%
2021-03-30 11:15:07 WARNING (MainThread) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Unexpected response (ntfy) when checking connection state (1 of 3 attempts)
2021-03-30 11:15:31 INFO (Thread-136) [magicswitchbot] MagicSwitchbot[34:14:B5:4A:2E:07] Client disconnected

From your logs and bluetoothctl output, I can see that you have constant disconnection issues with the device.
I can't help you here, as this is not relative to my component, it's a lower level problem.
I don't know if it's a problem with the RB or with the device, but the connection is not stable to proccess the commands that the component sends.
Does it work OK from the official app? Doesn't it disconnect?

You can check newer releases, they control better the exceptions, but the underlying problem is a bad connectivity issue.
Read comments in #4 as the look the same.


Fix http transporter test

<IP_ADDRESS> cannot be bound on most systems, changing it to <IP_ADDRESS>

lgtm :ship:


Attempt to run a test on Windows using travis

Coverage remained the same at 94.769% when pulling b5d81cd7f223789af3b4480472fb849b5735e054 on drdavella:travis-windows into 41200690ed3e3542794bdccb2a765d55f0d86433 on spacetelescope:master.


DCOS-38727 Add marathon constraints on helloworld scheduler

Tests for DCOS-38727

Strict test shows failure for the new test:
E           dcos.errors.DCOSException: Service is already installed: hello-world


Container only

Clarified OSHy-X only runs inside a container. See issue https://github.com/Cadaei-Yuvxvs/OSHy-X/issues/5

Clarified OSHy-X only runs inside a container. See issue https://github.com/Cadaei-Yuvxvs/OSHy-X/issues/5


add (id)parameter to draggingBlocks.  UIView self can be called in draggingBlocks

In my situation, I need to change UIView itself in draggingBlocks. And I think add (id self) in draggingBlocks is helpful.
I'm not sure if there is any problem with it, and these code run well in my app. If I'm wrong , please tell me. Thank you

Hi @jeffssss
The PR looks good, but I rather use typed parameters instead of id. So that would be UIView.
Also, can you update the test suite? If you're not too confident with it I can do it instead, let me know.

You are right. Typed parameters UIView is better. And I'm glad to do this. One question is that, What is test suite ? (my poor english  T_T)  Is that means I need to update UIViewDraggableDemo code to show this feature ?

I mean the tests in the demo app:
https://github.com/andreamazz/UIView-draggable/blob/master/UIViewDraggableDemo/UIViewDraggableDemoTests/UIViewDraggableDemoTests.m#L158
https://github.com/andreamazz/UIView-draggable/blob/master/UIViewDraggableDemo/UIViewDraggableDemoTests/UIViewDraggableDemoTests.m#L169
https://github.com/andreamazz/UIView-draggable/blob/master/UIViewDraggableDemo/UIViewDraggableDemoTests/UIViewDraggableDemoTests.m#L234

I didn't use Test before but I'll try my best. Please review my code after I finish this part of test suite. Thank you for your patience.

No problem, thanks for your work :+1:

I modify 3 cases you mentioned before and add should call dragging moved block case in Test file. And "Test success" is shown after I run the test. I think it's ok.
One question is, after I fork this project and open UIViewDraggableDemo.xcworkspace, an error occurred: "Expecta+Snapshots/EXPMatchers+FBSnapshotTest.h" file not found in UIViewDraggableDemoTests.m.
There's something wrong with environment setting. And I solve this by delete use_frameworks! in Podfile and use 'pod install' to rebuild xcworkspace file. But it's not the right way to solve this problem. Do you have any good solution?

:+1:

Merged and released in 1.1.0


Stop NPE when pricing tier is not specified within build.gradle file

When a pricingTier is not specified within the build.gradle file, a NullPointerException is thrown when attempting to set up the telemetry details, as it is not permissible to insert a NULL value into a HashMap.
pricingTier can be NULL when using an App Service Plan instead of a Consumption plan.
This change sets the pricing key in the telemetry to be an empty string instead of NULL in this case.

Is anyone able to review this change and merge it?


Not possible to set SO_KEEPALIVE for Socket

In the current dart SDK (2.10.5), enabling or disabling TCP Socket KEEPALIVE is not available via Socket.setSocketOption (which uses RawSocketOption).
Ideally, keepalive period (TCP_KEEPIDLE / TCP_KEEPALIVE) /  could also be exposed, as its supported on both iOS + Android (but with different options)
Is this planned?
Thanks for your attention.

It is supported. You just need to construct RawSocketOption with the right level and option. For example on iOS and Mac OS that would be RawSocketOption.fromBool(/* SOL_SOCKET */ 0xffff, /* SO_KEEPALIVE */ 0x0008, true) and RawSocketOption.fromInt(/* IPPROTO_TCP */ 6, /* TCP_KEEPALIVE */ 0x10, secs) to enable keepalive and set keepalive period.
Have you tried this? Does it not work for you for some reason?

For Android you would have to use RawSocketOption.fromBool(/* SOL_SOCKET */ 0x1, /* SO_KEEPALIVE */ 0x0009, true) and RawSocketOption.fromInt(/* IPPROTO_TCP */ 6, /* TCP_KEEPIDLE */ 4, secs) if I am reading headers correctly.

I didn't actually try it as I wasn't finding the correct headers and though that using hard-coded values wasn't a great idea (but thinking about it now, its not a problem since the platform can't change the value as it mean losing compatibility).
I tried both (and some other options) in both iOS and Android and it worked fine.
Thanks a lot!

can someone help me do that too?
i'm trying to set a socket keep-alive so when socket or connection disconnected i got notified
i added the rawSocketOption but when i disconnect phone from internet nothing happens
can you show me in code and how would i know that connection is lost?
does it call an Exception or onDone?

Hey @MahmoodBakhshayesh, maybe the default interval is too high?
I believe it will throw on socket.done, so socket.done.catchError((error) { }) would catch it.
This is the code I'm using to enable keepalive on both iOS and Android with configurable interval:
void _enableKeepalive(Socket socket) {
  // Enable keepalive probes every 60 seconds with 3 retries each 10 seconds
  final keepaliveEnabled = true;
  final keepaliveInterval = 60;
  final keepaliveSuccessiveInterval = 10;
  final keepaliveSuccessiveCount = 3;

  if (Platform.isIOS || Platform.isMacOS) {
    final enableKeepaliveOption = RawSocketOption.fromBool(
      0xffff, // SOL_SOCKET
      0x0008, // SO_KEEPALIVE
      keepaliveEnabled
    );
    final keepaliveIntervalOption = RawSocketOption.fromInt(
      6, // IPPROTO_TCP
      0x10, // TCP_KEEPALIVE
      keepaliveInterval
    );
    final keepaliveSuccessiveIntervalOption = RawSocketOption.fromInt(
      6, // IPPROTO_TCP
      0x101, // TCP_KEEPINTVL
      keepaliveSuccessiveInterval,
    );
    final keepaliveusccessiveCountOption = RawSocketOption.fromInt(
      6, // IPPROTO_TCP
      0x102, // TCP_KEEPCNT
      keepaliveSuccessiveCount
    );

    socket.setRawOption(enableKeepaliveOption);
    socket.setRawOption(keepaliveIntervalOption);
    socket.setRawOption(keepaliveSuccessiveIntervalOption);
    socket.setRawOption(keepaliveusccessiveCountOption);
  } else if (Platform.isAndroid) {
    final enableKeepaliveOption = RawSocketOption.fromBool(
      0x1, // SOL_SOCKET
      0x0009, // SO_KEEPALIVE
      keepaliveEnabled
    );
    final keepaliveIntervalOption = RawSocketOption.fromInt(
      6, // IPPROTO_TCP
      4, // TCP_KEEPIDLE
      keepaliveInterval
    );
    final keepaliveSuccessiveIntervalOption = RawSocketOption.fromInt(
      6, // IPPROTO_TCP
      5, // TCP_KEEPINTVL
      keepaliveSuccessiveInterval,
    );
    final keepaliveusccessiveCountOption = RawSocketOption.fromInt(
      6, // IPPROTO_TCP
      6, // TCP_KEEPCNT
      keepaliveSuccessiveCount
    );

    socket.setRawOption(enableKeepaliveOption);
    socket.setRawOption(keepaliveIntervalOption);
    socket.setRawOption(keepaliveSuccessiveIntervalOption);
    socket.setRawOption(keepaliveusccessiveCountOption);
  }
}

@pheki  Thank you very much I needed these options real bad.
Nothing is mentioned about these options in the docs, GPT, Copilot everywhere its mentioned dart does not support these options.
Me and my friend (@DeepakJhawar) were struggling for 3 days straight to integrate Java and Kotlin (as they support these features) and  we failed.
Thank you very much, now we simply used the code you mentioned, no pain of writing in Java or Kotlin and integrating it.

@Hruthik0x I also had totally forgotten I wrote that comment haha, but I'm glad to help!


[2586] New course locations styling fixes

Context
The new course locations page is not in line with the prototype
Changes proposed in this pull request

Refactor the new course locations page be in line with the prototype

Checklist

[x] Make sure all information from the Trello card is in here
[x] Attach to Trello card
[x] Rebased master
[x] Cleaned commit history
[x] Tested by running locally

 Locations page: Copy updates


Add feature to find nr_running on a CPU

It can be useful to know the length of a CPU's runqueue at any given moment. Should add an analysis feature to do this.

Work in progress here, just sharing in case it can be useful to anyone: https://github.com/bjackman/lisa/tree/trace-nr-running
Broadly seems to work, needs validating and probably some tweaks for corner cases (duplicate indices, values at the beginning of the trace before we have data).

Nice I love this! Another great analysis I think could be to check how
often sched_stat_runtime gets updated for a task so that we can identify
issues related to the lack of it's update.
On Jul 10, 2017 7:18 AM, "Brendan Jackman"<EMAIL_ADDRESS>wrote:

Work in progress here, just sharing in case it can be useful to anyone:
https://github.com/bjackman/lisa/tree/trace-nr-running
Broadly seems to work, needs validating and probably some tweaks for
corner cases (duplicate indices, values at the beginning of the trace
before we have data).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ARM-software/lisa/issues/441#issuecomment-314119720,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACSVC57KZch6etBNe8MNxQrOY5sUkrLks5sMjLBgaJpZM4OS6A3
.

Cool. BTW the end goal of this analysis is to figure out how much time there was when one more CPUs had multiple runnable tasks while at the same time another CPU was idle.

Oops, fat-fingered the close button

Bit more progress, the first step of this task is to figure out which which rq tasks were attached to: I've got a pretty solid (read: there is 1 unit test :P) implementation here: https://github.com/bjackman/lisa/commit/5e0ca5e09a6d5ab883a766c7bc87dac7f729ad99
Next step is to:

Figure out when each task was runnable (shaky WIP here: https://github.com/bjackman/lisa/commit/0cf49d0a33dc53e6fb30d7f0a3b0b8c65a9320a1)
Combine info about tasks being runnable with which rq they're attached to to give you nr_running (shaky WIP here https://github.com/bjackman/lisa/commit/d1806f1b3f6c38e767117335ce7ff208b7a17aef)


[BUG] Latest DAE version is not working correctly with AA

Describe the bug
Hello,
While using DAE version 0.10.04, AA is unable to add an effect to a token with the following change: macro.CUB CUSTOM CONDITION_NAME (suspect that is the same for convenient effects)
The error is:

I think this has to do with the changes in DAE: https://gitlab.com/tposney/dae/-/blob/master/Changelog.md#anchor-01004
Added a semaphore on add/remove cub effects, convenient effects, token effects ...
To Reproduce
Steps to reproduce the behavior:

Create an aura effect with the following macro.CUB CUSTOM CONDITION_NAME
Add the aura to a scene
Move a token within the aura radius
See error

Environment:

OS: Windows
Browser: Chrome
Foundry Version: 9.255
Module Version: 0.4.02
All Modules Disabled: all but DAE

A fix was made on DAE for his. All ok now.


Clean up rubocop issues

Run rubocop and fix all of the problems.  Don't forget to uncomment the lines in circleci.yml so it runs in ci.

Fixed in bfb2216198cd8741f85f3c39639ccbc93aa7a621


Scoping automated testing steps

Summary

Especially for the first iteration of what needs to be tested through CI we need to have a path of what needs testing.
For example - menu bars, contrast

From @gabalafou

So I think there’s a big place for you in helping with the design and scoping for whatever the thing is that we are going to build for automated testing.

Tasks to complete

Roughly:

@isabela-pf  work on scoping the first iteration of testing: keeping in mind in an ideal world we would like to test everything but this is impossible, so instead, we will aim for what definitely needs testing
Discuss with the rest of the @Quansight-Labs/czi-a11y-grant team
Add to the plan derived from #94 #51 #67

Format: I would suggest a lightweight version of our RFD template

I've started a [draft spreadsheet])https://docs.google.com/spreadsheets/d/1mUmZevaEI1HwZQ0uF5Rjhb9mGEJ71RAkjj-Lxr3sLZw/edit?usp=sharing) to help me keep track of everything we can do as we scope it down. I've already marked some WCAG guidelines as not being relevant to JupyterLab (like having captions for videos).

We had a longer discussion around a sub-task for this issue at our April 20 meeting #99; which JupyterLab “pages” (axe-core’s understanding of a single state in JupyterLab) do we want to start testing. The proposal in #97 listed this as 2–5 “pages” for JupyterLab to begin testing with. I asked for feedback on my initial thoughts, and we discussed a few different approaches to this decision making:

Most common states encountered and/or first states encountered (ie. the default launcher).
A maximalist approach (where we try to cover the most JupyterLab areas in the least number of “pages;” may also help avoid some repeated violations since there may be less repeated information).
An isolated UI element approach (where we load parts of JupyterLab, not just a whole).
By prioritizing states of JupyterLab that have their own URLs (because these are the most stable and reproducible).
By using the default for each built-in UI mode (ie. JupyterLab, presentation mode, etc.)

After discussion, we agreed to begin this first six weeks of testing with a focus on

Default JupyterLab with the launcher
Default JupyterLab with an open notebook (probably the Lorenz notebook), not yet run
Default JupyterLab with an open notebook (probably the Lorenz notebook), all cells run

since they are the states that precede all others in a user’s interaction. We acknowledge that this approach does not yet include major areas of the interface that will be critical to JupyterLab’s accessibility (such as the top menus or the settings editor) and that it needs to in the future. I in particular want to make sure these are covered, but I also agree with counterarguments that this involves a lot of states sooner than we have the structure to handle.

I have a first pass at ideas for what @gabalafou called the "Three to five handwritten machine-as-a-user tests" (in #97). This truly is my first attempt, so I expect needing to rework this a ton based on feedback. But now we have something to critique!
Also, feedback on format is as welcome as content; I'm not sure this is the best way to communicate this to y'all.
How I chose these options
For a little background, I chose the following based on:

Focusing on WCAG areas not covered by axe-core
Filtering out WCAG areas that I think aren't relevant to JupyterLab (ie. live captioning videos)
Prioritizing things that would block navigating or reading JupyterLab (since that is a big blocker)
Prioritizing options that I was able to think of more concrete success criteria (making them more automatically testable, in my opinion)

If you find any issue with this approach, it'd be good to know. (This was all done in the aforementioned draft spreadsheet.)
Test proposals
These are broken up into the WCAG area they reference, how I think we could interpret them as success criteria specifically in JupyterLab (rather than the success criteria they define for all web content), and a list of steps I think would help us test for this success criteria (written from a manual testing perspective).
1.3.4 - Orientation
Proposed JLab success criteria
JupyterLab is responsive. When switched to portrait orientation or viewed on mobile, no UI content is lost.
Proposed step-by-step

Open default JupyterLab
Set viewport orientation to portrait (And/or mobile viewport? I could see this as a good way to test both, but perhaps they should be different tests.)
Take screenshot
Compare to predefined success screenshot
Success if screenshots match.

Note: I think the current portrait and/or mobile mode could be improved, but we can definitely start testing with what we have now.
2.1.2 No keyboard trap
Proposed JLab success criteria
Focusable areas in JupyterLab can all be unfocused. This will need to test multiple regions long term.
For now, I think our success criteria should be that JupyterLab's menu bar can be focused and unfocused.
Proposed step-by-step

Open default JupyterLab
Start focus at top of tree (may hit skip link?)
Tab into menu bar
Open file menu
Close file menu
Tab out of menu bar
Success if focus switches to side bar/file browser

2.4.3 Focus Order
Proposed JLab success criteria
In JupyterLab, areas can be focused in the following order:

Skip link
Menu bar
Left side bar
Inside left side bar (selected section)
Top of document area (document toolbar first if it has one)
Document (if there is no toolbar for the document type, users go immediately into the document)
Right side bar
Inside right side bar (selected section)
Status bar

(Giving credit! I was informed by this discussion in a past JupyterLab accessibility meeting to propose this order.)
Proposed step-by-step

Open default JupyterLab
Tab to focus menu bar
Tab through major regions as needed (see above section)
Success if tab brings focus to status bar

2.5.6 Concurrent input mechanisms
Proposed JLab success criteria
In JupyterLab, a single task can be completed using mouse, keyboard, and touch screen inputs. This works even when completing a single task. This will need to test multiple regions long term.
For now, I think our success criteria should be that JupyterLab can open a new notebook from the launcher with mouse, keyboard, and touch screen inputs.
Proposed step-by-step

Open default JupyterLab
Open the file menu with a mouse click
Navigate to menu New Launcher with arrow keys
Use touch screen input to create new Notebook from Launcher
Success if new notebook opens

I'm not totally sure how this works in terms of testing, but it is my understanding that the type of input can be simulated. Please let me know if I'm wrong about this.

I had a few other thoughts while working on this that I wanted to write down. Most of these are about testing patterns that may help us long term.
Categories of automated tests
Based on the content we are testing for accessibility, I think I'm seeing a pattern in certain approaches suiting different types of content. This isn't too well thought out yet, but I could see it as helping us know what kind of test we need for what.

Visual content (ie. layout changes, responsiveness, color) seems suited for tests that take and compare UI screenshots.
Interactive content/user interactions (ie. focus, navigation, editing) seem suited for tests that mirror their kind of task completion. These are tasks where you script actions to get to a designated "finish line."
Transforming content (ie. editing UI element sizes, color, font, or any settings configuration) is the one I'm least sure about, and may be the one that is hardest or not automatically-testable. I could imagine cases where you could also compare screenshots, but that doesn't seem like a true test of the functionality.
Audio content isn't something in JupyterLab by default, so I don't have thoughts on tests for this at the moment. (Same for haptic.)

What needs to be tested
In my above comment and in last week's team update meeting, we talked a lot about what needs to be tested. Scoping tests is important for both our small team and for respecting contributor time (as has been mentioned in other issues). Between this work, I also think certain accessibility needs fall under certain categories of how they can be optimally tested.
I broke this up into tests that need to run an entire "page," tests that do not need to run an entire "page," and tests that would benefit being run on a section of a page or single UI component.

Some tests do need to run the entire "page" (as in JupyterLab layout in full, no matter the mode).

For example page titled will fail in any test not utilizing the whole "page."
Focus order similarly doesn't make as much sense on a less-than-"page" test.
Orientation is another example.

Some tests do not need to run the whole page

For example, non-text content can and often is run over a whole page, but you could just as well test individual parts if you found it more helpful or less taxing on the testing suite.
In fact, this may give us more specific and actionable feedback on these items, because we would know exactly where it fails, not just that it does. This could be a part of avoiding duplicated failures as well.

Some tests would benefit being run on a section of a page or single UI component

For example, I think testing a whole page for keyboard traps  is possible but complicated. Because a keyboard trap seems most likely to happen on a region by region basis (ie. the trap in JupyterLab's menu bar, but not in the left side bar), it is easier to test that way. Plus, then you know where is trapping and where is not.
I like this most if we run the same or equivalent tests over different, isolated UI regions to closely identify where they fail and succeed.
Using the keyboard trap example again, I could find it helpful to get results that all keyboard trap tests passed except for the menu bar one (rather than getting a general test over the whole page telling me there is a keyboard trap somewhere and knowing no region past that trap was able to be tested).

I love this!
I'm going to jot down a few quick thoughts before our team meeting:

For the machine-as-a-user tests, are they in priority order? Ideally, we will implement all of them during this project cycle, but if we can't, it will be good to know which ones we should start with.

Eventually, we will likely want to write several Playwright tests for a given criteria, and some tests might relate to more than one WCAG guideline. For example, the test plan that you wrote under "no keyboard traps," might more properly be thought of as: no keyboard trap in the menu bar. And we'll probably want to have another test like "no keyboard trap in the notebook" etc. In database-speak, instead of a one-to-one relationship between a test and a WCAG guideline, we'll want a one-to-many or a many-to-many relationship, I think—as in several tests might map to the same guideline, plus (although I'm not sure how often this one will happen) a single test might map to several guidelines.

I'm starting to sense that we're really going to want to be able to test chunks of the UI in isolation. This will require some work and exploration that I didn't anticipate for this cycle, but it might be important enough to figure out how to do this now and work into this cycle somehow.

For the machine-as-a-user tests, are they in priority order?

Nope, just order of appearance in WCAG. I think we have a number of obstacles to overcome in order to get any handwritten tests like this started, and at this phase I'd rather focus on that infrastructure. Whichever test works the best with the rest of the work is what I'd prioritize for now.

we'll want a one-to-many or a many-to-many relationship, I think—as in several tests might map to the same guideline, plus (although I'm not sure how often this one will happen) a single test might map to several guidelines.

Agreed! Because I don't see it in any other notes, this may also end up fitting nicely with the work already done at ACT rules.

require some work and exploration that I didn't anticipate for this cycle

I personally do not see the isolated UI as high priority. I do think long term it is ideal, but I think we're early enough in this process that I don't consider it a blocker or something worth changing your current goals for. I pointed it out only because I wanted to gauge how you all felt about that/just to generally share my thoughts so this is done as openly as possible.

Other notes:

Be sure if/when testing JupyterLab with an open document (probably notebook), we are communicating clearly that these tests are not focused on testing document content. Don't take the reports they produce as an gauge of the notebook's accessibility.
@trallard linked a quick guide to automated test scripts.

What's changed
There is repeated content from above just so all the info stays together. Because I know this can feel like a lot at once, I want to point out what changed.

I updated the script for 1.3.4 Orientation to be more specific and avoid the screen shot technique.
All scripts now have an "expected behavior" per step.
Added new questions at the bottom.

@gabalafou @tonyfast @trallard I'm @/ing you for review.
Test proposals
1.3.4 - Orientation
Proposed JLab success criteria
JupyterLab is responsive. When switched to portrait orientation or viewed on mobile, no UI content is lost.
Proposed testing script

Step
Expected Behavior

1. Open default JupyterLab
JupyterLab opens with unmodified workspace.

2. Set viewport orientation to portrait (And/or mobile viewport?)
JupyterLab accepts the orientation change and doesn't error out.

3. Check menu bar is in expected location
Menu bar is at the top of the page and have all menu items visible (currently it has a scroll bar).

4. Check left side bar is in expected location
Left side bar is the leftmost part of the viewport . It stretches from the menu bar to status bar. All icons are visible.

5. Check document area is in expected location
Document area is the center and majority of the viewport.

6. Check document area toolbar is in expected location
The document area toolbar is at the top of the document area. All items are visible (currently it has a scroll bar).

7. Check right side bar is in expected location
Right side bar is the rightmost part of the viewport. It stretches from the menu bar to status bar. All icons are visible. (Right now, I believe this side bar is not able to be accessed in this mode.)

8. Check status bar is in expected location
The status bar is at the bottom of the page. All information is visible.

9. Success if all main regions are in expected location

2.1.2 No keyboard trap
Proposed JLab success criteria
Focusable areas in JupyterLab can all be unfocused. This will need to test multiple regions long term.
For now, I think our success criteria should be that JupyterLab's menu bar can be focused and unfocused.
Proposed testing script

Step
Expected Behavior

1. Open default JupyterLab
JupyterLab opens with unmodified workspace.

2. Start focus at top of tree
Focus goes to JupyterLab tab, may hit skip link.

3. Tab into menu bar
Focus goes to menu bar (whole).

4. Open file menu
Focus goes to File menu (within menu bar). Menu bar opens full list of menu items.

5. Close file menu
Focus stays on File menu, but menu bar is closed.

6. Tab out of menu bar
Focus moves from File menu, to other menu items until it leaves the region. Focus will move the left side bar/file browser.

7. Success if focus switches to side bar/file browser

2.4.3 Focus Order
Proposed JLab success criteria
In JupyterLab, areas can be focused in the following order:

Skip link
Menu bar
Left side bar
Inside left side bar (selected section)
Top of document area (document toolbar first if it has one)
Document (if there is no toolbar for the document type, users go immediately into the document)
Right side bar
Inside right side bar (selected section)
Status bar

Proposed testing script

Step
Expected Behavior

1. Open default JupyterLab
JupyterLab opens with unmodified workspace.

2. Tab to focus menu bar
Tab until focus is on the menu bar. (Will this run into the skip link?)

3. Tab through major regions as needed (see above section)
Tab to move focus through left side bar, inside left side bar, top of document area, document area, right side bar, and inside right side bar.

4. Tab to focus status bar
Focus moves to status bar.

5. Success if tab brings focus to status bar

2.5.6 Concurrent input mechanisms
Proposed JLab success criteria
In JupyterLab, a single task can be completed using mouse, keyboard, and touch screen inputs. This works even when completing a single task. This will need to test multiple regions long term.
For now, I think our success criteria should be that JupyterLab can open a new notebook from the launcher with mouse, keyboard, and touch screen inputs.
Proposed testing script

Step
Expected Behavior

1. Open default JupyterLab
JupyterLab opens with unmodified workspace.

2. Open the file menu with a mouse click
File menu opens and full list of menu items appears.

3. Navigate to menu item New Launcher with arrow keys
Focus moves through the File menu list items until it reaches the New Launcher item.

4. Use touch screen input to create new Notebook from Launcher
The New Notebook from Launcher is selected and the command is initiated.

5. Success if new notebook opens

Questions!

1.3.4 Orientation is about not only being able to change the orientation, but to also not lose information (UI in this case) when switched. Should something about checking area content be added as additional steps, or is there a better way to do this?

@gabalafou @gabalafou @tonyfast  to review and prioritise the scenarios
@isabela-pf - to suggest 1-2 starting scenarios

Based on synchronous feedback, this is close to complete (for this first round of test development).

[ ] I need to document a template for these testing scripts so that other people may contribute testing scripts in the future.

Responding to @trallard's comment, I think any of these scenarios can be tested first based on what's easiest for development to start with. If it's helpful for me to choose, I think 2.1.2 No keyboard trap is the easiest to start with because

it can actually pass in JupyterLab now (compared to focus order, which will 100% fail right now)
it can run well with a full "page" of JupyterLab and doesn't need a subset of the UI
it's not blocked by any other tests

Re: myself
Current testing script proposals and template are in Quansight-Labs/accessibility #6


Copy 2017 SRG recommendations into Section 3.2

The subsection heading gets automatically updated to say 'response to 2017 review' (that threw me off for a bit), but the text is still currently last year's.

Responses are now finished. As noted in #382, they should be checked over along with the rest of the document, but I think this issue can be closed.


Spacing problem in loading button.rtl (config) is true.

Could you provide the code you are using? Including the parent of the button to see what might be causing this.

I think you don't have dir="rtl" on your <body> tag.
As mentioned here you need this config on tailwind.config.js
daisyui: {
  rtl: true,
},

And you need dir="rtl" on your <body> tag.
Example: https://play.tailwindcss.com/OZVQ2UgH7W


How can I use array variable in check assertion? - try variable without ``

I have to trying to use array variable for check "contains":
check filtersText contains temp| 'search box is visible - ' filtersText | 'search box is not visible - ' filtersText
temp is my array variable:
cardArt = ['', '14', '3', '6', '2', '4', '5', '3', '8']'
temp = cardArt[1]

In this scenario, it always accept "temp" as string and not as variable.
can you please help with this? I have tried to follow your documentation to use variable as variable but it doesn't work.

Hi @gauravgandhi15 this is an interesting use case. Try the following to use temp without backticks. For check step, variables don't need backticks.
check filtersText contains temp | 'search box is visible - ' filtersText | 'search box is not visible - ' filtersText

I know this is confusing, the original design was to simplify the syntax for certain steps such as echo / dump / write / check. But in doing so, it is inconsistent with the rest of the TagUI steps. In an upcoming v6 release we plan to fix this to make every step consistent to use backticks when a variable is required and no need for quotation marks for text strings.

@kensoh i have tried without “ or ‘. Then it complaints about missing quotes.

Oh sorry I got it, this is an edge case that is not supported natively. This is because TagUI tries to parse the natural language into JavaScript condition and would need either the single or double quote in order to know how to do that translation.
TagUI support conditions such as if a contains '1' and a not contains '2', so the quotation marks have to be explicitly provided and not inferred if it is a variable. If we change the logic to let TagUI guess when it is a variable, above multi condition I think will fail.
Long story short, you can try below and it should work for this edge case. It works by explicitly providing the quotation mark but ending it right away so that context switches to variable, before enclosing in another dummy quotation marks pair.
filtersText = 'A14B'
cardArt = ['', '14', '3', '6', '2', '4', '5', '3', '8']
temp = cardArt[1]
check filtersText contains ''+temp+'' | 'search box is visible - ' filtersText | 'search box is not visible - ' filtersText

Closing issue for now until further inputs, it should work. Let me know if there is issue running it!

CC @siowyisheng

Hey it works. Thank you so much for your help. I really appreciate
On Sat, Feb 8, 2020 at 7:52 AM Ken Soh<EMAIL_ADDRESS>wrote:

Hi @gauravgandhi15 https://github.com/gauravgandhi15 this is an
interesting use case. Try the following to use temp without backticks. For
check step, variables don't need backticks.
check filtersText contains temp | 'search box is visible - ' filtersText | 'search box is not visible - ' filtersText
I know this is confusing, the original design was to simplify the syntax
for certain steps such as echo / dump / write / check. But in doing so, it
is inconsistent with the rest of the TagUI steps. In an upcoming v6 release
we plan to fix this to make every step consistent to use backticks when a
variable is required and no need for quotation marks for text strings.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kelaberetiv/TagUI/issues/726?email_source=notifications&email_token=ABEGEVVJKZ3BEO65UMJLGI3RB2TH5A5CNFSM4KRYCRAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFRFUQ#issuecomment-583733970,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABEGEVXD2RBCDPT7C4TPSWTRB2TH5ANCNFSM4KRYCRAA
.

Thanks @gauravgandhi15 for confirming! And sorry for the lack of support for this use case.
There were various considerations to weigh when I was designing this step. So I favoured the ability to write complex multiple conditions over the ability to support comparing a condition with a text string that is stored in a variable.

Hi Sifus,
My attempt to search a KEYWORD from a STRING using the IF ELSE function always return False if the KEYWORD is a variable (EXAMPLE 1).
But if I hardcode the KEYWORD, it works (EXAMPLE 2)
Anything that i missed.
// Tagui Block Starts - EXAMPLE 1
string = "this is a test"
filter = 'test'
echo String = string
echo Filter = filter
if string contain "filter"
echo True
else
echo False
// Tagui Block Ends - EXAMPLE1
// Tagui Block Starts - EXAMPLE2
string = "this is a test"
filter = 'test'
echo String = string
echo Filter = filter
if string contain "test1"
echo True
else
echo False
// Tagui Block Ends - EXAMPLE2

I think that is a limitation due to its human language syntax. Maybe you can try using JavaScript directly, something like:
a = 'red tree'
b = 'tree'
if a.indexOf(b) > -1
    echo True
else
    echo False

Copying @ruthtoh who is maintaining TagUI project now..


[fix]: rename player.gd file to Player.gd

Just a suggestion. I am not 100% sure this is the exact fix, but I did notice the capitalization here changed since I got an error when running in headless mode with this command:

./Godot_v4.0-beta17_linux.x86_64 --main-pack shoot.pck --headless
Godot Engine v4.0.beta17.official.c40020513 - https://godotengine.org

Sorry I ignored this for so long! Thanks for the PR. :)


Fixed broken $error()/$info/$warning() on non-generate blocks (within always/initial blocks)

This seems to fix #1084.
It seems I've broken regular $info/$error/$warning tasks, since the lexer always returns TOK_ELAB_TASK for those, so I made the parser accept it for normal tasks as well (and rename it TOK_MSG_TASKS since it no longer applies to elaboration time tasks only).

FYI, the ethernet yosys-bench is broken without this PR (as it uses $error in initial). @cliffordwolf can this be merged?


[BEAM-1060] Makes DoFnTester use new DoFn internally.

There were 2 remaining users of DoFnTester.of(OldDoFn):

SplittableParDo.ProcessElements: this is fixed in
https://github.com/apache/incubator-beam/pull/1261
GroupAlsoByWindowsProperties: this one is harder.
Various GABWDoFn's use OldDoFn.windowingInternals,
and we can't pass that through a new DoFn.
So instead I removed usage of DoFnTester from
GroupAlsoByWindowsProperties in favor of a tiny
hand-coded solution.

So after this PR and #1261 DoFnTester.of(OldDoFn) can be deleted.
R: @kennknowles

Actually this PR depends on #1261 , but other than that it's ready for review.

Dependent PR has been submitted and this PR passes a local mvn -Prelease clean install. Ready for review.

I addressed your commends and made a couple more improvements (see commit messages).

LGTM


Merge dynannotate-improvements branch to master branch

Any plans to merge the dynannotate-improvements branch into the main branch?
This could support excerpts of non-textual content such as images.

Hi @oflg yes! The hold up is that it depends on the new JSON filter operators (see #6522) which is now almost ready to merge (just some more docs updates).


wot trajectory crashing

Hello. I've tried to run wot on my data, and am getting a rather confusing error when attempting to infer the trajectory:
ubuntu@mapcloud1:/mnt/endometrium/N6.5-organoids-split$ wot trajectory --tmap tmaps --cell_set clusters.gmt --time 3 --out traj.txt
/usr/local/lib/python3.6/dist-packages/numba/errors.py:104: UserWarning: Insufficiently recent colorama version found. Numba requires colorama >= 0.3.9
  warnings.warn(msg)
Traceback (most recent call last):
  File "/usr/local/bin/wot", line 11, in <module>
	sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/wot/__main__.py", line 23, in main
	cmd.main(command_args)
  File "/usr/local/lib/python3.6/dist-packages/wot/commands/trajectory.py", line 23, in main
	trajectory_ds = tmap_model.compute_trajectories(populations)
  File "/usr/local/lib/python3.6/dist-packages/wot/tmap/transport_map_model.py", line 97, in compute_trajectories
	var=pd.DataFrame(index=population_names))
  File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 671, in __init__
	filename=filename, filemode=filemode)
  File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 880, in _init_as_actual
	self._check_dimensions()
  File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 1878, in _check_dimensions
	.format(self._n_obs, self._obs.shape[0]))
ValueError: Observations annot. `obs` must have number of rows of `X` (23071), but has 28789 rows.

The 23071 looks familiar, as that's the number of cells I provided in my original matrix. The 28789 I don't recognise at all. Any idea what is going on here?

Hey, me again. I figured I'd harvest more data points for you, and test it on some other data to see what in the heck is going on. I used your simulation notebook to create a matrix.txt and days.txt, ran wot optimal_transport and wot cells_by_gene_set, and wot trajectory still bites the dust:
ubuntu@mapcloud1:/mnt/endometrium/wottest$ wot trajectory --tmap tmaps --cell_set cell_sets.gmt --time 50 --out traj.txt
/usr/local/lib/python3.6/dist-packages/numba/errors.py:104: UserWarning: Insufficiently recent colorama version found. Numba requires colorama >= 0.3.9
  warnings.warn(msg)
Traceback (most recent call last):
  File "/usr/local/bin/wot", line 11, in <module>
	sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/wot/__main__.py", line 23, in main
	cmd.main(command_args)
  File "/usr/local/lib/python3.6/dist-packages/wot/commands/trajectory.py", line 23, in main
	trajectory_ds = tmap_model.compute_trajectories(populations)
  File "/usr/local/lib/python3.6/dist-packages/wot/tmap/transport_map_model.py", line 97, in compute_trajectories
	var=pd.DataFrame(index=population_names))
  File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 671, in __init__
	filename=filename, filemode=filemode)
  File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 880, in _init_as_actual
	self._check_dimensions()
  File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 1878, in _check_dimensions
	.format(self._n_obs, self._obs.shape[0]))
ValueError: Observations annot. `obs` must have number of rows of `X` (152708), but has 299472 rows.

Thank you for reporting the error. This is fixed in version 0.4.6 of wot.

Confirming operational. Thanks for the super quick and effective turnaround!

Dear Krzystof,
We've recently released WOT 1.0 along with a tutorial:
https://broadinstitute.github.io/wot/tutorial/
I'm sending this message to anyone who has expressed interest recently.
Sorry for the spam.
Best,
Geoff
On Wed, Feb 6, 2019 at 5:43 AM Krzysztof Polanski<EMAIL_ADDRESS>wrote:

Hello. I've tried to run wot on my data, and am getting a rather confusing
error when attempting to infer the trajectory:
ubuntu@mapcloud1:/mnt/endometrium/N6.5-organoids-split$ wot trajectory --tmap tmaps --cell_set clusters.gmt --time 3 --out traj.txt
/usr/local/lib/python3.6/dist-packages/numba/errors.py:104: UserWarning: Insufficiently recent colorama version found. Numba requires colorama >= 0.3.9
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/local/bin/wot", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/wot/main.py", line 23, in main
cmd.main(command_args)
File "/usr/local/lib/python3.6/dist-packages/wot/commands/trajectory.py", line 23, in main
trajectory_ds = tmap_model.compute_trajectories(populations)
File "/usr/local/lib/python3.6/dist-packages/wot/tmap/transport_map_model.py", line 97, in compute_trajectories
var=pd.DataFrame(index=population_names))
File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 671, in init
filename=filename, filemode=filemode)
File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 880, in _init_as_actual
self._check_dimensions()
File "/usr/local/lib/python3.6/dist-packages/anndata/base.py", line 1878, in _check_dimensions
.format(self._n_obs, self._obs.shape[0]))
ValueError: Observations annot. obs must have number of rows of X (23071), but has 28789 rows.
The 23071 looks familiar, as that's the number of cells I provided in my
original matrix. The 28789 I don't recognise at all. Any idea what is going
on here?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/broadinstitute/wot/issues/23, or mute the thread
https://github.com/notifications/unsubscribe-auth/AJIoYuGE0h5XBb-PV2g_EtQHJvgvDkY5ks5vKrHbgaJpZM4ak9yo
.

Hi, apologies for dragging a 3 year old issue back up, but I'm having the same issue. According to pip list, my wot version is 1.0.8.post2.
trajectory_ds = tmap_model.trajectories(populations)

gives:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/hps/scratch/lsf_tmpdir/hl-codon-bm-11/ipykernel_621634/2106681130.py in <module>
----> 1 trajectory_ds = tmap_model.trajectories(populations)

/nfs/research/marioni/Leah/software/conda_envs/wot/lib/python3.7/site-packages/wot/tmap/transport_map_model.py in trajectories(self, populations)
    141
    142         return anndata.AnnData(X=np.concatenate(trajectories), obs=self.meta.copy(),
--> 143                                var=pd.DataFrame(index=population_names))
    144
    145     def get_coupling(self, t0, t1, covariate=None):

/nfs/research/marioni/Leah/software/conda_envs/wot/lib/python3.7/site-packages/anndata/_core/anndata.py in __init__(self, X, obs, var, uns, obsm, varm, layers, raw, dtype, shape, filename, filemode, asview, obsp, varp, oidx, vidx)
    320                 varp=varp,
    321                 filename=filename,
--> 322                 filemode=filemode,
    323             )
    324

/nfs/research/marioni/Leah/software/conda_envs/wot/lib/python3.7/site-packages/anndata/_core/anndata.py in _init_as_actual(self, X, obs, var, uns, obsm, varm, varp, obsp, raw, layers, dtype, shape, filename, filemode)
    524         _move_adj_mtx({"uns": self._uns, "obsp": self._obsp})
    525
--> 526         self._check_dimensions()
    527         self._check_uniqueness()
    528

/nfs/research/marioni/Leah/software/conda_envs/wot/lib/python3.7/site-packages/anndata/_core/anndata.py in _check_dimensions(self, key)
   1836         if "obs" in key and len(self._obs) != self._n_obs:
   1837             raise ValueError(
-> 1838                 "Observations annot. `obs` must have number of rows of `X`"
   1839                 f" ({self._n_obs}), but has {self._obs.shape[0]} rows."
   1840             )

ValueError: Observations annot. `obs` must have number of rows of `X` (22507), but has 23737 rows.

But when I check adata.obs it has 22507 rows, as does adata._obs, and adata._n_obs is also 22507. Do you have any idea what might be going on here?

Is this with your own data or the tutorial data? Thanks.

It's my own. Oddly, the code was working previously with a slightly different adata object, but now it just doesn't. (previously I had all cells in an adata object, and then subset in the notebook where I ran wot; now I created a new adata object that only has the subset of cells, and it isn't working)

Thank you so much for your prompt response!
This is literally the extent of my code, so I frankly have no clue where any other cells could be coming from:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scanpy as sc

import wot

g_data = sc.read_h5ad("seurat_forTrajInf_sub.h5ad")
g_data = g_data[g_data.obs.timepoint.isin(['d3', 'd3.5', 'd4', 'd4.5', 'd5']),]
g_data.obs["day"] = [float(tp[1:]) for tp in g_data.obs.timepoint]

# create OTModel
ot_model = wot.ot.OTModel(g_data, growth_iters = 3)
ot_model.compute_all_transport_maps(tmap_out='wot_out/sub_tmaps/')

tmap_model = wot.tmap.TransportMapModel.from_directory('wot_out/sub_tmaps/')

mature_celltypes = ["Endothelium", "Mature Somites 2", "Mature Somites 1", "Late NMP-independent Meso",
                    "NMP-derived Meso", "NMP-derived Neural", "Spinal Cord", "Late NMP-independent Neural",
                    "Separate FMH", "Mature Endoderm", "Early Endoderm", "Late Head Mesoderm"
                   ]
cell_sets = g_data.obs.loc[(g_data.obs.cluster.isin(mature_celltypes)) & (g_data.obs.timepoint == 'd5')].groupby("cluster").groups
populations = tmap_model.population_from_cell_sets(cell_sets, at_time=5.0)
trajectory_ds = tmap_model.trajectories(populations)

You can please email your data to jgould at broadinstitute dot org and I can try to debug? Thanks.


Make the members of the governance bodies and Collaborators/Reviewers visible to non-org members

Currently membership in the TSC/AC/WGs is maintained in public GitHub teams in the ampproject org.  We are also planning on keeping track of the new Collaborator/Reviewer roles in GitHub teams.
Unfortunately only members of the ampproject org can view the membership of these teams, and GitHub does not have an option to make the members of these teams visible to everyone.  We should have an automated way to make these membership lists visible to everyone, perhaps publishing them on amp.dev.

@ampproject/wg-outreach @pbakaus @CrystalOnScript @sebastianbenz, amp.dev seems like a decent home for this published list of GitHub teams members.
Do y'all have a suggestion for where to put it on amp.dev?
And is there an existing pipeline of publishing stuff to amp.dev using the GitHub API that we could plug into?

That should be fairly easy to add, we already have scripts in place to import things like component reference docs and roadmap. What's the source format of the data?
Imo the best place would be a new item "Contributors" under Community.

+1 on adding a new item under Community. Joey or Sebastian, would you be able to file an issue in the docs repo and link to this one? That way we can prioritize it better on our side. Thanks!


Undefined symbols

If there is a compile error similar to this:
ignoring file ../../MicroBlink.framework/MicroBlink, file was built for unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F ) which is not the architecture being linked (arm64): ../../MicroBlink.framework/MicroBlink
Undefined symbols for architecture arm64:

It probably means that Git LFS was not correctly installed. To be sure, you can check the file size of your local MicroBlink file (located in MicroBlink.framework). The size should be around 100MB, while the size of incorrectly downloaded file would be less than 1KB.
To fix this issues you can:

Follow our "Getting Started" guide and pay close attention to parts related to Git LFS while installing our SDK

OR

Download BlinkOCR SDK manually. Download .zip or .tar.gz file starting with BlinkOCR. DO NOT download Source Code as GitHub does not fully support Git Large File Storage

Literally half of the issues are this problem...


Long running query

Environment: https://demo.simplcommerce.com
Stats: [ActivityLog_Activity], 62424 records
SQL generated by EF:
SELECT TOP(5) [a].[EntityTypeId], [a].[EntityId], [e].[Name], [e].[Slug], COUNT(*) AS [ViewedCount]
FROM [ActivityLog_Activity] AS [a]
INNER JOIN [Core_Entity] AS [e] ON ([a].[EntityId] = [e].[EntityId]) AND (([a].[EntityTypeId] = [e].[EntityTypeId]) OR ([a].[EntityTypeId] IS NULL AND [e].[EntityTypeId] IS NULL))
WHERE [a].[ActivityTypeId] = CAST(1 AS bigint)
GROUP BY [a].[EntityId], [a].[EntityTypeId], [e].[Name], [e].[Slug]
HAVING [a].[EntityTypeId] = 'Product'
ORDER BY [ViewedCount] DESC

It take around 19 seconds to execute.
Note: before changing EntityTypeId datatype from long to string. It very much faster. I haven't thought that that changing have a big impact on performance. EntityTypeId column has been indexed

Thank @mrsherlock88 , just check the current database on demo
[Core_Entity].[EntityTypeId] nvarchar(450) NULL
[ActivityLog_Activity].[EntityTypeId] nvarchar(MAX) NULL
I think the biggest problem is  nvarchar(MAX) which is not good be indexed. After alter both to nvarchar(100) NOT NULL,  the query run super fast.

Yep, JOIN and INDEX work well without complex condition, NULL value make the condition complex, I am not sure it affects to the way index work or not.


feat: Save state on Ctrl+S

Added simple Ctrl+S hotkey support -- equale to "share" button click

Sorry for the delay, I will merge this but the current iteration of vueuse playground will be replaced soon, so I'm not too sure how long this change will be present. But we can use in the next version as well


command after object detection

Hello. I want to run a command after object detection. how can I do that? for example, 'start recording the screen after the desired object has been detected'. how do I add this command? can you help me?

Find the code for recording the screen and add it to webcam.py or image.py whichever file you are using

Find the code for recording the screen and add it to webcam.py or image.py whichever file you are using

but I don't want him to record it all the time, I just want him to find it when he detects it. how do I ensure this?

Find the code for recording the screen and add it to webcam.py or image.py whichever file you are using

but I don't want him to record it all the time, I just want him to find it when he detects it. how do I ensure this?

Put it after the detection code

Hi @RecepFatih , take a look at my Pet Detector video and code, it shows you how to trigger actions after certain objects have been detected.
Video: https://www.youtube.com/watch?v=gGqVNuYol6o
Code: https://github.com/EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi/blob/master/Pet_detector.py


checking revalidation for ISR

Just checking!

This seems to be slow

Oh got it, requires a page refresh


Doubt: Packages / Release

Hi, I currently use the chrome headless from https://github.com/adieuadieu/serverless-chrome/tree/master/packages/lambda/chrome.
My question is: Can I use https://github.com/adieuadieu/serverless-chrome/releases/tag/v1.0.0-36 to have an updated chrome headless?
PS. Thanks for this software! 👍

Hi @romariolopezc — Yes; that's the idea. Releases are regularly updated with the latest versions of Chrome for AWS Lambda. Eventually I will remove the binaries that are committed in the repository (some are nearly 1 year old!)


Orchard.MediaProcessing - Can we update the ImageResizer version?

Hi there,
i've been using ImageResizer in my own module and recently i visited the diagnostics page and it says
Potentially incompatible ImageResizer assemblies were detected.
--
  | Please make sure all ImageResizer assemblies are from the same version. Compatibility issues are possible if you mix plugins from different releases.
  | 3.4.3 assemblies: ImageResizer
  | 4.0.0 assemblies: ImageResizer.Plugins.PdfiumRenderer, ImageResizer.Plugins.TinyCache

I wonder why the module Orchard.MediaProcessing is using such an old version (3.4.3). Are there any concerns about using the current version? If not, should i provide a PR for updating ImageResizer to the current version?
Also the ImageResizer release notes state that many many bugs have been fixed and improvements have been made since 3.4.3. So updating to the current version should be beneficial.

We have never looked into upgrading as it was probably not necessary. Please ensure the licence hasn't changed for what we use.

Orchard is released under BSD-3-Clause and ImageResizer 4 is released under Apache License 2.0. This document from apache states that BSD-3-Clause is similar to Apache License 2.0 hence i think ImageResizer can be upadeted to 4.x. What do you think?

It should be good, but I know there are different distributions, we take the one without plugins for this reason.


code split with dependencies

This is a follow up from PR https://github.com/fuse-box/fuse-box-examples/pull/9
When code imported with import contains third party dependencies, fuse doesn't include these external dependencies.
Steps to reproduce the problem:
git clone https://github.com/FredericHeem/starhackit.git
cd starhackit/client
git checkout fusebox
npm i
node fuse

Click on the menu and select THEME
localhost/:1 Uncaught (in promise) Package not found react-color
Click on DB SCHEMA
lodash/map not found on request
Click on ADMIN
Package not found reactabular-table
This is a blocker that prevents me from getting rid of webpack.
I beg your support on this specific issue.

Ok, and what if that package belongs to multiple split bundles?

It is a very valid point, code splitting is far from being a trivial feature.
For simplicity, let's copy the package to the bundles who require it if not already included in the vendor.
Alternatively, if it's a package used by multiples bundles, let's manually add it to the vendor.

Indeed, and a tricky way to detect if a package was not added manually, automatically. I spent weeks trying to figure it out. Needs investigation.

@FredericHeem that's coming very very soon.


Call of non existing install.bat

After small modification of the template (I just specified my CF/Diego's subnet) debug-stderr contains:
panic: interface conversion: interface is nil, not string

goroutine 1 [running]:
main.main()
	C:/diego-windows-release/greenhouse-install-script-generator/src/generate/generate.go:138 +0x1f5e

goroutine 8 [runnable]:
net/http.(*persistConn).readLoop(0xc08208c0b0)
	c:/go/src/net/http/transport.go:928 +0x9d5
created by net/http.(*Transport).dialConn
	c:/go/src/net/http/transport.go:660 +0xca6

goroutine 9 [select]:
net/http.(*persistConn).writeLoop(0xc08208c0b0)
	c:/go/src/net/http/transport.go:945 +0x424
created by net/http.(*Transport).dialConn
	c:/go/src/net/http/transport.go:661 +0xcc3
'C:\tmp\dwminst\install.bat' is not recognized as an internal or external command,
operable program or batch file.

And this is true, there is no C:\tmp\dwminst\install.bat.

What is this from? Using the cloudformation template? Also, do you know which release version this was from?

After small modification of the template (I just specified my CF/Diego's subnet) debug-stderr contains:

What do you mean by modifying the template ? May be an example would help.

panic: interface conversion: interface is nil, not string
goroutine 1 [running]:
main.main()
C:/diego-windows-release/greenhouse-install-script-generator/src/generate/generate.go:138 +0x1f5e

It looks like the version you are using is not the most recent version.

'C:\tmp\dwminst\install.bat' is not recognized as an internal or external command,
operable program or batch file.

This is normal since the generator crashed and failed to generate the files. We will add a check to make sure the generator succeeded before running the install script.


chore(master): release 1.3.1

:robot: I have created a release beep boop
1.3.1 (2023-03-23)
Miscellaneous

deps: update peter-evans/enable-pull-request-automerge action to v3 (46b8dd9)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/wayofdev/docker-nginx/releases/tag/v1.3.1 :sunflower:


Make the project available for installation via pip

Format code indent, import order and remove trailing whitespace
Add pyproject.toml to project, make the project available for installation via pip.

# pip3 install git+https://github.com/tencent-ailab/IP-Adapter.git

from ip_adapter import *
...

@JettHu thanks very much


docs: add operateType in pyspark

What type of PR is this?

[ ] bug
[ ] feature
[ ] enhancement
[x] docs

https://discuss.nebula-graph.com.cn/t/topic/13963/2?u=wey

Codecov Report
Patch and project coverage have no change.

Comparison is base (f90612b) 31.79% compared to head (4a11e36) 31.79%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #122   +/-   ##
=========================================
  Coverage     31.79%   31.79%
  Complexity       74       74
=========================================
  Files            31       31
  Lines          1494     1494
  Branches        226      226
=========================================
  Hits            475      475
  Misses          944      944
  Partials         75       75

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Block forging improvements

~This builds further upon #1279 and thus includes it for now.~ Update: merged
Addresses #787: trace whether we adopted or block or not.
Addresses #1225: if we produced an invalid block, we remove all transactions
in it from the Mempool.
~Addresses #1150: handle clock skew when producing a new block~ Update: this will be handled by the ChainDB in a separate PR
It also includes some minor improvements/fixes that I made along the way.

That's one low priority and two high priorities in one PR :sunglasses:.
I didn't split them up into separate PRs because they are all related to one piece of code, so that would just cause merge conflicts.

Rebased on master and addressed the feedback.

bors r+


Trigger CI on push to main

Currently, new CI (on GitHub Actions) is only triggered on pull requests branches when the base branch is main.
This PR also triggers the CI when a PR is merged to main branch.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Add time stamp (non-MVP)

use date module to add timestamp (possibly day stamp, too?) to the left of user name

Successfully adds timestamp to both the server on user connection event and every message a user sends in a room.


Add a regex-based matcher

Create a MatchProvider enum containing the existing path matcher and a new regex holder

Implemented


Occasional Horde Registry Lookup Misses

Hey, Mark! Thanks for this excellent repo, it was my entrypoint to learning Elixir/Phoenix and I've been enjoying it very much.
I've built a game system based on the ideas in this project and everything is working nicely locally, and is working most of the time in a clustered deployment.
However, I'm having an unfortunate occasional issue where a new game gets registered, a PID is initially returned, but upon looking up the PID using Horde.Registry.lookup(MyApp.GameRegistry, game_code), it returns nothing.  I'd say this happens for about 1 in 10 new games. I can see that the clustering is working fine otherwise from Node.list
I saw you talk about this issue here:
https://github.com/derekkraan/horde/issues/225 but having that configuration doesn't seem to solve the problem I'm having.
I was wondering if you've got any thoughts about what could be happening here. Is this a race condition? Is there any reason I couldn't store the PID after creation to a database as a fallback?
Thanks so much!

Thanks for sharing your discovery!


[Enhancement proposal]: LocationAccuracyStatus dartdocs out of date

Please check the following before submitting a new issue.

[X] I have searched the existing issues.
[X] I have carefully read the documentation and verified I have added the required platform specific configuration.

Please select affected platform(s)

[X] Android
[ ] iOS
[ ] Linux
[ ] macOS
[ ] Web
[ ] Windows

Proposal
https://pub.dev/packages/geolocator#:~:text=Location accuracy (Android and iOS 14%2B only)
Here in README we can read that the Geolocator().getLocationAccuracy() works for Android, but in the Dartdocs of the LocationAccuracyStatus say:
https://github.com/Baseflow/flutter-geolocator/blob/026534d34d56226d51b348ed46397055520c1e7f/geolocator_platform_interface/lib/src/enums/location_accuracy_status.dart#L9-L11
Pitch
This will make the code documentation more up-to-date and not misguiding.

Dear @Albert221,
Thanks for your input. I'll label this issue as an enhancement. In order to help us free to open/propose a PR yourself.
Kind regards,


C14013: Extra hyperlink due to potential incorrect structure

Hello, @mandia,
Localization team has reported source content issue that causes localized version to havedifferent format compared to en-us version. It seems that the text should be treated as code box to avoid different formats.
Please, help to check my proposed file change into the article and help to merge if you agree with fix. If not, please, let me know either if you would like me to fix it in another way within this PR, if you prefer to fix it in another PR or if I should close this PR as by-design. In case of using another PR, please, let me know of your PR number, so we can confirm and close this PR.
Many thanks in advance.

:x: Validation status: errors

File
Status
Preview URL
Details

:x:Error

Details

Line 16: [Error] Restore nuget package W:\0tbd-s.optemp\packages\opbuild.scripts.1.47.0\tools\packages.config in folder:W:\0tbd-s.optemp\packages failed, possibly due to transient errors from nuget servers. Please retry building your content. If the issue still happens, open a ticket in http://SiteHelp. Detailed error:  Errors in packages.config projects     Unable to find version '1.47.0' of package 'opbuild.initializecrrtool'.       D:\Windows\system32\config\systemprofile.nuget\packages: Package 'opbuild.initializecrrtool.1.47.0' is not found on source 'D:\Windows\system32\config\systemprofile.nuget\packages'.       https://nuget.org/api/v2/: Package 'opbuild.initializecrrtool.1.47.0' is not found on source 'https://nuget.org/api/v2/'.       https://www.myget.org/F/op/api/v2/: Package 'opbuild.initializecrrtool.1.47.0' is not found on source 'https://www.myget.org/F/op/api/v2/'.       https://www.myget.org/F/docfx-dev/api/v2/: Package 'opbuild.initializecrrtool.1.47.0' is not found on source 'https://www.myget.org/F/docfx-dev/api/v2/'.       https://www.myget.org/F/op-dev/api/v2/: Package 'opbuild.initializecrrtool.1.47.0' is not found on source 'https://www.myget.org/F/op-dev/api/v2/'.       https://www.myget.org/F/docfx/api/v2/: Package 'opbuild.initializecrrtool.1.47.0' is not found on source 'https://www.myget.org/F/docfx/api/v2/'.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

biztalk/core/how-to-import-bpel4ws.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

biztalk/core/how-to-import-bpel4ws.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Sentence similarity: The selected column for "Comparison sentence" is missing after changing the advanced data options.

System Information (please complete the following information):
Windows OS: Windows-11-Enterprise-22H2
ML.Net Model Builder 2022: <IP_ADDRESS>7701 (Main Build)
Microsoft Visual Studio Enterprise: 2022(17.4.4)
.Net: 6.0
Describe the bug

On which step of the process did you run into an issue:
The selected column for "Comparison sentence" is missing after changing the advanced data options.

TestMatrix
home-depot-sentence-similarity-small.csv
To Reproduce
Steps to reproduce the behavior:

Select Create a new project from the Visual Studio start window.
Choose the C# Console App (.NET Core) project template.
Add model builder by right click on the project.
Select "Sentence similarity" scenario.
On Data page, choose the data source and select the column for three options.
Click the "advanced data options" link to change column settings and then save them.
Then you will see that the selected column for "Comparison sentence" is missing.

Expected behavior
The selected column for "Comparison sentence" should be displayed well after changing the advanced data options.
Screenshot

Additional context

The bug has been fixed on the latest main build <IP_ADDRESS>0605.


Why not always use .patch() instead of .update()?

In the docs, .patch() is listed for partial updates, .update() for "whole objects."
So if I'm updating 9 of the 10 fields in an object, I guess I use .patch() - but then if I decide to update the last field too I refactor the code to use .update().
Why not just use .patch() all the time?  It seems like unnecessary mental cycles to need to remember what .patch() and .update() are for.
We love this library, thanks!

In my mind, it really comes down to consistency/validation.  I think the short of it is this: use update() if you are replacing an entire record and want to validate required attributes.  Otherwise, use patch()!  Admittedly I find myself using patch() much more often than update().

You don't need to use update ever. Only use if you want to use json schema's required property.


unable to receive notifications in Microsoft Teams with icebreaker app

Current status:
Icebreaker application was setup and completed in Azure.
Able to load the application to Microsoft Teams Admin center.
Able to see the application in multiple teams when you go to manage teams.
Running the trigger in azure shows successful "Code 200".
Right now, not receiving notifications in the chat section.
Initally I set this up about 3 weeks ago and tested in a small group and was able to get it to work. As soon as I added to a bigger team, no more notifications. I have completed removed everything and re-setup at least 2-3 times. Looking for any further assistance that you can provide. I can provide screenshots as well.
Thanks in advance,
Brandon

Any update to this post? Looking for a resolution.

Please check application insights to find the root cause of failure.


t delete favorite -f not working

I tried:
$ t delete help favorite
Usage:
  t favorite TWEET_ID [TWEET_ID...]

Options:
  -f, [--force]

Delete favorites.

But when I run it:
$ t delete favorite -f<PHONE_NUMBER>0469xxxxx
/Users/me/.rbenv/versions/2.2.3/bin/t: No status found with that ID.

But the id is valid (I tried without -f and it works)
What I'm doing wrong?

Temporary fix:
yes | t delete favorite -f<PHONE_NUMBER>0469xxxxx

$ RUBYOPT=-W0 t version
3.1.0

$ ruby --version
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]

$ RUBYOPT=-W0 t delete favorite --force<PHONE_NUMBER>000000000

The --force option works on my machine now.

$ RUBYOPT=-W0 t version
3.1.0

$ ruby --version
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]

$ RUBYOPT=-W0 t delete favorite --force<PHONE_NUMBER>000000000

The --force option works on my machine now.


Provide docker version of the app

This one is in: https://github.com/topcoder-platform/submission-processor/pull/11


Hey, i need a few more slots. Can i add them?

Before i submit a pull request, i just wanted to check with you @xaksis and other maintainers if you agree with this.
Basically, i have a case where i'd need to insert additional <tbody> element into the table, which is currently very hard. Also, it's very hard to insert a <tfoot>.
However, if something like this existed in the source code (Table.vue)

it would make my life a lot easier.
So, do you have anything against the addition of a slot named thead-after
And if i'm doing that, i might as well include other slots e.g. tfoot or tbody-after etc.
Feedback and (naming) suggestions welcome.
Thank you!

It would also be nice to have an alternate actions slot option aside from just the pull right version. I would like to have actions left aligned or centered across the top.


Visual Studio Code jsx highlighting problem

When I put create a new line (in a situation like below), it disturbs the JSX highlighting:

But it's ok if I don't break a new line (green underline is not related with the issue, it's about tslint rule):

@ufukomer Would you mind filing a bug at https://github.com/dracula/visual-studio-code instead?
Thanks!


Use S3 Cache for docker images pulled as "services"

Hi there,
I've seen the examples using an S3 cache to cache docker layers for the docker/build-push-action@v5  action. But is it possible to also cache layers that are pulled for images specified in the services section of a CI job?
e.g:
...

jobs:
  build:
    runs-on: runs-on,runner=8cpu-linux-x64,run-id=${{ github.run_id }}

    services:
      redis:
        image: "redis:7-alpine"
        volumes:
          - redis_data:/data
      localstack:
        image: localstack/localstack

...

Hello,
You cannot use the s3 cache for those, but you can definitely push the images to a local ECR repository and use those images there.
I need to push a dedicated doc, but you can add a custom policy to your stack that allows pulling images from an ECR repo, and then have your runners use images from that repo without any authentication needed.
(see the preinstall section here: https://runs-on.com/features/byoi/#custom-runner-images)

Hi,
You can use ECR as a pull-through cache (https://docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache.html), it seems quite close to your use case..?


pr-notification-link - link to latest changes

Description

We can append #partial-timeline to the link, to automatically scroll down to the latest events (which most likely triggered the notification in the first place). See also open-issue-to-latest-comment.
We can append ?rgh-changes to the link, catch that in the page and and scroll to the "New changes since you last viewed" timeline event. See also https://github.com/refined-github/refined-github/commit/2b38874f813423cd129f387a3dc3c7225578e43e where a partly implementation was reverted.

HTML of the "New changes since you last viewed" timeline event

      <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"
        class="octicon octicon-plus">
        <path
          d="M7.75 2a.75.75 0 0 1 .75.75V7h4.25a.75.75 0 0 1 0 1.5H8.5v4.25a.75.75 0 0 1-1.5 0V8.5H2.75a.75.75 0 0 1 0-1.5H7V2.75A.75.75 0 0 1 7.75 2Z">
        </path>
      </svg>

      New changes since you last viewed
       View changes

(extracted from https://github.com/refined-github/refined-github/pull/7104#issuecomment-1858728416)
Example URLs
Any force-pushed PR that you get a notification for

We can append #partial-timeline to the link

We already do, basically:
https://github.com/refined-github/refined-github/blob/3d227d441af6bc19c8ae149a2409af256d9c19fe/source/features/pr-notification-link.tsx#L11