Undocumented different behaviors of handling generic types in v1 and v2

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
I am creating a model A that has two type vars T and S.
I am trying to define a type as list[A[T, str], however with pydantic v2 I got error:
TypeError: There are no type variables left in list[__main__.A[~T, str]]

which does not happen with pydantic v1.
Example Code
from typing import Generic, TypeVar

from pydantic import BaseModel
from pydantic.v1 import BaseModel as BaseModelv1
from pydantic.v1.generics import GenericModel

T = TypeVar("T")
S = TypeVar("S")

# ==============================================
# Pydantic v1
# ==============================================
class A(GenericModel, Generic[T, S]):
    x: T
    y: S

B = list[A[T, str]]

C: B[int] = [A(x=1, y="a")]

class D(BaseModelv1):
    x: B[int]

# ==============================================
# Pydantic v2
# ==============================================

class AA(BaseModel, Generic[T, S]):
    x: T
    y: S

BB = list[AA[T, str]]

CC: BB[int] = [AA(x=1, y="a")]
# TypeError: There are no type variables left in list[__main__.AA[~T, str]]

class DD(BaseModel):
    x: BB[int]
    # TypeError: There are no type variables left in list[__main__.AA[~T, str]]

class EE(BaseModel):
    x: list[AA[int, str]] # without the alias BB, OK!

Python, Pydantic & OS Version
pydantic version: 2.0
        pydantic-core version: 2.0.1 release build profile
                 install path: /home/yun/.conda/envs/pydantic2/lib/python3.9/site-packages/pydantic
               python version: 3.9.17 (main, Jul  5 2023, 20:41:20)  [GCC 11.2.0]
                     platform: Linux-6.4.6-200.fc38.x86_64-x86_64-with-glibc2.37
     optional deps. installed: ['typing-extensions']

Selected Assignee: @lig

I could replace  the type alias B = list[A[T, str]] by a RootModel, but RootModel has problem with the type checker (pyright). For example in the following example, pyright warns that "list[AA[int, str]]" is incompatible with "BB[int]".
from typing import Generic, TypeVar

from pydantic import BaseModel, RootModel

T = TypeVar("T")
S = TypeVar("S")

class AA(BaseModel, Generic[T, S]):
    x: T
    y: S

BB = RootModel[list[AA[T, str]]]

class DD(BaseModel):
    x: BB[int]

# OK!
DD(x=BB[int]([AA[int, str](x=3, y="a")]))

# type checker error
# Pyright: Argument of type "list[AA[int, str]]" cannot be assigned to parameter "x" of type "BB[int]" in function "__init__"
#   "list[AA[int, str]]" is incompatible with "BB[int]" [reportGeneralTypeIssues]
DD(x=[AA[int, str](x=3, y="a")])

# Runtime Error and type checker error
# Input should be a valid dictionary or instance of AA[int, str] [type=model_type, input_value=AA(x=3, y='a'), input_type=AA]
DD(x=[AA(x=3, y="a")])

to get rid of the type checker error and runtime error, I must explicitly write all the concrete types.

I'm having the same issue. Did you find a workaround that didn't break your type checker?
Related SO question: https://stackoverflow.com/questions/76965613/there-are-no-type-variables-left-after-union-of-pydantic-models

Here is a minimal reproducible example:
from pydantic import BaseModel
from typing import Generic, TypeVar

T = TypeVar("T")

class Model(BaseModel, Generic[T]):
    data: T

GenericAlias = Model[T] | None

def f() -> GenericAlias[int]: ...

Note:  This causes different errors depending on the Python minor version used!
Error with Python 3.10.12:
Traceback (most recent call last):
  File "/path/to/module.py", line 14, in <module>
    def f() -> GenericAlias[int]: ...
TypeError: There are no type variables left in __main__.Model | None

Error with Python 3.11.4:
Traceback (most recent call last):
  File "/path/to/module.py", line 14, in <module>
    def f() -> GenericAlias[int]: ...
               ~~~~~~~~~~~~^^^^^
TypeError: __main__.Model | None is not a generic class

My system in both cases just with varying Python versions:
             pydantic version: 2.3.0
        pydantic-core version: 2.6.3
          pydantic-core build: profile=release pgo=true
                 install path: /path/to/pydantic
               python version: 3.10.12 (main, Aug 25 2023, 10:09:22) [GCC 13.2.1 20230801]
               /
               python version: 3.11.4 (main, Jun 24 2023, 20:38:45) [GCC 13.1.1 20230429]
                     platform: Linux-6.4.11-arch2-1-x86_64-with-glibc2.38
     optional deps. installed: ['devtools', 'email-validator', 'typing-extensions']

So far I was unable to figure out where that error is actually coming from, but suffice it to say the code is valid in terms of typing, passes Mypy and does not raise that error, if BaseModel is omitted from the bases of Model or replaced with some other class.
The fact that the stacktrace is so short could indicate that the error is emitted at the CPython level, but this is just conjecture. But if that is true, I would assume that Pydantic does something to the generic class that makes it appear non-generic at runtime.
Whether that happens in BaseModel.__class_getitem__, at the metaclass level or somewhere else, I don't know.
I found a possibly interesting, somewhat related discussion about implicitly generic type aliases.

Python 3.11.4 (main, Jul 25 2023, 17:36:13) [Clang 14.0.3 (clang-14<IP_ADDRESS>.1)] on darwin
TypeError: Fields of type "<class 'main.RespList'>" are not supported.
I am using FastAPI to write an api and need to return this general data structure. Unlike the above, I currently have no inheritance behavior, so it seems that generic types are not supported?
I use the generic type as the return type to display a more complete data structure in the OpenAPI UI

main.py file

from dataclasses import dataclass
from typing import Generic, TypeVar

from fastapi import FastAPI

app = FastAPI()
app.debug = True
T = TypeVar("T")

@dataclass
class UserData:
    id: int
    name: str
    age: int
    avatar: str

@dataclass
class BookData:
    id: int
    name: str
    use: int

@dataclass
class RespList(Generic[T]):
    code: int
    data: list[T]

@app.get("/api/getUser")
def index():
    return RespList[UserData](
        code=200,
        data=[
            UserData(
                id=i,
                name=f"test_{i}",
                age=i,
                avatar=f"https://avatars.dicebear.com/v2/avataaars/{i}.svg",
            ).__dict__
            for i in range(10)
        ],
    )

# run it> uvicorn main:app --reload

Below is the traceback
-- when i use RespList[UserData]
➜ ~ uvicorn main:app --reload
INFO:     Will watch for changes in these directories: ['/Users/alan/me/recatpy_']
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [43575] using WatchFiles
Process SpawnProcess-1:
Traceback (most recent call last):
  File<EMAIL_ADDRESS>line 314, in _bootstrap
    self.run()
  File<EMAIL_ADDRESS>line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
    target(sockets=sockets)
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File<EMAIL_ADDRESS>line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File<EMAIL_ADDRESS>line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
    config.load()
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File<EMAIL_ADDRESS>line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/alan/me/recatpy_/main.py", line 33, in <module>
    @app.get("/api/getUser")
     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/routing.py", line 704, in decorator
    self.add_api_route(
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/routing.py", line 643, in add_api_route
    route = route_class(
            ^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/routing.py", line 448, in __init__
    self.response_field = create_response_field(
                          ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/utils.py", line 99, in create_response_field
    return ModelField(**kwargs)  # type: ignore[arg-type]
           ^^^^^^^^^^^^^^^^^^^^
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 755, in pydantic.fields.ModelField._type_analysis
TypeError: Fields of type "<class 'main.RespList'>" are not supported.

dict[str, int | list[dict[str, int | str]]] or dict[str, int | list[UserData]]
@app.get("/api/getUser")
def index() -> dict[str, int | list[dict[str, int | str]]]:
    return dict(
        code=200,
        data=[
            dict(
                id=i,
                name=f"test_{i}",
                age=i,
                avatar=f"https://avatars.dicebear.com/v2/avataaars/{i}.svg",
            )
            for i in range(10)
        ],
    )

I can redeclare the class structure, but it's too much trouble.

Python 3.11.4 (main, Jul 25 2023, 17:36:13) [Clang 14.0.3 (clang-14<IP_ADDRESS>.1)] on darwin TypeError: Fields of type "<class 'main.RespList'>" are not supported.
I am using FastAPI to write an api and need to return this general data structure. Unlike the above, I currently have no inheritance behavior, so it seems that generic types are not supported?
I use the generic type as the return type to display a more complete data structure in the OpenAPI UI

main.py file

from dataclasses import dataclass
from typing import Generic, TypeVar

from fastapi import FastAPI

app = FastAPI()
app.debug = True
T = TypeVar("T")

@dataclass
class UserData:
    id: int
    name: str
    age: int
    avatar: str

@dataclass
class BookData:
    id: int
    name: str
    use: int

@dataclass
class RespList(Generic[T]):
    code: int
    data: list[T]

@app.get("/api/getUser")
def index():
    return RespList[UserData](
        code=200,
        data=[
            UserData(
                id=i,
                name=f"test_{i}",
                age=i,
                avatar=f"https://avatars.dicebear.com/v2/avataaars/{i}.svg",
            ).__dict__
            for i in range(10)
        ],
    )

# run it> uvicorn main:app --reload

Below is the traceback -- when i use RespList[UserData]
➜ ~ uvicorn main:app --reload
INFO:     Will watch for changes in these directories: ['/Users/alan/me/recatpy_']
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [43575] using WatchFiles
Process SpawnProcess-1:
Traceback (most recent call last):
  File<EMAIL_ADDRESS>line 314, in _bootstrap
    self.run()
  File<EMAIL_ADDRESS>line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
    target(sockets=sockets)
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File<EMAIL_ADDRESS>line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File<EMAIL_ADDRESS>line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
    config.load()
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File<EMAIL_ADDRESS>line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/alan/me/recatpy_/main.py", line 33, in <module>
    @app.get("/api/getUser")
     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/routing.py", line 704, in decorator
    self.add_api_route(
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/routing.py", line 643, in add_api_route
    route = route_class(
            ^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/routing.py", line 448, in __init__
    self.response_field = create_response_field(
                          ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/fastapi/utils.py", line 99, in create_response_field
    return ModelField(**kwargs)  # type: ignore[arg-type]
           ^^^^^^^^^^^^^^^^^^^^
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 755, in pydantic.fields.ModelField._type_analysis
TypeError: Fields of type "<class 'main.RespList'>" are not supported.

dict[str, int | list[dict[str, int | str]]] or dict[str, int | list[UserData]]
@app.get("/api/getUser")
def index() -> dict[str, int | list[dict[str, int | str]]]:
    return dict(
        code=200,
        data=[
            dict(
                id=i,
                name=f"test_{i}",
                age=i,
                avatar=f"https://avatars.dicebear.com/v2/avataaars/{i}.svg",
            )
            for i in range(10)
        ],
    )

I can redeclare the class structure, but it's too much trouble.

Name: pydantic
Version: 1.10.12
Summary: Data validation and settings management using python type hints
Home-page: https://github.com/pydantic/pydantic
Author: Samuel Colvin
Author-email<EMAIL_ADDRESS>License: MIT
Location: /opt/homebrew/lib/python3.11/site-packages
Requires: typing-extensions
Required-by: copier, fastapi, flet

When I write this question to end...
After reading everyone's comments,I found the reason by trying, and finally used the latest version pydantic 2.3.0
itself has been resolved 👍

@haoyun Could you please check the behavior again?
It looks like #7006 is related to this and it was fixed lately.

@haoyun Could you please check the behavior again?
It looks like #7006 is related to this and it was fixed lately.

I'm not haoyun, but I can repro on 2.3.0 with his original example. @daniil-berg has a more minimal example that also errors on 2.3.0.
~/tmp/so is  v0.1.0
❯ python -V
Python 3.10.12

~/tmp/so is  v0.1.0
❯ python -c 'import pydantic.version; print(pydantic.version.version_info())'
             pydantic version: 2.3.0
        pydantic-core version: 2.6.3
          pydantic-core build: profile=release pgo=true
                 install path: /home/asmith/.cache/pypoetry/virtualenvs/so-u1ptCtqB-py3.10/lib/python3.10/site-packages/pydantic
               python version: 3.10.12 (main, Jun  7 2023, 12:45:35) [GCC 9.4.0]
                     platform: Linux-<IP_ADDRESS>-microsoft-standard-WSL2-x86_64-with-glibc2.31
     optional deps. installed: ['typing-extensions']

~/tmp/so is  v0.1.0
❯ python main.py
Traceback (most recent call last):
  File "/home/asmith/tmp/so/main.py", line 21, in <module>
    C: B[int] = [A(x=1, y="a")]
TypeError: There are no type variables left in list[__main__.A[T, str]]

A relevant observation: listing the generic as the first parent of the class removes the buggy behavior.
T = TypeVar("T")

# exhibits the buggy behavior
class BuggyModel(BaseModel, Generic[T]):
    data: T

# does not!
class FixedModel(Generic[T], BaseModel):
    data: T

The problem here is that, for various reasons, the value returned by BaseModel.__class_getitem__ is not an instance of typing._GenericAlias, but a class of its own. Note that you may run into other bugs if you try putting Generic[T] as the first class there, since you'll get a _GenericAlias as the result of the class getitem, rather than a model subclass as intended.
The problem is that when the typing module tries to parametrize the generic parametrized list, it runs into problems because it doesn't recognize that that parameter is still a parameter of the inner model.
I believe this is fixable through some reworking of the BaseModel.__class_getitem__ function and associated generics functionality, but I think it may be a lot of work. PR definitely welcome if someone wants to try but it gets a bit hairy.
I know it may be unsatisfying, but my suggestion would be to make an alias for A[T, str] instead of list[A[T, str]] and use that, so:
B = list[A[T, str]]

becomes
B = A[T, str]
# Instead of B[int], you now do list[B[int]]

Hopefully we can get this fixed properly one day so your snippet "just works", but I think it will take some time.

Also, I think detecting this behavior in BaseModel.__class_getitem__ and giving a warning could be a good first step.

we need to document the behaviour, and add a warning when the parents are used in the "wrong" order.

we need to document the behaviour, and add a warning when the parents are used in the "wrong" order.

Hmm yes, but currently there's no right order, yeah?
class GenericFirst(Generic[T], BaseModel):
    """Produces a _GenericAlias object, not a submodel"""
    pass

class ModelFirst(BaseModel, Generic[T]):
    """Produce a submodel, but exposes the bug described in this ticket
    pass

# namely:

T1 = ModelFirst | str | int
T2 = GenericFirst | str | int
T1[list]  # fails, but shouldn't!
T2[list]  # succeeds the way the previous line should!

add a warning when the parents are used in the "wrong" order.

I opened https://github.com/pydantic/pydantic/issues/7845 (before even seeing this) and started working on it. A few tests specifically related to parents in the wrong order started failing, and digging into the history led me here.

The problem here is that, for various reasons, the value returned by BaseModel.__class_getitem__ is not an instance of typing._GenericAlias, but a class of its own. Note that you may run into other bugs if you try putting Generic[T] as the first class there, since you'll get a _GenericAlias as the result of the class getitem, rather than a model subclass as intended.
The problem is that when the typing module tries to parametrize the generic parametrized list, it runs into problems because it doesn't recognize that that parameter is still a parameter of the inner model.

Yes, specifically there are places where it could pick up __parameters__ from the model class but it doesn't because it expects to get those from an object like a _GenericAlias, not a class:
https://github.com/python/cpython/blob/37e4e20eaa8f27ada926d49e5971fecf0477ad26/Lib/typing.py#L262-L264
https://github.com/python/cpython/blob/37e4e20eaa8f27ada926d49e5971fecf0477ad26/Lib/typing.py#L1293-L1295
One even has a comment:
We don't want __parameters__ descriptor of a bare Python class.

I was able to work around this somewhat with some monkeypatching:
import typing
from typing import Generic, TypeVar, List, Union

from pydantic import BaseModel

def patch_method(original):
    def patched(self, args, *rest):
        if not isinstance(args, tuple):
            args = (args,)
        args = tuple(
            typing._GenericAlias(t, t.__parameters__)
            if isinstance(t, type)
            and issubclass(t, BaseModel)
            and hasattr(t, "__parameters__")
            else t
            for t in args
        )
        return original(self, args, *rest)

    return patched

typing._GenericAlias.__getitem__ = typing._tp_cache(
    patch_method(typing._GenericAlias.__getitem__)
)
typing._GenericAlias._make_substitution = patch_method(
    typing._GenericAlias._make_substitution
)
typing._SpecialGenericAlias.__getitem__ = typing._tp_cache(
    patch_method(typing._SpecialGenericAlias.__getitem__)
)

T = TypeVar("T")

class A(BaseModel, Generic[T]):
    pass

L = List[A[T]]
print(L[int])
# typing.List[__main__.A[int]]

U = Union[list[T], A[T]]
print(U[str])
# typing.Union[list[str], __main__.A[str]]

U2 = List[T] | A[T]
print(U2[float])
# typing.Union[typing.List[float], __main__.A[float]]

Note that this code isn't exhaustive and it may not even be correct, but I think it demonstrates the point. However it doesn't work when the typing module isn't involved, i.e. when using only builtin types like list instead of List and the | operator instead of typing.Union, so e.g. list[A[T]] or A[T] | None don't work. This is for the same kind of reason as before: some internal code sees a class object and ignores its __parameters__. But now the internal code is written in C:
https://github.com/python/cpython/blob/main/Objects/genericaliasobject.c#L252

Hopefully we can get this fixed properly one day so your snippet "just works", but I think it will take some time.

It seems that a full solution supporting | and builtin generic types (i.e. supporting the most convenient syntax) would require either:

Monkeypatching C code,
Upstream changes in Python, or
BaseModel.__class_getitem__ returning something that isn't a type, at least when some of the arguments are type variables.

In the meantime, this comment seems fair:

Hmm yes, but currently there's no right order, yeah?

I'd like to know if  inheriting from Generic before BaseModel is still considered to always be wrong, in which case I'll go ahead with adding a warning. Or can this issue be considered as an argument in favour of sometimes doing it that way? Will the problems caused by the wrong order always be dealbreakers?


Fixes GH-251 (Incorrect column when detecting missing spaces)

I had to modify testhelper so I could provide a character number and it could verify that the correct character was picked up by JSHINT.
The fix is fairly trivial, instead of passing the nexttoken we pass left which is the token just before the space. The column count is at the beginning of that token so we add the length of the token to the from property and that will give us the proper character where the space is expected.

My changes on test/testhelper are optional. So you can pass an extra parameter to .addError which can contain any of the properties returned by JSHINT.

Merged in, thanks!


[IOTDB-6206] Metric: merge metric algorithm library and optimize some core components

IOTDB-6206

Compare the performance of the metric algorithm library, merge them, and remove the library selection parameter.
Try to optimize the performance of some core components, such as counter, rate.
Removed Micrometer's MeterRegistry and transferred the management of Metric indicators to IoTDB, which saves twice as much memory as the Micrometer version.
JmxReporter has been rewritten to save twice as much memory as the Micrometer version as well.
Detailed docs: https://apache-iotdb.feishu.cn/docx/P5svdKZTxoVtqax0mgvcCeYInQe

Note: this pr is a duplicate and optimized version of 11378, since 11378 was closed by mistake

@OneSizeFitsQuorum @SpriCoder This is the optimized version of https://github.com/apache/iotdb/pull/11378, as https://github.com/apache/iotdb/pull/11378 is closed by mistake. PTAL~


Problems with vue onUpdated event

I am interested in helping provide a fix!
Yes
Which generators are impacted?

[ ] All
[ ] Angular
[ ] HTML
[ ] Preact
[ ] Qwik
[ ] React
[ ] React-Native
[ ] Solid
[ ] Stencil
[ ] Svelte
[X] Vue
[ ] Web components

Reproduction case
Additional information is available in full code
Expected Behaviour
mitosis

vue

Actual Behaviour
vue

Additional Information
Full Code:
import { onUpdate, useStore } from<EMAIL_ADDRESS>
export default function MyComponent(props) {
  const state = useStore({
    scale: 1
  })

  onUpdate(() => {
    if (!props.src && !props.icon) return

    state.scale = Math.random() * 10
  })

  return <div>{state.scale}</div>
}

@wabi-habi thanks for filing. We're missing the { and } braces in this line:
https://github.com/BuilderIO/mitosis/blob/811e71936f27c5908d89b4d5fb4d78863ffa03f0/packages/core/src/generators/vue/compositionApi.ts#L135
If you wanna contribute a fix that'd be awesome! 🙏🏽

make the fix
run yarn snapupdate in packages/core to update snapshots
run yarn fm:prettier in the root of the codebase to format your changes

This is really necessary, as many components are completely unwieldy without jsx functionality


[QUESTION] Limiting columns on export

Prerequisites

[x] Have read and understood: https://github.com/Maatwebsite/Laravel-Excel/blob/3.1/.github/SUPPORT.md
[x] Checked if your Laravel Excel version is still supported: https://docs.laravel-excel.com/3.1/getting-started/support.html#supported-versions
[x] Checked that your question isn't already asked before.
[x] Filled in the entire issue template

Versions

PHP version: 7.2
Laravel version: 7.22.4
Package version:  3.1.20

Description
Is there a column limiting functionality in export?
Additional Information
Hello, I am facing a problem with excel export, Case: There are 1024 columns in the exported excel.only 10 columns have data - all others are empty or not using But in my MacBook, there is a limitation of 1000 column per sheet, Can I limit the column count in this dependency?

Just set in query something like
->where('id','<',10)
Hope that helps

@Ferhnir This may work for row limiting, but I need to limit sheet columns count, any other idea?

You have full control over the amount of columns being exported already by using a mapping and telling the package which exact columns you want to be exported.

@patrickbrouwers I am exporting 10 columns only using the mapping method. But in my mac, when i open the respective exported file, the default empty columns are 1024. But no issues with windows/linux sheets, only in mac , they are not supporting over 1000 columns

Sounds like a Mac issue then, don't think there's anything we can do about that. Perhaps post a question on Stackoverflow, maybe someone knows what's happening.


Add test coverage github action

This github action does the following for pull requests:

Checks out this PR's code
Checks out code on main
Calculates Go test coverage for each
Leaves a comment on the PR with a test coverage report with the difference between PR coverage vs main coverage
When commits are added to the PR, the existing comment should be updated with an up-to-date coverage report.

To do:

[x] Backend coverage
[x] Add frontend coverage
[ ] Migrate this action to another repo so it can be referenced from other repos

I was very much inspired by the guidelines defined by the Loki team but didn't use drone reports as was done in the proposed solution...

Thanks! Once I've put the final touches, I think we can merge it as-is so that it can start seeing some action (::crickets::) and I'll move it separately afterwards.


update region tags

Updating and removing region tags only

Please remove the tag when it's ready to merge!


Storybook not available

Hi @gabro and @veej ,
unfortunately, the page https://storybook.bento.our.buildo.io/ doesn't work. I don't know which is the right place to inform you about this issue...
Here's the message that appears:

Hi @LauGroupie95, thanks for reporting! Unfortunately, this looks like an issue on Chromatic's end, I sent a support request, and I will post an update here soon.
In the meantime, you can access the same storybook at https://main--61e0a7fd93786f003a6b10cf.chromatic.com/
Thanks again


Wait for conversions in continuous example

Previously polling rate (apparent sample rate) was limited purely by I2C speed, script will now wait a full conversion cycle until it next reads the conversion result.
Requires #61 to be merged first.
With RATE=250 and i2c_baudrate=1000000 (1 MHz)
Old
Took 0.139 s to acquire 1000 samples.

Configured:
    Requested       =   250    sps
    Reported        =   250    sps

Actual:
    Polling Rate    =  7171.07 sps
                       2868.43%
    Repeats         =   966
    Conversion Rate =   243.82 sps   (estimated)

New
Took 4.009 s to acquire 1000 samples.

Configured:
    Requested       =   250    sps
    Reported        =   250    sps

Actual:
    Polling Rate    =   249.41 sps
                         99.76%
    Repeats         =    25
    Conversion Rate =   243.18 sps   (estimated)

Also constrains polling rate at any other valid sample rate, eg. RATE=3300 and i2c_baudrate=1000000 (1 MHz)
New
Took 0.309 s to acquire 1000 samples.

Configured:
    Requested       =  3300    sps
    Reported        =  3300    sps

Actual:
    Polling Rate    =  3234.39 sps
                         98.01%
    Repeats         =    25
    Conversion Rate =  3153.53 sps   (estimated)

This pull request resolves #27, #35, #43.
New
Took 10.003 s to acquire 33000 samples.

Configured:
    Requested       =  3300    sps
    Reported        =  3300    sps

Actual:
    Polling Rate    =  3298.86 sps
                         99.97%
    Skipped         =     2
    Repeats         =   444
    Conversion Rate =  3254.48 sps   (estimated)

Plot of time.monotonic() error in comparison to time_next_sample at ADC read (3,300 sps jitter target is 303 μs)

Bugs: Will often skip first 1 or 2 samples.

New
Fix it skipping 1-2 samples on the first acquisition due to setup time, still skips 1 sample every so often with >1000 samples
Took 0.303 s to acquire 1000 samples.

Configured:
    Requested       =  3300    sps
    Reported        =  3300    sps

Actual:
    Polling Rate    =  3298.52 sps
                         99.96%
    Skipped         =     0
    Repeats         =    27
    Conversion Rate =  3209.46 sps   (estimated)

Sorry. Just now seeing this.
So this essentially looks like you've implemented something like suggested here?
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/issues/35#issuecomment-501747400

Sorry. Just now seeing this.
So this essentially looks like you've implemented something like suggested here?
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/issues/35#issuecomment-501747400

Sorry. Just now seeing this.
So this essentially looks like you've implemented something like suggested here?
#35 (comment)

Yes pretty much although this implementation is a bit more advanced to make sure the sample rate doesn't drift or over-sample to catch up.

Yep. Thanks. Looks like you also tested it, so I'm fine with merging. If this was useful for you, hopefully will be for others trying to use fast read.


fix clusterset rbac

https://github.com/open-cluster-management/backlog/issues/13014

/assign @qiujian16 @zhiweiyin318


PublicKeyBinary

This switches internal structs to use PublicKeyBinary as mostly a drop in replacement for PublicKey.
It also optimizes a number of clones away for report and ingest_id since that's just not needed.
Requires https://github.com/helium/helium-crypto-rs/pull/41 to land, and versioned, and Cargo.toml to be updated here

included now with #245


Use nicer PlantUML icons for docs

Learned about http://plantuml.com/de/stdlib and the K8s icon set.
Make the diagrams more eyecandy with it.
See

https://mrhaki.blogspot.com/2018/06/plantuml-pleasantness-using-aws-font.html
http://plantuml.com/de/skinparam

and note the usage of
!includeurl "https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource/k8s-sprites-unlabeled-25pct.iuml"

to include the K8s iconset on older versions of PlantUML.
Example for "Secrets" (too verbose, see skinparam):
participant "<color:#royalblue><$secret></color>\nSecrets" as S

This has been done with salvation of #92.


Suggestions and changes and fixes

Features:

[ ] Notifications
[ ] Built-in interface with suggestions and approvals (instead of piggybacking on messages)

Subtypes:

[ ] Ability to suggest tags (warnings, labels, etc) for a post

Related to #3, since it'll probably piggyback off a similar system. Includes reporting of typos and managing of associations to the reply object.
Keywords: metadata, community-approved, suggested

Logs:
[19:44] Marri: hm, Throne, I know we have some of the suggesting tags technical rails tied to Tags, but do you think we should move that to a more general Suggestion model? So people could suggest like, facecasts for characters or descriptions for Templates?
[20:29] Throne✶: Suggestion sounds like a good thing - I'm not sure how we'd implement it, though, maybe sort of like a modified audit?
[20:29] Throne✶: If we want it to be quite generalized it could be awkward to do
[20:30] Marri: Text suggestions are proooobably straightforwards as long as it's "here is the full entire thing I suggest you change to"
[20:32] Throne✶: would it be – attached model, polymorphically, then field to change, then thing to change it to?
[20:32] Marri: yeah probably
[20:32] Marri: might work easier if that was separate from suggested tags though
[20:32] Throne✶: that's easier, nod
[20:32] Throne✶: hmm
[20:32] Marri: then it's just the field/change
[20:32] Throne✶: I'm wondering what sorts of fields we have an so what we'd want to support
[20:33] Throne✶: text fields, associated models in the case of characters on posts
[20:33] Throne✶: like, if you say, "no that's the wrong Bell/Matimo/Sadde did you mean this instead"
[20:33] Throne✶: tags, in the case of posts…
[20:33] Kaylin: ooooo yes
[20:35] Marri: we could use STI on it? TextSuggestion, TagSuggestion, AssociationSuggestion?
[20:35] Throne✶: TagSuggestion would need +/- I think?
[20:35] Throne✶: like, "I suggest you remove this tag" or "I suggest you add this tag"?
[20:35] Throne✶: or – are we only imagining addition suggestions
[20:35] Throne✶: wrt tags
[20:35] Marri: truuuuuue
[20:35] Marri: so maybe an abstract class instead of a STI table
[20:35] Throne✶: that seems fair but I hadn't considered it
[20:36] Throne✶: (my internet is a bit screwy so I'm responding to some things a bit late)
[20:36] Throne✶: so – text and association work for "replace the current thing with this new thing", I think? … it'd interact poorly if multiple typo fixes were suggested, hmmm
[20:36] Marri: I am Definitely So Upset*
[20:36] Marri: *no
[20:37] Marri: which is why it has to be "here is the full entire suggestion"
[20:37] Throne✶: nod
[20:37] Throne✶: wait – I'm actually unclear what you mean
[20:38] Marri: that if the reply had "hi my nmae is Bela" your suggestion is "hi my name is Bella" not "hi my name is Bela" and then another for "hi my nmae is Bella"
[20:38] Throne✶: oh
[20:38] Throne✶: I meant, like
[20:38] Throne✶: what if one user suggests "hi my name is Bela" (fixing 'name') and someone else suggests "hi my nmae is Bella" (fixing 'Bella')(edited)
[20:38] Throne✶: it'd be awkward to compose them
[20:39] Marri: I think at that point the author can probably go sort it out themselves?
[20:39] Throne✶: (this would be rarer since multiple typo reports by different users on a single post is far less likely)
[20:39] Throne✶: that seems fair
[20:39] Marri: also I feel like there should be a way to auto-accept
[20:39] Throne✶: at least for a first go at the thing; if we think of a better idea we can always figure that out
[20:39] Marri: like, options are: allow edits, allow suggestions, nope
[20:39] Throne✶: auto-accept like "any suggestions by this user are accepted"?
[20:40] Throne✶: I think we'll want to – scope it?
[20:40] Marri: thaaat is even trickier but sure
[20:40] Throne✶: if that makes sense?
[20:40] Marri: lol
[20:40] Throne✶: like
[20:40] Marri: we can do piecemeal yeah
[20:40] Throne✶: if we have "any user can edit", that'd be, uh
[20:40] Marri: well it would be logged in users by definition, probably
[20:40] Throne✶: potentially problematic?
[20:40] Throne✶: yeah
[20:40] Marri: I definitely don't want random internet anon edits
plus_one3
[20:40] Throne✶: but still
[20:40] Marri: agreed
[20:41] Marri: I think "allow suggestions" is maybe a good default? And the suggestions page could have a quick link to "I don't like this, dismiss them all and disallow in future"?
[20:41] Throne✶: okay, so, first pass could just be "allow suggestions from any logged in user but do not automatically accept"
[20:41] Throne✶: yeah
[20:41] Marri: that said
[20:41] Throne✶: and then we can add new options from there either at the same time or in bits and pieces later if we decide on that
[20:41] Marri: how are you picturing "suggest different character"
[20:41] Marri: that's just a field edit
[20:41] Throne✶: picturing what part of the flow?
[20:41] Marri: post.characters is calculated, not tagged
[20:42] Throne✶: I'm confused
[20:42] Marri: to say "you used the wrong Bella in this post" you have to actually go find the post/reply in the thread with the character Bella and update it
[20:42] Marri: not remove an association
[20:42] Marri: because we calculate automatically from replies
[20:43] Throne✶: if I were to suggest a different character, I'd be thinking something along the lines of:
- sees post in wormverse that mysteriously includes Golden instead of Lorica
- clicks "suggest change", says "this should be Lorica instead"
- Alicorn gets notification saying that such a suggestion is made, would she like to accept or reject
[20:43] Throne✶: uh, reply*
[20:43] Throne✶: so it'd be like a typo report
[20:43] Marri: though we should probably have a link to "search this post for this character" on the metadata page as well, hm
[20:43] Throne✶: oh
[20:43] Marri: and when she accepts it does a character replace?
[20:43] Throne✶: I was meaning – suggest character for a single reply
[20:43] Throne✶: like
[20:44] Marri: then yeah that's just a field edit, at least in theory
[20:44] Throne✶: if there was a pealing and she accidentally used Golden for Pattern's conversation
[20:44] Throne✶: but Golden was also in the thread
[20:44] Throne✶: I'd be like "oh hey here this should be Pattern? looks like it's the wrong Bell" and then Alicorn would – somehow – get that and be able to edit that reply and mmmaybe look for replies in same thread by same character and auto-replace those
[20:45] Throne✶: character "typos" occur less than other typos though so this is lower priority anyway
[20:45] Marri: so that's a field replace, if we give them a character replace UI, and then again maybe have the stats page provide a link to Characters: Bella (posts), and Bella links to the character page and posts links to search?
[20:46] Throne✶: nod
[20:46] Throne✶: and possibly making character#replace more convenient for selecting "these specific replies in this specific post" instead of "all replies in this post"? but, separate improvement

Allowing some Trusted Changers to change your stuff without your approval would be nice. So would a centralized log of things of yours people have changed recently, or a notification setup for this.


Play/Pause media cannot be mapped anymore?

Microsoft PowerToys version
0.64.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
Keyboard Manager
Steps to reproduce
I have successfully mapped previously CTRL (left) + ALT (left) + F10 to "Play/Pause Media" but it stopped working since the previous release. If I use the same shortcut for "Next track" it works.
I also have mapped CTRL (left) + ALT (left) + F11 for "Previous Track" and CTRL (left) + ALT (left) + F12 for "Next Track" and these kept working throughout.
✔ Expected Behavior
Having CTRL (left) + ALT (left) + F10 mapped to "Play/Pause Media" I am expecting for my Spotify (and/or YouTube) to stop/resume playing when the combination is pressed but nothing happens. This has been working before the previous release.
❌ Actual Behavior
Having CTRL (left) + ALT (left) + F10 mapped to "Play/Pause Media" I am expecting for my Spotify (and/or YouTube) to stop/resume playing when the combination is pressed but nothing happens. This has been working before the previous release.
Other Software
No response

Just gave it a test on 0.64.1 and it's working for me. A /bugreport might help.

Same issue as @stefangabos.
PowerToysReport_2022-11-24-07-26-37.zip
This is my report bug.

I set:

F9 as Previous Track
F10 as Play/Pause Media (NOT WORKING)
F11 as Next Track

Here's my zip
PowerToysReport_2022-11-24-10-53-10.zip
And here's my setup where F10 is not working

In your cases, does it only happen for Play/Pause Media?
For example, if you do F11 for Play/Pause Media and F10 for the function you're exchanging it with, Play/Pause Media still doesn't work with F11 while the other function works with F10 ?
/needinfo

I changed it to F8 and still does the same. BUT it seems to be working fine if Microsoft Teams is not running (I have only 8 gigabytes of RAM and I shut Teams down when I don't need it) and this is how I discovered that it is working.
When Teams is running, even if I have Spotify as the focused window, the shortcut for Play/Pause is not working. Therefore, I am not sure if the issue is related to PowerToys...

this seems to be fixed in 0.65.0
@androidotai can you also confirm?

Yeah, working as expected in 0.65.0. Thanks.

i confirm. it sometimes also works with teams but i haven't yet figured out the pattern

also, other strange things started happening as of lately - i use a lot "ctrl+fn+left" (where "left" is also "home" when used with "fn") and instead of going to the top of the page - like it did maybe 2 weeks ago - it doesn't do anything anymore.
if i close powertoys the correct functionality is restored

I don't know why, but when I remap a key (F10) to Play/Pause media, pressing just F10 it doesn't work (with MS Teams in tray). But pressing Win+F10 it works properly.

I'm running into the a very similar issue, except i bound F5 with Play/Pause. I am running MS teams in the background and playing Spotify.
Win+F5 works properly, as @carlosmatioli discovered (thanks for that!), but when i press F5, it plays the MS Teams ringing tone or does nothing at all.

So, I think the issue is not with the keyboard combination but rather with Teams hijacking the Play/Pause control

I am saying that because Win + F(anything) is not working for me. After the update to 0.66.0 it again worked for a while (a day) with Teams being on, but again I don't know what made it stop working

I just quit and restarted Teams and now play/pause is working as expected. I don't know yet what makes it stop working at some point

I found this workaround. So far it seems to have worked. I'll report back in a few days.
https://superuser.com/questions/1608218/how-to-avoid-microsoft-teams-to-act-as-a-multimedia-application

Start Teams with -disable-features=HardwareMediaKeyHandling
eg. C:\Users\Username\AppData\Local\Microsoft\Teams\current\Teams.exe -disable-features=HardwareMediaKeyHandling
or C:\Users\Username\AppData\Local\Microsoft\Teams\Update.exe --processStart "Teams.exe"  --process-start-args="-disable-features=HardwareMediaKeyHandling"

I should've read the comments closer - looks like this workaround no longer works as of Sept 2022 update

The above confirms that the issue is with Teams hijacking the Play/Pause button.
I propose keeping this open until fixed for people having the same issue

And finally, it looks like Play/Pause is not working after making a call in Teams. Therefore, restarting Teams after a call would keep things working until the next one.
Another solution involving changing hex values in the exe file can be found by reading on from here

I think we can close this one now. Thanks to everybody for the feedback I am glad we sort it out.

My company blocks a lot of file folders for non adm users, so I think I
will stick to the Win+Functios key. But thank you very much.
Em qua, 11 de jan de 2023 04:46, Stefan Gabos @.***>
escreveu:

I think we can close this one now. Thanks to everybody for the feedback I
am glad we sort it out.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/22086#issuecomment-1378353123,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AO57IB445YJF3YITQIENLFDWRZQOTANCNFSM6AAAAAASAI5CPY
.
 I just bound F5 to Alt+play/pause and it
appears to work consistently now
On Wed, Jan 11, 2023 at 2:10 AM Carlos Matioli @.***>
wrote:

My company blocks a lot of file folders for non adm users, so I think I
will stick to the Win+Functios key. But thank you very much.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/22086#issuecomment-1378439777,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEV4JS4BXARZCN7B6L6LKDWRZ2GVANCNFSM6AAAAAASAI5CPY
.
You are receiving this because you commented.Message ID:
@.***>

Alt-F10 in my case also works for play/pause so, yes, for now i can live with that

Not able to repro this, going to close. Let us know if you see this again!


Fix description of blocking webrequests

This text is inaccurate:
"To do this, you need to pass an option with the value "blocking" in the extraInfoSpec argument to the event's addListener(). This makes the listener synchronous. In the listener, you can then return a BlockingResponse object, which indicates the modification you need to make: for example, the modified request header you want to send."
The listener does not become synchronous.
It allows a) the listener to modify a request by returning a BlockingResponse, and b) to perform asynchronous work (either by returning a Promise or by using "async function" for the listener function) prior to returning a BlockingResponse.  The request is paused until the promise is resolved or the async function returns.

This relates to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest


All Leases Option

I was wondering if it would be possible to add "ALL LEASES" as an option in the drop down menu?  I would like an easy way to show all the leases to the users in one screen and most of them know nothing about subnets.
Thanks again for the great plugin, It helps provide much needed visibility into our infra and is a huge time saver.
Cheers!

What is the use case for this?
I can only see it being practical for deployments with a small number of leases.

My end users are not the most network savvy folks. That said, I think I can hack at the plugin to get the desired functionality.

Instead of hacking the plugin, I think you could accomplish this with a custom link.
Something like:
/plugins/kea/servers/{{ object.pk }}/leases6/?q=%3A%3A%2F0&by=subnet

as the link URL should work.

For DHCPv4 leases try this "Link URL" /plugins/kea/servers/{{ object.pk }}/leases4/?q=<IP_ADDRESS>%2F0&by=subnet


Slack channel project notifications

A project owner can associate a slack channel with a project
Visually small notifications of awards for contributions go to the slack channel
Some way for people to respond with appreciation

Moved to slack workflow: https://projects.invisionapp.com/d/main#/projects/6341574/workflow


ZeroDivisionError: float division by zero

In
HOME/page_dewarp/contours.py", line 29, in blob_mean_and_tangent
mean_x = moments["m10"] / area
ZeroDivisionError: float division by zero

What was the input that gave that error?

I have the same issue. See attachment

Resolved in #31!


SLT meeting planning

What
We need to plan our meetings with SLT
Why
So we can:

prepare what we need to say
create a powerful meeting(s) that inspires SLT to take action
champion inclusion

Done when

[ ] We have decided how to structure our meeting(s)
[ ] We have shared our plan with the team for feedback
[ ] We have prepped according to our plan

During a meeting with Ellen, Georgina, Amy, Eric and I we discussed the following:

setting up two 45 minute meetings. One to present the inclusion discovery research and outcomes and the second to discuss next steps with SLT
the main focus should be around resourcing/money, getting leadership from the top and hiring an expert in inclusion
make it clear that we can only do the things within our remit (creating guidance and working with the UCD profession) the rest has to come from them


Update ref to latest ethbinding

I could not see the reason for the test failure, which looks to me like a timing condition where a background processing of one of our eventstreams tests tries to fire the GetABI mock after the test has finished.
So I've added -v to the go test runner, just for when it's running in a Github action (not locally with make as that would be really annoying).


Allow validation using e2e dataplane safe tests

Fixes: #103
Eventually we can implement something more beautiful in this side without fetching the E2E directly
but for now, I think it's a good gain with low maintenance and cost.
Depends-On: https://github.com/submariner-io/submariner/pull/313 (merged)

@skitt @dfarrell07  ^ :-)

This patch will need squashing

waiting for CI after conflict resolution


Add vote.mimo.capital

Hi! What is your PR about?
Add a custom domain for your space.

Everything has been resolved.


[bugreport]: Harddepenencies on Kelp Apps not working

Describe the bug
I have a kelp app which depends on another Kelp App. The depent is registered as a hard dependency. Kelp fails to enable the App with the notice that the hard dependency can not be found.
What do we have to do to reproduce this bug?
Steps to reproduce the behavior:

Create 2 Kelp Apps.
Hard Depent one of them.
You should now see in the console when you reload that the hard dependency can not be found.

What would you expect to happen?
It should load normally.
Provide the stack trace if possible (server logs, etc.). If you can, use the debug mode for that so that debug messages are logged as well
[18:17:48 INFO]: [Kelp] [APP] Detecting KelpApplications.
[18:17:48 INFO]: [Kelp] [APP] Successfully loaded DatabaseProvider
[18:17:48 WARN]: [Kelp] [APP] Dependency DatabaseProvider (required by CityLife) is unavailable
[18:17:48 ERROR]: [Kelp] [APP] Failed to enable CityLife
[18:17:48 INFO]: [Kelp] [APP] Loading application DatabaseProvider with version 1.0

Environment information

Operating system: Linux Ubuntu 20.10
Java-Version: 11
Kelp-Core-Version: v.0.3.3
Version-Implementation: 1.8

Thank you for the bug report! I have to admit that the dependency feature has not been tested enough to spot such errors.
In MR 0.4 I have planned to give the application management system a complete overhaul (including things like a /kelp plugins or debug command, working dependencies, etc.), where this bug would be included as well then. Before that, 0.3.4 will release with entity implementations and things like #55 fixed.


fix #671 by handling kms exceptions on collect

This PR fixes #671 by handling two additional KMS exceptions generated for restricted keys.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thank you @andrewkrug !


On first condition met it shouldn't check other conditions

First of all I apologies for my bad English.
We have following rule and in this when input1 is coming null we are getting following exception. But as we are checking input1 == null then it shouldn't check the conditions after that as it's returning true from there only.
Exception:
Exception while parsing expression input1 == null OR (input1 != null AND input1.legals != null AND input1.legals.Count() > 0) - No applicable method 'Count' exists in type 'Object'
Rule:
{
"RuleName": "LegalsNull",
"SuccessEvent": "Legals are OK.",
"ErrorMessage": "Legals should not be null.",
"ErrorType": "Error",
"RuleExpressionType": "LambdaExpression",
"Expression": "input1 == null OR (input1 != null AND input1.legals != null AND input1.legals.Count() > 0)"
}
I am already using
var reSettings = new ReSettings { NestedRuleExecutionMode = NestedRuleExecutionMode.Performance }; here.

@manjits1991 this is more of a compilation issue rather than parsing. Would need more details on type of input that you pass


[LFG] Suggestion: Toggleable Response on [p]lfg w/o Inputs

Feature Description
Toggleable: If member runs [p]lfg command without any parameters, it will still post the VC invite, then below it will show the current "help" on adding values.
Alternatives Considered
A friend of mine wanted to use retrigger to do this, I think it would be better to simply add it to the cog itself.
Additional Context
Many just want to run [p]lfg without params and get the invite out, this would assist in them avoiding reading. Nobody likes reading stuff in 2021 🙂

Thanks for the feature request, I'll be working on this when I have time.

Just implemented this with [p]lfgset noinputs for a secondary template also functioning as the toggle.


Angular Material 6 - The background of some components appear transparent after changing the theme

Bug:
Could you please answer for the below mentioned issue:
https://stackoverflow.com/questions/50690193/angular-material-6-the-background-of-some-components-appear-transparent-after#

Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.
(this is a canned response)


plot 3D voxelgrid error

Describe the bug
A clear and concise description of what the bug is.
when I try to plot 3D voxelgrid, I get a .html file. But it turns out nothing like this

I use class VoxelGrid(Structure) to build my voxel, and I can get the 2D plot.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
I want to visualize my voxel like the examples you show in VoxelGrid.ipynb
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: [e.g. iOS]
Browser (if necessary) [e.g. chrome, safari] chrome
Version (master branch commit) 75.0.3770.100

Additional context
Add any other context about the problem here.

Oh, sorry. I found the solution.

Hola @sunnyHelen ! Glad to hear that you managed to found the solution. Could you share what was the problem/solution in order to serve as reference for other people?


Feature/sound cloud

@MichaelYusko I've made a few changes:

Changed f-strings to .format() - gives 3.5x support (i've tested what I can on 3.5)

Added Soundcloud functions in helpers.py and bot.py

At the minute, I have been through flake8, but I can't test the Soundcloud properly, without registering the App, I wondered if you wanted to register Bot-chucky with the soundcloud developers page and then I can test it.  Maybe you have already?  There may be some issues with this - i'm making a pull request mainly so we can test it. Let me know what you thing, thanks! :)

@nik849 Nice PR:) thanks! and two notices
first - I prefer use and support Python3.6+, so we need to back f'...' format.
second - For now I don't have any test credentials, if you will create an app on sound, and test it, it's would be awesome. And pull master branch into your local branch, in order to avoid conflicts.
P.S don't forget add your name to the CONTRIBUTORS file;)

@MichaelYusko, will do, I have requested a token for the SoundCloud API, as soon as I get it, I can test it.  I'll convert back to f-strings too.

@nik849 Awesome!


Set-DbaPowerPlan - Implement a workaround for server 2019

Because the activate method for powerplans is broken
on windows server 2019, we now use the windows tool powercfg
as a fallback.

Type of Change

[x] Bug fix (non-breaking change, fixes #6505 )
[ ] New feature (non-breaking change, adds functionality, fixes # )
[ ] Breaking change (effects multiple commands or functionality, fixes # )
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose
I want to use Set-DbaPowerPlan on windows server 2019
Approach
I used the windows tool powercfg as a fallback just for setting the plan. Everything else (like getting the plans and even the GUID of the desired plan) is still working well on 2019.
Alternative Approach
It would also be possible to use the windows DLL (have a look at https://github.com/sqlcollaborative/dbatools/issues/6505#issuecomment-663997294), but that would need more lines of code.
Some info to better understand the code
A try-catch around Invoke-CimMethod doesn't work, so -ErrorAction SilentlyContinue is used.
PS C:\Users\Administrator> $cimInstance

Caption        :
Description    : Favors performance, but may use more energy.
ElementName    : High performance
InstanceID     : Microsoft:PowerPlan\{8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}
IsActive       : False
PSComputerName : SRV3

If this is broken in the set command wouldn't the get command require updating as well?
We can't supply a message that it might be because of 2019. We should include checking the OS version so we know it needs the call to the API.

As I said: Only the activate method is broken.
Get-DbaPowerPlan just works fine, Test-DbaPowerPlan as well.
Ok, checking for the version would be better. Do we have already code for that?

I'm not all that fond of calling the utilities in Windows Server because they can change and become broken at any time.
Any reason we can't just use the same method DSC module uses, it seems pretty simply and not that much extra coding?
https://github.com/dsccommunity/ComputerManagementDsc/blob/49beec359c838bf107a6cc932dcb572ec22954cd/source/Modules/ComputerManagementDsc.Common/ComputerManagementDsc.Common.psm1#L532-L576

On checking OS version, think just calling the Get-DbaOperatingSystem would be sufficient to grab that value.

Ok, the DSC-Code is smaller than the Anible-Code I already found.
I will try to implement this later today.

@wsmelton I need your expertise on using Get-DbaOperatingSystem.
PS C:\Users\Administrator> Get-DbaOperatingSystem -ComputerName SRV3

ComputerName       : SRV3.Company.Pri
Manufacturer       : Microsoft Corporation
Organization       : Virtual Engine
Architecture       : 64-bit
Version            : 10.0.17763
OSVersion          : Microsoft Windows Server 2019 Standard Evaluation
LastBootTime       : 2020-07-27 07:57:56.309
LocalDateTime      : 2020-07-27 09:32:20.180
PowerShellVersion  : 5.1
TimeZone           : (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
TotalVisibleMemory : 2.74 GB
ActivePowerPlan    : Balanced
LanguageNative     : English (United States)

PS C:\Users\Administrator> Get-DbaOperatingSystem -ComputerName SRV2

ComputerName       : SRV2.Company.Pri
Manufacturer       : Microsoft Corporation
Organization       : Virtual Engine
Architecture       : 64-bit
Version            : 10.0.14393
OSVersion          : Microsoft Windows Server 2016 Standard Evaluation
LastBootTime       : 2020-07-27 07:57:56.608
LocalDateTime      : 2020-07-27 09:32:43.038
PowerShellVersion  : 5.1
TimeZone           : (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
TotalVisibleMemory : 1.51 GB
ActivePowerPlan    : High performance
LanguageNative     : English (United States)

Should I test for "2019" in OSVersion or should I test Version against a (currently unknown) first version of windows server 2019?

Or should we use the new set-method on all systems? Then I do not need to get the OSVersion.

17763 is Server 2019 1809 build, higher than that will be the semi-annual builds (1903, 1909)

@wsmelton Without testing for OSVersion now, because this is maybe also needed for other versions like Server 2012 R2 core or Nano Server (as mentioned in the comments of the DSC code).

Have not heard of anyone having issue with our current code on 2012 R2.

So I should implement the Get-DbaOperatingSystem? And then use the dll only on 17763 or higher?

Does anyone know, why the AppVeyor-Test (Invoke-DbaDbClone Integration Tests) is failing?

@andreasjordan that test fails often and can just be ignored if your PR does not touch it.


[markdown mode] differentiate between heading types

My idea is to create a text editor that moves special characters at the beginning of a line in a markdown document to the left (like iA Writer does). Currently it's not possible since both headline types do have the same css class (cm-header cm-header-1) (same goes for cm-header-2):
# Title

Title
=====

Is it possible to make them different or better add another class to make it possible to differentiate between the two?

Excuse me, how can we move the # to the left if we only have the first type headings. Thanks.

One example would be the following CSS:
.cm-header-1 {
    margin-left: -2ch;
}

.cm-header-2 {
    margin-left: -3ch;
}

/* etc. */

I'm not yet sure if this is the best solution but at least it works.
The unit ch means "character". It's the width of the 0 (zero) character.
It's very rarely used but very useful in this case.

I'm not sure that such a change belongs in master for markdown's stylings. If I understand you correctly, you wish to style headlines with # and === differently?
It's not too hard for you to either modify the markdown mode to classify them differently, or to write a script in userland that looks for such headers and mark them with a custom class.

I agree, this is too specific to incorporate in the main distribution.


Share transactions

Preview is available here:http://laboratory-pr1084.previews.kube001.services.stellar-ops.com/

Preview is available here:http://laboratory-pr1084.previews.kube001.services.stellar-ops.com/

Hi @quietbits I tested sharing transaction and I think the XDR is not being carried to the new tab. Please let me know if you see the same.
Uploading share-tx-not-quite-working.mov…


Changed api?

They must have changed something about their api now, I get a 403 errors when trying to do the oauth.

Yes, the API has changed significantly.

@springjools : could you please refine your report and tell us the exact HTTP transaction that fails ?

Sure, here is the output:
PS U:\bin\github\happn\examples\creepr> python .\test2.py

> --starting test--
> WARNING:root:Server denied request for OAuth token. Status: 403
> Traceback (most recent call last):
>   File ".\test2.py", line 13, in <module>
>     myUser = happn.User(token)
>   File "C:\bin\Python27\lib\site-packages\happn-0.1-py2.7.egg\happn\happn.py", line 108, in __init__
>     self.oauth, self.id = self.get_oauth()
>   File "C:\bin\Python27\lib\site-packages\happn-0.1-py2.7.egg\happn\happn.py", line 274, in get_oauth
>     raise HTTP_MethodError(httpErrors[r.status_code])
> happn.happn.HTTP_MethodError: 'Forbidden'
> --starting test--
> WARNING:root:Server denied request for OAuth token. Status: 403
> Traceback (most recent call last):
>   File ".\test2.py", line 13, in <module>
>     myUser = happn.User(token)
>   File "C:\bin\Python27\lib\site-packages\happn-0.1-py2.7.egg\happn\happn.py", line 108, in __init__
>     self.oauth, self.id = self.get_oauth()
>   File "C:\bin\Python27\lib\site-packages\happn-0.1-py2.7.egg\happn\happn.py", line 274, in get_oauth
>     raise HTTP_MethodError(httpErrors[r.status_code])
> happn.happn.HTTP_MethodError: 'Forbidden'

Here is the test script: http://pastebin.com/fXjmKUq8
I redacted the token, but the token is valid and actually the request fails before the validity of the token is checked anyway.

You told you redacted the FB token, but how long have you been using that FB token for ? Did you check its expire time in the returned URL from https://www.facebook.com/dialog/oauth ? It is usually quite long but not infinite.
I am asking this question because the remaining of that HTTP POST request to Happn OAuth is constant (client id, client secret, etc), and it worked well yesterday on my side with a CURL command.

Sounds to me like you have an invalid token

I checked the token with the debugging tool: https://developers.facebook.com/tools/debug/accesstoken
It's still valid and expires in about a month it says.
The change was yesterday it appears, so if something worked yesterday, it may not work today.

try getting a new token from the link on this repo.

I just tried again now:
First, got a token from FB for the Happn application (USED THE NEW LINK):
https://www.facebook.com/dialog/oauth&client_id=247294518656661&redirect_uri=fbconnect://success&scope=public_profile&response_type=token
Redirected to:
fbconnect://success#access_token=<fb_access_token>&expires_in=5184000
Used the <fb_access_token> to authenticate with Happn:
curl -k -X POST -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -d 'client_id=FUE-idSEP-f7AqCyuMcPr2K-1iCIU_YlvK-M-im3c&client_secret=brGoHSwZsPjJ-lBk0HqEXVtb3UFu-y5l_JcOjD-Ekv&grant_type=assertion&assertion_type=facebook_access_token&assertion=<fb_access_token>&scope=mobile_app'
Got the response:
{"access_token":"<happn_access_token>","expires_in":172800,"scope":"achievement_type_read countries_read language_read locale_read pack_read subscription_type_read report_type_read user_mode_read notification_type_read search_user all_user_read all_image_read user_device_create user_device_read user_device_update user_device_delete user_position_read user_position_update user_notifications_read user_poke_create user_message_create user_message_read user_message_update user_message_delete user_image_create user_image_read user_image_update user_image_delete user_conversation_create user_conversation_read user_conversation_update user_conversation_delete user_order_create user_order_read user_order_update user_applications_read user_applications_update user_applications_delete user_blocked_read user_blocked_create user_blocked_delete user_accepted_read user_accepted_create user_accepted_delete user_rejected_read user_rejected_create user_rejected_delete user_subscription_create user_subscription_read user_subscription_update user_subscription_delete user_achievement_create user_achievement_read user_achievement_update user_achievement_delete user_availability_create user_availability_read user_availability_update user_availability_delete user_social_create user_social_read user_social_update user_social_delete user_update user_delete user_read user_report_read user_report_create user_report_update user_report_delete","user_id":"1881062535","is_new":false,"refresh_token":"<happn_refresh_token>","error_code":0}
I see no behaviour change in the REST API.
Note : <...> are place-holders to hide the actual tokens.

I also documented the authentication steps in the Wiki : https://github.com/rickhousley/happn/wiki/Happn-REST-API

That's weird. I have been authenticating successfully for a month and it stopped working yesterday. I have made some local modifications to my python installation, like setting it to use utf8 instead of ascii etc. I can log in with my phone so the account works, i tried getting a new access token from the link in the repo and it's still the same response (but now it takes a few seconds before it comes).
I'll try to uninstall the repo and start with a fresh copy, maybe that helps. Or they rolled out some changes only in europe first and not in the US maybe?

I operate in France, so in Europe too :-)

Thank you mfldr-fr. As this issue has not been repeatable this will issue will be closed.

Hmmm, sorry to ask again but can you guys actually use the code in python? Is doing the curl request the same thing?
When trying to use the link in the repo, or as posted here by mfld, I get a 500 error and no token as response. I got the access tokens before from:
https://www.facebook.com/dialog/oauth?client_id=247294518656661&redirect_uri=https://www.happn.fr&scope=basic_info,email,public_profile,user_about_me,user_activities,user_birthday,user_education_history,user_friends,user_interests,user_likes,user_location,user_photos,user_relationship_details&response_type=token
and that still works. So was there a typo in the link or what am I doing wrong. The tokens have different scope, is that it?
Also, do I need to modify the app version here to 19.1.0: https://github.com/rickhousley/happn/blob/master/happn/settings.ini#L6

First, I think the link you used before to get a FB token is better than the one I put on the Wiki, as you avoid the error message by not redirecting to a local address (as done inside the application with fbconnect://success) but to the main page of the Happn website, that is fortunately allowed by the application registration in Facebook. So let me update the Wiki with the one you use.
Second, the question of the scope is not obvious. I am still trying to identify the minimal scope that allows the API to respond, so requesting only 'basic_info' mandatory scope item, but it is true that the first time I ran the application, I did not restrict the scope and creating my Happn account was successful. I am quite sure I can renew the FB token, but not sure I could create a new & fresh Happn account from another FB account with that minimal scope. Is that your use case ?
About Python : Rick won't be happy to learn that I am not using Python to exercise the API ;-) I took his code as a first reference to understand that API, and I am now exploring it using the CURL command before reusing my findings in PHP. Improving this project documentation is just a way to thank him (and the contributors including you) for the valuable data I found here.

mfld-fr thank you very much for your contributions. Jools, I'll try to take a look at it this weekend. In the mean time I would suggest using MITM proxy in combination with your phone to look at the traffic and see what token your phone is using. This also may yield some insight as to why this is not working for you.

I get a different client id and client secret, and it seems to request the token from https://connect.happn.fr now and not from some url under api.happn.fi: http://imgur.com/ewFoHhU

mfld@home ~/happn $ ping connect.happn.fr
PING connect.happn.fr (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=53 time=12.2 ms
mfld@home ~/happn $ ping api.happn.fr
PING api.happn.fr (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=53 time=12.2 ms
Both DN point to the same IP address, so no impact at the end, but it is a finding to keep in mind when updating the code.
For client credentials, could you please tell us the exact version of your Happn application ? Mine is 19.1.0.

Hmm, I only see this: User-Agent: happn/838 CFNetwork/609.1.4 Darwin/13.0.0
It's the user-agent field in the request header. It's an iPhone with ios 6.8.3 so it could be an old version of happn.

Ok, sorry for posting that old info, I so that was from version 13.0.0, but it apparently still works.
I tested with the curl command you provided and got the same response:
PS U:\bin\github\userTools> curl -k -X POST -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -d 'client_id=FUE-idSEP-f7AqCyuMcPr2K-1iCIU_YlvK -M-im3c&client_secret=brGoHSwZsPjJ-lBk0HqEXVtb3UFu-y5l_JcOjD-Ekv&grant_type=assertion&assertion_type=facebook_access_token&assertion=xxxxx&scope=mobile_app' https://api.happn.fr/connect/oauth/token {"access_token":"yyyyy","expires_in":172800,"scope":"achievement_type_read countries_read language_read locale_read pack_read subsc ription_type_read report_type_read user_mode_read notification_type_read search_user all_user_read all_image_read user_device_create user_device_read user_devic e_update user_device_delete user_position_read user_position_update user_notifications_read user_poke_create user_message_create user_message_read user_message_ update user_message_delete user_image_create user_image_read user_image_update user_image_delete user_conversation_create user_conversation_read user_conversati on_update user_conversation_delete user_order_create user_order_read user_order_update user_applications_read user_applications_update user_applications_delete user_blocked_read user_blocked_create user_blocked_delete user_accepted_read user_accepted_create user_accepted_delete user_rejected_read user_rejected_create u ser_rejected_delete user_subscription_create user_subscription_read user_subscription_update user_subscription_delete user_achievement_create user_achievement_r ead user_achievement_update user_achievement_delete user_availability_create user_availability_read user_availability_update user_availability_delete user_socia l_create user_social_read user_social_update user_social_delete user_update user_delete user_read user_report_read user_report_create user_report_update user_re port_delete","user_id":"uid","is_new":false,"refresh_token":"zzzzz","error_code":0}
But it does not work in python, so could it then be something related with the ssl and the requests library? There was a similar issue here:
https://github.com/skipperbent/happn-php-sdk/issues/1

Well... if it works on your side with CURL, and on mine with CURL and PHP (both based on OpenSSL on my Linux distro), it looks like either something got wrong in Rick's Python code, or you broke something else in your local configuration. And I am afraid I cannot help in both cases.
The only way I could see to help you would be to share my PHP code.

Yeah I guess we will eventually find out the reason. Thanks for helping by the way.
But I also tested it in POSTMAN (there is a function to import a curl command), and then I again get the 403 error. Maybe this piece of info will help?
http://i.imgur.com/8qJdqnzm.png

I can work around the issue by adding a "verify=False" parameter to the requests command. That disables the verification of the SSL certificate so it produces a lot of nag text, but it works. Maybe one solution could be to change to use pycurl instead, or maybe there is a simple way.

I also disable the certificate verification since the beginning of my experiment : option -k for CURL, or curl_setopt ($c, CURLOPT_SSL_VERIFYPEER, FALSE) in my PHP code.

Actually I found that the certificate error happened because I was monitoring the network with charles proxy. With some additional testing I finally found the culprit: the user-agent field. It works if I change the user-agent from "Dalvik/1.6.0 (Linux; U; Android 4.4.2; SCH-I535 Build/KOT49H)" to something else, like "Mozilla/5.0".

OK, so let me record in the Wiki that one should use the following header to avoid this issue:
User-Agent: Happn/19.1.0 AndroidSDK/19

Jools feel free to submit a pull request with this modification


chore: bump to v1.6.0

What's changed and what's your intention?
PLEASE DO NOT LEAVE THIS EMPTY !!!
Please explain IN DETAIL what the changes are in this PR and why they are needed:

As title

Checklist

[ ] I have written the necessary docs and comments
[ ] I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)

Connector test failed due to https://github.com/risingwavelabs/risingwave/pull/14082. We can either wait until https://github.com/risingwavelabs/risingwave-operator/pull/585 is merged or disable the test first.

Close in favor of #590


WebRTC for games

The game API may benefit from WebRTC when it's available on the client.  In particular, it's often possible for WebRTC clients to communicate peer-to-peer after the initial signaling.  The main advantage I hope to gain is not in latency, but in reducing the impact on a shared message relay, in the case where some student game "goes viral".
We do still need reliable delivery, so we can't gain the latency advantages of an unreliable transport, and WebRTC's streaming features are less appealing.  (One could imagine playing some tricks where out of order delivery is exploited but dropped packets are still re-requested, so events are applied to the timeline as they arrive, but not committed until the stream is ready.  But that sounds complicated...)

I've looked into this further in the background, but not done any new development.  I believe this is absolutely the way to go.  It's a fairly sizable project, though, as it means substantial changes to the game protocol.  Advantages include:

Replacing the custom game server with a hosted scalable system like XirSys.
Avoiding the need to relay about 85% of traffic at all, because it can be routed peer-to-peer.
Reducing the latency of the 85% of traffic that is peer-to-peer, particularly given that significant use cases involve multiple players on the same local network in a school, home, etc.
Using a reliable out-of-order transport, to avoid TCP pipeline stalls.

Note that #378 is a prerequisite, since peer-to-peer communication has no server to facilitate communication.

Okay, looks like WebRTC is still unsupported on Safari.  Until that changes, this isn't an option. :(

I had looked into WebRTC for similar projects in the past, and always concluded that we are not there yet.

I'm thinking more about this.  Some points worth noting:

There is a polyfill of sorts for WebRTC on Safari (which requires installing a browser extension).  See https://github.com/Temasys/AdapterJS
The recent change to client-side timestamps means there's basically no interesting logic in the game server after the game session is established; it's just a pure message relay.
The session establishment is less latency-critical, and could be migrated into the web server with a database back end.  This would ease scaling, as well.
Making this change would help massively with #384 and #390 (monitoring and security for the relay).

On the other hand, this would pose challenges for #404 and #380, since there's no good place to keep a canonical event log.  One could imagine solutions (each client keeps its messages so it can retransmit them when asked; or there's a dedicated message recorder that joins all sessions) but they sound unappealing.  That said, the prospect of offloading administration of an open message relay on the internet is worth some sacrifices.

Just a note that there's apparently a free STUN/TURN server at http://numb.viagenie.ca/  That sounds too good to be true, so there must be some kind of catch!  But, it's worth looking into if we go this route.


Add linting and formatting infrastructure - [merged]

In GitLab by @waxlamp on May 1, 2020, 18:06
Merges lint -> development
This PR adds flake8 and black support.
We should have a brief meeting to go over what these tools do and why they're useful/beneficial to a project like this. black in particular makes people uncomfortable, but I went through that phase and came out the other side better and stronger :)
To try this out, you can run pipenv run lint to see the linter output. Currently it displays about 1500 warnings. Many of these can be autofixed by running pipenv run black but be careful: that command will edit files in place so if you use it first make sure your work is saved and/or staged for commit to gitlab.
I am a machine when it comes to making code changes to conform to linting/formatting specifications, so I can take on the mind-numbing burden of doing so here. But before I go to the trouble, I'd like to get buy-in from the team.
TODO:

[ ] add documentation
[ ] bring code up to spec

Depends on !6
Closes #2

In GitLab by @waxlamp on May 1, 2020, 18:22
mentioned in merge request !8

In GitLab by @waxlamp on May 1, 2020, 18:22
marked as a Work In Progress

In GitLab by @waxlamp on May 1, 2020, 18:22
changed the description

In GitLab by @Schumann on May 5, 2020, 13:25
This should merge to the development branch when it is ready to merge.

In GitLab by @waxlamp on May 5, 2020, 15:58
The reason I have this marked as WIP is because I figured I needed team buy-in for the use of both Flake8 with the plugins I've selected, and separately for the use of Python Black.
If instead we're choosing to just trust me, that's ok too. In either case, I wouldn't insist on actually fixing the linting and formatting errors found by these tools until after the local deadline passes.
Thoughts?

In GitLab by @waxlamp on May 5, 2020, 15:58
unmarked as a Work In Progress

In GitLab by @waxlamp on May 5, 2020, 15:59
@Schumann, should this branch be retargeted to development?

In GitLab by @waxlamp on May 5, 2020, 16:00
(I have removed the WIP tag, since I'm planning to only merge the infrastructure, and not the fixes yet.)

In GitLab by @waxlamp on May 5, 2020, 16:09
I see the answer is "yes". Missed your note above.

In GitLab by @waxlamp on May 5, 2020, 16:09
changed target branch from master to development

In GitLab by @waxlamp on May 5, 2020, 16:16
@Schumann please review

In GitLab by @waxlamp on May 5, 2020, 16:16
@cfunk1210 please review

In GitLab by @waxlamp on May 5, 2020, 16:16
@waxlamp final cut

In GitLab by @cfunk1210 on May 5, 2020, 17:51
It's this within the other merge request?

In GitLab by @cfunk1210 on May 5, 2020, 17:51
@waxlamp

In GitLab by @cfunk1210 on May 6, 2020, 11:09
merged


Update Node builtins list

Changes
Swaps out is-builtin-module (outdated) with builtin-module (more-recently-updated). This improves the list of Node builtins, adding previously-missing ones like crypto.
Yes, you could just also install builtin-module and use the original function but I just personally found that to be more hassle than consuming the core package directly 🤷🏻♂. I don’t find an npm package that only performs .indexOf() on an array to be usefyl.

Testing
Tests should pass

Docs
No docs updates; only a minor behind-the-scenes improvement

LGTM!

LGTM!


HOSTEDCP-1329: Allow user to specify resource group for NodePool resources

What this PR does / why we need it:
Allows a user to bring their own resource group to be used to contain all the created Azure infrastructure needed for their hosted cluster. Also allows a user to specify the resource group they brought when deleting a hosted cluster.
Which issue(s) this PR fixes:
Fixes HOSTEDCP-1329
Checklist

[x] Subject and description added to both, commit and PR.
[x] Relevant issues have been referenced.
[x] This change includes docs.
[x] This change includes unit tests.

/test images
/test verify
/test unit

/approve
/lgtm

/retest

/retest

/test e2e-kubevirt-aws-ovn

/retest

/retest

/lgtm

/retest

/retest

/unhold
/retest


Fixes pagination with relative URL

When base_url is a URL based on protocol, like "//www.google.com" the double slash regex kills the first "//".

I'd rather remove that line altogether and if there is a case where double slashes are produced - find out where and fix that instead.


RemainingItemsThreshold doesn't work!

[Enter feedback here]
I set the threshold to 4 and set the command and even tried using the event handler. Have 30 items shown and it should fire when I scroll down to the 4th item left. Never fires!

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 12370c4e-0935-d43a-7d28-32a10a30074f
Version Independent ID: bb1eccf7-c1b8-25b1-5325-3b37a9b1bd94
Content: Xamarin.Forms CollectionView Data - Xamarin
Content Source: docs/xamarin-forms/user-interface/collectionview/populate-data.md
Product: xamarin
Technology: xamarin-forms
GitHub Login: @davidbritch
Microsoft Alias: dabritch

Hi @javanjoel
If you believe the feature isn't working you'll need to log an issue in the engineering repo.

Hi @javanjoel
If you believe the feature isn't working you'll need to log an issue in the engineering repo.


Use the right name for certificates

Instead of the request.TLS.ServerName, we should use the actual client's
hostname. Further, tracking (and rendering) hostnames as paired with
certificates doesn't really make sense, because multiple users wouldn't be able
to have different certificates on the same client host. So, let's not track
certs by hostname and just use the fingerprint instead.
This broke the implementation of the API, but since it was wrong (the spec says
nothing about it being a map from host:fingerprint, just that it's a list of
fingerprints), I think that's ok.
Closes #623
Signed-off-by: Tycho Andersen<EMAIL_ADDRESS>

Seems to work! :+1:


Adding some pigeon hole test cases.

Note that I actually intended to show by the introduction of these test cases that Alpha is currently unable to solve even the simplest pigeon hole test cases within a few seconds. Then however I noticed that this is only the case if the log level is DEBUG, which shows that the debug mode makes Alpha really slow.
The issue persists, however, with test cases like test4Pigeons3Holes or test3Pigeons4Holes, which are currently unsolvable also on log level INFO.
Alpha needs to get faster!

After 2ddea5c957c134f412982a86d0f4521ac885a635 the tests are not runnable tests anymore (class is abstract). There are (at least) two possible solutions:

Make the class concrete and instantiate some solver (this could be done in subclasses as well): #26
Restructure our tests (I'd prefer that): #25

@flowlo Thanks! :)


Deeplinks open both app and browser.

Describe the bug
Everything works correctly in iOS 18. In versions lower than iOS 18, deep links first launch the mobile application and redirect to the relevant screen. It then opens the browser and goes to the website.
Redirecting to the App Store is an intentional act; We redirect to the App Store thanks to a script running on the website. This is not a problem.
Does it related to
[NO] App Links (Android)
[NO] Deep Links (Android)
[YES] Universal Links (iOS)
[MAYBE] or Custom URL schemes? (iOS)
Does the example project work?
[] Yes
[] No
[*] Irrelevant here
Did you fully read the instructions for the targeted platform before submitting this issue?
Uploaded your files to webserver, HTTPS, direct connection, scheme pattern setup, ...
[*] Yes
[ ] No
[ ] Irrelevant here
https://github.com/user-attachments/assets/c50c111b-84d3-44e8-b036-748111d86577

Redirecting to the App Store is an intentional act; We redirect to the App Store thanks to a script running on the website. This is not a problem.

Disable default Flutter deep linking?
https://github.com/llfbandit/app_links/blob/master/doc/README_ios.md#ios


Some questions about the MIMIC-CXR-JPG

👋 Hi, thanks for your code, and I have some questions about the MIMIC-CXR-JPG to confirm.
Is your MIMIC-CXR-JPG downloaded from here (https://physionet.org/content/mimic-cxr-jpg/2.0.0/) ——JGP of original size(557.6 GB)?
Or is it contains 224x224 image? If I use the 224x224 images, do the bbox annotations need to change with the size  change?
Thank you in advance. Looking forward to hearing from u☺

Hello there! Thank you for your question.
Yes, we used the JPG images of MIMIC-CXR-JPG from the link you provided. As you mentioned, the dataset is 557.6 GB and all the images are of size 2544 × 3056 pixels (as far as I've seen).
Image Transformations
Regarding the image transformations, we used a library called Albumentations to apply the following transformations:

LongestMaxSize: This transformation resizes the input image (of size 2544 × 3056) such that the long edge of the image (i.e. the height of 3056) is resized to IMAGE_INPUT_SIZE (we chose this to be 512), while the shorter edge (i.e. the width of 2544) is resized accordingly to maintain the original aspect ratio.
Data Augmentation Transformations: We applied several data augmentation transformations (e.g., ColorJitter, GaussNoise, Affine) to the images.
PadIfNeeded: We applied this transformation to make sure that all images are of size 512 x 512. This transformation pads both sides of the shorter edge (i.e. the width) to 512 with black pixels.

You can find the train and val transformations that we applied to the images in the function get_transforms in the module train_full_model.py (see line 340) and the module training_script_object_detector.py (see line 479), respectively. The same transformations are applied to the images fed into the object detector / full model.
Bounding Box Annotations
Regarding your question about the bounding box annotations, yes, they need to change in size according to the transformations applied to the image.
Fortunately, Albumentations automates the corresponding transformations for the bounding boxes. To use this functionality, you need to specify the argument bbox_params=A.BboxParams(format="pascal_voc", label_fields=['class_labels']) in A.compose (see line 366 of train_full_model.py).
When you apply your image transformation in the dataset class, you can input your bounding box coordinates and labels together with your image (see line 43 of custom_dataset.py. Albumentations ensures that everything is transformed correctly.
Please note that the bounding box annotations should be provided in the format specified by Albumentations. In our implementation, we used the Pascal VOC format, which requires the bounding box coordinates to be in the format [xmin, ymin, xmax, ymax].
For more information on bounding box augmentation with Albumentations, please see https://albumentations.ai/docs/getting_started/bounding_boxes_augmentation/.
I hope this helps! Let me know if you have any further questions.

Oh!  Thank you very much for your timely and detailed reply! 💕☺
I now understand how it's handled.
When constructing csv_files, we need to use 557.6 GB original images. Then, during training/infering, we will resize the original images to 512x512 and process their bbox at the same. (I hope I understand correctly)
This seems to be a really big project, thanks again for your open code and patient reply, I still need time to learn and run it!

Absolutely, you've got it right! Each row in the csv files represents the properties of a single image, and one of these properties is the path to the JPG file of the image in the MIMIC-CXR-JPG dataset folder.
As you correctly mentioned, the images are read-in (see line 40 of custom_dataset.py) and the transformations (resizing, data augmentation, padding) of the images (and corresponding bboxes) are applied during training/inference time. Among other reasons, this is done since each training image transformation is random due to the data augmentation techniques (so it can’t be done beforehand).
Feel free to reach out if you have any more questions or need further clarification!

Sorry to bother you again, but I want to confirm how many .json files there are in your scene_graph?
I downloaded scene_graph.zip here(https://physionet.org/content/chest-imagenome/1.0.0/) and unzipped it. My scene_graph file contains 243,310.json files.
But when I run create_dataset.py, I get a reminder that I can't find some files, for example:
FileNotFoundError: [Errno 2] No such file or directory: '…/silver_dataset/scene_graph/943486a3-b3fa9ff7-50f5a769-7a62fcbb-f39b6da4_SceneGraph.json'

I open the scene_graph file to look for these files, but there was no such file. I want to know whether the file I downloaded was wrong or there was a problem in decompression (I tried twice, but the result was the same, and no error was reported during decompression).

Sorry, it was my negligence that caused the above problem, now I can run create_dataset.py, thank you for your help.
Also, for lines 27-28 in full/report_generation_model.py, I see that you commented them out, and I wonder why? In the training of full model, shouldn't frcnn be frozen after loading parameters?
    # path_to_best_object_detector_weights = "/u/home/tanida/runs/object_detector/run_10/weights/val_loss_13.482_epoch_6.pth"
    # self.object_detector.load_state_dict(torch.load(path_to_best_object_detector_weights))

  `

Your summarization is exactly right.
Regarding the 'best_object_detector_weights', I'm happy to share them with you. I'll upload them over the weekend as I'm a bit busy this week.
Thank you for your interest in our work and for your kind words. I appreciate it!

Here are the object detector weights: https://drive.google.com/file/d/1JkZax3VUFC3QfgbLNSsTlXJTKBKBWpvF/view?usp=sharing

Paper is uploaded now: https://arxiv.org/abs/2304.08295 🙂

got it! thank you~😊 ☺

Hi, @Liqq1 , have you successfully downloaded the original dataset at ([https://physionet.org/content/mimic-cxr-jpg/2.0.0/])？

Hi, @Liqq1 , have you successfully downloaded the original dataset at ([https://physionet.org/content/mimic-cxr-jpg/2.0.0/])？

Hi
I'm still downloading. That's a lot of data. I think it'll take more than ten days.

Hi, @Liqq1 , have you successfully downloaded the original dataset at ([https://physionet.org/content/mimic-cxr-jpg/2.0.0/])？

Hi I'm still downloading. That's a lot of data. I think it'll take more than ten days.

Thanks, but it seems that Fudan University is not listed as a valid institution for the CITI Course which is a prerequisite for data application and neither is my school.  How could you pass all the requirements for data applications? Please give me some instructions. Thanks.
Btw, I am a big fan of your blogs, May I have your WeChat? (I could send an email to your Gmail).

No problem, you can tell me your wechat in the email


Fix Wrong Rendering of Code Example

Code example was being rendered as plain text. This commit fixes it.

Can one of the admins verify this patch?

I signed it!
On 29-Nov-2017 3:06 PM, "googlebot"<EMAIL_ADDRESS>wrote:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).
📝 Please visit https://cla.developers.google.com/
https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll
verify. Thanks.

If you've already signed a CLA, it's possible we don't have your
GitHub username or you're using a different email address. Check your
existing CLA data https://cla.developers.google.com/clas and verify
that your email is set on your git commits
https://help.github.com/articles/setting-your-email-in-git/.
If your company signed a CLA, they designated a Point of Contact who
decides which employees are authorized to participate. You may need to
contact the Point of Contact for your company and ask to be added to the
group of authorized contributors. If you don't know who your Point of
Contact is, direct the project maintainer to go/cla#troubleshoot.
In order to pass this check, please resolve this problem and have
the pull request author add another comment and the bot will run again.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/14971#issuecomment-347803521,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJ6nhmfcXp0cIkSbu5tgy_7cDWoviJboks5s7SWbgaJpZM4QuqWH
.

The builds are failing. Do I need to change anything ??

Seems like it couldn't start the build. Let's try one more time.
Saving the link for this run for future reference https://source.cloud.google.com/results/invocation/93164fdd-a76a-45c8-a156-4b9c62e39096/log

I don't think the builds are running.
ERROR: no such package<EMAIL_ADDRESS>BUILD file not found on package path


How can I access the content of  in the expand method?

I am having trouble accessing the properties of the "li" object in the expand method
li.text(), li.val(), li.html() - none of these work
expand: function(li, effect, force) {
}
any ideas?
Thanks

Hi @lbuchume,
have a look at https://api.jquery.com/attr/
BR

well I tried $(li).prop('value'); or $(li).attr('value');, I get undefined
No matter which prop or attr I try I either get undefined or blank

if I do li.attr('value'),  I get Object doesn't support property or method 'attr'
I don't get what I am doing wrong

its not working.  I am using IE.  I get object doesn't support this property or method 'attr'
    $('#treeview').tree({
        /* specify here your options */
        collapseUiIcon: 'ui-icon-plus',
        expandUiIcon: 'ui-icon-minus',
        checkbox: false,
        selectable: true,
        **expand: function (li, effect, force) {
            alert(li.attr('value'));
        }**
    });


Refine dependencies for cloudflare test.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.00%. Comparing base (1679e39) to head (fd042e1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #370   +/-   ##
=======================================
  Coverage   92.00%   92.00%
=======================================
  Files          53       53
  Lines        3792     3792
  Branches      352      352
=======================================
  Hits         3489     3489
  Misses        302      302
  Partials        1        1

Flag
Coverage Δ

unittests
92.00% <ø> (ø)

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

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


ComputedFrom initial value seems to be missing in 0.15.0

In version 0.15.0, bug fix https://github.com/nartc/ngxtension-platform/blob/main/CHANGELOG.md#bug-fixes seems to be missing, even after reinstalling 0.15.0 I only see
this signatures exported for computedFrom:
computed-from.d.ts:
export declare function computedFrom<Input extends readonly unknown[], Output = Input>(sources: readonly [...ObservableSignalInputTuple<Input>], operator?: OperatorFunction<Input, Output>, injector?: Injector): Signal<Output>;
export declare function computedFrom<Input extends object, Output = Input>(sources: ObservableSignalInputTuple<Input>, operator?: OperatorFunction<Input, Output>, injector?: Injector): Signal<Output>;

Third argument is still of type Injector instead of  ComputedFromOptions.

and in doc

By default, it needs to be called in an injection context, but it can also be called outside of it by passing the Injector in the third argument options object.

from https://ngxtension.netlify.app/utilities/signals/computed-from/