proposal: Go 2: Destructuring operator to assign fields in different types of the structs

It is normal to have a situation where we need to assign a struct using fields from another struct, an example is when the request or response type is different from the storage type. In these situations we can simply write:
data := DataModel {
  ID:    requestData.ID,
  Value: requestData.Value,
  ...
}

The problems start when we have a struct with many fields or new fields is added and we forgot to handle it.
We could use reflection to copy fields with the same name and type from a struct to another, but is slow e the code little complex
I'm trying to propose a language change to safely copy fields from a struct to another.
The idea is to use ... operator to copy the fields with the same name and type to another struct.
Example:
type RequestData struct {
  ID    string
  Value string
}

type DataModel struct {
  ID    string
  Value string
  Other bool
  AnyID int
}

Uses the RequestData fields to create a new instance of DataModel.
Important to observe that all fields need to be handled when using the ... operator.
In this case, the Other and AnyID need to be set.
requestData := RequestData{ID: "1", Value: "foo" }

data := DataModel{ Other: false, AnyID: 5, requestData... }
fmt.Printf("%#v\n", data) // DataModel{ID:"1", Value:"foo", Other:false, AnyID:5}

// it won't compile
// data := DataModel{ requestData... }

This example won't compile because DataModel has different fields from RequestData.
The fields Other and AnyID don't exist in RequestData.
requestData2 := RequestData{ data... } // it won't compile

It creates a new instance of DataModel but changes the field Value
data2 := DataModel{Value: "bar", data...}
fmt.Printf("%#v\n", data2) // DataModel{ID:"1", Value:"bar", Other:false, AnyID:5}

Embedded structs
When you use ... operator, the embedded struct fields will be handled as a normal field.
type A struct { i int }
type B struct { A }
type C struct { i int }

b1 := B{A{5}}
c1 := C{b1...} // c1 := C{i: b1.i}
b2 := B{c1...} // b2 := B{A{i: c1.i}}
fmt.Println(b1.i, c1.i, b2.i) // 5 5 5

Destructuring fields
type RequestWithExtraData struct {
  ID        string
  Value     string
  RequestID int
}
requestData := RequestWithExtraData{ "1", "foo", 5 }
RequestWithExtraData{ ID:id, Value:value } := requestData
fmt.Println(id, value) // 1 foo

Destructuring with rest.
The field RequestID will be ignored (_) and the rest of the fields it will assign the new DataModel instance, but is required to set Other and AnyID
requestWithExtraData := RequestWithExtraData{ ID:"3", Value:"extra", RequestID:42 }

RequestWithExtraData{
    RequestID: _, // ignore RequestID
    ...DataModel{
        Other: true,
        AnyID: 0,
    }: rest,
} := requestWithExtraData
fmt.Printf("%#v\n", rest) // DataModel{ID:"3", Value:"extra", Other:true, AnyID:0}

Why not just make one type a field of the other type?

We can embed a struct into another and reduce this problem, but it's not always that you have full control of the application. If you use a generator to create your model or if you need to pass configurations to a library or you are trying to connect a part of the application with another.
To understand this better I searched the pattern  Field: any.Field, in some projects using this command:
grep -rnP --include \*.go "\s(\w+):\s+\w+\.\1[,}]" . | wc -l
prometheus 1527 occurrences
kubernetes 6982 occurrences
docker 1731 occurrences
minio 228 occurrences

Thanks for looking at real code.  Can you link to a couple of examples?  That would help see what is going on there.  Thanks.

I want to show some real code examples:

Kubernetes/pkg/scheduler/scheduler.go

Copy fields to different types of structs
return &Scheduler{
    SchedulerCache:      config.SchedulerCache,
    Algorithm:           config.Algorithm,
    GetBinder:           config.GetBinder,
    PodConditionUpdater: config.PodConditionUpdater,
    PodPreemptor:        config.PodPreemptor,
    Framework:           config.Framework,
    NextPod:             config.NextPod,
    WaitForCacheSync:    config.WaitForCacheSync,
    Error:               config.Error,
    Recorder:            config.Recorder,
    StopEverything:      config.StopEverything,
    VolumeBinder:        config.VolumeBinder,
    DisablePreemption:   config.DisablePreemption,
    SchedulingQueue:     config.SchedulingQueue,
}

Both types have exactly the same fields
return &Scheduler{config...}

Prometheus/promql/engine.go

Copy and change a field of the same type of structs
newEv := &evaluator{
    endTimestamp:        ev.endTimestamp - offsetMillis,
    interval:            ev.defaultEvalInterval,
    ctx:                 ev.ctx,
    currentSamples:      ev.currentSamples,
    maxSamples:          ev.maxSamples,
    defaultEvalInterval: ev.defaultEvalInterval,
    logger:              ev.logger,
}

IMO short and keep the expressiveness
newEv := &evaluator{
    endTimestamp:   ev.endTimestamp - offsetMillis,
    ev...,
}

Prometheus/discovery/openstack/openstack.go

Copy fields from type  *SDConfig to gophercloud.AuthOptions
opts = gophercloud.AuthOptions{
    IdentityEndpoint:            conf.IdentityEndpoint,
    Username:                    conf.Username,
    UserID:                      conf.UserID,
    Password:                    string(conf.Password),
    TenantName:                  conf.ProjectName,
    TenantID:                    conf.ProjectID,
    DomainName:                  conf.DomainName,
    DomainID:                    conf.DomainID,
    ApplicationCredentialID:     conf.ApplicationCredentialID,
    ApplicationCredentialName:   conf.ApplicationCredentialName,
    ApplicationCredentialSecret: string(conf.ApplicationCredentialSecret),
}

Here we need explicitly ignore some fields of SDConfig
IMO this alternative is better because if new fields are created/updated/removed we need to handle it here
*SDConfig{
    Password:                    _,
    DomainName:                  _,
    DomainID:                    _,
    ApplicationCredentialSecret: _,
    Role:                        _,
    Region:                      _,
    RefreshInterval:             _,
    Port:                        _,
    AllTenants:                  _,
    TLSConfig:                   _,
    gophercloud.AuthOptions{
        Password:                    string(conf.Password),
        ApplicationCredentialSecret: string(conf.ApplicationCredentialSecret),
        opts..., // the rest of field assign new instance of gophercloud.AuthOptions
    },
} := conf

I like this idea, but how should this work for embedded structs? Does everything get copied recursively?

I think the type embedding needs to be recursively copied different from a child struct
type Color struct {
    R byte
    G byte
    B byte
}

type Wheel struct {
    Size int
}

type Car struct {
    Wheel
    Color Color
}

type Vehicle struct {
    Size  int
    Color Color
}

func VehicleFromCar(car Car) Vehicle {
    // Expands all "Car" fields including "Wheel" fields
    // but "Color" fields won't expand
    // return Vehicle{
    //    Size:  car.Size,
    //    Color: car.Color,
    // }
    return Vehicle{bar...}
}

func CarFromVehicle(vehicle Vehicle) Car {
    // Expands all "Vehicle" fields to match with "Car" fields
    // a new instance of "Wheel" will be required
    // return Car{
    //     Wheel: Wheel{
    //         Size: vehicle.Size,
    //     },
    //     Color: vehicle.Color,
    // }
    return Car{vehicle...}
}

If I understand this proposal correctly, changing a field name in one package can cause a silent behavior change in a different package.  It could mean that the ... operation would stop, or start, assigning a field value.  The same might be true for changing a field type.  That seems like a problem.  As a general guideline, supporting programming at scale means that changes to one package should not affect other packages, or they should affect other packages in an "obvious" way, or they should cause an error.

The ... operation need to match with all fields, different fields need to be explicit ignored with _.
Changing a field in any package will cause an error.
Given the previous example, changing Vehicle to:
type Vehicle struct {
    Size  int
    Color Color
    Price float64 // new field
}

This function no longer compiles
func CarFromVehicle(vehicle Vehicle) Car {
    return Car{vehicle...} // now vehicle has Price field and this field don't exist in Car
}
// now is required to ignore the Price field
func CarFromVehicle(vehicle Vehicle) Car {
    Vehicle{Price:_, ...Car{}: rest} := vehicle
    return rest
}

In the current proposal this function continues to compile normally, but I agree with @ianlancetaylor  this could introduce a bad behavior
func VehicleFromCar(car Car) Vehicle {
    return Vehicle{car...}
}

I think we need to change the current proposal to allow the use of ... operator only if all fields are assign
With this change this function no longer compiles
func VehicleFromCar(car Car) Vehicle {
    return Vehicle{car...}
}
// now is required add value to Price
func VehicleFromCar(car Car) Vehicle {
    return Vehicle{
        Price: 0,
        car...,
    }
}

Thanks, I managed to miss that.

