Compiler incorrectly reports parameter/call target signature mismatch when using the spread operator

The compiler incorrectly reports a parameter/call target signature mismatch when using the spread operator. Pasting this code into the TypeScript Playground:
function foo(x: number, y: number, z: number) { }
var args = [0, 1, 2];
foo(...args);

produces this error:
Supplied parameters do not match any signature of call target.

And the same is for when args is of any-type
function foo(x: number, y: number, z: number) { }

function bar(...args) {
	foo(...args); // Supplied parameters do not match any signature of call target.
}

this is currently by design. but we should reconsider it.

@smashdevcode, @tjoskar, I'm looking for some real-world uses of this feature. Specifically, do you expect to spread arrays or tuples (or both maybe)? Here are couple of toy examples:
//// arrays ////
var a1: number[] = [1,2];
var a2: number[] = [1,2,3];
var a3: number[] = [];
function twoNumbersOrSo(n?: number, m?: number) {
  return (n || -1) * (m || -1);
}
function howManyNumbersLessOne(n?: number, ...ns: number[]) {
    return ns.length;
}

//// tuples ////
var t1: [number, string] = [1, "foo"];
var t2: [number, string, string] = [1, "foo", "bar"];
function veryTraditional(n: number, s: string) {
    for (let i = 0; i < n; i++) {
        console.log(s);
    }
}
function moreInteresting(n: number, s: string, ...rest: string[]) {
    veryTraditional(n, s);
    console.log(rest);
}

Now any of a1,a2,a3 can be applied to the first two functions, and any of t1,t2 can be applied to the second two.
Notice that with arrays:

Have a single type, so parameters all have to be the same type. (I guess this could be any.)
The length of arrays is not known at compile time, so the parameters have to be optional. And the spread argument has to be the last (like today).

With tuples:

The value will have to have a type annotation at some point. Otherwise it will be interpreted as an array (eg (number | string)[] not [number, number, string]). In toy code this erases any savings in brevity, but it might be OK in a real project that already defines lots of interfaces.
The length is known ahead of time, so a tuple can be applied to any kind of parameter list.

Hi @sandersn,
Sorry for late response. I totally missed your reply.
I do only use arrays (with one datatype) so the tuple-version is not very interesting for me.
However I think that the spread operation in function calls should accepts any iterable object. So it should work with eg. map and set, and in these cases we will need to create an interface that works with the spread operator even if the data contains multiple datatypes (eg. new Set().add(1).add('string')). But that is maybe another ticket?
Example with Set and the spread operation (works in Chrome 46)
function foo(...args) {
    console.log(...args);
}
var bar = new Set().add(1).add(2);

foo(...bar); // 1, 2

Yeah, it's a separate issue. Typescript already supports arrays as the type for rest parameters, which is the thing that would need to be made generic. We're just discussing where spread args could be used.
Do you want to pass your homogenous arrays/sets to functions with rest-parameters or ones with a fixed number of arguments? I'd like more detail on the thing you would be calling.

First of all, I have playing around with the spread operator this morning and most of my use cases works fine in the latest version of typescript<EMAIL_ADDRESS>and on http://www.typescriptlang.org/Playground. So this is not a big deal anymore.
However,
I don't like the idea to make all parameters optional just to be able to use
spread operator BUT I understand the problem; the length of arrays is not known at compile time so
it is impossible to check the parameters at compile time.
However, I think it would be nice if the parameters don't need to be optional and that the compiler
only check that "spread-variable" is of right type eg. number[]
function fun1(x: number, y: number, z: number) {
    return x+y+z;
}

let arr1 = [1, 2, 3];
let arr2 = [1, 2];

fun1(...arr1);
fun1(...arr2); // OK since `arr2` is number[]
fun1(1, 2); // Should cause an error

Is that possible?
The following code works in the current version of typescript, which it didn't when this issue was addressed.
function fun1(...num) {
    return Math.max(...num);
}

function fun2(a1, ...num) {
    return Math.max(...num);
}

function fun3(a1, ...num) {
    return fun1(...num);
}

let arr = [1, 2, 3];

if (Math.random() < .5) {
    arr.push(1);
}

fun1(...arr);
fun2('first param', ...arr);
fun3('first param', ...arr);

Maybe a more realistic example (that also works nowadays):
const doSomeWork = ({title, genre, runtime}) => { console.log(title, genre, runtime); };

function fun1(...num) {
    num.forEach(doSomeWork);
}

const data = [{
	title: 'title',
	genre: ['action', 'drama'],
	runtime: 100
}];

fun1(...data);

:+1: Having the same issue, with the specific use case of the Date constructor:
let dateNumberArray: Array<number> = [2015,11,11];
let myNewDate = new Date(...dateNumberArray);

For us we use spreads to allow users to configure argv requirements in a base app without the need to build their own helpers.  For example:
{
  "yargv": [
    [
      "path",
      {
        "demand": true,
        "describe": "Source",
        "default": ".",
        "alias": "p"
      }
    ]
  ]
}

get appArgs() : { yargv: Array<Array<any>>, chdir: Array<boolean | string> } {
  return require(
    "../args.json"
  )
}

argv() : Promise<{}> {
  return new Promise((resolve) => {
    this.appArgs.yargv.forEach(v => yargs.option(...v))
    return resolve(yargs.usage("$0 [args]").help("h").
      alias("h", "help").argv)
  })
}

A real world example using the combineLatest function of https://github.com/ReactiveX/rxjs where I want to preserve the this value when calling projectFn using an arrow function and use rest parameters to propagate the arguments.
getCombination() {
    return this.firstObservable
      .combineLatest(this.secondObservable, (...args) => this.projectFn(...args)));
  }

Currently I have to do
getCombination() {
    return this.firstObservable
      .combineLatest(this.secondObservable, (...args) => this.projectFn.apply(this, args)));
  }

FWIW, another real world example is trying to deep merge an array of objects using merge from lodash:
import { merge } from 'lodash';

...
return merge(...arrayOfObjects);

Here's another real world use case; we're trying to refactor code that looks like this:
return Observable
      .forkJoin(a, b)
      .map(([current, past]) => this.mergeData(current, past));

Into the slightly more elegant:
return Observable
      .forkJoin(a, b)
      .map(data => this.mergeData(...data));

But using the spread operator triggers the signature mismatch error.

Another example
class Parent {
    constructor(a, b, c){

    }
}

class Child extends Parent {
    constructor(...args) {
        super(...args);
    }
}

TS2346: Supplied parameters do not match any signature of call target.

Same issue with overload methods:
listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server;
listen(port: number, hostname?: string, listeningListener?: Function): Server;
listen(port: number, backlog?: number, listeningListener?: Function): Server;
listen(port: number, listeningListener?: Function): Server;
listen(path: string, backlog?: number, listeningListener?: Function): Server;
listen(path: string, listeningListener?: Function): Server;
listen(options: ListenOptions, listeningListener?: Function): Server;
listen(handle: any, backlog?: number, listeningListener?: Function): Server;
listen(handle: any, listeningListener?: Function): Server;

while called as
myListen(...args) {
    listen(...args);
}

then: [ts] Supplied parameters do not match any signature of call target.

Up

So for now it's impossible to do such thing:
export type DateProp = Date | (string|number)[];

const setDate = (value: DateProp): Date => (
    isDate(value) ? value : new Date(...value)
);

As it is producing error:

Supplied parameters do not match any signature of call target.

Even if value contains correct Date contructor parameters values @mhegazy ? Or I'm not getting something?

Even if value contains correct Date contructor parameters values @mhegazy ? Or I'm not getting something?

That is correct, this is what this issue is tracking.

I feel obliged to ask if I can help / contribute somehow. If now, can you elaborate why exactly it's causing an error in this case? Can it be skipped somehow through config?

I was actually hit with this issue when I renamed a .js file to .ts.  Anyhow, one example of "not all valid JS is valid TS".

I'm currently having this issue implementing styled-component's media templates example.
import {css} from 'styled-components';

export const Breakpoints = {
    tablet: 580,
    desktop: 800,
};

export type BreakpointLabels = keyof typeof Breakpoints;

export const media = Object.keys(Breakpoints).reduce((mediaQueries, label: BreakpointLabels) => (
    {
        ...mediaQueries,
        [label]: (...args: any[]) =>
            css`
                @media (max-width: ${Breakpoints[label]}px) {
                    ${css(...args)}
                      ^^^^^^^^^^^^ Supplied parameters do not match any signature of call target.
                }
            `
    }
), {});

same issues, my example is basic merging function:
merge(target: T, ...sources: T[])
is there any workaround how to mute this error at least per file?
Actually, I'd like to see reasons why this ES6 possibility is broken by design or any plans when it might be reconsidered. @mhegazy please comment.

