Focus event order on Windows

While trying to fix https://github.com/jwilm/alacritty/issues/2170, I've just noticed that the event order of the Focused event is a bit different on Windows compared to the other platforms.
Even though window focus on Windows can only be changed when clicking on a window, the Focused events comes before the MouseInput event. They aren't coming in the same bulk either so the order isn't only messed up but they're coming in completely disconnected from each other in short succession.
The issue with this is that it makes it impossible to determine if a MouseInput event was on a focused or unfocused window. So clicks on unfocused windows can't easily be ignored.
I'm not sure if this is an issue with winit or a constraint due to the Windows API, but this is probably the best place to ask.

I'm not aware of any clean way to deliver MouseInput before Focused - it would require some pretty hacky stuff on our end to get working, and I'm not comfortable with introducing that to the codebase. However, it should still be possible to fix the downstream behavior easily!
When I was looking into this, I found that someone had put in code that resulted in a CursorMoved(0, 0) event getting dispatched whenever the window gained focus, which is pretty clearly causing the selection bug in Alacritty. No idea why that was there - the relevant documentation explicitly says that the variable they're trying to read as mouse position is unused, but removing that event dispatch is easy. I'll get a PR going to fix that ASAP.

As far as I'm concerned, fixing the issue is good enough at this point.
However by default on Windows the first click on a focused window is usually ignored, so selections should not be cancelled. At least cmd.exe and powershell behave this way.
For Alacritty that might not be a huge deal, but it might still be something that winit should support.
Always ignoring the first click after the focus has changed from unfocused to focused doesn't seem like an option either, since it's possible to focus a window without using the mouse.
Are you aware of any option a user of winit might have to resolve this? It seems impossible to determine if a click was what caused the focus or not.

Hmm. I tested it on ConEmu too, and it also ignores the first click on focus. I can look into what it's doing, since it's open source, and will get back to you on whether or not it's feasible for us to do. As far as I can tell that behavior only happens for console emulators (it didn't happen with Firefox or the various text editors I tried), but it seems there is a way to detect it.
I don't like the idea of officially defining the order of mouse/focus events since that's really a niche and finicky API guarantee to put in place, but I'm open to the idea of having some sort of API for determining if a click caused window focus. I don't know what said API should look like, though.

I don't like the idea of officially defining the order of mouse/focus events since that's really a niche and finicky API guarantee to put in place, but I'm open to the idea of having some sort of API for determining if a click caused window focus.

I'd be perfectly fine with that. And as I've mentioned nobody has actually expressed the need for that on Windows yet. Though it has been explicitly requested on macOS (where we currently rely on the event order, which is correct).
I think keeping this issue open to track research into this area probably makes sense. I think it probably is something that should at least be investigated so an explicit decision can be made if this should be supported or not. I personally don't really care either way, but a clear and unified stance is always nice of course.

one potential option in winit's current state would be to ignore any click events that happen in the same iteration of the main application loop, which wouldn't run into the issue of the first click getting ignored after an alt tab.

I've tried that. It does not actually work. The click event will not only come out of order in the same iteration, but sometimes come in a completely different (later) operation.

I've tried that. It does not actually work. The click event will not only come out of order in the same iteration, but sometimes come in a completely different (later) iteration.

That's... odd. I wouldn't expect that to happen.
I've done some testing on the eventloop-2.0 branch, and it seems like the click event is coming in the same iteration fairly consistently there - perhaps the behavior you're seeing is caused by some quirk in the code that was fixed in the refactor? Regardless, I elect to hold off new API investigations until the EL2.0 code lands on crates.io, and we can see if that fixes it. If it does that saves a whole lotta headache on our end.

I don't like the idea of officially defining the order of mouse/focus events since that's really a niche and finicky API guarantee to put in place, but I'm open to the idea of having some sort of API for determining if a click caused window focus. I don't know what said API should look like, though.

I expect this to be something quite difficult to achieve in a cross-platform way though. Not all platforms provide ordering guarantees wrt to that

Just to clarify, I've done my testing with the code that is currently on crates.io, not the latest git version.

I expect this to be something quite difficult to achieve in a cross-platform way though. Not all platforms provide ordering guarantees wrt to that.

Having no ordering guarantee would be fine if the cursor click does not cause the focus event. On i3 for example just hovering over a window focuses it, so it's irrelevant there.
However if the click is what actually triggered the focus of the window, I think the click event should at least come in the same iteration as the focus event. Everything else just seems a bit bizarre, when the event that triggered something comes a whole iteration after what it has triggered.
Of course if the platform itself doesn't make it possible, winit's SoL. But just from a design PoV it makes no sense imho.

However if the click is what actually triggered the focus of the window, I think the click event should at least come in the same iteration as the focus event.

Agreed on that.
For the record, I expect this to already be the case on wayland, unless the server was designed in a very bizarre way. But We will not be able to make more precise guarantee on the ordering of the events wrt to each other.

However by default on Windows the first click on a focused window is usually ignored, so selections should not be cancelled. At least cmd.exe and powershell behave this way.

I don't think it's that usual, my gut feeling is that it's mostly not ignored. I did some minor testing and it looks like all the older components don't ignore the click, even on Windows 10. So things like explorer.exe and notepad.exe handle that first focusing click. However the ribbon UI design era apps like wordpad.exe and mspaint.exe ignore it. Not completely though, the very top titlebar handles the click, including the floppy disk save button. That tradition of ignoring didn't hold long though as the UWP apps seem to once again handle the first click, e.g. Calculator, Settings, Xbox. Additional apps like chrome.exe, firefox.exe, sublime_text.exe, Code.exe, vlc.exe -- all handle the click. While others like Photoshop.exe don't.
Speaking as a user, I strongly prefer that the click is handled. I use multiple monitors with high resolutions. Which means I have a lot of apps visible even though they aren't focused. When I click on an app, as a rule it's to perform some function and the focusing part is merely a byproduct. Having to click twice would get old really fast.
In light of all this, I don't think winit should start hiding the click event. It's useful.
Now for the cases where ignoring might make sense in a specific app, the app developer could just record the time when the focus event arrives and ignore any clicks that happen say within the next 50 milliseconds.

I think that it is fixed.


Remove HTTP gateway endpoint URL from receipt.json

Documentation for https://github.com/api3dao/airnode/issues/1225

I edited some content on this PR and merged it.


Fix imports and colours for ToolTip.

ToolTip requires foreground colour and fix import for Tkinter for selected options or remove requirements.

Added imports, added new option 'fg' to adjust text colour.


Leaflet.css is loaded on every page

Hi,
First, thank you for this plugin.
Your plugin load leaflet.css by default on all pages (and in the beginning).
It is lowering google rank.
I tried to resolve it myself, but gatsby community adviced me to fill issue here, because it is inproper behaviour.
Could you change your plugin to load css on sites where it is used?

Hi @pszafer
You can set the linkStyles option to false if you would rather import the css from the module.

Truly, I prefer CDN, but would be nice to not have leaflet.css on every page. If hard or impossible it's ok. I'll go with import.


Inline Diff toggle check not changing

VS Code Version:
Version: 1.80.0-insider
Commit: 4649b5333370139d161e7b5d4f78ca13741efa35
Date: 2023-06-28T08:04:23.178Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 20.6.0

When you open the inline window shows the "Inline diff" is checked but now diff is showing.

If  I click the inline diff option, the diff appears.

If you keep clicking the diff button and the code toggles but not the button

This has been removed. Toggling diff is now a primary action that sits with Accept and Discard


Add make commands for setting up clustermesh in kind

For developing clustermesh in kind:
make kind-clustermesh
make kind-clustermesh-images
make kind-install-cilium-clustermesh

/test

/test


(GH-1322) Validate plugin config against task metadata

Previously when a config section existed in a bolt_plugin.json specification any config that was set in bolt.yaml would be passed to the task as under the key _config. Tasks that expect values to be set in either bolt.yaml or inventory.yaml would have to handle munging the values gathered from either file. This commit begins to phase out the config section in bolt_plugin.json. If there is not a config section in that file config values are validated against the intersection of the parameter metadata for the tasks that implement each hook. Values set in bolt.yaml are merged with those in inventory.yaml and passed as parameters. No _config is passed along.
Closes https://github.com/puppetlabs/bolt/issues/1322

CLA signed by all contributors.


Test suite fails: user-agent mismatch

On almost all of my linux & freebsd smokers I see test failures like this:
#   Failed test '-O - --debug --no-cache $url --header X-Test: test (reconstructed)'
#   at t/TestWGetIdentity.pm line 390.
#     Structures begin differing at:
#          $got->{headers}{User-Agent} = 'Wget/1.18'
#     $expected->{headers}{User-Agent} = 'Wget/1.18 (freebsd10.3)'
...

Ideally the change fixes the test suite and makes it ignore the custom suffixes on the user agent
Thank you very much for the analysis and the report!

Unfortunately I still see this kind of error in HTTP-Request-FromCurl-0.28.
Here the full output of t/wget-identity-headers-2.t:
# Testing with wget version '1.18'

#   Failed test 'We create (almost) the same headers with LWP'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[5] = 'User-Agent: Wget/1.18'
#     $expected->[5] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# User-Agent: Wget/1.18 (freebsd10.3)
# X-Test: test
#
#
# Got:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# User-Agent: Wget/1.18
# X-Test: test
#
#
#     use strict;
#      use LWP::UserAgent;
#      use IO::Socket::SSL;
#
#     my $ua = LWP::UserAgent->new('send_te' => '0');
#      $ua->ssl_opts( SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, SSL_hostname => '', verify_hostname => 0 );
#
#     my $r = HTTP::Request->new(
#         'GET' => 'http://[::1]:12589/',
#         [
#             'Connection' => 'Keep-Alive',
#             'Accept' => '*/*',
#             'Accept-Encoding' => 'identity',
#             'Host' => '[::1]:12589',
#             'User-Agent' => 'Wget/1.18',
#             'X-Test' => 'test'
#         ],
#
#     );
#     my $res = $ua->request( $r,  );
#

#   Failed test 'We create (almost) the same headers with HTTP::Tiny'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[4] = 'User-Agent: Wget/1.18'
#     $expected->[4] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# User-Agent: Wget/1.18 (freebsd10.3)
# X-Test: test
#
#
# Got:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# User-Agent: Wget/1.18
# X-Test: test
#
#
#     use strict;
#      use HTTP::Tiny;
#
#     my $ua = HTTP::Tiny->new();
#     my $res = $ua->request(
#         'GET' => 'http://[::1]:12589/',
#         {
#           headers => {
#             'Connection' => 'Keep-Alive',
#             'Accept-Encoding' => 'identity',
#             'User-Agent' => 'Wget/1.18',
#             'X-Test' => 'test',
#             'Accept' => '*/*'
#           },
#
#         },
#     );
#

