pyusb test suite

Is there no test suite for this package?
Seems strange not to have one as the project has been around so long.

The most common problems with using this library seem to mostly be hardware or environment/OS issues, which are pretty hard to catch with automated tests. I could see some utility in writing tests that exercise the API, but those are most effective when they're written before or during development and pyusb is fairly inactive/stable at this point. They could help detect regressions though. Did you have example test cases in mind?

I was mostly looking for smoke test type tests, in order to validate that the openSUSE package is working correctly.  We need to validate that it is compatible with Python 3.7.  Also need to check it works with the system dsos, and some integration problem hasnt occurred.

Well, I totally forgot that there are actually are tests, they just don't run in a CI environment. It seems to me after a quick glance that most of the tests depend on some kind of hardware device to be present (see tests/devinfo.py). Tests that rely on hardware could be skipped and remaining tests or new tests could be run to check compatibility across Python versions, backend versions, etc.
I think @SimplicityGuy is the person with the keys to the repo and would be the person to talk to about getting tests running automatically if it makes sense to try and do so. Unfortunately the original author appears to be unable to contribute to the project these days, so this will probably take quite a bit of effort.

Wow, I dont know how I missed that.  A good way to get more visibility for the tests is to include them in the sdist, and add a note about that at the top of the changelog.  That should get some distros attempting to run them, reporting problems, etc and hopefully providing patches.
I'll see if I can get some of them working.

I have the utils and find components tested at https://build.opensuse.org/package/show/home:jayvdb:branches:devel:languages:python/python-usb.  I'll tidy it up a bit and submit it.
The rest does require a device, and I couldnt quickly see how to emulate that.
Some interesting projects doing that in https://github.com/search?l=Python&q=usbip&type=Repositories , and https://github.com/smulikHakipod/USB-Emulation/blob/master/USBIP.py
Very likely more of the codebase can be tested using some mocking.
https://github.com/vpelletier/python-libusb1/blob/master/usb1/testUSB1.py has some example tests which get a bit deeper into the codebase, and they have logic to skip certain tests when there is no device to test.

I found etc/pyusb.rules contains the same vendor/product id (04d8 fa2e) as in tests/devinfo.py, and the same device is referenced in https://github.com/me21/usb-travis/blob/master/libusbK/examples/open-device/open-device.c .  04d8 is  Microchip Technology, Inc. Not sure about the device ID, but some places mentioning fa2e also mention a benchmark device.

The test is for a Microchip FW based device, but you can use other device and adapt the test codes.

FW codes are here.
https://github.com/walac/bmfw
It is based on the FW codes written by Travis, the author of libusbK.
https://github.com/mcuee/libusbk/tree/master/BmFW

@mcuee
I definitively need to build myself a test device... could you suggest a device and setup that's easy to configure for this?

Any Arm Cortex M0/M3/M4 device should be good if you want to port to the more popular MCU platform.
If you want to use PIC, then I think the following board is low cost and very powerful.
https://www.microchipdirect.com/product/search/all/dm320107?_ga=2.138139893.473561004.1578276435-901967630.1553597350

I myself use an old PIC18F87J50 USB PIM.
https://www.microchip.com/Developmenttools/ProductDetails/MA180021#additional-summary
I also have Explorer 16 with PIC32 and USB Pictail board. But I have not touched it for a while.

For STM32, I think this is a good start.
https://github.com/dmitrystu/libusb_stm32
Travis has created a WinUSB demo here.
https://github.com/TravisRo/libusb_stm32

Thanks @mcuee , I'll look into these.

FWIW, I have the same issue with PyFtdi: how to run CI, for example with GitHub Actions...
I looked at various HW solutions: STM32, MSP430, even small FPGAs.
The problem here is that it requires a LOT of work to make a configurable remote device to simulate and/or catch errors, and be versatile enough to be reconfigured for each kind of tests. It would be definitely great, but it is nearly the same work effort than the project I want to test... I have not enough spare time to deal with both. For now, I kept this idea in mind as it would definitely be a interesting solution. Moreover to test PyUSB you would need a HS capable device to validate real use cases, which brings its own challenges.
Another issue is that it reduces the count of people that can run the tests, as they need the test HW, and the tools to program it. It is not something you can download and easily get up and running whenever you want to troubleshoot an issue, unfortunately.
I ended up writing a virtual backend so that it is possible to describe virtual USB devices using simple Yaml config files and test several APIs.
Obviously, it is not possible to test everything this way, but it gives much more confidence in the changes as it enables to catch many errors nonetheless.
This virtual backend is added on demand to the list of PyUSB backend candidates. This means that it is not possible to exercise the code of the existing backends, only the core and util modules of PyUSB - but I guess a similar solution could be implemented to test a backend by faking ctypes...
Yaml files describe the USB device hierarchy (device, configurations, interfaces, endpoints) and support multiple devices. The virtual backend then handles the control and bulk requests.
Vendor calls are redirected to the second emulation level which handles the FTDI HW API, so it can emulate the HW behavior. At this point the test code may access this virtual HW to check what’s going on and handle the virtualized IOs.
It’s still a work in progress but I already found several issues that have been silently hiding in PyFtdi for years, and I’ve been able to develop new features and test them first with the virtual HW then check how it behaves with the real one. The most challenging part will be to simulate the real time behavior of an actual HW.
A similar solution might be useful for PyUSB, at least to check some parts of its base code.
I’m interested in whatever solution is implemented to test  PyUSB (HW, virtual, any other idea) as I think I have the same needs.
HTH,
Manu

For Linux, look at gadget driver.
https://www.kernel.org/doc/html/v4.17/driver-api/usb/gadget.html

https://raspberrypi.stackexchange.com/questions/71613/how-to-use-raspberry-pi-3-as-a-usb-gadget
Take note the following from the above answer:
You cannot use the Raspberry Pi 3 as a USB gadget. At the time of writing this is only possible on the Raspberry Pi 0, 0W, A, A+, and 4. The Pi B, B+, 2, 3, 3A+, and 3B+ lack the required pin for OTG.

The above link to an example on RASPBERRY PI ZERO.
https://www.isticktoit.net/?p=1383

@jonasmalacofilho
https://www.kernel.org/doc/html/latest/usb/gadget-testing.html
The following is of particular interests as it supports isoc transfer
SOURCESINK function

pattern | 0 (all zeros), 1 (mod63), 2 (none)
-- | --
isoc_interval | 1..16
isoc_maxpacket | 0 - 1023 (fs), 0 - 1024 (hs/ss)
isoc_mult | 0..2 (hs/ss only)
isoc_maxburst | 0..15 (ss only)
bulk_buflen | buffer length
bulk_qlen | depth of queue for bulk
iso_qlen | depth of queue for iso

But you can start with the loopback first as it is simpler (only bulk transfer).

It looks like https://github.com/eblot/pyftdi/blob/master/pyftdi/tests/mockusb.py is what @eblot was referring to.

It looks like https://github.com/eblot/pyftdi/blob/master/pyftdi/tests/mockusb.py is what @eblot was referring to.

👍

As mentioned in #373, I can rebuild the test FW by Wander under Windows 10.
https://github.com/walac/bmfw
Legacy Microchip MCU SW tools used:

MPLAB 8.92 (you can download C32 compiler here as well)
https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-ecosystem-downloads-archive

MPLAB C18 3.47 Lite version
https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/SW006011

HW used: PIC18F87J50 USB PIM
https://www.microchip.com/Developmenttools/ProductDetails/MA180021
But you can use other HW tools mentioned here as well, for example, you can use PICkit 2. There are quite some cheap PICkit 2 clones online.
https://github.com/walac/bmfw/tree/master/USB_Device_Benchmark/Firmware
It should be possible to port the FW to new MPLAB X IDE and XC8/XC16/XC32 based compilers and new USB PIC based boards.
On the other hand, I understand USB PICs are not that popular. I think it is probably not that difficult to port this to USB ARM based MCUs.

Just dig out my Orange Pi Zero board and it seems to me OTG is working as I can see g_serial driver is working (I can log in to the system using serial connection from my Mac Mini M1 using Cool Term). I will need to know how to get the SourceSink loopback gadget to work (usb_f_ss_lb.ko), modprobe seems to work but I can not see the device from the host side.
https://www.kernel.org/doc/html/latest/usb/gadget-testing.html

First progress.
From orange pi zero (the first two commands are just to play safe).
mcuee@orangepizero:~$ sudo rmmod g_serial
mcuee@orangepizero:~$ sudo rmmod usb_f_acm
mcuee@orangepizero:~$ sudo modprobe usb_f_ss_lb
mcuee@orangepizero:~$ sudo modprobe g_zero

From macOS (you can use Linux as well).

~ ❯ lsusb1 -vvv -d 0525:a4a0

Bus 002 Device 017: ID 0525:a4a0
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0525
  idProduct          0xa4a0
  bcdDevice            4.14
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      2
OTG Descriptor:
  bLength                 3
  bDescriptorType         9
  bmAttributes         0x03
    SRP (Session Request Protocol)
    HNP (Host Negotiation Protocol)
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0023
    bNumInterfaces          1
    bConfigurationValue     3
    iConfiguration          4 source and sink data
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0023
    bNumInterfaces          1
    bConfigurationValue     2
    iConfiguration          5 loop input to output
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              6 loop input to output
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          255
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      2
can't get debug descriptor: No such file or directory
Device Status:     0x0001
  Self Powered

