Some big changes for a potential Version 4 (windows support and better testing)

Hello there,
I really like your project ant wanted to contribute. This is more of a Disskussion PR that should probaply target a development branch, but since I can't create new branches here we go.
addidtions
I cleand up the windows side of the code and made it work consistently with the behavior on the linux side. For that I also had to chage a few small things in the Linux functions.
I than went ahead and upgraded the testing system. For the windows side I creaded a number of testcases covering all printable character and all currently supported special keys (Arrow-keys, F-keys, etc.).
On the Linux side I hit a wall and can only get the tests to work localy, not on GitHub. Maybe someone else can fix that?
I also cleand out the repo, removing (hopefully) not needed files and improving the makefile.
drawbacks
The Linuxside ist still mostly untested and not automated. While I copyed most of the code from the current version, I am not that versed with Linux.
Because windows uses some scancodes that can't be utf-8 encoded directly, I have to do the byte->str conversion manually. This however uses function not present in python 2.7, so I doped that for now. It is probably possible to make this work with 2.7 as well, but I didn't want to waste time on it until I have feedback if this is desirable.
While the libary should be mostly compatible with the current version, there are a few bigger changes that my break compatibilyty with some older projects.

Hi there!
I like the approach and the idea to launch a version 4.
Sadly there are other things that could be done first. I will try to do them this weekend.

Please, rebase master. I've updated some of the tooling and workflows.

I will rebase and add your suggstions and update the PR as soon as possible. Thanks for taking a look at it

@magmax I updated the PR. Take a look when you have the time.

Through brief testing, the changes made do resolve the issues  I was experiencing with version 3.0.5.
I second that this should be Pulled into Main and bundled with a new release.

To fix the linux tests you can use this conftest.py:
import pytest
import sys
import select
import termios
import tty
import readchar.read_linux as read_linux

# ignore all tests in this folder if not on linux
def pytest_ignore_collect(path, config):
    if not sys.platform.startswith("linux"):
        return True

@pytest.fixture
def patched_stdin():
    class mocked_stdin:
        buffer = []

        def push(self, string):
            for c in string:
                self.buffer.append(c)

        def read(self, n):
            string = ""
            for i in range(n):
                string += self.buffer.pop(0)
            return string

    def mock_tcgetattr(fd):
        return None

    def mock_tcsetattr(fd, TCSADRAIN, old_settings):
        return None

    def mock_setraw(fd):
        return None

    def mock_kbhit():
        return True

    mock = mocked_stdin()
    with pytest.MonkeyPatch.context() as mp:
        mp.setattr(sys.stdin, "read", mock.read)
        mp.setattr(termios, "tcgetattr", mock_tcgetattr)
        mp.setattr(termios, "tcsetattr", mock_tcsetattr)
        mp.setattr(tty, "setraw", mock_setraw)
        mp.setattr(read_linux, "kbhit", mock_kbhit)
        yield mock

We have only 3 failing tests then (I removed all skips)

Ah all the test_functionKeys fail too:
❯ pytest
============================================================================================================= test session starts ==============================================================================================================
platform linux -- Python 3.10.4, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/daniel/Desktop/other_repos/python-readchar, configfile: setup.cfg, testpaths: tests
plugins: cov-3.0.0, Faker-12.1.0, typeguard-2.13.3
collected 134 items

tests/linux/test_keys.py ....
tests/linux/test_readchar.py ...........................................................................................................
tests/linux/test_readkey.py .....F...FFFFFFFFFFFFFF

=================================================================================================================== FAILURES ===================================================================================================================
______________________________________________________________________________________________________ test_specialKeys[\x1b[2~-\x1b[2~] _______________________________________________________________________________________________________

seq = '\x1b[2~', key = '\x1b[2~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f77280>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            ("\x1b\x5b\x32\x7e", key.INSERT),
            ("\x1b\x5b\x33\x7e", key.SUPR),
            ("\x1b\x5b\x48", key.HOME),
            ("\x1b\x5b\x46", key.END),
            ("\x1b\x5b\x35\x7e", key.PAGE_UP),
            ("\x1b\x5b\x36\x7e", key.PAGE_DOWN),
        ],
    )
    def test_specialKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1b[2~' == '\x1b[2'
E         -
E         +
E         ?    +

tests/linux/test_readkey.py:38: AssertionError
______________________________________________________________________________________________________ test_specialKeys[\x1b[5~-\x1b[5~] _______________________________________________________________________________________________________

seq = '\x1b[5~', key = '\x1b[5~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f5faf0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            ("\x1b\x5b\x32\x7e", key.INSERT),
            ("\x1b\x5b\x33\x7e", key.SUPR),
            ("\x1b\x5b\x48", key.HOME),
            ("\x1b\x5b\x46", key.END),
            ("\x1b\x5b\x35\x7e", key.PAGE_UP),
            ("\x1b\x5b\x36\x7e", key.PAGE_DOWN),
        ],
    )
    def test_specialKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1b[5~' == '\x1b[5'
E         -
E         +
E         ?    +

tests/linux/test_readkey.py:38: AssertionError
______________________________________________________________________________________________________ test_specialKeys[\x1b[6~-\x1b[6~] _______________________________________________________________________________________________________

seq = '\x1b[6~', key = '\x1b[6~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f76d40>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            ("\x1b\x5b\x32\x7e", key.INSERT),
            ("\x1b\x5b\x33\x7e", key.SUPR),
            ("\x1b\x5b\x48", key.HOME),
            ("\x1b\x5b\x46", key.END),
            ("\x1b\x5b\x35\x7e", key.PAGE_UP),
            ("\x1b\x5b\x36\x7e", key.PAGE_DOWN),
        ],
    )
    def test_specialKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1b[6~' == '\x1b[6'
E         -
E         +
E         ?    +

tests/linux/test_readkey.py:38: AssertionError
_______________________________________________________________________________________________________ test_functionKeys[\x1bOP-\x1bOP] _______________________________________________________________________________________________________

seq = '\x1bOP', key = '\x1bOP', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f5fc70>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bOP' == '\x1bO'
E         -
E         + P
E         ?   +

tests/linux/test_readkey.py:60: AssertionError
_______________________________________________________________________________________________________ test_functionKeys[\x1bOQ-\x1bOQ] _______________________________________________________________________________________________________

seq = '\x1bOQ', key = '\x1bOQ', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f768c0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bOQ' == '\x1bO'
E         -
E         + Q
E         ?   +

tests/linux/test_readkey.py:60: AssertionError
_______________________________________________________________________________________________________ test_functionKeys[\x1bOR-\x1bOR] _______________________________________________________________________________________________________

seq = '\x1bOR', key = '\x1bOR', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f764a0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bOR' == '\x1bO'
E         -
E         + R
E         ?   +

tests/linux/test_readkey.py:60: AssertionError
_______________________________________________________________________________________________________ test_functionKeys[\x1bOS-\x1bOS] _______________________________________________________________________________________________________

seq = '\x1bOS', key = '\x1bOS', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f767d0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bOS' == '\x1bO'
E         -
E         + S
E         ?   +

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO15~-\x1bO15~] _____________________________________________________________________________________________________

seq = '\x1bO15~', key = '\x1bO15~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f74310>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO15~' == '\x1bO'
E         -
E         + 15~

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO17~-\x1bO17~] _____________________________________________________________________________________________________

seq = '\x1bO17~', key = '\x1bO17~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f750f0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO17~' == '\x1bO'
E         -
E         + 17~

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO18~-\x1bO18~] _____________________________________________________________________________________________________

seq = '\x1bO18~', key = '\x1bO18~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f76590>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO18~' == '\x1bO'
E         -
E         + 18~

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO19~-\x1bO19~] _____________________________________________________________________________________________________

seq = '\x1bO19~', key = '\x1bO19~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f779d0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO19~' == '\x1bO'
E         -
E         + 19~

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO20~-\x1bO20~] _____________________________________________________________________________________________________

seq = '\x1bO20~', key = '\x1bO20~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f775e0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO20~' == '\x1bO'
E         -
E         + 20~

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO21~-\x1bO21~] _____________________________________________________________________________________________________

seq = '\x1bO21~', key = '\x1bO21~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f74100>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO21~' == '\x1bO'
E         -
E         + 21~

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO23~-\x1bO23~] _____________________________________________________________________________________________________

seq = '\x1bO23~', key = '\x1bO23~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f74d00>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO23~' == '\x1bO'
E         -
E         + 23~

tests/linux/test_readkey.py:60: AssertionError
_____________________________________________________________________________________________________ test_functionKeys[\x1bO24~-\x1bO24~] _____________________________________________________________________________________________________

