Optimize optimized paragraph layout

This PR optimizes the optimal paragraph layout used when justification is enabled. Typst uses the Knuth-Plass (TeX) algorithm for producing optimal paragraphs. This dynamic programming algorithm minimizes a cost function across the paragraph.
Background
To compute these costs, we must determine the widths of many line attempts. In the original TeX implementation, computing these widths was simple: Simply add up the precomputed widths of the individual boxes and glues in the line. This process can even be further accelerated by building an accumulated list of the widths up to a certain point. Then, we can get the width of a range through subtraction in $O(1)$.
Unfortunately, this approach of computing widths falls down with proper text shaping. Shaping two subruns of text and summing up their widths doesn't necessarily give the same width as shaping the whole run due to various contextual adjustments and replacements that can occur.
For this reason, Typst must properly build a line to know its width. We do reuse shaping results from an initial shaping pass if possible, but even if that works out, there is still quite a bit of overhead in the line computations.
As observed in https://github.com/typst/typst/issues/1030#issuecomment-1528464333, for a paragraph with $n$ words, on average $m$ words line per line and hyphenation enabled, we make roughly $\alpha m n$ line attempts (with $\alpha \approx 3$ due to hyphenation). For example, lorem(200) on normal A4 paper results in 7775 line attempts. This is costly.
Approach
This PR brings the number of line attempts in the exact same lorem(200) scenario down to 444, using the following approach:

Observe that directly taking the width of a sliced line still gives us not the exact width, but still a good approximation of it.
Build a TeX-like accumulated list for the paragraph to very cheaply compute width and cost estimates for lines.
Optimize the paragraph with these estimates (linebreak_optimized_approximate).
Compute the real, non-approximate cost $c$ of the resulting paragraph.
Optimize the paragraph with exact layout, but pruning the search space using $c$ as an upper bound on the possible cost (linebreak_optimized_bounded).

We use the upper bound $c$ in two ways:

When a line's exact cost plus that of its optimal predecessor exceeds the bound, we do not consider it as a candidate predecessor for future lines and don't even push it into our dynamic programming table.

When a line attempt was underfull, we know that any shorter line will have higher cost. Thus, we can skip any line attempt for which the optimal predecessor cost plus the line's lower bound exceeds the paragraph's upper bound. (The exception are lines with negative spacing, which we exclude.)

Results
This optimization is most effective for short paragraphs. The longer the paragraph gets, the less likely it is that a single bad line already exceeds the upper bound. As a result, we build more bad lines. The graphs below show how many lines we build with and without the bound approach.
The X axis denotes the number of words $n$ and the Y axis shows the number of lines we built to find the optimal layout of the document lorem(n) (with hyphenation enabled). The left graph is zoomed in to $n \leq 1000$ while the right graph is zoomed out to $n \leq 3000$. Both show the same data.
For 50 words, we are ~20x as efficient. For 250 words, we are at ~15x. For 500 words, it's still ~10x. For 1000 words, we are down to ~3x. And for 2000 words, it's only ~1.15x. Close to 2500 words our bound fails (because the estimate was bad and we produced an invalid line [^1]).

Performance
Finally, here are some raw performance measurements on a document with 100,000 words spread across lots of page runs and a paragraph size of 300 words. That's roughly 2.5 paragraphs per page, so on the longer side as far as paragraphs go.

Source code
#set heading(numbering: "1.")
#set par(justify: true)

#outline()

#{
  lorem(100000)
    .split()
    .chunks(300)
    .map(c => c.join(" "))
    .chunks(50)
    .map(c => {
    pagebreak()
    [= Heading]
    c.join(parbreak())
    })
    .join()
}

Version
Execution Time

0.11.1
5.75s

main (e90c30903)[^2]
5.57s

PR (9cbc92dce)
0.68s

Closes https://github.com/typst/typst/issues/1030
[^1]: This failure case can also happen with fewer words. But we try to avoid it by allowing less space shrinking in approximate layout. If it occurs, it's as if the optimization didn't exist, but no further bad things happen.
[^2]: Interestingly, main gives barely any improvement over 0.11.1 even though the document has lots of page runs and is thus multi-threading-friendly. Runtime seems to be bounded by something else, perhaps memory.

binary searching candidates

This works for simple (first-fit) linebreaking. I thought about doing it but skipped it for now because for simple linebreaks the bottleneck is prepare, not linebreak.
For optimized linebreaking it's much harder. I think it is possible to skip even more lines with something in that direction, but it would need a lot of care to implement it correctly.

median words per line calculation and median interword spacing  ... from the previous text block to approximate the following

I'm not sure this would help much. We want an optimal solution after all. The approximation pass is already very fast and the exact pass can't really do such things.


AppStore Review

Apologies for making an issue, I wanted to contact you to ask about your app approval.
I recently decided to move my fork from TestFlight to AppStore but it got rejected because they wanted to know how the token is verified (screenshot below).
Did you encounter this issue? If so how did you resolve it?
Thanks

Hi @Plus1XP
I've never seen this before, perhaps providing a Key URI sample would help.
Like otpauth://totp/Company:email@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Company


POC outlet filters

Closing, but if you feel like this is still applicable please reopen and resolve conflicts! 👍

Closing, but if you feel like this is still applicable please reopen and resolve conflicts! 👍


Too many scans in receiver queue: Dropping scans!

Hi!
My customer start R2000 and start to get R2000 point data, but after 1 hour, the R2000 driver post err:Too many scans in receiver queue: Dropping scans!
They use TCP request to get R2000 data.
How to solve this issue?
Thannk you!

@Heavydpan you can ignore the message. It just says that there are too many scans (100 in this case) in queue and not all of them will be processed. Probably I will remove the log message if it is annoying.

But after this message showed, they can't receive any data.
Is it other issue?

OK then it is an issue. I don't think not receiving data is directly related to the log message.

Hi,
But after this message showed, they can't recieve any data.
Is it other issue?
---Original---
From: "Harsh<EMAIL_ADDRESS>Date: Fri, Jun 5, 2020 15:39 PM
To<EMAIL_ADDRESS>Cc: "Mention"<mention@noreply.github.com>;"Perpperl and Fuchs sensors and<EMAIL_ADDRESS>Subject: Re: [PepperlFuchs/ROS_driver] Too many scans in receiver queue: Dropping scans! (#16)
@Heavydpan you can ignore the message. It just says that there are too many scans (100 in this case) in queue and not all of them will be processed. Probably I will remove the log message if it is annoying.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

"not all of them will be processed" Does that mean that not all measured data will be available in subscribing nodes?

Yes the device sends data at a faster rate than the ROS driver can process it. So the driver maintains a queue internally. Once the queue becomes full, oldest scan data is dropped.

How many scans are getting dropped? And how big can the delay between capturing the data on the device and publishing it as laser-msg become? I think that removing the warning is not the right way to deal with that problem as it hides a potentially serious issue.

@Heavydpan there have been changes in the past couple of months. Could you please pull the master branch and try again?

Feel free to reopen the issue if this is not solved for you.

Feel free to reopen the issue if this is not solved for you.


Test watcher from the CLI

The watcher tests are fully stubbed. This test verifies it actually works from the CLI.
Fixes #537.

// @vdemedes

Updated.

:+1:


analysis of the initialization of a local variable

The analysis of initialization of local variables does not take into account try-catch without a finally block. Also, conditions that will always work are not taken into account.
void main() {
  int x;

  // this condition is not taken into account when evaluating the initialization of x
  if (1 == 1) {
    x = 10;
  }

  try {
    // this initialization is not taken into account when evaluating the initialization of x
    x = 1;
  } catch (e) {}

  print(x); // static error

  int y;

  try {
    y = 2;
  } finally {}

  print(y); // no errors
}

I think the behavior is intended and not incorrect.
A catch block means that an error inside the try block prior to the assignment could be caught, so you can exit the try/catch normally without initializing the variable.
A finally block by itself does not allow you to exit the try/catch normally if the body throws.
The means that either the try body threw, but then so does the try/finally,
or the try body completed normally, and then so does the try/finally, but then the initialization was definitely performed.
The flow analysis does not try to predict which conditions are always true. It assumes that if there is a condition and branch in the code, it's probably because the author intended it to branch. Even if the flow analysis cannot see a way into a block, it will still assume there is one, and consider flow out of that block.
Also, it's not always clear which expressions are definitely true. An a == a expression should be true, but if it's user-written class, it might not. Or if it's double and the value is NaN.


initial refactoring of mscolab tests for xdist, solves #681

Hopefully I have now all blocking connections fixed.
On my system it is amazing fast.
pytest -n auto --dist loadfile --max-worker-restart 0 mslib
346 passed, 17 skipped, 3767 warnings in 280.17s (0:04:40)
pytest -n auto --dist loadscope --max-worker-restart 0 mslib
346 passed, 17 skipped, 3725 warnings in 266.82s (0:04:26)


When you try to align text, the text actually disappears.

Jodit Version:  3.2.24
When you highlight your text and click 'align center or right' the text actually disappears.

m..can't reproduce in the test editor..

I can reproduce it in the jodit playground page.
https://xdsoft.net/jodit/play.html?enter=BR


[stdlib] StaticString documentation and tests

Update the documentation (and tests) for null-terminated static strings.

The isASCII API has been tested (since Swift 1.1) for both representations.
https://github.com/apple/swift/commit/4f38403edaecb11b2102a654be98d45f83e25ea1

Cc: @natecook1000

@swift-ci Please smoke test

@natecook1000 Thanks for reviewing this. Please merge if possible.

@natecook1000 Does anyone else need to review this?

@swift-ci Please smoke test and merge


Missing html content, with online status

Hi, my problem is missing the contents of the html page, when added script. This only when the server is online.  Example

Test visible

  <?php
    include './server_status.php';
    ?>