Now someone needs to port the following tool to libusb and pyusb.
https://github.com/torvalds/linux/blob/master/tools/usb/testusb.c
Device side (Orange Pi Zero)
[ 2626.275126] zero gadget: Gadget Zero, version: Cinco de Mayo 2008
[ 2626.275140] zero gadget: zero ready
[ 2626.785670] zero gadget: high-speed config #3: source/sink

Host side (Raspberry Pi 400)

[ 2578.150176] usb 1-<IP_ADDRESS>: new high-speed USB device number 14 using xhci_hcd
[ 2578.250951] usb 1-<IP_ADDRESS>: New USB device found, idVendor=0525, idProduct=a4a0, bcdDevice= 4.14
[ 2578.250973] usb 1-<IP_ADDRESS>: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2578.250979] usb 1-<IP_ADDRESS>: Product: Gadget Zero
[ 2578.250983] usb 1-<IP_ADDRESS>: Manufacturer: Linux 4.14.70-sunxi with musb-hdrc
[ 2578.250988] usb 1-<IP_ADDRESS>: SerialNumber:<PHONE_NUMBER>.0123456789.0123456789
[ 2578.338905] usbtest 1-<IP_ADDRESS>:3.0: Linux gadget zero
[ 2578.338925] usbtest 1-<IP_ADDRESS>:3.0: high-speed {control in/out bulk-in bulk-out} tests (+alt)
build/libusb/testusb ❯ gcc testusb.c -o testusb -lpthread
build/libusb/testusb ❯ ./testusb
must specify '-a' or '-D dev', or DEVICE=/dev/bus/usb/BBB/DDD in env
usage: ./testusb [options]
Options:
-D dev		only test specific device
-A usb-dir
-a		test all recognized devices
-l		loop forever(for stress test)
-t testnum	only run specified case
-n		no test running, show devices to be tested
Case arguments:
-c iterations		default 1000
-s transfer length	default 1024
-g sglen		default 32
-v vary			default 1024
build/libusb/testusb took 57s ❯ sudo ./testusb -v 512 -D /dev/bus/usb/001/014
unknown speed	/dev/bus/usb/001/014	0
/dev/bus/usb/001/014 test 0,    0.000044 secs
/dev/bus/usb/001/014 test 1,    0.156936 secs
/dev/bus/usb/001/014 test 2,    0.094374 secs
/dev/bus/usb/001/014 test 3,    0.090598 secs
/dev/bus/usb/001/014 test 4,    0.063349 secs
/dev/bus/usb/001/014 test 5,    2.006133 secs
/dev/bus/usb/001/014 test 6,    1.196170 secs
/dev/bus/usb/001/014 test 7,    3.040815 secs
/dev/bus/usb/001/014 test 8,    6.078812 secs
/dev/bus/usb/001/014 test 9,    1.783042 secs
/dev/bus/usb/001/014 test 10,    2.467652 secs
/dev/bus/usb/001/014 test 11,   16.482459 secs
/dev/bus/usb/001/014 test 12,   17.303233 secs
/dev/bus/usb/001/014 test 13,    2.962595 secs
/dev/bus/usb/001/014 test 14,    0.221378 secs
/dev/bus/usb/001/014 test 17,    0.127209 secs
/dev/bus/usb/001/014 test 18,    0.066474 secs
/dev/bus/usb/001/014 test 19,    0.126169 secs
/dev/bus/usb/001/014 test 20,    0.097838 secs
/dev/bus/usb/001/014 test 21,    0.223985 secs
/dev/bus/usb/001/014 test 24,    2.199070 secs
/dev/bus/usb/001/014 test 27,    2.001612 secs
/dev/bus/usb/001/014 test 28,    1.179446 secs
/dev/bus/usb/001/014 test 29,    0.436017 secs

For people who want to try SuperSpeed USB, then the following Cypress kit may be a good value buy at US$49 (ARM9 CPU Core with 512KB RAM).
https://www.cypress.com/documentation/development-kitsboards/cyusb3kit-003-ez-usb-fx3-superspeed-explorer-kit

Some interesting articles: you can use simple scripts to create USB Gadgets

Tested successful in my Orange Pi Zero (eq to g_zero)
https://wiki.tizen.org/USB/Linux_USB_Layers/Configfs_Composite_Gadget/Usage_eq._to_g_zero.ko

Not tested but looks good
https://www.collabora.com/news-and-blog/blog/2019/02/18/modern-usb-gadget-on-linux-and-how-to-integrate-it-with-systemd-part-1/

I just got the Cypress 3 demo board and it is very good.
I just mock up a quick pyusb codes from the example here (make it to be usable with Python3)
https://github.com/danielkucera/cyusb3014-breakout/blob/master/software/loopback-test.py
#!/usr/bin/python

import usb.core
import usb.util
import time
import _thread

# find our device
dev = usb.core.find(idVendor=0x04b4, idProduct=0x00f0 )

# was it found?
if dev is None:
    raise ValueError('Device not found')

# set the active configuration. With no arguments, the first
# configuration will be the active one
dev.set_configuration()

# get an endpoint instance
cfg = dev.get_active_configuration()

#intf = cfg[(0,1)]

#dev.set_interface_altsetting(interface = 0, alternate_setting = 0)
intf = cfg[(0,0)]

#print intf

ep = usb.util.find_descriptor(
    intf,
    # match the first OUT endpoint
    custom_match = \
    lambda e: \
        e.bEndpointAddress == 1)

ep2 = usb.util.find_descriptor(
    intf,
    # match the first OUT endpoint
    custom_match = \
    lambda e: \
        e.bEndpointAddress == 0x81)

assert ep is not None
assert ep2 is not None

print ('ep:',ep)
print ('ep2:',ep2)

chunkr = 2**16
chunkw = 2**22

print ("Starting CYUSB3014 python loopback test")

def read_loop():
    start = time.time()
    trans = 0
    while True:
        data = dev.read(0x81, chunkw, 1000)
        trans = trans + len(data)
        if time.time() > start + 1:
            bps = trans/(time.time() - start)
            print ("Transfered %d kB/s" % (bps/(1024)) )
            trans = 0
            start = time.time()

def write_loop():
    dat = "A"*chunkw
    while True:
        try:
            ep.write(dat)
        except:
            pass

_thread.start_new_thread( write_loop, () )

read_loop()

And here is the test results under Windows 10 and libusb-0.1 backend (with libusbk driver) using the Cypress default bulk loopback firmware ( cyfxbulklpautoenum.img).
https://github.com/hantianjz/cy_fx3_sdk/tree/master/cyusb_linux_1.0.5/fx3_images
C:\work\cyusb\cyusb3014-breakout\software [master ≡ +1 ~1 -0 !]> C:\Python39\python.exe .\loopback-test.py
ep:       ENDPOINT 0x1: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x1 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :  0x400 (1024 bytes)
       bInterval        :    0x0
ep2:       ENDPOINT 0x81: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x81 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :  0x400 (1024 bytes)
       bInterval        :    0x0
Starting CYUSB3014 python loopback test
Transfered 79918 kB/s
Transfered 73125 kB/s
Transfered 70744 kB/s
Transfered 73111 kB/s
Transfered 72270 kB/s
Transfered 76391 kB/s
Transfered 69592 kB/s
Transfered 71945 kB/s
Transfered 77444 kB/s
Transfered 71453 kB/s
Transfered 85137 kB/s
Transfered 69856 kB/s
Transfered 68236 kB/s
Transfered 74049 kB/s
Transfered 76535 kB/s
Transfered 78738 kB/s
Transfered 74406 kB/s
Transfered 82533 kB/s
Transfered 71939 kB/s
Transfered 73249 kB/s
Transfered 79609 kB/s
Transfered 72313 kB/s
Transfered 93656 kB/s
Transfered 75502 kB/s

And here is the test results under Windows 10 and libusb-0.1 backend (with libusbk.sys driver and libusb-0.1.dll from libusb-win32 project) using the Cypress default bulk loopback firmware ( cyfxbulksrcsink.img).
https://github.com/hantianjz/cy_fx3_sdk/tree/master/cyusb_linux_1.0.5/fx3_images
Quick mod of pyusb codes
#!/usr/bin/python

import usb.core
import usb.util
import time
import _thread

# find our device
dev = usb.core.find(idVendor=0x04b4, idProduct=0x00f1 )

# was it found?
if dev is None:
    raise ValueError('Device not found')

# set the active configuration. With no arguments, the first
# configuration will be the active one
dev.set_configuration()

# get an endpoint instance
cfg = dev.get_active_configuration()

#intf = cfg[(0,1)]

#dev.set_interface_altsetting(interface = 0, alternate_setting = 0)
intf = cfg[(0,0)]

#print intf

ep = usb.util.find_descriptor(
    intf,
    # match the first OUT endpoint
    custom_match = \
    lambda e: \
        e.bEndpointAddress == 1)

ep2 = usb.util.find_descriptor(
    intf,
    # match the first OUT endpoint
    custom_match = \
    lambda e: \
        e.bEndpointAddress == 0x81)

assert ep is not None
assert ep2 is not None

print ('ep:',ep)
print ('ep2:',ep2)

chunkr = 2**16
chunkw = 2**16

print ("Starting CYUSB3014 python bulk sourcesink test")