We have recently made a change to allow spreading into call expressions if the target is all optional (see https://github.com/Microsoft/TypeScript/pull/15849). The change works by treating a spread output as an infinite set of optional arguments.
With this change, here is the current state in examples:
declare var args: number[];

function foo(x?: number, y?: number, z?: number) { }
foo(...args);     // OK
foo(2, ...args);  // OK

function bar(...args: number[]) { }
bar(...args);     // OK
bar(2, ...args);  // OK

function baz(x: number, y: number, z: number) { }
baz(...args);     // still not allowed

In the last example, the compiler has no way to validate that args satisfy the required baz, since the length of args can not be statically validated.
What is left in this area is to allow tuples with known size to satisfy functions with required arguments of the same length..  but this is not as simple as it may sound. e.g.:
function baz(x: number, y: number, z: number) { }
var tuple: [number, number, number] = [1, 2, 3];
baz(...tuple);     // should be allowed

I have same problem like @devrelm

I'm still having problem with this, even though I did as @mhegazy suggested. What's wrong?
https://www.typescriptlang.org/play/#src=class%20A%20%7B%0D%0A%20%20%20%20constructor(message%3A%20string%2C%20test%3F%3A%20any)%20%7B%0D%0A%20%20%20%20%20%20%20%20console.log('A%20constructor%20called')%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Aclass%20B%20extends%20A%20%7B%0D%0A%20%20%20%20constructor(...spread)%20%7B%0D%0A%20%20%20%20%20%20%20%20super('a'%2C%20...spread)%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Alet%20greeter%20%3D%20new%20B()%3B%0D%0A%0D%0A

@owlcode this is in TS 2.4 but the playground is on TS 2.3 until after 2.4 releases.

This does appear to be fixed in TS 2.4,
export function log(...args: any[]) {
    console.log(...join(args.map(formatDevTools),' '));
}

However, there appears to be a new bug in TS 2.4:

TS2461: Type 'Iterable' is not an array type.

Happens when you try to spread an iterable ([...obj]).
And yet a different bug (I think) in 2.4.1-insiders.20170615 which I haven't been able to figure out yet.
I don't know how to get around this one either. Casting our arrays to any[] won't help.

+1

I opened a PR for this at #18004.

For now, I'll have to enable "noStrictGenericChecks" in my tsconfig.

For now, I'll have to enable "noStrictGenericChecks" in my tsconfig.

Not sure I see how this is related to this bug...

Not sure I see how this is related to this bug.
@mhegazy This setting disables all function signatures, so I can pass arguments using the spread operator without matching the amount of arguments (at least not statically)

that is not what --noStrictGenericChecks do. Please see https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#stricter-checking-for-generic-functions

I just ran across this.
While I can understand that it is difficult, at least "excess" properties should be able to identify.
@sandersn from a real world perspective we were refactoring an API to either accept a single argument or an array, instead of using a rest argument.  So situations where we were passing something like foo(value, ...otherValues) were not being identified as errors.  Specifically this seems really dangerous:
declare const foo: (value: string) => string;

foo('bar', 'qat'); // Expected 1 arguments, but got 2.

foo('bar', ...['qat']); // No error

@kitsonk can you open a separate bug for that? It would be easier to consider in isolation, and is probably a small tweak to the existing rules, rather than a complex change.

Even if I check the length, I still get this error:
function myFunc(...args: any[]) {
  if(args.length > 0) {
    otherFunc(...args)
  }
}

Another nice testcase (actually a regression of TS 2.7) is this:
class NonEmptyArray<T> extends Array<T> {
        0: T;
}

function c(firstArg: string, ... plainValues: string[]): string;
function c(): undefined;
function c(...values: string[]): string | undefined {
        if (!values.length) {
                return undefined;
        }
        return "";
}

function d(): NonEmptyArray<string> {
        return [""];
}

function y(): string | undefined {
        return c(...d());
}

It produces
test.ts(20,9): error TS2557: Expected at least 0 arguments, but got 0 or more.

Another issue I came across regarding spread operator:
const get = (id?: string = '1231254', bar?: Bar, baz?: Baz) => {...}
const foo: [undefined, Bar, Baz] = [undefined, bar, baz]

get(...foo) // [ts] Argument of type 'Bar | Baz' is not assignable to parameter of type 'string'.
  Type 'Baz' is not assignable to type 'string'

Of course, in ES6 I have no problem to spread array with undefined included as arguments and pass properly the undefined but it seems like TS just ignore undefined values when he spread them.

Another real world example, in which correct handling of spread operator in function call will help a lot:
I have functions generated by NSwagStudio - API generator for C# WebApi, which have the same parameters (GET parameters are defined in structure)
The generated function looks like following:
export interface ITableApiClient {
    getTableInfo(objnam: string | null, objsch: string | null | undefined, dbnam: string | null, conid: number | undefined): Promise<FileResponse | null>;
    otherFunction(objnam: string | null, objsch: string | null | undefined, dbnam: string | null, conid: number | undefined): Promise<string | null>;
}

I want to call it with syntax
   get tableIdentification() {
       return [this.name, this.schema, this.databaseName, this.serverConnectionId];
   }
...
   return apiClient.getTableInfo(...this.tableIdentification);

   // this doesn't help, still compile-time error
   // return apiClient.getTableInfo(...(this.tableIdentification as any));

because there are more functions with exactly the same parameters (because they are generated from the same parameters class defined in C# backend). Now I have to copy body of property tableIdentification n-times into each usage

https://www.typescriptlang.org/play/#src=[].concat.call(...[[1%2C 2%2C 3]%2C [4%2C 5%2C 6]])%3B

@smashdevcode  For me solution was to add @ts-ignore
function foo(x: number, y: number, z: number) { }
var args = [0, 1, 2];
// @ts-ignore
foo(...args);

example here: https://stackblitz.com/edit/typescript-ecymei?embed=1&file=index.ts

@darekf77, or if you say that args is a tuple:
function foo(x: number, y: number, z: number) { }
const args: [number, number, number] = [0, 1, 2];
foo(...args);

ts-playground

@darekf77, or if you say that args is a tuple:
function foo(x: number, y: number, z: number) { }
const args: [number, number, number] = [0, 1, 2];
foo(...args);

This works for me when I compile typescript in the command line, but not when Visual Studio Code validates the typescript while I'm typing. I'm not sure what the disconnect is here.

I see it's been over a year since jayphelps mentioned that this would be fixed in an upcoming release, but this issue still occurs. Is there any update on this? I know I could use @ts-ignore however this removes ALL typescript messages for the function so isn't really an appropriate solution.

@TidyIQ as mentioned by tjoskar, typecast your spread array as a tuple.

A typecast will work as far as the compiler is concerned, even if it is innacurate. I agree it's not the best solution.

(This question should probably be moved to stack overflow (or similar))
@TidyIQ, if the array doesn't have a fix length, the compiler can not tell if the array is suitable or not.
function foo(x: number, y: number, z: number) { }
const args = arrayOfSomeLength;
foo(...args); // Error: The compiler do not know if there is 3 or 2 or 1 or 50 elements in the array.

So if the array is of dynamic length the arguments should be that as well:
function foo(...args: number[]) { }
const args = arrayOfSomeLength;
foo(...args);

Playground

Unfortunately that won't work either as some of my args are fixed length.
Perhaps if I just post the code you might see the issue.
interface IF_Object {
  [key: string]: object;
}
interface IF_SetKV {
  (key: string, value?: any): Function;
}
interface IF_CreateState {
  (key: string, value?: any, ...more: string[]): Function;
}

const setKV: IF_SetKV = (key, value) => (object: IF_Object = {}) => ({
  ...object,
  [key]: value
});

const createState: IF_CreateState = (key, value, ...more) => (
  object: IF_Object = {}
) =>
  more.length === 0
    ? setKV(key, value)(object)
    : setKV(key, createState(value, ...more)(object[key]))(object);

const newState = createState(...stateList, action.payload.value)(reduced);

@TidyIQ, I'm not sure I follow. What happens if stateList is an empty array? In that case will action.payload.value be passed as the key?
Should not this work:
const createState = (...args: string[]) => (object: IF_Object = {}) => {
  const [key, value, ...rest] = args;
  if (rest.length === 0) {
    setKV(key, value)(object)
  } else {
    setKV(key, createState(value, ...rest)(object[key]))(object);
  }
}

Cast to spread value as the ParameterType of the function you are passing arguments to.
const add = (a: number, b: number) => a + b

const values = {
  a: 1,
  b: 2,
}

type AddParams = Parameters<typeof add>

add(...(values) as AddParams)

@mateja176 This also seems to work and might better suit some use cases.
add(...(values as [number,number]))

or
add(...(values as [any,any]))

I use a helper type for this to handle arbitrary arrays without having to type them explicitly:
type NonEmptyArray<T extends any[]> = T extends (infer U)[]
  ? [U, ...U[]]
  : never

It can be used like this:
add(...values as NonEmptyArray<typeof values>)

Detailed explanation for beginners
The following dissection of the NonEmptyArray type explains how it works in detail:

#
Part
Explanation

(1)
type NonEmptyArray
The name of the helper type

(2)
<T
The helper type takes a generic type parameter T.

(3)
extends any[]>
To be accepted by the type checker, that type parameter T must be some array type.

(4)
T extends (infer U)[] ?
Our helper type is a conditional type which checks whether T actually is an array type.We have declared T as an array type in (3), so this condition always passes, but using the conditional allows us to let TypeScript infer the type that the T array is made of, and we call that type U.

(5)
[U, ...U[]]
Now we can assemble the resulting type: an array where the first entry is of type U and the remaining (0 or more) entries are also of type U.Because of this specific tuple notation, TypeScript is aware that there is at least one item.

(6)
: never
This is just needed to syntactically complete the conditional. Remember: the conditional is just a trick to extract the U type, and it always passes. Therefore, we can safely ignore the "else" branch by yielding never.

Now if we do this...
const values = [1,2,3]
add(...values as NonEmptyArray<typeof values>)

...the following will happen:

typeof values is the type which TypeScript inferred for the values array, which is an array of numbers: number[].
That means, we pass number[] as  T. (2/3)
T is indeed an array type, so, we can infer U from it, which is number. (4)
Now that we know U is a number, we yield the type [number, ...number[]]. (5)

I fix my issue by doing this:
const fetcher = (...args: [any]) => fetch(...args).then(res => res.json());

Playground Link

@tjoskar change your code to
function foo(x: number, y: number, z: number, f: number) { }
const args: [number, number, number] = [0, 1, 2];
foo(...args, 3);

(playground)
And the error's back.
Surprisingly, if you were to change the last line to foo(3, ...args); - there will be no error.
Is it by design?

I feel like this still isn't working. Here is my example
onSetValue={(...args: Parameters<typeof props.onSetValue>) => {
    setLanguage(null);
    props.onSetValue(...args); // Expected 2 arguments, but got 0 or more.
  }}

It shouldn't really matter what is the type of props.onSetValue, because I just take the parameters type and pass it to the function which I got the the type from and it still gives the Expected 2 arguments, but got 0 or more. error.

Here is a reduced form of @Haaxor1689's example:
Playground link

I still can't get it working
this is my temporary workaround
class Board {
  private events: Events

  **public on(...args: Parameters<this['events']['on']>) {
    this.events.on.call(this.events, ...args)
  }**
}

I feel like this is still a problem (just encountered this). Is there another open issue for this, or would it be relevant to re-open this one?

@ahejlsberg this issue either persists or there is a regression in the latest TS version.
The comment above (https://github.com/microsoft/TypeScript/issues/4130#issuecomment-691115905) demonstrates it perfectly.

@ahejlsberg this issue either persists or there is a regression in the latest TS version.
The comment above (https://github.com/microsoft/TypeScript/issues/4130#issuecomment-691115905) demonstrates it perfectly.


Base Component class should be improved to make the code more readable and usable

A suggestion would be to make Component inherit the python native dictionary class and update its constructor, setter, and getter:
class Component(dict):
    def __init__(self, params):
        self.update(params)

    def __setattr__(self, name, value):
        self[name] = value

    def __getattr__(self, attr):
        return self[attr]

This way we could instantiate, modify and request attributes in the class like this:
# Instantiating object
wing_params = {'span': 3.2, 'chord': 0.3, 'twist': 3}
wing = Component(wing_params)

# Setting variable
wing.span = 2.8

# Getting variable
print(wing.span)

Adressed in 2.0


JMH output with extra symbols between score and error

The following example fails to parse because there are extra symbols between the score and error in the rows. My guess is that JMH version > 0.9 has introduced this output format.
Benchmark                   (crossCL)    (size)  Mode  Cnt          Score      Error  Units
Misaligned.read_aligned         false      4096  avgt   25         8.755 Â±     0.086  us/op

Fixed in 1.0.5.


Pagination doesn't return a generator

When using the get method of graph and setting paging=True it returns a dict, not a generator.

Which version are you using? Try parameter paging=True instead.


Update README.md

This is hacktoberfest spam. To the repo owner: close and add a tag "invalid" or "spam" to this PR for this spam effort have to results.
I hope all the spammers dont get the t-shirt.

Edited certain lines


Add troubleshoothing changes

This pull includes some small changes which will hopefully make troubleshooting some benchmark failures easier:

Also preserve log file used for the benchmarks as a workflow artifact

I think this limit increase will also help with the tests - https://github.com/scalyr/scalyr-config/pull/7089


[Feature](schema change) Support add column bitmap with default value bitmap_empty

Proposed changes
Issue Number: close #xxx

run buildall

run buildall

run buildall

run buildall

run p0

run cloud_p0


Error: Command Failed when opening app

I updated the app from 0.3.1 to 0.4.2.

Do you have npm in path?


Lazily create GDScript thread lambda bookkeeping block

This is an extension to #85432 (which is included to conflicts are pre-solved), but for 4.3, given it's slightly less safe.
This avoids every thread that does not even run GDScript or doesn't use lambdas using memory for some bookkeeping they don't need.

Rebased and improved to use a paged allocator.

Superseded by #86569.


New Folders no Longer Syncing after Recent Update

Describe the bug
New albums added after recent update are not automatically syncing when opening the app.
To Reproduce
Steps to reproduce the behavior:

Create a synced folder.
Copy to a new folder with a different name in /lespas from Nextcloud.
Observe how the app will not automatically sync the new folder.

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):

Device: OnePlus 5
OS: Android 11
Version 2.1.1

Additional context
I have a large amount of albums (300+), but I didn't have any issues with the initial sync after removing the problematic albums/files.

Please elaborate, I just can't catch what is going on with this issue.

I tried adding some new albums today into the Les Pas folder in Nextcloud, but the app will not sync the new folders I added.
I thought something might have been wrong with my new album, so I copied an existing synced album and renamed it. The copied/renamed album also doesn't sync, even though the same images synced without issue before.

I suspect that there is something wrong happened in the sync process even before you create these new folders.
Try open Les Pas app, it will sync once with server at startup. Then on your server, monitor your  web server's access log, if you are using apache like I do, use the following:
grep LesPas /var/log/apache2/access.log
see if you can spot anything wired.

Thank you for the advice!
Seems that Les Pas had indexed some albums that I moved out of the folder because they had some problematic files within them. It couldn't find the json file in the album since it was no longer around and thus couldn't continue the sync.
After I placed the albums back (including the json files), all of the new albums synced without issue!

Could you tell me what do you find out with those problematic files? What exactly went wrong?

I was going to create a separate issue for it, but the sync process also seemed to be getting stuck on files that contained illegal characters. Almost all of my .gif files have a space in their name, and some of my pictures with parentheses or brackets also would cause the sync to get hung up.
My temporary solution was to move the folder/pictured out and then move them back either when a fix was available or after renaming them to a filename that the app can handle.

Could you please just give me an example of what those names are? so that I can reproduce the bug here.

A gif name.gif
[something].jpg
(test).png

just tested here, file name with space, parenthese and bracket all synced properly without any problem. the issue is not with the naming.

Very strange. I can't reproduce the issue anymore. I think the issue must have been occurring because of something from the older version of the app. The sync was getting stuck looking for files that I removed manually in Nextcloud, but now it is not getting stuck when I rename/move/delete files manually anymore.
Marking issue as resolved.


Missing pg and mongodb-core from default plugins list

Default plugins list in packages/opentelemetry-node is missing pg and mongodb-core

assign me and close when #573 merges


MLIBZ-2024: Set default for generics to definitions file

Description
This PR updates kinvey.d.ts to set a default value for generics in the definitions file.
Changes

All data store instances now use Kinvey.Entity as the default for the type of generic it will return.
FileStore functions will now use Kinvey.File as the default for the type of generic it will return.
datastore.sync() now correctly returns a Promise.

@georgiwe @tejasranade Can you approve this PR if everything looks good?


Improved Markdown formatting and readability

Added backticks around mentions of Span<T> and other code such as _relocatableObject (in which case the _ is currently interpreted as emphasis).
Added [here] text to links as that was done elsewhere in the document already.
Added space before headers so they are properly recognised as such.

@asbjornu,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@asbjornu, looks good. Thanks for the contribution :)

@ahsonkhan: Thanks. Is there anything I need to do now to have this merged? Is the "Pre-Merge signing tool" something I should look into?

@ahsonkhan: Thanks. Is there anything I need to do now to have this merged? Is the "Pre-Merge signing tool" something I should look into?

I have signed off on the pre-merge tool. The PR is good to go.

@ahsonkhan: Excellent, thanks! 👍


ui: link to QR setup in app

We have this QR generator page to configure the Android app, but it's unlinked:
https://server/ui/mobile.html

[ ] Put it in the menu.
[ ] remove the self-signed cert option,
[ ] rename Camlistore to Perkeep
[ ] and make the username field auto-fill (probably not the password, though)

/cc @mpl

/cc @wathiede  :)


[106225716] Add "without-" classes to document for all inactive features.

This allows us to keep the original CSS separate from the feature CSS by enclosing the original CSS inside the "without-" class.
https://www.pivotaltracker.com/story/show/106225716

can you provide example use case for this scenario? is this for when 2 or more tests are simultaneously active?

In a nutshell, we are de-coupling the global and feature-flipped CSS styles.
This is useful whenever you are implementing any pinball-flippable feature.
Say you have a style in your current global stylesheet, e.g.:
#header {
  height: 40px;
  background: red;
}