#   Failed test 'We create (almost) the same headers with LWP'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[6] = 'User-Agent: Wget/1.18'
#     $expected->[6] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# Referer: https://referer.example.com
# User-Agent: Wget/1.18 (freebsd10.3)
#
#
# Got:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# Referer: https://referer.example.com
# User-Agent: Wget/1.18
#
#
#     use strict;
#      use LWP::UserAgent;
#      use IO::Socket::SSL;
#
#     my $ua = LWP::UserAgent->new('send_te' => '0');
#      $ua->ssl_opts( SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, SSL_hostname => '', verify_hostname => 0 );
#
#     my $r = HTTP::Request->new(
#         'GET' => 'http://[::1]:12589/',
#         [
#             'Connection' => 'Keep-Alive',
#             'Accept' => '*/*',
#             'Accept-Encoding' => 'identity',
#             'Host' => '[::1]:12589',
#             'Referer' => 'https://referer.example.com',
#             'User-Agent' => 'Wget/1.18'
#         ],
#
#     );
#     my $res = $ua->request( $r,  );
#

#   Failed test 'We create (almost) the same headers with HTTP::Tiny'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[5] = 'User-Agent: Wget/1.18'
#     $expected->[5] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Referer: https://referer.example.com
# User-Agent: Wget/1.18 (freebsd10.3)
#
#
# Got:
# Request:
# GET / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Referer: https://referer.example.com
# User-Agent: Wget/1.18
#
#
#     use strict;
#      use HTTP::Tiny;
#
#     my $ua = HTTP::Tiny->new();
#     my $res = $ua->request(
#         'GET' => 'http://[::1]:12589/',
#         {
#           headers => {
#             'User-Agent' => 'Wget/1.18',
#             'Accept-Encoding' => 'identity',
#             'Referer' => 'https://referer.example.com',
#             'Connection' => 'Keep-Alive',
#             'Accept' => '*/*'
#           },
#
#         },
#     );
#

#   Failed test 'We create (almost) the same headers with LWP'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[5] = 'User-Agent: Wget/1.18'
#     $expected->[5] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# User-Agent: Wget/1.18 (freebsd10.3)
# Content-Length: 24
# Content-Type: application/x-www-form-urlencoded
#
# This is a test
# More test
#
# Got:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# User-Agent: Wget/1.18
# Content-Length: 24
# Content-Type: application/x-www-form-urlencoded
#
# This is a test
# More test
#
#     use strict;
#      use LWP::UserAgent;
#      use IO::Socket::SSL;
#
#     my $ua = LWP::UserAgent->new('send_te' => '0');
#      $ua->ssl_opts( SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, SSL_hostname => '', verify_hostname => 0 );
#
#     my $r = HTTP::Request->new(
#         'POST' => 'http://[::1]:12589/',
#         [
#             'Connection' => 'Keep-Alive',
#             'Accept' => '*/*',
#             'Accept-Encoding' => 'identity',
#             'Host' => '[::1]:12589',
#             'User-Agent' => 'Wget/1.18',
#             'Content-Length' => '24',
#             'Content-Type' => 'application/x-www-form-urlencoded'
#         ],
#         "This is a test\x0aMore test"
#     );
#     my $res = $ua->request( $r,  );
#

#   Failed test 'We create (almost) the same headers with HTTP::Tiny'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[4] = 'User-Agent: Wget/1.18'
#     $expected->[4] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# User-Agent: Wget/1.18 (freebsd10.3)
# Content-Length: 24
# Content-Type: application/x-www-form-urlencoded
#
# This is a test
# More test
#
# Got:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# User-Agent: Wget/1.18
# Content-Length: 24
# Content-Type: application/x-www-form-urlencoded
#
# This is a test
# More test
#
#     use strict;
#      use HTTP::Tiny;
#
#     my $ua = HTTP::Tiny->new();
#     my $res = $ua->request(
#         'POST' => 'http://[::1]:12589/',
#         {
#           headers => {
#             'Content-Length' => '24',
#             'Accept' => '*/*',
#             'User-Agent' => 'Wget/1.18',
#             'Accept-Encoding' => 'identity',
#             'Content-Type' => 'application/x-www-form-urlencoded',
#             'Connection' => 'Keep-Alive'
#           },
#           content =>  "This is a test\x0aMore test"
#         },
#     );
#

#   Failed test 'We create (almost) the same headers with LWP'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[5] = 'User-Agent: Wget/1.18'
#     $expected->[5] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# User-Agent: Wget/1.18 (freebsd10.3)
# Content-Length: 27
# Content-Type: application/x-www-form-urlencoded
#
# msg=hello%20world&from=wget
#
# Got:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# Host: [::1]:12589
# User-Agent: Wget/1.18
# Content-Length: 27
# Content-Type: application/x-www-form-urlencoded
#
# msg=hello%20world&from=wget
#
#     use strict;
#      use LWP::UserAgent;
#      use IO::Socket::SSL;
#
#     my $ua = LWP::UserAgent->new('send_te' => '0');
#      $ua->ssl_opts( SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, SSL_hostname => '', verify_hostname => 0 );
#
#     my $r = HTTP::Request->new(
#         'POST' => 'http://[::1]:12589/',
#         [
#             'Connection' => 'Keep-Alive',
#             'Accept' => '*/*',
#             'Accept-Encoding' => 'identity',
#             'Host' => '[::1]:12589',
#             'User-Agent' => 'Wget/1.18',
#             'Content-Length' => '27',
#             'Content-Type' => 'application/x-www-form-urlencoded'
#         ],
#         "msg=hello\x2520world&from=wget"
#     );
#     my $res = $ua->request( $r,  );
#

#   Failed test 'We create (almost) the same headers with HTTP::Tiny'
#   at t/TestWgetIdentity.pm line 176.
#     Structures begin differing at:
#          $got->[4] = 'User-Agent: Wget/1.18'
#     $expected->[4] = 'User-Agent: Wget/1.18 (freebsd10.3)'
# Expected:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# User-Agent: Wget/1.18 (freebsd10.3)
# Content-Length: 27
# Content-Type: application/x-www-form-urlencoded
#
# msg=hello%20world&from=wget
#
# Got:
# Request:
# POST / HTTP/1.1
# Accept: */*
# Accept-Encoding: identity
# User-Agent: Wget/1.18
# Content-Length: 27
# Content-Type: application/x-www-form-urlencoded
#
# msg=hello%20world&from=wget
#
#     use strict;
#      use HTTP::Tiny;
#
#     my $ua = HTTP::Tiny->new();
#     my $res = $ua->request(
#         'POST' => 'http://[::1]:12589/',
#         {
#           headers => {
#             'Content-Length' => '27',
#             'Accept' => '*/*',
#             'User-Agent' => 'Wget/1.18',
#             'Connection' => 'Keep-Alive',
#             'Content-Type' => 'application/x-www-form-urlencoded',
#             'Accept-Encoding' => 'identity'
#           },
#           content =>  "msg=hello\x2520world&from=wget"
#         },
#     );
#
# Looks like you failed 8 tests of 72.
t/wget-identity-headers-2.t ..
Dubious, test returned 8 (wstat 2048, 0x800)
Failed 8/72 subtests
	(17 TODO tests unexpectedly succeeded)

t/wget-identity-headers.t and t/wget-identity-options.t also fail with similar output.


wip revert handling

covering flow:

GatewayEVM.execute called with address of Hello contract from example-contracts
worker picks up Called event and forwards call to Hello contract's onCrossChainCall
onCrossChainCall reverts
worker calls GatewayEVM.executeRevert using RevertOptions from Called event

is this useful? also it seems localnet in general needs some modifications, for example currently it was broken because zrc20 contract was missing - in this case, onCrossChainCall expects zrc20 to be passed as arg, which zrc20 we would send if localnet doesn't deploy some?

@skosito I think deployProtocolContracts should deploy an ERC-20 (let's call it USDC) and an associated ZRC-20 USDC. It should also deploy ZRC-20 ETH. If EVM test contract sends native gas token, then ZRC-20 ETH is passed to the onCrossChainCall, if ERC-20 USDC is sent, then ZRC-20 USDC.
This way we mirror the behavior of the real environment allowing a developer to test both native gas and ERC-20 tokens.

For simplicity, we can just start with ETH & ZRC-20 ETH support. And possibly add ERC-20 later.

@skosito thanks for this PR! Now a example contract works when called from EVM! 🙌

Closed https://github.com/zeta-chain/localnet/issues/10 & https://github.com/zeta-chain/localnet/issues/11


Do not assume margin direction, harder to override

margin-bottom is an opinionated way of handling margin spacing. We can remove the dependency and use simple CSS shorthand to achieve the same result. Variable is much more configurable.

margin-bottom is an opinionated way of handling margin spacing.

Headings only have top and bottom margin by default, in all browsers. Given we nuke the top margin in Reboot, there's no need to set anything else.

We can remove the dependency and use simple CSS shorthand to achieve the same result.

Simple is one way to look at it; another is that you're setting multiple unnecessary values most of the time.

Variable is much more configurable.

That is true, but not the approach I take for Bootstrap's CSS. We only set what we need, not what you might need at some point.
Thanks though!

I would argue, why have variables at all. I get the "what we need" but does not give flexibility regarding choice. Regarding that mentality we should not be changing variables at all.

To comment further as a secondary thought, there logical conditions when being able to set the top and bottom margin makes sense with inline markup tags. Especially since under certain conditions you want to take advantage of margins overlapping.


Feature: added comments, added people can comment chapters, some improvements

Build: Working on local
Features:
Comments: users can comment under the video/notion
Replies: Users can reply to a comment (Allowed only to depth 1 like youtube)
Upvotes/downvote: user can upvote or downvote the comment
Comment as chapter: user can comment chapters following the current format:
intro:
00:03 - Introduction to the topic
00:15 - Explaining the basics
00:30 - Deep dive into details
00:45 - 00:50 - Summary and conclusion

This is fully working and the comment is inserted as type INTRO and with flag approved to false.
Note*: In this PR admin part is not included but i was thinking to add a accept button or dropdown option where the admin can accept it. Second option would be to copy the comment id and on admin part make a input with comment id,adminpassword  and approve button.
On accepted the comment will be transformed to reflect the segments array and saved, the function to do it is already present thank to CHATGPT :)
Also user can click the timestamp in the comments and the video timestamp will be set to that.

Missing:
Admin part to accept the chapter comment
Admin can delete any comment
Users update/delete their comment
This is what i remember, ill update this if get to remember something else.
Improvemnts:
Many ui related improvement can be done
Maybe use react query for infinite scroll and remove current pagination
preview
https://github.com/code100x/cms/assets/38940603/7345f45c-ed7a-4ced-94eb-a0177ceadd6b