def read_loop():
    start = time.time()
    trans = 0
    while True:
        data = dev.read(0x81, chunkw, 1000)
        trans = trans + len(data)
        if time.time() > start + 1:
            bps = trans/(time.time() - start)
            print ("Read: transfered %d kB/s" % (bps/(1024)) )
            trans = 0
            start = time.time()

def write_loop():
    start1 = time.time()
    trans1 = 0
    dat = "A"*chunkw
    while True:
        ep.write(dat)
        trans1 = trans1 + len(dat)
        if time.time() > start1 + 1:
            bps1 = trans1/(time.time() - start1)
            print ("Write: transfered %d kB/s" % (bps1/(1024)) )
            trans1 = 0
            start1 = time.time()

_thread.start_new_thread( write_loop, () )

read_loop()

C:\work\cyusb\cyusb3014-breakout\software [master ≡ +3 ~1 -0 !]> C:\Python39\python.exe .\sourcesink_python3.py
ep:       ENDPOINT 0x1: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x1 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :  0x400 (1024 bytes)
       bInterval        :    0x0
ep2:       ENDPOINT 0x81: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x81 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :  0x400 (1024 bytes)
       bInterval        :    0x0
Starting CYUSB3014 python bulk sourcesink test
Read: transfered 254788 kB/s
Write: transfered 239949 kB/s
Read: transfered 256516 kB/s
Write: transfered 237127 kB/s
Write: transfered 239851 kB/s
Read: transfered 257513 kB/s
Write: transfered 246194 kB/s
Read: transfered 254514 kB/s
Write: transfered 243847 kB/s
Read: transfered 257347 kB/s
Write: transfered 248995 kB/s
Read: transfered 253793 kB/s
Write: transfered 246223 kB/s
Read: transfered 255750 kB/s
Write: transfered 244703 kB/s
Read: transfered 254942 kB/s
Read: transfered 260570 kB/s
Write: transfered 241867 kB/s
Write: transfered 247435 kB/s
Read: transfered 255497 kB/s
Write: transfered 246942 kB/s
Read: transfered 256157 kB/s
Write: transfered 246276 kB/s
Read: transfered 256769 kB/s
Write: transfered 249399 kB/s
Read: transfered 256892 kB/s
Write: transfered 249238 kB/s
Read: transfered 255354 kB/s
Write: transfered 247957 kB/s
Read: transfered 255627 kB/s
Write: transfered 245715 kB/s
Read: transfered 255074 kB/s
Write: transfered 245474 kB/s
Read: transfered 256934 kB/s
Write: transfered 244311 kB/s
Read: transfered 255716 kB/s
Write: transfered 245908 kB/s
Read: transfered 254292 kB/s
Write: transfered 250961 kB/s
Read: transfered 255390 kB/s
Write: transfered 246998 kB/s
Read: transfered 252284 kB/s

Using libusb-1.0.24 release and WinUSB driver, I got a bit worse result than the above.

(py39venv) C:\work\cyusb\cyusb3014-breakout\software [master ≡ +3 ~1 -0 !]> python .\sourcesink_python3.py
ep:       ENDPOINT 0x1: Bulk OUT ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :    0x1 OUT
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :  0x400 (1024 bytes)
       bInterval        :    0x0
ep2:       ENDPOINT 0x81: Bulk IN ===============================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x81 IN
       bmAttributes     :    0x2 Bulk
       wMaxPacketSize   :  0x400 (1024 bytes)
       bInterval        :    0x0
Starting CYUSB3014 python bulk sourcesink test
Write: transfered 230158 kB/s
Read: transfered 231950 kB/s
Write: transfered 228750 kB/s
Read: transfered 230030 kB/s
Write: transfered 231019 kB/s
Read: transfered 233387 kB/s
Write: transfered 227717 kB/s
Read: transfered 228741 kB/s
Write: transfered 229477 kB/s
Read: transfered 231397 kB/s
Write: transfered 231185 kB/s
Read: transfered 232336 kB/s
Write: transfered 229526 kB/s
Read: transfered 231062 kB/s
Write: transfered 229421 kB/s
Read: transfered 230701 kB/s
Write: transfered 228526 kB/s
Read: transfered 230126 kB/s
Write: transfered 230364 kB/s
Read: transfered 232156 kB/s

Native libusbk Windows API is very fast (similar to Cypress Cyusb API under Windows).

C:\work\libusb\libusbk\libusbK\bin\kBench\x64\Release [master ≡ +19 ~0 -0 !]> .\kBench.exe list notestselect loop buffercount=4 buffersize=32768 mode=async
device-count=1
1. FX3 (USB\VID_04B4&PID_00F1\5&E9F3E45&0&17) [WinUSB]
Select device (1-1) :1

opened FX3 (USB\VID_04B4&PID_00F1\5&E9F3E45&0&17)..
Loop Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&17#{2bd89cab-e993-bf2c-5d31-9fc66ae52d58}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 32768
        Write Size      : 32768
        Buffer Count    : 4
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Bulk Read (Ep81h) Maximum Packet Size:1024
Bulk Write (Ep01h) Maximum Packet Size:1024

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 617426600.99 Transfers: 19125 Bytes/s: 617426600.99
Avg. Bytes/s: 621827684.37 Transfers: 38238 Bytes/s: 626294784.00
Avg. Bytes/s: 620473053.12 Transfers: 57393 Bytes/s: 617786456.69
Avg. Bytes/s: 620673043.74 Transfers: 76656 Bytes/s: 621269669.29
Avg. Bytes/s: 620468747.53 Transfers: 95850 Bytes/s: 619654179.31
Avg. Bytes/s: 621473066.31 Transfers: 114971 Bytes/s: 626556928.00
Avg. Bytes/s: 621557269.90 Transfers: 133955 Bytes/s: 622067712.00
Avg. Bytes/s: 620880178.26 Transfers: 153060 Bytes/s: 616173858.27
Avg. Bytes/s: 621144548.14 Transfers: 172081 Bytes/s: 623280128.00
Avg. Bytes/s: 620838832.46 Transfers: 191227 Bytes/s: 618104559.61
Avg. Bytes/s: 621008690.89 Transfers: 210231 Bytes/s: 622723072.00
Avg. Bytes/s: 620903402.10 Transfers: 229447 Bytes/s: 619753826.77
Avg. Bytes/s: 621347170.95 Transfers: 248573 Bytes/s: 626720768.00
Avg. Bytes/s: 620998257.27 Transfers: 267688 Bytes/s: 616496377.95
Avg. Bytes/s: 621398269.88 Transfers: 286824 Bytes/s: 627048448.00
Avg. Bytes/s: 621406342.50 Transfers: 306076 Bytes/s: 621526636.45
waiting for Ep81h thread..
stopped Ep81h thread.   ExitCode=0
stopped Ep01h thread.   ExitCode=0
Loop Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&17#{2bd89cab-e993-bf2c-5d31-9fc66ae52d58}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 32768
        Write Size      : 32768
        Buffer Count    : 4
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Bulk Read (Ep81h) Maximum Packet Size:1024
        Total Bytes     :<PHONE_NUMBER>
        Total Transfers : 153773
        Avg. Bytes/sec  : 312195394.30
        Elapsed Time    : 16.14 seconds

Bulk Write (Ep01h) Maximum Packet Size:1024
        Total Bytes     :<PHONE_NUMBER>
        Total Transfers : 152304
        Avg. Bytes/sec  : 309212978.44
        Elapsed Time    : 16.14 seconds

Press any key to exit..

It looks like https://github.com/eblot/pyftdi/blob/master/pyftdi/tests/mockusb.py is what @eblot was referring to.

Maybe this is the way to go as it is more generic and not depending on hardware.
Hardware specific things can be added as examples if needed.

For those who wat to look at using python for creating Linux USB gadgets using functionfs, you can look at this: https://github.com/vpelletier/python-functionfs/issues/20
Other ways:

Using shell scripts with configfs: https://wiki.tizen.org/USB/Linux_USB_Layers/Configfs_Composite_Gadget
using gt with configfs: https://github.com/linux-usb-gadgets/gt

With dummy_hcd, I think python-functionfs can be a powerful tool to create test device on Linux machine (even without the dedicated usb device controller) as dummy_hcd is emulated and you can use your normal Linux PC.

Reference: https://github.com/libusb/libusb/wiki/FAQ#Testing_libusb


Source code is missing for arm64 build