Test invisible

Thanks!

I pushed a change which should fix the issue.
The issue lied where I used exit() rather than a break statement.
Please try again.

Many thanks for fix. And thanks for script :) Unfortunately now there are not enough servers. Although the game is amazing.


addMarker won't work with @Input values for Angular on Android only

Hi @dapriett, thank you so much for this awesome module.
I'm using this module in my app and work perfectly on ios.
If I set static values for latitude and longitude(such your example), my marker works great.
However, If I set the latitude and longitude with @Input, the map shows in the correct position, but the function addMarker won't show any icon/image.
The weirdest thing is that I don't have any bug. It shows all directions and values on console.dump, but I can't see the marker...
Am I the only one with this issue?
PS: The issue is on Android only and with @Input values
@Component({
    selector: "my-map",
    template: `
<GridLayout rows="auto,*">
    <Button text="Add Marker" (tap)="addMarker($event)"></Button>
    <MapView row="1" (mapReady)="onMapReady($event)"
        [latitude]="latitude" [longitude]="longitude"
        [zoom]="zoom" [bearing]="bearing"
        [tilt]="tilt" [padding]="padding"
    ></MapView>
</GridLayout>
    `,
})
export class MyMap {
    @Input() latitude: any;  //works for the map only
    @Input() longitude: any; //works for the map only
    // latitude: number = -33.86; //works fine
    // longitude: number =  151.20;  //works fine

    zoom: number = 8;
    bearing: number = 0;
    tilt: number = 0;
    padding: Array<number> = [40, 40, 40, 40];

    coreMarker: any;

    @ViewChild("MapView") mapView: any;

    public addMarker(args) {
        console.log("Setting a marker...");
        console.log('latitude', this.latitude); //shows correctly
        console.log('longitude', this.longitude); //shows correctly

        var marker = new mapsModule.Marker();
        //marker.position = mapsModule.Position.positionFromLatLng(-33.86, 151.20); //works
        marker.position = mapsModule.Position.positionFromLatLng(this.latitude, this.longitude);
        marker.userData = {index: 1};
        this.mapView.addMarker(marker);
        // console.dump(marker); //shows correctly
    }

    public onMapReady(args) {
        console.log("onMapReady");

        this.mapView = args.object; // I've tried using nativeElement, same issue
    }

Component <my-map> usage:
<my-map [latitude]="address.latitude" [longitude]="address.longitude"></my-map>

PS: Other functions such as addCircle and addPolyline have the same issue.

Thanks for that @DomGaud. Ir worked for me.


pkg/test/framework.go: protect AddToFrameworkScheme with mutex

If more than 1 test concurrently ran AddToFrameworkScheme,
there would be concurrent map read/write errors. By using a mutex,
we can ensure that there is not more than 1 function modifying the
scheme at the same time.

LGTM

Fixed

lgtm


Add ability for extensions to reload

Add the ability for extensions to tell that they need a reload. Once done, change the way CMS reloads.

Related to https://github.com/microsoft/azuredatastudio/issues/5846.


HUE is using de the default YARN queue.

I am using Hue 4.5 (Open Source), each time I am trying to launch a Scala, Spark, PySpark query editor, it ends up with following error : The Spark session could not be created in the cluster
Indeed, when I connect to my Livy Server I can see the following error : Failed to submit application_1570430934619_0007 to YARN : Application rejected by queue placement policy.
I changed the default queue policy on my Hortonwork Hadoop Cluster. How can I specify the YARN Queue to use in Hue so it can call the Livy API correctly (ie with the good queue to use) ?

repeat of #460 - i messed up the PR thinking that notebooks were separate from the main pyspark page.  desktop/libs/notebook/src/notebook/connectors/spark_shell.py
{
"name": "queue",
"nice_name": _("Queue"),
"help_text": _("The YARN queue to submit to, only in cluster mode (Default: default)"),
"type": "string",
"is_yarn": True,
"multiple": False,
"defaultValue": "default",
"value": "",
}
i'll see if i can get some time to fix the pr and get this configurable.

Thank you alericmckearn.
What I have just done to fix this issue is changed the default value for YARN name queue is the file desktop/libs/notebook/src/notebook/connectors/spark_shell.py
So now I have:
{
      "name": "queue",
      "nice_name": _("Queue"),
      "help_text": _("The YARN queue to submit to, only in cluster mode (Default: default)"),
      "type": "string",
      "is_yarn": True,
      "multiple": False,
      "defaultValue": 'root.LAB',
      "value": 'root.LAB',
}

How can I change Default Livy parameter when it is creating the Spark Session with Scala Notebook ?
Is this related to : https://issues.cloudera.org/browse/HUE-2727
Thank you


Create Distance Field.shader

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

Context: We needed this stubbed shader on SS2's project, figured we could add it to the repo of stubbed shaders.


Feature Request: Pretty json keymap

Can add a defualt keymap for pretty json ? thanks

In general I'm against the idea of default keymaps being provided by packages because you have the danger of collisions when users have installed multiple packages.
For example, a possible keymap for Prettify might be shift-cmd-j, which isn't used by vanilla Atom. But it is used by the atom-script package that I happen to have installed.
I don't have alt+cmd+j mapped to anything on my machine (but you might). I can't know for sure what is mapped on any given user's machine. The best option IMHO is to provide commands for actions in a package so that users can easily map their favorite bindings to those commands using their personal keymap.cson file.
@lengxf If alt-cmd-j is an ok keymap for you, then do this:

Open your keymap.cson file by going to Keymap... in your Atom menu.
At the bottom of the file, add the following:

'atom-text-editor':
  'alt-cmd-j': 'pretty-json:prettify'

NOTE: If you already have an atom-text-editor key in that file, you should add the alt-cmd-j binding under that key, instead of adding a duplicate entry for it.

Please let me know if that makes sense and works for you. Thank you for the issue report and for using pretty-json :)

thank you for your response , It works for you. Before this request, I have done, I try  'Pretty Json:Prettify' and 'pretty json:Prettify' and so on  many times. so I make this request.


Automate deployment

Set up github action(s) to build/deploy to azure webapp.

deployment automated on push to master to opensync.live


Replace drawable with display

Remove drawable.
Implement fmt::Display for World.
Do some imports polishing.

nice


[tlse] tls support for telemetry ceilometer, aodh

Public/Internal service cert secrets and the CA bundle secret can be passed to configure httpd virtual hosts for tls termination. The certs get direct mounted to the appropriate place in etc/pki/tls/certs/%s.crt|key and a CA bundle to /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem . Job deployments for bootstrap/cron get the CA bundle added if configured.
Depends-On: https://github.com/openstack-k8s-operators/lib-common/pull/428
Jira: https://issues.redhat.com/browse/OSPRH-4197

Currently the volumes and volume mounts in both ceilometer and aodh are not correctly created. Working on it.

Looks like this is hitting the same issue as Emma's and mine PR, where the infra-operator resources are trying to pull incorrect images: https://logserver.rdoproject.org/10/310/15348e87af91e03038ba3320535d3553e9ace717/github-check/podified-multinode-edpm-deployment-crc/89a8845/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/pods/memcached-0/memcached-0-describe

We had the same issue here: https://github.com/openstack-k8s-operators/telemetry-operator/pull/284 . It should be fixed, so next run should get the CI further.

We had the same issue here: #284 . It should be fixed, so next run should get the CI further.

The issue is resolved in https://github.com/openstack-k8s-operators/openstack-operator/pull/643

@vyzigold
Can you please check the current files for tls kuttl test, and guide me what steps need to be done in order to run tls kuttl? Right now there's only the certificates creation, nonetheless when I run the whole stack of kuttl tests, the tls one is not detected at all.
Thanks!

I believe you need to edit this file as well: https://github.com/openstack-k8s-operators/telemetry-operator/blob/0d4f1ece1c02a7f30179a09efbc8da2c70ce5563/kuttl-test.yaml#L27 . I hope that's enough to get them executed.

I believe you need to edit this file as well:
https://github.com/openstack-k8s-operators/telemetry-operator/blob/0d4f1ece1c02a7f30179a09efbc8da2c70ce5563/kuttl-test.yaml#L27
. I hope that's enough to get them executed.

Yep, that was it. Thanks a lot!

I read through the PR once again and I don't have anything to add. Thank you.
/approve
/lgtm


add unit test for email service

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines
Coverage Δ
Complexity Δ

...jb/sunrise/services/impl/ReCaptchaServiceImpl.java
90.00% <100.00%> (+70.00%)
4.00 <0.00> (+2.00)

... and 1 file with indirect coverage changes


Memory leak when running tests.

Pulse Version
1.0.0-beta15
Laravel Version
10.48.2
PHP Version
8.3.3
Livewire Version
3.2
Database Driver & Version
No response
Description
Getting out of memory when running tests locally and in pipelines.
PULSE_ENABLED is set to false.
Steps To Reproduce
Install Laravel pulse, run test.

Sorry, my bad, not actually added PULSE_ENABLED false.


Correction to initial values for gamma distribution

