edit invividual frames.

should be able to crop a few frames or draw on a few frames in the middle of the gif. not sure why everything applies to every frame.

All frames should have the same size, that's why you can't crop one frame and leave the others untouched.
You can draw on only selected frames, you just need to select the frames that you want before click on apply.
Not everything is applied to all frames, you can take a look at the hint that appears at the bottom of the editor window when clicking on a feature that you wish to apply.

The cropping limitation is a limitation on the GIF format.  There's no way to have some frames have a certain size and others have another size.  You can have a white or black background to make it look like the image is smaller, but that's about it.
Can confirm that you can draw on exactly the frames you want by selecting them.

How about zoom in / zoom out to a specific area while remaining same frame size ? use fill in color if getting smaller, keep proportion of frames.

How about zoom in / zoom out to a specific area while remaining same frame size ? use fill in color if getting smaller, keep proportion of frames.

My only thought here is that might be kinda involved and how to implement seems ... difficult.  If you've ever used Camtasia, you know that the zoom feature they came up with for their video editor is non-simple and has a bit of a learning curve.
Still, insofar as Screen2Gif is about demonstrations, I can see a zoom feature being useful to emphasize / minimize elements.


Revert "win pipe: race condition on queueing uv_pipe_zero_readfile_th…

…read_proc"
This reverts commit dd0702a3f397755095c7467dc9efc7b6def33b98.
See discussion at https://github.com/JuliaLang/libuv/commit/de067bc4da4cda1f8e629e3a37ae4076b91d8766#commitcomment-14457130
I'm testing locally whether this fixes (once merged in julia) https://github.com/JuliaLang/julia/issues/16556. cc @vtjnash the original commit has a pretty weak justification "another similar issue that i assume could happen" so I'm going to guess we can afford to drop this if it fixes matters.

This has now passed Julia's make testall locally 12 times in a row without freezing. I'm inclined to merge.

:tada:  How often does it freeze before?

More often than that. Usually about 4-6 times in a row could get it to happen.

Lgtm


Generate ts files that import dependent classes?

Perhaps I'm just doing something incorrectly, but if I have a cs class like
namespace ReportPortalAPI.Controllers.v1.Model
{
    public class GetReportResponse
    {
        public Guid Id { get; set; }
        public IEnumerable<Collection> Collections { get; set; }
    }
}

Similarly there is a .cs file for Collections.
then the generated code is like so
module ReportPortalAPI {

$Properties[public $name: $Type][, ]

    export class GetReportResponse {

        // ID
        public id: string = "00000000-0000-0000-0000-000000000000";

        // COLLECTIONS
        public collections: Collection[] = [];
    }

}

The Collections.ts is generated but not imported.  Is it wrong to think it should be?  Is there a way to configure this?

hi - sorry for long delay
in method GenerateTypeInit
replace
var pos = c.FullName.IndexOf(".Models");
with
var pos = c.FullName.IndexOf(".Model");
on last line please add finishing }
you can start from here


Visually separate the logout button

Visually separate the logout button

the coloring should be red, red is signalling that the functionality differs from the other buttons
the design should not break the other elements views (e.g. borderradius)
the button should be physically separated from the other buttons

a28a32cbcb9180fde6700a8901f0501c15975c25


New release

Hello,
There hasn't been a release since 2020, and quite a few commits landed in master since then - would it be possible to get a new release now, for example to make it easier for people who use distro packages that follow the tags? 🙂
Thanks!

People using sway think that this module isn't working properly, cause the commits for some fixes aren't in the latest release.


Add ability to support attrs in Panel and by extension FieldPanel #10133

Fixes #10133
Adds ability to support passing attributes via FieldPanel   ( targeted for stimulus controller attributes )
How would it work
class HomePage(Page):
    body = RichTextField(blank=True)

    content_panels = Page.content_panels + [
        FieldPanel('body', attrs={"data-controller": "today"}),
    ]

result
Adds data-controller="today" at the root div of the field.

Please check the following:

[x] Do the tests still pass?[^1]
[x] Does the code comply with the style guide?

[x] Run make lint from the Wagtail root.

[x] For Python changes: Have you added tests to cover the new/fixed behaviour?

Great start @salty-ivy - here is some feedback to hopefully help unblock you.

thanks a lot, I guess I should have gone over the links of the additional context, that would have save your time :(

Thanks Aman. I might not get to it for a week or so as I'm away. Others on the core team may get a chance to look in the meantime though.

Only quick thought - one more test for adding attrs to Panel would be good, not just Field panel.

We should also document this here. https://docs.wagtail.org/en/stable/reference/pages/panels.html#field-panel (FieldPanel)
Additionally this attrs should work for FieldRowPanel, HelpPanel and others. I don't think it will for MultiFieldPanel as that does not have a root element. But, for simplicity see if it's easy to add those in this PR of we can split to a new issue later.
The main priority is Panel and FieldPanel.

We should also document this here. https://docs.wagtail.org/en/stable/reference/pages/panels.html#field-panel (FieldPanel)
Additionally this attrs should work for FieldRowPanel, HelpPanel and others. I don't think it will for MultiFieldPanel as that does not have a root element. But, for simplicity see if it's easy to add those in this PR of we can split to a new issue later.
The main priority is Panel and FieldPanel.

@lb- I think FieldRowPanel and MultiFieldPanel have almost same implementation. Both of their templates uses multi_field_panel_child.html  if render the attrs   here https://github.com/wagtail/wagtail/blob/b946b3d66d67e8cd7179c188078c6ed735c46b9c/wagtail/admin/templates/wagtailadmin/panels/multi_field_panel_child.html#L2
wouldn't this work for both of them?

For InlinePanel I am rendering the attrs here https://github.com/wagtail/wagtail/blob/b946b3d66d67e8cd7179c188078c6ed735c46b9c/wagtail/admin/templates/wagtailadmin/panels/inline_panel_child.html#L5
including the data-contentpath-disabled  by overriding  BASE_ATTRS in InlinePanel definitions.
let me know if these are right places.

Both those suggested changes look good. Great find.

@lb- could you have a look at this one before I move towards the DOCs

@lb-  Thanks for the comment and review, I have already re-based this branch with read-only functionality quite a while ago.
so I would be working on your suggestions directly.

Thanks @salty-ivy

@salty-ivy as per Slack, you're still keen on pursuing this but may not get back to it straight away.

Oh I need this functionality so much! I'm glad to see it almost there.
Quick note: we need an ability to set attributes for whole page edit form (or other form in case we are using ModelAdmin or Snippets). This is very useful for cases where stimulus controller should be applied on a higher level (node that wraps all form fields)

@salty-ivy Just asking if you are willing to complete the PR. If you need any help here I'll be happy to help.

@pySilver Thanks a lot for asking and real big apologies for all this delay. I would be getting back to this PR
asap, as I got selected by wagtail in GSoC project https://github.com/orgs/wagtail/projects/30 and examsss.
I would be free by 26th and can start working back on it. We can work this out.
if you don't wanna wait till 26th,  you are very much welcome to take over me : )

Great !

Thanks both for the discourse on this.

Quick note: we need an ability to set attributes for whole page edit form (or other form in case we are using ModelAdmin or Snippets). This is very useful for cases where stimulus controller should be applied on a higher level (node that wraps all form fields)

@pySilver  I think we would keep any wider (non-panel) attrs out of the scope of these changes. Once the dust settles we can look at other parts of the application if there is a need.
I know that all forms have data-form (or similar) on them, so I think it makes sense to review how these are added at some point in the future.

@salty-ivy if that makes your life any easier I've merged your changes into a new branch made of stable/5.0.x  here https://github.com/pySilver/wagtail/tree/panel-attributes

@pySilver  thanks a lot man, can you DM me on slack we can discuss more about it there this PR already got tons of comment!
and again GREAT thanks for keeping up with this, I would be picking this in no time

@lb-  @pySilver   I think most of the things were already done in this only few tests and new data-form support is left.
still one major thing I need to look up for is how to support attrs in templates without using self I believe last time I checked it was working somehow 🫨

I'm playing with this functionality and some stimulus controllers and what I'm missing is attributes on a little bit higher level, specifically at wagtailadmin/shared/panel.html. The most common feature is to show/hide sections based on other fields which requires an ability to set attributes at panel level

I'm wondering how we can handle it without confuse end user? I'm aware we can simply solve it on JS level but Stimulus is all about making less JS code with as general approaches as possible.
What you guys think?

@salty-ivy @lb- I have a few more thoughts after working with this PR.
In my opinion, we should handle MultiFieldPanel attributes differently. Take a look at the code and the result:
content_panels = [
        TitleFieldPanel("title"),
        PageChooserPanel("category", page_type="catalog.CategoryPage"),
        MultiFieldPanel(
            [
                FieldPanel(
                    "term_type",
                    widget=forms.Select(
                        attrs={
                            "data-action": "toggle-select#changed",
                            "data-toggle-select-target": "select",
                        }
                    ),
                ),
                FieldPanel(
                    "content",
                    classname="search_term_content",
                    attrs={
                        "data-values": "landing_page",
                        "hidden": True,
                    },
                ),
                FieldPanel(
                    "description",
                    classname="search_term_description",
                    attrs={
                        "data-values": "search_results",
                        "hidden": True,
                    },
                ),
            ],
            attrs={"data-multitest": "test"},
        ),
    ]

I'm surprised it is repeated on every panel instead of being applied to a wrapper once. If I'd need it to be repeated I'd define such attrs on a  FieldPanel level.

Yeah. I think that's a result of using self.attrs. When I looked at the code (over a month ago now) I think I flagged that we probably would not be able to support some panels that do not render their own wrapping div/container.
I recall the MultiFieldPanel and a few others just render an array of children without owning the outer div.
Anyway, I agree that the attrs should not be repeated in this case, thanks for the checks.

@lb- I was thinking about how to overcome this and I've found some solution but it conflicts with default data-* (for instance data-field-wrapper) that would be repeated in unexpected places. So, either UI code that depends on these few data attributes should be refactored along with these changes or we can leave the default attributes in templates as it is in main at the moment but add rendering of custom attributes only. Literally something like that:
data-attr-that-is-expected-by-wagtail-here {% include "wagtailadmin/shared/attrs.html" with attrs=self.attrs %}

@zerolab @lb-  I'm failing to understand what's wrong with self.attrs and how it differs from self.classes used in the same template. As you can see in my fork (link below to comparison below) at some places it has to be child.attrs. Is that related to dict being a mutable structure?
@lb- @salty-ivy I think that after battle testing different setups with my Stimulus controllers, I came up with the sane defaults setup where one can set custom attributes on every level without breaking Wagtail UI code that expects some attributes to be placed at some specific html nodes. That let me retire BASE_ATTR property and minimize the number of modified repo files.
Here is the setup that I'm testing against:
content_panels = [
        TitleFieldPanel("title"),
        PageChooserPanel("category", page_type="catalog.CategoryPage", attrs={"data-pagechooser-level": ""}),
        FieldPanel(
            "description",
            attrs={
                "data-top-field-level": True,
            },
        ),
        MultiFieldPanel(
            [
                FieldPanel(
                    "term_type",
                    widget=forms.Select(
                        attrs={
                            "data-widget-level": True,
                        }
                    ),
                ),
                FieldPanel(
                    "content",
                    attrs={
                        "data-top-field-level": True,
                    },
                ),
            ],
            attrs={"data-multifield-level": "test"},
        ),
    ]

Output:

Diff agains stable/5.0.x is here: https://github.com/wagtail/wagtail/compare/stable/5.0.x...pySilver:wagtail:panel-attributes?expand=1
Branch: https://github.com/pySilver/wagtail/tree/panel-attributes

The goal of the BASE_ATTRS on classes was two fold, allow the existing (if used) attrs that already come with panels to move to the classes, not the templates.
This in turn allows these to be overridden, reused, extended as needed. By default, they would just be appended to, but the Dev has more power to change things if they want.
For example, without the base attrs approach there is no way to override the defaults like data-panel.
This becomes even more important when you consider the data-controller/data-action attributes. Stimulus intentionally allows these to be used with multiple controllers in mind.
Example usage. You have a panel that is collapsible by default, using data-controller="w-expand" (or Similar in the future). Through your customisations you want to add another controller to make it data-controller="w-panel my-custom-controller". Without the base attrs there would be no way to override the data-controller attribute set in the template, we could leverage class inheritance and calling super but I felt that it could be a common enough use case we could put these as a property on the class itself.
Hope that context helps a bit. I'm thinking the easy customisations should be easy and complex ones should be possible (without having to always reach for a complete template override).

@lb- I totally agree with the idea. But there is one problematic attribute that ruins it and it is data-field-wrapper.
Actually, I took a look at how this data-field-wrapper is used in sources and it looks like it doesn't matter if it is specified on .w-field__wrapper or at the .w-panel__wrapper. It looks like it's safe to change its default rendering position or even rename it.
I'm also wondering if what we are doing here should be reflected in:
wagtail/client/src/components/StreamField/blocks/FieldBlock.js
wagtail/client/src/entrypoints/contrib/table_block/table.js

since these data attributes are mentioned in these files. For instance:
const dom = $(`

            <svg class="icon icon-warning w-field__errors-icon" aria-hidden="true" hidden><use href="#icon-warning"></use></svg>

    `);

Beside that I think data attributes that come from class definition (data-panel, data-tabs) at least at the moment are very different than what developer might want to define. Like I've said - I've tried to use the original code from this PR and this makes Stimulus controllers useless since we are back to writing DOM CSS queries in order to find specific  node, instead of simply using targets:
The most basic and very common example is the dynamic forms where sections are shown/hidden based on some field state. That is simply impossible without case-specific JS in original PR because we cannot set data attributes on specific level that we want. And if we make it possible then, our attributes from BASE_ATTR magically appears not where we expect them.

@lb- @salty-ivy  what if we keep base attrs feature but without any defaults at the moment? Existing data attributes aren't related to Stimulus controllers and may stay in templates until they migrated to Stimulus. This would solve all issues:

opens doors for custom panels with default attributes that can be overridden
keeps existing code working
gives flexible control on putting data attrs on any desired level

What you think?

@lb- @salty-ivy I've brought back BASE_ATTRS into my fork.
@salty-ivy I don't want to take over your work :) It is just I urgently need this feature for development, so I'm kinda working on every possible approach to get it )