I just want to note that the newEv := &evaluator{ example in https://github.com/golang/go/issues/33957#issuecomment-527183815 is not all that convincing, as it could be done with a simple assignment followed by a field change.

The case data2 := DataModel{Value: "bar", data...} in the original comment seems potentially confusing.  If I understand correctly, the presence of Value in the composite literal disables copying the Value field from data.  That seems tricky.
Separately, consider
type S1 { i int }
type T { S1 }
type S2 { i int }
var v = S2{T{0}...}

Here the question is how the promoted field of T should be handled when using with ....  Does it correspond to the normal field of S2?

I understand that the promoted fields of T will correspond with normal field of S2.
We have  similar behavior:
type S1 { i int }
type T { S1 }
type S2 { i int }
t := T{S1{0}}
//var v = S2{t...}
v := S2{}
b, _ := json.Marshal(&t)
json.Unmarshal(b, &v)

I just want to note that the newEv := &evaluator{ example in #33957 (comment) is not all that convincing, as it could be done with a simple assignment followed by a field change.

You're right, but I found many similar cases and thought it was important to show.

We can imagine doing the same thing for slice ?
This code:
s3 := []int{9, 7, 10}
s2 := []int{8, 7, 3}
s1 := []int{3, 5, 4, 3, 5}

s1 = append(s1, append(s2, s3...)...)

would become:
s3 := []int{9, 7, 10}
s2 := []int{8, 7, 3}

s1 := []int{3, 5, 4, 3, 5, s2..., s3...}

It's a little more concise and less verbose, I've already found myself in cases where I had to do this:
c.counters = append(before, middle[0][:]...)
c.counters = append(c.counters, middle[1][:]...)
c.counters = append(c.counters, middle[2][:]...)
c.counters = append(c.counters, after...)

while that could have done that:
c.counters := []int{
   before...,
   middle[0][:]...,
   middle[1][:]...,
   middle[2][:]...,
   after...,
}

@alexisvisco The slice idea is approximately #4096.  Let's not confuse it with the struct idea.  Thanks.

@rodcorsi When the fields match exactly then the conversion can already be shortened.
https://github.com/kubernetes/kubernetes/blob/d114f33768e4a5874a9d23f611b96219b7f20741/pkg/scheduler/scheduler.go#L294 could be written as:
scheduler := Scheduler(*config)
return &scheduler

A playground demonstration https://play.golang.org/p/uMN1YyZSYQ9 with a similar concept.

As noted in the original comment, this can be done using reflect.  Before changing the language let's consider whether there is some way to make that efficient enough.  For example, it might be possible to write a function that takes two reflect.Type values and returns a function that assigns fields from a value of one type to a value of another type.  This would be somewhat similar to reflect.Swapper, although it wouldn't need any special support from the reflect package.

Nobody has replied to the previous comment, but it seems workable, and there's no clear reason why that wouldn't work.  On that basis, this is a likely decline.  Leaving open for four weeks for final comments.

@ianlancetaylor
While reflection can work, and there are packages that sort of do that already (i believe github.com/mitchellh/mapstructure can sort of cover that case), such a solution will not support programming at scale, as you put it. These solutions are flaky and produce runtime errors or weird behavior when either one of the structs change. With compiler destructing, you can confidently do that without having to worry that an upstream struct you are depending on changes, because your program will stop compiling.
Also, the language technically supports destructing slices into varargs with the same operator. This just expands the scope and makes the world just a little bit safer.

@ianlancetaylor Just to go off of what has already been stated.
There are already ways to work around this without implementing the feature, but you could very well say that about the deconstruction of slices to fill the varargs stated by @urandom.
At that point then what would be the point of the deconstruction ability of slices? If we're all able to just loop through the arguments and build temp slices? It's because it's more boilerplate with little substance. Making the best of the little things of Go is where it shines, and this is definitely something that could help on some boilerplate code out there that have to fillout large structures.

Every proposal could help.  There's no question about that.
The question is whether the benefit of the change is worth the cost of additional syntax and everybody learning what it means.
Varargs is used by lots of different code, including, obviously, the very widely-used fmt package.  It doesn't seem comparable to this proposal, which would be used by orders of magnitude less code.

While it's true that using the reflect package produces errors at run time rather than at compile time, the point is that this can be done today, albeit imperfectly.  So overall the earlier comments still apply.  Closing.


d1_eli_02 missing alyx npc

We used the skip vote in the previous map and we started d1_eli_02 with no alyx npc

Duplicate of #220 I guess?


add react-send-document

Q
A

Bug fix?
no

New feature?
no

New sample?
yes

Related issues?
no

What's in this Pull Request?

Please describe the changes in this PR. Sample description or details around bugs which are being fixed.
I want to add a new sample. This sample shows how to create Custom Dialogs using @microsoft/sp-dialog package in the context of Command View Set and send selected document with e-mail. This sample using @pnp/sp and Microsoft Graph API.

thx @serdarketenci, appreciated.


Update RNCookieManagerIOS.m

@joeferraro this is an important fix. I can't use the lib without it. Could you please merge it?


Link types

[ ] option to switch between link, live_patch and link with phx-click attribute.
[ ] improve test coverage
[ ] improve documentation
[ ] add update helpers to Flop
[ ] use Flop update helpers in Flop.Phoenix

Coverage decreased (-10.5%) to 89.542% when pulling 68ef5d0f84cd969899d335b07a83bca5c1804305 on link-types into 66fbc54d4338943bcd677f475bd5c62a59b13f83 on main.


4.x: Move archetype metrics under GreetService

Description
fix #7611
Removed the MetricsService and moved the metrics logic to GreetService
Documentation
no impact

Yes that would work. Other possibility is to use ordered test method and run metric test first so we can avoid parsing metrics endpoint output for SE. Would you like this approach ?

That's okay, I just removed the ordered test and parse the metrics instead to get the values.

You have probably already seen the conflict now in observerability.xml.

I cloned your repo and switched to your refactor-archetype and rebuilt Helidon and the archetypes.
When I run helidon init using the local cli-data the dialog for a custom SE project prompts for a metrics provider (Microprofile or Micrometer). If the user asks for metrics in the custom SE dialog, the pom should not ask further metrics-related questions (similar to the recent change to the 3.x archetype).
A generated SE project with metrics support should include these metrics-related  dependencies:
     <dependency>
         <groupId>io.helidon.webserver.observe</groupId>
         <artifactId>helidon-webserver-observe-metrics</artifactId>
     </dependency>
     <dependency>
         <groupId>io.helidon.metrics</groupId>
         <artifactId>helidon-metrics-system-meters</artifactId>
         <scope>runtime</scope>
     </dependency>

This might be a change from when we first talked about what metrics dependencies should be in 4.x SE projects. For now, at least, we have decided not to use the helidon-metrics bundle in our SE metrics examples.


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/88924

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/90962

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/93051


apostrophe as string get bad read from smart things

I have items that are names with apostrophe (e.g. this sign '), for examples: _Ziv's S23 Ultra.
Instead of ' i get this: '
So instead of: Ziv's S23 Ultra
I get: Ziv's S23 Ultra
Chatgpt response:
o dynamically fix the issue with HTML entities being displayed instead of apostrophes in the HA-SmartThings-Find repository, you should decode HTML entities in the relevant parts of the code where data is processed or displayed.
Steps:
Modify the Data Processing:
Update the Python code to decode HTML entities when fetching or processing data. For example, in custom_components/smartthings_find/init.py or other relevant files:
python
Copy code
import html
def fetch_and_process_data():
# Fetch data
data = fetch_data_from_smartthings()
# Decode HTML entities
data['name'] = html.unescape(data.get('name'))
# Process data
process_device_name(data['name'])
Check Rendering in Templates:
If the issue is also in the frontend, ensure that HTML entities are decoded before rendering the text. You can create a utility function in JavaScript:
javascript
Copy code
function decodeHtmlEntities(html) {
var txt = document.createElement("textarea");
txt.innerHTML = html;
return txt.value;
}
function renderDeviceName(name) {
var decodedName = decodeHtmlEntities(name);
document.getElementById('device-name').innerText = decodedName;
}
By integrating these utility functions, you can dynamically handle and decode HTML entities, ensuring that names like Ziv's S23 Ultra are displayed correctly. This should be applied wherever data is fetched, processed, or rendered within the codebase.
For more detailed instructions, you can refer to the HA-SmartThings-Find repository.

Hi, just released v0.2.0 which should fix this issue.

Thank you! it works!


Headers are always lower case, regardless of how they come on the wire.

Initially shown by kennethreitz/requests#1561. Is this intended behaviour, or are you open to me changing that to maintain case?

Hm, I thought this was fixed recently.

I actually just ran into this with the test suite for https://github.com/gabrielfalcao/HTTPretty/ , which has a test that expects to find a header called 'Server' in a urllib3 response. It works with urllib3 1.19.1; it does not work (because the header name is changed to 'server') with urllib3 1.10.2 . I realize that's quite a wide range, but it's the delta I have right now :P

Cool, I'm calling this fixed then. 😁


Rename repository

Given that this isn't only for the R02 anymore, rename the repository to something better
Candidates:

narya
nenya
vilya
open ring
???

I like the lotr reference haha but I think keeping a reference to colmi somewhere would help search wise. Something like colmi_ring_client or something simple like that.

open_colmi?


Module not idempotent

Description
The module is not idempotent and causes resources to be recreated with each plan.
Versions

Terraform: Terraform v0.13.6
Provider(s): hashicorp/aws v3.20.0
Module: terraform-aws-modules/notify-slack/aws 4.12.0

Reproduction

Steps to reproduce the behavior:

Run the plan twice in a row: terraform plan

Code Snippet to Reproduce

module "notify_slack" {
  source  = "terraform-aws-modules/notify-slack/aws"
  version = "~> 4.0"

  lambda_function_name = "${var.environment}-${var.region}-lambda-notify-slack"

  slack_webhook_url = var.slack_alerts_webhook
  slack_channel     = var.slack_alerts_channel
  slack_username    = "our-slack-username"

  sns_topic_name = "Slack-Alerts"

Expected behavior

The second time I run the terraform plan command, there should not be any new resource created.
Actual behavior

A resource get recreated every time.
 # module.notify_slack.module.lambda.null_resource.archive[0] must be replaced
-/+ resource "null_resource" "archive" {
      ~ id       = "8162547318031137166" -> (known after apply)
      ~ triggers = { # forces replacement
            "filename"  = "builds/e0cb3a6677325caaef83e21b18d31cd83bfb70b2f5a3b45d81368dfa72822a07.zip"
          ~ "timestamp" = "1615392751274272000" -> "1615501960953185000"
        }
    }

Seems related to  terraform-aws-modules/terraform-aws-lambda#105 and with a proposed solution described in the FAQ section in the README:

Q3: null_resource.archive[0] must be replaced

Answer: This probably mean that zip-archive has been deployed, but is currently absent locally, and it has to be recreated locally. When you run into this issue during CI/CD process (where workspace is clean), you can set environment variable TF_RECREATE_MISSING_LAMBDA_PACKAGE=false and run terraform apply.

You are right, @alexfdz !
I am going to close this issue here.


Rename GUIDE.md to README.md in docs/en and docs/ko directories for b…

Changes Made

Renamed GUIDE.md to README.md in the docs/en directory
Renamed GUIDE.md to README.md in the docs/ko directory
Changed the reference in the main 'README.md' file from GUIDE.md to README.md

Reason for Changes
The purpose of this change is to improve the visibility and accessibility of the guide documents. By renaming these files to README.md, their contents will automatically display when opening the respective directories on GitHub, making it easier for users to find and read the guide information.
Additional Notes

The image subdirectories (GUIDE-img) remain unchanged.

Please review these changes and let me know if any further modifications are needed.

@AlexBurski Thank you for contribution! LGTM.
But there are several feedbacks below.

Please add "docs" prefix to commit message like other commit messages (docs: Rename GUIDE.md to README.md in docs/en and docs/ko directories for better visibility)

Because you requested PR without "sign-off" first, PR has two tags(fail/sign-off, success/sign-off). To clarify, you have to request new PR. I will close this PR.

I think the name of image subdirectories also should be changed. please change name GUIDE to README.


Document the available build features

Explains all the optional features and how they can be used for debugging and testing.

Thank you @martinling!


Can't get cmt_insert_file_header working

I have a file named FileHeader.h in the root dir of my project.
My uncrustify.cfg file is also in my root project dir. The option in the file looks like this:
cmt_insert_file_header                    = "FileHeader.h"         # string
I have the BBUncrustifyPlugin option to format on save enabled. My other uncrustify rules are being applied to the current file upon saving, but the file header is not being inserted. I do not have a C/C++ comment at the top of my source file.
Any suggestions? I have tried specifying a full path to the FileHeader.h, and moving the file to different directories, but I cannot get it working.
Thanks!

Thank you Eric, it was a bug and it should be fixed now.
Example:
I have _uncrustify.cfg in a Xcode project root folder.
In _uncrustify.cfg :
cmt_insert_file_header = "header.h"
utf8_force = true # needed if you are using utf-8 characters in header.h

header.h
//
// Created by Benoît Bourdon
// Copyright (c) 2015
// $(filename)
//

If needed, you can test your config with the command line ./uncrustify -l OC -c /path/to/_uncrustify.cfg  -f /path/to/file.m

Thank you Eric, it was a bug and it should be fixed now.
Example:
I have _uncrustify.cfg in a Xcode project root folder.
In _uncrustify.cfg :
cmt_insert_file_header = "header.h"
utf8_force = true # needed if you are using utf-8 characters in header.h

header.h
//
// Created by Benoît Bourdon
// Copyright (c) 2015
// $(filename)
//

If needed, you can test your config with the command line ./uncrustify -l OC -c /path/to/_uncrustify.cfg  -f /path/to/file.m


Views from postgis getting including in schema.rb

When using this gem with postgis, it adds the following views to schema.rb: geography_columns, geometry_columns, raster_columns, raster_overviews. This causes problems when running the tests because they try to create these views but they already exist.
Not sure what the best course of action is here but as a temporary work around I am going to try forking the repo and explicitly blacklisting those views to see if it fixes my problem. Please let me know if there is a better solution!

Here's where we get the views from postgres: https://github.com/thoughtbot/scenic/blob/master/lib/scenic/adapters/postgres/views.rb#L25
Here's where we ignore certain tables from rails and other things the adapter (I think) tells us to ignore:
https://github.com/thoughtbot/scenic/blob/master/lib/scenic/schema_dumper.rb#L12
My hope would be that there's enough information in the postgres catalog or that the postgis adapter can provide that we'd be able to programmatically filter those views without resorting to a blacklist. I don't have anything where I'm using postgis so I don't have a test readily available. It'll take me a bit to dig into this.

Oh, and here's a non-forking workaround for this issue (I have not tested, but I think it should work):
# config/initializers/schema_dumper.rb

ActiveRecord::SchemaDumper.ignore_tables += [<the postgis views>]

But I'd still welcome help trying to figure out how to handle this automatically.

When looking at the list of views I did not notice anything that stood out. The only difference I could see between those ones and the ones we had added ourselves in a migration was that the postgis ones had a value populated in the relacl column and the ones we created had NULL there but I don't know what that column means or is used for.
I tried the forking solution and it worked (https://github.com/soul2197/scenic/commit/a35cca27030ee66c7861bed2c4c45d9395af775a) but I will try the non-forking one as well so I can stay on the latest version easier.

The non-forking working around you provided works perfectly. Thanks for the quick response!

@soul2197 Are you using the PostGIS adapter gem for rails? It does seem to set some ignore_tables. Perhaps it's missing a few?
https://github.com/rgeo/activerecord-postgis-adapter/blob/d0d47db10f22525928c2d62b8c244d09137bbec2/lib/active_record/connection_adapters/postgis/setup.rb#L5

I've opened https://github.com/rgeo/activerecord-postgis-adapter/issues/208 as a fix with the PostGIS adapter. I think that's the proper place for it to be addressed.


Virtual Application and Redirects

Describe the bug
Our application is installed on-premise in various locations. On some places the application is hosted in the root of an IIS Website and in other places it is an Application under the root. Our migration path using this project would be to do the switcheroo: the current application would be moved to a new WebSite and the new Core application would take it's original place so the URLs stay the same.
When the application is a Website in IIS, this works pefectly. However, as a Virtual Application the redirects fail because the proxied application ignores the fact that the public URL lives under a path.
To Reproduce
Core Application: https://localhost/application
Webforms Application: https://localhost:666/redirect.aspx -> contains a redirect to ~/test.aspx
Navigate to https://localhost/application/redirect.aspx
-> Response: 302 to https://localhost/test.aspx
I would expect the Redirect to go to https://localhost/application/test.aspx
Further technical details
Please include the following if applicable:
ASP.NET Framework Application:

Technologies and versions used (i.e. MVC/WebForms/etc): WebForms, WebApi, MVC (the whole shebang)
.NET Framework Version: 4.8
IIS Version: 10.0.22000.675
Windows Version: 11

ASP.NET Core Application:

Targeted .NET version: 6.0
.NET SDK version: 6.0.300

@LodewijkSioen thanks for the bug. Can you provide the actual code you're using? There's potentially a few ways to initiate the flow you're describing. A minimum viable repro here would be helpful.

I was actually busy creating one when something came up at work. I just pushed it here: https://github.com/LodewijkSioen/SystemWebAdaptersRedirect/

@LodewijkSioen VirtualDirectories add in extra complexity. The challenge is that on the framework app, they are tightly integrated in with IIS and affect a lot of things like route generation/navigation/etc. Trying to override it in anyway causes problems. There is a workaround for this specific case (rewrite the Location header on the core app), but the central issue here is the difference in virtual directories.
Is there a reason you cannot deploy them to the same virtual directory but on different sites? That way the routes will be the same, but the port/url will be different (which is a much easier thing to address).

Deploy to different sites but the same Virtual Directory is certainly possible. Just tested it and it works. This is probably the simplest solution, but just for completeness, could you share how the workaround with the Location header rewrite would look like?

@LodewijkSioen for this specific instance, the following works (although I'd want to optimize it a bit more for production use):
app.Use(async (ctx, next) =>
{
   await next();

   if (ctx.Response.StatusCode == 302 &&
       ctx.Response.Headers.Location is { } location)
   {
       if (ctx.Request.PathBase is { HasValue: true } pathBase)
       {
           // TODO: probably want a more optimized for prod
           var locations = location.Select(l => pathBase.Add(l).ToString()).ToArray();

           ctx.Response.Headers.Location = new Microsoft.Extensions.Primitives.StringValues(locations);
       }
   }
});


proper way to construct a tensor on the fly?

My goal is to pad the image to the power of two. The following code works. But the way to construct pads pads = op.ConcatFromSequence(op.SequenceConstruct(zero, zero, padded_row, padded_col), axis = 0, new_axis=1) seems a bit cumbersome. Is this the proper way to construct a tensor on the fly? I tried the literal way # pads = [zero, zero, padded_row, padded_col], it does not work.
Thanks!
@script()
def pad_image(img_in):
    shape = op.Shape(img_in)
    next_row = find_next_power_of_two(shape[0])
    next_col = find_next_power_of_two(shape[1])

    zero = op.Constant(value=helper.make_tensor("int_zero", TensorProto.INT64, (), [0]))
    padded_row = next_row - shape[0]
    padded_col = next_col - shape[1]
    pads = op.ConcatFromSequence(op.SequenceConstruct(zero, zero, padded_row, padded_col), axis = 0, new_axis=1)
    # pads = [zero, zero, padded_row, padded_col]
    print(pads)

    img_padded = op.Pad(img_in, pads = pads, mode = 'reflect')
    return img_padded

Does op.Concat(zero, zero, padded_row, padded_col work for you?

Does op.Concat(zero, zero, padded_row, padded_col) work for you?

Thanks! Because these tensors are indeed scalars, so I have to unsqueeze them to 1D then concat, the following works. Not sure if this is a better way...
pads = op.Concat(op.Unsqueeze(zero, axes=[0]), op.Unsqueeze(zero, axes=[0]), op.Unsqueeze(pad_row, axes=[0]), op.Unsqueeze(pad_col, axes=[0]), axis = 0)

A naive question: how is this being run? I am a bit puzzled because this mixed-mode construction (interleaving script-time computation with onnx-construction) is doable in trace-mode, but not in script-mode.
Otherwise: nothing much to add to the existing discussion. If the shape is statically known, there may be other ways of doing this. But I assume you want to handle dynamic shapes here? So, Concat, as above, seems reasonable.

A naive question: how is this being run? I am a bit puzzled because this mixed-mode construction (interleaving script-time computation with onnx-construction) is doable in trace-mode, but not in script-mode.
Otherwise: nothing much to add to the existing discussion. If the shape is statically known, there may be other ways of doing this. But I assume you want to handle dynamic shapes here? So, Concat, as above, seems reasonable.

Sorry, i am not quite understand your comments... The script or trace modes are the ones in pytorch export?
If so, my context is different. The goal is not convert from pytorch, but directly write algorithm(not necessary deep learning model) in onnxscript. As shown inthis example, one step is to pad the image to the power of two. The shape of the input image is dynamic, but the shape of the pads is of course fixed as (4,).


Add support for creating Streams from Iterators

Supporting Iterators neatly permits both the built-in Iterator types and ES6 Generator functions.
var iterator = function* generate() {
  yield 1;
  yield 3;
  yield 7;
  yield 15;
};

Stream(iterator()).map(function(x) { return (x - 1) / 2 }).toArray();  // => [ 0, 1, 3, 7 ]

There may also be a case for supporting objects conforming to an "Enumerable" protocol (effectively providing a convenience for constructing iterators), but that seems like a secondary concern.

This is definitely on the roadmap along with streaming objects from ES6 sets and maps.
Though I have to figure out how to support the new stuff while retaining backward compatibility to ES5.

This feature has today been released in version 1.6.0. Again, thanks for your help. :+1:


Fixed reference to wrong module in intro text

Referenced forms instead of tables, probably copy-pasted.

Thanks!


Initialization Flow Experience

User Story:
As a wallet user
I want the setup to be as quick as possible
So that I can start using the app as soon possible
Acceptance Criteria:

start and background wallet initialization as soon as possible
perceived improved experience by seeing shorter loading screen

Notes:

give something to distract users (onboarding, EULA, tips, ...)
Check for technical limitations (e.g.: PIN/Biometrics is a requirement to start the initialization)

Wireframes:
https://xd.adobe.com/view/29c6299f-de61-4d73-8e92-aacb36565e4f-7c95/

Clarify the position of the EULA in the flow and revisit whether or not the gains (time saved) of this initialization flow is worth the effort.

Clarified that EULA can be placed after PIN/biometrics screens.

Concluded that reorganizing the initial onboarding screens does not provide enough value. Will explore simply adding expectations to the first "tip" when initialization starts.


Update actions for deprecation warnings

There's still one from the Emscripten build, but there isn't a version of that action with the fix yet.

Merged this and the other actions change as the same changes were merged to the SDK


[Question] What should each dimension of the inputs to mx.fast.rope be?

I'm trying to convert some Pytorch code into MLX, but I'm having trouble getting mx.fast.rope to play nicely. My current code uses the LlamaRotaryEmbedding from HuggingFace's transformers and behaves as follows:

First, it takes in a tensor of position_ids with shape [batch_size, seq_len].
Next, it multiplies position_ids with a stored inv_freq tensor to get freqs with shape [batch_size, seq_len, head_size // 2].
Next, it concatenates freqs with itself and takes the sin/cos to get two tensors with shape [batch_size, seq_len, head_size].
Finally, it applies the rotary position embedding to tensors q and k with shape [batch_size, n_heads, seq_len, head_size] and gets output tensors of the same shape.

I initially tried using mx.fast.rope with a=q and freqs=freqs, but MLX expects freqs to be a 1D array and a to have at least three dimensions. I tried playing around with transposing and flattening the input arrays, but nothing seemed to work.
Is there a way for me to use mx.fast.rope with this setup, or would I be better-off implementing RoPE manually?

You shouldn't need to use mx.fast.rope directly. You can just use nn.RoPE. See the Llama example.
You instantiate it like this:
rope = nn.RoPE(head_dim, traditional=False, base=rope_theta)

And call it like this:
queries = self.rope(queries, offset=offset)
keys = self.rope(keys, offset=offset)

The offset is used to apply rope starting at position offset instead of position 0, for example when doing autoregressive decoding with a cache.

How can I use position_ids or a custom list of frequencies with nn.RoPE?

You can pass custom frequencies to mx.fast.rope using the freqs parameter. You can't pass position ids to either nn.RoPE or mx.fast.rope.


add builds for al2022 based eks-distro-base

Issue #, if available:
Description of changes:
/hold
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm
/approve

/unhold


[ERROR] Radarr (http://radarr:7878): c.Req(queue): failed: http://radarr:7878/api/queue (status: 401/401 Unauthorized)

Getting this error and it seems to do with the api?
I am also unsure if this is a radarr issue or unpackerr issue.  I set up a compose file for unpackerr and use the hostname 'radarr' this works with 'sonarr' but in my testing I also tried the internal docker IP along with the host IP and get this same error.
I also refreshed my api key and tried a new one but radarr keeps giving this error.  Thoughts?
[ERROR] Radarr (http://radarr:7878): c.Req(queue): failed: http://radarr:7878/api/queue (status: 401/401 Unauthorized)

This was my issue neither unpackerr or radarr.

Sorry I didn't answer sooner. I honestly wasn't sure what to say. Looks like a bad api key from the error... Glad you figured it out!


Change resource access operator to ::

We want to resolve the parsing ambiguity here by choosing another
operator that doesn't overlap with any other features. :: is common
for namespacing kinds of things, and is similar to : which is what we
originally wanted.
Contributing a feature

[x] I have opened a new issue for the proposal, or commented on an existing one, and ensured that the Bicep maintainers are good with the design of the feature being implemented
[x] I have included "Fixes #{issue_number}" in the PR description, so GitHub can link to the issue and close it when the PR is merged
[x] I have appropriate test coverage of my new feature

@anthony-c-martin

Codecov Report

Merging #1815 (a209cbb) into main (53ed432) will increase coverage by 0.44%.
The diff coverage is 94.73%.

@@            Coverage Diff             @@
##             main    #1815      +/-   ##
==========================================
+ Coverage   95.03%   95.48%   +0.44%
==========================================
  Files         371      367       -4
  Lines       21692    21556     -136
  Branches       15        0      -15
==========================================
- Hits        20615    20582      -33
+ Misses       1077      974     -103

Flag
Coverage Δ

dotnet
95.48% <94.73%> (+<0.01%)
:arrow_up:

typescript
?

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

Impacted Files
Coverage Δ

src/Bicep.Core.UnitTests/Parsing/ParserTests.cs
100.00% <ø> (ø)

src/Bicep.Core/Syntax/SyntaxRewriteVisitor.cs
75.94% <0.00%> (ø)

...p.LangServer/Completions/BicepCompletionContext.cs
95.81% <66.66%> (ø)

...Bicep.Core.IntegrationTests/NestedResourceTests.cs
100.00% <100.00%> (ø)

src/Bicep.Core/Parsing/Lexer.cs
98.02% <100.00%> (+0.02%)
:arrow_up:

src/Bicep.Core/Parsing/Parser.cs
98.19% <100.00%> (ø)

src/Bicep.Core/Syntax/ResourceAccessSyntax.cs
100.00% <100.00%> (ø)

src/Bicep.Core/Syntax/SyntaxVisitor.cs
95.93% <100.00%> (ø)

src/vscode-bicep/src/extension.ts

src/vscode-bicep/src/utils/telemetry.ts

... and 3 more

There seems to be an issue with completions :(

If you type one character, you do get the correct completion, though:

Repro file:

resource vnet 'Microsoft.Network/virtualNetworks@2020-06-01' = {

  resource one 'subnets' = {

  }

  resource two 'subnets' = {

  }
}

output bar string  = vnet::o

output foo string = vnet::

I missed on place 😭
@majastrz - is there a good way to add this to tests? I looked and didn't quite grok how the dataset for completion tests is generated.

Discussed how completion tests work over IM.

Btw, do we also need doc updates?

Added link to a new issue as well.

Do you need to update the list of TriggerCharacters in the BicepCompletionHandler RegistrationOptions?

No, : is already there.
I found the issue btw, just working adding tests.

@majastrz @anthony-c-martin - updated


3d vectors doesn't match the same result as in 2d

Uncertain use of Z matrix (2nd context matric using N-gram algorithm).


FactoryMuffin loadDirectory filename regex does not seem to handle relative paths

Maybe the regex could be simpler as well? [^\/]+\.php$
https://regex101.com/r/rJ3hS9/1

Relative file path are intentionally not supported.

What was your use case?

The use case was loading a factories folder directly under /test/factories from a test class
/test/Ns1/xTest.php. Now i called realpath on the relative dir to get it working. Or update the regex to handle relative paths. Why is it intentionally not supported? ../../factories i understand, but /home/test/foo/../factories should work right?

Hmmm, ok. Feel free to submit a pull request, and I'll take a look at it. ;)

Ping @Bouwdie. ;)

Will take a look at it real soon @GrahamCampbell

Closing due to no response from the OP.


os module; call timeouts

introduces:

initial os module, to be active only in dev mode or when explicitly specified in config. allows to shell out. useful in many scenarios, such as running terraform and such. also good for demos. does not execute in a jailed environment, might be added in the future.
call timeouts, can be specified with ak_timeout=<duration> on any connection call.

well shit, i need to drop the one in integrations. i left it there by mistake.

added some features, changed return value to a struct. we should all discuss this.


Training on NeRF representation only returns white images for the rendered images and no depth maps.

I have tried to train on the NeRF representation, but the generator only returns white rendered images.

Can someone please help me? Are the weights of the lrm_reconstructor not loaded correctly?

Unfortunately, I don't have the answer to your question. However, since you have reached this step, I would like to ask if you could help me get there as well. How did you create your dataset? I managed to render a dataset with 32 random views, along with normal and depth maps. Now, I am stuck at the point where I have to save the camera positions for each view.

Hi, I would like to ask if you could help me render a dataset with 32 random views, along with normal and depth maps.Thanks a lot!

@SBlumenstock1 If the model cannot render anything during the training process, there is most likely something wrong with the camera poses in your dataset. Please refer to https://github.com/liuyuan-pal/SyncDreamer/blob/main/blender_script.py#L202 which used the same camera pose saving function as mine. To be noted, the function produces a world2cam matrix, please make sure it is inversed into a cam2world matrix in the dataloader.

I've encountered the same issue. I checked your processing in the dataset https://github.com/TencentARC/InstantMesh/blob/main/src/data/objaverse.py#L186 and you've already converted the world-to-camera matrix to the camera-to-world matrix, so it shouldn't be that. I also refer tohttps://github.com/liuyuan-pal/SyncDreamer/blob/main/blender_script.py for rendering the dataset , Could you please let me know where the problem might be?

I have tried to train on the NeRF representation, but the generator only returns white rendered images.

Can someone please help me? Are the weights of the lrm_reconstructor not loaded correctly?

I'm sorry to bother you. I used the camera pose data from the code along with the corresponding images, setting fx = fx * img_size, fy = fy * img_size, cx = 0.5 * img_size, and cy = 0.5 * img_size. Then, I trained a NeRF model using these parameters, but the training failed. The six images correspond to six separate 3D objects, with the result looking similar to the image below.

Could you provide details on the camera poses you have used?

I've encountered the same issue. I checked your processing in the dataset https://github.com/TencentARC/InstantMesh/blob/main/src/data/objaverse.py#L186 and you've already converted the world-to-camera matrix to the camera-to-world matrix, so it shouldn't be that. I also refer tohttps://github.com/liuyuan-pal/SyncDreamer/blob/main/blender_script.py for rendering the dataset , Could you please let me know where the problem might be?  @bluestyle97 @SBlumenstock1 Thank you!

Have you solved the problem?  thank you

I have tried to train on the NeRF representation, but the generator only returns white rendered images.

Can someone please help me? Are the weights of the lrm_reconstructor not loaded correctly?

I also encountered this problem. The pictures rendered by the model are all white. Have you found a solution?


resource_monitors: remove well_known_names

Signed-off-by: Long Dai<EMAIL_ADDRESS>
Commit Message:
Remove well_known_names in resource_monitors field, part of #7238
Additional Description:
Risk Level: LOW
Testing: functional, integration
Docs Changes: NONE
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]

please have a look @mattklein123


Invalid Content Type: image/jpeg

getting this on all of my worker logs:
"logs": [
{
"message": [
"Invalid Content Type: image/jpeg"
],
"level": "error",
"timestamp":<PHONE_NUMBER>837
}
what could be wrong?
also how does this work using a subdomain like your plugin? Im only using cloudflare for images using WP offload media to serve them...

Hi,
It seems the content type returned for the images is wrong. I cannot guess what's there and what kind of setup you have, but if you already "offloaded" your images into Cloudflare, image resizing makes no sense.
Please decide what you want to do and then take it step by step.
Regards


Run N-unit test on server machine from remote client

I have n-unit tests on server machine with production code binaries.
Wanted to execute these test from remote machine. preferable through n-unit or any process.
how can I execute these n-unit tests remotely?

NUnit doesn't currently support execution on remote machines but will do so in a future release.
For now, the best you can do is connect to the remote machine and use the command-line, provided you have access.

Hey Charlie, do you have any idea when this will be supported? Is it a feature of an upcoming release?

This is not actually an nunit-gui feature. The gui runs tests in any and all ways that the engine supports. We have had a long-standing issue to do this, previously nunit/nunit#701 which I just moved to nunit/nunit-console#167. It's not scheduled to be worked on in the next release. My guess is that we will have other things squared away and be able to deal with that after a few more releases.


Transact durations should always be millisecond + support other strings

For now, workflow context sleep takes in duratioinSec. But JS/TS developers always expect millisecond sleep/timeout. We should match the common practice in V2.
We should also consider adding support for strings like "2 days", "30s" by using the ms package.

@qianl15 we could add ms package support to the existing sleep function without a breaking change. sleep and sleepms both take a number parameter. If we changed that to number | string we could use the ms if the user passes in a string. Should we separate the non breaking functionality out into a separate issue?

Yeah that's a good idea. We can separately file an issue (non-breaking) saying we want sleep to support strings.


update from base 2021/12/15

Fixes #????

PR Checklist

[ ] Tests
[ ] Documentation
[ ] Changelog entry

This PR was created to compare changes in the origin to our fork


Add option to create openapi 3.0 links for generated schemas

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[x] I commit to help with one of those options 👆

Example Code
from fastapi import FastAPI
from pydantic import BaseModel

class CreateSubItem(BaseModel):
    id: int
    name: str

class CreateItem(BaseModel):
    id: int
    name: str
    sub_item_id: int

app = FastAPI()

@app.post("/subitem/")
async def create_sub_item(subitem: CreateSubItem):
    ...

@app.post("/item")
async def create_item(item: CreateItem):
    ...

Description
with OpenAPI 3.0 links, we can describe how various values returned by one operation can be used as input for other operations as described here.
I checked the documentation and GitHub issues but couldn't find anything related to this.
so in the code example i provided, we could get the returned CreateSubItem.id for the next request when we create an Item as CreateItem.sub_item_id.
Wanted Solution
It would be great if we could define these kinds of links somehow in the Pydantic models or any other way.
I'm sure there is a better way to implement this, but my suggestion is to define the relationship as a string to the Pydantic model. maybe as an extra keyword argument value to the Pydantic's Field.
for example Field(..., refrences="SomeModel.id") and FastAPI pickup that and create that refrence in schema generation.
Wanted Code
from fastapi import FastAPI
from pydantic import BaseModel

class CreateSubItem(BaseModel):
    id: int
    name: str

class CreateItem(BaseModel):
    id: int
    name: str
    sub_item_id: int = Field(..., refrences="CreateSubItem.id")

app = FastAPI()

@app.post("/subitem/")
async def create_sub_item(subitem: CreateSubItem):
    ...

@app.post("/item")
async def create_item(item: CreateItem):
    ...

Alternatives
No response
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.78.0
Python Version
3.10.4
Additional Context
No response

Well after a little more searching and messing around with this, I managed to implement a link in FastAPI. then found out that this feature is not yet implemented in swagger-UI!  swagger-api/swagger-ui#3641

Try-It-Out

...

[ ]  Links can't be used to stage another operation

the code i used to create the link:
from fastapi import FastAPI
from pydantic import BaseModel, Field

class CreateSubItem(BaseModel):
    id: int
    name: str

class CreateItem(BaseModel):
    id: int
    name: str
    sub_item_id: int = Field(..., name="sub_item_id")

app = FastAPI()

links = {
    "GetSubItemId": {
        "operationId": "create_item_item_post",
        "parameters": [{"sub_item_id": "$response.body#/id"}],
        "description": "The `id` value returned in the response can be used as the `sub_item_id` value in `POST /item`",
    }
}

@app.post(
    "/subitem/",
    status_code=201,
    responses={201: {"description": "Created", "links": links, "model": CreateSubItem}},
)
async def create_sub_item(subitem: CreateSubItem):
    return {"id": subitem.id, "name": subitem.name}

@app.post("/item")
async def create_item(item: CreateItem):
    return {"id": item.id, "name": item.name, "sub_item_id": item.sub_item_id}

It will be rendered as:

will close the issue for now.

Thanks for reporting back and closing the issue 👍

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


Remove version: Jackett.Jackett version 0.21.372

404 - release deleted
Microsoft Reviewers: Open in CodeFlow

URL: https://github.com/Jackett/Jackett/releases/download/v0.21.372/Jackett.Installer.Windows.exe
Response Error: The remote server returned an error: (404) Not Found.
(Automated message - build 918)


Is this really necessary?

Since Notion is only offered in English and Korean, what's the point of this?

This is a bug with apt when using "trivial archive" repositories rather than the "official archive" format - Ign stands for "ignore" since these files don't exist, but apt tries to download them anyway and logs the same lines multiple times.
The repository format is outside of my control since I'm using Gemfury which manages the repository for me - previously I was managing the repository myself and hosting with Firebase, but the bandwidth was too expensive.
I'm closing this since it's outside of my control, and these lines can be safely ignored.

Oh, now I see. Thanks for your response.


[Bug] Entity dropdown says "No matching entites found"

Short summary 📝
When I try to create the card from gui, the entity selector cannot find matching entity
Detailed description 📋
When I try to create the card from gui, the entity selector cannot find matching entity. But in the code editor when I put there "sensor.car", it finds my vehicle
Version 📌
1.5.0
Environment 🌐
Firefox Windows 11, latest HA.
Logs and screenshots 📂

Hi @Hooshee, entity is already automatically selected, otherwise you would not have the data displayed in the buttons. Entity is default in the form sensor.***_car where *** is car license plate

I probably know where the mistake is. I assumed that the user would have entities in the default form, so I filtered out the sensor.***_car entity and you only have the entity as sensor.car 😄 I will modify this method and publish in a new release 👍

@Hooshee Or ideally in the integration of the device, which is the car and name it. You would then have a better overview...

Will do, actually if I enter it in the yaml, and go back to gui, it deletes the yaml row of entity... so I'll rename my entity id.

WEll, I still can't manage to make it work. It actually was named as per you suggested:

I renamed sensor.car to sensor.tfh300 and other versions, but it still does not show up in the entity list.

That's strange, what is the entity for the sensor car? You can rename the entity_id for sensor car .. sensor.something_car

Entity list in the editor are just filtered entities start with sensor. and end with _car .. If you have it in another form, it won't be there.

I see... however, I cannot rename the sensor.car to anything else then sensor.xxxxxxx. The sensor part is not changeable.

It works! I misunderstood the format, but now it's OK. Thank you very much!


pre-Open Source checklist

Just adding a few items here, will add/remove later when I give it some more thought:

[x] [Readme] Explain that is it all about
[x] [Readme] Explain shortcomings or list of things that we know we can improve
[ ] [Code] Refactor api/models/flow.model.js and api/models/flow-template.model.js to have a similar structure
[x] [Code] Complete Swagger documentation #28
[x] [Code] Revise error message handling (sent to the user) and logging (on console) (or add to to do list)
[x] [Code] Update package.json description and tags for better SEO (or add to to do list)
[x] [Readme] mention the URL parameter (either that the name should be url or what we decide to use in #32
[ ] [Code] Skip metrics when running tests

@malave is this one done now? (if so can you close?)


fix(core + preset-mini): add color layer + shadow color

I didn't find any rule with layer, so I'm not sure if this the correct way to fix the issue: what happens if the user provides its own layers with no color layer?
Maybe we can change the approach using another internal variable, then initilize it with the default value, for example:

packages/preset-mini/src/theme/misc.ts
export const boxShadow = {
  'DEFAULT': '0 1px 3px 0 rgba(var(--un-internal-shadow-color), 0.1), 0 1px 2px 0 rgba(var(--un-internal-shadow-color), 0.06)',
  'sm': '0 1px 2px 0 rgba(var(--un-internal-shadow-color), 0.05)',
  'md': '0 4px 6px -1px rgba(var(--un-internal-shadow-color), 0.1), 0 2px 4px -1px rgba(var(--un-internal-shadow-color), 0.06)',
  'lg': '0 10px 15px -3px rgba(var(--un-internal-shadow-color), 0.1), 0 4px 6px -2px rgba(var(--un-internal-shadow-color), 0.05)',
  'xl': '0 20px 25px -5px rgba(var(--un-internal-shadow-color), 0.1), 0 10px 10px -5px rgba(var(--un-internal-shadow-color), 0.04)',
  '2xl': '25px 50px -12px rgba(var(--un-internal-shadow-color), 0.25)',
  'inner': 'inset 0 2px 4px 0 rgba(var(--un-internal-shadow-color), 0.06)',
  'none': 'none',
}

packages/preset-mini/src/rules/shadow.ts
export const boxShadows: Rule<Theme>[] = [
  [/^shadow-?(.*)$/, ([, d], { theme }) => {
    const value = theme.boxShadow?.[d || 'DEFAULT']
    if (value) {
      return {
        '--un-internal-shadow-color': 'var(--un-shadow-color, 0,0,0)',
        '--un-shadow': value,
        'box-shadow': 'var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)',
      }
    }
    const color = colorResolver(d, theme)
    if (color)
      return color
  }],
]

closes #297

Without adding layer, splitting the rules should also prioritize the color.
[/^shadow-(.+)$/, ([, d], { theme }) => colorResolver(d, theme)],

Using internal variable is good too. I was thinking using it on border- to support multiple side coloring.

Without adding layer, splitting the rules should also prioritize the color.
[/^shadow-(.+)$/, ([, d], { theme }) => colorResolver(d, theme)],

Using internal variable is good too. I was thinking using it on border-<direction> to support individual side coloring.

See the issue, problem with 2 elements.

When the rules split, the bottom rule will take precedence even without layering.
Snapshot without layer option:

I don't think we should introduce layers for general rules. Separate the breaking points and color resolvers into two rules with the order will solve the ordering issue.

Ok, should we review all rules using default css custom property like this one?


cxx::expected's bool operator should return has_value()

Required information
Observed result or behaviour:
Currently, the boolean operator of cxx::expected returns has_error().
Expected result or behaviour:
According to the proposal (pg. 23), it should return has_value().

I guess this was already merged with #297. Right @ithier ?


Add support for tests on components that import mbed.h

Dependency on #4.
Currently, if you try to build something like test_Sensor.cpp, with the following command:
g++ -Wall -Wextra -o ${BUILD_ROOT}${FILE} -I ${SRC_ROOT} ${file} ${SRC_ROOT}${DIR}/*.cpp

You'll get an error like this for classes that use mbed.h:
Generating test for ./Sensor/test_Sensor.cpp.
In file included from ../src/./Sensor/Sensor.cpp:13:0:
../src/./Sensor/Sensor.h:15:10: fatal error: mbed.h: No such file or directory
 #include "mbed.h"
          ^~~~~~~~
compilation terminated.
Didn't find an executable.
./Sensor/test_Sensor.cpp test Generated.

Potentially experimenting with the flag -I {MBED_ROOT}. May have to build MBED while we're at it.

While this will allow us to compile files, it won't allow us to run them (probably) since they need to be flashed onto a uC and tested there.
Further consideration is required for going down this route. Does it make sense to add to the script to flash to a connected uC if available and somehow test with that? That might depend on using printf debugging and mbed sterm.
Even before this though, we'll have to figure out how to get mbed to compile specifically the test cases in TESTS/ and put them in the TESTS/BUILD/ folder.


evm_increaseTime does not increase timestamp

See:
$ truffle console
truffle(development)> web3.eth.getBlock("latest").timestamp
><PHONE_NUMBER>
truffle(development)> web3.currentProvider.send({jsonrpc: "2.0", method: "evm_increaseTime", params: [500000], id: 123})
{ id: 123, jsonrpc: '2.0', result: 500000 }
truffle(development)> web3.currentProvider.send({jsonrpc: "2.0", method: "evm_increaseTime", params: [500000], id: 123})
{ id: 123, jsonrpc: '2.0', result: 1000000 }

When using evm_increaseTime, the result returns a value that appends to 0, instead of adding onto the block time.
The expected result value should be<PHONE_NUMBER> + 500000, but instead, it returns 0 + 500000.
How can I fix this?
Your Environment

Version used: v4.1.3
Operating System and version: Mac OSX

Have you tried mining a block after setting the time?

works for me as long as I mine a block after.

@W3stside I assume this is supposed to be used with web3.js before 1.0. Do you know how it could be used in web3.js 1.0?

@naumenkogs there is little change in the web3 1.0 version, namely, sendAsync changes to send.
web3.currentProvider.send({
  jsonrpc: '2.0',
  method: 'evm_increaseTime',
  params: [10000],
  id: new Date().getSeconds()
}, (err, resp) => {
  if (!err) {
    web3.currentProvider.send({
    jsonrpc: '2.0',
    method: 'evm_mine',
    params: [],
    id: new Date().getSeconds()
  }
  }
})

Just a note in case anyone else gets an error when switching out their old sendAsync for send but get errors like ...id of undefined that trace to the _addResponseCallback method. Updating to latest Beta plus a npm r web3 && npm i web3 fixed


Remove: Json from example.

I found a great crate!!
I was building my own server based on the examples and it looks like the crate::extractors::Json defined in the examples is actually unnecessary and could be replaced by axum_jsonschema::Json.
I removed the type for those who will touch the examples in the future.
If there is an intention and it is necessary, I would like to know the reason.
Thank you.

I understood the intent.
I would like to close this MR as it exists for a reason.


Add simple endpoint to check if application is initialized

This is a lightweight endpoint that can be used by services to monitor the uptime of an application without going through the full gamut of healthchecks. It's meant for using in something like a k8s cluster where you want a simple endpoint to know an application has been initialized, or to continually probe for uptime.

Hi @Chris7,
Thanks for reaching out, and thank you for your contribution. Code wise, I have no comments, it's pretty straightforward. I am curious about the use case, though. This is very different from what this package usually does. With that in mind, the code you added anyone could easily implement in their applications themselves. With that in mind I am a bit conflicted to merge it.
I'd appreciate multiple opinions. If you find more people who request this feature, I would be happy to merge it.
Best,
Joe

Thanks for your fast response. Here's some more context for our use case:
I agree it is trivial, but for a place with multiple django servers running, having all your healthchecks added in a single package is very useful rather than implementing the same snippet every time.
Here's 2 cases we use this endpoint for:

Service uptime -- we have a bot that hits ping every couple of seconds to provide latency and uptime information -- having a long healthcheck or one that hangs on unresponsive services (e.g. s3) can actually end up taking down your application if you overwhelm all the worker threads.
Container registration in our docker deployment. A service needs to tell the load balancer that it is ready to accept traffic after a container has been started. This is usually called a "readiness probe" in kubernetes. It means that the application has been initialized and is ready to serve traffic and can be added to the load balancer.

But we can see if anyone else fits that niche as well :).


css added and connecting different functionality

Merge

merge css and main

I have no idea what is going on.


install failure on Ubuntu

igalic@levix ~/s/p/Mancy (master|✔)> npm install
npm WARN deprecated<EMAIL_ADDRESS>react-tools is deprecated. For more information, visit https://fb.me/react-tools-deprecated
npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained. Upgrade to<EMAIL_ADDRESS>npm WARN deprecated<EMAIL_ADDRESS>this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g
npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g
npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g

><EMAIL_ADDRESS>install /home/igalic/src/plt/Mancy/node_modules/nslog
> node-gyp rebuild

igalic@levix ~/s/p/Mancy (master|✔) [1]> npm run package

><EMAIL_ADDRESS>package /home/igalic/src/plt/Mancy
> gulp package

[10:36:29] Requiring external module babel-core/register
[10:36:33] Using gulpfile ~/src/plt/Mancy/gulpfile.babel.js
[10:36:33] Starting 'build'...
[10:36:33] Starting 'clean'...
[10:36:33] Finished 'clean' after 8.96 ms
[10:36:33] Starting 'watchableCopy'...
[10:36:34] Finished 'watchableCopy' after 88 ms
[10:36:34] Starting 'copy'...
[10:36:54] Finished 'copy' after 20 s
[10:36:54] Starting 'sass'...
[10:36:54] 'sass' errored after 31 ms
[10:36:54] Error: The `libsass` binding was not found in /home/igalic/src/plt/Mancy/node_modules/node-sass/vendor/linux-x64-47/binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.
    at Object.sass.getBinaryPath (/home/igalic/src/plt/Mancy/node_modules/node-sass/lib/extensions.js:158:11)
    at Object.<anonymous> (/home/igalic/src/plt/Mancy/node_modules/node-sass/lib/index.js:16:36)
    at Module._compile (module.js:397:26)
    at Module._extensions..js (module.js:404:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/igalic/src/plt/Mancy/node_modules/babel-register/lib/node.js:138:7)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/igalic/src/plt/Mancy/node_modules/gulp-sass/index.js:183:21)
[10:36:54] 'build' errored after 20 s
[10:36:54] Error in plugin 'run-sequence'
Message:
    An error occured in task 'sass'.

npm ERR! Linux 4.2.0-23-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "package"
npm ERR! node v5.4.1
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>package: `gulp package`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>package script 'gulp package'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mancy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp package
npm ERR! You can get their info via:
npm ERR!     npm owner ls mancy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/igalic/src/plt/Mancy/npm-debug.log
igalic@levix ~/s/p/Mancy (master|✔) [1]>

here's the npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'package' ]
2 info using<EMAIL_ADDRESS>3 info using<EMAIL_ADDRESS>4 verbose run-script [ 'prepackage', 'package', 'postpackage' ]
5 info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>6 silly lifecycle<EMAIL_ADDRESS>no script for prepackage, continuing
7 info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>8 verbose lifecycle<EMAIL_ADDRESS>unsafe-perm in lifecycle true
9 verbose lifecycle<EMAIL_ADDRESS>PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/igalic/src/plt/Mancy/node_modules/.bin:/opt/rumprun/bin:/home/igalic/bin:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle<EMAIL_ADDRESS>CWD: /home/igalic/src/plt/Mancy
11 silly lifecycle<EMAIL_ADDRESS>Args: [ '-c', 'gulp package' ]
12 silly lifecycle<EMAIL_ADDRESS>Returned: code: 1  signal: null
13 info lifecycle<EMAIL_ADDRESS>Failed to exec package script
14 verbose stack Error<EMAIL_ADDRESS>package: `gulp package`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:821:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid<EMAIL_ADDRESS>16 verbose cwd /home/igalic/src/plt/Mancy
17 error Linux 4.2.0-23-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "package"
19 error node v5.4.1
20 error npm  v3.3.12
21 error code ELIFECYCLE
22 error<EMAIL_ADDRESS>package: `gulp package`
22 error Exit status 1
23 error Failed at the<EMAIL_ADDRESS>package script 'gulp package'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the mancy package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     gulp package
23 error You can get their info via:
23 error     npm owner ls mancy
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

@igalic run  npm rebuild node-sass and then npm install which will run electron-rebuild as part of postinstall script. Finally generate package using npm run package

\o/ thanks


Set up Jenkins build

Retest this please

retest this please

retest this please

retest this please

recheck this please


Untangle locale-setting code

At the moment the locale-setting code (in lib/scopehal/Unit.h) uses the C API and does not appear thread-safe on Windows. Additionally, on macOS it seems to not correctly reset the locale on application exit.
Previously there were issues with file interchange due to locale (https://github.com/ngscopeclient/scopehal/issues/494). The OS is supposed to set the application's locale to C on startup, but obviously something isn't right, so this needs to be thoroughly investigated to clean up the API calls and prevent further interchange issues.

Conjecture: GTK was doing something with locales in glscopeclient that might no longer be an issue now that we're not using GTK?


Allows template and templateUrl to be functions.

Allows template and templateUrl properties of both a field type or field definition be functions.
Use case: A select type that uses a custom select directive such as ui-select which can be a single or multiple select which require different templates.

Quick look on mobile looks good, but I'd like to verify before merging. Thanks!

Looks good! Thanks. I'm also going to add the ability to return a promise from these functions just to mirror all other apis.


Zones in North Central US

According to the Azure documentations, North Central US does not support Zone redundancy on Azure regions and availability zones | Microsoft Docs (https://docs.microsoft.com/en-us/azure/availability-zones/az-overview)
When we have tried it out using pick zones then it is returning ["1", "2", "3"] for North Central US

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

ID: cca70845-100f-2cfd-aba3-34b7fa4a5264
Version Independent ID: 475b26e5-9e23-f769-3bd5-cbc4a678dbf0
Content: Azure regions and availability zones
Content Source: articles/availability-zones/az-overview.md
Service: azure
GitHub Login: @awysza
Microsoft Alias: rarco

Is this a valid region?

@naeisner  Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.


horovod seg-fault with mxnet pip wheels

I am working on a bug fix for mxnet master with my horovod branch: https://github.com/eric-haibin-lin/horovod/tree/mx2
I noticed that the example passes if I use mxnet built from source:
# install mxnet
git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
cd mxnet
cp config/linux.cmake config.cmake
rm -rf build
mkdir -p build && cd build
cmake -GNinja ..
cmake --build . --parallel 48
cd ../python; python setup develop --user;
cd ./mxnet; ln -s ../../include include; ln -s ../../3rdparty 3rdparty;

# install horovod
cd horovod; python setup.py install --user;

# run example
cd example; horovodrun -np 2 mxnet2_mnist.py

However, it segfault immediate after the first broadcast call if I use the mxnet nightly pip wheel from https://repo.mxnet.io/dist/python such as:
https://repo.mxnet.io/dist/python/cpu/mxnet-2.0.0b20200721-py2.py3-none-manylinux2014_x86_64.whl
----------Python Info----------
Version      : 3.7.6
Compiler     : GCC 7.3.1 20180712 (Red Hat 7.3.1-6)
Build        : ('default', 'Feb 26 2020 20:54:15')
Arch         : ('64bit', 'ELF')
------------Pip Info-----------
Version      : 20.1.1
Directory    : /home/ec2-user/.local/lib/python3.7/site-packages/pip
----------MXNet Info-----------
Version      : 2.0.0
Directory    : /home/ec2-user/src/mxnet/python/mxnet
Num GPUs     : 0
Hashtag not found. Not installed from pre-built package.
----------System Info----------
Platform     : Linux-4.14.173-137.229.amzn2.x86_64-x86_64-with-glibc2.2.5
system       : Linux
node         : ip-172-31-81-80.ec2.internal
release      : 4.14.173-137.229.amzn2.x86_64
version      : #1 SMP Wed Apr 1 18:06:08 UTC 2020
----------Hardware Info----------
machine      : x86_64
processor    : x86_64
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              48
On-line CPU(s) list: 0-47
Thread(s) per core:  2
Core(s) per socket:  24
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
Stepping:            7
CPU MHz:             1208.761
BogoMIPS:            4999.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            36608K
NUMA node0 CPU(s):   0-47
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke avx512_vnni

[1,0]<stdout>:(gdb) bt
[1,0]<stdout>:#0  0x00007ffff7419b80 in pthread_mutex_lock () from /lib64/libpthread.so.0
[1,0]<stdout>:#1  0x00007fff68a1b81d in mxnet::engine::ThreadedVar::AppendWriteDependency(mxnet::engine::OprBlock*) ()
[1,0]<stdout>:   from /home/ec2-user/.local/lib/python3.7/site-packages/mxnet/libmxnet.so
[1,0]<stdout>:#2  0x00007fff68a176ff in mxnet::engine::ThreadedEngine::Push(mxnet::engine::Opr*, mxnet::Context, int, bool) ()
[1,0]<stdout>:   from /home/ec2-user/.local/lib/python3.7/site-packages/mxnet/libmxnet.so
[1,0]<stdout>:#3  0x00007fff68a147a7 in mxnet::engine::ThreadedEngine::PushAsync(std::function<void (mxnet::RunContext, mxnet::engine::CallbackOnComplete)>, mxnet::Context, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*> > const&, std::vector<mxnet::engine::Var*, std::allocator<mxnet::engine::Var*> > const&, mxnet::FnProperty, int, char const*, bool) ()
[1,0]<stdout>:   from /home/ec2-user/.local/lib/python3.7/site-packages/mxnet/libmxnet.so
[1,0]<stdout>:#4  0x00007fff688f5f42 in MXEnginePushAsync ()
[1,0]<stdout>:   from /home/ec2-user/.local/lib/python3.7/site-packages/mxnet/libmxnet.so
[1,0]<stdout>:#5  0x00007ffdcc11ace9 in horovod::mxnet::PushHorovodOperation (
[1,0]<stdout>:    op_type=op_type@entry=horovod::common::Request::BROADCAST,
[1,0]<stdout>:    input=input@entry=0x182fb90, output=output@entry=0x182fb90,
[1,0]<stdout>:    name=name@entry=0x7ffdd5e63f20 "0.bias", priority=priority@entry=0,
[1,0]<stdout>:    root_rank=root_rank@entry=0) at horovod/mxnet/mpi_ops.cc:138
[1,0]<stdout>:#6  0x00007ffdcc116010 in horovod::mxnet::horovod_mxnet_broadcast_async (
[1,0]<stdout>:    input=0x182fb90, output=0x182fb90, name=0x7ffdd5e63f20 "0.bias",
[1,0]<stdout>:    root_rank=0, priority=0) at horovod/mxnet/mpi_ops.cc:301

Horovod includes the MXNet C++ headers and based on them interacts with the Engine:
https://github.com/horovod/horovod/blob/cf022be959a7c9431a8415729758b26dec1a87e5/horovod/mxnet/mpi_ops.h#L23-L24
But C++ does not have a stable ABI and your Horovod isn't compiled with the same ABI as the MXNet binary wheel. Thus it crashes.

We may want to remove the C++ API headers from the pip package, to prevent anyone from relying on C++ ABI by mistake.

Thanks for the investigation and good catch about the c++ headers. I agree. We need to rewrite the integration code using only the c APIs to avoid ABI compatibility issues


Ordered Logistic Regression Tutorial

Leaving this here for someone to do in the future if they want/can -- we should probably have a tutorial for ordered logistic regressions. They're probably the most criminally underused statistical model in the social sciences. There's also a decent chance that someone will take a look at the multinomial regression and incorrectly think that's what they want to use when they have an ordered category, or worse still, a linear regression.
See also the related #67

Maybe, this could just be a note in the linear regression? Do you, also, have a citation for the claim that these models are so great? Out of curiosity.

Maybe, this could just be a note in the linear regression? Do you, also, have a citation for the claim that these models are so great? Out of curiosity.

Ordered logistic regressions are very different from linear regressions; I don't think they should be lumped together. It's less that these models are great, and more that they're a decent model for analyzing ordinal data. Psychologists use linear regressions to model ordinal data (incorrectly) all the time instead, which creates some pretty severe noise and puts a downward bias on their regression coefficients. See here.


Create my_review.md

This is my review proposal for the hugging face repo.
Thanks for the contribution! Please make sure your review is a new Markdown file in the new_reviews directory, eg: new_reviews/my_reviews.md.
Once you submit your pull request, the review will be validated and once all tests have passed we'll merge it into the repo.  GitHub Pages will then auto-magically generate the review at repo-reviews.github.io.
:heart: Repo-Reviews Contributors

I have added a image to use in the review.

hi @AuroraCoboAguilera thank you for your review!
It looks like the build is failing because the repo_owner is your GitHub username, and that repo does not exist.  huggingface would be the owner of the huggingface repos, which include repos like accelerate, transformers, etc.  Judging from your review, you might want to do something like:
---
repository_owner: huggingface
repository_name: transformers
review_title: Hugging face, the accelerator to develop your own NLP
---

One other thing: to include a screenshot in your review, you can just paste the screenshot directly into the GitHub issue and it will upload the file to GitHub.  GitHub will then create a link to the uploaded asset that looks something like:
![image](https://github.com/repo-reviews/repo-reviews.github.io/assets/135327276/a13509ff-f420-4514-b543-dc377a687f4d)

Feel free to submit another PR with the same review, and:

updated repository_owner and repository_name frontmatter
a GitHub-based screenshot

Thanks 👍

@AuroraCoboAguilera thanks- I see  you fixed the frontmatter before I could even suggest how to fix it!  Please update the image link with a GitHub-native url and remove the Screenshot.png file from the new_reviews directory 🙏


How to contribute?

This is something very cool and lacking.
Would love to make some contribution to this, can we have contributors' guide, steps to contribute and a few issues.
Maybe people will see it and come around.
Thanks

Thanks for your interest in the library!
Well, judging from the number of stars, I guess few people are interested in it :( So I may spend more of my spare time to https://github.com/fzyzcjy/flutter_rust_bridge (and a few other libs) since more people are using them.
However, for example, if there are at least 100~200 stars and is continuously growing, it is more likely that the community wants it. Then I may spend time cleaning up the code and making contribution guides etc.

I decide to continue working on it. It is now in: https://github.com/fzyzcjy/flutter_convenient_test

Thanks will check it out :")

@Rohithgilla12 :)


[SPARK-42468][CONNECT] Implement agg by (String, String)*

What changes were proposed in this pull request?

Starting to support basic aggregation in Scala client. The first step is to support aggregation by strings.
Why are the changes needed?

API coverage
Does this PR introduce any user-facing change?

No
How was this patch tested?

UT

@hvanhovell


⚠ LPDM Handbook (hosted on Divio) has degraded performance

In bf95e5a, LPDM Handbook (hosted on Divio) (https://repohubdev.tk) experienced degraded performance:

HTTP code: 500
Response time: 5165 ms

Resolved: LPDM Handbook (hosted on Divio) performance has improved in 0921694.


FW_PSP_OFF and FW_RSP_OFF parameter description improvements

FW_PSP_OFF description currently says:

An airframe specific offset of the pitch setpoint in degrees, the value is added to the pitch setpoint and should correspond to the typical cruise speed of the airframe.

The word "speed" might be replaced with:

"... typical cruise pitch angle (angle of attack) of the airframe."

A similar change could be made to the description of FW_RSP_OFF by replacing "speed" with "roll angle".

This was originally posted  by @jeffstreet in https://github.com/PX4/px4_user_guide/issues/54

+1 for these suggestions.

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 30 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.)


SR-10689: Fix bugs of DataProtocol's firstRange(of:in:)/lastRange(of:in:).

DataProtocol's firstRange(of:in:) and lastRange(of:in:) return a wrong value or crash under some conditions because they handle indices incorrectly.
Resolves SR-10689.

Note: This PR is a counterpart of https://github.com/apple/swift-corelibs-foundation/pull/2499 .

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - 0a5e93e0e4779ca9c95601542abcf8a57ca75f24

I'm sorry. The failure is caused by my rudimentary mistake. I'll fix it.

I am sorry for the late fix. Now it is rebased and would pass tests.

Can one of the admins verify this patch?

apple/swift-corelibs-foundation#2499
@swift-ci test

All tests of this PR and scf#2499 have passed.
I believe these are not stale.

@phausler
Thank you very much.
It would be ready to be merged.


Flaky WearDataLayerRegistryTest

WearDataLayerRegistryTest is failing in CI with the following error
com.google.android.horologist.data.WearDataLayerRegistryTest > testPreferencesDataStore[test(AVD) - 11] FAILED
    kotlinx.coroutines.test.UncompletedCoroutinesError: After waiting for 60000 ms, the test coroutine is not completing
    at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$3$3.invokeSuspend(TestBuilders.kt:342)

also
com.google.android.horologist.data.WearLocalDataStoreTest > testConcurrentWrites[test(AVD) - 11] FAILED
	kotlinx.coroutines.test.UncompletedCoroutinesError: After waiting for 10s, the test coroutine is not completing
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$2$1.invoke(TestBuilders.kt:349)
Tests on test(AVD) - 11 failed: There was 1 failure(s).

com.google.android.horologist.networks.NetworkRepositoryTest > testNetworks[test(AVD) - 13] FAILED
	expected not to be empty
	at com.google.android.horologist.networks.NetworkRepositoryTest$testNetworks$1.invokeSuspend(NetworkRepositoryTest.kt:66)

com.google.android.horologist.mediasample.playback.PlaybackErrorTest > testFailingItem[test(AVD) - 13] FAILED
	kotlinx.coroutines.test.UncompletedCoroutinesError: After waiting for 10s, the test coroutine is not completing, there were active child jobs: [DispatchedCoroutine{Active}@8cf0342]
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$2$1.invoke(TestBuilders.kt:349)

Resolved by robolectric?


solved #4988 #4989 #4990

solved #4988 #4989 #4990
Description
[Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.]

Type of PR

[ ] Bug fix
[ ] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes. Make sure to attach before & after screenshots in your PR.]
Checklist:

[ ] I have made this change from my own.
[ ] I have taken help from some online resources.
[ ] My code follows the style guidelines of this project.
[ ] I have performed a self-review of my own code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[ ] My changes generate no new warnings.
[ ] I have tested the changes thoroughly before submitting this pull request.
[ ] I have provided relevant issue numbers and screenshots after making the changes.

@atmajaa please merge this mam

@atmajaa please merge this fast


Custom scalar deserialization error

Not sure if I'm just misunderstanding how this is supposed to work. I have a somewhat complicated type that I would like to send over GraphQL. No problem, I used the juniper::graphql_scalar! macro to just dump it to and load from a JSON string, seem to compile and serializes fine.
But when I query the server with the client, the client doesn't use the from_str function, it just tries to call serde_json::from_str on the whole graphql blob here, which of course fails because my custom type is now just a string from serde's point of view. Is this intended behavior? I expected the client to use it's own deserialization rather than rely on serde.

I'm not sure I understand the exact setup, correct me if I'm wrong. You have a custom scalar type that is serialized as a string in the JSON responses from your API. The right thing to do, on the client side, would be using the FromStr implementation on the JSON string to get your custom type, but it doesn't work because it's using the serde::Deserialize impl, which probably expects an object.
Ideally we would have a way to insert a #[deserialize_with = "<the custom type::from_str"] on the field, maybe that's what we should do (but it's also nice not to be tied to strings, as far as I know custom scalars can be serialized to something else).
One way to do it would be implement TryFrom<&str> for your type by using from_str, and then use the try_from annotation on your struct.

It's a real problem so thanks for reporting, by the way :)

You are mostly right except from_str is a function I defined inside the juniper::graphql_scalar! macro. I basically have
juniper::graphql_scalar!(MyType {
    resolve(&self) -> Value {
        let s = serde_json::to_string(self).unwrap();
        juniper::Value::scalar(s)
    }
    from_input_value(v: &InputValue) -> Option<Self> {
        v.as_scalar_value::<String>().and_then(|s| {
            serde_json::from_str(s).ok()
        })
    }
    from_str<'a>(value: ScalarToken<'a>) -> juniper::ParseScalarResult<'a> {
        <String as juniper::ParseScalarValue>::from_str(value)
    }
});

But the from_str impl doesn't actually get used by the web client.
Incidentally, MyType isn't super complex, it is just an enum where some variants have fields
enum MyType {
    X,
    Y { a: i32, b: Vec<i32> },
    Z { c: String }
}

etc.
If there is a better way to do it, I'm all ears! I looked into using a union but would seem to require lots more boilerplate.

Ok I think I have an idea (may be wrong).
One way to "trick" serde into doing it would be, when defining your alias for the custom scalar in your client code, do something like:
struct MyType(#[serde(deserialize_with="backend_types::MyType::from_json_str"] backend_types::MyType);

See https://serde.rs/field-attrs.html for the serde attribute. Since tuple structs (structs with unnamed fields) are "transparent" for serde-json, that's equivalent to redefining the deserialize implementation.
Then you can define from_json_str on your type in terms of  serde_json::from_str(s).

Even if it works it's ugly, so we should document it, and try to find a cleaner way to achieve this.

Yes that's a decent workaround, I'll give it a go.
At first I thought this PR would fix it but actually I think it would suffer the same problem.


Outdated Node dependency issue

We're getting this warning from workflows that use the current version (v3.3.0) of this action:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: jurplel/install-qt-action/action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
I'm guessing something needs to be done...

I can't provide access to the log of what was going on; it's a private repo. OTOH, it appears to be unrelated to anything in my code other than that we're using the action.

Run<EMAIL_ADDRESS>Run actions/setup-python@v4

install-qt-action seems to use setup-python v4 used. use setup-python v5 will fix this trouble ?
https://github.com/actions/setup-python/releases

From the workflow of a fork of this repo:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/setup-python@v4, ./action. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.


Please read: some history for maintainers

The development of this feedstock was done in https://github.com/conda-forge/staged-recipes/pull/292 where a number of issues were found on OSX and Windows.
The good news: if you change something it will likely be picked up by failures in the CI.
The bad news: the changes are really subtle.

Thanks for enduring that learning experience!

We have binaries in https://anaconda.org/conda-forge/pyzmq/files.

I think things have stabilized and matured a fair amount here, so we don't need to keep this open.


(#100) Cannot set persistent menu because your app is not set as the primary app for the page.

Howdy all,
Has anyone seen the above error recently? We've seen this start to pop up in error logs, even when the page has no other apps connected to the page. It's quite bizarre.
I'm trying to work through it with Facebook at the moment, but as usual they're being less than useless so I was wondering/hoping folks around here had run into (and resolved) the same issue.

I am having the same problem. I would appreciate your help if it solves it


Renaming stuff in README

We could rename the pypi package to manim-ce; this just fixes some stuff in the readme if we were to rename it.

I believe so. Pinging @leotrs and @eulertour for input.

This seems premature; I don't think we reached a consensus on this.

Alright, removing my review for this until we reach a consensus as to what we're going to name this Manim version.

Closing this for now. Can reopen when #163 is closed.


comento Find out more

- Summary

- Test plan

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

👷 Deploy Preview for gentle-figolla-02caaa processing.

Name
Link

🔨 Latest commit
f36a7ebe23e9af4a922505e62ce2adf8751f8cd5

🔍 Latest deploy log
https://app.netlify.com/sites/gentle-figolla-02caaa/deploys/6347835b8c5dc2000818af37


[Gluten-898]Update substrait proto

Changelog category (leave one):

New Feature
Update substrait proto by velox

Information about CI checks: https://clickhouse.tech/docs/en/development/continuous-integration/
test this please with 898

Can one of the admins verify this patch?

test this please with 898

test this please with 898


Additional symbols

Hello, thanks for great library! I want to ask how I can add two glyphs to default font? Actually I need Euro and GBP symbols. And one more question is it possible to align text to left and to right or it is only way to do it with setCursot() fucntion? Thank you!

This is a question for the AdafruitGFX library I'm afraid.


Add scarthgap compatibility

I would propose to do two things...

Move fixes xen's do_configure into separate PR, which needs more investigation and discussion. At first, we need to look into full do_configure after parsing of all appends, to understand do we really do double configuration. Only after that, we can discuss how to properly fix it, if needed, taking into account our multi-level architecture (common, platform, product).

PR with the upgrade to scarthgap will be set to [ON HOLD] status, until we will make an upgrade for xt-rcar, products, create kirkstone branches for xt-common, xt-rcar.

LAYERSERIES_COMPAT is not upgraded to the scarthgap for the layer meta-xt-security in the first commit.
This layer was not present during the creation of the PR, and was added latter.

PR with the upgrade to scarthgap will be set to [ON HOLD] status, until we will make an upgrade for xt-rcar, products, create kirkstone branches for xt-common, xt-rcar.

Why, though?
We don't need to do this in one go. If meta-xt-common will be compatible with both scarthgap and kirkstone, it will be enough both for RPi project and it should not break existing products

PR with the upgrade to scarthgap will be set to [ON HOLD] status, until we will make an upgrade for xt-rcar, products, create kirkstone branches for xt-common, xt-rcar.

Why, though?

Yes, that was my erroneous proposal.

One more note...
Seems we will not be able to use
LAYERSERIES_COMPAT_xt-driver-domain = "kirkstone scarthgap"

because I found a change in meta-virtualization/.../xen.inc.
In the scarthgap they replaced RPROVIDES = virtual/xenstored with virtual-xenstored.
As a result, we have broken all backends and xen-network.
So we will have to use separate branches of the xt-common for kirkstone and scarthgap, or have to find some possibility to make yocto-dependent overrides for RRECOMENDS  for backends and xen-network.
That's besides the need to update LAYERSERIES_COMPAT for the meta-xt-security layer.

I believe you can check LAYERSERIES_CORENAMES in recipe to provide proper RRECOMENDS value

1st and 2nd commits - looks good.
But as I see we lost third commit, that removes do_configure:append(). And we agreed that we will merge three commits.

With addressed two comments regarding changes to linux-* appeared suddenly:
Acked-by: Ruslan Shymkevych<EMAIL_ADDRESS>


Crash with OOM error on large image

I have one 2.1 MB image that causes this tool to consistently crash with:
[12/168] Searching '1575180225943.jpg':
 Trying reverse search #1 (e621.net/iqdb_queries)...PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 24576 bytes) in phar:///***/e621-Batch-Reverse-Search/build/e621BRS.phar/app.php on line 1375

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24576 bytes) in phar:///***/e621-Batch-Reverse-Search/build/e621BRS.phar/app.php on line 1375
Press ENTER key to continue...

It'd be nice if the tool would at the least gracefully handled this case and ignored the image with a message that it was too large. It took me three runs before I figured out what the cause was.

You can't gracefully handle out of memory error, probably raising memory limit will be my approach

Should be fixed in 1.7.3.

Changing php.ini worked. Thanks for the help.