In your feature's css file, you want to make the header blue, so you do this:
.use-my-feature {
  #header {
    background: blue;
  }
}

Pinball automatically adds the .use-my-feature class to the entire document when my_feature is active, so this works fine. However, when you go to publish my_feature, you have to merge your style customizations with the global stylesheet to pick up the height value which was previously being "inherited" from the global stylesheet. This process can be very difficult and error-prone, as we have experienced with previous feature-publishing attempts.
This PR will cause pinball to add a without-my-feature class to the document for all inactive features. This forces you to put all of the styling you need in your feature-specific CSS, and all your global styles under a without-<feature> class, so that when your feature goes live, you can simply replace the entire without-<feature> section with your feature CSS.
Note that this change is only in the css_tagger, so it is effectively optional. Projects not wishing to use this feature can opt out by simply not upgrading to this version of the css_tagger.
Hope this makes sense. Happy to discuss further.

Thanks @mpelzsherman for elaborating. I wanted to echo the rationale —
With the current version, it's recommended to set default styles and then override them with .use-{feature}. Overriding CSS with more specific rules is generally error prone (hence the need for patterns such as Modular CSS, BEM, etc).
This PR puts the CSS rules in parallel so that only one is applied at a time.
This is typical with the current version of pinball:
#header {
  background: red;
}

.use-my-feature {
  // override with a more specific selector
  #header {
    background: blue;
  }
}

And this PR:
.without-my-feature {
  #header {
    background: red;
  }

.use-my-feature {
  // not overwritten
  #header {
    background: blue;
  }
}

Overall, this is great! A few suggestions:

Can we add a specific test for .without-{feature}? That way it's clear what the intent is.
I think it's safe to add it to the main pinball_wizard.coffee too. Pinball should be opinionated. If someone doesn't want to use .without-{feature}, then they don't have to write CSS rules.
Update the README :D

After this is merged, please bump to 1.0.0 :boom:

:boom:


It was a great tool when it was working, please fix it if you can!

Hello! The code stopped working recently. It was incredibly useful tool to analyse and understand used car prices in the UK when it was working. If it is something that can be fixed it would be much appreciated.
Thank you

Hi Alecsasha,
Thanks for bringing it to my attention! Looks like they added CloudFlare protection and changed the format which affects the scraping methodology.
I've made a few changes in v0.1.1 which fix the issues for me. Please have a go at updating the package (best way is to uninstall and reinstall using pip) and then trying again.
Unfortunately I had to use a package that requires Python 3 to bypass CloudFlare so you might need to use a newer Python version.
Let me know how you get on,
Suhail

It is back online! Thank you for looking into this and fixing it.


test demoing bug #1577 on SQL Server

This is actually a bug in ORM core, and will be anyway resolved by setting the correct version of the MySQL dialect.


Obsidian Grinder's Do not function without string reinforcement.

Currently, the obsidian grinder hack does not function unless the string is reinforced. Forcing users who are attempting to bot obsidian production to /ctf [group], /ctb in order to grind obsidian.
Please fix.

Fixed by https://github.com/CivClassic/SimpleAdminHacks/pull/27


Date Mask default to current year

Hi Robin,
I just trying your library for masking date input, something like this :
Inputmask('datetime', {inputFormat: "dd/mm/yyyy", placeholder: "__/__/____", max: todayFormatted()}).mask('date');
todayFormatted() is my custom function returning current date in "dd/mm/yyyy" format.
It is actually work fine, but when I type 2 digits of year part which matches first 2 digits of current year, it defaults to current year.
So, when I type 20, it is automatically give 2020 as the result.
Is it the desired behaviour? because it give me trouble. For example input for date 01/01/2007, when I type 01/01/20, it will automatically gives 01/01/2020. So I have to delete the last 2 digits and retype 07 part.
Thanks

@bayuprimajaya ,
The inputmask makes a suggestion but you can overtype the added 20 by typing the 07 part.  You do not need to delete it.
Anyway someone has send in a PR, to add a flag to enable/disable the year prefill.  I will add it soon.

An option flag to disable the preFilling like in the mentioned PR would be great!

Looks like PR #2396  was never merged. I've figured out that the ability to disable prefilling dates has been implemented with the option flag prefillYear as of #2395

True, but the option is included.
https://github.com/RobinHerbots/Inputmask/blob/5.x/README_date.md#prefillyear


SRT parser cannot handle empty captions.

If there is a double empty line, this should indicate that the caption slot is empty. Software such as Camtasia will generate SRTs with such empty slots.
The a more compatible behaviour would be to parse them as captions with empty content.

Had a stab at fixing here: https://github.com/glut23/webvtt-py/pull/9

Hi, I've also done a PR for same support for SBV files. #26


Reemitted Defn.Val's in traits discard backquotes in identifiers

Summary
Literal identifiers degrade to unquoted identifiers when reemitted by StaticAnnotation#apply.
This causes unexpected syntax errors when using fields with literal identifiers.
@olafurpg suggested the issue may be related to this line: https://github.com/scalameta/scalameta/blob/b269cd87de10be0b54056609b4777f79e77165e7/scalahost/core/src/main/scala/scala/meta/internal/scalahost/converters/ToMtree.scala#L260
Note: This probably does not just apply to traits, but at the least to classes and objects as well.
Minimal Reproduction:
class ShowMeASyntaxError extends scala.annotation.StaticAnnotation {
  inline def apply(defn: Any): Any = meta {
    defn match {
      case dt @ Defn.Trait(_, _, _, _, _) => dt
      case _ => abort("@BrokenIdentity must annotate a trait.")
    }
  }
}

@ShowMeASyntaxError
trait ThisIsBroken {
  val `type`: String = "jurisprudence fetishist gets off on technicality"
}

Output (Failing):
[error] <macro>:1: illegal start of simple pattern
[error] trait ThisIsBroken { val type: String = "jurisprudence fetishist gets off on technicality" }
[error]                          ^
[error] <macro>:1: '=' expected but '}' found.
[error] trait ThisIsBroken { val type: String = "jurisprudence fetishist gets off on technicality" }
[error]