Gamma distribution with shape (a) and scale (s) has
"mean and variance are E(X) = as and Var(X) = as^2" according to the help file for dgamma.
Solving for $a$ and $s$ gives
$ a = V(x) / E[x]$
so using method of moments, use a starting value for $a = var(x) / mean(x)$.
Solving for $a$ then gives
$  a = E[X] / s$
and a moment estimator is then $a = mean(x) / s = mean(x) / (V(x)/Mean(x) = mean^2/V(x)$
We have
if (dist$dist == "gamma") {
dist$start <- list(
scale = stats::var(x) / mean(x),
shape = mean(x)^2 / stats::var(x)^2
)
so it appear we have and extra square in the last line. This should read
if (dist$dist == "gamma") {
dist$start <- list(
scale = stats::var(x) / mean(x),
shape = mean(x)^2 / stats::var(x)
)
i.e. remove the ^2 from the var(x) in the initial value for shape.
Fortunately, the fitdist() function appears to be robust to making the shape parameter too small so no obvious user impact.

done


Improve options UI for smaller resolutions

The options UI takes up way too much space on smaller monitors. We need to improve this UI.

Replace the theme with the default Fluent theme ? In compact mode.
https://docs.avaloniaui.net/docs/basics/user-interface/styling/themes/fluent => Changing theme density
But the Fluent theme looks worse on Mac.
There are a few 3rd party themes, like the Material theme:
https://github.com/AvaloniaCommunity/Material.Avalonia

I'm actually thinking about moving the options to a new window or modal behind i.e. a gear icon. I don't think the options need to be shown the entire time on the main screen, especially if users don't change them all that often.

Completed with #108


README Issues

I think the first sentence below the screenshot should be updated from:
A visualization to for sinusoid wave forms and fourier transforms.
to:
A visualization tool for sinusoid wave forms and fourier transforms.
Or, instead of "tool", maybe it should be "gui" to match the sentence above the screenshot.
Also, I think the superscript for the footnotes should go at the end of the word (or perhaps the end of the sentence), instead of at the front of the word.
Awesome project, thanks for sharing!

Thanks for the feedback! Glad you liked it!
On Fri, Jan 26, 2024 at 3:29 AM Martynas Vasiliauskas <
@.***> wrote:

I think the first sentence should be updated from:
A visualization to for sinusoid wave forms and fourier transforms.
to:
A visualization tool for sinusoid wave forms and fourier transforms.
Also, I think the superscript for the footnotes should go at the end of
the word (or perhaps the end of the sentence), instead of at the front of
the word.
Awesome project, thanks for sharing!
—
Reply to this email directly, view it on GitHub
https://github.com/PalmerTurley34/fourier-transforms/issues/1, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AOF36W6O2GNPIFZGWYFHRTDYQOARNAVCNFSM6AAAAABCL5XTN2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDCOJWHE4DANY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


  // Create a one-time-use function to evaluate the initializer and invoke
  // it immediately.
  if (field.kernel_offset() > 0) {
    parsed_function = kernel::ParseStaticFieldInitializer(zone, field);
  } else {
    parsed_function = Parser::ParseStaticFieldInitializer(field);
    parsed_function->AllocateVariables();
  }
  ...
}

If the isolate is running in Dart 2.0 mode, we should never fall back to source based pipeline!

The source based pipeline has been deleted and it is not possible to fall back to it.


bump terpnetwork resources

These commits will not be in effect for main-net moroccco-1 until after our planned upgrade this weekend

@reversesigh hi! can this be merged? or should we create fresh PR? Thank you! :)


Can't get spotipy.Spotify() for multiple users

Hi! I asked this questions on StackOverflow but I didn't get an answer:
I'm creating a Telegram Bot to get Spotify stats with Spotipy. This script will be used by multiple people, but after a user give authorizations he gets my stats. I have no idea why this happens.
def get_auth(message):
    username = str(message.from_user.id)
    scope = "user-top-read"
    auth = SpotifyOAuth(
        redirect_uri="http://localhost:8080",
        username=username,
        scope=scope
    )
    return auth

No problem with the code above, Bot redirects the user to the link (auth.get_authorize_url()) and get authorization successfully.
def get_client(message):
    auth = get_auth(message)
    spotify = spotipy.client.Spotify(
        auth_manager=auth,
        client_credentials_manager=SpotifyClientCredentials()
    )
    try:
        auth.get_auth_response(open_browser=False)
        print(spotify.me())  # Just for cache
        return spotify
    except Exception:
        return None

I think the problem is here, the variable returned is always referred to my Spotify account (and if I withdraw my authorization, it raises an error, although the user logged in with his account). This function has to return the right variable, can anyone help me? You can read the full code on this link

There are several problems with your code:
spotify = spotipy.client.Spotify(
        auth_manager=auth,
        client_credentials_manager=SpotifyClientCredentials()
    )

You are assigning two different authorization managers to Spotify—SpotifyOAuth and SpotifyClientCredentials—which doesn't make sense. You only need one authorization manager. If you need to access user data, then you should use SpotifyOAuth or SpotifyPKCE. Don't ever use the oauth_manager or client_credentials_manager parameters of Spotify.init. @stephanebruckert we should deprecate these parameters and emit a warning when anyone tries to use them; they just create confusion.
Also, is everyone who uses your script supposed to get information about your Spotify account, instead of their Spotify account?
The user that the instance of Spotify returned by get_client is authorized for is which ever one logs in to their Spotify account after opening the URL provided by auth.get_auth_response in their browser. If, when you open the authorization URL, you are immediately redirected without being given a change to log in to your account, then it is because you are already logged in to your Spotify account on your browser. If you want to log in with a different account, then set show_dialog to True in SpotifyOAuth.init.

and if I withdraw my authorization, it raises an error, although the user logged in with his account

What do you mean by this? Please be very specific about what you are doing in order to "withdraw my authorization".

Also, you should only create one instance of Spotify for each user. It looks like you're creating a new instance each time top_artists is being called and then re-authorizing the user. That doesn't make any sense. You only need to authorize the user once.

Hi. Thank you for answering me and sorry for the inaccuracy of the question.

You are assigning two different authorization managers to Spotify

Okay, so the line should be spotify = spotipy.client.Spotify(auth_manager=auth).

The way that spotipy works is that it will automatically start the authorization process for you when you make a call to an endpoint, such as Spotify.me

So I can keep only a Spotify.me() and it start automatically the authorization process, right?

Is this cache file the same for everyone that uses your app?

No, I pass an username in SpotifyOAuth(), so at the first authorization it creates .cache-<username>. But if I have the username of the user who wants access to his data, how I get the right .cache? How do get_cached_token() work in this case, with multiple caches?

What do you mean by this? Please be very specific about what you are doing in order to "withdraw my authorization".

Don't mind about that. I mean that if I delete the authorization on Spotify (Home > App > Remove access) and other users try to access, it gives an error, because it probably use my data stored in .cache-<myusername>.

Also, is everyone who uses your script supposed to get information about your Spotify account, instead of their Spotify account?

No. They should get data about their account.

You need to provide more information about what you are trying to do. I'm very lost.

Simply this bot, once it gets authorization of the user and cached in .cache-<username>, should give some user data (not of mine). There are many sites that do that, I wanted to implement that on a Telegram Bot.

Also, you should only create one instance of Spotify for each user

Perfect, my question is how I should get data of a specific .cache, instead of creating an instance every time. Is there a function for do that or I should do it manually?

If you provide the correct username when creating an instance of SpotifyOAuth, then SpotifyOAuth.get_cached_token should only access the cache file containing that username. You should print str(message.from_user.id) to the console to check that it is what you expect. You can also print SpotifyOAuth.username and  SpotifyOAuth.cache_path to see where the authorization manager is looking for the cached authorization information.
You don't need to make a call to Spotify.me() if your app is not actually using the data that it returns. Just remove it entirely and spotipy will go through the authorization process if necessary when you make a call to current_user_top_tracks or current_user_top_artists or any of the other endpoints that your app ends up using.

Okay, one last thing: Once I get token = SpotifyOAuth.get_cached.token()["access_token"] how should i do to get the Spotify() instance? I did spotipy.client.Spotify(auth=token) but it doesn't seem work.

You can get some inspiration from this example Flask app https://github.com/plamere/spotipy/blob/master/examples/app.py - it handles multiple users

When calling SpotifyOAuth you need to specify a cache_path, otherwise it will use the same cached token every time, therefore the one from the previous user:
https://github.com/plamere/spotipy/blob/94e164385e1b64f99e45053c6bdd638770c982e2/examples/app.py#L52

The name of the cache path needs to have a unique ID representing the user. In the case of the example it's a session ID. In the case of your bot, could it be a discord ID?
https://github.com/plamere/spotipy/blob/94e164385e1b64f99e45053c6bdd638770c982e2/examples/app.py#L43

I followed your advices and read the example, but it still doesn't work and I don't know why. You can take a look at the code here. I've been trying for days now and even with your help it doesn't seem to work, what am I doing wrong?

Did you add the print statements I suggested? What did you find? It would be extremely helpful if you actually did that.

The print are correct. I noticed an error that can be helpful:
[Errno 98] Address already in use
Traceback (most recent call last):
  File "/home/cele/.local/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 210, in handler_worker
    await self.loop.run_in_executor(
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "main.py", line 46, in authorize
    spotify = new_client(message)
  File "/home/cele/dev/spotistats/src/client.py", line 28, in new_client
    print(spotify.me())
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 1158, in me
    return self._get("me/")
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 291, in _get
    return self._internal_call("GET", url, payload, kwargs)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 221, in _internal_call
    headers = self._auth_headers()
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 212, in _auth_headers
    token = self.auth_manager.get_access_token(as_dict=False)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 484, in get_access_token
    "code": code or self.get_auth_response(),
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 439, in get_auth_response
    return self._get_auth_response_local_server(redirect_port)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 405, in _get_auth_response_local_server
    server = start_local_http_server(redirect_port)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 1227, in start_local_http_server
    server = HTTPServer(("<IP_ADDRESS>", port), handler)
  File "/usr/lib/python3.8/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/usr/lib/python3.8/http/server.py", line 138, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
----------------------------------------
Exception happened during processing of request from ('<IP_ADDRESS>', 60682)
Traceback (most recent call last):
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 1186, in do_GET
    state, auth_code = SpotifyOAuth.parse_auth_response_url(self.path)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 372, in parse_auth_response_url
    raise SpotifyOauthError("Received error from auth server: "
spotipy.oauth2.SpotifyOauthError: Received error from auth server: access_denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.8/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.8/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.8/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/lib/python3.8/http/server.py", line 427, in handle
    self.handle_one_request()
  File "/usr/lib/python3.8/http/server.py", line 415, in handle_one_request
    method()
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 1190, in do_GET
    self.server.state = err.state
AttributeError: 'SpotifyOauthError' object has no attribute 'state'
----------------------------------------
Server listening on localhost has not been accessed
Traceback (most recent call last):
  File "/home/cele/.local/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 210, in handler_worker
    await self.loop.run_in_executor(
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "main.py", line 46, in authorize
    spotify = new_client(message)
  File "/home/cele/dev/spotistats/src/client.py", line 28, in new_client
    print(spotify.me())
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 1158, in me
    return self._get("me/")
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 291, in _get
    return self._internal_call("GET", url, payload, kwargs)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 221, in _internal_call
    headers = self._auth_headers()
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/client.py", line 212, in _auth_headers
    token = self.auth_manager.get_access_token(as_dict=False)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 484, in get_access_token
    "code": code or self.get_auth_response(),
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 439, in get_auth_response
    return self._get_auth_response_local_server(redirect_port)
  File "/home/cele/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 417, in _get_auth_response_local_server
    raise SpotifyOauthError("Server listening on localhost has not been accessed")
spotipy.oauth2.SpotifyOauthError: Server listening on localhost has not been accessed

Can it be an error with the Redirect URI? SPOTIPY_REDIRECT_URI enviroment variable and redirect URI on Spotify for Developers are the same (http://localhost:8080), but after the user give the authorization,  often the site give "ERR_CONNECTION_REFUSED"

The reason for these errors is probably because the automatic authorization process does not work in the environment that your app is running in. What environment is it running in? Is it running on a server?

Can it be an error with the Redirect URI?

Yes, I think the issue is related to the redirect URI. It shouldn't be "http://localhost:8080" if the app is running on an external server. The redirect URI should somehow redirect back to your bot.  Do you know how to do this? If you don't, than I can't help you because I've never used the telegram bot API before.

What environment is it running in? Is it running on a server?

It's running on my laptop with Arch Linux, so there shouldn't be problems, but the page with "Close" button is never loaded.

It shouldn't be "http://localhost:8080" if the app is running on an external server.

It is running on my PC and i read in the code that with localhost (and a port specified) I don't need to copy and paste the URL the browser is redirect to on the terminal.

a callback function in your code should be executed after Spotify redirects back to your app

What do you mean? What needs to be executed? I have a button that create a new spotipy.Spotify() instance for the user and store his data in a cache if the bot have the authorization, is not the same thing?

"OSError: [Errno 98] Address already in use" means that there is another process already using port 8080 (which is what appears in your redirect URI). You need to find that process and kill it. Alternatively, restart your computer. See https://stackoverflow.com/a/39557155/12394554
"spotipy.oauth2.SpotifyOauthError: Received error from auth server: access_denied" means that, after you opened the authorization URL in the browser and the user logged in to their Spotify account, the user tapped "cancel" instead of "agree", meaning that they denied your app access to their Spotify account.
It's hard for me to provide more help because I don't really understand how telegram bots work. You need to contact someone in the telegram community and ask them if it is possible to implement OAuth authorization.

Okay, thanks for the help, I'll ask to someone in Telegram community to fix this problem (if possible)

Specifically, you need to ask if you can setup a callback URL that redirects back to your application.


music-assistant exited code 132 (installation with docker)

What version of Music Assistant has the issue?
2.0.0b130
What version of the Home Assistant Integration have you got installed?
No response
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

[X] Yes

The problem
from version 2.0.0b130 onwards the docker container creates the following error, "music-assistant exited code 132", while version 2.0.0b129 is ok.
Music assistant server keeps restarting endlessly giving the same error.
How to reproduce
installazione MA Server su docker (debian12)
Music Providers
nessuno
Player Providers
non è un problema di lettori
Full log output
No response
Additional information
No response
What version of Home Assistant Core are your running
2024.4.2
What type of installation are you running?
Home Assistant Core
On what type of hardware are you running?
Generic x86-64 (e.g. Intel NUC)

I can't spot any changes (perhaps maybe a dependency upgrade) that could explain this nor have we received any other reports about this. Did you also try to restart your docker host completely as well as any other running containers to rule out some sort of conflict ? Maybe also try with a clean data volume just as a test to rule out some sort of data corruption ?

No system updates, and I also tested with completely empty "data" folder. I have to test with MA only, but I don't understand the conflict, since it works correctly with version 2.0.0b29.

You are the only one reporting this problem so that is why you need to do some extra tests to rule out other causes.
That it worked with b129 can just be a coincidence.

It can't be a coincidence. I have installed and followed MA 2.0 since it was born and up until version b129 I never had any problems. From b130 onwards it no longer worked. I tried backwards starting from b125, which worked, up to b129, which worked. As soon as I installed the b130 it didn't work anymore.
What tests can I do to help?

I think you need to look at your hardware/OS setup. When no one else is experiencing this problem it points to something with your particular environment. I see you are running HA core on an Intel platform. If you used Proxmox for example you could run HAOS and perhaps solve your issue. If you don't want to do that then google the error code. My quick look suggested it could be an incompatibility with the underlying OS you are using. As Marcel said there were dependencies updated in beta130 which can't be avoided.

I've inspected the changelog completely what changed between 129 and 130 and there literally is nothing that would explain this, except maybe, just maybe, the dependency upgrade or orjson or Pillow as those are relying on OS and cpu specific instructions.
So, going to ask this again. Did you test with a fresh install on beta 130 (so no data persisted) ?
Did you test with all other containers (or running processes that may interfere) shutdown as a test ?
Did you reboot the entire docker host ?
What kind of hardware is it ? Recent Intel cpu ? Or somewhat dated maybe ?
Does it crash right after start ? There is no logging at all generated ?
In that case it might be python itself in the docker container that couldn't even start.
Do I understand it correctly that you are running Home Assistant Core directly on the Debian host ?
That is a bit uncommon. You either have a docker host that just runs the bare minimal requirements to run the docker images (or virtualization engine) OR you run the apps on the docker host, combining them may bring you in trouble, let alone the added overhead of administrating it.

I checked and in fact my processor does not support avx. (Intel(R) Atom(TM) CPU N2600 @ 1.60GHz).
Could there be another way to make the evolution of MA2.0 compatible with older machines too?
The machine with 2 GB of RAM performs very well with everything installed on it.

Ok that is also less than the required RAM for running anything more than just MA. Surprised it lasted this long…

I checked and in fact my processor does not support avx. (Intel(R) Atom(TM) CPU N2600 @ 1.60GHz).
Hmm, that is a 12 years old CPU - my best guess is that is that one of our dependencies now requires some new instruction set (such as avx) that your cpu is lacking.

So nothing can be done to maintain compatibility with older machines that do not support AVX instructions, functioning up to version 129?

We don't have control over the dependencies unfortunately. Dell Optiplex or similar mini computers can generally be found pretty cheaply. I just bought one with 16GB RAM and a 256GB SSD for $110.

Too bad, I really liked MA 2.0. I will stop at version 129. For now I have no intention of renewing the machine. Thank you.

So nothing can be done to maintain compatibility with older machines that do not support AVX instructions, functioning up to version 129?

Well, at this point we do not even know WHAT broke your system. Is it a dependency within our code ? Some combination of factors ? docker version ?
So, I just wanted to ask if you are 100% confident that it stopped working between 129 and 130 ?

Also, do you have any docker log output when you try to start it ?
Because just a little bit of logging could even help finding out the root cause. Without more info, its like searching for a needle in an haystack

I really don't know how to find docker errors. I tried with "docker container logs music-assistant -f" but it always stops on this info "DEBUG (ThreadPoolExecutor-0_11) [soco.data_structures_entry] soco.data_structures_entry imported".
I'm not gripped, almost fast, on Linux". If you can give me a tip on how to catch the error I could be more helpful.
However, I confirm that the problem is from version 130 onwards. I also tried with the latest 136.
The problem is not the Docker version. I updated the whole system only after having the error.

Can you share the output of cat /proc/cpuinfo?

I put the result of the query in the attached file. Thank you.
cpuinfo.txt

I really don't know how to find docker errors. I tried with "docker container logs music-assistant -f" but it always stops on this info "DEBUG (ThreadPoolExecutor-0_11) [soco.data_structures_entry] soco.data_structures_entry imported".

OK, that is interesting because that means that at least its partially starting and then crashes.
I could introduce a safe mode option that doesn't load any providers by default so you can see if at least the core starts with that and then enable stuff one by one until it crashes

@Africa67 I'm just so curious:

Can you please remove sonos player provider on b129 and try to update to >b130?
you've  mentioned that you emptied the data 'folder'. Maybe something went wrong at db upgrade on earlier release. Can you please delete (after a backup) the whole data volume and create a totally fresh setup from scratch?

To be clear: can you also please attach your docker-compose.yml file or your docker command?

In beta 140 I have added an option to start in safe mode. This will mean that only the Music Assistant core controllers are loaded and nothing else, so no providers will be started, including none of their dependencies (such as soco).
If that starts well, you can start any of the providers by clicking "reload" in the settings (click in the 3 dots).
I hope this will bring something to light which dependency is causing the troubles!
If the core even does not start with safe on, its one of our main dependencies.
You can enable safe mode by running the container with this environmental variable:
MASS_SAFE_MODE
set its value to a boolean true value, like "1" or "true"

I tested version 141 with safe mode. All services are OK except SONOS.
As soon as SONOS starts, the server goes into error.
But I tried to restart with version 129 (working) and the SONOS service is deactivated. Starting again with the 141 with SONOS deactivated, without safe mode, the same error occurs.

Are you also running Home Assistant on this same machine ?
It would be very interesting to see if that also crashes when you try to add the Sonos integration (which is using the same soco package as MA does)

I tried adding SONOS integration, I got the setup message and then the "no devices found on the network" message. No problem in HA.

Thanks for testing that. Would you feel comfortable testing the new HA beta as well ? 2024.5.0b0

Grazie per averlo testato. Ti sentiresti a tuo agio nel testare anche la nuova beta HA? 2024.5.0b0

HA I prefer not to touch I don't have backup copies to rely on

@Africa67 please confirm this is fixed.

Nothing done. Installed version 143 but crashes. It starts and stops and then restarts.

OK, in that case make sure you don't use the Sonos provider. So start in safe mode, remove sonos provider and after that it should work.
Let's close this duplicate issue report and track progress in one single issue:
https://github.com/music-assistant/hass-music-assistant/issues/2142


[Question]: How to pass chat_history to Router Component

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
I am working on building an orchestrator for a chat system using llamaIndex Query pipelines. I need a little help with a special case where I need the Router to select an Agent based on items mentioned in the users query.
In the pipeline the query is initially passed to a function to see if there's multiple versions of an item in the db, if there's multiple versions of the item we pull those ids and append them to chat_history
Following this at the routing step if there's multiple versions present I want the Router to select a certain agent that will prompt the user to clarify their query by picking one of the items.
To do this, when we set-up the LLM single selector I intend to update it's prompt to contain the context_str as well as the modified chat_history.
The problem I am running into is that the Router has access to the query and a list of agents but I don't know how I can access the chat_history at this level. It needs access to this object to properly select the correct Agent. Is there a way to override this to pass in the history?
Below is how I've set-up the pipeline.
def orchestrator(
    *,
    is_verbose: bool = False,
) -> Orchestrator:
    event_queue: Queue[OrchestratorEvent] = Queue()
    callback_manager = get_callback_manager(event_queue=event_queue)

    # Agents
    agents: list[OrchestratorAgent] = [...list of agents]

    if len(agents) == 0:
        raise ValueError("No agent type specified")

    selector = LLMSingleSelector.from_defaults(llm=instance_configs.llm)
    router = RouterComponent(
        selector=selector,
        choices=list(map(lambda n: n.description_prompt, agents)),
        components=typing.cast(list[QUERY_COMPONENT_TYPE], agents),
        verbose=is_verbose,
    )
    query_rewriter = QueryRewriter(
        llm=instance_configs.query_rewriter_llm, callback_manager=callback_manager
    )

    chain = [get_versions, query_rewriter, router]

    query_pipeline = QueryPipeline(
        chain=chain,
        callback_manager=callback_manager,
        verbose=is_verbose,
    )
    return Orchestrator(queue=event_queue, agents=agents, query_pipeline=query_pipeline)

I am trying currently to override the RouterComponent but I am not sure how to go about this.

The chat history can just be part of the query as input to the router
Just need a component to combine the rewritten query with chat history it looks like

(FYI, query pipelines are a little unmaintained, in favor of workflows, which are much more straightforward to work with)
https://docs.llamaindex.ai/en/stable/module_guides/workflow/#workflows

Sorry I don't think I quite understand.
Chat history isn't available at this level. How would i combine chat_history w/ the query?
coming out of the get_versions method? the query_rewriter here is optional I just left that condition out of the code.

I am just working w/ the pipelines for now but i will update to workflows later!

(FYI, query pipelines are a little unmaintained, in favor of workflows, which are much more straightforward to work with)
https://docs.llamaindex.ai/en/stable/module_guides/workflow/#workflows

Will be picking up workflows soon as well!

I looked into setting up storage state but it seems like overkill just to access chat history in this case.
I was hoping there as an elegant solution to access data in the pipeline


FETCH from CURSOR inside a function should be disabled without a destination

Description
SELECT statements included within a function cannot return data to a client. This operation was not blocked with the FETCH CURSOR operation. This commit aim to restrict defining such function.
Issues Resolved
BABEL-4584
Test Scenarios Covered

Use case based - - Included

Boundary conditions - - NA

Arbitrary inputs - - NA

Negative test cases - - INCLUDED

Minor version upgrade tests - - NA

Major version upgrade tests - - NA

Performance tests - - NA

Tooling impact - - NA

Client tests - - NA

Check List

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.001%) to 72.236%

Totals

Change from base Build<PHONE_NUMBER>:
0.001%

Covered Lines:
40403

Relevant Lines:
55932

💛  - Coveralls


feat(twitch): send monthly stats at start of month

:tada: This PR is included in version 1.16.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Use window when defined for global namespace

We hit a snag building this module with Webpack where this was referencing an empty object. This commit checks for the presence of window before referring to this.
This doesn't feel awesome, any thoughts here?

I never learned the Webpack.  My loss since I tend to use a bunch of FB open source stuff :(.  I don't see any harm in this, and I barely maintain this anymore.  Pulling....

Thanks!

As a side note, we'd be happy to help maintain this project. We're getting a ton of value out of it at my company (Viget)

Would it be possible to send this up to npm?

Sorry dude.  I totally spaced.  Done (I added you as a collaborator, comrade, not that that fixes the npm publish goof).

Awesome. No problem at all!


about the distilling process

From your paper I read "To enhance the robustness of the distilling operation, we build halving replicas of the main stackand progressively decrease the number of self-attention dis-tilling layers by dropping one layer at a time, like a pyramidin Fig.(3), such that their output dimension is aligned. Thus,we concatenate all the stacks’ outputs and have the final hid-den representation of encoder." Somehow I failed to locate the corresponding code sections (also as black-boxed in pic below), though I do notice maxpool here which I believe is part of the upper portion op: https://github.com/zhouhaoyi/Informer2020/blob/956ac31c4d0c752b5b71d8884ed5384e88676a11/models/encoder.py#L15
Any clue?

The current version of this framework on github is a simple and fast implementation, without adding stack structure.
We have found in some experiments that adding stack structure can improve the performance of experiments, especially for short-period data.
We will add stack structure on github later, and we will update a new time encoding and a faster implementation of probsparse attention, please look forward to it.

Awesome. Pls keep me posted. Thank you,


Add Light mode and btn to switch to dark mode

Please allow me to work on it!

@AaadityaG go for it!

Assigned issues to me  @Spandan-Bhattacharya

@AaadityaG any updates?

@AaadityaG any updates?

working on it

can i go @Spandan-Bhattacharya

can i go @Spandan-Bhattacharya

Bro can you please give me time, why I raised an issue?
There are are several primary tasks..

Yes @AaadityaG it is assigned to you. But as its a medium task, give the PR by tomorrow.

Yes @AaadityaG it is assigned to you. But as its a medium task, give the PR by tomorrow.

Sorry I will be unable to deliever till today EOD you can assign someone!

Okay

@surendar-05 I am assigning you the issue now.

Please assign this to me under JWOC

any updates @surendar-05

I am unassigning the issue @surendar-05

hello @Spandan-Bhattacharya  i would love to work under JWOC

@Ananyamishra08 Go for it!

hi, i would like to work on this issue

@diyabhandari go for it!

pls , assign me this issue under 'JWOC'

@diyabhandari any updates?

Please assign this issue to me under JWOC.

@diyabhandari any updates?

i will start working on it in an hour or two

Okay

@diyabhandari any updates?

@diyabhandari I would be re assigning the issue in the evening if no updates are recieved

@Spandan-Bhattacharya pls assign me this issue under "JWOC"

@Spandan-Bhattacharya please assign this issue to me

@vishapraj you are assigned the issue.

Please assign this issue to me @Spandan-Bhattacharya

@vishapraj  any updates?

@vishapraj any updates?
Otherwise i will assign this issue to someone else.

Assign this issue to me under JWOC


Empty javadocs

The docs (like https://pkl-lang.org/main/current/kotlin-binding/codegen.html) say to look in the javadocs / kdocs for more info on using the Java / Kotlin libraries, but the javadoc.jar files are essentially empty, like:
https://repo1.maven.org/maven2/org/pkl-lang/pkl-config-kotlin/0.25.1/pkl-config-kotlin-0.25.1-javadoc.jar
https://repo1.maven.org/maven2/org/pkl-lang/pkl-codegen-kotlin/0.25.1/pkl-codegen-kotlin-0.25.1-javadoc.jar
https://repo1.maven.org/maven2/org/pkl-lang/pkl-codegen-java/0.25.1/pkl-codegen-java-0.25.1-javadoc.jar

Hm, that's weird. Thanks for pointing it out.

Hi @jamesward. These libraries are in Kotlin, not Java, so the javadocs are empty. Is it common for Kotlin libs to populate the javadocs jar instead of rely on the sources jar for docs? I checked some Kotlin libs like kolinx.reflect.lite and they had empty javadocs.

While not all Kotlin libraries put the dakka docs into the javadoc.jar it definitely is possible and we do it for example with grpc-kotlin.  This allows us to get the javadocs in sites that pull them from Maven Central, like: https://javadocs.dev/io.grpc/grpc-kotlin-stub/latest

Also note that the javadoc.jar is also empty for the pk-codegen-java library.


Documentation Required

Feature Request

Q
A

New Feature
yes

Summary
Docs are currently absent… They should be present…

The files for the documentation will be added to this repository. But we do not create a separate documentation for this component, we will integrate it in laminas-i18n.

Thanks @froschdesign 👍 - Closing


Implement the Covariance class

I'll starting working on the Covariance class.

@loganchen39 hold off on this for now. I need to go through in my head first the steps that need to be accomplished. There will be quite a few steps. We might have to do a small bit of Forrtan/C++ interface code similar to what was needed by GetValues

@travissluka ok, let me know the steps and let me implement them so I can get familiar. I'm free now. I'll also take a look at the code.

I'm closing this and opening up multiple issues for the individual steps


psycopg2.InterfaceError: connection already closed

Describe the bug
psycopg2.InterfaceError: connection already closed.
Exception or Stack Trace
2020-12-03T00:06:41.150453788Z psycopg2.OperationalError: SSL SYSCALL error: EOF detected
2020-12-03T00:06:41.150457488Z
2020-12-03T00:06:41.150460788Z
2020-12-03T00:06:41.150464188Z The above exception was the direct cause of the following exception:
2020-12-03T00:06:41.150467888Z
2020-12-03T00:06:41.150471088Z Traceback (most recent call last):
2020-12-03T00:06:41.150474588Z   File "/home/site/wwwroot/backend_api/pre_model_scheduler.py", line 56, in start_pre_model_scheduler
2020-12-03T00:06:41.150478088Z     handle_expired_documents()
2020-12-03T00:06:41.150481688Z   File "/home/site/wwwroot/backend_api/pre_model_scheduler.py", line 39, in handle_expired_documents
2020-12-03T00:06:41.150485188Z     documents_to_resend = check_status_in_db()
2020-12-03T00:06:41.150488588Z   File "/home/site/wwwroot/backend_api/pre_model_scheduler.py", line 32, in check_status_in_db
2020-12-03T00:06:41.150492188Z     if res:
2020-12-03T00:06:41.150502488Z   File "/antenv/lib/python3.7/site-packages/django/db/models/query.py", line 272, in bool
2020-12-03T00:06:41.150516188Z     self._fetch_all()
2020-12-03T00:06:41.150519688Z   File "/antenv/lib/python3.7/site-packages/django/db/models/query.py", line 1186, in _fetch_all
2020-12-03T00:06:41.150522988Z     self._result_cache = list(self._iterable_class(self))
2020-12-03T00:06:41.150526088Z   File "/antenv/lib/python3.7/site-packages/django/db/models/query.py", line 54, in iter
2020-12-03T00:06:41.150529288Z     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
2020-12-03T00:06:41.150532388Z   File "/antenv/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1065, in execute_sql
2020-12-03T00:06:41.150535588Z     cursor.execute(sql, params)
2020-12-03T00:06:41.150538688Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
2020-12-03T00:06:41.150541888Z     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
2020-12-03T00:06:41.150544988Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
2020-12-03T00:06:41.150548188Z     return executor(sql, params, many, context)
2020-12-03T00:06:41.150551288Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
2020-12-03T00:06:41.150554388Z     return self.cursor.execute(sql, params)
2020-12-03T00:06:41.150557388Z   File "/antenv/lib/python3.7/site-packages/django/db/utils.py", line 89, in exit
2020-12-03T00:06:41.150562188Z     raise dj_exc_value.with_traceback(traceback) from exc_value
2020-12-03T00:06:41.150565488Z   File "/antenv/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
2020-12-03T00:06:41.150568588Z     return self.cursor.execute(sql, params)
2020-12-03T00:06:41.150571588Z django.db.utils.OperationalError: SSL SYSCALL error: EOF detected
To Reproduce
Create a PostgreSQL database in Azure.
Create a Django App (we are using Django == 2.2) on your local machine.
Use the requirements.txt file that is attached to have all of our project dependencies. (if I need to be more specific for you to understand how to use and modify settings please let me know)
In the settings.py file update the DATABASES default settings to your PostgreSQL settings. (USER, HOST, etc.)
You can set one or two endpoints (in the views.py file) in order to test the app after deployment.
Create a python-based Azure Web App.
Deploy the app to Azure Web App. (we are using CI/CD with Local Git)
Add the attached scheduler file to the main folder. (Based on Django layout it is the folder where the apps.py file is in)
In apps.py file in ready() function add the below lines -

     from < THE_NAME_OF_THE_DJANGO_PROJECT > import pre_model_scheduler

     pre_model_scheduler.start()

Create a table in the database and modify line 28 in pre_model_scheduler.py accordingly.
(You can see in the pre_model_scheduler.py file that we are referring to the Documents table by using the Django ORM.)
Code Snippet
Add the code snippet that causes the issue.
def check_status_in_db():
    """checks in database for pre-model data that has not been updated for x hours"""
    # get data older than the time threshold
    documents_to_resend = []
    time_threshold = datetime.datetime.now() - timedelta(hours=MAX_TIME_AS_PRE_MODEL)
    res = Documents.objects.filter(document_status="pre-model", source__in=[Source.WEB, Source.EMAIL],
                                   upload_date__lt=time_threshold)
    if res:
        documents_to_resend = [{"document_id": r.document_id, "company_id": r.company_id} for r in res]
    return documents_to_resend

Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):

Python Version: Python 3.7
azure-servicebus==0.50.2
Django 2.2

hey @allouzi,
based on your description, I'm wondering it's something related to the Azure Web App not Azure Service Bus.
where is this "pre_model_scheduler.py" -- is there any sample code that you're trying out in our repo?

hey @yunhaoling thanks for your reply regarding to the "pre_model_scheduler.py" below is the structure of project
[project-name]/
├── [project-name]/
│   ├── init.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── [app-name]/
|   ├── [migrations]/...
│   ├── init.py
│   ├── admin.py
│   ├── pre_model_scheduler.py
│   ├── urls.py
│   ├── views.py
│   ├── models.py
│   ├── ...
├── init.py
└── manage.py
and for the sample code
`""""
Scheduler to run as a standalone file
Checks if pre-model status for data has been updated over specified time period - if not resend to queue
"""
import logging
import datetime
from datetime import timedelta
from django.utils import timezone
from apscheduler.schedulers.background import BackgroundScheduler
from backend_api.upload_docs import get_container_name, send_uploaded_document_id_list_to_queue
from backend_api.models import Documents
from backend_api.utils import Source
from backend.settings import DEBUG_FLAG
if DEBUG_FLAG:
from Configuration.environments.dev import MAX_TIME_AS_PRE_MODEL, PRE_MODEL_CONFIG, PRE_QUEUE_CONFIG
else:
from Configuration.environments.test import MAX_TIME_AS_PRE_MODEL, PRE_MODEL_CONFIG, PRE_QUEUE_CONFIG
logger = logging.getLogger(name)
FUNC_IS_RUNNING = False
def check_status_in_db():
"""checks in database for pre-model data that has not been updated for x hours"""
# get data older than the time threshold
documents_to_resend = []
# time_threshold = datetime.datetime.now() - timedelta(hours=MAX_TIME_AS_PRE_MODEL)
time_threshold = timezone.now() - timezone.timedelta(hours=MAX_TIME_AS_PRE_MODEL)
res = Documents.objects.filter(document_status="pre-model", source__in=[Source.WEB, Source.EMAIL],
upload_date__lt=time_threshold)
if res:
documents_to_resend = [{"document_id": r.document_id, "company_id": r.company_id} for r in res]
return documents_to_resend
def handle_expired_documents():
"""handles process of identifying documents that have not been updated in the DB - and resending those to queue"""
documents_to_resend = check_status_in_db()
logger.info(f"SYSTEM \ Documents stuck in pre-model to resend to queue: {documents_to_resend}")
if documents_to_resend:  # if there are documents that are outdated
# resending document_ids to the queue that have expired
for document in documents_to_resend:
container_name, container_errors = get_container_name(document["company_id"])
send_uploaded_document_id_list_to_queue(document_id_list=[document["document_id"]],
queue_name=PRE_QUEUE_CONFIG["queue_name"],
container_name=container_name)
def start_pre_model_scheduler():
"""main listener function - calls function to check for any expired documents"""
global FUNC_IS_RUNNING
try:
FUNC_IS_RUNNING = True
logger.debug(f'SYSTEM \ In start_pre_model_scheduler function.....')
handle_expired_documents()
FUNC_IS_RUNNING = False
except Exception as e:
logger.error(f'SYSTEM \ Error running the pre-model scheduler: {e}', exc_info=True)
def start():
"""start function to run when django server starts"""
logger.debug(f'SYSTEM \ In start function for pre-model listener....')
if not FUNC_IS_RUNNING:
try:
scheduler = BackgroundScheduler()
scheduler.add_job(start_pre_model_scheduler, 'interval', id='pre-model-scheduler',
minutes=PRE_MODEL_CONFIG["time_scheduler"])
scheduler.start()
except Exception as e:
logger.error(f'SYSTEM \ Unable to start the pre-model scheduler: {e}', exc_info=True)
`

Unfortunately , we can't reproduce the issue from our end.

hey @allouzi , I'm sorry I'm not familiar with the django and sql stuff (I work on the Python ServiceBus Sdk), but I could look for someone to help on that.
Is it you're trying to create a django app which connects to a PostgreSQL database in Azure, and you deployed the django app to a Azure Web App
and in your app, you call check_status_in_db periodically which causes you the trouble.
Several questions in my head:

Which PostgreSQL version are you using?
How large is the interval? would it work if setting to a smaller value?
How often does the issue happen, occasionally or always?
would manually reconnect to the database work?

hey @yunhaoling
below answers to your queries :
•             Which PostgreSQL version are you using?
PostgreSQL version = 11
•             How large is the interval? would it work if setting to a smaller value?
Interval -> MAX_TIME_AS_PRE_MODEL = 4, it will work with smaller values.
•             would manually try/catch and reconnect to the database be a workaround?
I don’t think so as it is a ‘SSL SYSCALL error: EOF detected’ DB connection failure so trying to establish a new connection will end with the same result.
How often does the issue happen, occasionally or always? Occasionally

Hi @allouzi
I don't see how your problem is related to the Service Bus SDK? It seems the exception is coming from Django, and I don't even see import in your code that mention SDKs at all.
If you have occasional Django connection issue in Azure WebApp, this repo won't be able to help, you might instead be prefered to open a support ticket to the WebApp team if you feel this has to do with some Azure infra.
If your issue is about SDK, please mention an error that shows a SDK exception so we could make progress and investigation around it. Right now there is not enough for us to help on the SDK side :(.
Thanks,

Hi @allouzi
I don't see how your problem is related to the Service Bus SDK? It seems the exception is coming from Django, and I don't even see import in your code that mention SDKs at all.
If you have occasional Django connection issue in Azure WebApp, this repo won't be able to help, you might instead be prefered to open a support ticket to the WebApp team if you feel this has to do with some Azure infra.
If your issue is about SDK, please mention an error that shows a SDK exception so we could make progress and investigation around it. Right now there is not enough for us to help on the SDK side :(.
Thanks,

Hey @allouzi , how did you manage to fix this?


Missing /proc/sys/kernel/shm

Windows Version
Microsoft Windows [Version 10.0.19045.3803]
WSL Version
<IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[ ] WSL 2
[X] WSL 1

Kernel Version
4.4.0
Distro Version
OracleLinux_8_7
Other Software

oraclelinux-developer-release-el8
oracle-database-preinstall-23c
oracle-database-free-23c-1.0-1.el8.x86_64

Repro Steps

Install Oracle Database following the official instructions.
Modify the entry for the host PC in /etc/hosts to the correct IP instead of <IP_ADDRESS> (or the configuration would fail with another error.)
Configure the database with /etc/init.d/oracle-free-23c configure.

Expected Behavior
Configuration succeeds.
Actual Behavior
Configuration failed with the following fatal error:
[FATAL] ORA-00600: internal error code, arguments: [ksmcsg: failed to get total shm available], [], [], [], [], [], [], [], [], [], [], []
ORA-27300: OS system dependent operation:Cannot open /proc/sys/kernel/shm failed with status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: sskgmgtssa_1

Diagnostic Logs
No response

@PopSlime you are using WSL1 and that's the issue. Try upgrading to WSL2. OracleDB installs/works fine in WSL2.
Sample install log on OracleLinux_8_7:
[root@RIPPER ~]# /etc/init.d/oracle-free-23c configure
Specify a password to be used for database accounts. Oracle recommends that the password entered should
be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
 For details check the logfiles at:
 /opt/oracle/cfgtoollogs/dbca/FREE.
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.

/etc/init.d/oracle-free-23c: line 373: /bin/hostname: No such file or directory
Connect to Oracle Database using one of the connect strings:
     Pluggable database: :1539/FREEPDB1
     Multitenant container database: :1539

Add hostname package before running the installer to get rid of the /bin/hostname: No such file or directory error.

@PopSlime indeed upgrading to WSL2 should fix the issue. Closing since WSL2 is the supported way to do this.


nixos/moodle: use PHP 8.1

Description of changes
Moodle is compatible with PHP 8.1 since the 4.1.2.
https://moodledev.io/general/development/policies/php

Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@ofborg test moodle


BPM control

Hi,
I'd like to use this library and add extra control over the tracks bpm.
Ideally what i want to do is detect the current tempo. Detect the rhythm pattern. Adjust the tempo (or just the bpm with a key tempo control) and play them one on the top of the other.
In other words exactly what a dj does.
Was wondering if you approached this problem before. I have a good understanding on how to implement the single features described above, but I'd like to hear your thoughts.

hi nicola! we've done parts of this this on a project we're working on at the moment. I haven’t built it into the library but it would be great to do so, ideally as an optional extension.
most of what we’ve done is just syncing the tracks. here’s our requestAnimationFrame function (paraphrased):
function sync(){
  masterTime.current = (new Date()/1000) - masterTime.start;

  if( (masterTime.current >= masterTime.duration) && playing ){

    // loop
    masterTime.start = (new Date()/1000)
    masterTime.current = 0

    for (var i = mix.tracks.length - 1; i >= 0; i--) {
      mix.tracks[i].currentTime(0)
    }

  } else {

    if( Math.abs(masterTime.current - mix.tracks[i].currentTime()) > 0.05 ){
      if(masterTime.current <= mix.tracks[i].duration()){
        mix.tracks[i].currentTime( masterTime.current );
      }
    }

  }

}

we're also doing a bit of beat tracking but it's all set up beforehand. we know the bpm and duration for the track, and we just display a visualization based on that. it’d be quite possible though to write some code to determine the bpm of a playing track using fft analysis.

Hi Iain,
thanks for the answer.
I used to do bpm detection and track tempo/key manipulation AS3/Flash a while ago. I'm wondering if in javascript there is an equivalent of what in flash was the raw file in a bytearray representation.
If I manage to get that I can do bpm detection via a bpm autocorrelation algorithm.
From there stretching the audio shouldn't be too hard (as long as the latency while processing is short enough)

nice! in javascript you can use an audio processor node to get the raw audio data (typically as a Uint8Array) as it plays. See createAnalyse() and getAnalysis() in track.js and the Analysis section in the readme. getByteFrequencyData() is the function that actually returns the FFT data. There’s probably another function that returns raw data without FFT if you want that; you'd have to look that up.
I imagine the latency while processing should be fine; in our experience the web audio API is very fast. We haven’t tried a lot of live effects though.


Disable Use Delay by default

I recently upgraded from 2.1, and by default use delay was turned on for all three modes, which results in my alarm going off immediately when opening a delayed contact. I don't know if the logic is reversed, but it might be something you want to look into so others don't have the same problem.
Turning off use delay for all three of my modes resulted in expected experience of panel delay before alarming.

Sorry about that. This is fixed in v0.2.4, but you'll need to update your delay settings after you update. Would you mind updating and reporting back here?

Where is this setting changed?

It's the "Arming Delay" setting. When checked, the arming delay will be used.


Are there any plans to support serialization of pyflink's Java and python inter-process communication?

Feature Request
We expect to improve the performance of pyflink through fury serialization
In the python benchmark test, the time-consuming benchmark of each serialization is as follows:

This is the code location where the performance is relatively high when we use pyflink, which is mainly consumed in pickle encoding and decoding.

At present, our company's stock of historical data is 13 million, and each message is between 60kb and 75kb. After discussions with the pyflink community, it is recommended to use pemja for cross-language calls without using beam.
In this way, python's native pickle serialization is very slow
测试方法：

以天（一个点位每秒一条数据，一天共86400条）为单位，进行不同的数据量测试
分别测试 3 个算子、5 个算子和 10 个算子情况下的性能

对比都带有 output_type 和不都带 output_type 参数的性能

每个算子参数带有 output_type 参数的测试代码：

每个算子都不带 output_type 参数的测试代码：

其中 output_type 定义了传输数据每个字段类型，定义方式如下图：

a) 测试三个算子

时长
带有 output_type 耗时（秒）
没有 output_type耗时（秒）
提升效率

1 天
9.456
9.973
5.18%

3 天
14.532
18.187
20.10%

5 天
28.911
38.786
25.46%

7 天
34.397
51.691
33.46%

b) 测试5个算子

时长
带有 output_type 耗时（秒）
没有 output_type耗时（秒）
提升效率

1 天
9.971
10.401
4.13%

3 天
20.308
25.744
21.12%

5 天
30.166
40.305
25.16%

7 天
40.340
54.405
25.85%

c) 测试10个算子

时长
带有 output_type 耗时（秒）
没有 output_type耗时（秒）
提升效率

1 天
11.468
12.130
5.45%

3 天
23.697
31.121
23.85%

5 天
38.015
49.508
23.21%

7 天
48.859
65.140
24.99%

Judging from the test results, explicitly specifying the output_type parameter in PyFlink DataStream can significantly improve serialization performance, especially when the amount of data is large and there are many operators, the improvement effect is more obvious. Using output_type can reduce the overhead of serialization and deserialization, reduce the calculation of type inference, and thus improve performance.
But now, obviously we hope that fury can improve this situation. Does @chaokunyang  have any good suggestions?
Is your feature request related to a problem? Please describe
No response
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response

Fury has two formats for your scenarios:

Xlang object graph format: This format will be faster if you have some shared values and it's the only solution if you have circular values.
Binary Row Format: This is a zero-copy format, you can read your fields without parsing other fields.

Fury 针对您的场景有两种格式：

Xlang 对象图格式：如果您有一些共享值，则这种格式会更快，如果您有循环值，这是唯一的解决方案。
二进制行格式：这是一种零拷贝格式，您可以读取您的字段而无需解析其他字段。

如果你的消息正文大小为 60kb，你是否需要读取所有这些字段？如果不需要，我建议使用二进制行格式

All fields need to be read

In such cases, Xlang object graph format will be faster.

@chaokunyang Since I am not familiar with xlang object graph, there may be some obstacles in implementing fury's xlang object graph in pyflink. Would you mind taking the time to give me some help?

yeah, I'd love to help, feel free to reach me out


Add images to the Live Bidding UI

Adds aspect ratio + the real image data, punted on the animations, wanted to focus on something else for a bi.

2 Errors

:no_entry_sign:
No CHANGELOG changes made

:no_entry_sign:
Developer Specific file shouldn't be changed

2 Warnings

:warning:
Needs testing on a Phone if change is non-trivial

:warning:
Found unstubbbed networking requests

ARArtworkFavoritesNetworkModelSpec in test_getFavorites__makes_request_if_no_request_is_in_progress
ARArtworkViewControllerBuyButtonSpec in test_buy_button__posts_order_if_artwork_has_no_edition_sets
ARCreateAccountViewControllerSpec in test_warning_view__displays_a_message
ARCreateAccountViewControllerSpec in test_warning_view__displays_a_message
AREmbeddedModelPreviewViewControllerSpec in test_iPhone_peek__shows_favorite_and_follow_buttons_for_logged_in_user
AREmbeddedModelPreviewViewControllerSpec in test_iPhone_peek__shows_favorite_and_follow_buttons_for_logged_in_user
AREmbeddedModelPreviewViewControllerSpec in test_iPhone_peek__passes_artwork_to_share_controller
ARFairViewControllerSpec in test_creates_an_NSUserActivity
ARGeneViewControllerSpec in test_creates_an_NSUserActivity
ARGeneViewControllerSpec in test_creates_an_NSUserActivity
ARTopMenuViewControllerSpec in test_navigation__favorites__logged_in__tab_behavior__already_selected__pops_to_root

  Generated by :no_entry_sign: danger

This isn't perfect but it's good enough for review @ashfurrow

Looks cool, would like to see a snapshot test showing the images laid out, even if they're just grey boxes.

OK, this is green


dynamic branching for data screening

Changed pipeline to dynamic branching so we could screen out sites with incomplete years of data.  I wasn't sure how to load gagesii from the sharepoint site directly, so there is a link to my local C drive for that file which will have to be changed.
At the beginning I have some commented out areas where I selected a chunck of sites around CO and another chunk for DE, mostly just to test the pipeline using a bunch of sites to make sure it runs.  There is one site in the CO group - gage 06408700 for which calcHITmetrics fails and I can't figure out why.  I don't think its a targets or our pipeline issue, I think its actually an Eflostats issue, so if you run the CO chunk it will fail there.

I'll be busy with AGU for a good portion of Mon. - Wed., so it may make more sense for @cstillwellusgs to review this so we can keep development moving. Does that sound good?

Sure that is fine with me.

I did a pig picture read through of the edits and they look good to me. We can chat in the meeting today if it makes sense for me or Charlie to run the code and check out the issue you described with the CO site

I was able to successfully run through the targets. I received 2 parsing failures along the way.  Do you know if there is a way to create more helpful suffixes in the branches? For instance, instead of 'start branch p1_peak_flow_58e0788c' as a targets message, replace the auto-generated suffix with the site number?
I added a couple other minor comments as well. Looks good to me though!
Full disclosure this was my first ever PR review....

I was able to successfully run through the targets. I received 2 parsing failures along the way.  Do you know if there is a way to create more helpful suffixes in the branches? For instance, instead of 'start branch p1_peak_flow_58e0788c' as a targets message, replace the auto-generated suffix with the site number?
I added a couple other minor comments as well. Looks good to me though!
Full disclosure this was my first ever PR review....

I don't think you can change the suffixes in the branches with dynamic braching.  It is a little annoying that way.

I don't think you can change the suffixes in the branches with dynamic braching. It is a little annoying that way.

We could add print statements to the functions that state the site ID number.

At the beginning I have some commented out areas where I selected a chunck of sites around CO and another chunk for DE, mostly just to test the pipeline using a bunch of sites to make sure it runs. There is one site in the CO group - gage 06408700 for which calcHITmetrics fails and I can't figure out why. I don't think its a targets or our pipeline issue, I think its actually an Eflostats issue, so if you run the CO chunk it will fail there.

Should we create an issue to explore this? The code you have looks good, so I don't want to delay it being merged to diagnose what is happening for this site


JSX elements with a period in the name don't type check

Not sure if this is a bug or just a design decision, but wanted to report it anyway. Components with names such as Component.SubComponent aren't properly typechecked.
Pseudo code setup:
class SectionHeader extends Component {
  props: {
    label: string
  };
}

class Section extends Component {
  static Header = SectionHeader;
}

In use:
import Section from 'somewhere';
const { Header } = Section;

class OtherComponent extends Component {
  render() {
    return (
      <Section>
        <Header foo="bar" /> // Works, type checks as expected
        <Section.Header foo="bar" /> // Doesn't work, no type checking happens
      </Section>
    );
  }
}

Duplicate of https://github.com/facebook/flow/issues/1113


Add support for Fastly Rate Limiting

What is this PR?
This PR introduces the ability to parse and lint the Fastly Rate Limiting feature.
(also did some cleanup)
How does this PR do that?
Fastly Rate Limiting introduces 2 new declarations:

Penatlybox
Ratecounter

The PR adds these 2 declarations to the parsers and adds support to lint them as well.
Note: The two declarations don't allow any statements inside them.
Also, Faslty has 4 builtin functions for the rate-limiting functionality as well:

ratelimit.check_rate
ratelimit.check_rates
ratelimit.penaltybox_add
ratelimit.penaltybox_has
ratelimit.ratecounter_increment

What can I improve/add?

Better error message when the user adds statements inside the penaltybox and the ratecounter blocks
More tests

Fixes #59

@ysugimoto Thank you so much for the quick review!
I really enjoyed working on this PR and on your code! Super nice!
I am looking forward to contribute more.
The PR is ready I think to be merged (I cannot do it by myself as I am a first-time contributor)

@shadialtarsha Thanks, I'll merge this PR and release a new version.
And, I'd like to add you to the contributor then welcome another PR when you are interested in another feature 👍


Wifi in GameMode is unstable and disconnect

Describe the bug
When I start my PC in game mode, I got frequent Wifi disconnection.
I tested it right aside my router and I even go to my friends house and got the same wifi problem in game mode.
In Desktop mode I don't have the issue.
At least it is way more stable!
Even if I know that wifi is less performant than when I test it on CachyOS or Windows.
What did you expect to happen?
I expected at least that the wifi works as the desktop in Game Mode.
The best could be to get better wifi overall.
Output of rpm-ostree status
State: idle
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:stable
                   Digest: sha256:8007944db4d5aad6e04952663533e2edd00db394af79216ade2e5f4de7d8fee2
                  Version: 41.20241125 (2024-11-26T03:49:41Z)
                     Diff: 1 added
          LayeredPackages: lua
            LocalPackages: goxlr-utility-1.1.4-1.x86_64

● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:stable
                   Digest: sha256:8007944db4d5aad6e04952663533e2edd00db394af79216ade2e5f4de7d8fee2
                  Version: 41.20241125 (2024-11-26T03:49:41Z)
               LiveCommit: ef3d53fb3b5c76f6d77b5766f0283d007fc14d2188d80f5bd3e2d3000911d066
                 LiveDiff: 1 added
            LocalPackages: goxlr-utility-1.1.4-1.x86_64
                 Unlocked: transient

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:stable
                   Digest: sha256:8007944db4d5aad6e04952663533e2edd00db394af79216ade2e5f4de7d8fee2
                  Version: 41.20241125 (2024-11-26T03:49:41Z)

Hardware
AtomMan G Series

More exactly: Atomman G7 PT

Extra information or context
The wifi card is: MediaTek MT7925 chipset.
Network controller: MEDIATEK Corp. Device 7925

I may suppose that there somethings in the kernel 6.12, since cachyOS seems to handle wifi a bit better?
But for game mode, i got no idea.
I event try the Dev Mode and disabled that setting: (Spoiler: things still not working.)

I Started a Discord thread before opening this issue: https://canary.discord.com/channels/1072614816579063828/1309984773854330971 (Not much info than here, but who knows)

Hello,
Thank you for the detailed report including the wifi chipset and a variety of things you have tried. I see you also created a thread in the UBlue Discord server for more direct discussion, which seems good to me.
From other discussions in the server, it looks like kernel 6.12 has been on the horizon for Fedora to be released 'probably within a week' for about three weeks... In theory, Bazzite will be ready to ship it very shortly afterward, so please do keep an eye out for that and let us know whether it solves the issue.

Thanks for the info!
I'll keep a close eye on the Bazzite releases.

By curiosity, I ask ChatGPT if there was change about the MediaTek MT7925 chipset in the kernel 6.12.0 to 6.12.4 and it says that:

Seems like yes there is. :D
But we may take that as a grain of salt since I don't double check the info.

I'll let you what happens when I test the release.
Thank again.

@atimeofday
I just test the release in the testing branch: https://github.com/ublue-os/bazzite/releases/tag/testing-41.20241218.1
It use the Kernel 6.12.5-201.bazzite
From what I test, wifi is now way better!
On desktop it seems to go full speed.
In game mode i don't get disconnected now and it seems stable!
Only bug I can report, is that if I go away in game mode (When it goes to sleep), then it seems to freeze.
From what I test in game mode and desktop mode, it's the only thing i saw.
That being say.
I close the issue because it seems fix now on the testing branch using the 6.12.5-201.bazzite.
I hope to see the release on stable soon!
Thanks


Remove Cargo.lock

Since we use noCargo.lock in downstream builds, we should not use one in upstream CI either.

I don't understand this PR.

We agreed on closing https://github.com/hermitcore/libhermit-rs/issues/270 and continue publishing libhermit on crates.io without lockfile. Since no lockfile is present for downstream builds (downloading from crates.io), we should not maintain one in this repository as well. That way we build the same way when using this repository directly (like in CI) as when building downstream.

bors retry


Update Sample Code that are currently using fluent SDK to T2 SDK- Resources

https://github.com/Azure-Samples/resources-dotnet-deploy-using-arm-template-with-progress

https://github.com/Azure-Samples/resources-dotnet-deploy-using-arm-template-with-progress/pull/14


Drawer cannot be closed with gesture after dragging horizontally

Description
Sometimes, after dragging horizontally, the drawer cannot be closed by dragging downwards. As you can see from the video, it doesn't happen every time.
Steps

Go to https://vaul.emilkowal.ski/
Click Open Drawer
Click and drag the mouse horizontally
Attempt to close the drawer by dragging downwards

https://github.com/emilkowalski/vaul/assets/4272090/4610afa9-ae03-4dae-8353-78d876928394
Environment
Browser: Firefox (cannot reproduce in Chrome or WebKit)

Oh, this is probably a duplicate of #7. Sorry, I didn't notice the closed issue. 😆

Actually, this is still an issue in https://vaul-git-improvements-emilkowalski-s-team.vercel.app/.