@hkirat can you look at this? would like to merge and do the admin part/some improvements

Now admin can also approve the intro comments
preview:
https://github.com/code100x/cms/assets/38940603/91a3fe88-61c3-4568-bf96-6029d53f7f8f

Beautiful

/bounty $400

Can u try deploying this to a local vercel @siinghd ?
Seeing this in the build pipeline on vercel

@hkirat Was about to ping you, deploy failed... let me do it now :)
Thanks for the bounty veere <3

Something is up with migrations

Unsure if it broke here or in a different PR
But migrate is not working on a fresh DB

@hkirat let me look at it

Just need to migrate the DB I think I can figure this out @siinghd

@hkirat any update on thi?


Add types to package.json

Hello!
This PR should fix #216 I'm assuming that this is all that needs to be done?
I'd like to check with you if the path is the right one, I've used the one you mentioned on the open issue, but on the publishing page they use "types": "./lib/main.d.ts"  🤔
Let me know if you would like me to add/change anything to the PR 😄 👍

Codecov Report

Merging #217 (7a35e35) into main (b3b7dcc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #217   +/-   ##
=======================================
  Coverage   94.04%   94.04%
=======================================
  Files          84       84
  Lines         705      705
  Branches      127      133    +6
=======================================
  Hits          663      663
  Misses          9        9
  Partials       33       33

Continue to review full report at Codecov.

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


Remove IGListStackedSectionController

Changes in this pull request
Issue fixed: #1099
Checklist

[x] All tests pass. Demo project builds and runs.
[x] I added tests, an experiment, or detailed why my change isn't tested.
[x] I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
[x] I have reviewed the contributing guide

Deprecating IGListStackedSectionController means removing it completely, right? Or just add __deprecated to the class? Should have asked in advance 😩

We kind-of-not-really use this once within Instagram. I'll accept this but it'll take me some time to import and fixup internal build errors. Thank you so much @zhubofei for driving this!!

@bofeizhu  Hi Bofei, can you rebase to master again? thanks!

@lorixx Sorry, won’t be able to work on this for the coming months. Also, I think it’s easier to open a new PR at this point. I’ll go ahead and close this PR. Feel free to create a new PR for this issue! Thx!

hi @bofeizhu @lorixx , I would like to help creating the new PR #1355 :)
It's based on the latest master branch, so the PR has no merge conflicts and the commits are more clean.

@hanton Thank you!

I think this was handled by 1099, so closing


SSH auth: Add custom username support

Description:
This PR adds support for custom usernames when cloning repositories using SSH authentication.
Previously, the user git was hard-coded.
This PR also adds compatibility for using ssh:// repo URLs without using ssh-agent.
A PR such as #495 will have to be merged to restore ssh-agent compatibility.
I will remove this part if such a breaking change is not desirable.
Checklist:

[x] Does your PR pass tests?
[ ] Have you written new tests for your changes?
[x] Have you lint your code locally prior to submission?

This and https://github.com/zricethezav/gitleaks/pull/495 are very useful features. Can we help here to get this merged?

This and #495 are very useful features. Can we help here to get this merged?

@adrianbn working on the review now. Sorry this through the cracks


Do not evaluate annotations for private fields

Doing so fixes https://github.com/pydantic/pydantic/issues/10958 and https://github.com/gtalarico/pyairtable/issues/411. We don't need to evaluate annotation for private fields because we will not make use of the type hint in any way.

The get_cls_type_hints function is now split up, by defining a new get_model_type_hints function that is lenient. get_cls_type_hints is made non-lenient because it is used for typed dictionaries and named tuples, where we want to eagerly raise the NameErrors that can occur during evaluation.
While this may introduce some code duplication, this gives more flexibility in the future. For instance, we know from the namespace management refactor that typed dicts behaves quite differently from normal classes when it comes to using the __annotations__ attribute (collected from bases by cpython, automatically converted to ForwardRef instances, etc). So we might define another separate get_typed_dict_type_hints function in the future.

Change Summary

Related issue number

Checklist

[ ] The pull request title is a good summary of the changes - it will be used in the changelog
[ ] Unit tests for the changes exist
[ ] Tests pass on CI
[ ] Documentation reflects the changes where applicable
[ ] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Nice!


Dynamic imports (without next/dynamic) error in builds

When using the conventional webpack 2+ dynamic imports, everything works great in dev but breaks in production (with builds).

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

Expected Behavior

Current Behavior
A bug: dynamic imports should work in production as well as they do in development.

Steps to Reproduce (for bugs)

Pull down this example nextjs app to reproduce
yarn dev to see it working in dev
yarn build then yarn start to spin up the production build

Context
I am trying to code-split my app and some of my dynamic imports are NOT components. So using next/dynamic is not appropriate...

Your Environment

Tech
Version

next
5.1.0 (latest)

node
9.7.1

OS
mac

browser
chrome

This doesn't seem to be an issue in<EMAIL_ADDRESS>

This doesn't seem to be an issue in<EMAIL_ADDRESS>
I have the same problem. So why ?


Onboarding Service Provider UI - Confirmation Screen

Summary
The current existing prototype implementation of the Onboarding Service Provider flow is supposed to get updated based on the final design.
https://www.figma.com/file/pcHZWXTQJUguIT75QSk9KW/Portal-Designs?type=design&node-id=8391-1119&mode=design&t=sSFdZh89CrP8VkWG-0
The implementation is divided into 4 tickets

https://github.com/eclipse-tractusx/portal-frontend/issues/483
https://github.com/eclipse-tractusx/portal-frontend/issues/484
https://github.com/eclipse-tractusx/portal-frontend/issues/485
https://github.com/eclipse-tractusx/portal-frontend/issues/486

**In this ticket - the implementations of the confirmation screen is in focus**

Confirmation Page:
On this page, the user receives confirmation of the successful receipt of the registration and an overview of the current review status.
The confirmation page consists of the following elements:

Headline
Subheadline
Info text
Subheadline
Status with label /value of last update
Overview of review steps with processing status (transfer from stock)
"Get to home" button (change to start page)

Design

Acceptance Criteria

[ ] after the successful submission of the company data& role, the registration status page is getting displayed (see design above)
[ ]  all text values are configured

headline via locales files
description via locales files
field names via locales files
...NOTE: please do not add the translation into the main locales files. Instead a new file with the name "registration" is expected. This will ensure that we have the registration text in one area. Old text values from the prototype which have been added in the main locales file need to get cleaned up

[ ] if the user clicks on "..home" the system will redirect the user to the {hostname}/home page

@jjeroch To fetch the status lists, we need to call '/applications' API. Right ?

@jjeroch To fetch the status lists, we need to call '/applications' API. Right ?

@nidhigarg-bmw yes correct - we use the same as for the others Get: /api/registration/applications


Queries 7 and 8 return inconsistent results between Neo4j and Kùzu

Problem
Queries 7 and 8, which count the edges between persons and locations do not show consistent results between the two DBs. The other queries showed identical results, so it doesn't make sense why these two queries specifically don't add up.
Neo4j results
Query 7:

        MATCH (p:Person)-[:LIVES_IN]->(:City)-[:CITY_IN]->(s:State)
        WHERE p.age >= $age_lower AND p.age <= $age_upper AND s.country = $country
        WITH p, s
        MATCH (p)-[:HAS_INTEREST]->(i:Interest)
        WHERE tolower(i.interest) = tolower($interest)
        RETURN count(p) AS numPersons, s.state AS state, s.country AS country
        ORDER BY numPersons DESC LIMIT 1

            State in United States with the most users between ages 23-30 who have an interest in photography:
shape: (1, 3)
┌────────────┬────────────┬───────────────┐
│ numPersons ┆ state      ┆ country       │
│ ---        ┆ ---        ┆ ---           │
│ i64        ┆ str        ┆ str           │
╞════════════╪════════════╪═══════════════╡
│ 172        ┆ California ┆ United States │
└────────────┴────────────┴───────────────┘

Query 7 completed in 0.163613s

Query 8:

        MATCH (p1:Person)-[f:FOLLOWS]->(p2:Person)
        WHERE p1.personID > p2.personID
        RETURN count(f) as numFollowers

Number of second degree connections reachable in the graph:
shape: (1, 1)
┌──────────────┐
│ numFollowers │
│ ---          │
│ i64          │
╞══════════════╡
│ 1219517      │
└──────────────┘
Query 8 completed in 0.990533s

KùzuDB results
Query 7:

        MATCH (p:Person)-[:LivesIn]->(:City)-[:CityIn]->(s:State)
        WHERE p.age >= $age_lower AND p.age <= $age_upper AND s.country = $country
        WITH p, s
        MATCH (p)-[:HasInterest]->(i:Interest)
        WHERE lower(i.interest) = lower($interest)
        RETURN count(p.id) AS numPersons, s.state AS state, s.country AS country
        ORDER BY numPersons DESC LIMIT 1

            State in United States with the most users between ages 23-30 who have an interest in photography:
shape: (1, 3)
┌────────────┬────────────┬───────────────┐
│ numPersons ┆ state      ┆ country       │
│ ---        ┆ ---        ┆ ---           │
│ i64        ┆ str        ┆ str           │
╞════════════╪════════════╪═══════════════╡
│ 169        ┆ California ┆ United States │
└────────────┴────────────┴───────────────┘

Query 7 completed in 0.010869s

Query 8:

        MATCH (p1:Person)-[f:Follows]->(p2:Person)
        WHERE p1.id > p2.id
        RETURN count(f) as numFollowers

Number of second degree connections reachable in the graph:
shape: (1, 1)
┌──────────────┐
│ numFollowers │
│ ---          │
│ i64          │
╞══════════════╡
│ 1214477      │
└──────────────┘
Query 8 completed in 0.027979s

Summary of inconsistency:

Query
Neo4j (count)
Kùzu (count)

7
172
169

8
1219517
1214477

What could be going wrong??

Hi Prashanth,
I rerun Q7 and Q8 both in Kùzu and duckdb to compare the result. Kùzu and duckdb does generate the same result for both Q7 and Q8.
For Q7:
Kùzu actually returns 170 rather than 169 for Q7 (same result as duckdb). Can you rerun your testing script?
Query 7:
        MATCH (p:Person)-[:LivesIn]->(:City)-[:CityIn]->(s:State)
        WHERE p.age >= $age_lower AND p.age <= $age_upper AND s.country = $country
        WITH p, s
        MATCH (p)-[:HasInterest]->(i:Interest)
        WHERE lower(i.interest) = lower($interest)
        RETURN count(p.id) AS numPersons, s.state AS state, s.country AS country
        ORDER BY numPersons DESC LIMIT 1

            State in United States with the most users between ages 23-30 who have an interest in photography:
shape: (1, 3)
┌────────────┬────────────┬───────────────┐
│ numPersons ┆ state      ┆ country       │
│ ---        ┆ ---        ┆ ---           │
│ i64        ┆ str        ┆ str           │
╞════════════╪════════════╪═══════════════╡
│ 170        ┆ California ┆ United States │
└────────────┴────────────┴───────────────┘

For Q8:
Both Kùzu and duckdb give 1214477 as the result.

BTW:
Here is the DDL and copy statements that i used to load the data:
create table person(id int64, name varchar, gender varchar, birthday date, age int64, isMarried bool, primary key(id));
create table city (id int64, city varchar, state varchar, country varchar, lat float, lon float, population int, primary key(id));
create table state(id int64, state varchar, country varchar, primary key(id));
create table interest(id int64, interest varchar, primary key(id));
create table livesin(id1 int64, id2 int64);
create table cityin(id1 int64, id2 int64);
create table hasinterest(id1 int64, id2 int64);
create table follows(id1 int64, id2 int64);

copy person from '${outputPath}/nodes/persons.csv' (AUTO_DETECT TRUE);
copy city from '${outputPath}/nodes/cities.csv' (AUTO_DETECT TRUE);
copy state from '${outputPath}/nodes/states.csv' (AUTO_DETECT TRUE);
copy interest from '${outputPath}/nodes/interests.csv' (AUTO_DETECT TRUE);
copy livesin from '${outputPath}/edges/lives_in.csv' (AUTO_DETECT TRUE);
copy cityin from '${outputPath}/edges/city_in.csv' (AUTO_DETECT TRUE);
copy hasinterest from '${outputPath}/edges/interests.csv' (AUTO_DETECT TRUE);
copy follows from '${outputPath}/edges/follows.csv' (AUTO_DETECT TRUE);

Q7 in sql:
SELECT COUNT(p.id) AS numPersons, s.state AS state, s.country AS country
FROM person p
JOIN livesin pl ON p.id = pl.id1
JOIN city c ON pl.id2 = c.id
JOIN cityin ci ON c.id = ci.id1
JOIN state s ON ci.id2 = s.id
JOIN hasinterest hi ON p.id = hi.id1
JOIN interest i ON hi.id2 = i.id
WHERE p.age >= 23 AND p.age <= 30 AND s.country = 'United States'
    AND LOWER(i.interest) = LOWER('photography')
GROUP BY s.state, s.country
ORDER BY numPersons DESC
LIMIT 1;

Q8 in sql:
SELECT COUNT(f.id1) AS numFollowers
FROM person p1
JOIN follows f ON p1.id = f.id1
JOIN person p2 ON f.id2 = p2.id
WHERE p1.id > p2.id;

Hi @acquamarin, it looks like both my databases had some inconsistent state, leading the counts to not match up. I just cleared my entire DBs and regenerated the data and reran the queries again, and it all adds up! Very relieved that this isn't a bug. 😅
Thanks a LOT for doing this check in DuckDB as well -- this helped me learn how the graph actually uses relational algebra under the hood, and it also helps to have a reputable SQL DB show the same results as the graph. It will help in a lot of future work, too!
I'm confident that this isn't a bug, so we can close this issue and move on to other things. Cheers!
Query 7:

        MATCH (p:Person)-[:LivesIn]->(:City)-[:CityIn]->(s:State)
        WHERE p.age >= $age_lower AND p.age <= $age_upper AND s.country = $country
        WITH p, s
        MATCH (p)-[:HasInterest]->(i:Interest)
        WHERE lower(i.interest) = lower($interest)
        RETURN count(p.id) AS numPersons, s.state AS state, s.country AS country
        ORDER BY numPersons DESC LIMIT 1

            State in United States with the most users between ages 23-30 who have an interest in photography:
shape: (1, 3)
┌────────────┬────────────┬───────────────┐
│ numPersons ┆ state      ┆ country       │
│ ---        ┆ ---        ┆ ---           │
│ i64        ┆ str        ┆ str           │
╞════════════╪════════════╪═══════════════╡
│ 170        ┆ California ┆ United States │
└────────────┴────────────┴───────────────┘

Query 7 completed in 0.012754s

Query 8:

        MATCH (p1:Person)-[f:Follows]->(p2:Person)
        WHERE p1.id > p2.id
        RETURN count(f) as numFollowers

Number of second degree connections reachable in the graph:
shape: (1, 1)
┌──────────────┐
│ numFollowers │
│ ---          │
│ i64          │
╞══════════════╡
│ 1214477      │
└──────────────┘
Query 8 completed in 0.103467s


Unable to accept SSL certificate for Firefox

while executing scripts in Firefox we are displayed with SSL certificate warning and the same in not able to be accepted by passing any parameter as capabilities in the browser profile.
Eg:
firefox {
browserName: "firefox"
driverExtras : {
"webdriver_assume_untrusted_issuer": true
}
}
or
firefox {
acceptSslCerts: true
browserName: "firefox"
}

with firefox please try
acceptInsecureCerts: true


Add "Store Digit In Variable" event

Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Adds the ability to store a digit of a number/variable into a variable. Works up to the ten thousands digit, since the 16-bit limit on numbers/variables is up to five digits. Example of a use could be for creating scoreboards.

What is the current behavior? (You can also link to an open issue here)
You can perform the mathematics behind this using the built-in math functions, but for some, it might not be straightforward or obvious.

What is the new behavior (if this is a feature change)?
Now, you can quickly and easily get the specified digit of a number/variable.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
None that I am aware of.

Other information:
Would there be a need to add properties to the union? I can't think of a reason to need a digit from, say, the player's X coordinate, but maybe someone would? It would be easy enough to add in. Went ahead and added it anyways. Maybe someone could find a use for it.

Closing as it is out of date. May consider resubmitting in the future.


Check the user in HTTP ports

Currently HTTP ports are anonymous so the user specified in the creation of the app port can be non-existent and the CONFIGURE SYSTEM INSERT Port still succeeds and the port accepts and responds to queries.

Let's keep this one open to make sure this is addressed in the successor API


Calibration network maintenance

What is this about?

What is this about?

It was supposed to be a tracking issue for tasks related to our calibnet infrastructure. Since we're not actually using it for tracking, we should just close it.


Add toc, fix commands

This is an automated message:
You can preview this docs PR at http://476.docs-pr.validatedpatterns.io
Note that they get generated every five minutes, so please wait a bit.


Refine the definition of done

Task
The purpose of this task will be refine the definition of done to better reflect our updated process.
Definition of done (existing)
In order for a user story to be consider "done" and the issue closed, it must meet the following criteria:

All acceptance criteria have been met.
All UX requirements have been met.
There are no known defects.
Unit test coverage > 85%.
Is deployed to the development environment.
Documentation has been updated (if needed).

@angelcardoz @dan-padgett
Here's an update on the definition of done to serve as a jumping off point. I will want to gather ideas from the development team to further build out and refine this list but thought it would be good to have a starting point.
Definition of done
For a user story to be consider "done", and the issue closed, it must meet the following criteria:

[ ] All acceptance criteria have been met
[ ] All UX requirements have been met; including a design review of the development implementation
[ ] If required, the team has performed a bug bash
[ ] There are no known defects
[ ] Unit test coverage > 85%
[ ] Has been deployed to the development environment
[ ] Documentation has been updated (if needed)


Bump to 1.4.1rc1

Bump to 1.4.1rc1

@forsyth2, you created a branch with the same name as the eventual tag here, which is a totally logical thing to do.  Unfortunately, it really confuses things once you do create the tag.  I think that's why we're getting a different sha256 hash on conda-forge every time it tries to build from the tag.  Could you delete the branch?  And in the future it is probably best to either put the branch of the same name on your fork instead of the main repo or give it a different name from the eventual tag to avoid trouble.

Ah, I deleted the branch locally to make the GitHub tag, but I didn't delete the branch on GitHub.


extends like ESLint

ESLint has a neat feature called shareable configurations: http://eslint.org/docs/user-guide/configuring#extending-configuration-files
Basically this would allow to have an .esformatter that would look like:
{
  "extends": ["esformatter-config-airbnb", "esformatter-config-algolia"]
}

That would load the node_modules/esformatter-config-airbnb/index.js and extends it with node_modules/esformatter-config-algolia/index.js
What do you think?

Shareable config doc: http://eslint.org/docs/developer-guide/shareable-configs

sounds like a good feature. right now you can do it by converting your config into a plugin and using the setOptions
var deepFillIn = require('mout/object/deepFillIn');
exports.setOptions = function(opts) {
  deepFillIn(defaultAndUserOptions, pluginOptions);
};