seq = '\x1bO24~', key = '\x1bO24~', patched_stdin = <conftest.patched_stdin.<locals>.mocked_stdin object at 0x7fa779f76ad0>

    @pytest.mark.parametrize(
        ["seq", "key"],
        [
            (key.F1, "\x1b\x4f\x50"),
            (key.F2, "\x1b\x4f\x51"),
            (key.F3, "\x1b\x4f\x52"),
            (key.F4, "\x1b\x4f\x53"),
            (key.F5, "\x1b\x4f\x31\x35\x7e"),
            (key.F6, "\x1b\x4f\x31\x37\x7e"),
            (key.F7, "\x1b\x4f\x31\x38\x7e"),
            (key.F8, "\x1b\x4f\x31\x39\x7e"),
            (key.F9, "\x1b\x4f\x32\x30\x7e"),
            (key.F10, "\x1b\x4f\x32\x31\x7e"),
            (key.F11, "\x1b\x4f\x32\x33\x7e"),
            (key.F12, "\x1b\x4f\x32\x34\x7e"),
        ],
    )
    def test_functionKeys(seq, key, patched_stdin):
        patched_stdin.push(seq)
>       assert key == readkey()
E       AssertionError: assert '\x1bO24~' == '\x1bO'
E         -
E         + 24~

tests/linux/test_readkey.py:60: AssertionError

---------- coverage: platform linux, python 3.10.4-final-0 -----------
Name                       Stmts   Miss  Cover
----------------------------------------------
readchar/__init__.py           9      4    56%
readchar/key_linux.py         60      0   100%
readchar/key_windows.py       31     31     0%
readchar/read_linux.py        30      3    90%
readchar/read_windows.py      13     13     0%
----------------------------------------------
TOTAL                        143     51    64%

=========================================================================================================== short test summary info ============================================================================================================
FAILED tests/linux/test_readkey.py::test_specialKeys[\x1b[2~-\x1b[2~] - AssertionError: assert '\x1b[2~' == '\x1b[2'
FAILED tests/linux/test_readkey.py::test_specialKeys[\x1b[5~-\x1b[5~] - AssertionError: assert '\x1b[5~' == '\x1b[5'
FAILED tests/linux/test_readkey.py::test_specialKeys[\x1b[6~-\x1b[6~] - AssertionError: assert '\x1b[6~' == '\x1b[6'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bOP-\x1bOP] - AssertionError: assert '\x1bOP' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bOQ-\x1bOQ] - AssertionError: assert '\x1bOQ' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bOR-\x1bOR] - AssertionError: assert '\x1bOR' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bOS-\x1bOS] - AssertionError: assert '\x1bOS' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO15~-\x1bO15~] - AssertionError: assert '\x1bO15~' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO17~-\x1bO17~] - AssertionError: assert '\x1bO17~' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO18~-\x1bO18~] - AssertionError: assert '\x1bO18~' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO19~-\x1bO19~] - AssertionError: assert '\x1bO19~' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO20~-\x1bO20~] - AssertionError: assert '\x1bO20~' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO21~-\x1bO21~] - AssertionError: assert '\x1bO21~' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO23~-\x1bO23~] - AssertionError: assert '\x1bO23~' == '\x1bO'
FAILED tests/linux/test_readkey.py::test_functionKeys[\x1bO24~-\x1bO24~] - AssertionError: assert '\x1bO24~' == '\x1bO'
======================================================================================================== 15 failed, 119 passed in 1.00s ========================================================================================================

very good. I will incorperate this into this PR in the next few days.
Most of the Linux code I just copied over from the current version and tried my best to make it a little more dynamic (while having mostly no idea if it is acually a good aproach). So if you have suggestions on how to make this better, feel free to leave them here as well.

this read_linux.py fixes all tests:  I changed line 44, 48, 52 to scan longer scan codes and added 55-57 so we can scan the codes for F5-510 (they have 5 parts)
# -*- coding: utf-8 -*-
import sys
import termios
import tty
import select

# idea from:
# https://repolinux.wordpress.com/2012/10/09/non-blocking-read-from-stdin-in-python/
# Thanks to REPOLINUX
def kbhit():
    return sys.stdin in select.select([sys.stdin], [], [], 0)[0]

# Initially taken from:
# http://code.activestate.com/recipes/134892/
# Thanks to Danny Yoo
def readchar(blocking=False):
    if not blocking and not kbhit():
        return None
    fd = sys.stdin.fileno()
    old_settings = termios.tcgetattr(fd)
    try:
        tty.setraw(sys.stdin.fileno())
        ch = sys.stdin.read(1)
    finally:
        termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
    return ch

def readkey():
    """Get a single character on Linux. If an escaped key is pressed, the
    following characters are read as well (see key_linux.py)."""

    c1 = readchar(blocking=True)

    if c1 == "\x03":
        raise KeyboardInterrupt

    if c1 != "\x1B":
        return c1

    c2 = readchar(blocking=True)
    if c2 not in ["\x4F", "\x5B"]:
        return c1 + c2

    c3 = readchar(blocking=True)
    if c3 not in ["\x31", "\x32", "\x33", "\x35", "\x36"]:
        return c1 + c2 + c3

    c4 = readchar(blocking=True)
    if c4 not in ["\x30", "\x31", "\x33", "\x34", "\x35", "\x37", "\x38", "\x39"]:
        return c1 + c2 + c3 + c4

    c5 = readchar(blocking=True)
    return c1 + c2 + c3 + c4 + c5

pytest
================================================ test session starts ================================================
platform linux -- Python 3.10.4, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/daniel/Desktop/other_repos/python-readchar, configfile: setup.cfg, testpaths: tests
plugins: cov-3.0.0, Faker-12.1.0, typeguard-2.13.3
collected 134 items
tests/linux/test_keys.py ....
tests/linux/test_readchar.py ...........................................................................................................
tests/linux/test_readkey.py .......................
---------- coverage: platform linux, python 3.10.4-final-0 -----------
Name                       Stmts   Miss  Cover
readchar/init.py           9      4    56%
readchar/key_linux.py         60      0   100%
readchar/key_windows.py       31     31     0%
readchar/read_linux.py        33      4    88%
readchar/read_windows.py      13     13     0%
TOTAL                        146     52    64%
================================================ 134 passed in 0.53s ================================================

I also tested the codes via manual input with a short script :D they work now ^^ It's funny that they never worked before :DD but I also only used the Arrow keys and Enter/Space Keys till now.

Backspace is on linux 0x7f see http://www.macfreek.nl/memory/Backspace_and_Delete_key_reversed
this can also be chagned

CTRL_A  to CTRL_Z codes are the same on windows as in linux.

That sounds very good. If you want to you can open a PR on my fork and 7 can push to this PR from there. That we can also keep diskussing there and stop kluttering this PR :)

in init.py all should be a list of strings
__all__ = ["readchar", "readkey", "key"]
I can do a fork and do the PR, but I'm happy to leave that to you as well. I have now simply taken over your PR already completely in my project, so I have no hurry.

I do not mind :D I have enough other things to do :)
I only looked at this so that my project runs under Windows again :D But most of the work came from you, I just debugged it a few times :D So all good. I didn't change more than I wrote (you can see that here: https://github.com/C0D3D3V/Moodle-Downloader-2/tree/main/moodle_dl/utils/readchar).
So take your time and then add it to the PR

PR is send to your master :D sorry I was stupid xD could have done that in first place

@magmax This now also contains working and extensive tests for the Linux side, so I would consider it ready.
I hope you find the time soon to review and merge this. Here is a changelog to make it easyser to rewiev:
Changelog
fixes:

windows now returns strings instead of bytestrings, same as on linux
windows now supports most special characters
swaped LF and CR, as per #69
windows actually returns CR on ENTER, so the ENTER variable now points to the appropriate existing variable
all should return a list of strings
BACKSPACE code for linux

removed

removed python 2.7, 3.4, 3.5 and pypy support

changed

general cleanup of config and settings files (combining as much as possible to reduce clutter)
bump precommit-hook versions
simplyfied .yamellinter.yaml

added

extensive testing for both windows and linux
automated workflow that runs the test on both platforms
more keycodes for windows
add end-of-line-fixer to pre-commit

You should add the check for darwin
elif sys.platform == "darwin":
macos should also use the linux readchar

good idea and it all the tests semm to pass: https://github.com/Cube707/python-readchar/runs/6272490957?check_suite_focus=true
But I would also like some to test it manually a little. Do you have a Mac? I don't and I would like to not have to set up a VM for that...

Nope I also have no Mac :D
I only became aware of it because one of my users complained: https://github.com/C0D3D3V/Moodle-Downloader-2/issues/143
but i'm still waiting to see if it works for him :D though i only use a small subset of the keys in my project.

I just realised that my flatmate has a Mac. I will ask him and test it a bit later.

Notes for Mac:

ENTER is \r
F5 \x1b[15~
F6 \x1b[17~
F7 \x1b[18~
F10 \x1b[21~
F12 \x1b[24~

import readchar

want_exit = True
while True:
    readed_key = readchar.readkey()
    found_key_name = None
    for known_key_name in vars(readchar.key):
        known_key = getattr(readchar.key, known_key_name)
        if known_key == readed_key:
            found_key_name = known_key_name
            break
    if found_key_name is None:
        print(f"Key not in Keylist: '{readed_key}'")
    else:
        print(f"You pressed: {found_key_name}")

    if readed_key == readchar.key.CTRL_C and want_exit:
        exit(0)
    elif readed_key == readchar.key.CTRL_C and not want_exit:
        want_exit = True
        print(f"Press {found_key_name} again to exit")
    elif want_exit:
        want_exit = False

I made this little script for testing. F5 to F12 also do not work on linux, but Enter works

Also Ctr+C raises a KeyboardInterrupt, the old version did not.

The Hex codes for f5 to f12 are wrong, they should be:
F5 = "\x1b\x5b\x31\x35\x7e"
F6 = "\x1b\x5b\x31\x37\x7e"
F7 = "\x1b\x5b\x31\x38\x7e"
F8 = "\x1b\x5b\x31\x39\x7e"
F9 = "\x1b\x5b\x32\x30\x7e"
F10 = "\x1b\x5b\x32\x31\x7e"
F11 = "\x1b\x5b\x32\x33\x7e"
F12 = "\x1b\x5b\x32\x34\x7e"

then you also have to change line 52 in read_linux
  if c2 != "\x5b" or c4 not in "\x30\x31\x33\x34\x35\x37\x38\x39":

I just tested it:
python ./manual.py
You pressed: F5
In Hex: 1b:5b:31:35:7e
You pressed: F6
In Hex: 1b:5b:31:37:7e
You pressed: F7
In Hex: 1b:5b:31:38:7e
You pressed: F8
In Hex: 1b:5b:31:39:7e
You pressed: F9
In Hex: 1b:5b:32:30:7e
You pressed: F10
In Hex: 1b:5b:32:31:7e
You pressed: F11
In Hex: 1b:5b:32:33:7e
You pressed: F12
In Hex: 1b:5b:32:34:7e

I can make a PR to your master xD

On linux it depends on what Enter you press, the Numpad Enter is LF, the normal Enter is CR

I also figured that the codes for f5... are probably wrong, but my Linux VM decided to explode yesterday, so I didn't get to testing.
I don't have time today and also probably not tomorrow, so if you hsve the timd go ahead and make a PR.

already done

I made this little script for testing. We could maybe ship a clean version of this for manual testing.

I actually removed the testing script, but by now I am considering putting it back. I will at least put it on the dev branch...

Also Ctr+C raises a KeyboardInterrupt, the old version did not.

That is also deliberate. I feel it is more pythonic that way. When using something like:
while True:
    c = readkey()
    if c == key.UP:
        break

You have to make sure the user gets not trapped and having to catche the CTRL_C manually feels unnececary and will be forgotten often. (Also only readkey raises the error, readchar still returnes the CTRL_C as is).
But this is of course open for debate and was just what I felt made the most sense.

On linux it depends on what Enter you press, the Numpad Enter is LF, the normal Enter is CR

interesting and anoying, We will have to wait for userfeedback to see if anyone has problems with that...

We probably should also remove ESCAPE_SEQUENCES, I have no idea what use that has. Since they overlap with the Function keys, I think they are wrong.

I guesse this was an attemped to simplify the readingprocess by looping and comparing against teh list od escape_secenses to now how many bytes to read. But it is no longer needed an I will remove it.

for now I added it under : tests/manual-test.py
for final decitions we will have to wait for @magmax anyway...
I will also reorder and compress the commits once I get some feedback from him. Then I will probably not delete the testing script and jut update it a little

btw: I have been thinking about the filestructure and the importprocess a little. Whats your opinion on this:
import readchar.key is not longer possible, only from readchar import key
when typing import readchar.read... or from readchar import read... my autocompletion will suggest the read_windows/linux subfiles. This is anoying and potentioally confusing. My first idea was to prefix the files with an underscoore (to mark them as internal), this puts them at the botom of the sugestions, but they still come up. Second idea was to change the naminsceam to platform first, than function, so renaming read_linux.py->linux_read.py avoiding the similar names and therefore the problem. Maybe even implement both at the same time?

I find my version of the test script better, since it can output all keys from the key definitions. Maybe you can adapt it according to your preferences.
You could just make an extra file key.py which will include key_linux or key_python depending on the os. I personally don't need it, but then we're backwards compatible.
I would not hide the OS_dependent versions and also not show them further down in the list. Python itself does not do that with OS dependent modules (e.g. PurePosixPath) I find it as suffix also good, but would also be good as prefix.
you can rename linux to posix or unix, i think in python core posix is used more often.

I find my version of the test script better, since it can output all keys from the key definitions. Maybe you can adapt it according to your preferences.

good idea, I didn't realise you did that. Stolen and incorporated ;)

closing in favor of #79


Separate "advanced filtering" feature from Elemental PR

Adds advanced filtering feature to Resource Table component

Screenshot/Video
These images show a test I did with catalog.cattle.io.app custom list resource with the advanced filtering feature working

Codecov Report
Base: 36.88% // Head: 36.65% // Decreases project coverage by -0.22% :warning:

Coverage data is based on head (abdac6b) compared to base (bae50a2).
Patch coverage: 15.90% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7134      +/-   ##
==========================================
- Coverage   36.88%   36.65%   -0.23%
==========================================
  Files         986      986
  Lines       17633    17657      +24
  Branches     4541     4548       +7
==========================================
- Hits         6504     6473      -31
- Misses      11129    11184      +55

Flag
Coverage Δ

e2e
47.10% <16.27%> (-0.33%)
:arrow_down:

merged
36.65% <15.90%> (-0.23%)
:arrow_down:

unit
5.20% <0.00%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

shell/components/ResourceList/index.vue
0.00% <ø> (ø)

shell/components/ResourceTable.vue
0.00% <ø> (ø)

shell/components/SortableTable/THead.vue
0.00% <ø> (ø)

shell/components/SortableTable/index.vue
0.00% <0.00%> (ø)

shell/models/cluster.x-k8s.io.machinedeployment.js
0.00% <0.00%> (ø)

shell/components/SortableTable/filtering.js
15.90% <12.50%> (+1.36%)
:arrow_up:

shell/store/type-map.js
71.32% <100.00%> (+0.03%)
:arrow_up:

shell/mixins/metric-poller.js
77.77% <0.00%> (-22.23%)
:arrow_down:

shell/plugins/steve/mutations.js
36.17% <0.00%> (-10.64%)
:arrow_down:

shell/utils/poller.js
75.00% <0.00%> (-10.00%)
:arrow_down:

... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

I haven't gone through the code of this PR in any detail, but I've run it against a harvester cluster and ensured that the table css changes don't cause issues there.

work through the getValue issue from comments

Hello @richard-cox i've updated the PR with the latest changes taking into account your comments.
Label filter now working

Pods (apparently they don't use the custom list of workloads, so it's the default)

🙏 🙇


Android: Feature Request:  Different story orders for current feeds vs. saved stories

I love NewsBlur, and I find that the majority of time, I use it on my Android smartphone.  That being the case, would it be possible to have options for different story orders for the current feeds section & the saved stories section?  Specifically, I enjoy showing "oldest first" stories within my current feeds (so I can read things in the order they happened).  However for saved stories, I would prefer those to be sorted by "newest first," as the older it is, the less likely I am interested in the saved story.  I thought at one point the Android app used to behave like this natively, but I could be wrong about that.  Currently, I have to change the story order every time I go into "saved stories" on my Android device, and then I have to switch that back when I access my current feeds.  Thanks in advance for your consideration of this feature request!

Saved stories are always displayed in the order they were saved, not in the default feed order.  You can safely switch any feed or folder (or the default order) to oldest-first without affect saved stories.

Thanks for your reply.  I may be very confused, but in the NewsBlur app on my Android smartphone, changing the “story order” option within preferences does change the story order of the saved stories.  If I am reading your reply correctly, you may not know that?  Now, that is not a bad thing, because I desire to change the story order for the saved items, however I was trying to request a separate option for how the app sorts feeds for the saved stories (one setting for the default feed order, and one setting for the saved items).  If this is a bad idea, too complicated to implement, I am hopelessly confused, or I am not explaining myself clearly enough, then I promise I will not bother you again with this feature request.  However, I felt there was a large enough misunderstanding between us initially, that I should make one attempt at clarifying my feature request.  Thanks again!
From: Daniel<EMAIL_ADDRESS>Sent: Tuesday, March 17, 2015 12:16 PM
To: samuelclay/NewsBlur
Cc: brianchris
Subject: Re: [NewsBlur] Android: Feature Request: Different story orders for current feeds vs. saved stories (#676)
Saved stories are always displayed in the order they were saved, not in the default feed order. You can safely switch any feed or folder (or the default order) to oldest-first without affect saved stories.
—
Reply to this email directly or view it on GitHub https://github.com/samuelclay/NewsBlur/issues/676#issuecomment-82545755 .  https://github.com/notifications/beacon/AFmmxPisrki5NDP1lmgIXdQpfQXDIo5Qks5n2HUKgaJpZM4DvwkY.gif

Hey Daniel, I think Brian's correct in that you should be able to change the story order in Saved Stories. You can do this on the web, so Android should be able to handle it just fine. Just use the same order key.

Now I am quite confused.  I just confirmed both on a test build and via the source code - there definitely is no option to change the order of saved stories in our Android app.  The order of saved stories is hard-coded in three different spots, and there does not even exist a menu item or preference key to change said order.
@brianchris - do you know what version of the Android app are you running?

That's weird, I checked on my N7 and only saw "default view" in the option under Saved Stories.

(I should add that I can certainly implement story ordering for saved stories, I would just love to know if we have a bug where that option is somehow showing up already.)

Oh, I read that wrong. There is not currently an option to change order for saved stories. Let's change that if it's trivial.

I appear to be on Android app version 4.2.1, although it looks like that info may no longer be needed.  Regardless of whether an option for saved story order can be implemented (easily) or not, I really appreciate both of your's assistance with this topic.  Thank you!

I can confirm that there has never been any order for saved stories other than most-recently-saved-at-top.  Adding the reverse ordering will be medium-difficult, so I'll leave this open to track it until we have time.

Finally done in #836.


Update: translate doc french

Hi @rrousselGit,

This PR enhances the French documentation by incorporating additional translations from the latest English documentation.
The focus is on the 'cookbook' section.

Thanks!


Prepare for prototype removal

See https://www.jenkins.io/blog/2023/05/12/removing-prototype-from-jenkins/
Testing done
Manual testing done:

Created a domain and added credentials to it
Created a new credential from the "Add" button on a Git SCM configuration page.

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [ ] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue

This will merge conflict with #481

I have tested it:
In a Jenkins which has prototype removed, there are errors:

When I start Jenkins and take into account this PR, there are no errors, and I can create a new domain and add credentials, without any errors

I've reverted the changes to select.js so now creating a credential from for example a Git SCM credentials input on a job configuration page works again.

Potentially introduced JENKINS-72364


[Test-Proxy] Adjust Sanitizers, Matchers, and Transforms to have public members

This will allow enhancement of unit testing various controller-level functionalities.

Unnecessary. See source code.


Module 1 assignment

Given what I know why would I still want to train?

I want to my students to start contributing to the open source movement early in their careers.


fork status considering what happened to original project

Hi,
I'm using polyfill-library in a project that doesn't do user-agent recognition, and rather do feature detection.
It works pretty well, however polyfill-library is really nice since it maintains a coordinated library of polyfills.
Since your fork seems to be maintained, it would be nice to show an official statement about why and how it's going to be maintained ?

Hi @kapouer,
Thank you for your interest.
I am unsure what such a statement would look like and where we should display this.
I can speak for Mr. Henry and say that polyfills are an integral part to how we build websites and this will continue to be so.
We strongly believe that the web should be open to all, even those on older browser versions.
We might vary in how much time we can allocate to it. Currently we have less time than we would like at Mr. Henry, this will hopefully improve again. But at no point are we considering halting our contributions or no longer hosting this project.
@mhassan1 is also a very active member, helping us maintain this project.

A proposal to acknowledge the situation at the bottom of the README.md:
## History

### Financial Times era

The `polyfill-library` and the `polyfill.io` service were originally created within the Financial Times.
The combination of Internet Explorer lagging behind, a wide range of new and polyfillable features and the rise of a JavaScript first mindset made this a very successful project.

### Sale of `polyfill.io`

Around 2022 the Financial Times lost interest and the active maintainers inside the company were leaving or already left.
The Financial Times together with Fastly eventually decided to hand control over to Jake Champion, one of the core maintainers who was leaving the Financial Times to go work for Fastly.

Mr. Henry was initially approached to take over but no meetings actually took place.
We've been told this was blocked by Fastly who did not consider Mr. Henry to be a safe option.

Early 2024 the `polyfill.io` domain and service were sold to Funnel, a Chinese company, by Jake Champion.
Other maintainers were not aware that a sale was even being considered and this caught everyone by surprise.

We immediately moved to secure the git history of the `polyfill-library` and created a hard fork based on a state we could prove was unaltered.

Shortly after we rolled out an `npm` release and started clearing the dependency tree of packages that were in any way controlled by Jake Champion.

Mid 2024 reports surfaced that the `polyfill.io` service was injecting malware into polyfill bundles.
The wider internet community moved to shut down the service.

### Going forwards

Mr. Henry is a web and design agency and the current steward of the `polyfill-library`.
We value long term support and strongly believe that everyone should have access to the web.

Continuing the `polyfill-library` projects is a good fit for us and helps us make sites that work for everyone, even users on older browser versions.

Things we will try to do:
- keep up with maintenance and security issues
- keep the test framework running
- welcome contributions
- welcome new members

Things we will never do:
- monetize this project or create a service around it that could be monetized or sold
- add any form of tracking or metrics
- delete this project

@fd, @mhassan1 I would love to hear your thoughts and ideas on this.
I am not sure if we should name Jake Champion, but on the other hand I also don't like using the "the situation" euphemism.
I think we can factually state what happened and who did what.

LGTM

Any sources for the facts about Jake Champion selling the domain ? It's somewhat legally dangerous not to have some.

I have a saved screenshot of these and now it will forever be part of this issue:

I don't think there is any legal risk here.
We are not stating any opinions about Jake, the Chinese company or the nature of the sale.
We are not including any speculation or omitting things that might change how this appears.

Looks good to me too.
There are plenty of other sources, Cloudflare etc, documenting the same facts and timeline.

https://blog.cloudflare.com/polyfill-io-now-available-on-cdnjs-reduce-your-supply-chain-risk/
https://blog.cloudflare.com/automatically-replacing-polyfill-io-links-with-cloudflares-mirror-for-a-safer-internet/
https://www.theregister.com/2024/06/25/polyfillio_china_crisis/
https://sansec.io/research/polyfill-supply-chain-attack

Yes, but none of them mention Jake Champion. The screenshot above doesn't say he sold the domain either. So the affirmation here is sourceless, making it attackable.

It doesn't :)
Jake Champion was the owner, It was his and his alone to sell.
That it was sold means that he sold it.
This was also mentioned on polyfill.io itself by the Financial Times shortly before the transfer from FT to Jake:
https://github.com/polyfillpolyfill/polyfill-service/blob/7f712528d8677834c484405d7f52ac359878e2c7/src/assets/v3/ownership-transfer.njk#L10

We have therefore made the decision to transfer ownership to Jake Champion who, at FT and Fastly, has been the core maintainer for most of the polyfill service’s life.


Forms: form-stacked with multi column span

When using the class form-stacked on a form it gets pushed 20 pixels to the left. When this is done it is not possible to put 2 span8's next to each other without breaking the lay-out.
A work-a-round is to change form-stacked padding left to 0; Doing this will brake the div.actions because it has a negative left-margin of 20px and padding-left 20px to align with the inputs and labels above when there is no modification made in form-stacked.
When you zero out the margin and padding the first button positions to the most left position in the actions div.
Is there a better work-a-round to use spans for the divs inside a form with the class of form-stacked?

Hmm, no your best bet is to undo the padding we added there and wait for 2.0 to drop with the new form styles. We built the stacked form this way to align all form elements. A better approach is coming :).

Just ran into this same issue.  The fix for me was to simply make the inputs 20px narrower using a new rule:
// Grid style input sizes
// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border and 20px more for the form-stacked left-padding
.formStackedColumns(@columnSpan: 1) {
  display: inline-block;
  float: none;
  width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 30;
  margin-left: 0;
}
form.form-stacked {
    input,
    textarea {
        // Default columns
        &.span1     { .formStackedColumns(1); }
        &.span2     { .formStackedColumns(2); }
        &.span3     { .formStackedColumns(3); }
        &.span4     { .formStackedColumns(4); }
        &.span5     { .formStackedColumns(5); }
        &.span6     { .formStackedColumns(6); }
        &.span7     { .formStackedColumns(7); }
        &.span8     { .formStackedColumns(8); }
        &.span9     { .formStackedColumns(9); }
        &.span10    { .formStackedColumns(10); }
        &.span11    { .formStackedColumns(11); }
        &.span12    { .formStackedColumns(12); }
        &.span13    { .formStackedColumns(13); }
        &.span14    { .formStackedColumns(14); }
        &.span15    { .formStackedColumns(15); }
        &.span16    { .formStackedColumns(16); }
        }
}

had a similar issue; wanted to use spans inside a label. margin-left:-20px fixed it, hopefully 2.0 will align forms with the main grid :-)


Full flow to test neural search

Signed-off-by: miguel-vila<EMAIL_ADDRESS>The intention would be to test a more complex flow.
This would require some changes to the testing framework:

support keeping info from responses and using it for later requests (e.g. the model id, which is then needed to create the ingestion
support some sort of retry for the task API (we need to wait for the model deployment before using it)

To test some of this I also had to add a new ml API spec, it's still a bit rough and might use some better descriptions.

I added support for retry in https://github.com/opensearch-project/opensearch-api-specification/pull/453 with the waiting for tasks example from here.
@miguel-vila any interest in finishing this on top of my PR?

Finished in https://github.com/opensearch-project/opensearch-api-specification/pull/504.


Failed to connect to github.com port 443: Operation timed out

Hi,
Why do you think, I have this error.
I have internet, and github service is not down.

brew services list
==> Tapping homebrew/services
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services'...
fatal: unable to access 'https://github.com/Homebrew/homebrew-services/': Failed to connect to github.com port 443: Operation timed out
Error: Failure while executing: git clone https://github.com/Homebrew/homebrew-services /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services --depth=1
Error: Failure while executing: /usr/local/bin/brew tap homebrew/services

Don't create multiple identical issues: https://github.com/Homebrew/homebrew-services/issues/158


Sample for HarveyBallMicroChart

Hello everybody,
maybe you have a hint for me. I tried to use the HarveyBallMicroChart Ui, which is already part of the XML View. But I only get an empty container.
https://ui5.sap.com/#/api/sap.suite.ui.microchart.HarveyBallMicroChartItem%23overview
When I unterstood the documentation rigth I also need HarveyBallMicroChartItem. I add it localy in in the Class and tried it like this:
lo_main_content->harvey_ball_micro_chart(
  EXPORTING
*    colorpalette   =
*    press          =
    size           = 'L'
*    height         =
*    width          =
    total          = '10'
    totallabel     = '11'
*    aligncontent   =
*    hideonnodata   =
*    formattedlabel =
    showfractions  = abap_true
    showtotal      = abap_true
    totalscale     = abap_true
*  RECEIVING
*    result         =
)->harveyballmicrochartitem(
  EXPORTING
*    id            =
    color         = 'Good'
    fraction      = '8'
    fractionscale = 'Mrd'
*    class         =
*  RECEIVING
*    result        =
).

But I only get an error

Is there an sample for this UI Element, which I didn't find?
Thanks in advance...

HI @Marchl-Woid,
as far as i see it we have no sample for this. but you are right, harveyballmicrochartitem is an aggregation of harveyballmicrochart. In general, the way you use it is right, but its hard to see where is exactly the problem without running it on my own machine.
Can you maybe PR the new control? And share a small sample with your issue that we can copy it to our systems (or send a PR to the sample)?
then we will check that and find out where the problem is.
best regards.

Hi @oblomov-dev
I'm just added the item.
I'm only working with ofline Repos, so my example on this way :) Thanks for your quick help
CLASS z2ui5_cl_demo_app_harvey DEFINITION
  PUBLIC
  CREATE PUBLIC .

  PUBLIC SECTION.

    INTERFACES z2ui5_if_app.

  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.

CLASS z2ui5_cl_demo_app_harvey IMPLEMENTATION.
  METHOD z2ui5_if_app~main.
    CASE client->get( )-event.

      WHEN 'BACK'.
        client->nav_app_leave( ).

    ENDCASE.

    DATA(view) = /tcon/mmve_cl_xml_view=>factory( ).
    DATA(page) = view->shell(
        )->page( title          = 'Harvey Chart'
                 navbuttonpress = client->_event( 'BACK' )
                 shownavbutton  = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ).

    page->harvey_ball_micro_chart(
*                                   colorpalette  =
*                                   press         =
                                   size          = 'L'
*                                   height        =
*                                   width         =
                                   total         = '10'
                                   totallabel    = '11'
*                                   aligncontent  =
*                                   hideonnodata  =
*                                   formattedlabel =
                                   showfractions = abap_true
                                   showtotal     = abap_true
                                   totalscale    = abap_true
*  RECEIVING
*                                   result        =
    )->harveyballmicrochartitem(
*                                 id            =
                                 color         = 'Good'
                                 fraction      = '8'
                                 fractionscale = 'Mrd'
*                                 class         =
*  RECEIVING
*                                 result        =
    ).

    client->view_display( view->stringify( ) ).
  ENDMETHOD.
ENDCLASS.

Thanky for the PR. I checked it.
The microchartitem was not a child of the microchart in the xml. Therefore the ouput failed. I adjusted now the xml class. Not it works:

Update to latest abap2UI5 version and check out sample z2ui5_cl_demo_app_308.

Looks great. Thanks for the quick help


force re-run of entire workflow

If the output files/directories exist, athena-meta will just skip those steps. For example:
============================== check_reads ==============================
--> 0 chunks need to be run. Skipping...

============================== subassemble_reads ==============================
--> 0 chunks need to be run. Skipping...

============================== assemble_olc ==============================
--> 0 chunks need to be run. Skipping...

...but there is no option to force re-run from the start of the workflow. This could be dangerous for anyone thinking that they have re-run athena, but in fact athena just found the old files/directories and skipped everything. It's also a bit annoying to have to manually delete the output files/directories for each re-run.

Even if I provide new reads in the config, the assembly is still skipped if the output directories/files exist, which is a weird behavior:
============================== check_reads ==============================
1 chunks to run. Starting...
2020-07-20 20:23:21 - INFO - index fastq /path/to/files/reads.fq
2020-07-20 20:23:35 - INFO - get seed contigs from input assembly
2020-07-20 20:23:35 - INFO -   8939 total inputs seeds covering 9452078 bases
2020-07-20 20:23:35 - INFO -   89 input seed contigs >= 400bp and >= 10.0x coverage covering 3024691 bases
2020-07-20 20:23:35 - INFO - created 90 bins from seeds
2020-07-20 20:23:35 - INFO - done
--> check_reads completed.

============================== subassemble_reads ==============================
--> 0 chunks need to be run. Skipping...

============================== assemble_olc ==============================
--> 0 chunks need to be run. Skipping...


Translation of units.py to java

Try using Map and HashMap instead of Dictionary and Hashtable, as both of the later are outdated.
We can't use a main method in our robot code; the robot controller has its own main method that
will eventually call into our code through OpModes. To set up the static maps you have created,
use a static initializer block.

Make sure the maps are defined outside of the static initializer block.

Try making a Unit enum inside the Units class and use that instead of strings to represent units.
If you do this, you also don't have to check that the unit parameters are valid in the convert
method because Java won't let users of your function use a nonexistant enum member.

damn thats alot of importing stuff just for coding a robot


wxMenu as a form child doesn't do anything useful, but does generate a memory leak

Description:

All forms are allowed to create a wxMenu, but we simply create the menu on the heap and don't do anything with it. wxFormBuilder creates a menu in the form's ctor and hooks it up to a mouse right-click event. If we don't support wxMenu as a form child, then we need to warn the user if they import a wxFB project that uses it.
If we do support it, then it should be added as a std::unique_ptr so that it will be automatically destroyed in the classes dtor rather than creating a class destructor just to delete it. We would also need to fill in the wxEVT_RIGHT_DOWN event for the form with a lambda that displays the popup menu. That allows the user to override it if needed -- or at least to see that the event is already in use.

Currently we have taken wxFormBuilder's approach to menus in a base class. In the base class destructor, the menu is always created on the stack and then deleted in the destructor. While that does work, it's a sloppy coding technique since those menus always get created even if they are never used.
I think a better atlernative would to be to create a special menu widget that asks the user to specify the name of the function for this specific menu. That function would be created as a class protected: class method. The code generation for this function would create a method that creates the menu on the stack and calls PopupMenu(). If the user specifies a wxEVT_CONTEXT_MENU for the base class form and popups the edit dialog, we could auto-fill in the lambda function with the name of the menu functon.
The downside to this method is that the derived class can't modify the menu before it displays, and menu items can't have member variable names.

PR #268 removed the ability to add wxMenu as a child. PR #273 adds a wxContextMenuEvent generator. This is probably roughly what wxFormBuilder intended, with the difference being that wxContextMenuEvent only generates the popup menu if a wxEVT_CONTEXT_MENU is actually generated, and it only works for forms.


Does show-o support multimodal-in multimodal-out?

Like what I said, does it support the title? does it multimodal-in, multimodal-out(with multi images)?

I've noticed that Mixed-modal generation is a pending requested feature, so can I write script to do that? or the model do not have the ability now.

Hi, we have explored mixed-modality generation. However, we still have not uploaded such a pre-trained weight to this version.

thx very much！so is this process instruction tunning part or I have to pretrain it again？

Hey, it is included in the instruction tuning stage.

Thx a lot! I'll try to do that~


Bug on  change  ng-disable when using  Multiple Select

Hello every body
I'm using ui-select on my project
But I have some problem:
When after select any item in ui-select-choices, I want temporary disable multiple select an display some input fields for user input (required)
But it's disabled only  but not hidden or  if I not click Outside To Close
I had been used:

{{$item.name}} -{{$item.reward}}

                                email: {{person.email}}
                                age:

Selected: {{multipleDemo.selectedPeopleWithGroupBy}}  -- {{counter}}

After select,  I using onSelectCallback to disable box...

I'm resolve problem by tag
close-on-select="true"


[10.x] Adds @throws docblock to FilesystemAdapter

There are a number of throw_if() calls within the FilesystemAdapter, and only one of them had a @throws docblock. I believe this adds a complementing docblock tag for each case.

I don't feel we should do this. By default, these methods won't throw, only if you enable the option. If you add these it'll always give warnings in IDE's that the methods could throw these exceptions even if they by default don't.
Sidenote: we always use FQN in our DocBlocks.

I don't feel we should do this. By default, these methods won't throw, only if you enable the option. If you add these it'll always give warnings in IDE's that the methods could throw these exceptions even if they by default don't.

I can understand that. Either case, someone has to dig into the implementation to see what sort of Exceptions to expect (or know that those exceptions do not need to be handled because throws is set to false). Would be great if it could be noted somehow that the exceptions are thrown, but only in the case that you want exceptions thrown. 🤷

Sidenote: we always use FQN in our DocBlocks.

There was one already there (without the FQN), so I just kept it in line with that. I thought maybe there was a special case for non-FQN in this file 😆


Not_analyzed has no effect

I'm trying to tell ElasticSearch to stop analyzing a certain property, to prevent values with a dash from being split. I tried the options I could find, but none of them work. Have I stumbled upon a bug in NEST or am I doing something wrong? Let me tell you what I've tried so far.
Mapping with ElasticProperty
The NEST docs tell me I can use the ElasticProperty attribute with a FieldIndexOption.
[ElasticType( Name = "product" )]
public class ElasticSearchProduct
{
    [ElasticProperty( OmitNorms = true, Index = FieldIndexOption.not_analyzed )]
    public string Format { get; set; }
}

When the Index method has been called, I can see the product has been correctly indexed and the mapping is created in ElasticSearch. However, when I perform a faceted search, the value is still split. (The facet value "E-book" becomes two: "E" and "Book".)
Manually call the mapper method
I found issue #19 that told me to persist the mapping, so I did:
this.ElasticSearch.Map<ElasticSearchProduct>( "products" );

It creates a mapping, but the value is still split.
Explicit type mapping
Then I tried to perform an explicit type mapping, as mentioned in issue #19.
var notAnalyzedProperty = new TypeMappingProperty
{
    Type = "string",
    Index = "not_analyzed"
};
var newMapping = new TypeMapping( "product" );
newMapping.Properties.Add( "format", notAnalyzedProperty );
this.ElasticSearch.Map( newMapping, index );

That doesn't prevent the value from being split either.
I'm running this with:

the latest NEST package from NuGet: <IP_ADDRESS>
the latest ElasticSearch 0.19.7, with default configuration.
search queries that use an index alias and a routing value, a construct that I've found on the ElasticSearch Google group. That should have nothing to do with this issue, but perhaps it's good to know to determine the cause.

If you need me further to debug this or provide any more information, just let me know.

I've run into this problem as well.

same problem here. anyone got the solution?

@rajatg64 it'd be best to open a new issue and describe what the problem you're seeing is.


chore: cargo update

Changes

Updated dependencies to lates version

Reminders

[x] Add a prefix to PR: feat: (for features), chore: (for chores/refactoring), fix: (for bug fixes), or any from: https://www.conventionalcommits.org/en/v1.0.0/#summary
[x] Assign reviewers
[x] Link related issues
[x] Make it draft if it is still WIP
[x] Write unit tests for your code if possible
[x] Do manual testing and make sure your changes don't break the rest of the codebase

@astralblue Want to include this one along with #182


outside local network

Hey,
Is it possible to get this working outside a local network? I mean using public ips?

Yes. icmpdoor can connect from/to global routable IP-addresses.


Crop completion notification time differs from actual

In the Japanese-language environment, the Althyk Lavender Seeds(JP name:アルジクラベンダーの種) completion notification is appear earlier than it actually is. (It is not actually completed.)
Althyk Lavender Seeds bear fruit in 24 hours, but if you take care of them right after planting in the field, the UI will show 21:59!
Perhaps other species may have different times. (Haven't checked yet.)

Althyk lavender grows out in 22 hours (+ up to 63 minutes for the ward timer). They do not actually take 24 hours.


How to add request header use triple protocol in dubbo3

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Ask your question here
How to add request header use triple protocol in dubbo3 ?

Just add it to invocation's attachments


StatsTest broken with g++-5

The latest build of Peloton is broken due to a failure on StatsTest with g++-5:
https://travis-ci.org/cmu-db/peloton/builds/177756128
The failure was on MultiThreadStatsTest:

71: /home/travis/build/cmu-db/peloton/test/statistics/stats_test.cpp:183: Failure
71: Value of: num_threads * 50 * 4
71:   Actual: 1600
71: Expected: index_access.GetReads()
71: Which is: 1592
71: [  FAILED  ] StatsTest.MultiThreadStatsTest (19879 ms)

I first saw the same failure (also with g++-5) after #351, but I restarted the build and the failure disappeared. Nor could I reproduce this failure locally with g++-5.4.0. Also I think the issue might be introduced before #351, since the failure is undeterministic. The refactoring with #351 didn't really touch the stats logic.
@eric-haibin-lin Could you check on what's going on here? Thanks!

Peloton master failed on stats_test again:
https://travis-ci.org/cmu-db/peloton/jobs/178390100


Release v1.5.0 version

Fix #29.  Please rebase and merge.
Casbin.NET will change the version frequently than before, so I want to keep the same version between the two packages.
EFCore keeps the same version to .NET too, It is not recommended to use a different version.
Changes:

Namespce Casbin.NET.Adapter.EFCore => Casbin.Adapter.EFCore Casbin.NET #120,
Class name CasbinDbAdapter => EFCoreAdapter Casbin.NET #120,
Full type:

Casbin.NET.Adapter.EFCore.CasbinRule<T> => Casbin.Adapter.EFCore.Entities.CasbinRule<T>,
Casbin.NET.Adapter.EFCore.CasbinModelExtension => Casbin.Adapter.EFCore.Extensions.CasbinModelExtension
Casbin.NET.Adapter.EFCore.CasbinRuleExtenstion => Casbin.Adapter.EFCore.Extensions.CasbinRuleExtenstion

Default table name CasbinRule => casbin_rule (#29),
Default field name PType => ptype, V0 => v0 (Vx => vx )  (#29),
Default add index to ptype v0 v1 v2 v3 v4 v5 fields,
Support .net5.0 .netstandard2.1 .netcoreapp3.1 targets,
Add packages icon (Casbin.NET #128).
Remove Travis CI support.
Update README for the new version.

Release Notes:
Break Changes:

Change namespace Casbin.NET.Adapter.EFCore to Casbin.Adapter.EFCore,
Change CasbinRule<T> class namespace Casbin.NET.Adapter.EFCore to Casbin.Adapter.EFCore.Entities,
Change class name CasbinDbAdapter to EFCoreAdapter,
Change default table name CasbinRule  to casbin_rule,  default field name PType V0 V1 V2 V3 V4 V5 to ptype, v1 v2 v3 v4 v5 .

Features:

Support .net5.0 .netstandard2.1 .netcoreapp3.1 targets,
Auto build field indexes.

Others:

Update Casbin.NET version v1.4.0 to 1.5.0
Update EFCore dependency packages version.

@Sagilio should we release v2.0.0 for these breaking changes? Actually I suggest doing the same for Casbin.NET

@hsluoyz
v1.5.0 is only want to keep the same version between Casbin.NET. When multiple Casbin.NET versions are maintained at the same time later, this can better avoid version confusion.
EF Core adapter version change is v1.3.1 => v1.5.0, I think It can clearly reflect that this is a special version, and the biggest breaking change is about the table name and field name because it needs to create a new migration.
The commit of changing namespace is merged to the develop branch at Casbin.NET. Actually, it will release on the v2.0.0 version, not v1.5.0.


Support Dolphin

Evidently a lightweight fork of Misskey: https://github.com/misskey-dev/dolphin
#579 may imply that interop doesn't work quite yet?

Repo hasn't been touched in 4-5y, project may be dead. Tentatively closing.


changing brightness requires root (and ownership is reset at boot)

screw this I'll just install xbacklight


chore: use absolute imports with @ alias and format code on save

This PR introduces new format of absolute path imports: using @/ alias for src/. PR is big because all imports are converted into this new format.
Also VS Code on-save actions are defined which make the prettier and ESLint fixing run on each save of the file.
Requirements to be able to utilize auto-formatting on each save are 2 VS Code extensions:

prettier-vscode
vscode-eslint

hi @peterslany - config looks good, but I'm not going to review 233 files so I'll take your word that it all works :)

Yes, I tested it and it worked, also updated storybook config, so Chromatic works as it should too :)


[C-Api] invalid casting of ml-option

Fix invalid casting after allocating option handle.

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #449. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.


Genesis epoch active-set-size as committee-size

This removes the active-set-size hardcoded value for genesis epoch.

Closing in favor of https://github.com/spacemeshos/go-spacemesh/pull/1153.


AspNetIdentity AuthenticationMethod is wrong

When using AspNetIdentity eventhough we use Multi Factor Authentication the resulting token always contains an "amr" claim with a value of "pwd" only. This should be at least "mfa" but in most cases it should be ["pwd", "otp", "mfa"].

When you issue the claims at login you can add amr claims that will add to that collection. Our AspId code doesnt' do this today, but you could extend it to do so. If you come up with a nice solution, then we coul[d consider a PR into our AspId code as well.

Thx for your fast response,
I'm certainly willing to adjust the code but where? I've looked everywhere. But can not find where the "amr" claim is set to "pwd". I even started searching for the string "pwd" :-(
I also noticed that I can try to tell IdentityServer I want to use MFA by setting the parameter "amr_values" on the protocol message to "mfa", but this is completely ignored is it?
Another thing I noticed is that even though I set the "amr" claim to "mfa" (in a custom ProfileService for example) this is being overridden and set to "pwd" again? Where?
Security is not my specialty and simply configuring MFA using the AspIdentityProvider is proven to be very difficult. Mfa is required everywhere nowadays so this kind of got me by surprise. I hoped there was a working AspNetIdentity integration available.
That being said... If you tell me where to start looking, I'm sure willing to fix it and create a pull request.
Kind regards,
Webbes

I'm certainly willing to adjust the code but where? I've looked everywhere. But can not find where the "amr" claim is set to "pwd". I even started searching for the string "pwd" :-(

Unfortunately, if you're using AspId to log a user in (or do MFA) they don't make it easy to add custom claims at login time. You would mostly have to tinker with the internals of the SignInManager and/or UserManager from AspId. This is all outside IdentityServer.

I also noticed that I can try to tell IdentityServer I want to use MFA by setting the parameter "amr_values" on the protocol message to "mfa", but this is completely ignored is it?

This would all have to be custom code you write.

Security is not my specialty and simply configuring MFA using the AspIdentityProvider is proven to be very difficult. Mfa is required everywhere nowadays so this kind of got me by surprise. I hoped there was a working AspNetIdentity integration available.

This is unrelated to IdentityServer. This is a function of the login workflow which IdentityServer expects you to build. Of course we have our AspId quickstart, but it's just a starting point and doesn't implement every requirement that anyone would ever want/need. In short, this would be your code, but it should be possible to do.

As part of the Login workflow, can the Identity User's hash set be altered?
https://github.com/IdentityServer/IdentityServer4/blob/63a50d7838af25896fbf836ea4e4f37b5e179cd8/src/IdentityServerUser.cs#L37
If so, this may offer a solution.

Closing. If you still have issues, feel free to reopen.


ur_robot_driver: 2.1.1-1 in 'galactic/distribution.yaml' [bloom]

Increasing version of package(s) in repository ur_robot_driver to 2.1.1-1:

upstream repository: https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git
release repository: https://github.com/ros2-gbp/Universal_Robots_ROS2_Driver-release.git
distro file: galactic/distribution.yaml
bloom version: 0.11.1
previous version for package: 2.1.0-1

ur_bringup

No changes

ur_calibration

No changes

ur_controllers

No changes

ur_dashboard_msgs

No changes

ur_moveit_config
* Remove non-required dependency from CMakeLists
* Contributors: Felix Exner

ur_robot_driver

No changes

This should fix the failing ur_moveit_config builds.

Looks ok, just note that we're holding for Galactic Sync

Too bad, I hoped to get it into this sync, as the package is currently failing and will therefore not be part of this sync. However, as it is not causing any regressions, I guess this is not a relevant fix for the sync. Looking forward to the next sync then.

Looks ok, just note that we're holding for Galactic Sync

Too bad, I hoped to get it into this sync, as the package is currently failing and will therefore not be part of this sync. However, as it is not causing any regressions, I guess this is not a relevant fix for the sync. Looking forward to the next sync then.

Good to go! :raised_hands:


Improve the compatibility of the compiled bundle

Codecov Report

Merging #43 (d0db475) into main (602f8f4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #43   +/-   ##
=======================================
  Coverage   95.10%   95.10%
=======================================
  Files           9        9
  Lines         368      368
  Branches       46       46
=======================================
  Hits          350      350
  Misses         18       18

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 602f8f4...d0db475. Read the comment docs.

Codecov Report

Merging #43 (d0db475) into main (602f8f4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #43   +/-   ##
=======================================
  Coverage   95.10%   95.10%
=======================================
  Files           9        9
  Lines         368      368
  Branches       46       46
=======================================
  Hits          350      350
  Misses         18       18

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 602f8f4...d0db475. Read the comment docs.


chore(storybook): Deprecate & Remove @urql/storybook-addon

Summary
Remove & Deprecate @urql/storybook-addon.
I think we can eventually make a better mockExchange as a replacement, but the plugin itself doesn't serve much of a purpose right now and has gone unmaintained.
Set of changes

Remove packages/storybook-addon

@dkolman-vendavo: I haven't written up an RFC yet, but the likely successor is a bundled @urql/testing package. It's looking likely that storybook helpers will move there, if we can find more convenient ways to ensure that they'll work for all UI bindings equally.
For now, I'm treating this as tracked by #3133 until a new RFC replaces it.
It's a bit of an unfortunate situation that we didn't foresee in time. The package wasn't previously documented or had a place for docs where we could track this.
But in short, for now you can still rely on it until an alternative becomes available.
The longer story here is that it didn't receive maintenance and the new version of Storybook came around. However, it didn't live up to our standards either because the package was only targeting React properly, so a replacement is and was needed.


🔨 Include pydantic-extra-types to integration tests

Change Summary
Include Pydantic-extra-types to integration tests with the main branch
Related issue number

Checklist

[x] Unit tests for the changes exist
[x] Tests pass on CI and coverage remains at 100%
[x] Documentation reflects the changes where applicable
[x] changes/<pull request or issue id>-<github username>.md file added describing change
(see changes/README.md for details)
[x] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

please review

can we merge this @Kludex @lig ?


Legacy Redirects

In most migrations there are legacy URLs that are retired. Make sure those are reflected in your redirects spreadsheet (redirects.xlsx in sharepoint or redirects in google), found in your project content folder.
https://www.hlx.live/docs/go-live-checklist

added redirects to https://adobe.sharepoint.com/:x:/r/sites/HelixProjects/_layouts/15/Doc.aspx?sourcedoc={08A833EA-C276-4919-83D9-D71A19B1C7E7}&file=redirects.xlsx&action=default&mobileredirect=true


Complete Feature/guest user + Header

Shoot you need to change the links before you merge into main


Locking

I think folks normally on initial load click a different tab immediately, while the background initial data pull is still going. This leads to one of the connections failing with DB collision.
We could setup mutex here to hold them waiting till first is done.

I think a lockedForUpdate would work great here, but at the same time we kick off the background matches sync. If we touch the parent Player, this might lead to some issues within the transaction.
Need to think through this.


http3: changing how http3 is built, doing early config validation.

@mattklein123 is this a useful step in #12829 or no?  If not I can just move the test elsewhere rather than deal with all the build complexity TODOs
Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]

@alyssawilk this is roughly what I had in mind, but TBH I haven't looked through it in detail. Here is how I would personally approach it:

Search the code for any place source (not extensions) references QUIC/QUICHE extension code or well known names. I'm pretty sure there are some. Can we get rid of these easily?
Can we easily do cross config validation for all the pieces?

If we can't easily do (1) and (2) with everything being an extension I would do exactly what you are starting to do in this PR, and we can fully rip out all the extension loading stuff which I think will make things much simpler. Also see my other PR around the GSO batch writer. Let's land that other PR and then we can figure out what to do in aggregate?


[Bug]: Precision/context loss in schema when writing to BQ with Avro

What happened?
When working with BigQueryIO.Write.withAvroFormatFunction() the function's input is AvroWriteRequest<T>, which is essentially T with an Avro Schema. The problem is how this provided schema gets created, and how it's being used.
For that a configurable withAvroSchemaFactory method exists, but what it accepts is essentially a SerializableFunction<@Nullable TableSchema, org.apache.avro.Schema>, and this is the problem. TableSchema might already lost context. For example Avro knows INT and LONG, BQ recognizes no difference. So at the format function we might receive a schema that is different from our desired one, and there is no reversible way to transform it back.
Using our desired schema at the format function doesn't work either, because the DataFileWriter in AvroRowWriter already uses a DatumWriter using the provided Schema that might fail.
To give you a more exact example, I had a POJO with an int field, and already methods to provide me with the Beam Row and Schema and Avro Schema, and GenericRecord for that POJO as I need that for other purposes. The TableSchema returned by the DynamicDestinations obviously contains long due to supported BQ types, so the schemafactory-generated Avro schema also contains long. Meanwhile the Row and GenericRecord provided by my custom code contains int as the POJO did as well. ... and you guessed well, an exception happens when it tries to use an int as long during writing.
My "methods" actually use toAvroSchema and toGenericRecord from org.apache.beam.sdk.schemas.utils.AvroUtils, so it's not some custom code, but internal Beam code.
So to sum things up IMO the SchemaFactory should have the ability to use more context/infos than just a TableSchema. Given how it's being called at https://github.com/apache/beam/blob/40838f76447a5250b52645210f26dce3655d7009/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/RowWriterFactory.java#L143-L145 using the destination might already be helpful.
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components

[ ] Component: Python SDK
[X] Component: Java SDK
[ ] Component: Go SDK
[ ] Component: Typescript SDK
[ ] Component: IO connector
[ ] Component: Beam examples
[ ] Component: Beam playground
[ ] Component: Beam katas
[ ] Component: Website
[ ] Component: Spark Runner
[ ] Component: Flink Runner
[ ] Component: Samza Runner
[ ] Component: Twister2 Runner
[ ] Component: Hazelcast Jet Runner
[ ] Component: Google Cloud Dataflow Runner

I could even contribute this, if it gets the greenlight that conceptually it is acceptable.

I understand the current behavior is more like a promoting/casting INT -> LONG (and if also happens on other types) to align the avro schema to the final BigQuery table destination schema.
If the consideration is cost (INT uses smaller space than LONG), BigQuery storage API is more promising (though the work is ongoing). CC: @reuvenlax

Using long instead of int in the original class would be an ugly workaround IMO. The developers shouldn't have to consider this loss of information when writing the code. Not to mention it might be impossible for the developer to change the type of the problematic field. (Remapping to a new class is an even uglier workaround).
The mentioned example was just that. An example. There could be other lost info there as well. Anything that any schema representation contains, but does not exists in TableSchema.

The fact that the labels have changed means my idea is viable, and I can contribute it, or that the issue is valid, but it doesn't mean anything regarding my proposed solution? I still only want to contribute if it has a chance of being accepted.

(I would prefer to implement this while I'm still having available hours for OSS contributions, so any feedback would be appreciated to my previous questions.)


Unsecure apache config

I've used ./install.sh script and started application with default settings.
It is possible to get private key without authentication:
curl -k https://[HAPROXY-WI_ADDRESS]/keys/[KEY_NAME].pem
Keys should be never saved to directory visible by web server!
UPD: This may be not so critical, but any file is available. For example, sqlite database file:
curl -k https://[HAPROXY-WI_ADDRESS]/app/haproxy-wi.db
It should be mentioned that passwords are stored in plaintext format in the database =/
And even Apache server private key file:
curl -k https://[HAPROXY-WI_ADDRESS]/app/certs/haproxy-wi.key

Thank you!
I updated apache config, now all these folders and files are forbiddens


[Playground] Fix Test_getRunOrTestCmd on Go 1.20

os.exec.Cmd struct was changed in Go 1.20, a new field Cancel func() error had been added to it.
The Test_getRunOrTestCmd test relies on comparing two instances of exec.Cmd using reflect.DeepEqual(). Deep equality of structs is performed by doing deep equality checks on all of their members. Deep equality of Func values is defined as false for all non-nil values. Because of this the test is failing on Go 1.20, as even two equivalent instances of exec.Cmd struct are no longer deeply equal due to the new Cancel field of type func(), because, as defined above, two non-nil functions are always not deeply equal.
This PR replaces the deep comparison with string comparison of the generated command line, as it's the intention of the test.
resolves #25380

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

LGTM

lgtm thanks


JavaScript group capstone: set up our Kanban board

https://github.com/PeteUgwu/Group-capstone
We are a team of two.

Hi @SSEKPIUS,
STATUS: CHANGES REQUIRED ♻ ♻
Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!

Highlights

Kanban board setup correctly ✔

Required Changes ♻

Please include a link that navigates directly to your Kanban board 🙏 (include it in your initial issue)
Check the comments under the review.

Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Hi team,
Your project is complete!  There is nothing else to say other than... it's time to merge it 🥳
Congratulations! 🎉
Status: Approved✔
Highlights

Fair distribution of tasks.

Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


AppFit (Actions) Destination

Proposed changes
Opened editable PR for #5117
Merge timing
ASAP
Related issues (optional)
Closes #5117

Thanks!


maintainers: add cigrainger

Description of changes
Adding myself to the maintainers list, as per https://github.com/NixOS/nixpkgs/issues/50105#issuecomment-1065525515. cc @samuela.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

LGTM I'll merge once all the checks pass. It may take some time for the bot to propagate and for you to get added as a team member, but once that's done I'll add you to @NixOS/cuda-maintainers. Don't hesitate to ping me if that doesn't happen after a day or two!

Ok, all checks passed. Went ahead and merged.

FWIW, it appears @cigrainger is now a member of the maintainers team (welcome!) and can now either "Request to Join" the team (at https://github.com/orgs/NixOS/teams/cuda-maintainers/members), or be invited to it :)


feature request: External variable in extension

Thanks for the proposal, but please discuss this idea on the swift-evolution mailing list to gather feedback and refine the ideas before initiating a pull request.


Discussion: [WinUI 3 App Design Ideas]

Discussion: [Win UI 3 App Designs - Concepts]

I came across these designs on twitter. They are concepts of how Windows Phone would look if it was still being worked on. These are some great designs for how UWP could look in WinUI 3 on Windows 10X & Windows 10. Tablet Mode would also benefit from apps designed like this.
This is the type of consistency I am looking for.
I would love for the XAML controls to make this a reality with WinUI 3.

Related Links

https://twitter.com/zeealeid/status/1202627055164313602?s=19

I do think a less "free" approach when recommending and inbox UIs would do a lot for bringing a greater sense of consistency and coherence - which could encourage other apps to do the same.
Microsoft should put forward an "opinion" on how app UIs should look on Windows, and "sell" that opinion.

Microsoft should also make it very clear to third-party developers what the utility of a second screen is on the new dual-screen form factor.
Complimented by appropriate documentation, I expect there to be controls optimized for these devices. For instance, the SplitView should include a FormFactor property which adjusts the control's resizing behavior to work on them.

I do think a less "free" approach when recommending and inbox UIs would do a lot for bringing a greater sense of consistency and coherence - which could encourage other apps to do the same.
Microsoft should put forward an "opinion" on how app UIs should look on Windows, and "sell" that opinion.

I agree with this. Just as important that we have feature complete finished templates that are so good that the developer don't feel the need to change them.

@zeealeid check this out.


webrtc.org/bugs/ works, but webrtc.org/bugs doesn't

Answer here may be useful:
http://stackoverflow.com/questions/31637884/how-to-handle-trailing-slashing-in-google-app-engine-app-yaml

This is now fixed! Try it: https://webrtc.org/bugs
It's been fixed at the server level so no PRs are attached to this bug.

Do note that https://www.webrtc.org/native-code/android does not redirect to http://webrtc.org/native-code/android/ while https://www.webrtc.org/native-code/android/ does (thanks @tednakamura for pointing this out).

Hm... strange. I'll make sure to fix this. Will keep this open until I do.
Thanks!

This was indeed a bug in the serving app where it would respond with incorrect location header.
The location was generated using a relative URL, e.g. native-code/android which, when resolved to the actual abs URL, would point the client to /native-code/native-code/android/.
This is now fixed.


refactor LogProfile --> LogDuration?

If the hook is not planned to be used for something else than measuring duration of processes, then it would be reasonable to give it a more self describing name LogDuration.

The hook itself does not measure anything. It just logs the time profile which is collected by MainLoop, program profiling or profiler is a common term used in the field for measuring execution times of particular code blocks. See https://en.wikipedia.org/wiki/Profiling_(computer_programming).


problems with pymbar version 4

There seems to be a new version of pymbar (https://pymbar.readthedocs.io/en/master/moving_from_pymbar3.html) which is not always compatible with the old one (3.x), maybe we should start supporting the new version (which means that we might get problems when using old environments)

we could also pin the version for now.


Tooltip Card

Tooltip Card
Please add our tooltip card to our HRA Design System Storybook.

Styling Specifications

Variants

Medium with Label Medium font
Large with Label Large font
Variants with and without sections

Section title color: HRA Blue #201E3D
Body color: Gray 2 #4C4C58
Drop shadow/box shadow
8 degree corner radius

Behavior

Activates on hover of a hover target:

Info icon: Mat-Icon-Button
CDE's Anchor Icon

Future versions notes: Additional variants will likely be added in future iterations. We may need clickable functionality to display screenshots and buttons to dismiss the tooltip.

Usage

Used to provide additional context about a feature to condense our UIs.

Current UIs with this feature

Cell Distance Explorer
Dashboards

UIs that will eventually use this component

FTU Explorer
EUI
RUI
ASCT+B Reporter
HRA Portal
& likely more

Component

Design System Component: Card: Tooltip

@LibbyUX here is the preview link for the tooltip in the design system


"Go to definition" on symbol with multiple definitions does not navigate to the first item, and the first item can't be opened

Previously was https://github.com/microsoft/vscode/issues/69613

F12 on onDidSelection at https://github.com/microsoft/vscode/blob/6e498530cc95080ab907d5048b712ce5e8972425/src/vs/platform/list/browser/listService.ts#L703
It's impossible to navigate to the first result

This is from https://github.com/microsoft/vscode/issues/78174 @alexr00 but that change seems correct, I think we should fix https://github.com/microsoft/vscode/blob/6e498530cc95080ab907d5048b712ce5e8972425/src/vs/editor/contrib/referenceSearch/referencesWidget.ts#L385, I think it is just assuming that browserEvent will be undefined when triggered by the keyboard. We can change this for pass for any KeyboardEvent too.

Thanks @roblourens


Arrow keys don't work on slider

Spacebar works but not really that useful as you can only select the value already selected. Would be nice have arrow keys move the thumb.

Should need a keyboard controller in addition to mouse controller.