Output (Expected):
None.

Confirmed this also occurs for other statements.
class ShowMeASyntaxError2 extends scala.annotation.StaticAnnotation {
  inline def apply(defn: Any): Any = meta { defn }
}

This will break any class, object, trait, etc it is applied to with backquoted vals.

Hi @DylanLukes! Thanks for reporting the issue. It looks like it is specific to the macro system implemented in scalameta/paradise, and it doesn't affect Scalameta in general.
After discussing the future of Scala macros, we have decided to retire scalameta/paradise in favor of a new implementation that will be living at https://github.com/scalamacros/scalamacros.
This means that in the future we won't be doing bugfixes for scalameta/paradise, focusing on the new implementation of Scala macros instead. We will, however, dedicate effort to providing a migration path from scalameta/paradise to scalamacros/scalamacros. Please follow scalamacros/scalamacros#4 to stay tuned for updates.


Better metrics

Improve visibility of disposables (Tensor and PackedSequence) to make memory leaks easier to troubleshoot. No breaking interface changes. This resolves #1390.
This PR is what I'd actually like to see for object lifetime statitics. It gives complete statistics for object creation and disposables whether in a DisposeScope or not, and accurate Attach/Detach counts. Lastly the ThreadTotalLiveCount is no longer estimated, it is exact. Also added documentation on how to use the statistics for troubleshooting memory leaks.
New Documentation:
memory leak troubleshooting.md - provides practical guidance on how to use the changes of this PR for useful troubleshooting of memory issues.memory.md was also updated to link to this document.
New Interface Members

DisposedOutsideScopeCount - # of objects .Dispose when not attached to a scope
AttachedToScopeCount - # of objects attached to a scope via .Attach
ThreadTotalLiveCount (No longer approximate, is exact)
ToString - creates a useful debug string for the developer.

Semantic changes:
None of the statistics are decremented anymore. All statistics are additive only. If an event happens, it is incremented. The original DisposeScopeManager.Statistics object now represents the total combined counts for both PackedSequence and Tensor. It also has individual attributes for .TensorStatistics and .PackedSequenceStatistics where these counts are tracked individually. A common interface ILifetimeStatistics was introduced for these. Additionally the Dispose for both Tensor and PackedSequence were both modified to prevent reentry and double incrementing disposal metrics.
Defects discovered during implementing this:

TestDisposeScopes.MinimalDisposeWorks had commented assertions, and actually reveals the prior approximate ThreadTotalLiveCount was not capturing live tensors. It now captures them accurately. This also led to discovery of the next item (the reason for the commented assertions).
The .ToTensor method has always leaked a tensor that is never disposed. There are two new tests to capture this behavior as it is currently, both in and out of a DisposeScope, with comments on how they need to change when this defect is fixed. These tests are in different fixtures but both named "ToTensorCreatesOrphanedTensor". I can create a new issue for this if you decide this PR is worth moving forward, or I can try to fix it here in this PR.

I understand this is a larger PR and some siginificant API changes. Given that it provided accurate counts and helped identify defects withing TorchSharp itself, the useful utility provided by these changes is demonstrated. Let me know what you like, hate, or want changed.
Note dependent on PR #1389 (although maybe not, the commit appears in this PR too so maybe we can close that other one).

Ready to merge?


Add ImagePath Sensors

Breaking change

Image paths are now hardcoded to www/mail_and_packages/
Image security is now always on

Proposed change

Add ImagePath sensors
Use relative path instead of absolute path
Remove config for image security and image path
Removed unused imports
Detect if external_url not configured and display warning message
Default to internal_url of external_url not present

Type of change

[ ] Dependency upgrade
[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (which adds functionality)
[x] Breaking change (fix/feature causing existing functionality to break)
[x] Code quality improvements to existing code or addition of tests

Additional information

This PR is related to issue: #321

Codecov Report

Merging #342 (72f3d26) into 0.3.0 (73f6416) will decrease coverage by 0.56%.
The diff coverage is 95.31%.

@@            Coverage Diff             @@
##            0.3.0     #342      +/-   ##
==========================================
- Coverage   97.44%   96.87%   -0.57%
==========================================
  Files           3        3
  Lines         744      769      +25
==========================================
+ Hits          725      745      +20
- Misses         19       24       +5

Impacted Files
Coverage Δ

custom_components/mail_and_packages/sensor.py
96.39% <94.11%> (-2.05%)
:arrow_down:

custom_components/mail_and_packages/config_flow.py
100.00% <100.00%> (ø)

custom_components/mail_and_packages/helpers.py
96.34% <100.00%> (-0.41%)
:arrow_down:

Codecov Report

Merging #342 (72f3d26) into 0.3.0 (73f6416) will decrease coverage by 0.56%.
The diff coverage is 95.31%.

@@            Coverage Diff             @@
##            0.3.0     #342      +/-   ##
==========================================
- Coverage   97.44%   96.87%   -0.57%
==========================================
  Files           3        3
  Lines         744      769      +25
==========================================
+ Hits          725      745      +20
- Misses         19       24       +5

Impacted Files
Coverage Δ

custom_components/mail_and_packages/sensor.py
96.39% <94.11%> (-2.05%)
:arrow_down:

custom_components/mail_and_packages/config_flow.py
100.00% <100.00%> (ø)

custom_components/mail_and_packages/helpers.py
96.34% <100.00%> (-0.41%)
:arrow_down:


Update Trimmer.java

Add FFmpegMediaMetadataRetriever.OPTION_CLOSEST option to line 480 where bmp is generated to retrieve a frame that may or may not be a sync frame but is closest to or the same as time.
In reference to #255

Hi @adamawang Thank you for the PR.
Just read the spec and believe that this should fix the #255 issue.
Merging now


Pipeline works on your test dataset but fails for experimental dataset - ValueError: Bin edges must be unique: array

Hello,
I managed to complete the pipeline with your provided test dataset, however I get errors with my experimental dataset.
ARI...
Silhouette score...
PC regression...
covariate: batch
compute PCA n_comps: 50
covariate: batch
compute PCA n_comps: 50
cell cycle effect...
Isolated labels F1...
Isolated labels ASW...
Graph connectivity...
kBET...
cLISI score...
using precomputed kNN graph
Convert nearest neighbor matrix and distances for LISI.
Compute knn on shortest paths
/tmp/lisi_f6fkjcl_/input.mtx /tmp/lisi_f6fkjcl_/
LISI score estimation
56 processes started.
iLISI score...
using precomputed kNN graph
Convert nearest neighbor matrix and distances for LISI.
Compute knn on shortest paths
/tmp/lisi_ow39cyvq/input.mtx /tmp/lisi_ow39cyvq/
LISI score estimation
56 processes started.

Traceback (most recent call last):
  File "scripts/metrics/metrics.py", line 263, in <module>
    trajectory_=trajectory_
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scib/metrics/metrics.py", line 364, in metrics
    hvg_score = hvg_overlap(adata, adata_int, batch_key)
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scib/metrics/highly_variable_genes.py", line 35, in hvg_overlap
    hvg_pre_list = precompute_hvg_batch(adata_pre, batch, hvg_post)
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scib/metrics/highly_variable_genes.py", line 16, in precompute_hvg_batch
    hvg = sc.pp.highly_variable_genes(i, flavor='cell_ranger', n_top_genes=n_hvg_tmp, inplace=False)
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scanpy/preprocessing/_highly_variable_genes.py", line 443, in highly_variable_genes
    flavor=flavor,
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scanpy/preprocessing/_highly_variable_genes.py", line 246, in _highly_variable_genes_single_batch
    np.r_[-np.inf, np.percentile(df['means'], np.arange(10, 105, 5)), np.inf],
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/pandas/core/reshape/tile.py", line 296, in cut
    ordered=ordered,
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/pandas/core/reshape/tile.py", line 414, in _bins_to_cuts
    f"Bin edges must be unique: {repr(bins)}.\n"
ValueError: Bin edges must be unique: array([       -inf, 2.00000e-03, 2.00000e-03, 4.00000e-03, 6.00000e-03,
       8.00000e-03, 1.00000e-02, 1.40000e-02, 2.00000e-02, 2.60000e-02,
       3.40000e-02, 4.40000e-02, 5.80000e-02, 7.80000e-02, 1.02000e-01,
       1.38000e-01, 1.94000e-01, 2.92000e-01, 5.60000e-01, 2.01934e+02,
               inf]).
You can drop duplicate edges by setting the 'duplicates' kwarg

Thanks @LuckyMD ,
I have filtered only the 2000 most variable gene before using the pipeline, however, the error remains (also with other errors of integration algorithms, quite cryptic). Again, everything works with your test dataset
I can provide this troubleshoot dataset, so you have the opportunity of making the pipeline more robust to third-party input datasets (maybe with user-friendly error messages and pre-flight checks).
Also if you execute my dataset yourself and manage to complete the execution, if you were able to tell me what is "wrong" with my input dataset, I will be able to use your great pipeline in the future.
Thanks a lot.
Input file https://wehieduau-my.sharepoint.com/:u:/g/personal/mangiola_s_wehi_edu_au/Ecr0-pQrqrJJkWGj1VNwj8EBGS16rMHaOg9-kSV5ZBgK_w?e=lsKrDG
Config file
ROOT: data_pbmc
r_env : scib-R4
py_env : scib-pipeline-R4

timing: false
unintegrated_metrics: false

FEATURE_SELECTION:
  #hvg: 2000
  full_feature: 0

SCALING:
  - unscaled
  #- scaled

METHODS:
# python methods
  bbknn:
    output_type: knn
  combat:
    output_type: full
  #desc:
  #  output_type: embed
#  mnn:
#    output_type: full
  #saucie:
  #  output_type:
  #    - full
  #    - embed
  scanorama:
    output_type:
      - embed
      - full
  scanvi:
    output_type: embed
    no_scale: true
    use_celltype: true
  scgen:
    output_type: full
    use_celltype: true
  scvi:
    no_scale: true
    output_type: embed
  #trvae:
  #  no_scale: true
  # output_type:
  #    - embed
  #    - full
  # trvaep:
  #   no_scale: true
  #   output_type:
  #     - embed
  #     - full
# R methods
  #conos: # temporary directory issue
  #  R: true
  #  output_type: knn
  fastmnn:
    R: true
    output_type:
      - embed
      - full
  harmony:
    R: true
    output_type: embed
  liger:
    no_scale: true
    R: true
    output_type: embed
  seurat:
    R: true
    output_type: full
  seuratrpca:
      R: true
      output_type: full

DATA_SCENARIOS:
  run_pbmc:
    batch_key: batch
    label_key: celltype
    organism: human
    assay: expression
    file: data/pbmc_simplified.h5ad

Environment files
name: scib-pipeline-R4
channels:
  - conda-forge
  - bioconda
dependencies:
  - python>=3.7
  - r-base=4.0
  - pip
  - rpy2=3.4.2
  - snakemake>=5
  - networkx
  - icu
  - GraphViz
  - igraph
  - gsl
  - openblas
  - llvmlite
  - libgcc-ng
  - anndata>=0.8
  - anndata2ri
  - r-essentials
  - r-devtools
  - r-stringi
  - bioconductor-scater
  - bioconductor-scran
  # Methods
  - scvi=0.6.7
  - scanorama=1.7.0
#  - mnnpddy=<IP_ADDRESS>
  - bbknn=1.3.9
  - r-seurat=3
  - r-spatstat=1.64
  - pip:
    - scib==1.0.1
    - trvaep==0.1.0
#    - git+https://github.com/pinin4fjords/mnnpy.git
    - scgen==1.1.5
#    - trvae==1.1.2
#    - desc==2.0.3
#    - keras==2.2.4

name: scib-R4
channels:
  - bioconda
  - conda-forge
dependencies:
  - python>=3.7
  - r-base=4.0
  - r-essentials
  - gsl
  - r-optparse
  - r-remotes
  - r-devtools
  - r-biocmanager
  - r-cairo
  # Seurat dependencies
  - bioconductor-multtest
  - r-sdmtools
  - r-stringi
  - r-metap
  - r-seurat=3
  - r-spatstat=1.64
  # batchelor
  - bioconductor-batchelor
  # Liger dependencies
  - r-liger=0.5.0
  - openjdk
  - r-hdf5r
  - r-hmisc

Hello,
I managed to complete the pipeline. I had to filter heavily all genes with median abundance > 0 across cells, although present in many cells (I have ~60k cells).
I was left with ~500 genes. I will test how relaxed I can be in the filtering, however it seems a bit strange that 2000 variable genes with which I can perform Seurat analyses with no problem, are not transcribed enough for the completion of the scib pipeline.

Agreed that this shouldn't be the case. The error occurs within the sc.pp.highly_variable_genes() function from scanpy. This runs highly variable genes per batch. It must be the case that in one of your batches many of your 2000 genes are very lowly expressed and therefore you can't compute the highly variable genes in that batch based on mean filtering. You can either subset to genes that are highly variable in many batches (using sc.pp.highly_variable_genes() or the equivalent scib.pp function with the batch= parameter set), or you can remove the problematic batch. Finally, you can also turn off the HVG metric that is the source of this error.

Hi @stemangiola,
just another thing I wanted to ask about your data, since it wasn't explicitly stated in the README. The pipeline expects log scaled data, so are you working with normalised and log-transformed data? If not, I could imaging that being the cause of the duplicate bins during HVG computation.

Thanks,
Reading the test data you provide with the data simulation script, I see that there are 2 assays: X and counts and they are identical. Does it sound right?
The distribution of the counts is not logaritmic
y@assays@data$X %>% as.numeric %>% summary
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  0.000   1.000   2.000   2.657   4.000 171.000

so I used this data of yours directly.

Now I understand this might be wrong. So what steps do I have to do exactly?

integer counts as raw data
log1p transform (I assume I have to add 1 before logging)
scaling across genes?
scaling (aka normalising) across samples?

You're correct, the test data hasn't been log-scaled. I'll fix that.
As for preprocessing, we recommend QC, normalisation when you have multiple batches, and log1p transformation, as described in the Best practices for scRNAseq analysis (tutorial). For normalisation across samples, you can use your method of choice. The scib package provides normalisation in scran through rpy2. The scanpy function sc.pp.log1p already does log + 1 transformation. Scaling across genes is something that we provide in the pipeline. You can include gene scaling to the key scaled in the config file.
e.g.
scaled:
  - scaled
  - unscaled

The usefulness of gene scaling likely to depends on the dataset you're using

Thanks.
I encounter another error that pops in and out without clear reason (given the lack of changes in the input)
Traceback (most recent call last):
  File "scripts/metrics/metrics.py", line 263, in <module>
    trajectory_=trajectory_
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scib/metrics/metrics.py", line 344, in metrics
    verbose=verbose
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scib/metrics/lisi.py", line 293, in clisi_graph
    verbose=verbose
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/site-packages/scib/metrics/lisi.py", line 433, in lisi_graph_py
    count)
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/multiprocessing/pool.py", line 276, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/home/users/allstaff/mangiola.s/.conda/envs/scib-pipeline-R4/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
numpy.core._exceptions.UFuncTypeError: ufunc 'add' did not contain a loop with signature matching types (dtype('int64'), dtype('<U26')) -> None