but I agree that having a simple module.exports = myPresetOptions; is way more user friendly, specially if the preset depends on other plugins.. (plugin registration happens before the setOptions call, so adding other plugin to the plugins array won't have any effect).
see: #249

Babel presets is also a nice solution: https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/user-handbook.md#making-your-own-preset
I'll try to work on this next month, been delaying for too long.

finally had the time to work on this. Still need to update the documentation, but basically:
{
  "extends": [
    "preset:foobar", // load "esformatter-preset-foobar" from "./node_modules"
    "./lorem_ipsum.json" // load relative config file
  ]
}

and presets, can extend other presets and register plugins:
// need to use `require` because dependencies will be listed
// on the preset "package.json"
module.exports = {
  extends: [
    require('esformatter-preset-dolor')
  ],
  plugins: [
    require('esformatter-quotes')
  ]
};

this should also close #308


Python error from your code

I got this errors on Kali Linux and Windows

debug.txt

Did you installed pyinstaller on wine ? Try to install manualy

How about the banner.py error on windows?

I dont know sorry ^^'

The error in banner.py is non-logical but I will try to find what's the cause

It's the same issue in #15 why opening many issues !!

sorry about that, i didn't recall same error just did now. but this issue is not understandable i am a bit confused. pyinstaller is installed on both Kali and windows, i also copied dr0p1t files into same folder of pyinstaller to be able to get rid of pyinstaller not installed but i am still getting banner.py error and on Kali a debug error which i included in my post. you can check the debug.txt i attach in the message to know where to have this fixed mate

For Kali pyinstaller dependencies not all installed or not installed correctly for some reasons so try this commands:
sudo wine /root/.wine/drive_c/Python27/python.exe -m pip install --upgrade pip sudo wine /root/.wine/drive_c/Python27/python.exe -m pip uninstall pyinstaller sudo wine /root/.wine/drive_c/Python27/python.exe -m pip install pyinstaller

For windows, I will check banner.py ASAP

Well, this issue will be considered as solved because you don't reply and reply to others issues instead !!

sorry about that bro, i think since some other members are getting no error on kali i will reinstall Kali and do it afresh then. will update back
Thanks


[Suggestion] Write backup file in a sub directory

Hi I ran into an issue when backing up multiple bedrock servers that have the same world name. For example,
Container A
  server_name: BedrockServer1
    level_name: Survival
Container B
  server_name: BedrockServer2
    level_name: Survival

The backup files generated can conflict if the backup happens quickly. My suggestion would be to put the backup file in a sub directory. So with the example above the backup would look like:
/opt/bedrock/backups/BedrockServer1/Survival.timestamp.mcworld
/opt/bedrock/backups/BedrockServer2/Survival.timestamp.mcworld

or prepend with the server name
/opt/bedrock/backups/BedrockServer1.Survival.timestamp.mcworld
/opt/bedrock/backups/BedrockServer2.Survival.timestamp.mcworld

Of course you would still run into the same problem if the server names were not unique. Not sure if the container name could be used instead since those are required to be unique.
Thank you for this project!

I know this is an old enhancement request, but I do like it. I'll add it to the schedule to see if I can find time to implement this.
The trick will be that a change of this nature can really mess with the trim logic. So I'll need to play with getting the upgrade path done and make sure it works properly.

Scheduling this for work during 1.3 before I move onto 1.4. This will introduce a new configuration setting that can be set globally, or on a per-container basis. By default it is false, but it can be set to true to add a prefix to the backups.
Container > Global > Default
prefixContainerNameOnBackups: true
containers:
  bedrock:
    - name: Server1
      prefixContainerNameOnBackups: true
  java:
    - name: Server2
      prefixContainerNameOnBackups: true

The result of this will be that the backups would look like this:
<ContainerName>.<WorldName>.<TimeStamp>.ext

This has been merged and will appear in the test tag shortly.


[C++] attribute highlighting

There seem to be some inconsistencies that appear when __attribute__ is used on a struct:
struct __attribute__((packed)) struct1_t {
	static constexpr int A 	= 1;
	static constexpr int B	= 2;
	static constexpr int C	= 3;
};

struct struct2_t {
    static constexpr int A 	= 1;
	static constexpr int B	= 2;
	static constexpr int C	= 3;
};

The static modifiers are highlighted differently - do you know why?

Hi @bbatliner ,
It's the same situation as in #23 . I will try to fix this, but it may take some time.

__attribute__ correctly highlights for functions and doesn't corrupt the tree. I'm seeing the same issue for structs, however.

Is this the intended behavior for now?

You are right. As I posted in #23 :

throw and virtual have been fixed indeed. But highlighting of structs with __attribute__ is still corrupted, it became slightly better though. It seems, that attributes are fixed only for functions in tree-sitter-cpp. So let's leave #21 open for a while. I'll try to ask tree-sitter-cpp developers to fix this issues.

But I was wrong, that it became slightly better =).
So we are waiting until __attribute__ is fixed in tree-sitter-cpp for structs.


Recompile MKRingProgressView without delete-reinstall of

I have an app that uses MKRingProgressView (Loop diabetes app), and I want to get familiar with making changes to the code - and figure MKRingProgressView is a "easy" place to start.  Is there a way to recompile only the framework cod without xCode's "delete-then-reinstall" for the entire app?
Or at least without disrupting whatever resident information the app has left on iOS, actually.  I'm currently using the app, and if I delete it, it clears out the address information of the current insulin pod (Omnipod) is linked.
(This might not be the right forum to ask this)

@Jimw338 I don't quite understand if there is any problem with the lib, but for broader questions like issues with Xcode frameworks it is better to ask for help on StackOverflow


no-useless-escape

Current dependencies on/for this PR:

main

PR #132   👈

This comment was auto-generated by Graphite.


I want to read quality, detailed, and up-to-date docs for every wrapper

At minimum, Polywrap users need to know a wrapper's interface to make queries. But often users will need more information, as they do with any SDK. We should make it easy for wrapper developers to create documentation for their projects, and make it easy for dApp developers to find that documentation.
It would also be useful to provide dApp developers a way to learn a wrapper's interface even when the wrapper developer didn't write anything. This could be done by querying a uri with a CLI tool, or perhaps by using a search tool on our website that accepts a uri and returns the wrapper's schema.
The solutions to these tasks should also support plugins.

[x] As a wrapper developer, there are tools to help me create quality documentation for my wrapper. See issue: https://github.com/polywrap/monorepo/issues/4
[ ] As a dApp developer, it is easy to find documentation produced by wrapper developers. See Hub issue: https://github.com/polywrap/hub/issues/179
[x] As a dApp developer, I can obtain a wrapper's interface in a presentable format even when the wrapper developers did not write or publish any documentation. See issue: https://github.com/polywrap/monorepo/issues/4

I think we should add an issue to The Hub for this. It'd be great to foward users to the hub where they can read through the schema & see documentation in an easy user-friendly way.

Perhaps we can scope this down to having good documentation for the wrappers that are used in integrations.

@krisbitney @Niraj-Kamdar now that the docgen command is complete, I think we should setup a new documentation website hosted at integrations.polywrap.io.
The website's source code can be within the https://github.com/polywrap/integrations repo, within a docs/ folder.
It can have an automated build process setup where it:

iterates through all integrations (system/filesystem, protocol/ethereum/ens, etc)
runs polywrap docgen and outputs them to their respective folders within the docs/... directory

This way, we have an auto-updating documentation website for all integrations that we add to the integrations repo.
Thoughts?

@krisbitney @Niraj-Kamdar now that the docgen command is complete, I think we should setup a new documentation website hosted at integrations.polywrap.io.
The website's source code can be within the https://github.com/polywrap/integrations repo, within a docs/ folder.
It can have an automated build process setup where it:

iterates through all integrations (system/filesystem, protocol/ethereum/ens, etc)
runs polywrap docgen and outputs them to their respective folders within the docs/... directory

This way, we have an auto-updating documentation website for all integrations that we add to the integrations repo.
Thoughts?

This is a great idea. It should be easy to set up.

@krisbitney @Niraj-Kamdar PR up here https://github.com/polywrap/integrations/pull/100. Feedback welcome!


Add AutoExpandReplica in the validation of replica count enforcement

Description
[Describe what this change achieves]
The PR tries to solve the issue #4865
Issues Resolved
[List any issues this PR will resolve]
Check List

[x] New functionality includes testing.

[x] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[x] Commits are signed per the DCO using --signoff
[ ] Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #4994 (de6a579) into main (782dc59) will decrease coverage by 0.49%.
The diff coverage is 78.37%.

@@             Coverage Diff              @@
##               main    #4994      +/-   ##
============================================
- Coverage     71.37%   70.87%   -0.50%
+ Complexity    58338    57908     -430
============================================
  Files          4689     4688       -1
  Lines        277022   276911     -111
  Branches      40315    40301      -14
============================================
- Hits         197718   196263    -1455
- Misses        63304    64366    +1062
- Partials      16000    16282     +282

Impacted Files
Coverage Δ

.../opensearch/gradle/info/GlobalBuildInfoPlugin.java
37.15% <ø> (+0.59%)
:arrow_up:

...ternal/InternalDistributionArchiveCheckPlugin.java
0.00% <0.00%> (ø)

...ternal/InternalDistributionArchiveSetupPlugin.java
0.00% <ø> (ø)

...ain/java/org/opensearch/painless/antlr/Walker.java
85.01% <ø> (+0.18%)
:arrow_up:

...admin/indices/segments/IndicesSegmentResponse.java
73.86% <ø> (+8.86%)
:arrow_up:

...main/java/org/opensearch/bootstrap/JNANatives.java
18.85% <0.00%> (+2.06%)
:arrow_up:

...ava/org/opensearch/cluster/node/DiscoveryNode.java
89.83% <ø> (+3.68%)
:arrow_up:

...main/java/org/opensearch/index/engine/Segment.java
69.92% <ø> (+2.54%)
:arrow_up:

.../opensearch/index/mapper/DocumentMapperParser.java
90.14% <ø> (+7.02%)
:arrow_up:

...org/opensearch/index/query/ExistsQueryBuilder.java
87.09% <ø> (+8.97%)
:arrow_up:

... and 492 more

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

looks good @Arpit-Bandejiya  . Thanks .

@Bukhtawar  : can you please review this ?

This signature change of validate method breaks the usage in index management. This blocked the distribution build for some time and we have fixed this on IM side.
https://github.com/opensearch-project/index-management/issues/593
For the public method, maybe we shouldn't directly change the signature but overload the method.


gstreamer1.0-plugins-good: fix qt5 dependency

Commit 73f99f2 ("gstreamer1.0-plugins-{good,bad}: move the qt5
PACKAGECONFIG from bad to good bbappend") just copied the bbappend file
without checking the dependencies.
The qt5 plugin needs the gl plugin which was moved in gstreamer 1.14
from bad to base. So the pyhton() function checking the PACKAGECONFIG_GL
isn't needed here, furthermore it causes bitbake errors:
 0013:        gl_packageconfig = d.getVar('PACKAGECONFIG_GL', expand=True)
 0014:        with open("/tmp/marcotest", "w") as f:
 0015:            print(gl_packageconfig, file=f)
 0016:        d.appendVar('PACKAGECONFIG', ' ' + gl_packageconfig)
  *** 0017:}
 Exception: TypeError: can only concatenate str (not "NoneType") to str

The patch removes the python() function to fix this and adds the
gstreamer1.0-plugins-base dependency to have access to the gl plugin.
Signed-off-by: Marco Felsch<EMAIL_ADDRESS>

Merged in master:
82abc2bb..fb71293f  master -> master


Add back in TRUA

TRUA went live in early January 2024.
https://www.denvergov.org/files/assets/public/v/1/housing-stability/documents/trua-program-flyer-ensp.pdf
Kathleen investigating values currently.
Adding to "Scoping" so we do not forget!


Investigate Google Maps API

Output: identification of Google Maps (or other maps) API and signals we can supply to GPT

For Kedar once he accepts GH invite


chore: bdd-ghfjxy-import-1585221729 to 0.0.1

chore: Promote bdd-ghfjxy-import-1585221729 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Unhandled exception when start Engine, only in Release mode UWP app

It work fine on Debug, but when Release this exception occurred

Can you let me know if you're using mono.nat 3.0.2 or newer?
https://github.com/alanmcgovern/Mono.Nat/releases/tag/release-v3.0.2
That should've been fixed a while back!

Can you let me know if you're using mono.nat 3.0.2 or newer?
https://github.com/alanmcgovern/Mono.Nat/releases/tag/release-v3.0.2
That should've been fixed a while back!

I'm not install Mono.Nat library, it's include in MonoTorrent 2.0.5