No issues see if you can pull out anything here.
Anyways I will be joining from from Monday !!

@salty-ivy I guess you are still busy?

yup here, @pySilver  really sorry for late reply I was busy with other PRs ( on Willow ) didn't receive your notification.

@salty-ivy I've just merged the changes against the current wagtail:main here https://github.com/pySilver/wagtail/tree/panel-attrs I hope it will help you finish your PR :)

No problems at all @salty-ivy - please do not worry - if it happens it happens.

@lb yeah. I'm happy to finish it. I guess I should open a separate PR with code synced into current main, right?

@lb yeah. I'm happy to finish it. I guess I should open a separate PR with code synced into current main, right?

Yep, that will be best.

@lb- @salty-ivy here it is #10629

Thank you @pySilver. Closing in favour of #10629


Crash when rendering Chests within Roughly Enough Items

Sorry to be back so soon! It would seem there's another conflicting issue with your recent chest naming addition.
Whenever a chest would be rendered in Roughly Enough Items, the game will crash. (At least as far as I can tell, from the log)
Using the 1.0.5 update, with REI v3.6.14 and fabric API 0.10.8+build.310 to test, the issue can be recreated by loading up any world and searching the word "chest" or scrolling through until you hit a page with chests.
Log here: https://pastebin.com/yi1EpCN7

No need to apologize! Glad you're finding bugs that I didn't even consider :)
It was also actually an issue with Ender Chests, not normal Chests, and not specific to REI. Thanks for the issue!


seccomp: Add owner reference information to the seccomp profile

Add owner reference information to the seccomp profile
This is a draft PR to add the following annotations to the seccomp profiles:
	"seccomp.gadget.kinvolk.io/ownerReference-ApiVersion": "apps/v1",
	"seccomp.gadget.kinvolk.io/ownerReference-Kind": "Deployment",
	"seccomp.gadget.kinvolk.io/ownerReference-Name": "coredns",
	"seccomp.gadget.kinvolk.io/ownerReference-Uid": "c52477c4-a658-4c07-9281-16530545b040",

TODO:

[x] Is there an easier way to retrieve the metav1.OwnerReference{} or any structure from Unstructured objects? Current implementation converts it to raw JSON and then use jq to extract the elements, see here. Consider using unstructured.helpers instead of jq. Check here an example.

Final solution: I used GetOwnerReferences.

[x] Update documentation: docs/gadgets/seccomp.md
[x] Remove testing logs 🙂
[x] Add unit-test for LookupOwnerReferenceByMntns and getExpectedOwnerReference
[x] Test that existent and created containers are enriched with the Owner Reference using all the hook modes:

Done with podinformer and fanotify.

TBD:

[x]  The metadata.ownerReferences is actually an array, how should we manage it?

See getExpectedOwnerReference implementation.

[x] Is ownerReferenceUid really necessary?

We decided to keep it.

[x] When should we stop iterating? For instance, Nodes (Reached with kube-system/kube-apiserver-master pod in kubeadm) and Installations (Reached with calico-system/calico-typha-ABCDEF-ABCDEF) resources do not have namespace so current way to get resources will fail.

We decided to stop if the owner reference is not now of the following kinds: Deployment, ReplicaSet, StatefulSet, DaemonSet, Job, CronJob or ReplicationController. See getExpectedOwnerReference implementation.

Improvements for future PRs:

[x]  Make getStringField() more generic to be able to retrieve generic types: bool, string, etc

This improvement is not needed anymore because the function was removed.

[x]  Maybe we could create a new package that manages all the dynamic Kubernetes client and the parsing stuff?

This improvement is not needed anymore because the implementation was simplified.

[ ]  Update the seccomp guide to use maybe a Deployment and show how this annotation can be used.

How to use
Generate a seccomp profile for a pod that has owner references.
Testing done
Example using the CLI. For this example I used a pod that has the following references: ReplicatSet -> Deployment:
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/controllers/nginx-deployment.yaml
deployment.apps/nginx-deployment created

$ kubectl get pods -n default -o wide
NAME                                READY   STATUS    RESTARTS   AGE   IP            NODE                                NOMINATED NODE   READINESS GATES
nginx-deployment-66b6c48dd5-26hhg   1/1     Running   0          44m   <IP_ADDRESS>   aks-agentpool-41917616-vmss000002   <none>           <none>
nginx-deployment-66b6c48dd5-jtrsw   1/1     Running   0          44m   <IP_ADDRESS>   aks-agentpool-41917616-vmss000001   <none>           <none>
nginx-deployment-66b6c48dd5-k5f82   1/1     Running   0          44m   <IP_ADDRESS>   aks-agentpool-41917616-vmss000000   <none>           <none>