I'm trying to make ChakraCore running on arm64 properly. Although it seems to ChakraCore doesn't support arm64 officially (at least can't build for arm64 using build script), but the codes for arm64 is almost ready in code base except for unixasmmacrosarm64.inc is used by others but doesn't exist in the project.
What is the good way to complement these missing files to ChakraCore code base? Can't build it for arm64 without unixasmmacrosarm64.inc

I assume you're trying on Linux? Arm64 support is only available on Windows right now. We haven't done any work for arm64 support on xplat.

@MikeHolman We should document how to build on arm64 since we didn't talk about in Building ChakraCore. Who is familiar with it?

@sigatrev @Penguinwizzard would know best.

No clue about license issues; @liminzhu, do you know more on that? Since that's where we got the pal originally, I suspect that it'll be pretty straightforward to get the new files, although we may want to more generally update the pal, since they've done other work in there in the meantime.

We have touched the PAL ourselves as well though, so taking a larger update from elsewhere might not be trivial.

@liminzhu is this a documentation task or a work item?


Fix possible race condition when updating ShootState

How to categorize this PR?

/area control-plane-migration
/kind bug
/priority critical
What this PR does / why we need it:
This PR makes the step which saves the etcd encryption configuration depend on the steps which load and generate the shoot secrets since all of these steps read and write to the botanist.ShootState field.
In the future we could make the etcd encryption config generation part of the shoot secrets generation steps and come up with a better way to synchronise steps which write/read from the botanist.ShootState field.
Which issue(s) this PR fixes:
Part of #1631
Special notes for your reviewer:
Release note:

Fixed possible race condition when updating the ShootState.

Also,
/needs/rebase
to fix the CI failure.

Hmm, it is rebased.


Add Assign Texture Button in Substance material and make it functional

Hello ogers, did we finally do this ?

Hello Aghiles,
Yes that part is finished. I will close all finished issues and add some
new issues today that are not done yet.
On Sun, May 12, 2019, 6:22 PM Aghiles Kheffache<EMAIL_ADDRESS>wrote:

Hello ogers, did we finally do this ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/FMalmberg/3Delight-for-Cinema-4D/issues/21#issuecomment-491609332,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIN6NX7FPTVUEX7TFGA6YPLPVA76DANCNFSM4HGKPREA
.

Perfect.


Wrong Content-Type in v1 query API response

Steps to reproduce:

Setup default DBRP for bucket
Run "SHOW MEASUREMENTS" query or any SELECT statement

For example:
curl -i --request POST 'http://localhost:8086/query?db=mybucket' --header 'Authorization: Token <token>' --header 'Accept: application/json' --data-urlencode 'q=SHOW MEASUREMENTS'

gives the following response from InfluxDB 2.0.3:
HTTP/1.1 200 OK
Date: Thu, 14 Jan 2021 09:51:36 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 120
Connection: keep-alive

{"results":[{"statement_id":0,"series":[{"name":"measurements","columns":["name"],"values":[["mymeasurement"]]}]}]}

Expected behavior:
The Content-Type header should indicate application/json encoding.
The same query towards InfluxDB 1.x correctly sets application/json content type.
Actual behavior:
The Content-Type header is text/plain while body is JSON.
Environment info:

InfluxDB 2.0.3 (git: fe04d346df) build_date: 2020-12-15T01:00:16Z

To be sure we don't miss anything, I cross-checked the documentation/implementation for 1.x and 2.x:

Accept Header
Implemented in 1.x?
Documented in 1.x?
Implemented in 2.x?
Documented in 2.x?

application/json (default)
Yes
Yes
Yes
Yes

application/csv
Yes
Yes
Yes
No

text/csv
Yes
No
Yes
No

text/plain
No
No
Yes
No

application/x-msgpack
Yes
No
Yes
No

AFAICS from reading the implementation, the Content-Type is wrong in all 2.x responses.

To be sure we don't miss anything, I cross-checked the documentation/implementation for 1.x and 2.x:

Accept Header
Implemented in 1.x?
Documented in 1.x?
Implemented in 2.x?
Documented in 2.x?

application/json (default)
Yes
Yes
Yes
Yes

application/csv
Yes
Yes
Yes
No

text/csv
Yes
No
Yes
No

text/plain
No
No
Yes
No

application/x-msgpack
Yes
No
Yes
No

AFAICS from reading the implementation, the Content-Type is wrong in all 2.x responses.

Early reactions on our end were to treat the 1.x implementation as the source of truth. Under that impression, my thought is to:

Delete the text/plain implementation from the 2.x code
Fix the remaining 2.x implementations to set the correct Content-Type header
Update the 2.x swagger API to document the Accept header, and to include all possible response Content-Types

Early reactions on our end were to treat the 1.x implementation as the source of truth. Under that impression, my thought is to:

Delete the text/plain implementation from the 2.x code
Fix the remaining 2.x implementations to set the correct Content-Type header
Update the 2.x swagger API to document the Accept header, and to include all possible response Content-Types

Everything looks good in your approach.
text/plain was added for debugging InfluxQL responses using curl when the influx client is not available, as it returns a human-readable response in a tabular format. I don't see a problem removing it.

Everything looks good in your approach.
text/plain was added for debugging InfluxQL responses using curl when the influx client is not available, as it returns a human-readable response in a tabular format. I don't see a problem removing it.


Leader line startPlug position is not at midpoint of any side

Hello there,
First of all loved your work on LeaderLine as well as PlainDraggable, its simply awesome and in detailed library with extensive controls, thanks for giving such a library to the world
I was trying to implement some project where the startPlug is showing on the left top corner instead of midpoint of top or left side, how can i solve this problem, below are the screenshots of the same
this startPlug is actually a div having PlainDraggable so when i move this big div around and call line.position() it actually re positions correctly on the midpoint of respective side but when i save all the values and try to load the LeaderLine with these values then the below result is produced
Blue arrow shows the correct starting point that it must show for startPlug

Because of this the arrows get overlapped on starting div

Hi @omkarajagunde, thank you for the comment.
Sorry, my English is poor, then your words are difficult for me.
Do you mean that the position() method works correctly when other than the loading?
Maybe, you called the method  too early. You have to call the method after those elements are rendered. That <div> has no size yet. In other words, the line was joined at the midpoint of the element correctly, after that, the element was resized.

No reply came, then this abandoned issue is closed.

Hey @anseki,
im really very very sorry for replying this late sir, got caught up with few other things, but you were correct as always :), the above issue was solved, i was calling LeaderLine() constructor first and then my div's width was getting calculated and applied, so now i waited till the div's width is applied then gave call to LeaderLine(),
As always thanks for your prompt help! We here really appreciate your work in making and putting LeaderLine as well as PlainDraggable here under MIT license,
Also we would really love to hear your programming journey, experiences, story behind creation of LeaderLine & PlainDrggable, and please sir your english is good, you are always clear with your thoughts we feel, i really respect you for your js skills, i also admire and aspire you to contribute something really useful from my end in opensource, can you guide me and be my mentor for the same? (I don't whether this is the right platform to talk this or not)
Wish you a healthy and prosperous life, thanks again and sorry for making this reply big one...

Don't worry. :smile:


<!-- translates to <!--

[I'm not sure if this is an issue with ecmarkup or grammarkdown.]
From ES6 B.1.3, the production:
SingleLineHTMLOpenComment ::
  `<!--` SingleLineCommentChars?

is translated into an <emu-production> containing:
<emu-t><!--</emu-t>

which opens up an HTML comment that swallows up the next few productions.

Grammarkdown PR fixing this: https://github.com/rbuckton/grammarkdown/pull/13.

This is fixed!


PackedFunction to return params from the .so module, show warning when no params are set

Issue
debug_executor workflow described in https://tvm.apache.org/docs/arch/debugger.html#how-to-use-debugger has strange behavior. When I used code from the step 4, the result of inference differs from time to time. After a short investigation, I found that the params are not set correctly. Code that I used:
onnx_model = onnx.load("./resnet50-v2-7.onnx")
mod, params = relay.frontend.from_onnx(onnx_model, {'data': (1, 3, 224, 224)})
with tvm.transform.PassContext(opt_level=3):
      lib = relay.build(mod, target="llvm", params=params)
lib_name = "lib.so"
lib.export_library(lib_name)

loaded_lib = tvm.runtime.load_module(lib_name)
m = graph_executor.create(loaded_lib["get_graph_json"](), loaded_lib, dev, dump_root="/tmp/tvmdbg")
m.set_input('data', tvm.nd.array(data.astype(dtype)))
m.set_input(**params)
m.run()
tvm_out = m.get_output(0, tvm.nd.empty(out_shape, dtype)).numpy()

Solution

Implementation of get_graph_params function, which allows to get params directly from the lib file. Thus a single line can be added to the debugger example code:lib = tvm.runtime.load_module("network.so")
params = lib['get_graph_params']() # <-----
m = graph_executor.create(lib["get_graph_json"](), lib, dev, dump_root="/tmp/tvmdbg")
# set inputs
m.set_input('data', tvm.nd.array(data.astype(dtype)))
m.set_input(**params)
# execute
m.run()
tvm_out = m.get_output(0, tvm.nd.empty(out_shape, dtype)).numpy()

After this the result of inference will be correct.
As a additional mark, special warning was added. This warning will be shown when a developer tries to call run() before setting inputs and params,

After thinking about this PR a little more, I'm of the opinion that we probably should not add input checking to GraphExecutor::Run. It's important that we keep Run as minimal as possible, and the checking of inputs and more importantly printing of the warning may cause Run to be slower. I like the rest of this PR but think we should drop input_set_. What do you think @junrushao1994?

@jwfromm that makes sense to me. The checking itself, although i would say the overhead might be minimal, could take some time and cause regressions on small workloads. The rest of the PR looks pretty good BTW.

Thank you for the comments! Currently I have 2 solutions:

Restore the original logic of Run function
Since current time complexity of Run is O(N^2), I can rewrite it and reduce complexity to, probably, O(1).
Which one do you prefer?


new Error(The process '${this.toolPath}' failed with exit code ${this.processExitCode});

I'm getting the following error when running the cypress-io/github-action on v5 or v6:
Signal received: 0, errno: 0
################################################################################
Stack trace:
################################################################################
/home/runner/work/openid_server_code/openid_server_code/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(aws_backtrace_print+0x41) [0x7f004fc16a71]
/home/runner/work/openid_server_code/openid_server_code/node_modules/aws-crt/dist/bin/linux-x64/aws-crt-nodejs.node(+0x82c73) [0x7f004f8adc73]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420) [0x7f005def0420]
node() [0xa963ba]
node(_ZN2v88internal7Isolate38RunHostImportModuleDynamicallyCallbackENS0_6HandleINS0_6ScriptEEENS2_INS0_6ObjectEEENS0_11MaybeHandleIS5_EE+0x101) [0xed1141]
node(_ZN2v88internal25Runtime_DynamicImportCallEiPmPNS0_7IsolateE+0x9b) [0x12e78db]
node() [0x170e0b4]
/home/runner/work/_actions/cypress-io/github-action/v5/dist/index.js:3900
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/opt/hostedtoolcache/node/18.19.0/x64/bin/npm' failed with exit code 255
    at ExecState._setResult (/home/runner/work/_actions/cypress-io/github-action/v5/dist/index.js:3900:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/cypress-io/github-action/v5/dist/index.js:3883:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/cypress-io/github-action/v5/dist/index.js:3777:27)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

Looks like this problem is happening for more users on the following issue on Cypress repository https://github.com/cypress-io/cypress/discussions/24296
Cypress Version: 12.6.0
runs-on: ubuntu-20.04
My worklow.yml:
name: Cypress Tests

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review, unlocked]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