If you explicitly add a reference to  Mono.Nat  3.0.2 then it'll probably fix the issue.
MonoTorrent was probably compiled against a slightly older version of mono.nat and so the explicit upgrade should fix the issue.


EV3: Say block doesn't work with some inputs

Describe the bug

When using the say block, some values won't work, such as 0, empty text, false. When these inputs are added, the program will still run but never finish. Any sensor with a false value also won't work.

To Reproduce
Steps to reproduce the behavior:

Add a "say" block
Set the parameter to any of the mentioned values
Run the program
See error

Expected behavior

Program says the given input

Screenshots

None of the say blocks in the above screenshot works, the program never finishes and the bot never plays the C note.
Device information

Desktop
Windows 10
Chrome

Additional context

The program can say True but not False
Connecting the block "wait for connection" to the "say" block generates a server error
There is no information on what inputs can be attached to the "say" block

Needs testing whether this is the case for the real robot as well.

Resolved by a GCI student.


Modified documentation examples to encourage use of coroutines

I changed the examples to utilize async functions to encourage usage of the event loop rather than running non-blocking tasks in the thread pool. Biasing toward coroutines for routes, renderers, and even dependencies (Depends()) avoids overhead for smaller tasks and reduces contention for thread resources for important tasks to make use of it. This is cautioned here FastAPI Tips and here FastAPI Concurrency Just encouraging good practices 👍.

First of all, thanks for using fasthx and also contributing to it!
The topic you brought up has a lot of nuance, there's a reason why the FastAPI docs have a quite long, dedicated page for this. I'll need to think about whether it's a good idea to accept this PR (with some change requests because not everything has been updated, e.g. examples/) or not. Here are some of my immediate thoughts:

If this micro-optimization should be promoted anywhere, I feel the right place for it would be the FastAPI docs. Notice however that the FastAPI examples also use sync functions for good reason: it makes the examples easy to consume, it removes some unnecessary complexity, and it also prevents the potential incorrect use of async route functions (where one could put a lot of sync business logic into an async route and block the asyncio event loop). Basically sync is the easy and safe choice.
The routes and dependencies in these examples are very simple, so in these cases you are technically right, adding async would result in a really tiny optimization in exchange for some code complexity. But in actual applications routes don't look like this and often sync tools are used. So actually, in projects I work on, I always recommend people to use async if the route or dependency needs to await something, and use plain sync functions otherwise. This approach is especially important if there are junior to low senior devs in the team, because this rule is very easy to follow and it's also the "safe practice". It also happens to be the default recommendation in the FastAPI docs
If the proposed change is accepted, will anyone have the question: "why is this async?" If the answer is yes, then it's best to keep the examples as they are.

As you can see, I'm not really in favor of this change, but I also don't like rejecting reasonable contributions, so I'll think about this a bit more and wait for your thoughts regarding my concerns above.

Thanks again for taking the time and effort to contribute to the project!
I thought about this a bit more, but for the reasons above I still think it's best not to go ahead with this documentation update.


selfdrive/modeld/modeld.cc: vipc_client_main no frame when running uiview.py on stock master (and webcam)

Describe the bug

Run uiview.py on lastest master, receive console spam selfdrive/modeld/modeld.cc: vipc_client_main no frame and corrupted video. This happens with and without webcam compile and launch options.
OS Version
Ubuntu 20.04
openpilot version or commit
05f606c8121c89990225ff873c2779fcb3790ead
Additional info
No response

This just means modeld is timing out on receiving frames, which will happen if camerad isn't running at a consistent 20Hz. If it's otherwise working, you can ignore it.


Add on is not compatible with this version of Kodi

I'm using Kodi 20.1 nexus, when I try to install 2.0.25 add on plugin zip, I get an error saying 'Input Stream Adaptive - add-on is not compatible with this version'.
I don't want to install Kodi 19 again, is there any work around for this?

check 2.3.4 with fixes


transport/file: delete suite tmp dir at teardown

The transport/file common suite test generates a temporal directory; It is used to store the go-git client command and some links to it: git-upload-pack and git-receive-pack.
This directory is not deleted at the test teardown, so every time we run a test, we pollute "/tmp".
This patch adds a teardown function for the suite that deletes the temporal directory.
It also calls the teardown of the embedded fixtures.Suite, which is probably what we want also.
I have also simplify the call to ioutil.TempDir as it already uses the default tmp dir if no dir is provided.

Codecov Report

Merging #266 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #266   +/-   ##
=======================================
  Coverage   76.54%   76.54%
=======================================
  Files         111      111
  Lines        7559     7559
=======================================
  Hits         5786     5786
  Misses       1148     1148
  Partials      625      625

Continue to review full report at Codecov.

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


Fix grade tasks on Windows

Current Behaviour
Running ../../gradlew lint from an implementation folder doesn't work on Windows and crashes the gradle build:
A problem occurred configuring root project 'rust'.
> Could not create task ':__build_ockam\ockam_0'.
   > The task name '__build_ockam\ockam_0' must not contain any of the following characters: [/, \, :, <, >, ", ?, *, |]

Proposed Changes
This PR changes up how paths are handled building the gradle tasks. Instead of using bash(sh?)-isms and hardcoding / as the path seperator, use the platform's separator and use platform-agnostic methods to read directory contents. This lets it work on both UNIX systems and Windows.
Checks

[x] All commits in this Pull Request are signed.
[x] All commits in this Pull Request follow the Ockam commit message convention.
[x] I accept the Ockam Community Code of Conduct.
[x] I have accepted the Ockam Contributor Licence Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the ockam-network/contributors repository. (It is here)

(having a bit of a night with the commit lint, sorry)

@BlackHoleFox awesome, thank you for fixing this!
Could you also enable the windows targets in this Github Workflow. That way, we'll get a test in CI
https://github.com/ockam-network/ockam/blob/develop/.github/workflows/gradle.yml#L25

oh I didn't see that, good idea. I enabled both 2016 and 2019 server in the matrix.

@BlackHoleFox Thank you for an awesome first contribution!! 🎉
I made a minor trailing space edit and merged in #2246.

@BlackHoleFox I had to undo some of this, for the time being, in https://github.com/ockam-network/ockam/commit/07c6c0df17cd908722263869e5f6f7e6aef0854e since it was breaking some of the Elixir builds in CI
Here's an example case that breaks:
cd implementations/elixir && ../../gradlew build

I'll explore more in my morning ... for the time being an undo was a quick fix to stop CI from failing.

@mrinalwadhwa Sorry about that, ouch. I don't have Elixir setup at all locally so I just ran the Rust jobs. I was kind of hoping CI would make sure that I didn't break the system :sweatblob:

@BlackHoleFox oh ya, not your fault at all ... CI should've caught it.
We have some things to fix there - I filed https://github.com/ockam-network/ockam/issues/2248.
In case you have time to explore this ... and want an easy setup ... this will give you the same docker environment CI is running it.


How can I train two or more differnt ForecastDFDataset at the same time?

I am working with data that consists of multiple CSV files with the same characteristics for each column but different collection environments. Since combining individual CSV files into a single dataset creates an inappropriate dataset at the merging point, I would like to know how to create ForecastDFDataset objects from multiple individual CSV files and combine them together for training at once. Is there a way to combine the generated ForecastDFDataset objects into one or to put multiple ForecastDFDataset objects into the trainer after model? Such as 'train_datasets' in below
self.trainer = Trainer( model = self.model,     args = self.training_args,     train_dataset = train_datasets,     eval_dataset = eval_dataset,     )

I am working with data that consists of multiple CSV files with the same characteristics for each column but different collection environments. Since combining individual CSV files into a single dataset creates an inappropriate dataset at the merging point, I would like to know how to create ForecastDFDataset objects from multiple individual CSV files and combine them together for training at once. Is there a way to combine the generated ForecastDFDataset objects into one or to put multiple ForecastDFDataset objects into the trainer after model? Such as 'train_datasets' in below self.trainer = Trainer( model = self.model, args = self.training_args, train_dataset = train_datasets, eval_dataset = eval_dataset, )

I also face this issue and my solution is to use ConcatDataset from torch to combine these ForecastDFDataset objects.

I tried the method you suggested and it seems to work as intended.
I was thinking of a difficult method, but I had no idea there was such a simple way.
Thank you very much @Dylan0211 !

Hi @yhlee52 @Dylan0211
This functionality is built into ForecastDFDataset -- it supports distinguishing time series by IDs. You can add an ID column (calling it "id" for example) to each of your CSV files (each CSV receiving a unique ID value) before you concatenate them, and then use the id_columns = ["id"] parameter to point to this column when you instantiate ForecastDFDataset. Internally ForecastDFDataset will use ConcatDataset to separate the time series.

Hi @wgifford , it is very helpful features! I will try to fix my codes to handle my data with the arg. Thank you!


results show just for 7 past days

this code worked fine and give back results by --querysearch from 2009 to 2019, but now it only gives me tweets for 7 days ago.
I also do changes in https://github.com/Jefferson-Henrique/GetOldTweets-python/issues/230 but it doesn't work.

Having the same issue, I was able to use your tool for one day but then when I tried running the same script the next day it would not return anything past 1 week :( not sure why?

Can say nothing without debug.log

how do i get a debug.log?

Just add --debug option and redirect to a file:
GetOldTweets <your-options-go-here> --debug > debug.log

Command: GetOldTweets3 --querysearch "American Airlines" --since 2018-02-15 --until 2018-02-19 --maxtweets 10 --debug > debug.log
debug.log
output_got.csv is empty

I can get the tweets using exactly the same query. Possibly, your IP is banned by Twitter. Can you try from a different IP/host?

Tried on a aws vm seems to work fine as well seems to be an ip block. I'm trying to collect a large amount of tweets for a school project is there anyway to stop getting IP blocked?

Me personally not :-)

FWIW, if you aren't seeing the expected results a day or so after using it successfully: Twitter may throttle your IP address temporarily when they detect automated scraping.  It appears they analyze daily activity and will limit you for a while, then remove the limit after a day or so.  As of my last investigation, Twitter did this using a combination of IP address and user agent, so if you can't change your IP address, randomizing the user agent may help
Edit I see GetOldTweets3 does attempt to randomize UA per run.  Investigating...
More info in this SO issue


Document what needs to be tested prior to launching to web stores

Create a document on what needs to be tested prior to launching to web stores.  For now, this document can include manual tests (until all our integration tests are ready)

Document is here:
https://docs.google.com/document/d/1ush2mxUSmqQ2tR_yJ5lvLs9mwQ3oPsvmED6GGQgdwxo/edit#heading=h.uy93p1gcnxkv
@gwpenn and @zahoriea to review; and for us to thoroughly test according to it prior to launch. :)

I'm marking this issue complete as we now have the document.  We will gradually be improving on the document over the next coming months but this issue is no longer blocking public launch.