$ kubectl get pods nginx-deployment-66b6c48dd5-26hhg -o json
         ...
        "ownerReferences": [
            {
                "apiVersion": "apps/v1",
                "blockOwnerDeletion": true,
                "controller": true,
                "kind": "ReplicaSet",
                "name": "nginx-deployment-66b6c48dd5",
                "uid": "6d582a59-0a0b-4adb-abb7-a0e3781b7e62"
            }
         ...

$ kubectl get replicaset nginx-deployment-66b6c48dd5 -o json
         ...
        "ownerReferences": [
            {
                "apiVersion": "apps/v1",
                "blockOwnerDeletion": true,
                "controller": true,
                "kind": "Deployment",
                "name": "nginx-deployment",
                "uid": "e9620e8c-0060-458e-a35c-589097ced422"
            }
         ...

$ kubectl get deployment nginx-deployment -o json
// No ownerReferences

A seccomp profile generated for this pod has to include the deployment nginx-deployment information in its annotations.
Check on-demand profile generation:
$ kubectl gadget seccomp-advisor start -p nginx-deployment-66b6c48dd5-26hhg -n default -m seccomp-profile
9hSePIGgvPrKunU5

$ kubectl gadget seccomp-advisor stop 9hSePIGgvPrKunU5
Successfully created seccomp profile

$ kubectl get seccompprofiles -n gadget
NAME                                STATUS      AGE
nginx-deployment-66b6c48dd5-26hhg   Installed   18s

$ kubectl get seccompprofiles -n gadget nginx-deployment-66b6c48dd5-26hhg -o json
{
    "apiVersion": "security-profiles-operator.x-k8s.io/v1alpha1",
    "kind": "SeccompProfile",
    "metadata": {
        "annotations": {
            "seccomp.gadget.kinvolk.io/container": "nginx",
            "seccomp.gadget.kinvolk.io/node": "aks-agentpool-41917616-vmss000002",
            "seccomp.gadget.kinvolk.io/ownerReference-ApiVersion": "apps/v1",
            "seccomp.gadget.kinvolk.io/ownerReference-Kind": "Deployment",
            "seccomp.gadget.kinvolk.io/ownerReference-Name": "nginx-deployment",
            "seccomp.gadget.kinvolk.io/ownerReference-UID": "25f426bb-e3a5-49a2-aa72-c4f09f12109a",
            "seccomp.gadget.kinvolk.io/pod": "default/nginx-deployment-66b6c48dd5-26hhg",
            "seccomp.gadget.kinvolk.io/trace": "gadget/seccomp-64z6x"
        },
    ...

Check a profile generated at pod termination:
$ kubectl gadget seccomp-advisor start -p nginx-deployment-66b6c48dd5-26hhg -n default -m seccomp-profile
Vap8yvX281lYT1Ge

$ kubectl delete -f https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/controllers/nginx-deployment.yaml
deployment.apps "nginx-deployment" deleted

$ kubectl get seccompprofiles -n gadget
NAME                                STATUS      AGE
nginx-deployment-66b6c48dd5-26hhg   Installed   35s

$ kubectl get seccompprofiles -n gadget nginx-deployment-66b6c48dd5-26hhg -o json
{
    "apiVersion": "security-profiles-operator.x-k8s.io/v1alpha1",
    "kind": "SeccompProfile",
    "metadata": {
        "annotations": {
            "seccomp.gadget.kinvolk.io/container": "nginx",
            "seccomp.gadget.kinvolk.io/node": "aks-agentpool-41917616-vmss000002",
            "seccomp.gadget.kinvolk.io/ownerReference-ApiVersion": "apps/v1",
            "seccomp.gadget.kinvolk.io/ownerReference-Kind": "Deployment",
            "seccomp.gadget.kinvolk.io/ownerReference-Name": "nginx-deployment",
            "seccomp.gadget.kinvolk.io/ownerReference-UID": "e9620e8c-0060-458e-a35c-589097ced422",
            "seccomp.gadget.kinvolk.io/pod": "default/nginx-deployment-66b6c48dd5-26hhg",
            "seccomp.gadget.kinvolk.io/trace": "gadget/seccomp-s45pq"
        },
   ...

$ kubectl gadget seccomp-advisor stop Vap8yvX281lYT1Ge
Successfully created seccomp profile

Hi.
I tested your code and I got the expected result:
$ ./kubectl-gadget seccomp-advisor start -m seccomp-profile -n kube-system -p coredns-78fcd69978-hqxvm
epXpww4kzajFZtZ9
$ ./kubectl-gadget seccomp-advisor stop epXpww4kzajFZtZ9
Successfully created seccomp profile
$ kubectl get seccompprofile -A
NAMESPACE                    NAME                       STATUS      AGE
gadget                       coredns-78fcd69978-hqxvm   Installed   11s
security-profiles-operator   nginx-1.19.1               Installed   14m
$kubectl describe seccompprofile -n gadget coredns-78fcd69978-hqxvm
Name:         coredns-78fcd69978-hqxvm
Namespace:    gadget
Labels:       containerName=
              gadgetName=seccomp
              global-trace-id=epXpww4kzajFZtZ9
              namespace=kube-system
              nodeName=
              outputMode=ExternalResource
              podName=coredns-78fcd69978-hqxvm
Annotations:  seccomp.gadget.kinvolk.io/container: coredns
              seccomp.gadget.kinvolk.io/node: minikube
              seccomp.gadget.kinvolk.io/ownerReferenceApiVersion: apps/v1
              seccomp.gadget.kinvolk.io/ownerReferenceKind: Deployment
              seccomp.gadget.kinvolk.io/ownerReferenceName: coredns
              seccomp.gadget.kinvolk.io/ownerReferenceUid: 2b335af4-62d6-41f7-adb6-7bb9e8cff88a
              seccomp.gadget.kinvolk.io/pod: kube-system/coredns-78fcd69978-hqxvm
              seccomp.gadget.kinvolk.io/trace: gadget/seccomp-j8jdv
...

Is there an easiest way to retrieve the metav1.OwnerReference{} or any structure from Unstructured objects? Current implementation converts it to raw JSON and then use jq to extract the elements, see here.

What do you mean exactly by jq? The command line tool to print beautiful JSON?
In a previous commit of #398, I had to deal with Unstructured and I had to translate it to JSON to then translate it to Trace.
Best regards.

I tested your code and I got the expected result:

@eiffel-fl thanks for testing it!

What do you mean exactly by jq? The command line tool to print beautiful JSON?

Yeah, I used gojq to extract the fields from an Unstructured resource here. However, I am considering using unstructured.helpers. Check here an example.

In a previous commit of #398, I had to deal with Unstructured and I had to translate it to JSON to then translate it to Trace.

The difference between the two cases is that I need to do an additional step for this PR because I initially have a resource (which could be a Replicaset, Deployment, Daemon, etc) in Unstructured format and I need to first check if it contains the metav1.OwnerReference field (Here is where I am using jq). If so, then I need to extract the info inside that field: ApiVersion, Kind, Name and UID. For that second step, I am following the same approach you did in #398 to transform it to the metav1.OwnerReference data structure. However, I am wondering if that double JSON marshalling can be avoided.

@mauriciovasquezbernal @eiffel-fl @ashu8912 I updated this PR after having managed most of the comments.
There are still a couple of things to be defined. Please check the TBD list in the PR description and the unresolved comments.
Regarding the development, I am just missing the unit-tests of LookupOwnerReferenceByMntns to mark this PR as "Ready for review". However, you can already start reviewing it, the unit-test should not impact the current implementation (Unless I find an issue with that function 😅).

PR updated to manage all the comments and the TBD that were defined 🙂 .
I also developed the unit-tests so I am marking this PR as ready.

I addressed all your reviews expect one for which I am not sure.
For the moment, I added them in a fixup commit on top of Jose's work.
Jose's original work is still reachable in jose/seccomp-ownerref-old.

is it ok not to have an owner reference in this case? Shouldn't be the owner reference the pod itself?

I think it is ok. The metadata.ownerReference field of a kubernetes object already used this notation. In fact, if you check the metadata.ownerReference of the mypod, it is empty.

I addressed all your reviews except one for which I am not sure.

Thanks @eiffel-fl!


Additional Arities

Description
Support for third, fourth, and fifth Cartesian product dimensions.
Type of Change

[ ] Bug Fix
[x] New Feature
[ ] Breaking Change
[ ] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

[x] I have read the contributing guidelines
[x] Existing issues have been referenced (where applicable)
[x] I have verified this change is not present in other open pull requests
[x] Functionality is documented
[x] All code style checks pass
[x] New code contribution is covered by automated tests
[x] All new and existing tests pass

Codecov Report
Patch coverage: 100.00% and no project coverage change.

Comparison is base (364440b) 100.00% compared to head (cd6799b) 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##              main       #10    +/-   ##
==========================================
  Coverage   100.00%   100.00%
==========================================
  Files            2         2
  Lines          137       270   +133
  Branches         7        11     +4
==========================================
+ Hits           137       270   +133

Impacted Files
Coverage Δ

src/LazyCart/LazyCartesianProduct.cs
100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Remove adding Tavenem framework CSS file from JS initialization

Tavenem.Blazor.Framework.lib.module.js adds the framework CSS to the header and cancels any overwrites to CSS properties from my app's CSS.
Can't the framework CSS be added manually by the user/developer?

You're absolutely right.
I added this to the JavaScript initializer to simplify the setup process, but the ability to customize CSS is critical and is impeded by the process. I've reverted to manual CSS inclusion in the latest release.


Update the Content Items Dimension On Publishing-api Events.

This is needed for the Update the Content Items dimension on publishing-api events card.
Set dirty flag in Dimensions::Item on publishing api event when the item exists.
Create a new Dimensions::Item with dirty and latest flags set to true if it does not exist.
Duplicate content items dimension and fire Sidekiq job for items marked as dirty when
ETL::Master#process is run.
Does not handle unpublish events.

 (3) Update the Content Items dimension on publishing-api events [Depends on 94]


enhaced FLV to support spherical video

would you consider leveraging PacketTypeMetadata for the spherical video metadata?
In the similar way it is supported for webm and mp4 formats here: spherical-video-v2-rfc.
it might work for both  standardising the approach for streaming 360 video over RTMP and enabling file conversion between video formats, i.e .flv from/to .mp4 without losing 360/3D metadata.
Any feedback would be  appreciated.
Thanks in advance!

We’ve discussed this internally, but it didn’t make it into E-RTMP v2 due to more pressing priorities. That said, it remains on our radar for a future release. Are you or any projects you’re involved with currently in need of this feature? If we add it to a future version of the spec, would you be able to test it, provide feedback, or know someone who could help implement and iterate on it according to the E-RTMP spec?

It is great to hear that the feature may be released at least in the next specs,  even not being fit into v2.
the project I am involved in relays different types of video content across micro-services  over RTMP and  utilises both proprietary and ffmpeg-based implementation of enhanced RTMP spec (v1), for publishing and playing respectively. For the limited  360 video streaming scenario in order to serve the project current needs,  PacketTypeMetadata was "unofficially" extended, so was the private ffmpeg , used in the project.
However, in standardising the format would allow to be compliant with other third-party publishers (like OBS etc) in the future.
In regards to possible collaboration/early adoption, the feature could be readlilly and willingly tested and the feedback given.


fix(redirect-url): navigate once

Redirect user to previous url once logged in.

The reason why it do it twice
https://github.com/xm-online/xm-webapp/blob/20c504f8e1772c156f452f1ac0a2d51dcbac4832/packages/core/permission/src/user-route-access-service.ts#L63
if we remove this redirect, the bug when user after auth routes to the blank page will be fixed.
Then the setTimeout will be unnecessary.
But I didn't have enough time to retest all case and check if it impacts to the other functionality.
Maybe this info is useful for you.

@denisogolubev For some reason I could agree with you, but just in context of "redundant redirect". setTimeout resolves another issue, especially dashboard one.
In case when you remove line that you mention above user will face with incorrect system behavior after redirecting to some specific page while session is not present, because system will stuck on empty page.
And one more time, as it was said in comment before, setTimeout resolves case when user tries to login immediately after logout, because due to lack of time for dashboard subscription we cannot retrieve fresh data according to user session.


file=user/user.go:31 level=fatal mkdir C:\Users\wyzlhf.micro: The system cannot find the path specified.

I have install go-micro with "go install<EMAIL_ADDRESS>when I use "micro" CMD,file=user/user.go:31 level=fatal mkdir C:\Users\wyzlhf.micro: The system cannot find the path specified.

Thank you. Your email is received and will be handled  as soon as possible.谢谢。您的邮件已收到，我会尽快处理。


Common locale tests

Put tests common to all locales in a single place.
Fixes #2801.

This one may take some time to review...

This should be merged sooner rather than later, since otherwise more and more locale PRs will conflict.

Merged in 917b920d29d72511316b7d334ed1d94c600830fe


Savepoints with same name

Currently, all the created savepoints have the same name sp.
See the following test case:
https://github.com/gwenn/rusqlite/commit/7c5f74447a2a24e322ed0ab41989086ef5229a6e#diff-d0e9b1d1df1c5795eac22a324e40477eR265
for an example that unexpectedly fails:
https://ci.appveyor.com/project/gwenn/rusqlite/build/1.0.64
It seems to me that savepoints must have distinct names.
Regards.

I don't believe what that test is doing is valid. Specifically, calling tx.savepoint() twice in the same scope looks like it's creating "sibling" transactions, but transactions are always nested. Since they're nested, I would expect that code to return 1; the insertion of 4 would be rolled back during the rollback of sp1.
I think the bug here is that savepoint should take &mut self, which would prevent that code from compiling and make it more obvious that the savepoints are nested.

So, your example shouldn't have compiled, but you're right that savepoints need distinct names. #151 addresses both of those.

You should have a look at the SQLite tests to see that savepoints are necessarily nested:
       SAVEPOINT one;
          INSERT INTO t1 SELECT * FROM t1 WHERE rowid<50;
         ROLLBACK TO one;
          INSERT INTO t1 SELECT * FROM t1 WHERE rowid<50;
          SAVEPOINT two;
            DELETE FROM t1 WHERE (random()%10)==0;
            SAVEPOINT three;
              DELETE FROM t1 WHERE (random()%10)==0;
              SAVEPOINT four;
                DELETE FROM t1 WHERE (random()%10)==0;
          RELEASE two;

          SAVEPOINT three;
            UPDATE t1 SET x = substr(x||x, 12, 100000) WHERE (rowid%12)==0;
            SAVEPOINT four;
              UPDATE t1 SET x = substr(x||x, 14, 100000) WHERE (rowid%14)==0;
           ROLLBACK TO three;
            UPDATE t1 SET x = substr(x||x, 13, 100000) WHERE (rowid%13)==0;
          RELEASE three;

        DELETE FROM t1 WHERE rowid > (
          SELECT rowid FROM t1 ORDER BY rowid ASC LIMIT 1 OFFSET 256
        );
        RELEASE one;

Another point: maybe we should let users specify the savepoint name.
With JDBC, you have the choice:

setSavepoint()
setSavepoint(String)

Aren't those all still nested?
We should be able to disable the "rollback or commit when transaction is dropped" behavior - in the first SQLite block, savepoints three and four are committed when one is committed, but to get the equivalent, I had to tell three and four to go ahead and commit when they were dropped.

On allowing user-specified savepoint naming - it seems like that shouldn't be necessary. Can you think of an example where it would be useful?

Ok, you are forcing the user to create two blocks when she only wants two sequential savepoints...
And a savepoint named "after_banda_sal" is more telling than "sp1":
https://docs.oracle.com/database/121/CNCPT/transact.htm#GUID-5BB15405-8A03-47DE-8A20-63E1B83E1361

I think the blocks are necessary if we want auto-commit/rollback when the transaction is dropped. Otherwise we allow the user to create transactions that look like they aren't nested, but they really are at the SQLite layer.
On savepoint names - wouldn't the variable be named after_banda_sal? If we let the user specify savepoint names, they could create two nested savepoints with the same name, which will behave oddly at best. That seems like a bad tradeoff to make to get more debuggable SQL.

Even Rust allows two variables with the same name, "which will not necessarily behave oddly at best" :wink:

Hah. I was going to write about Rust doesn't really allow that and the second name just shadows the first one, making it unusable until the second goes out of scope, but that's exactly how same-name savepoints describe. Since they do nest, I suppose allowing users to specify their own savepoint name is probably fine.
Working on a PR to separate Transaction and Savepoint since their behavior is slightly different (ROLLBACK TO savepoint_foo rolls back changes but leaves you inside savepoint_foo, but ROLLBACK rolls back changes and ends the transaction). I'll add savepoint names to it.

Another point about the multiple blocks - once Rust gets non-lexical borrow scopes, you should be able to end the borrow by consuming the savepoint, allowing you to write things like:
        let mut one = try!(tx.savepoint());
        try!(one.execute_batch("INSERT INTO t1 SELECT * FROM t1 WHERE rowid<50"));
        try!(one.rollback());
        try!(one.execute_batch("INSERT INTO t1 SELECT * FROM t1 WHERE rowid<50"));

        let mut two = try!(one.savepoint());
        try!(two.execute_batch("DELETE FROM t1 WHERE (random()%10)==0"));
        try!(two.commit()); // consumes two, releasing the borrow on one, allowing...

        try!(one.commit()); // won't compile on current rust, but should in the future

@gwenn Does #152 address the rest of your concerns?

Yes.
Thanks.


Forbid certain rotation operations when Shoot is hibernated

How to categorize this PR?

/area security
/kind bug
What this PR does / why we need it:
Now it is no longer possible to perform the rotation operations requiring the shoot client when the Shoot itself is hibernated.
Which issue(s) this PR fixes:
Part of #3292
Special notes for your reviewer:
/cc @oliver-goetz
Release note:

It is no longer possible to perform the following shoot operations when it is hibernated: `rotate-{credentials,etcd-encryption-key,serviceaccount-key}-{start,complete}`.

/cherry-pick release-v1.48

/cherry-pick release-v1.49

/approve


Improve error handling

Propagate the error in a BundleException (before it was kept in the stream thread)
Make sure the Streamer Thread is cancelled at the end of the bundling
Fix a bug when the directory used to search the package.json doesn't exists.

@edewit It seems we need to merge our PRs, I think if we can avoid using an external dependencies for the process it's better.
I will get what's needed on your PR and update this one.

Ok there is something wrong, CI is failing, I'll have a look tomorrow


Invalid JSON on searching Gateway

Running the Federated_SMS_Spam_prediction [Part 2] - Train a Model tutorial, I get the following error on data = my_grid.search("#X", "#spam", "#dataset"):
ValueError                                Traceback (most recent call last)
<ipython-input-4-d51f7579f673> in <module>
----> 1 data = my_grid.search("#X", "#spam", "#dataset")
      2 target = my_grid.search("#Y", "#spam", "#dataset")

~/Library/Python/3.7/lib/python/site-packages/grid/grid_network.py in search(self, *query)
     39         # Connect with grid nodes that contains the dataset and get their pointers
     40         tensor_set = []
---> 41         for node_id, node_url in match_nodes:
     42             worker = self.__connect_with_node(node_id, node_url)
     43             tensor_set.append(worker.search(query))

ValueError: too many values to unpack (expected 2)

Digging a bit further, trying it out manually, I see that the problem is an invalid JSON error on the query, originating in grid/grid_network.py.
body = json.dumps({"query": list(["#X", "#spam", "#dataset"])})
print(body)

gives {"query": ["#X", "#spam", "#dataset"]} which appears to me as normal json. Then:
response = requests.post("http://localhost:8080/search", data=body)
print(response.content)

The query goes through (response code is 200). But the response content is b'{"message": "Invalid JSON format."}'.
The gateway and two workers appear to be running fine for me. Not sure if the error is on my side or a bug.

Hi @IonesioJunior  I cannot also find gateway.py and websocket_app.py scripts. Some of the attributes have also changed or something such as WebsocketGridClient.


pump and stir

Implement stirrer and pumps.
In the case of stirrer this might not be correct in the case of calibration in that with calibration we might represent rate as RPM, but from the looks of their example experiment code the stirring is practically just used as some rate. Should be straightforward to update since this is a pretty simple effector.
For the pumps, the approach is to model a generic pump that is operates external to vials and indexes on pump number (48 of them), and supports a combination of standard and IPP pumps (these operate in different ways, but communicate to same underlying chip https://github.com/FYNCH-BIO/evolver-arduino/blob/master/SAMD21/RS485_FLUIDICS/RS485_FLUIDICS.ino), and then on top of this implement a per-vial influx/efflux setup that uses a generic device as a slave. A slave device rather than subclass is used due to different input types and mapping (2-to-1) for the vial driver.

@amitschang Thanks for the update, but it looks like the same issue is true for some of the parent classes.
Take a look at #104, please. I think it would be good to address that first to ensure that this PR is working as expected.

This PR I think is working as expected, even if some of that should to be refactored, so seems simpler to me to merge this in and then changes affecting the Config inheritence can work across the board on mainline.


Add the following tags: --good , --bad  , --unk

Flags to filter results.

Sounds good! We can take advantage of 'minimist' library to parse the flags.

Close by:  3a08caa0

Closed by:  3a08caa0


upload code coverage reports

Signed-off-by: Kent Rancourt<EMAIL_ADDRESS>

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@ea4c56d). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage        ?   29.72%
=======================================
  Files           ?        2
  Lines           ?       37
  Branches        ?        0
=======================================
  Hits            ?       11
  Misses          ?       26
  Partials        ?        0

Continue to review full report at Codecov.

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


spotpl.py

This is a bit of complementary code to Spotify-Downloader. I don't think it does make sense to merge with spotdl.py as it would get too complex and out of control.
What it does? Given Spotify playlist id it dumps Spotify playlist in different formats - as txt, csv, json, xml or just prints on screen . This isn't particularly exciting perhaps.
What could be of use is dumping Spotify playlist as .ids file (just id's of tracks). If you then change the filename to list.txt and feed to spotdl.py you can download entire Spotify playlist in one go. You could perhaps amend spotdl.py a little to allow for different filenames of a list.
Another option is xml. It is ready for importing playlist into iTunes but it isn't practical at the moment. But what lies beneath is pretty exact matching of tracks from Spotify with tracks in Apple Music. It works well even for classical and electronic music which is a pain usually.
That way it is possible to get information about a track from both databases and merge. Genres and Composers are pretty bad on Spotify. Localization. Some other info.
Not terribly useful at the moment and I have to handle better some details like iTunes country store, localization etc. But there is short step from here to matching Spotify playlist to Apple Music, downloading files (from youtube) and importing into iTunes as a playlist and then matching with iCloud and getting proper quality versions from Apple. Perhaps.
If you think it is not a good idea no worries. :)

@chew-z Thanks! :D I am not merging this at the moment but is on my to-do list. I will implement this in the main code itself when I am in some fun mood.
I am closing this for now but might re-open this PR when I study your code and am ready to merge this.
Thanks once again! :+1:

Cool :)


jQuery 2.x

Not sure if there's a reason for this, but the bower.json requires jQuery 1.x
Some of the other bower libraries in my app require jQuery 2.x, so this leads to some confusing conflicts come bower install time. If I choose to use jQuery 2.x the jquery-serialize-object library works just fine (tested with jQuery 2.1.3 and a simple $('form').serializeObject()).
Any reason for the ^ here? Can we just change that to a >=?
Cheers

@MichaelMackus thanks for submitting this issue. I've loosened the requirement to >= 1.2 which should help everyone that's been struggling with this.
Go ahead an grab 2.4.4 that includes the patch


add universe hierarchy diagram

@kmill drew a very nice little diagram that was basically this for someone on Zulip a while ago, and people seemed to get a lot out of it. It crossed my mind earlier today and I thought it might be helpful here as well.

Thanks, nice to hear that diagram has been useful.
Terminology history note for maintainers: "degree" comes from Automath, where universes/types/terms respectively have degrees 1, 2, and 3. (One complication, though, is that there was a version of Automath with proof irrelevance where, effectively, Prop/propositions/proofs respectively had degrees 2, 3, and 4, so it's not a perfect correspondence, but this degree shift might have been more of an implementation hack.)


Modify README.md

Make README looks more professional

Sorry but I don't understand how just adding the tech stack details and license makes the repo look more "professional". I am closing this issue, you can work on some other feature, maybe like a share button on each saved quote so that users can share the quote. If you are interested in this feature, go ahead to implement it!
Thanks for understanding


Fix hiccups eg enabling ipv6 and restarting neutron

Discovered that most of the existing online tutorials don't include such tricks, which could be a block for openstack newbies as I am. I think it's better to include such minor changes in the original repo rather than writing up blogs to share.
fix neutron hiccups during stacking because of disabled ipv6 and missing neutron service restart command.

Thank you for your contribution!
This GitHub repository is just a mirror of https://opendev.org/openstack/devstack, where development really happens. Pull requests proposed on GitHub are automatically closed.
If you are interested in pushing this code upstream, please note that OpenStack development uses Gerrit for change proposal and code review.
If you have never contributed to OpenStack before, please see:
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
Feel free to reach out to the First Contact SIG by sending an email to the openstack-discuss list with the tag '[First Contact]' in the subject line. To email the mailing list, you must first subscribe which can be done here:
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss


Add a policy for GITHUB_TOKEN permissions or mode

It would be nice if allstar had a policy related to the permissions settings for the in-scope repo's GITHUB_TOKEN permissions.  Default permissions are described here, but it depends on the mode of the repo -  "Read and write permissions" and "Read repository contents permission".
It seems that GitHub supports managing this for GitHub Enterprise, but not the Free or Team plans.

Thanks @JonZeolla! We would like to use the Scorecard Token-Permissions Check for this. Can you take a look and see if this would fit your needs?
Allstar should include all the Scorecard checks in the future, if that works, great, but if we need something more configurable or that would check some settings unavailable to Scorecard, we might want to plan to add this to Allstar directly.

@jeffmendoza that looks like it would work!  Thanks


[relay][pass] Annotation for heterogeneous compilation

This PR adds passes in Relay to annotate expressions to indicate which device/context each operator should be executed at. #2296 is the proposed RFC. The following changes are made in this PR.

Extend target to accept a dictionary of device/context to target and add the fallback_device argument in build of build_module.py
build(func, target=None, target_host=None, params=None, fallback_device=None)

Slightly Modify compile engine to stop lowering and generating schedules for device copy operators since the real data transferring will be only performed at runtime and no schedule is needed for this type of operators.

Modify memory plan to return both storage ids and device ids.

Add on_device(expr, dev_id) and device_copy(expr, src_dev_id, dst_dev_id) operators as synthetic op as @jroesch suggested. The former takes an expr and a device_id as inputs which indicate where an expression should be annotated. The latter will be used to perform data copy between different devices.

Write several passes to validate the annotated program, rewrite the program (e.g. insert device copy operators), and propagate the device information from device copy operators to the other expression, etc.

Add unit tests to test the functionality of different annotation schemes.

@tqchen @jroesch @yidawang @yzhliu @tmoreau89

I just got back from vacation, will review this PR tonight, looks like great work 👍


Generate random address

Generate random address from Pypi random-address
pip install random-address
import Pypi

Closed by 505f185


Vtr gui

This creates a vtr/vtr-gui distinction, similar to the one in Symbiflow, but on master.
Please note - I just noticed these packages do rely on symbiflow forks, just on master branch.
Is that expected?

@PiotrZierhoffer -- Needs a rebase before it can be merged.

Does this need me to review?

No, I'll merge when I get it green

vtr package has been divided into vtr and vtr-gui already.


Fidelity calculation for density matrices improvement

https://github.com/quantumlib/Cirq/blob/782c14e0cc821794d21e82f30df8e6998f4b9992/cirq-core/cirq/qis/measures.py#L239-L242
The current implementation uses the direct definition of fidelity, which works well for small dimensions. From my experience, I was getting values significantly greater than 1. For the fidelity between rho1 and rho2, I found that squaring the sum of the singular values of the product of square_root(rho1) and square_root(rho2) gives a more accurate calculation. This equation is equal to fidelity. The idea is not mine and came from qutip.
This is my version of the implementation that I use.
import scipy
def get_fidelity(rho1, rho2):
    rho1_sqrt=scipy.linalg.sqrtm(rho1)
    rho2_sqrt=scipy.linalg.sqrtm(rho2)
    return scipy.linalg.svdvals(rho1_sqrt @ rho2_sqrt).sum()**2

This looks like a reasonable request to me.
@viathor What do you think?
For completeness, the modified formula can be derived as follows:

F(rho1, rho2) = tr(|rho1_sqrt @ rho2_sqrt|) ** 2, where |A| = sqrt(A.T @ A)

Ref: https://en.wikipedia.org/wiki/Fidelity_of_quantum_states

tr(|A|) = scipy.linalg.svdvals(A).sum()

Ref: https://math.stackexchange.com/questions/1840742/a-confusion-about-the-definition-of-the-trace-norm

I agree the request is reasonable.
Ideally, the PR implementing this would include a unit test demonstrating improved numerical stability. It should fail for the current implementation and succeed for the new one. @alvinquantum, any of the cases you encountered where fidelity exceeded 1 in cirq and stayed <=1 in your code can easily become such a unit test.

I think this is a working example. Here cirq.fidelity gives around 1.09 while get_fidelity gives 1 with a 10^-5 tolerance. The get_fidelity can also be improved since it tends to give values greater than 1, but from my experience those values have been greater by around 10^-5.
from cirq.contrib.qasm_import import circuit_from_qasm
import scipy
import cirq
import numpy as np
from cirq import partial_trace, DensityMatrixSimulator

def get_fidelity(rho1, rho2):
    '''Fidelity through singular values of sqrt(rho1)*sqrt(rho2)'''
    rho1_sqrt=scipy.linalg.sqrtm(rho1)
    rho2_sqrt=scipy.linalg.sqrtm(rho2)
    return scipy.linalg.svdvals(rho1_sqrt @ rho2_sqrt).sum()**2

if __name__ == "__main__":
    circ = circuit_from_qasm(
                    '''OPENQASM 2.0;
                    include "qelib1.inc";
                    qreg q[10];
                    rx(1.0349347) q[0];
                    ry(1.1344214) q[0];
                    rz(0.49872878) q[0];
                    rx(1.2483498) q[1];
                    ry(1.5452867) q[1];
                    rz(1.1293869) q[1];
                    rx(1.3588455) q[2];
                    ry(0.49602024) q[2];
                    rz(0.21943984) q[2];
                    rx(1.9583295) q[3];
                    ry(1.8588403) q[3];
                    rz(1.2323985) q[3];
                    rx(0.027308104) q[4];
                    ry(1.0267784) q[4];
                    rz(1.0619419) q[4];
                    rx(0.89107072) q[5];
                    ry(0.86430418) q[5];
                    rz(0.98182118) q[5];
                    rx(0.97120279) q[6];
                    ry(1.5382162) q[6];
                    rz(1.9003976) q[6];
                    rx(0.34264218) q[7];
                    ry(0.21962922) q[7];
                    rz(1.6263407) q[7];
                    rx(0.62256334) q[8];
                    ry(0.47124841) q[8];
                    rz(0.61290254) q[8];
                    rx(0.0017523425) q[9];
                    ry(1.7104261) q[9];
                    rz(0.13981947) q[9];
                    ''')

    init_qubits=10
    final_qubits=init_qubits-1
    keep_idxs=list(range(final_qubits))
    simulator=DensityMatrixSimulator()
    rho=simulator.simulate(circ).final_density_matrix
    rho_reshaped=np.reshape(rho, (2,2)*init_qubits)
    rho_reduced=np.reshape(partial_trace(rho_reshaped, keep_idxs),(2**final_qubits, 2**final_qubits))
    cirq_fidelity=cirq.fidelity(rho_reduced, rho_reduced, validate=False, qid_shape=(2,)*final_qubits)
    print(f"cirq.fidelity: {cirq_fidelity}") #approx. 1.0892252935292532
    print(f"get_fidelity: {get_fidelity(rho_reduced, rho_reduced)}") #approx 1.0000061793639072

Thanks, @alvinquantum! This is helpful.
Note: this is good basis for a unit test, but should use cirq gates rather than converting from qasm (because ideally the unit test shouldn't be sensitive to bugs in our qasm converter!).

Hi Google Quantum Team, Is this issue still open? If, yes please tell me more about it.

@anonymousr007 Yes, the issue is still open.
The goal is to replace the current implementation of calculating fidelity of two density matrices with the improved implementation that has lower numerical error.
Current implementation:
https://github.com/quantumlib/Cirq/blob/782c14e0cc821794d21e82f30df8e6998f4b9992/cirq-core/cirq/qis/measures.py#L239-L242
New implementation:
def get_fidelity(rho1, rho2):
    rho1_sqrt=scipy.linalg.sqrtm(rho1)
    rho2_sqrt=scipy.linalg.sqrtm(rho2)
    return scipy.linalg.svdvals(rho1_sqrt @ rho2_sqrt).sum()**2

The PR implementing the change should also add a unit test demonstrating improved numerical stability of the new implementation, s.t. the current implementation fails but the new one passes.

Please, assign this issue to me. I want to work on this.

Marking as after 1.0 as this is a feature addition.

Nice, I noticed pretty bad rounding errors when testing https://github.com/quantumlib/Cirq/pull/5265 and wasn't sure what to make of it. (I had to reduce the atol in my tests to just 1e-2)


Added a useful link

Have added a useful link about the SQL queries from the scaler topics.

Since this tutorial is for beginners, such links might be a bit overwhelming. If there is something specific you think would be good to explain at any point in the tutorial, please add the content directly in the tutorial (e.g. via a tip or details box).


avoid set CONTAINER_COMPONENTS_INIT_URL by default

Fixes #743

@jichenjc can you try the suggestion from @sunya-ch

The source of the problem seems to be something else:
#743 (comment)

Agree. I think the problem is that the pod may not have network reachability to load the file as I also saw in some cluster before.

@jichenjc can you document this in kepler-doc? thanks

@jichenjc can you document this in kepler-doc? thanks

sure, will do


Sync this to discord server?

I am thinking about syncing this to my bot's development discord server.

Well let's home this works.

:ok_hand:

Alright made it work again.


ci: swap mypy with pyright

Already using pyright as my preferred lsp.
Also remove wemakestyleguide

Codecov Report

Merging #123 (ab919b9) into master (306dc70) will increase coverage by 0.03%.
The diff coverage is 94.73%.

@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
+ Coverage   98.17%   98.20%   +0.03%
==========================================
  Files          61       61
  Lines        3120     3126       +6
==========================================
+ Hits         3063     3070       +7
+ Misses         57       56       -1

Flag
Coverage Δ

network
36.50% <64.03%> (+0.12%)
:arrow_up:

unit
98.04% <94.73%> (+0.03%)
:arrow_up:

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


BUG error API Binance e Bittrex

Hello
I'm looking for value return problems in the Binance and BITTREX API, in the two exchanges the balance in U $ are returning zeroed. I created a new API and it did not solve the problem, can any one help me?
Blackbird started on 05/14/2018 16:29:42
Connected to database 'blackbird.db'
Pair traded: BTC/USD
[ Targets ]
Spread Entry:  0,40%
Spread Target: 0,30%
[ Current balances ]
Bitfinex:	1.200,00 USD	0,000000 BTC
Kraken:	4.363,23 USD	0,000001 BTC
Bittrex:	0,00 USD	0,000000 BTC
Binance:	0,00 USD	0,000000 BTC
[ Cash exposure ]
TEST exposure used
Value: 50,00
[ 05/14/2018 16:29:51 ]
Bitfinex: 	8.747,90 / 8.748,00
Kraken: 	8.753,50 / 8.755,90
Bittrex: 	8.721,00 / 8.733,00
Binance: 	8.745,83 / 8.752,80
Kraken/Bitfinex:	-0.09% [target  0.40%, min -0.09%, max -0.09%]
Bittrex/Bitfinex:	 0.17% [target  0.40%, min  0.17%, max  0.17%]
Binance/Bitfinex:	-0.06% [target  0.40%, min -0.06%, max -0.06%]
[ 05/14/2018 16:29:54 ]
Bitfinex: 	8.747,90 / 8.748,00
Kraken: 	8.753,50 / 8.755,90
Bittrex: 	8.721,00 / 8.733,00
Binance: 	8.745,83 / 8.752,80
Kraken/Bitfinex:	-0.09% [target  0.40%, min -0.09%, max -0.09%]
Bittrex/Bitfinex:	 0.17% [target  0.40%, min  0.17%, max  0.17%]
Binance/Bitfinex:	-0.06% [target  0.40%, min -0.06%, max -0.06%]

I have the same issue with Bittrex, Blackbird shows 0 balance.

Did this get solved? I'm having Bittrex issue - no balance


Setting to increase font size

Hello,
I cannot seem to find a setting to increase font size, could you add this feature in the future?

Currently, Electron doesn't have the way to change font size dynamically, so the app also doesn't have the feature.
I want to add font-related settings in the future, so I will also think about it.

Can you change the font size not-so-dynamically? i.e., is there a file I can hack? I've looked around the files and, other than bootstrap, I can't find something that screams layout to me. I've never used electron before so I figure there's something easy I'm missing.
Thanks!

For now, no. BrowserWindow API has options to change font-related settings, however webview tag doesn't follow them.

I might be able to add zoom (like Chrome's Ctrl++, Ctrl+-). Is this matched to your expect?

If you have the time then zoom (out) would work just fine.
I wasn't looking to cause you trouble though. I was just hoping for a maybe a font-size I could reduce.

Added feature idea so this can be upvoted and discussed in one place (there are multiple tickets).
@furnox, @Jarvil, would you be open to helping upvote this issue?

Is this feature idea for the Electron client or the Mac desktop client? I run Linux and so the Mac desktop client won't work for me.

Hi @furnox, propose adding a comment on the feature idea that you need it for Linux (ideally specifying which flavor, and it would especially helpful if you volunteered on the thread to test such a change?)
If you have teammates using Mattermost that need the same feature, it would be highly appreciated if you can get them to vote.
The more votes, the more discussion, the higher the chance of someone from the community contributing the change you're asking for.
Would you be open to helping?

Hi @it33, I think I'm getting confused. @Jarvil and mine posts were concerning the Electron client by @yuya-oc . The feature idea was added here. The feature request you referenced is on the main Mattermost project for the native ios client.
I don't see how these are related or how my comment there will get the Electron client updated. I would certainly be open to helping, I just don't see how.

Yes,
My need is for the Electron Windows-client

My goal was to bring the need for this feature to a larger audience of potential contributors. Whether upvoting or commenting on the existing post for Mac, or adding the first ever feature idea forum entries for Windows and Linux apps, just a few minutes of your time can increase those odds significantly. A being able to answer three tickets with one PR, or answer a ticket with a high number of votes are more attractive than answering just one ticket with a low number of votes. Thoughts?

Merged into #50

After upgrading to Mac OS Mojave, the default font in MatterMost is way too small, hard to read. IT looks like a 10pt font. I can CMD (⌘) + to make the text bigger, but that also blows up embedded images and makes them blurry.
+1 for a font setting option.

Hard to read on a big screen with high res..definitely should be a font size selection options.

This is an even bigger issue on a 4K 28" monitor...

It's an issue on a 14" 2560x1440 laptop screen too :smile: (where the font size is way too small).

My screen resolution is 3440x1440 and Mattermost Desktop font is so small that it is almost unreadable :-(


JSQMessagesCollectionViewFlowLayout bubbleImageAssetWidth

@jessesquires
I've tracked down a visual bug to the value set to _bubbleImageAssetWidth in JSQMessagesCollectionViewFlowLayout.
When clients use a different image factory with a template image smaller than bubble_min,png, one/two letter messages (such as "k") have incorrect bubble sizes. The value bubbleImageAssetWidth is using bubble_min (a 48 px image) where the custom factory is using a smaller image (38px for example).
This MAX() statement in JSQMessagesCollectionViewFlowLayout.m chooses the 48 of the bubble_min.png which makes the chat bubble look 10+ pixels too wide:
CGFloat finalWidth = MAX(stringSize.width + horizontalInsetsTotal, self.bubbleImageAssetWidth) + 2.0f;

I can work around this by subclassing JSQMessagesCollectionViewFlowLayout and overriding the bubbleImageAssetWidth getter, but it might be nice for that value to be settable, or for the image-factory to be the source of this information rather than hard-coding the use of bubble_min.
Changing the value to readwrite would be a simple change with little/no impact to existing consumers. Bringing the factory in to be the source of truth would require some thought & effort.
Would you be interested in a PR which makes bubbleImageAssetWidth a settable property?
-- No urgency on my part as I have a fairly-clean work around.

Would you be interested in a PR which makes bubbleImageAssetWidth a settable property?

Sounds good! :+1:

Hey @walsh2000 - I think 983fb58 addresses this issue. Going to close.
If that's not correct, let me know and I'll re-open.

@jessesquires
Yes, the 2nd init method, taking min bubble width, solves this issue.  :muscle: :facepunch:


kubernetes upgrade from 1.21 to 1.22

as per : https://github.com/jenkins-infra/helpdesk/issues/2930
upgrade kubernetes from 1.21 to 1.22
Changes to Outputs:
  ~ dok8s-versions = [
      - "1.21.11-do.1",
      + "1.22.8-do.1",
    ]

You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.

@smerle33 I let you merge once you are ready (ready to check if it does not break the build once merged ;) )


[CodeComplete] Fix cyclic dependency error in request evaluator during code completion

[CodeComplete] Fix cyclic dependency error during code completion
In the added test case, we were hitting a cyclic dependency error in the request evaluator during code completion, that’s caued as follows:
– To complete at #^COMPLETE^#, we need to get the NamingPattern of start.
– Retrieving the NamingPattern of start causes the entire if-condition to be type checked, including end
– Type checking end requires getting the NamingPattern of start
=> Cyclic dependency
To resolve the issue, I added a special case to NamingPatternRequest that only type-checks the StmtConditionElement that actually defines the VarDecl.
Fixes rdar://75200217 [SR-14317]

@swift-ci Please test

Could we do this way without modifying VarDecl?

I wanted to avoid creating a special case for LabelConditionalStmt in NamingPatternRequest because the basic idea that we need to type check the parent (whatever that may be) seemed right to me – I also wasn’t sure if there were other places that might benefit from only type checking one condition. But in hindsight, it would probably be better to just go for the special case, especially now that I know it’s only one place.

Really good suggestion @rintaro. Simplified the change a lot!

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - f9e7ed820fc4cc7e44fd83031436eb02a3336b58

@swift-ci Please test

@swift-ci Please test Windows


GCCH Cloud Video Interop Limitations

I am a Teams support engineer that specializes in GCCH. I worked a case where we discovered that it is a known limitation that Pexip connectors need to be hosted in Arizona or Texas Azure regions. The Virginia region is not supported for hosting the Pexip connector in GCCH. I can provide case info and Teams PG engineering contacts to confirm this limitation.
Requesting that we include this guidance under the Office 365 US Government and third-party services section.

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

ID: 046dec87-2354-a9db-ae19-3bfaa2626bef
Version Independent ID: 23e7d18f-bbab-75e1-7c85-9b0d0e8f4382
Content: Cloud Video Interop for Microsoft Teams - Microsoft Teams
Content Source: Teams/cloud-video-interop.md
Service: msteams
GitHub Login: @mkbond007
Microsoft Alias: mabond

@bradbrill, only GGCH? What about DoD?


Add option: returnRejected

To use purifycss as a linter only you can use the option returnRejected which enables reporting for removed selectors so that we gain control over the output (unlike rejected).

Could we get this merged into upstream? It's a really simple yet useful feature.


2D Debug: Camera navigation up/down (E/Q) support

This mimics Unity behaviour and allow for a better fps-like navigation.

Thanks! Took this pull and put it in the latest beta: https://github.com/ValveSoftware/steamvr_unity_plugin/releases


XDEBUG_REMOTE_HOST seems not to be used correct in make xdebug-on

take a look why the ENV is not used correctly.

No worries. Glad that I could help. :-)

Hi,
thanks for the info. So I should not use PHP 7.4 but have to use 8 instead?

@boxblinkracer I am not understood this is closed.
If I not use PHP 7.4 version, than not replaced the xdebug.client_host.
By all another versions of PHP, where replaced the xdebug settings for PHP 7.4 and not the used version.


Generate historical temperaments and target-tempered generator-stacks

Move the other Rank-2 temperament modal further down the list.
ref #461

@000masa000 please review.

Hi I am looking at the historical temperaments on https://scaleworkshop.lumipakkanen.com/
Instead of 1/11 comma meantone (rare) you might instead do 1/8 Pythagorean comma, which is used by musicians. Generator 3/2-1\8<531441/524288> 1/6 comma the generator should be 1/6 Pythagorean comma, so 3/2-1\6<531441/524288>..... the 81/80 is used for 1/5 comma 1/4 comma 2/7 comma and 1/3 comma,

Number of fourths (down) I would set for 2 flats for Meantone (so a default value of 3, getting us to C-F-Bb-Eb) instead of 4 .
For Pythagorean tuning I would go from Db-F#, so a default value of 5 so the ratios from C are simplest for each chromatic

in the "target" tab a few typos: "Stacking interval" ("c" missing) "Search range" ("r" missing)
The feature is really cool! Needs a moment to figure out that the list tells you how much tempering there is per fifth based on a target, but once I understood the results are very powerful

Fixed found issues. Redeployed to https://scaleworkshop.lumipakkanen.com/

in the target mode of historical change default to 1 down, then C-Bb and F-Eb are 7/4s and the scale has a 7/4 and a 7/6 (nice)! looking good otherwise on a first glance

in the target mode of historical change default to 1 down, then C-Bb and F-Eb are 7/4s and the scale has a 7/4 and a 7/6 (nice)! looking good otherwise on a first glance

Updated the code but will redeploy only tomorrow. I will also prompt XA for comments if there are no more code changes by then.

can commas be added using the syntax + and -? in that case I can make all the main Well Temperaments as presets, even though algorithmic generation is tricky but possible: organise the chain of 16 central 3/2's with 6 down (from C, so including all 5 flats)  and 10 up, the pitch range should run from Gb-Db-Ab-Eb-Bb-F-C-G-D-A-E-B-F#-C#-G#-D#-A# (as default) as a list of monzos with increasing powers of 3. Then a subset of 12 notes (11 ratios) will each be modified according to the following rule:
the total modification by the end of the chain (12th ratio, determined automatically) should be equal to one pythagorean comma 531441/524288. Along the way modifications are specified as fractions of either this comma or of a syntonic comma, or (in some cases) a sum of two commas (Pythagorean, Schisma). In the background, keep track of fractions of a schisma "left over".
If this sounds too confusing let me show a worst case example, the French Well-Temperament by Rameau (1726) tunes the following chain in 1/4 comma meantone : Bb through B, it leaves B-F#-C# as 3/2s, reduced C#-G# by 1/6 Pythagorean Comma, and then splits the difference. Thus, in the chain Bb-D# (2 down) we generate the following 12 ratios using the 1/4 syntonic method ---
here it would be nicer (for my way of understanding the shorthand) for the scale display to express (optionally) the Pythagorean ratios and their modification rather than the Dirac bra-ket prime- or generator-count notation.... I am slightly confused by it, actually : can you clarify, see below, generated as 1/4 comma  2 down: the last number I surmise is the fraction of 81/80 used to temper the notes, which are Pythagorean, thus powers of 2 and 3: why are the first two numbers of the 3/2 0 and 0 instead of some powers of 2 and 3, i.e. -1 and 1 for example. Sorry for the question, but I don't fully understand the implementation....
1/4 comma with down 2:
[-4, 0, 7/4>
[-1, 0, 1/2>  this note is D
[-5, 0, 9/4>
[-2, 0, 1>
[1, 0, -1/4>  this note is F
[-3, 0, 3/2>
[0, 0, 1/4>   this note is G 3/2-1\4<81/80> (should not the prime count be "1")?
[-4, 0, 2>
[-1, 0, 3/4> this note is A
[2, 0, -1/2>
[-2, 0, 5/4>
2/1     this note is C
ANYWAY I would do it from fractions like this:
start with Pythagorean 2 down:
2187/2048 - 5\4<81/80> ! (same deviation as B)
9/8 - 2\4<81/80>
19683/16384
81/64 - 4\4<81/80>  !( i.e. 5/4)
4/3 + 1\4<81/80>
729/512 - 5\4<81/80> ! (same deviation as B)
3/2 - 1\4<81/80>
6561/4096 - 5\4<81/80> - 1\6<531441/524288> ! additional 1/6 Pythagorean comma
27/16 - 3\4<81/80>
16/9 + 2\4<81{80>
243/128 - 5\4<81/80> !end of 1/4 chain
2/1
at this stage there is one note to tune, D#, producing two fifths: G#-D# and D#-Bb. We have temepered by a total of 7/4 Syntonic + 1/6 Pythagorean. Measured in terms of the Pythagorean Comma, which is what we really want to temper out, we can rewrite this as 7/4(Pythagorean - Schisma) + 1/6(Pythagorean) = 23/12 Pythagorean - 7/4 Schisma. So the amount of comma we need to recouperate is 11/12 Pythagorean - 7/4 Schisma. If we divide the two remaining fifths equally, the amount of tempering applied to D# should be the same value as G# (producing a pure fifth) PLUS 1/2 of the remaining amount, (11/24 of a Pythagorean less 7/8 schisma) Calculating this by hand is mind bending, but the machine can do it easily with a button (divide remaining difference from 1 Pythagorean comma equally amongst the remaining fifths). In fact, this could be a cool way of expressing 12edo: it begins as a user specified Pythagorean tuning, modified by 1\12 Pythagorean. Then, as commas are modified manually, there could be an option to divide remaining commas in the chain equally. So if you set one fifth pure, the reamining ones can be adjusted accordingly. THis could of course be done in either direction (up the fifths or down the fourths)

one final thought: when pressing a preset button, it would be nice in the front end to see the selection has been made active (color change or radio button)  thanks!

[0, 0, 1/4> this note is G 3/2-1\4<81/80> (should not the prime count be "1")?

The monzo of 81/80 is [-4, 4, -1> if you scale that by -1\4 you get [1, -1, 1/4>.
Now add that to 3/2 i.e. [-1, 1, 0> and you get your G. I hope this clarifies why the monzos are like that.

That well-tempering explanation makes my head spin. Could you write out the algorithm in code instead of English? Does that algorithm generalize to generators other than 3/2? If not, I would just add a fixed copy of every notable historical scale that doesn't have a rank-2 structure under Load preset scale.

thanks for the clear monzo explanation.

Well Temperament maybe best I hack together some presets and as we work on it the procedure / algorithm will clarify itself. Explaining is a bit complicated. Basically a chain of 12 fifths needs to have a Pythagorean comma taken away, equally or unequally, across the set of pitches. The usual method involves fractions of a Pythagorean or Syntonic Comma. If using fractions of a Syntonic, then one needs to keep track of the difference Pythagorean - Syntonic = Schisma. Each of these can be expressed as a monzo so it is not hard to notate the tempering. What might be useful is, once the desired commas are positioned, to be able to divide the remaining portion of the tempering across the remaining fifths, since this is kind of the way it was done historically.

for example: temper 8 fifths by 1/4 Syntonic, have several pure fifths, one tempered by 1/6 Pythagorean comma, then figure out the remainder and divide equally.

If there is an algorithm for well-tempering, it should go to core first.
If there isn't, it should go to presets,
Either way I think well-tempering is out of scope for this PR. It can go in this modal, but later.

Migth need to tweak the beating equalizer a bit so that it focuses on the multigen when the generator itself is discordant. That way you could create equally beating scales with neutral thirds for example.
Also I'd like to at least see the MOS sizes somewhere even if we keep things simpler than the proper Rank-2 modal.

Tweaked the beating equalizer to be aware of multigenerators and displayed MOS sizes.
(For testing multigens remember that e.g. the neutral third is spelled 1\2<3/2> in our syntax.)
Latest version deployed at: https://scaleworkshop.lumipakkanen.com/

@000masa000 Replaced the preset names with ASCII instead of fancy unicode vulgar fractions. Deployed the latest version to the beta server. Would you consider this a good first version of the historical modal dialog? We can always fine-tune things, implement non-western presets and add more radio-tabs in future pull requests.

I would remove 1/2 comma since it isn't particularly useful nor historically important. I am happy to suggest some more presets, one might be the tuning Helmholtz used (tempering the 3/2s so that -8 fifths = 5/4) with 24 pitches. I need to check how many fifths down his organ used. It would be nice to have a well-temperament section, but maybe I will try to explain it is a clearer way and we can see how it might work.

Removed 1/2 from rank-2 historicals. Added Helmholtz aka Schismatic with down of 11.
Added a radio tab for Well Temperaments. Added the ones you provided images for as presets.
In my implementation the circle doesn't always close (that happens only if one whole pythagorean comma is being distributed) but I try to provide information about the enharmonics to compensate.
Deployed to the beta server for testing.

I just noticed that there's some :monkey_face: business with the name when changing radio tabs. Will fix later...

HI, checking Kellner: I notice that if the reference is set to A 440, it is automatically the first note of the scale (1/1) as well. Seems to me like there should be an option to set the starting note the C (which automatically rotates the scale to the "correct" position) I will open an issue if you like. If I set the starting note to the frequency of C and the MIDI to 60, Kellner comes out correct

adding some more well temperaments in discord

I think most if not all of these presets start at C. The default in SW has been A because that's the A440Hz pitch standard and the key colors follow. It's not a huge hassle to make this modal affect everything from base MIDI note to base frequency to key colors.

Added rest of the well temperaments.
Made all 12 note presets start from MIDI note 60 with the corresponding base frequency and key colors for middle C.
Fixed the name issues.
Redeployed to beta server.

@000masa000 Can you double check Corrette? The enharmonic distance is suspiciously large.

yes, that is correct, it is a comma too big.... better than 1/4 comma but still bad!

yes, that is correct, it is a comma too big.... better than 1/4 comma but still bad!

Can you spot if I made an error or if there's an error in the source image?

Vallotti 1754
Neidhardt Kleine Stadt 1732
Neidhardt Große Stadt 1724
Bach/Barnes 1979
Bach/Lehman 2005
Bach/O'Donnell 2006    ----(note: 2 ll's)
Bach/Hill 2008
Bach/Swich 2011
Bach/Louie 2018
Lambert 1774
Grammateus 1518
Kellner 1975
Werkmeister III 1691
Kirnberger III 1779
Corrette 1753
Marpourg 1756
Egarr's English Ord 2007
Rameau 1726

and here is one more:
d'Alembert/Rousseau 1752

Any recommendations for the order of the presets? I'm doing pythagorean comma first and syntonic comma second with random order within. Should they be ordered by date within?

by date is nice

There's this quote about Corrette:

Corrette began his temperament from F, tuning eight Quarter-comma narrow fifths in a row, followed by a less-narrow fifth. Two other fifths are wide, and as always, the remaining G♯– E♭ wolf is not intentionally tuned: Corrette called it the ”deffaut de la Partition”.
from https://www.hpschd.nu/index.html?nav/nav-4.html&t/welcome.html&https://www.hpschd.nu/tech/tmp/corrette.html

So I would guess that the wolfy enharmonic is intentional. I can't find a mistake in my work compared to the image.

sounds right.... so Corrette is not really a well temperament, maybe could just leave it out.

I'm going to rename it to Corrette's Wolf to distinguish it from the rest. It still follows the same pattern without requiring extra configuration so I vote for it to stay.

I have made two rational well temperaments, which would like rationalisations-by-hand of vallotti and a 1/3 comma kirnberger variant.... here they are as potential presets, similar sound, different structure, maybe could be included if there was either a way to indicate the deviation between fifths in cents, or as ratios, or if there was an option to approximate by ratios in the menu... ? what do you think?

Sabat I
12
!
17/16 ! C♯=17°/C
9/8 ! D
81/68 ! E♭=u17\E
81/64 ! E
4/3 ! F
27/19 ! F♯=u19\A
3/2 ! G
1731/1088 ! G♯|A♭
27/16 ! A
57/32 ! B♭=19°/G
243/128 ! B
2/1 ! C
Sabat II
12
!
16/15 ! ^D♭
9/8 ! D
81/68 ! E♭=u17\E
81/64 ! E
4/3 ! F
729/512 ! F♯
3/2 ! G
51/32 ! G♯=17°/G
27/16 ! A
3645/2048 ! vA♯
243/128 ! B
2/1

possible bug, tried to implement well temperament with 31 notes and 15 down, alternating -1/6 and -1/3 of 81/80 symmetrically around C. The message a the end was off by a diesis, it did not calculate the right final fifth in the bigger circle.... Should say difference between D## and Fbb

I wasn't sure how to classify enharmonics as all of the historical examples use 12 notes. I went with the definition that enharmonics are separated by 12 steps. I'll switch to using the (start point + 0) and (end point + 1) and trust that the user knows what they're doing if they're cramming more than 12 notes into the spiral.

OK, the scale I am getting seems to produce a wrong cents value on the 30th note, for some reason it starts with 0. which it shouldn't.... and 1241 is one diesis over the octave....

77.84119
115.315667
152.097999
193.156857
234.215715
270.998047
308.472524
349.531382
386.313714
427.372572
464.154904
501.629381
542.688239
579.470571
620.529429
657.311761
698.370619
735.845096
772.627428
813.686286
850.468618
891.527476
929.001953
965.784285
1006.843143
1047.902001
1084.684333
1122.15881
1241.058858
1200.

I have made two rational well temperaments, which would like rationalisations-by-hand of vallotti and a 1/3 comma kirnberger variant.... here they are as potential presets, similar sound, different structure, maybe could be included if there was either a way to indicate the deviation between fifths in cents, or as ratios, or if there was an option to approximate by ratios in the menu... ? what do you think?

I feel like it complicates the process too much. All of the historical examples follow the recipe of distributing a single comma along the spine. We should stick to that for now.
There could be a power-user version in the future that supports generators other than 3/2, arbitrary periods and custom offsets per generation.

alternating -1/6 and -1/3, with two -1/6ths around C.... should be similar to 1/4 comma meantone extended to 31 notes..... hm

OK, the scale I am getting seems to produce a wrong cents value on the 30th note, for some reason it starts with 0. which it shouldn't.... and 1241 is one diesis over the octave....

Not an easy issue to debug as it's related to how the generated intervals are calculated and reduced. Needs a battery of unit tests. I'm inclined to moving this issue to the core and freezing development on this PR until we have a well-tested scale generator for well temperaments.

OK, too bad, I really like it! I guess it is just grabbing an extra fifth in the wrong direction and ending up on the wrong side of the octave.....  .........................................Marc Sabatmobile DE +49<PHONE_NUMBER>3mobile FI +358 ***@***.***://www.plainsound.org From: Lumi PakkanenSent: Thursday, 16 November 2023 18:42To: xenharmonic-devs/scale-workshopCc: Marc Sabat; MentionSubject: Re: [xenharmonic-devs/scale-workshop] Generate historical temperaments and target-tempered generator-stacks (PR #466) OK, the scale I am getting seems to produce a wrong cents value on the 30th note, for some reason it starts with 0. which it shouldn't.... and 1241 is one diesis over the octave....Not an easy issue to debug as it's related to how the generated intervals are calculated and reduced. Needs a battery of unit tests. I'm inclined to moving this issue to the core and freezing development on this PR until we have a well-tested scale generator for well temperaments.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>
Please try to reply directly in GitHub. That email boilerplate is horrific.

I seem to have found the bug. If you choose more than 12 fifths, and set down to 0, then B# is higher than C by a Pythagorean comma. If you set C G to -2 syntonics, B# should be less than C, but instead it generates the scale degree 0. Probably needs to wrap around somehow....

Hopefully fixed the bug with your scale. (I made a 19 note scale while testing.)
Protip: You can specify generator offsets in cents by entering 1.0 as the comma for well tempering. The offset syntax still needs to be fractional so 1/10 instead of 0.1. This is just a hack. I'll make a separate issue for the power-user version.

Fixed the size reseting issue. Associated the comma fractions with the spine.

Would it be possible in the menu for designing the scale to have a reset to 0 button for the 3/2 chain deviations, and a field for the scale name?

suggestion for triple flats, to use the glyph ♭ three times, because the double-flat and single flat combo looks awkward. In fact I prefer ♭♭♭ , ♭♭, ♭ and ♯, ♯♯, ♯♯♯ rather than the cryptic and confusing "double sharp" sign that no one can really read :)

Would it be possible in the menu for designing the scale to have a reset to 0 button for the 3/2 chain deviations, and a field for the scale name?

Yes to the first one.
No to the second one. None of the other generation models have this kind of clutter and you can easily edit the name after you're done with the well tempering phase.

suggestion for triple flats, to use the glyph ♭ three times, because the double-flat and single flat combo looks awkward. In fact I prefer ♭♭♭ , ♭♭, ♭ and ♯, ♯♯, ♯♯♯ rather than the cryptic and confusing "double sharp" sign that no one can really read :)

I'm of the opposite preference. I'll turn this into a user preference with options to use doubles, singles or even ASCII.

Fixed issues I agree with. Redeployed to https://scaleworkshop.lumipakkanen.com/

Working with the well temperament generator. If I mistype comma to an invalid value by mistake and leave the dialogue, when I return the entry field for comma (which has become an invalid /red value) disappears.... couldn't the comma be any value, positive or negative? Thanks for the accidentals option it is really nice to have the extended chain with various display options!

A thought about the reset deviations button, maybe (since it can be at the end of a long scroll list with hidden deviations), it would be nice to have up top; is there some unobtrusive way to show if there ARE non zero deviations in the list?

A thought about the reset deviations button, maybe (since it can be at the end of a long scroll list with hidden deviations), it would be nice to have up top; is there some unobtrusive way to show if there ARE non zero deviations in the list?

It probably should be at both ends then. I can make it disabled if everything is zero already.

Working with the well temperament generator. If I mistype comma to an invalid value by mistake and leave the dialogue, when I return the entry field for comma (which has become an invalid /red value) disappears.... couldn't the comma be any value, positive or negative? Thanks for the accidentals option it is really nice to have the extended chain with various display alternatives!

Well that's a new one! And not unique to this PR. You can do that :magic_wand: trick to any entry field that accepts intervals.

Hi! I am wondering if it is possible to not only have note names but an enumeration of the interval? It is useful for exploring where in a chain to set a target modification. I am experimenting with tweaking 53 3/2's towards rational targets, for example taking the "nearest 11/8" and seeing ways of hitting it nicely from the center pitch. This kind of stuff could be useful power tools, checking for fractional unequal distributions of a comma to smoothly approach multiple targets (like a move towards higher rank temperament....)

Hi! I am wondering if it is possible to not only have note names but an enumeration of the interval? It is useful for exploring where in a chain to set a target modification. I am experimenting with tweaking 53 3/2's towards rational targets, for example taking the "nearest 11/8" and seeing ways of hitting it nicely from the center pitch. This kind of stuff could be useful power tools, checking for fractional unequal distributions of a comma to smoothly approach multiple targets (like a move towards higher rank temperament....)

That's a bit too much for a simple modal. Maybe we can have power tools in SW3 that take up the whole screen and display useful widgets while creating such complex scales with multiple optimization criteria.
Could you write the specs for the power-user version in a new issue? Feel free to include e.g. hand-drawn pictures to sketch out the UI.

Ready for review again.
Deployed to https://scaleworkshop.lumipakkanen.com/ .

Self-reviewing: Good enough. We can iterate on the design later.


Cannot get nanopb to work: Failed to import the protocol definitions for generator

I git cloned the repo but can't seem to be able to build anything.
$ protoc --plugin=protoc-gen-nanopb=/home/gabriels/GS/dev/Protocol_Buffers/Nanopb/source/nanopb/generator/protoc-gen-nanopb --nanopb_out=. simple.proto

         ********************************************************************
         *** Failed to import the protocol definitions for generator.     ***
         *** You have to run 'make' in the nanopb/generator/proto folder. ***
         ********************************************************************

Traceback (most recent call last):
  File "/home/gabriels/GS/dev/Protocol_Buffers/Nanopb/source/nanopb/generator/nanopb_generator.py", line 39, in <module>
    import proto.nanopb_pb2 as nanopb_pb2
  File "/home/gabriels/GS/dev/Protocol_Buffers/Nanopb/source/nanopb/generator/proto/nanopb_pb2.py", line 11, in <module>
    from google.protobuf import symbol_database as _symbol_database
ImportError: cannot import name symbol_database
--nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.

Running make says there's nothing to do:
$ cd /home/gabriels/GS/dev/Protocol_Buffers/Nanopb/source/nanopb/generator/proto && make
make: Nothing to be done for `all'.

Here's my output from a couple things asked for here: https://github.com/nanopb/nanopb/issues/240#issuecomment-277238267
$ which protoc
/usr/local/bin/protoc

$ protoc --version
libprotoc 3.9.0

$ python -c 'import google.protobuf; print(google.protobuf.__file__)'
/usr/lib/python2.7/dist-packages/google/protobuf/__init__.pyc

Hi,

$ which protoc
/usr/local/bin/protoc

$ python -c 'import google.protobuf; print(google.protobuf.__file__)'
/usr/lib/python2.7/dist-packages/google/protobuf/__init__.pyc

It seems like you have a newer protoc installed under
/usr/local/bin/protoc, but the Python protobuf library is the one that
comes with your distribution.
You can try to use /usr/bin/protoc instead:
PATH=/usr/bin make -BC generator/proto
The protobuf python library is a bit annoying in that the protoc version
needs to match with the python library version. Hopefully the protoc
under /usr/bin will match.
--
Petteri

Here's what I got when I tried to build, per your recommendation:
~/GS/dev/Protocol_Buffers/Nanopb/source/nanopb $ PATH=/usr/bin make -BC generator/proto
make: Entering directory `/home/gabriels/GS/dev/Protocol_Buffers/Nanopb/source/nanopb/generator/proto'
protoc --python_out=. nanopb.proto
google/protobuf/descriptor.proto:428:3: Expected "required", "optional", or "repeated".
google/protobuf/descriptor.proto:428:12: Expected field name.
google/protobuf/descriptor.proto:486:3: Expected "required", "optional", or "repeated".
google/protobuf/descriptor.proto:486:12: Expected field name.
google/protobuf/descriptor.proto:487:3: Expected "required", "optional", or "repeated".
google/protobuf/descriptor.proto:487:12: Expected field name.
google/protobuf/descriptor.proto:586:3: Expected "required", "optional", or "repeated".
google/protobuf/descriptor.proto:586:12: Expected field name.
google/protobuf/descriptor.proto:609:3: Expected "required", "optional", or "repeated".
google/protobuf/descriptor.proto:609:12: Expected field name.
nanopb.proto: Import "google/protobuf/descriptor.proto" was not found or had errors.
nanopb.proto:133:8: "google.protobuf.FileOptions" is not defined.
nanopb.proto:137:8: "google.protobuf.MessageOptions" is not defined.
nanopb.proto:141:8: "google.protobuf.EnumOptions" is not defined.
nanopb.proto:145:8: "google.protobuf.FieldOptions" is not defined.
make: *** [nanopb_pb2.py] Error 1
make: Leaving directory `/home/gabriels/GS/dev/Protocol_Buffers/Nanopb/source/nanopb/generator/proto'

Each of these errors (ex: google/protobuf/descriptor.proto:609:3: Expected "required", "optional", or "repeated".) seems to be because it doesn't like the reserved keyword, and is saying it must instead be required, optional, or repeated.
I'm a little confused why it won't accept reserved and requires the deprecated proto2 required or optional. Is there a proto3-compatible version of nanopb?

Cross-reference: https://stackoverflow.com/questions/57367265/how-to-compile-nanopb-proto-file-into-h-and-c-files-using-nanopb-and-protobuf

Ok, it appears like your /usr/bin/protoc is so old that it doesn't support proto3 format.
Because your /usr/local/bin/protoc is up to date, it might be easiest if you also install protobuf-python of the 3.9.0 version. Note that the protoc version and the protobuf-python version have to match.
Nanopb does support proto3 syntax, it's just that you have two conflicting versions of Google's protoc compiler on your system, and one too old python protobuf library.
You can also use one of the binary packages that already come with these dependencies.

Thanks. I got it to work. I had built the protobuf library from source, but I had only followed the C++ build instructions: https://github.com/protocolbuffers/protobuf/tree/master/src
By following the Python build instructions too (https://github.com/protocolbuffers/protobuf/tree/master/python), it worked.
See full details in my answer here: https://stackoverflow.com/questions/57367265/how-to-compile-nanopb-proto-file-into-h-and-c-files-using-nanopb-and-protobuf/57367543#57367543.

Pull request: https://github.com/nanopb/nanopb/pull/418
I'm reopening this issue until you address (and hopefully accept) my pull request to add clarity to the readme.

Thanks for merging my readme change pull request.