env:
  CI: true

jobs:
  cypress-raidiam:
    runs-on: ubuntu-20.04 # needed for mongo import
    if: github.event.pull_request.draft == false
    timeout-minutes: 15
    steps:
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 18

      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Mongo
        uses<EMAIL_ADDRESS>        with:
          mongodb-version: 6
          mongodb-replica-set: test-rs

      - name: Launch Localstack
        run: |
          echo "Install aws localstack"
          pip install awscli-local==0.21
          pip install localstack-client==2.5
          pip install awscli==1.29.73
          pip install boto3==1.28.73
          pip install docutils==0.16
          pip install botocore==1.31.73
          pip install rsa==4.7.2
          pip install s3transfer==0.7.0
          pip install jmespath==1.0.1
          pip install python-dateutil==2.8.2
          echo "awscli and awslocal installed"
          echo "Starting Local Stack"
          docker compose -f docker-compose-localstack.yml up -d
          sleep 10
          bash .aws/localstack.sh
          bash create-resources.sh

      - name: Cypress Run Raidiam
        uses: cypress-io/github-action@v5 # needed for node v18
        with:
          build: npm run build:cypress
          start: npm run cypress:test
          wait-on: 'http://localhost:9000/session/end'
          wait-on-timeout: 120
          browser: chrome
          record: true
          parallel: false
          group: ${{ env.TAG }}
          tag: ${{ env.TAG }}
        env:
          CYPRESS_grepTags: ${{ env.TAG }}

cc @tvthatsme @jarekcimoch @garmeeh

@CaiqueCoelho
Can you share your repository? If not, please provide the script definitions for

build:cypress
cypress:test

as used in:
          build: npm run build:cypress
          start: npm run cypress:test

You should not normally be running Cypress tests through the action's start (Server) parameter.

This issue seems to be following on from https://github.com/cypress-io/github-action/issues/1086

@CaiqueCoelho
If you look at the full log of your workflow you will probably find that the error
/home/runner/work/_actions/cypress-io/github-action/v5/dist/index.js:3900
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/opt/hostedtoolcache/node/18.19.0/x64/bin/npm' failed with exit code 255

is caused by the failure of one of your npm calls.
If it not clear which of the npm calls is the problem, then you can add the following into your workflow to gather additional debug information:
  env:
    DEBUG: '@cypress/github-action'

Closing due to lack of activity.
If there is new information we can re-open.


vc_dispmanx_display_open error

After making a build and then trying to run said build, this error occurs:
vc_dispmanx_display_open failed! Make sure to have hdmi_force_hotplug=1 setting in /boot/config.txt
I did as it said and added the line to the config.txt, rebooted the pi and got the same error.
please help :)

Same issue, on Raspberry Pi Zero WH. Also tried adding the hdmi_group, hdmi_mode, hdmi_cvt settings but no luck either

I take it back, I did a full reboot after modifying my config instead of just on an off again.
I also changed the resolution to a multiple of my displays (480 480) and commented out the following lines before doing so. Something worked
dtoverlay=vc4-kms-v3d
max_framebuffers=2

V3D driver seems to be the issue and
#dtoverlay=vc4-kms-v3d
does the trick


Improve a document of Yorkie ✍

Currently, we have a document of https://yorkie.dev/docs. It looks nice. But from a developer's perspective, it will be curious about how to use Yorkie quickly and easily in their project or locally. So, in my view, It would be great if we add more content. For example, tutorials(we can write down @hackerwins's youtube guide as a tutorial), benchmarks, etc.
we have some ideas regarding improving documents(https://codepair.yorkie.dev/i079j)
https://dev-yorkie.slack.com/archives/C014BTGCBJS/p1638180391085100
I think we can start one by one.

Could I try this issue?


add escaped \

in golang code it wants to have  ¯\\(ツ)/¯

"¯\_(ツ)_/¯"

Hi there, sorry for my late response. I will have a look at it sometime next week 👍

Hey @v-bus sorry for the very long wait. I finally managed to check out golang and as far as I can tell there is no need for adjustments?

import (
	"fmt"
	"sort"
	"strings"
	"time"
)

// Main function ¯\_(ツ)_/¯
func main() {
	// Sorting the given slice
	s := []int{345, 78, 123, 10, 76, 2, 567, 5}
	sort.Ints(s)
	fmt.Println("Sorted slice: ", s)

	// Finding the index
	fmt.Println("Index value: ", strings.Index("GeeksforGeeks", "ks"))

	// Finding the time
	fmt.Println("Time: ", time.Now().Unix())

}

this works just fine for me. Anything else I would have to check out? Keep in mind I have no experience at all with Go :)
Cheers

Hi! I tried it, not in comments like you did. I tried it in stout printing.
fmt.Println("¯\(ツ)/¯")
According to your answer, you never thought that it could be used in that case. That's OK for me.

Yes indeed. The only reason this extension exists at all is to leave funny comments ^^
Thanks anyway for your interest in this silly extension and have a wonderful day. I will close the issue now.


rs-measure with multi realsense

Required Info

Camera Model
D435i

Firmware Version
latest

Operating System & Version
Win 10

Platform
PC

SDK Version
latest

Language
C++

Hello.
I can't tell you concretely why I want to achieve it, but I want to try rs-measure with multi realsense camera.
In this sample, function uses state, pipeline, thread, etc... for getting frames, and calculating distance. I tried to implement those parameter with c++vector, but I couldn't execute program.
How to solve this problem?
very sorry for my poor English skills, and Thanks in advance!

One option is to run one instance of rs-measure by selecting the serial number.
https://github.com/IntelRealSense/librealsense/blob/2decb32456fc68396da2bc4de25028b1ee2d735f/include/librealsense2/hpp/rs_pipeline.hpp#L234
Another good place to check out is the box measurement examples (python) which provides good reference for the use of multi camera configuration.
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python/examples/box_dimensioner_multicam


Dropdown with multiple selection closes after selecting item (v0.9.0 Regression)

Overview of the problem
Oruga version: v0.9.0
Vuejs version: 3.5.12
OS/Browser: Windows Firefox/Brave
Description
When selecting a dropdown item in a dropdown with multiple set, the item is selected, but the dropdown closes.
Steps to reproduce

Visit https://oruga-ui.com/components/Dropdown.html and go to the Multiple example
Open the dropdown
Select any option

Expected behavior
The dropdown should remain open, to allow the selection of more items. This used to be the behavior in v0.8
Actual behavior
The dropdown closes
Fix suggestion
It appears that in commits 3e4291ac94556603543a92bd17bec2f5b8cc60db and d6b792f0850d59ea85857c8ff7a9e4db570d134a, the line at https://github.com/oruga-ui/oruga/blob/8fb6f7620351363705098897d8022e277c40c81e/packages/oruga/src/components/dropdown/Dropdown.vue#L338 was missed and should have been changed to if (!isTrueish(props.multiple)) {, similar to other references to props.multiple.

Hey @jh0ker, thanks for checking out the new version and for finding this issue!
Will be fixes soon.

Hey! I appreciate the quick response. Thank you for your work!


remove gQUIC support from Envoy

or at least make it clear it's going away fairly soon, and is not sticking around for the standard 1 year data plane SLO

We should also make sure h3-29 EoL is made clear, given it isn't expected to last a year.

We should also make sure h3-29 EoL is made clear, given it isn't expected to last a year.

What's this about?


[Addition]:

Hotspot b58 Addresses
11bRgg1ZdK6Rnunv2Va8oX9szguNw4wPm58QnnivTmkidmKMGpA
112DJEq3TbwribQSa34qvHdpvFbDA3VDvUdkjNT7LXWo7Q5h5ii1
112P28tHfvFguFBtLgJDZGMeJ8hzkSHtohMojfE59WTW9LAgekGx
11123Fx1syW2UaduZ4AKnFiLsvWCdyPjZX86gQ2vDtp8VmkCJgV
113zugNLSGcqWawEeKSgua8qCV54s5Bgks6WDUWujDVrww7UjhE
11eY42yeYpMqWT3VRYYTyCrhEguAGyEzQQf6wvdnVLYWm6hCLAs
112pA6UVMbfe8CVSpELB5vH5uVpKftsMJRVRZ9juM4ZnwDJ7pMAx
112K5n3niJW3ugDDt16D4wWYGKHtGZmwxCSsjJUA1k8qjqXMavkV
112XNPMH2JS3pL7M6NipqgVPhjgbFeTGq3PNRcUvoYysexAUvCeV
11RMNUjQs6hBdTJKmyfrbzJYyqDjvmeXA4GJgzHLi9wReuqkgJj
112KPMuX8LAk7vLEVTTupVYuUP5XEiaekXNgLsW9WXUTJJgeJgxh
Discord Handle
No response
Reason(s)
That wallet has 11 hotspots and I have evidences that several of them are in a room with filters and without antennas, have just a look to the distances each other 930 meters and how lucky the owner is. Only one of them is outside.
The antennas he declares do not even exist, 13 dbi antennas?
Fancy Vinyl Dalmatian 13 dbi
Distance
~1.7 km
Datarate
SF12BW125
RSSI
-41dBm
SNR
7.5dB
Frequency
867.9 MHz

When you say you have evidence several of the hotspots are in a room, is that something you can demonstrate here?

Those are all 980 m and all are in the same please :-):

On 20 May 2022, at 18:59, KXI1 @.***> wrote:

When you say you have evidence several of the hotspots are in a room, is that something you can demonstrate here?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.


Support Preview Instance Types

Tell us about your request
Some AWS accounts are allowlisted for new instance types before they're publicly launched.
The new types:

show up in DescribeInstanceTypes
show up in DescribeInstanceTypeOfferings
do not show up in pricing.GetProducts
are rejected by the CreateFleetAPI with PriceCapacityOptimized or LowestPrice strategies

One design option

Support preview instance types for on-demand only
Move to Prioritized allocation strategy, and order them ourselves
Shim out the price, to weigh heavily away, e.g. assume math.MaxInt32

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
I want to try new instance types with Karpenter.
Are you currently working around this issue?
Waiting for the release.
Additional Context
No response
Attachments
No response
Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

Please ensure that these instance types are in this list before using them:
https://github.com/aws/amazon-vpc-cni-k8s/blob/master/misc/eni-max-pods.txt
Otherwise instances will fail anyway...


feat: add custom_data attribute to payload-related dataclasses

Motivation
OCPP-2.0.1_part2_specification_edition2 states:

'A CustomData element exists as an optional element in the JSON schemas of all types.
CustomData is the only class in the JSON schema files that allows additional properties.
It can thus be used to add additional custom attributes to any type.'

With some more details, provided in OCPP-2.0.1_part4_ocpp-j-specification:

'Whereas the standard HeartbeatRequest has an empty body, a customized version,
that provides the value of the main meter and a count of all sessions to date,
could look like this:
{
"customData": {
"vendorId": "com.mycompany.customheartbeat",
"mainMeterValue": 12345,
"sessionsToDate": 342
}
}
A CSMS that has implemented this extension, identified by its "vendorId",
will be able to process the data.
Other CSMS implementations will simply ignore these custom properties.'

OCPP 2.0.1 specific
OCPP 1.6, for its part, does define the same concept of enabling the exchange of custom information between a CS and a CSMS, but through dedicated messages: please refer to "4.3. Data Transfer" in ocpp-1.6 edition 2.
Why not a Payload dataclass from which other payload dataclasses could inherit
I was thinking to just create a Payload dataclass, which all OCPP payloads (in ocpp.v201.call.py and ocpp.v201.call_result.py) could inherit from:
from dataclasses import dataclass, field
from typing import Any, Dict

@dataclass
class Payload:
    custom_data: Optional[Dict[str, Any]] = field(default=None, init=False)

Example:
@dataclass
class StatusNotificationPayload(Payload):
    timestamp: str
    connector_status: str
    evse_id: int
    connector_id: int

But the thing is, TMH currently uses Python>=3.7. And before Python 3.10, inheritance with dataclasses is quite messy: with the approach proposed above, as custom_data is a default argument, payload classes inheriting from Payload would require having all of their attributes defining default values, which we obviously don't want.
So, instead, I have resignated myself to modify all OCPP payloads directly to define a custom_data: Optional[Dict[str, Any]] = None attribute for each payload class in ocpp.v201.call.py and ocpp.v201.call_result.py.

Many thanks for the PR! And also many thanks for the clear description!
The tests fail, can you make sure that they pass? After that I can merge the PR.

Hey, thanks for your feedback. I pushed a change to sync the PR's head with upstream/HEAD and fix the failing test. I think you need to approve again so that GitHub Action's tests can be started again?

@OrangeTux


Twitch button in upper right leading to home page

Hello,
I love the GUI, but at first I was confused about what setting the home button did. I eventually found out that it takes you to that page when you launch the program. I think that, if implemented, clicking on the Twitch button in the upper right taking the user to their set home page would be quite handy.
Thanks!
PS: New to GitHub, not sure if I can label this as feature request or if the repository owner has that privilege.

Thanks for the suggestion!
This makes sense... Will be added.


Intel Arc support

Please add support for Intel Arc GPUs via the Intel PyTorch extensions or provide instructions on how to leverage Intel PyTorch.

Thanks, @itlackey, we will eventually be adding support for others, but those will be brought into DeepSpeed first, these are additional kernels, you will want to see the progress on the xpu and cpu accelerators in DeepSpeed and open an issue there if you have issues, thanks!


Large directories cause hang or freeze of Spyder 4.2.1

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[x] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[x] Reset preferences with spyder --reset
[x] Reinstalled the latest version of Anaconda
[x] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
On Windows 10, interacting with a cluttered directory can cause hangs that, on my laptop, freeze Spyder for several seconds or permanently.

%cd C:\cluttered\directory-magic to switch into that diretory.
Run > Run (F5) for any file located in this directory, because this switches the working directory to C:\cluttered\directory.
Once the working directory of the console is the large directory:

Saving a file, that is located in the large directory.
Autosaving of a file that is located in the large directory.
Executing any shell commands with iPython's ! prefix.
Any interaction with the file pane. In this case the delay may be so large, that Spyder is for all intents and purposes crashed.

I first observed the issue after saving a scratch script to %TEMP% which at the time container more than 11,000 entries, but the issue is reproducible with any similarly cluttered directory. Such directories can occur e.g. with simulation software.
Windows Defender (and other resident antivirus packages) can cause file-operations to be slowed down enough to make File Explorer react slowly in large directories. In this case, disabling Windows Defender didn't help.
On Linux the issue was not reproducible.
I suspect that the issue is caused by refreshing the Files pane, even if it isn't visible.
What steps reproduce the problem?
Direct demonstration. Save the following script in an empty directory, and execute it with Run > Run (F5). It should cause Spyder to hang for a long time, or crash outright. Alternatively it might just cause the same second-scale hang as other described operations.
for i in range(10000):
    with open(f"a.{i:4d}", "w") as fout:
        print(i, file=fout)

Interactive use.

Create directory C:\tmp and fill it with 10,000 files.
In Spyder, save a file as C:\tmp\a.py.
Run > Run (F5). Spyder should now hang for a moment.
File > Save (Ctrl+S). Spyder should now hang for a moment.
Seemingly randomly while editing there will be further hangs, whenever Spyder autosaves.
Open the file pane. Might become effectively unrecoverable.

What is the expected output? What do you see instead?
Not applicable.
Paste Traceback/Error Below (if applicable)
Not applicable.
Versions

Spyder 4.2.1
Python 3.8.5 64-bit
Qt 5.12.10
PyQt5 5.12.3
Windows 10 Version 2004 (OS Build 19041.804)

Dependencies
# Mandatory:
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  4.0.0 (OK)
cloudpickle >=0.5.0             :  1.6.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree >=3.0.2            :  3.1.0 (OK)
IPython >=7.6.0                 :  7.20.0 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  3.2.0 (OK)
keyring >=17.0.0                :  22.0.1 (OK)
nbconvert >=4.0                 :  6.0.7 (OK)
numpydoc >=0.6.0                :  1.1.0 (OK)
paramiko >=2.4.0                :  2.7.2 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.8.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.8.0 (OK)
pygments >=2.0                  :  2.7.4 (OK)
pylint >=1.0                    :  2.6.0 (OK)
pyls >=0.36.2;<1.0.0            :  0.36.2 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.3.0             :  0.3.0 (OK)
qdarkstyle >=2.8                :  2.8.1 (OK)
qtawesome >=0.5.7               :  1.0.1 (OK)
qtconsole >=5.0.1               :  5.0.2 (OK)
qtpy >=1.5.0                    :  1.9.0 (OK)
rtree >=0.8.3                   :  0.9.4 (OK)
setuptools >=39.0.0             :  52.0.0.post20210125 (OK)
sphinx >=0.6.6                  :  3.4.3 (OK)
spyder_kernels >=1.10.1;<1.11.0 :  1.10.1 (OK)
textdistance >=4.2.0            :  4.2.1 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog >=0.10.3               :  1.0.2 (OK)
zmq >=17                        :  20.0.0 (OK)