Remove support for .NET 4.0

Also, remove the reflection shim designed to cover over API differences in .NET 4.0 and 4.5.

The .NET Core build failed. Our AppVeyor config doesn't actually dump the errors to the log correctly, so you'll need to re-run that part of the build locally to get the errors. Sorry about the inconvenience. (This will get better when we can migrate to MSBuild 15 for all our build stuff instead of having this split build system.)

The nuproj files also need to be updated to remove the references to net40, but aside from that, LGTM.

.nuspec files updated. Also removed cruft in Config.cmake and all usages of the NET45 constant.

Merge into master in commit 31211e10.


Can I get rid of type and just have the name reference the type mappings?

No because spaces in variable name might become a problem so we need to actually leave it like so


fixed asset pipeline

The problem was with this commit, which moved symlink tasks from after assets:precompile hook to before assets:precompile hook.

This change is

Coverage remained the same at 82.449% when pulling 8766790fd34dd483232f3ee132d9b3fd72c72cf0 on alleycat-at-git:hotfix/rails_assets into 885e0e2a13ad110e81cae2c0427d9d62b9489236 on shakacode:master.

Thanks @alleycat-at-git
Previously, coveralls wrote…
>
> [![Coverage Status](https://coveralls.io/builds/6303807/badge)](https://coveralls.io/builds/6303807)
>
> Coverage remained the same at 82.449% when pulling **8766790fd34dd483232f3ee132d9b3fd72c72cf0 on alleycat-at-git:hotfix/rails_assets** into **885e0e2a13ad110e81cae2c0427d9d62b9489236 on shakacode:master**.
>

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Fix(backend): Wrong error message while resetting the password fixed,  changed from id to email

#637

@neok Thank you for the PR! 🎉
In future, please comment on the Github issue before opening a PR. It ensures that we can organize our efforts more effectively and that other users know that you are already working on this issue.


Implement /dns and /resolve

Add a rudimentary implementation of the /dns and /resolve endpoints; putting it out there already, as due to the similarity of these two endpoints I'm not 100% sure how much we want to "condense" their inner workings.
This upgrades or conformance suite stats from
170 passing
50 pending

to
176 passing
44 pending

seems that I've missed a test - I'll leave this one here as a draft and tinker with it some more

the curious thing is that only the /dns tests fail on Windows, while the /resolve ones pass, even though they both use the same internal machinery :thinking:; why does Windows not resolve ipfs.io?

in the end the issue was that the domain_resolv crate just doesn't read the DNS server addresses in Windows; the docs for ResolvConf::default (which is used by the StubResolver) state:
XXX This currently only works for Unix-y systems.

the solution was to use the ipconfig crate in order to read the DNS configuration in Windows and to provide that information to the StubResolver manually.

Cc https://github.com/rs-ipfs/rust-ipfs/issues/6

bors r-

bors r+


Add queueMicrotask method to JSI

Summary:
Changelog: [internal]
Context
Microtasks are an important aspect of JavaScript and they will become increasingly important in the hosts where we're currently using JSI.
For example, React Native is going to adopt an event loop processing model similar to the one on the Web, which means it would need the ability to schedule and execute microtasks in every iteration of the loop. See https://github.com/react-native-community/discussions-and-proposals/pull/744 for details.
JSI already has a method to execute all pending microtasks (drainMicrotasks) but without a method to schedule microtasks this is incomplete.
We're currently testing microtasks with Hermes using an internal method to schedule microtasks (HermesInternal.enqueueJob) but we need a method in JSI so this also works in other runtimes like JSC and V8.
Changes
This adds the queueMicrotask to the Runtime API in JSI so we have symmetric API for microtasks and we can implement the necessary functionality.
The expectation for JSI implementations is to queue microtasks from this method and from built-ins like Promises and async functions in the same queue, and not drain that queue until explicitly done via drainMicrotasks in JSI.
This also modifies Hermes and JSC to provide stubs for those methods, and the actual implementation will be done in following diffs.
Differential Revision: D54302536

@rubennorte this opens the road for this?

https://github.com/facebook/react-native/issues/42742

@rubennorte this opens the road for this?
https://github.com/facebook/react-native/issues/42742

@efstathiosntonas yes! The plan is to enable the new event loop in the new RN architecture soon, which will unblock WeakRefs in Hermes.

@rubennorte thanks for the info, so this is targeting exclusively on new arch?

@rubennorte thanks for the update, so this is targeting exclusively on new arch?

Yes, that's right.

This was committed in https://github.com/facebook/react-native/commit/036f47ebc4cb372e13788c2498dcbf3c88379a1d


Use pre-encoded audio files

Have airhornbot use DCA0 files, which are basically repeating chunks of
---------------------------------------
| uint16 opus frame size | opus frame |
---------------------------------------

until the song is over

Saves a few MB
No gopus dependency
Less CPU on boot due to no encoding

🆗


typeError in react-a11y check

if you set dots: true then it throws
Uncaught TypeError: Cannot read property 'children' of undefined
traceable to
/lib/dots.js:40

The issue doesn't exist anymore. Please feel free to request reopen if you disagree.


Save conversation to local storage

Save the user's chat to local storage. When the user opens the sidepanel, check a chat exists and if it does, give the user the option to continue the chat or start a new one.

Done in https://github.com/joshkent94/BrowseGPT/pull/7


Performance issue

Using lm-format-enforcer makes generating take 3x longer for me, am I doing something wrong?
With: Took 67.46 seconds
Without: Took 22.94 seconds
class TweetGenFormat(BaseModel):
    tweet: str
    tweet_quality_reasoning: str
    rating_1_to_9: float
    sounds_awkward: bool
    is_about_ai: bool
    is_about_climate_change: bool
    list_of_topics: list
    # when_to_post: datetime
    # tweet_url: HttpUrl
    # tweet_url: str

def generate_tweets():
    prompt = 'Generate a great tweet. Respond with a json object.'
    prompt_whole = get_prompt_whole(prompt)
    parser = JsonSchemaParser(TweetGenFormat.model_json_schema())
    prefix_function = build_transformers_prefix_allowed_tokens_fn(tokenizer, parser)
    batch_size = 16
    tokens = tokenizer(
    # prompt_template,
    [prompt_whole] * batch_size,
    return_tensors='pt'
    ).input_ids.cuda()

    start = time.time()
    generation_output = model.generate(
        tokens,
        do_sample=True,
        temperature=0.7,
        top_p=0.95,
        top_k=40,
        max_new_tokens=2**10,
        prefix_allowed_tokens_fn=prefix_function,
    )
    print(f'Took {time.time() - start:.2f} seconds')
    start = time.time()
    generation_output = model.generate(
        tokens,
        do_sample=True,
        temperature=0.7,
        top_p=0.95,
        top_k=40,
        max_new_tokens=2**10,
        # prefix_allowed_tokens_fn=prefix_function,
    )
    print(f'Took {time.time() - start:.2f} seconds')

$ nvidia-smi
Fri Dec  8 17:41:43 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.23.08              Driver Version: 545.23.08    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA A100-PCIE-40GB          On  | 00000000:00:10.0 Off |                    0 |
| N/A   23C    P0              34W / 250W |  39322MiB / 40960MiB |      0%      Default |
|                                         |                      |             Disabled |
+-----------------------------------------+----------------------+----------------------+
|   1  NVIDIA A100-PCIE-40GB          On  | 00000000:00:11.0 Off |                    0 |
| N/A   24C    P0              39W / 250W |  37567MiB / 40960MiB |      0%      Default |
|                                         |                      |             Disabled |
+-----------------------------------------+----------------------+----------------------+

There are a few reasons for this type of behavior. One thing to make sure - is the length of the result the same with and without the enforcer? Tokens per second is the correct apples to apples comparison metric. Can you print that as well?

All the other libraries I tried didn't have batch processing (@mhillebrand).
Using the hf pipeline seems pretty slow for some reason, time scales with batch size.
Pipeline - Batch size: 1, time: 6.89s
Generate (schema) - Batch size: 1, time: 6.28s
Generate (no schema) - Batch size: 1, time: 6.01s
--------------------------------------------------------------------------------
Pipeline - Batch size: 2, time: 13.03s
Generate (schema) - Batch size: 2, time: 7.00s
Generate (no schema) - Batch size: 2, time: 6.82s
--------------------------------------------------------------------------------
Pipeline - Batch size: 4, time: 25.84s
Generate (schema) - Batch size: 4, time: 8.33s
Generate (no schema) - Batch size: 4, time: 9.24s
--------------------------------------------------------------------------------
Pipeline - Batch size: 8, time: 51.42s
Generate (schema) - Batch size: 8, time: 12.22s
Generate (no schema) - Batch size: 8, time: 14.00s
--------------------------------------------------------------------------------
Generate (schema) - Batch size: 16, time: 12.87s
Generate (no schema) - Batch size: 16, time: 15.06s
--------------------------------------------------------------------------------
Generate (schema) - Batch size: 32, time: 15.15s
Generate (no schema) - Batch size: 32, time: 17.66s
--------------------------------------------------------------------------------
Generate (schema) - Batch size: 64, time: 18.58s
Generate (no schema) - Batch size: 64, time: 17.24s
--------------------------------------------------------------------------------
Generate (schema) - Batch size: 128, time: 25.47s
Generate (no schema) - Batch size: 128, time: 23.68s
--------------------------------------------------------------------------------
Generate (schema) - Batch size: 256, time: 35.83s
Generate (no schema) - Batch size: 256, time: 31.43s

Code:
for i in range(100):
    batch_size = 2 ** i
    prompts = [prompt] * batch_size
    if batch_size <= 8:
        start = time.time()
        output_dict = hf_pipeline(prompts, prefix_allowed_tokens_fn=prefix_function,
                max_new_tokens=2**6,
                )
        # print("output_dict:", output_dict)
        print(f'Pipeline - Batch size: {batch_size}, time: {time.time() - start:.2f}s')

    start = time.time()
    tokens = tokenizer(
        # prompt_template,
        [prompt] * batch_size,
        return_tensors='pt'
    ).input_ids.cuda()

    # # Generate output
    generation_output = model.generate(
        tokens,
        do_sample=True,
        temperature=0.7,
        top_p=0.95,
        top_k=40,
        max_new_tokens=2**6,
        prefix_allowed_tokens_fn=prefix_function,
        # prefix_allowed_tokens_fn=custom_prefix_function,
    )
    # print("generation_output:", generation_output)
    output_shape = generation_output.shape
    # print("output_shape:", output_shape)
    decoded_output = tokenizer.decode(generation_output[0], skip_special_tokens=False)
    # print("decoded_output:", decoded_output)
    print(f'Generate (schema) - Batch size: {batch_size}, time: {time.time() - start:.2f}s')
    start = time.time()
    tokens = tokenizer(
        # prompt_template,
        [prompt] * batch_size,
        return_tensors='pt'
    ).input_ids.cuda()

    # # Generate output
    generation_output = model.generate(
        tokens,
        do_sample=True,
        temperature=0.7,
        top_p=0.95,
        top_k=40,
        max_new_tokens=2**6,
        # prefix_allowed_tokens_fn=prefix_function,
        # prefix_allowed_tokens_fn=custom_prefix_function,
    )
    # print("generation_output:", generation_output)
    print(f'Generate (no schema) - Batch size: {batch_size}, time: {time.time() - start:.2f}s')
    print('-' * 80)

Hi, from the last performance table, it looks like schema and no-schema take roughly the same amount of time. So it doesn't look like the format enforcer is a major performance hurdle (again, I would print time-per-token, not just total time, as result length may differ). Do you interpret the results differently?

Generation in the above case gets cut off after 32 tokens, so it should generate roughly the same number of tokens between the different generation modes.
You are right that there doesn't seem to be a difference between the model.generate calls, but using it with pipeline seems to not support batching. For the last example with batch size 256 that would likely mean 50x slower generation when using it with pipeline. If that is expected or irrelevant I don't mind if we close the issue.

@noamgat have you considered using Cython to enhance performance?
I've been experimenting with refactoring some of the utility parsers (like Sequence and Union) to create a parser for a DSL, and the performance improvement is significant, even with my basic C/C++ skills.
The main downside is managing the build script, but this has been relatively minor. Below is an example of how I structured it (implementation details omitted):
cdef class CharacterLevelParser:
    def __init__(self):
        pass

    def __cinit__(self):
        pass

    cpdef CharacterLevelParser _clone(self):
        """
        Clone the current parser.

        Returns:
            CharacterLevelParser: A clone of the current parser.
        """
        pass

    def add_character(self, new_character: str) -> CharacterLevelParser:
        new_char = ord(new_character[0])
        return self._add_character(new_char)

    cpdef CharacterLevelParser _add_character(self, char new_character):
        pass

    def get_allowed_characters(self) -> str:
        cdef list char_list = [chr(c) for c in self._get_allowed_characters()]
        return "".join(char_list)

    cpdef cset[char] _get_allowed_characters(self):
        pass

    cpdef bint can_end(self):
        """
        Check if the parser can end.

        Returns:
            bool: True if the parser can end, False otherwise.
        """
        pass

    cpdef object cache_key(self):
        """
        Get the cache key for the parser.

        Returns:
            object: The cache key.
        """
        pass

Have you explored similar optimizations, or do you have any thoughts on integrating Cython into the project?

@tom-doerr I am skeptical that this is more relevant to huggingface's framework itself. Their logits processor with the same workload is just 10 times slower than vllm or exllamav2. One observation is that if I force the cuda to sync in the beginning and the end of a vllm's logits processor than it runs as slow as the huggingface, while if I do the same in huggingface then no speed difference is observed. I am not sure what this reveals though because logits masking inherently requires at least one cuda sync(since your mask is created on CPU.)


Remove oldest unused tab rather than leftmost tab?

It'd be cool if this could track a "last updated" timestamp on each tab and remove the tab that was last used, rather than the leftmost one?
This is how Mobile Safari used to get rid of tabs (when it enforced a limit)

Yeah, that's a great idea.

This should get published as version 1.0.0 in the next hour or so @gingerbeardman. Thanks for the suggestions!

aaaand I just published 1.1.0  because I think I introduced a bug around closing too many tabs at once.

now 1.2.0

Nicely done!


Status Code mismatch in doFederatedAuthFlow function

Hello Thomas,
var fedmaster = URI.create("https://app-ref.federationmaster.de");
var self = URI.create("https://diga.cankado.com");
// this URI must be listed in your entity statement, configure as needed
var redirectUri = URI.create("https://diga.cankado.com/auth/callback");
// those MUST be at most the ones you requested when handing in the entity statement
var scopes = List.of("openid");
var sektoralerIdpIss = "https://gsi-ref.dev.gematik.solutions";
I was able to fix the configuration issues and now the error has changed to
org.opentest4j.AssertionFailedError: response was:
(GET https://gsi-ref.dev.gematik.solutions/auth?request_uri=urn%3Ahttps%3A%2F%2Fdiga.cankado.com%3Ab1772942c5011653&user_id=) 400 ==> expected: <302> but was: <400>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:563)
at com.oviva.ehealthid.auth.AuthenticationFlowExampleTest.doFederatedAuthFlow(AuthenticationFlowExampleTest.java:161)
at com.oviva.ehealthid.auth.AuthenticationFlowExampleTest.flowIntegrationTest(AuthenticationFlowExampleTest.java:105)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
it seems user_id is blank , but dont know why

Hello Thomas,
I tried to do a quick fix the above error by adding a test kvnr value as follows
var formSubmit = action + "?" + new String(urlEncoded, StandardCharsets.UTF_8) + "X110536543";
then the api call was 302 and that code worked and in next step
// ==== 4) exchange the code for the ID token
var token = step2.exchangeSectoralIdpCode(code, verifier);
here it raised an error
java.lang.IllegalArgumentException: The private key (JWK) must not be null
at com.nimbusds.jose.crypto.MultiDecrypter.(MultiDecrypter.java:178)
at com.nimbusds.jose.crypto.MultiDecrypter.(MultiDecrypter.java:155)
at com.oviva.ehealthid.auth.internal.steps.TrustedSectoralIdpStepImpl.exchangeSectoralIdpCode(TrustedSectoralIdpStepImpl.java:71)
at com.oviva.ehealthid.auth.AuthenticationFlowExampleTest.flowIntegrationTest(AuthenticationFlowExampleTest.java:113)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Generated jwe object is given below
jweObject.getHeaders() = {"epk":{"kty":"EC","crv":"P-256","x":"Z3r7gM3IUvh36vZ7-QUoYL62lwLj6LDniA8-Dtb62V0","y":"RTZgD4eDYgFd6kn1S4qnFO-ex4O6LNvUARmqm6Vb-Vc"},"kid":"v1838Rx-Fvxjfp6rmQgjRPr9wdJo4v2dBv6_NBbq_z4","cty":"JWT","enc":"A256GCM","alg":"ECDH-ES"}
relyingPartyEncKeySupplier.apply(jweObject.getHeader().getKeyID()); this code is returning null

I am also getting this issue in my test, I see the label has been added as invalid.  What was the resolution? @sureshcankado


Tracker fixes and improvements for effects and pasting

Please check if the PR fulfills these requirements

[ ] The commit message follows our guidelines
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Improvement

What is the current behavior? (You can also link to an open issue here)
Could not see the new effect editor in tracker view,
Placing a new effect in piano roll would default to 000.
New
Copying a selection was not ModPlug compatible
Pasting a partial selection overwrote other parameters

What is the new behavior (if this is a feature change)?
Selecting any effect column in tracker will open the effect editor
Placing an effect in piano roll will keep the last selected effect data for quick placement (or 0)
New
Copying a selection includes spaces for non overwriting selection and is ModPlug compatible

GBStudio hUGETracker paste format compatible with...
ModPlug Tracker  XM
|   01......
|   ........
|   .....022
|   .....201

Pasting merges without overwriting where there are spaces
Mouse release on tracker grid will select a region (cheap drag select)
Remake tracker "activeField" when changing patterns for fast past in place

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
It uses a bit of a hack to preserve effect parameter data, as it seemed any effect other than arpeggio 0 would clear the parameters. Dispatch changes twice works.
Tracker selection rectangle still redraws the entire tracker, which remains slow when shift arrow keys.

Other information:
Want to add!
Increment / decrement all values in a selected region column (ctrl & ctrl Shift with + - or scroll wheel)
(this feature is over 50% of my music workflow)
Edit 2: Added!
Does not set field to use when moving with just arrow keys
but clicking or any selection works flawlessly.

Merged these commits from pautomas (without prettify and callback solved twice)
https://github.com/pau-tomas/gb-studio/tree/rulz_tracker_improvements_followup
https://github.com/chrismaltby/gb-studio/commit/69d24afcd28b6a14ca5ee6b01dfdb39fa6b15cb5
Selection preview changes on mouse move, and a fair bit faster!
Notes:
Holding shift and the arrow key can still bog down lower end systems, but it is faster.
Arrow key navigation does not let you copy, or ctrl scroll a single value unless you press shift (selection mode).
Grander scheme
Trominal's template .uge instruments must be added for release!
Note step size needs a button! Pautomas worked on one.
Note step is how far the cursor should advance when you press a note, current 1, i use 0 in openMPT, some like larger spacing for timing.

I think I got the ctrl+a to select a channel from OpenMPT. Is it not common? I wonder if we could have ctrl+A once to select a channel and if you do it again it selects the whole pattern.

OpenMPT uses Shift + 5 apparently 🤷
Ctrl Q and A are transpose note (specifically note)... I've always preferred Ctrl+- or scroll.
Milky uses Ctrl A to select the whole pattern
I like the Double tap Ctrl A idea, to select whole pattern, we will need to remove the transpose bindings for that.

Ugh, I forgot about transpose (and don't know where I got the idea for ctrl+a to select a channel, then 🤣). Tracker keybindings are nuts.


Installation instructions are a bit confusing

In README and http://progrium.viewdocs.io/dokku/installation it is proposed to run installation command this way:
$ wget -qO- https://raw.github.com/progrium/dokku/v0.3.14/bootstrap.sh | sudo DOKKU_TAG=v0.3.14 bash

Dollar sign and sudo shows that this command should be run as non-root user. At the same time it is proposed to install dokku on fresh ubuntu box, i.e. with no explicitly created users.
When I followed documentation first time, I've manually created user 'dokku' because of these considerations, and tried to run installation command as this user, which is definitely not correct. As whole script is fed to sudo, it is the same as running everything as root.
So I'd propose to either modify this line to
# wget -qO- https://raw.github.com/progrium/dokku/v0.3.14/bootstrap.sh | DOKKU_TAG=v0.3.14 bash

or explicitly specify under which user it should be run.
Thank you.

You can/should run the command as whatever the existing user is. On Digital Ocean, that is just the root user, while on AWS that is the ubuntu user. The bootstrap script is meant to be run by the root user, so piping the script input to sudo is quite fine.

Then there shouldn't be $ sign in the command, as by common convention it means non-root user.

Running it as the root user doesn't break things. I run it as a non-root user - albeit one with sudo access - and that is quite fine. Was that not the case for you?

@josegonzalez I just had no non-root user directly after VPS setup, so was wondering if I should create some non-root user to run this command. Thank you for the commit!