[Fri Apr 29 19:01:01 2022]
Error in rule metrics_single:
    jobid: 30
    output: /stornext/Bioinf/data/bioinf-data/Papenfuss_lab/projects/mangiola.s/PostDoc/covid19pbmc/software/scib-pipeline/data_pbmc/run_pbmc/metrics/unscaled/full_feature/liger_embed.csv
    shell:

        conda run -n scib-pipeline-R4 python scripts/metrics/metrics.py -u data/pbmc_simplified.h5ad -i /stornext/Bioinf/data/bioinf-data/Papenfuss_lab/projects/mangiola.s/PostDoc/covid19pbmc/software/scib-pipeline/data_pbmc/run_pbmc/integration/unscaled/full_feature/R/liger.h5ad          -o /stornext/Bioinf/data/bioinf-data/Papenfuss_lab/projects/mangiola.s/PostDoc/covid19pbmc/software/scib-pipeline/data_pbmc/run_pbmc/metrics/unscaled/full_feature/liger_embed.csv -m liger          -b batch -l celltype --type embed          --hvgs 0 --organism human --assay expression -v

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Do you have idea about the reason?

Yes, I got that error too. This is a bug in scib's LISI function, when printing the warning about not having enough neighbours. I'm currently addressing it here

scib 1.0.2 is out now and should have fixed that bug


Move Circle Gizmos to Their Own File

Objective

Give all the intuitive groups of gizmos their own file
don't change Gizmos interface
eventually do arcs too
future types of gizmos should be in their own files

Solution

Moved gizmos.circle, gizmos.2d_circle, and assorted helpers into circles.rs
Can also do arcs in this MR if y'all want; just figured I should do one thing at a time.

Changelog
N/A
Migration Guide
N/A

Currently this is a breaking change, since we're not re-exporting.

Need to re-export CircleBuilder and CircleBuilder2d inside gizmos.rs, i presume?

Need to re-export CircleBuilder and CircleBuilder2d inside gizmos.rs, i presume?

Yeah, if you want to avoid breaking changes that's the plan. Personally I think we should just make the breaking change now :)

I mean if you want it to be a breaking change that's also fine by me.

snaps fingers what i should've said in the first place is "I didn't plan for this to be a breaking change but i'm fine with breaking or non-breaking"

added migration guide to description

check-unused-dependencies: "failed to compile cargo-udeps v0.1.43".
Doesn't even get to actual dependency checking.

upstream https://github.com/est31/cargo-udeps/issues/228 and https://github.com/rust-lang/cargo/pull/13004


Missing API Key Variables and Environment Variables Not Being Picked Up During Build

Describe the bug
I'm currently facing an issue while trying to set up the project using Docker. Despite having the necessary API keys set in the .env.local file, the build process continues to show warnings that the API keys are missing, and the environment variables are not being passed correctly.
Steps Taken:
I cloned the repository and navigated to the project folder.
I set up the .env.local file with the required API keys (GROQ_API_KEY, HuggingFace_API_KEY, OPENAI_API_KEY, etc.).
I ran docker-compose up --build to build and start the Docker containers.
Observed Behavior:
During the build process, the following warnings are displayed for each of the API keys:
time="2024-12-14T16:45:37+02:00" level=warning msg="The \"GROQ_API_KEY\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"HuggingFace_API_KEY\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"OPENAI_API_KEY\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"ANTHROPIC_API_KEY\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"OPEN_ROUTER_API_KEY\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"GOOGLE_GENERATIVE_AI_API_KEY\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"OLLAMA_API_BASE_URL\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"TOGETHER_API_KEY\" variable is not set. Defaulting to a blank string." time="2024-12-14T16:45:37+02:00" level=warning msg="The \"TOGETHER_API_BASE_URL\" variable is not set. Defaulting to a blank string."
These warnings suggest that the environment variables are not being read from the .env.local file.
Troubleshooting Attempts:
I have checked and confirmed that the .env.local file is present in the root of the project directory.
I verified that the .env.local file contains the correct API key values. Currently, I've only added the OPENAI_API_KEY variable, but according to the error it can't read that either.
I tried running docker-compose down followed by docker-compose up --build multiple times to ensure a clean build.
I confirmed that the environment variables are set in the docker-compose.yml file, which includes these entries:
`- GROQ_API_KEY=${GROQ_API_KEY}

HuggingFace_API_KEY=${HuggingFace_API_KEY}
OPENAI_API_KEY=${OPENAI_API_KEY}
ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY}
GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY}
OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL}
TOGETHER_API_KEY=${TOGETHER_API_KEY}
TOGETHER_API_BASE_URL=${TOGETHER_API_BASE_URL}
`

Just to add to that: The app subsequently terminates with the following error:
app-prod-1  |
app-prod-1  | ><EMAIL_ADDRESS>dockerstart /app
app-prod-1  | > bindings=$(./bindings.sh) && wrangler pages dev ./build/client $bindings --ip <IP_ADDRESS> --port 5173 --no-show-interactive-dev-session
app-prod-1  |
app-prod-1  | sh: 1: ./bindings.sh: not found
app-prod-1  |  ELIFECYCLE  Command failed.
app-prod-1 exited with code 1

The fact that ./bindings.sh can't be found (despite it being in the root of the repo) suggests that something with the working directory is not correctly configured?

I also have same error, in development works but after build it shows error Invalid API

I encountered the same issue, but I was able to pass the API-KEY by modifying the following part of the docker-compose.yml  as workaround.
docker-compose.yml#L10
#    env_file: ".env.local"
    volumes:
      - type: bind
        source: .env.local
        target: /app/.env.local

@akshaynstack i am looking for a fix as much as you are.
Still: Lets just remember that this is an open-source project run by, i assume, volunteers. They should be treated with gratitude and respect. The ticket has been open for a mere 5 days. I suggest you use the proposed workaround or - even better - open a pr with a proper fix.
Alternatively, read this: https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-source-maintainer/
Thanks ahead to whomever fixes the issue

I didn't mean to say , I have huge respect on open source developers, Sorry i was wrong


Could not find an open Unreal Editor Instance

[Python] "Could not find an open Unreal Editor Instance" and "No Unreal Found" in the dropdown inside SEND TO UNREAL. Tried restarting both UE and SP.
Substance Painter 8.3.1. UE 5.2 macOS 14.3.

My iMac also shows "Could not find an open Unreal Editor Instance" when I use (send2UE).
UE 5.3,  iMac 2017 Core i7 and masOSX1 3.6
I think it might happen on Mac system?

[Python] "Could not find an open Unreal Editor Instance" and "No Unreal Found" in the dropdown inside SEND TO UNREAL. Tried restarting both UE and SP. Substance Painter 8.3.1. UE 5.2 macOS 14.3.

Sorry I missed your comment. I haven’t tried on osx, so I can’t tell if their code is working