# Optional:
cython >=0.21                   :  0.29.21 (OK)
matplotlib >=2.0.0              :  3.3.2 (OK)
numpy >=1.7                     :  1.19.2 (OK)
pandas >=1.1.1                  :  1.2.1 (OK)
scipy >=0.17.0                  :  1.6.0 (OK)
sympy >=0.7.3                   :  1.7.1 (OK)
\0

Closing this as a duplicate of https://github.com/spyder-ide/spyder/issues/10081

I am running Spyder 5.4.0 in Ubuntu 20.04 under WSLg (Windows System for Linux).  When the IDE accesses a large directory (e.g. 10000 to 30000 files) it hangs for a long time, even if no file operations are requested.  The issue that this was linked to as a duplicate seems to me to be a different issue.

@eafpres, what do you exactly mean by

When the IDE accesses a large directory

? You mean when you set such directory in the Files pane?

@eafpres, what do you exactly mean by

When the IDE accesses a large directory

? You mean when you set such directory in the Files pane?

suppose my console in Spyder is currently pointing to '/mnt/c/analytics'
I execute os.listdir() in the console:
In [14]: os.listdir()
Out[14]:
['.git',
 '.gitignore',
 '.spyproject',
'code'',
 'data',
 'models',
 'reports']

now suppose in data there are 25,000 image files
if, either in the console or in code, I navigate to that folder
os.chdir('data')

In the console, it will hang for 10s of seconds or more.  Can neither scroll or enter into the console, or work in the code pane or any other pane. This occurs even if file pane is not open.
In code, if I run it, it executes normally but upon completion the same behavior occurs in the UI.

@eafpres could you deactivate the Files plugin and check again? (for that go to Preferences > Plugins > Internal plugins and uncheck File) The thing is that even if the pane is not visible the plugin is still loaded and could be trying to create/load the model that represents the directory you are chaging your wroking directory on the console.
Let us know if disabling the Files plugin helps!

Agreed, that should solve your problem @eafpres.

@eafpres could you deactivate the Files plugin and check again? (for that go to Preferences > Plugins > Internal plugins and uncheck Files) The thing is that even if the pane is not visible the plugin is still loaded and could be trying to create/load the model that represents the directory you are chaging your working directory on the console.
Let us know if disabling the Files plugin helps!

I confirm this resolves my issue.


Timer page : If presenter notes are empty it doesn't allow you to go back to the description

make an activity with no notes
start studio
touch show notes
try to get back to description
works fine if it has notes

fixed


Javadoc generation for record components is broken

Currently, javadoc is generated like this:
/** Response Data with details of the user's application */
public record GetApplicationDetailsResponse(
    /** MIME-Typ of referenced schema */
    @Values(values = {"application/xml"}) @JsonProperty("mime_type") String mimeType,
) {}

IntelliJ IDEA marks the (intended) Javadoc of mimeType with a warning "Dangling Javadoc comment" - and I just learned that the IDE is correct. The standard Doclet does not generate documentation from that.
The generator should use @param tags at the class level:
/**
 * Response Data with details of the users application
 *
 * @param mimeType MIME-Typ of referenced schema
 */
public record GetApplicationDetailsResponse( ...

some more examples https://github.com/openjdk/valhalla/tree/lworld/test/langtools/jdk/javadoc/doclet/testRecordTypes/examples
Thanks for reporting :-)


consider how reference labels should be chosen / selected for ml routines

There's a couple over-arching things we'd like to make easily configurable:

Given a categorical variable x with some labels yes, no, etc., we should provide some mechanism for mapping labels to dummy variable names; e.g. the column such that x == "yes" is called RespondedYes, or something to that effect. This is primarily to allow for nicer model / summary output.
We should provide some mechanism for allowing users to configure what level should be considered the reference label, for categorical variables. Normally, for R, this is done just by encoding the variable as a factor, with the first level implicitly acting as the reference label.

For 1., I think we could allow the user to supply a list of mappings for these generated names, e.g.
metadata = list(
  x = list(
    reference = "no",
    mapping = list(
      yes = "RespondedYes"
    )
  )
)
data_tbl %>% ml_linear_regression(y ~ x, metadata = metadata)

And we could provide helpers for constructing that metadata -- although it's a bit verbose, it should provide what we need.

Any update about how to assign the reference level, like the relevel function in R and H2O? Thx!

@Jiang-Li this is a little tricky since it's not natively supported in Spark – in fact, Spark 2.3.0 will only support setting reference level by frequency or alphabetically. However, I'll make a note to look at this as part of the ML refactoring that's in progress. There might be a way to tweak column metadata cleanly.

Closing this as wontfix since it's a Spark limitation and I'd rather not add features that won't be compatible with pipelines. Hopefully this isn't too big of an issue (e.g. one can always recompute relativities for GLMs after getting the fitted results.)


Performances questions

I would like to increase the performances of my android application because the rendering is a bit slow.
What can i do to optimize the page loading speed ?
Is it possible to use an unzipped epub instead of an archive ?
Is there any recommandations on how to create the epub file in order to have the best reading performances ?