My iMac also shows "Could not find an open Unreal Editor Instance" when I use Blender 3D (send2UE). UE 5.3, iMac 2017 Core i7 and masOSX1 3.6 I think it might happen on Mac system?

We are both using the same code provided by epic to do the handoff between blender/spp and ue. So if it is not working in blender I doubt it would work with my plugin.
just to get a bit more insight from you guys :

are you running both Dccs on the same mac ?
did you turn on “Enable Remote Execution” under “Project settings” => Plugins => Python =>Python Remote Execution ? if so which settings are there ?

Hi Ffancoisgfx,
The Blender & UE are running in the same iMac. AND
also follow your suggestion to enable the “Enable Remote Execution”.
It cannot communication each other.
I found Blender cannot location the UE5 received folder,
can I change the "send" and "receive" folder, so that they can make a channel of its pipline?

I cannot tell about the Blender plugin, I am not the developer. Which folder are you talking about ? If Enable Remote Execution where not enabled before, it would have not worked. Could you share a screenshot of your settings ? Or perhaps share the error if you have a message.ThxLe 21 janv. 2024 à 11:19, cylamhk @.***> a écrit :
Hi Ffancoisgfx,
The Blender & UE are running in the same iMac. AND
also follow your suggestion to enable the “Enable Remote Execution”.
It cannot communication each other.
I found Blender cannot location the UE5 received folder,
can I change the "send" and "receive" folder, so that they can make a channel of its pipline?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Also having this problem. Any solutions?

@francoisgfx
hey,
thanks for this amazing bridge ...
it detects UE 5.4.2 on win 11 23H2
but only transfer some of textures and not the mesh and their materials !??


feat: Initiate Bahasa Indonesia Documentation

Is your feature request related to a problem? Please describe.
Currently, there is no documentation in Bahasa Indonesia available, which poses a challenge for users seeking information and guidance in their native language.
This lack of documentation hinders their ability to understand and implement the technology effectively.
Also, most new developers prefer to learn through tutorial content from YouTube creators in the same language due to the difficulty and unfamiliarity of understanding the technology through documentation in a different language.
Describe the solution you'd like to see
Translating key documentation into Indonesian allows Indonesian speaking users to better understand information and guides.
Describe alternate solutions
Creating comprehensive translations not only enables Indonesian-speaking users to gain a better understanding of information and guides but also emphasizes the importance of accuracy and an easy-to-understand language style in these translations.
Additional information
No response

We currently don't track issues of what languages are translated and not.
If you want this to exist, feel free to open a PR


Add RCTDevSettings module

This decouples non-UI logic from RCTDevMenu into a new module RCTDevSettings.
Motivation: This allows developers to change dev settings without depending on the built-in dev menu, e.g. if they want to introduce their own UI, or have other devtools logic that doesn't depend on an action sheet.
It also introduces the RCTDevSettingsDataSource protocol for storing dev tools preferences. This could allow a developer to implement alternative behaviors, e.g. loading the settings from some other config, changing settings based on the user, deciding not to persist some settings, or something else.
The included data source implementation, RCTDevSettingsUserDefaultsDataSource, uses NSUserDefaults and is backwards compatible with the older implementation, so no workflows or dependent code will break, and old saved settings will persist.
The RCTDevMenu interface has not changed and is therefore also backwards-compatible, though some methods are now deprecated.
Test plan: Use react-native init myProject --version exponentjs/react-native#@terribleben/dev-settings and verify that RCTDevMenu acts the same way as before, including various dev tools. Expectation is that behavior will be unchanged from the previous implementation.
Notes:

Some of the code (e.g. the stuff powering remote debugging, hot loading, live reload, etc.) is just copied over from RCTDevMenu into RCTDevSettings, I generally avoided rewriting that stuff.
Since a lot of code moved around, it may be easier to just read the four relevant files instead of trying to decipher the diff.

Thanks for the feedback @javache and happy holidays!
I added a few comments/questions (some of them got hidden by the outdated diff, sorry) and addressed most other things. I haven't yet responded to "could we "fix" that behaviour here and always use the right executor from the first run?" but I'll think about that next.

I put more thought into your question about the bridge executor class. Here's more or less how we would do that:

We'd remove the executorClass logic from RCTDevSettings
In the RCTBatchedBridge::executorClass property, we'd remove the references to _parentBridge.executorClass and instead make the getter/setter wrap calls to RCTDevSettings
RCTBatchedBridge would subscribe to kRCTDevSettingsDidUpdateNotification
In the NSNotification handler, if the DevSettings value changed for either kRCTDevSettingLiveReloadEnabled or kRCTDevSettingExecutorOverrideClass, RCTBatchedBridge would reload itself
In initModulesWithDispatchGroup: there would be some other logic for building an instance of the corresponding module. I think the logic would change slightly from what it is now, because we'd need to make sure the RCTDevSettings module is initialized before we know what the executor class is.

I'm not super familiar with the RCTWebSocketObserver code inside DevSettings, but I think it would stay mostly the same (except removing the explicit reload call, since it would happen anyway). Also, this strategy depends on the NSNotification interface which we left comments about already, so I'd like to resolve that discussion before implementing any of this.

The executorClass changes look like they could be their own diff, it also seems like there would be a lot of different states the bridge and devsettings could be in, I'd lean towards keeping this diff simple. We could add a comment and/or open a github issue to track this proposal in the meantime.

@javache hope you've had a restful holiday. Let me know if you've had a chance to look at this and if you have any other questions. :)

@javache could you take a look at this when you get another chance?

I think I still stand by my original point: going from a strongly typed interface to a value-for-key / string-based one is a regression. This makes it harder to statically analyze our codebase, reason about callsites or even deprecate properties correctly. I'm fine with splitting RCTDevSettings from RCTDevMenu, but it should be a strongly typed interface. (It's ok for the data source to use this generic API though).
The interface with the data source needs to be more clearly defined: the way I see it:
RCTDevSettings provides all the interaction with the bridge and the rest of the app's runtime. RCTDevSettingsDataSource is the backing store for RCTDevSettings and is used to get/set values by RCTDevSettings. It should not alter values itself and try to update the devsettings (data flows only in one way). RCTDevMenu and our websocket (RCTDevConnection?) make use of RCTDevSettings: they get information from dev settings and write commands to it to alter state. Through that interface RCTDevSettings can decide to persist any settings using its RCTDevSettingsDataSource.

Thanks @javache, makes sense. I'll follow up next week.

Hi there! The most recent commit addresses your last feedback:

RCTDevSettings has only a strongly typed interface, and no key/string interface.
I completely removed the NSNotification-based updates between RCTDevSettings and its data source.

One side effect of this change is that RCTDevMenuItem toggleItem... can't be supported any more, since this relied on the key-based interface. I updated all occurrences of this in the codebase. This would be a breaking change if you're using it anywhere else internally.
Splitting out RCTWebSocketObserverDelegate sounds like a cool idea for a follow up PR. The purpose of this one is to isolate the menu UI code and to break out the settings storage mechanism. I would prefer to limit it to that for now if you're okay with it. Afterward there would be potentially lots of opportunities to clean up various individual dev tools.

Rebased again to include a few new commits that have happened in the last couple weeks. All master commits to the old Dev Menu are going to conflict with this, so it'd be good to move forward while it's still a clean merge.

Addressed all of your recent feedback (or responded in comments). Thanks for taking a look!

Rebased again

Hey @javache and @hramos it's great that you guys have tried to import this, but if people keep merging conflicts, it's never going to succeed. Also the test failures are unrelated as far as I can tell. Maybe we can pick a time to go ahead with this so I don't have to keep rebasing needlessly?

Hey @terribleben, don't worry I'm taking care of the conflicts :) I'll try and land it today.


Add --indent option to change indent width

this + doc fix fixes https://github.com/6to5/6to5/issues/414

Thanks for creating a pull request for this.  I had a quick look at the code.  I assume the programmatic API remains the same for controller the indentation.

Thanks!

Released as of 2.8.0

Perhaps --indent auto would be useful? Other names might be detect or preserve? Essential an option that figures out what the indent is and uses that.