Hi @Twibit I assume your main target platform is Android? (judging by the bug report about the 1-second page loading delay: https://github.com/readium/SDKLauncher-Android/issues/52 )
Irrespective of your target platform, ReadiumSDK is primarily designed and tested to process EPUB publications directly from the zip archive (on-the-fly inflate / decompression). You might be able to refactor the architecture (e.g. abstract the filesystem access API), but I'm not sure that the implementation costs would justify the benefits. In other words, I don't think that "live unzipping" is cause for any serious performance bottleneck.
On the application level, an HTTP server is used to supply content resources to the WebView. Although this is required for audio/video streaming (byte range support), strictly-speaking other types of assets can be served via a URL request interception, or another URL scheme handler (protocol). However, I very much doubt that this would make a substantial difference.
Now, what about the WebView itself? With reflowable documents, there is an initial reset of the CSS font size (to match user preferences) which requires potentially-costly DOM mutations. Perhaps disabling the code in UpdateHtmlFontSize would help?
https://github.com/readium/readium-shared-js/blob/develop/js/helpers.js#L99
Do you observe slow rendering with pre-paginated / fixed-layout EPUBs too?
Thanks!

@Twibit:  Seems like a really good first approach would be to try and profile some of your typical EPUBs.
http://stackoverflow.com/questions/3871311/how-can-i-profile-my-android-app
http://developer.android.com/tools/debugging/debugging-tracing.html
This would constitute an awesome contribution to Readium, BTW.

I'm on Android but we are working on multiple platforms.
Our performance issue occurs when we have an epub containing more than 10k files (because of  HTML5 animations). It is slow even if the page to load is a simple image (FL).
I have modified the HTTP server to supply files from an unzipped directory instead of the epub file and it is two time faster than from the archive. The drawback is that i need a lot more disk space (epub + unzipped files).

@twibit Hm.  Might it make sense to create a tool that merges the HTML5 animations so they aren't separate files?  But perhaps that is impractical (not knowing a thing about your EPUBs).  Is it possible to share one of your EPUBs?

I don't produce any epub so i can't make optimisations... And I can't share it.
But the problem seems to be related to the number of file.
Access times are good with a 800Mo epub with few but large files.

Ah, great number of files, that makes more sense to me now. Despite the lack of "real" network latency in the local HTTP server (ping), there is of course a cost overhead in each established connection.

Hm.  Hate to say this, but it may turn out that this is simply a case of bad practice by the publisher.  Ultimately, one can always produce an EPUB (or PDF) that performs poorly.  How does iBooks perform with these EPUBs on the iPad?

I've seen many fixed-layout / prepaginated EPUBs exported from InDesign with tons of duplicated files for each HTML spine item (FXL page), and lots of framework Javascript code (like Adobe Edge).

@danielweck Yeah, that is probably one of those. But the bad access times occurs even if we load a single file.
@rkwright I don't know but it works fine with readium-js-viewer on a Surface Pro

@Twibit oh sure, single zipped EPUB file, but many distinct HTTP requests behind the scenes, one for each WebView resource. Also, I wonder about the libzip I/O cost each time a file handle is opened/closed. I guess it depends on the target platform.

@Twibit you mentioned readium-js-viewer, but do you mean Chrome extension (i.e. already-expanded EPUBs), or cloud reader (i.e. either already-unzipped EPUBs, or still-compressed EPUB archives)?
In the case of cloud reader with zipped EPUBs, the default ZIP "file system" prototype is extended with support for HTTP byte range requests:
https://github.com/readium/readium-js/blob/develop/lib/zip-fs.js#L488

@danielweck No ! The page i'm displaying is composed of a simple HTML file and a background image (2 HTTP requests). For the same page in an epub containing 100 other file, or in an epub containing 10k+ files, the data access time is different.
I was talking about the chrome extension embeded in a windows store app (already-expanded EPUBs so there isn't any access time problem).

@Twibit okay that's interesting. This suggests a performance issue in the libzip library then (fseek?). I wonder if the libzip update made by LearningAlly (Tom McCartney's team) brings benefits other than support for large media files?

Note that I did NOT integrate the new LibZip.  It IS integrated into the master branch version of the Windows Launcher. That branch includes the whole readium-sdk repo - not as a submodule.  So there is still a task to take the work that LA did there and replace the version that is in mainline readium-sdk.  I took a quick look when I did the initial work to replace it with submodules, but it was clear it wasn't going to be a trivial copy and past operation.
A volunteer would be welcome.

This issue seems resolved (based on the discussion thread). I am sure there is plenty of scope for further performance improvements (notably in terms of page rendering / font-loading latency, etc.), but for that we need more concrete / narrow problem descriptions. Let's close this issue, feel free to open new ones.


UI Changes

Would be nice to experiment with the folllowing things:

Hashtags/searches
Permalinking
Rich previews for permalinks (Dynamic preview can be done in SSR)
SSR
Markdown preview for editor
Color in the UI

want to convert these to a single individual issues?
right now we have the:

Search
rich text editor (markdown preview)

no premallinking - this is good to have for sharing
i dont understand whats SSR
maybe we can put the "color in UI" on hold.

close this ticket, because its duplicated in Unirep Social, some of items are already implemented.


Update to Bevy 0.15, Rapier 0.28, Avian 0.2

This PR updates Qevy to be compatible with the latest Bevy, Avian and Rapier versions

This is based off of #12 so it makes sense to merge that one first;
As bundles are now deprecated in favor of required components, this PR replaces all uses of bundles,  migrates both Map and BrushEntity to use #[require(Transform, Visibility)], and deprecates MapBundle.
As Handle<T> is no longer a component, this PR replaces all uses of that with the wrapped forms (Mesh3d, MeshMaterial3d)
We properly handle the newly introduced PartialReflect trait, by downcasting to Reflect where needed;
Avian 0.2 is not out yet, though it should be out soon with very few, if any changes, so this is using the latest main commit (c767b01) for now. Might make sense to wait for the version to be out before merging this, your call;
Updates some imports to use types that were extracted to bevy_image;
Rapier migrated Res<RapierContext> to ReadDefaultRapierContext as it now supports multiple physics worlds, we update the code to use that.

ah i was just about to submit a pr upgrading to 0.15 and 0.28 but you beat me to the punch!

Ouch, I hope I didn't actually duplicate your time/effort updating things 😕


Imported account doesn't have ether, but should

Imported account from a testnet that have non-0 balance, doesn't shoe any ethers.
Note: Remote geth was used
wallet.txt

Remote testnet is currently not supported. Am I understanding the problem correctly?


Schedule date not working as expected

I'm trying to use this plugin to set up daily reminders for the user. The user can choose the time of the reminder then the app schedules the notification with 'day' interval. I was trying to create the date object like this:
const date = new Date();
date.setHours(15, 0); // actually it's a variable with the value the user set

The problem is that when I console.log the date, it shows the right hour/minute but in the wrong timezone (UTC), when the device (in this case an Android Emulator) is actually running with GMT -3 timezone (America/Sao_Paulo).
In any case, I tried to set up the notification to see what happens, but the notification won't show. I tried in a lot of different ways, using Unix time, using moment, moment-timezone, but each time I tried it would not give the right result.
The question I would ask here is: how to handle timezones when scheduling the notification?
But, I tried using the demo this repository provides, where it schedules the notification to 5 seconds from now using this:
new Date(new Date().getTime() + (5 * 1000));

And guess what? It doesn't show after 5 seconds, but after like 2 minutes. I also tried using different values (like 3-5 minutes), but they also show at the wrong time. This made me think that maybe whatever causing this is also related to the timezone problem I'm having.
In any case, any help on this would be very appreciated.
PS: Tested only on Android

Any help on this?

I have the same problem, cant find a solution.

Delete interval and it works...

Delete interval and it works...

I ended up using a server-side solution, but as far as I remember I didn't set a value for interval.


Close ContextMenu, AlertDialog on Esc key by default

Native context menus and alert dialogs usually close if we press Esc key.
P.S. should we close DropdownMenu too?

Fixed in 1.0.0-rc5

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


New Example Benchmark - Human Activity Recognition task

Upload the Human Activity Recognition task including

dataloader
example file
task metrics
training with lightning PyTorch

Human activity recognition task has been added


refactor: move plugin/fieldpath to api/

move the plugin/fieldpath to api/, so that api directory is independent of rest of the containerd module

/test all

/cc @dmcgowan

Manually tested if its breaking compatibility with older client by :

building and running containerd from the PR branch which uses modified protos
running the sample code for redis-container from here , which uses the module from main branch that uses old protos.


Add JaroSimilarity function

There is already a UDF for JaroWinklerSimilarity, so would be great to have an option for Jaro as well

closing as this is now implemented and in the main branch


Added submenu

I added submenu for Linux. Sorry. Later I'll try to add icons

That's a good start, thanks! I would try to make it in a recursive manner, though (now submenus are limited to one level only and have no checked state support etc). Also probably it would be possible to reuse the same callback for "activate" signal.

@zserge   "a recursive manner"  I thought as much:)  I'll do a recursive. Thanks for reply.

Hello. I redid all.

That's much better, well done! May I ask you to use clang-format tool to re-format the code to be consistent (default settings should work fine, the original code was formatted like that). Also I'd recommend to remove the commented-out block in example.c (lines 48..65) as it doesn't bring any sense to the example. Then I'd be happy to merge it.

Update.   I hope I did the right.

I've simplified it a little bit and added implementations for winapi and macos. Congratulations, sub-menus are now done!


Create new temporary tsconfig.json file instead of updating

Updating original tsconfig.json while nestia on running is very dangerous.
Therefore, create new temporary configuration file, instead.

Not possible, ts-node be broken when configuring specific tsconfig.json file.


Keep track of the cursor position in TextSelection

When a TextSelection is collapsed (i.e. baseOffset == extentOffset) then it represents a cursor position. When it's not collapsed, it represents a selection range.
In the selection range state, we don't have the following piece of info:

On which end of the range is the cursor supposed to be?

This becomes handy when a piece of text is selected and the user hits Shift+LeftArrow. If we don't know which end the cursor is on, we can't decide whether to expand the selection to the left, or shrink it from the right.
cc @gspencergoog @yjbanov

The cursor sits at base offset. Extent offset is the value that changes while selection is ongoing.

From the docs for TextSelection.extentOffset

The offset at which the selection terminates.
When the user uses the arrow keys to adjust the selection, this is the value that changes. Similarly, if the current theme paints a caret on one side of the selection, this is the location at which to paint the caret.
Might be larger than, smaller than, or equal to base.

I guess this was solved with the reply from @shyndman. So I close this now.


Migration from snowflake_role_grants to snowflake_grant_account_role

Terraform CLI and Provider Versions
Terraform v1.5.5
on windows_amd64

provider registry.terraform.io/hashicorp/aws v5.44.0
provider registry.terraform.io/snowflake-labs/snowflake v0.88.0

Terraform Configuration
terraform {
  required_version = ">= 1.1.1"

  cloud {
    hostname     = "backend.api.env0.com"
    organization = "xxxxx"

    workspaces {
      name = "x"
    }
  }

  required_providers {
    snowflake = {
      source  = "Snowflake-Labs/snowflake"
      version = "= 0.88.0"
    }
  }
}

Expected Behavior
The snowflake_role_grants resource is destroyed and the snowflake_grant_account_role resource is created and in good state in the target snowflake account.
Actual Behavior
The destroy of the snowflake_role_grants resource and the create of the snowflake_grant_account_role start executing at the same time in Snowflake upon apply. The destroy completes after after the create. Due to this timing and lack of sequential flow the resource the end result is the create is as if it never happened.

Steps to Reproduce

Remove snowflake_role_grants resource from .tf file
Add snowflake_grant_account_role resource to .tf file
run terraform plan
run terraform apply

How much impact is this issue causing?
High
Logs
No response
Additional Information
We have thousands of snowflake_role_grants instances that need to be replaced. We don't have a clear understanding what the migration pattern should be for deprecated resources like this. I know I am over simplifying this but it would seem to me that it would work fine if the destroy and create operations were not asynchronous and the destroy finished before create executed.

Hey hey 👋
Afaik, that's more of a Terraform issue than the provider one, but I already had a similar issue you can look at (here). The result of that conversation was a migration guide we wrote here. It describes how you can migrate from deprecated resources to the new ones with "no downtime" approach, meaning nothing will be destroyed/revoked on the snowflake side. I also suggest automating it with a simple script to e.g. generate import blocks, it should pay off when you have thousands of roles. Removing the deprecated resources and replacing them with new ones in the second terraform apply would also work, but that would revoke any grants from them and would create a downtime until new roles are created.

Hey @sfc-gh-jcieslak, thanks for the reply and the resources this is helpful. It's going to be bit of work for us since we have about 3000 resources that need to be replaced across multiple internal/local modules. Either way, your info confirms one of the approaches I was thinking about after my original post. Thanks again!


Add SOAP Transport functionality to the "Check" feature in organization receiver settings on admin panel

Problem statement
The "Check" feature does not work with receivers that use SOAP as a transport mechanism.
What you need to know

...

Acceptance criteria

[ ] "Check" feature successfully tests connection for receivers that use SOAP transport in staging
[ ] "Check" feature successfully tests connection for receivers that use SOAP transport in production
[ ] Test the feature with a SOAP transport receiver in staging and production

There are only two SLTLs that use SOAP Transport.  They don't want us to keep checking their server alive since it will degrade their server performance.  Therefore, we will not include the checking feature for SOAP STLTs.  I am closing the ticket.