@eventualbuddha what is the canonical way to determine indentation? I could do something like search for a line matching /{\s*$/ and determine the whitespace offset relative to the next non-empty line.

@monsanto I'm not sure of a canonical way to do it, but here's how recast does it.

So this issue with autodetecting indentation (and why I haven't already done it) is that what if there's no indentation in the current file? It'll lead to inconsistencies in the generated code.

@sebmck maybe fall back to 2 spaces if we can't figure out the indentation?

Yep, but if all your other code uses 4 spaces then it'll lead to inconsistencies. That's the only real reason why I haven't done it so far.

Also I haven't really tested the code generator against different formatting options so it might go a little weird, not too sure.

@sebmck Trying to understand what you mean. Are you are referring to the case where there are multiple files in the project, some with 4 space indentation, some with none, and it would look ugly if the no indentation files had 2 spaces?
If we compile multiple files in one step, could inherit indentation settings from another file. Or could just say it's a corner case and to manually specify indentation if you care. Any non-contrived file without indentation is going to be really small anyway.

@monsanto Yeah that's true. I'll have to revaluate my position. This change would come in 3.0.0 though as it's quite significant.


ds_report command shows [FAIL] nvcc missing

I am getting nvcc missing when executing ds_report instruction
But nvcc --version can print the following information:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:13_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0

nvidia-smi shows：
NVIDIA-SMI 470.129.06   Driver Version: 470.129.06   CUDA Version: 11.4

My environment is pytorch==1.7.1+cu110 and deepspeed==0.6.5
I would like to know what is causing this error? Thanks!

Same problem. And output shows "RuntimeError: Unable to proceed, no GPU resources available"
NVIDIA-SMI 470.182.03   Driver Version: 470.182.03   CUDA Version: 11.4
My environment is pytorch==1.12.1+cu11.4 and deepspeed==0.9.0


Jade extension

Hi, I have a question:
How can I create new component/router with *.jade extension instead of HTML?

Heya @krasevych, at the moment jade is not supported. The best I can say about it is https://github.com/angular/angular-cli/issues/40#issuecomment-212636754.

Seems I spoke too soon! There's an open PR for this functionality via pug (apparently jade was renamed to pug). See https://github.com/angular/angular-cli/pull/626.


Bot doesn't receive my messages

After I used the termux to create the qr code and scanned it the bot didn't receive my messages anymore

Corrigido.


Unable to write file ../globalStorage/github.vscode-pull-request-github/temp/vscode/userIcons

Install GHPRI on a fresh VS Code install (new user data dir) on Windows
Create a PR
:bug: see the following error message

Unable to write file 'vscode-userdata:/c:/Users/huer/AppData/Roaming/Code - Insiders/User/globalStorage/github.vscode-pull-request-github/temp/vscode/userIcons/joyceerhl.jpg' (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, rename 'c:\Users\huer\AppData\Roaming\Code - Insiders\User\globalStorage\github.vscode-pull-request-github\temp\vscode\userIcons\joyceerhl.jpg.vsctmp' -> 'c:\Users\huer\AppData\Roaming\Code - Insiders\User\globalStorage\github.vscode-pull-request-github\temp\vscode\userIcons\joyceerhl.jpg')

Filing this since there have been related bugs with vscode-userdata (e.g. code-insiders --install-extension doesn't work), maybe related  to https://github.com/microsoft/vscode/issues/180695

@joyceerhl Would like to check if you are able to reproduce this consistently. I tried it in Mac and I cannot repro.

I have not seen this recently

Related / Duplicate
https://github.com/microsoft/vscode/issues/187245


Lesson1-7: Add and configure the OLE DB destination

Hello;
The following command suggests to create a new table as NewFactCurrencyRate but I get this error that the table already existed in AdventureWorksDW2012.
https://docs.microsoft.com/en-us/sql/integration-services/lesson-1-7-adding-and-configuring-the-ole-db-destination?view=sql-server-ver15
Soluiton: Either we should first drop the table first and add it later or select a new name instead!
Please fix it to avoid further frustrations!

@bestmbaman -- thank you for your feedback.
@chugugrace -- please look into this issue.

I am Closing this Issue #4720 now, as Fixed by private repo PR 17096.
The fix should be live on Docs before the end of September 2020.
@bestmbaman Thank you for bring this problem to our attention.


Remove QGL examples from PyQlab

Coverage remained the same at 67.488% when pulling 976a3170b586a163cf0ecda7aeb89983da4aa9c7 on rmcgurrin:develop into 0859ff00084b9c13f360b48942d9ac30592c7710 on BBN-Q:develop.

Can we remove the first bonus commit.

@caryan Sure.  Do I need to do another merge request or is there way to do it from github?

Just force push to the branch.

Coverage remained the same at 67.488% when pulling 6680fda1827402fb7cf5e836b57d5645bfa00d76 on rmcgurrin:develop into 0859ff00084b9c13f360b48942d9ac30592c7710 on BBN-Q:develop.


better error message for if statements within for loop in BUGS code

Without thinking about it, I wrote this BUGS code, and then realized that we don't handle this. But the error message is inscrutable to the user.
code <- nimbleCode({
  for(t in 1:T) {
      omega[t] ~ dexp(lambda[t]*lambda[t]/2)
      if(t < 4) {
          lambda[t]~dgamma(1,1)
      } else  lambda[t] ~ dgamma(1, rate = sigma)
  }
})
m = nimbleModel(code)
Error in t < 4 :
  comparison (3) is possible only for atomic and list types

moving to Wiki page on better error msgs


Does DartPad implement Dart 2?

I wanted to try some Dart 2-isms. Can I use Dart 2?
Thanks!

It doesn't, but you can track the work over here: https://github.com/dart-lang/dart-services/issues/337
/cc @jakobr-google


docs: add JSDoc for Bearer Authentication Middleware

This PR is to add JSDoc for Bearer Auth Middleware.
Note that the target of the PR is not main.
Related:

#1338

#2680

[x] bun denoify to generate files for Deno

[x] bun run format:fix && bun run lint:fix to format the code

@goisaki
Thanks for the PR. I've left a comment.


Play Media file from Resource

Hi,
The sound file is not getting played from Resource/raw folder
Expected behavior
To run the sound file from raw folder
Reproduction steps
Copy a sound file inside the raw folder and use the following to play it:
await CrossMediaManager.Current.Play("raw/myAudio.mp3");
also tried:
await CrossMediaManager.Current.PlayFromResources("raw/myAudio.mp3");
Configuration
Version: 0.8.9
Platform:

[ X] :iphone: iOS
[ X] :robot: Android
[ ] :checkered_flag: WPF
[ ] :earth_americas: UWP
[ ] :apple: MacOS
[ ] :tv: tvOS
[ ] :monkey: Xamarin.Forms

you can put it in PCL and make sure that its build action is "EmbeddedResource" then use await CrossMediaManager.Current.PlayFromAssembly("Assembly.Resource.raw.file.mp3");

To make it easier, in 0.8.10 you can do: CrossMediaManager.Android.PlayFromResource(Resource.Raw.play.ToString());

I am sorry but both the above options are still not working for me.
Putting it in PCL (standard2.0) project, same as above doesn't work.
I also tried creating a Raw folder inside android resources & putting it there, doesn't work either. No exceptions. It just doesn't playback the file.
Also, @martijn00 are you sure there is a CrossMediaPlayer.Android? I can't resolve that.

@jrahma were you able to solve this?

I was able to play it from the assembly file. I got confused on the folder structure, had to remove Resources.Raw from my string value & it worked as expected.
Thanks


"Duplicate add-on ID" error when trying to upload a new version of an existing unlisted addon

$ curl -w "Status: %{http_code}\\n" \
      "https://addons.mozilla.org/api/v3/addons/${AMO_WEB_ID}/versions/${VERSION}/" \
      -XPUT --form<EMAIL_ADDRESS>\
      -H "Authorization: JWT $(dist/amo_jwt.py)" -o response.json
Status: 400

response.json:
{"error": "Duplicate add-on ID found."}

dist/amo_jwt.py:
#!/usr/bin/env python
from __future__ import print_function

import time, random, jwt

from AMO.Credentials import JWT_ISSUER, JWT_SECRET

def make_token():
    now = int(time.time())
    payload = {
        'iss': JWT_ISSUER,
        'jti': str(random.random()),
        'iat': now,
        'exp': now + 60,
    }
    return jwt.encode(payload, JWT_SECRET, algorithm='HS256')

if __name__ == '__main__':
    token = make_token()
    print(token.decode(), end='')

iss tried:
JWT_ISSUER = 'user:11864932:338' # role=developer #1
JWT_ISSUER = 'user:2425893:633' # role=owner #3

Submitting the same xpi via web interface works just fine
Perhaps the problem arises because iss does not belong to the original owner of the add-on listing? Unfortunately, that account is no longer accessible. Moving owner #3 to the top of the owners list did not help.

Apparently https://addons.mozilla.org/api/v3/addons/${AMO_WEB_ID}/versions/${VERSION}/ returns 404
Something is definitely wrong here.

Side note: my addon was converted listed (preliminary) -> unlisted.

Just to check ${AMO_WEB_ID}, is guid of your addon?

To be honest I didn't see guid actually explained anywhere.
I took it to be the 'name' of the addon in AMO's URLs, e. g.
https://addons.mozilla.org/en-US/developers/addon/${AMO_WEB_ID}/versions
I tried <em:id> from install.rdf as well but that did not work either. I think that's what you call uuid.

No, we use the guid, because the GUID is unique outside of AMO. In other words, you can make your add-on and do a PUT into AMO without have to do an upload first, if your add-on doesn't exist, we just create it for you automatically. It's pretty neat. We should probably spell that out more in the docs:
http://olympia.readthedocs.org/en/latest/topics/api/signing.html#put--api-v3-addons-[string-add-on-guid]-versions-[string-version]-
In your case its this <em:id> https://github.com/minj/foxtrick/blob/master/install.rdf#L6, there's more than one in your install.rdf.

Yes, I know. Others are browser IDs.
Here is what the problem is: https://addons.mozilla.org/api/v3/addons/{9d1f059c-cada-4111-9696-41a62d64e3ba}/versions/0.16.1/ returns
{"error": "Could not find addon."}

While<EMAIL_ADDRESS>is Status: 200
The difference between them? The latter one is a relatively new unlisted submission to AMO made after the signing was introduced. The former was converted from listed (preliminary) to unlisted and has a long history.

The GUID needs to be URL encoded so the URL should be: https://addons.mozilla.org/api/v3/addons/%7B9d1f059c-cada-4111-9696-41a62d64e3ba%7D/versions/0.16.1/.

Ah, so it should. I somehow was sure curl handles that automatically.
Thank you for the help

I remember running into this early on and assuming the same thing and being surprised. I'll add a note to the docs.

@mstriemer apparently curl supports [] and {} globs causing the problem with old-style add-on IDs. curl -g disables them and the braces are then correctly urlencoded.

Ahha, awesome! I'll add that to the docs. Thanks!


services.AddMvc().AddJsonOptions(options => options.UseMemberCasing())

Issue description
Unable to find support for changing the property names to Pascal casing of the CLR object's property names.
Software versions
Check the .NET target framework(s) being used, and include the version number(s).

[3.0 Preview ] .NET Core

Hello @ashok-login ... At the moment, I think that's over in the migration topic in the last paragraph and example of the Json.NET support section: https://docs.microsoft.com/aspnet/core/migration/22-to-30#jsonnet-support
You may need to look up the options ... IntelliSense should be helpful there. If not, try the reference source on the engineering repo.
If it should be elsewhere in the normal reference docs, I'm sure that the docs team member of the given topic will get the updates into it for 3.0. We're trying to get as many done before 3.0 reaches RTM. Even if it isn't addressed before that, I assume that it will be addressed asap after release.

I just saw this related issue, too, to address JSON for 3.0.
https://github.com/aspnet/AspNetCore.Docs/issues/13227


Fix broken link in 'step by step navigation' page

There is a broken Heroku link in the 'Step by step navigation' pattern guidance. I've sourced a new version of the link, and recommend we swap it in.
Related documentation
The broken link is in this section: https://design-system.service.gov.uk/patterns/step-by-step-navigation/#services-using-this-pattern
Suggestion
Old link: https://live-stuff.herokuapp.com/step-by-steps
New link: https://govuk-formats.herokuapp.com/
Evidence
The new link was provided by Simon Hughesdon, via a Slack thread.

@davidc-gds Approved for the URL fix ✅
Not sure if we're supposed to follow our external links guidance for Heroku? https://design-system.service.gov.uk/styles/typography/#external-links

External links
If it’s an external link to a non-government website, make that clear in the link text. For example, ‘read advice on writing link text from [name of organisation]’. There’s no need to say explicitly that you’re linking to an external site. Do not use an external link icon.

Hey @colinrotherham sure, we may as well follow that. I don't think we've ben doing that, but may as well start with this link and not fret too much about making sure it's consistent everywhere for this particular PR.


ReversePackedSegsOp optimized GPU code

Removes the need for all the Copy calls, in one of our apps reduced time from ~40ms to < 200us

And yes, I ran this through the unit test


add jsdocs to MoneroTx and MoneroTxWallet

Do not merge before fixing the last commit to the PR, which should not include the generated /dist/commonjs or /types: https://github.com/monero-ecosystem/monero-javascript/pull/93/commits/e3151191427c3ae313b480da81c39ef8232b5ba2


Adding time to the test log

Found myself wondering how long some of my tests were taking after a somewhat large change caused my CI test runs to spike into the hours.
Logs of the test themselves were not helpful, was able to track down the offending test(s) and confirm the rise in execution time after adding this to the info logs.

Thank you very much for the PR!


Final tweaks to documentation before release

Coverage remained the same at 62.61% when pulling a99a51c2e5fb14d7c932d91da5cc2b7cd1b550ea on doc-updates-0.8.7 into 5c80cf622dd496fa4d69cdcc96e6a68424e66157 on master.


Demo crashes when entering the tunnel

I just saw the demo crash when Pac-Man tried entering the tunnel during the ChaseGhost behavior. It would probably not have crashed with #21 but that's something we should investigate nevertheless.

I could reproduce an exception thrown by AvoidGhostBehavior by forcing PacMan into the tunnel by overriding the command manually 🕹 :grin:
diff --git a/demo/include/utils/pacman_wrapper.hpp b/demo/include/utils/pacman_wrapper.hpp
index 9380637..0522eaf 100644
--- a/demo/include/utils/pacman_wrapper.hpp
+++ b/demo/include/utils/pacman_wrapper.hpp
@@ -30,7 +30,7 @@ public:
     void printKeybindings();

 private:
-    void handleUserInput();
+    std::optional<SDL_Scancode> handleUserInput();
     void renderPath(const demo::Positions& path);

     int scaleFactor_;
diff --git a/demo/src/pacman_wrapper.cpp b/demo/src/pacman_wrapper.cpp
index 3428afc..665d847 100644
--- a/demo/src/pacman_wrapper.cpp
+++ b/demo/src/pacman_wrapper.cpp
@@ -54,7 +54,9 @@ PacmanWrapper::PacmanWrapper()
     SDL_SetRenderDrawBlendMode(renderer_.get(), SDL_BLENDMODE_BLEND);
 }

-void PacmanWrapper::handleUserInput() {
+std::optional<SDL_Scancode> PacmanWrapper::handleUserInput() {
+    std::optional<SDL_Scancode> commandOverride;
+
     SDL_Event event;
     while (SDL_PollEvent(&event) != 0) {
         if (event.type == SDL_QUIT) {
@@ -75,15 +77,26 @@ void PacmanWrapper::handleUserInput() {
                 renderPath_ = !renderPath_;
                 break;
             }
+            if (event.key.keysym.scancode == SDL_SCANCODE_UP || event.key.keysym.scancode == SDL_SCANCODE_DOWN ||
+                event.key.keysym.scancode == SDL_SCANCODE_LEFT || event.key.keysym.scancode == SDL_SCANCODE_RIGHT) {
+                commandOverride = event.key.keysym.scancode;
+                break;
+            }
         }
     }
+
+    return commandOverride;
 }

 void PacmanWrapper::progressGame(const demo::Command& command,
                                  const demo::EnvironmentModel::ConstPtr& environmentModel) {
-    handleUserInput();
+    std::optional<SDL_Scancode> commandOverride = handleUserInput();

-    game_.input(command.scancode());
+    if (commandOverride) {
+        game_.input(commandOverride.value());
+    } else {
+        game_.input(command.scancode());
+    }

     if (pause_) {
         return;

The exception is thrown by an out of bounds access to the Maze ('Maze::isWall) https://github.com/KIT-MRT/EnTT-Pacman/blob/master/src/util/grid.hpp#L61 with position = {x:19, y:9}andmazeState_.size = {x:19, y:22}`
Looks like positionConsideringTunnel() doesn't do a correct job here…
Stacktrace:
Grid<Tile>::operator[](Pos) const (/usr/local/include/pacman/util/grid.hpp:61)
utils::Maze::at(demo::Position const&) const (/workspaces/demo/include/utils/maze.hpp:40)
utils::Maze::isWall(demo::Position const&) const (/workspaces/demo/include/utils/maze.hpp:66)
demo::EnvironmentModel::isWall(demo::Position const&) const (/workspaces/demo/include/demo/environment_model.hpp:109)
demo::AvoidGhostBehavior::getCommand(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<double, std::ratio<1l, 1l>>> const&) (/workspaces/demo/src/avoid_ghost_behavior.cpp:15)
arbitration_graphs::Arbitrator<…>::Option::getCommand(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<double, std::ratio<1l, 1l>>> const&) const (/usr/include/arbitration_graphs/arbitrator.hpp:70)
arbitration_graphs::Arbitrator<…>::getAndVerifyCommand(std::shared_ptr<arbitration_graphs::Arbitrator<demo::Command, demo::Command, demo::Verifier, demo::VerificationResult>::Option> const&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<double, std::ratio<1l, 1l>>> const&) const (/usr/include/arbitration_graphs/internal/arbitrator_impl.hpp:54)
arbitration_graphs::Arbitrator<…>::getAndVerifyCommandFromApplicable(std::vector<std::shared_ptr<arbitration_graphs::Arbitrator<demo::Command, demo::Command, demo::Verifier, demo::VerificationResult>::Option>, std::allocator<std::shared_ptr<arbitration_graphs::Arbitrator<demo::Command, demo::Command, demo::Verifier, demo::VerificationResult>::Option>>> const&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<double, std::ratio<1l, 1l>>> const&) (/usr/include/arbitration_graphs/internal/arbitrator_impl.hpp:115)
arbitration_graphs::Arbitrator<…>::getCommand(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<double, std::ratio<1l, 1l>>> const&) (/usr/include/arbitration_graphs/arbitrator.hpp:131)
demo::PacmanAgent::getCommand(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<double, std::ratio<1l, 1l>>> const&) (/workspaces/demo/include/demo/pacman_agent.hpp:67)
main (/workspaces/demo/src/main.cpp:29)

Nice investigative work 🕵
Present-me thinks that the implementation of past-me makes absolutely no sense.
You're right, the wrapped position should be returned no matter the type. The question is: Why is the wrapped position a wall? Did that make sense in the situation you described?
And one other question: Should we implement the manual override into the demo? Might be handy in other situations too. 😀

After a brief thought: clamping the position for non-tunnel positions does the job.
See

dd1903a for the new, failing unit test
54d36d1 for the fix

You're right, the wrapped position should be returned no matter the type. The question is: Why is the wrapped position a wall? Did that make sense in the situation you described?

That's a good question!

Ah yes, that makes sense. Thanks for the fix, I'll take a look now :ok_hand:


fix/array-json

Handle JSON files with an array as the top-level element.

Thanks released in 0.2.2.


Move vector mesh generation to napari vispy visual and fix vectors refesh

Description
This PR picks up on discussion https://github.com/napari/napari/issues/4694#issuecomment-1183794908 to explore moving mesh generation for the vectors layer to the vispy visual.
This approach has the advantage of consolidating complex mesh logic further away from the napari layer, but the disadvantage that mesh generation is now done each time the slice is changed. The mesh generation though now only uses data that is in the current slice though, instead of pre-generating the mesh for all possible slices (which could have been very expensive).
This also closes #4694 as now refresh will regenerate mesh - we should probably add a test for that before merge.
This was a fairly quick implementation, and so i may have missed something - maybe @brisvag @andy-sweet @kcpevey can look at/ take over and see if you like direction this is going. I ended up duplicating the segment_normal function to avoid some annoying circular imports.
Type of change

[x] Refactor

References

https://github.com/napari/napari/issues/4694#issuecomment-1183794908
How has this been tested?

[x] using napari examples with vectors

Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[ ] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[x] If I included new strings, I have used trans. to make them localizable.
For more information see our translations guide.

but the disadvantage that mesh generation is now done each time the slice is changed

This was the thing that got me stuck last time, as I was trying to work around it. However, now I tested this branch with some reasonably sized vector layers, and I didn't see a noticeable change in performance. I'm testing on a workstation, though, so maybe someone can take a look on a laptop?

Code changes look great! Your answer to the problem of deciding when to regenerate meshes is always, which I also like because of its simplicity. But as you point out it does need some benchmarking and/or profiling. The existing vectors layer benchmarks don't help because they only benchmark the layer (e.g. Vectors._set_view_slice), which does less now.
Maybe we should define some more integrated benchmarks that include generating and pushing the right data to vispy?

@kcpevey do you mind taking this PR from here? I hope you have some capacity to help on this

A good representative dataset for me is not that big: about 5k to 10k vectors in a 3D volume; I see no performance hit there. Maybe someone with heavier datasets can chip in :)

@kcpevey do you mind taking this PR from here? I hope you have some capacity to help on this

happy to! Just coming back from vacation, but I'm back now!

I really like all this cleanup. I had done something similar for the async slicing vector prototype.

Great @kcpevey! So i think all this PR needs to get over the finish line is a bit of performance testing. It would also be nice not to duplicate the segment_normal function - not sure how to fix the circular imports. We could also add some unit tests for generate_vector_meshes and generate_vector_meshes_2D that probably should have been added when they were originally contributed, but now will be as good a time as any. Let me know if you have any questions @kcpevey - you can either make PRs to this PR, or if you want to make your own PR to napari with these commits that's fine too - really whatever is easiest and fastest for you. Thanks again!!

@sofroniewn I spent some time today sorting through the best way to benchmark this. There is definitely some trickiness to getting the qt events to trigger inside of the benchmarking suite. I think I sorted out something effective see here.
I will write some unit tests for the generate_vector_meshes functions too and take a look at segment_normal as well.

My continuation of this work is in this PR: https://github.com/sofroniewn/napari/pull/17

Thanks to work from @kcpevey this PR is now ready for final review. @kcpevey has added some tests and benchmarks. @brisvag can you give it a final look and if you like it can you merge it? Thanks!!
See here for benchmark info

I rechecked the benchmarks against main (where this branch started).
main
[ 75.00%] ··· ...iewer_vectors.QtViewerViewVectorSuite.time_vectors_multi_refresh
[ 75.00%] ··· ======== =============
               param1
              -------- -------------
                 16     9.06±0.09ms
                 64       15.9±1ms
                256      37.5±0.8ms
                1024      127±2ms
                4096      275±2ms
               16384      430±30ms
               65536      972±4ms
              ======== =============

[100.00%] ··· ...k_qt_viewer_vectors.QtViewerViewVectorSuite.time_vectors_refresh
[100.00%] ··· ======== =============
               param1
              -------- -------------
                 16     3.03±0.04ms
                 64      5.46±0.1ms
                256     12.2±0.07ms
                1024      43.6±2ms
                4096      90.6±1ms
               16384      138±5ms
               65536      319±4ms
              ======== =============

this branch
[ 75.00%] ··· ...iewer_vectors.QtViewerViewVectorSuite.time_vectors_multi_refresh
[ 75.00%] ··· ======== ============
               param1
              -------- ------------
                 16     9.37±0.2ms
                 64     15.6±0.2ms
                256     38.2±0.9ms
                1024     130±2ms
                4096     291±10ms
               16384     438±6ms
               65536    1.13±0.01s
              ======== ============

[100.00%] ··· ...k_qt_viewer_vectors.QtViewerViewVectorSuite.time_vectors_refresh
[100.00%] ··· ======== =============
               param1
              -------- -------------
                 16     3.06±0.03ms
                 64     5.38±0.07ms
                256      12.9±0.5ms
                1024      43.4±2ms
                4096      95.6±5ms
               16384     152±0.9ms
               65536      368±4ms
              ======== =============

@sofroniewn who else do we need for review?

I think this is now good to go - thanks for work @kcpevey and original review @brisvag, i will merge!!


Set software versions for OMERO 5.6.3 release.

Monitor release process to ensure this was the correct adjustment to make for [trello] Version history PR.

No surprises here.