The Ziti Controller Helm Chart Hangs During Install

I started playing with the helm charts, and I tried to install the ziti-controller.
Unfortunately, the initContainer never succeeds, but hangs on a configmap:
MountVolume.SetUp failed for volume "ziti-controller-ctrl-plane-cas" : configmap "ziti-controller-ctrl-plane-cas" not found

I installed the chart with this command:
helm upgrade --install ziti-controller openziti/ziti-controller --namespace ziti-controller --create-namespace --values values.yaml

Is it possible it is successful but slow? That configmap is one of the last things to be automatically created. It's used by a Trust Manager Bundle resource to store Ziti's trust anchors. It's created by trust-manager when all the necessary certificates are finally created by cert-manager.
If trust-manager is waiting for cert-manager then there should be a complaint in the logs from one or both of them.

@qrkourier Thank you for the insight.
I had a look at the cert-manager pod logs, and it seems to be unhappy with spec.dnsNames:
I0901 18:01:52.756295       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-admin-client-cert" condition "Ready" to 2023-09-01 18:01:52.756283847 +0000 UTC m=+339978.708668099
I0901 18:01:52.759265       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-web-root-cert" condition "Ready" to 2023-09-01 18:01:52.759257936 +0000 UTC m=+339978.711642195
I0901 18:01:52.759408       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-ctrl-plane-intermediate-cert" condition "Ready" to 2023-09-01 18:01:52.759402627 +0000 UTC m=+339978.711786887
I0901 18:01:52.759824       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-edge-root-cert" condition "Ready" to 2023-09-01 18:01:52.759818722 +0000 UTC m=+339978.712202978
I0901 18:01:52.759970       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-ctrl-plane-identity" condition "Ready" to 2023-09-01 18:01:52.75996466 +0000 UTC m=+339978.712348924
I0901 18:01:52.763396       1 trigger_controller.go:194] "cert-manager/certificates-trigger: Certificate must be re-issued" key="ziti-controller/ziti-controller-web-identity-cert" reason="SecretMismatch" message="Existing issued Secret is not up to date for spec: [spec.dnsNames]"
I0901 18:01:52.763420       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-web-identity-cert" condition "Issuing" to 2023-09-01 18:01:52.763413735 +0000 UTC m=+339978.715797998
I0901 18:01:52.766933       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-web-identity-cert" condition "Ready" to 2023-09-01 18:01:52.76692576 +0000 UTC m=+339978.719310017
I0901 18:01:52.769548       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-ctrl-plane-root-cert" condition "Ready" to 2023-09-01 18:01:52.769540619 +0000 UTC m=+339978.721924877
I0901 18:01:52.770573       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-edge-signer-cert" condition "Ready" to 2023-09-01 18:01:52.770567183 +0000 UTC m=+339978.722951440
I0901 18:01:52.773231       1 conditions.go:96] Setting lastTransitionTime for Issuer "ziti-controller-edge-root-issuer" condition "Ready" to 2023-09-01 18:01:52.773223209 +0000 UTC m=+339978.725607470
I0901 18:01:52.774914       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-web-intermediate-cert" condition "Ready" to 2023-09-01 18:01:52.774905224 +0000 UTC m=+339978.727289482
I0901 18:01:52.777098       1 conditions.go:96] Setting lastTransitionTime for Issuer "ziti-controller-selfsigned-ca-issuer" condition "Ready" to 2023-09-01 18:01:52.777052897 +0000 UTC m=+339978.729437165
I0901 18:01:52.777124       1 conditions.go:96] Setting lastTransitionTime for Issuer "ziti-controller-ctrl-plane-root-issuer" condition "Ready" to 2023-09-01 18:01:52.777118874 +0000 UTC m=+339978.729503132
I0901 18:01:52.777353       1 conditions.go:96] Setting lastTransitionTime for Issuer "ziti-controller-edge-signer-issuer" condition "Ready" to 2023-09-01 18:01:52.777348777 +0000 UTC m=+339978.729733031
I0901 18:01:52.777406       1 conditions.go:96] Setting lastTransitionTime for Issuer "ziti-controller-ctrl-plane-intermediate-issuer" condition "Ready" to 2023-09-01 18:01:52.777401055 +0000 UTC m=+339978.729785309
I0901 18:01:52.780469       1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="ziti-controller/ziti-controller-web-identity-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ziti-controller-web-identity-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0901 18:01:52.782319       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-web-identity-cert" condition "Ready" to 2023-09-01 18:01:52.782309829 +0000 UTC m=+339978.734694092
I0901 18:01:52.782577       1 conditions.go:96] Setting lastTransitionTime for Issuer "ziti-controller-web-root-issuer" condition "Ready" to 2023-09-01 18:01:52.782571269 +0000 UTC m=+339978.734955521
I0901 18:01:52.786030       1 conditions.go:96] Setting lastTransitionTime for Issuer "ziti-controller-web-intermediate-issuer" condition "Ready" to 2023-09-01 18:01:52.786022409 +0000 UTC m=+339978.738406662
I0901 18:01:52.796080       1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="ziti-controller/ziti-controller-web-identity-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ziti-controller-web-identity-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0901 18:01:52.797302       1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="ziti-controller/ziti-controller-web-identity-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ziti-controller-web-identity-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0901 18:01:52.797656       1 conditions.go:203] Setting lastTransitionTime for Certificate "ziti-controller-web-identity-cert" condition "Ready" to 2023-09-01 18:01:52.797649065 +0000 UTC m=+339978.750033340
I0901 18:01:52.815492       1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "ziti-controller-web-identity-cert-rk6lk" condition "Approved" to 2023-09-01 18:01:52.815482915 +0000 UTC m=+339978.767867177
I0901 18:01:52.828598       1 conditions.go:263] Setting lastTransitionTime for CertificateRequest "ziti-controller-web-identity-cert-rk6lk" condition "Ready" to 2023-09-01 18:01:52.828590302 +0000 UTC m=+339978.780974554
I0901 18:01:52.852078       1 conditions.go:192] Found status change for Certificate "ziti-controller-web-identity-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2023-09-01 18:01:52.852072086 +0000 UTC m=+339978.804456345
I0901 18:01:52.866373       1 controller.go:162] "cert-manager/certificates-readiness: re-queuing item due to optimistic locking on resource" key="ziti-controller/ziti-controller-web-identity-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ziti-controller-web-identity-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0901 18:01:52.867527       1 conditions.go:192] Found status change for Certificate "ziti-controller-web-identity-cert" condition "Ready": "False" -> "True"; setting lastTransitionTime to 2023-09-01 18:01:52.867522357 +0000 UTC m=+339978.819906614
I0901 18:01:53.112338       1 controller.go:162] "cert-manager/certificates-key-manager: re-queuing item due to optimistic locking on resource" key="ziti-controller/ziti-controller-web-identity-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ziti-controller-web-identity-cert\": the object has been modified; please apply your changes to the latest version and try again"
I0901 18:01:53.167859       1 controller.go:162] "cert-manager/certificates-issuing: re-queuing item due to optimistic locking on resource" key="ziti-controller/ziti-controller-web-identity-cert" error="Operation cannot be fulfilled on certificates.cert-manager.io \"ziti-controller-web-identity-cert\": the object has been modified; please apply your changes to the latest version and try again"

Also, this is the end of the trust-manager pod logs:
E0901 18:01:52.713068       1 bundle.go:165] trust/bundle "msg"="bundle source was not found" "error"="failed to retrieve bundle from source: Secret \"ziti-controller-ctrl-plane-identity-secret\" not found" "bundle"="ziti-controller-ctrl-plane-cas"
I0901 18:01:52.713197       1 recorder.go:103] trust/manager/events "msg"="Bundle source was not found: failed to retrieve bundle from source: Secret \"ziti-controller-ctrl-plane-identity-secret\" not found" "object"={"kind":"Bundle","name":"ziti-controller-ctrl-plane-cas","uid":"7afa4194-1c29-4b66-af17-6ded55138070","apiVersion":"trust.cert-manager.io/v1alpha1","resourceVersion":"4905784"} "reason"="SourceNotFound" "type"="Warning"
I0901 18:01:52.713260       1 recorder.go:103] trust/manager/events "msg"="Bundle source was not found: failed to retrieve bundle from source: Secret \"ziti-controller-ctrl-plane-identity-secret\" not found" "object"={"kind":"Bundle","name":"ziti-controller-ctrl-plane-cas","uid":"7afa4194-1c29-4b66-af17-6ded55138070","apiVersion":"trust.cert-manager.io/v1alpha1","resourceVersion":"4905784"} "reason"="SourceNotFound" "type"="Warning"
E0901 18:01:52.720676       1 bundle.go:165] trust/bundle "msg"="bundle source was not found" "error"="failed to retrieve bundle from source: Secret \"ziti-controller-ctrl-plane-identity-secret\" not found" "bundle"="ziti-controller-ctrl-plane-cas"
I0901 18:01:52.721115       1 recorder.go:103] trust/manager/events "msg"="Bundle source was not found: failed to retrieve bundle from source: Secret \"ziti-controller-ctrl-plane-identity-secret\" not found" "object"={"kind":"Bundle","name":"ziti-controller-ctrl-plane-cas","uid":"7afa4194-1c29-4b66-af17-6ded55138070","apiVersion":"trust.cert-manager.io/v1alpha1","resourceVersion":"4905787"} "reason"="SourceNotFound" "type"="Warning"
I0901 18:01:52.721527       1 recorder.go:103] trust/manager/events "msg"="Bundle source was not found: failed to retrieve bundle from source: Secret \"ziti-controller-ctrl-plane-identity-secret\" not found" "object"={"kind":"Bundle","name":"ziti-controller-ctrl-plane-cas","uid":"7afa4194-1c29-4b66-af17-6ded55138070","apiVersion":"trust.cert-manager.io/v1alpha1","resourceVersion":"4905787"} "reason"="SourceNotFound" "type"="Warning"

@TheDarkula Does this seem to be reproducible with the latest release of the ziti-controller chart, or reproducible with an experimental ziti-controller chart, or more or less sporadic? Since the conditions seem to be related to the DNS SANs on the leaf certificate that's bound to the edge API web listeners, does it recur when you change the advertised address of one or both of those APIs?

@qrkourier I am using the latest helm chart version.
I ran helm repo update before trying a helm upgrade --install.
I have this section in the values.yaml:
clientApi:
  # -- cluster service target port on the container
  containerPort: 1280
  # -- global DNS name by which routers can resolve a reachable IP for this service
  advertisedHost: ziti-controller.domain.com

I am just thinking things through, does that DNS record need to exist publicly?

I'm unsure why the resources that clearly do exist are not found. Barring any cluster-level security measures, I suspect an inconsistent state could have been caused by changing the namespace at the time of a Helm release upgrade.
Do you get a different result if you first delete the Helm release then install fresh with an aligned namespace?
You're installing trust-manager and cert-manager as sub-charts of ziti-controller, or installing one or both of those separately in advance of ziti-controller?
Are you installing the trust-manager or cert-manager CRDs separately in advance, or as part of their respective chart releases?
If you're unsure, and using ziti-controller chart defaults, then I'll be able to reason it out.

@qrkourier I just ran helm -n ziti uninstall ziti-controller, followed by kubectl delete ns ziti to be sure.
I then re-ran helm upgrade --install ziti-controller openziti/ziti-controller --namespace ziti --create-namespace --values values-controller.yaml
I installed cert-manager and trust-manager ahead of time, not as a sub-chart of the controller chart.
As far as the errors shown when describing the controller pod, the secrets definitely do exist, but it also complains about one configmap:
MountVolume.SetUp failed for volume "ziti-controller-ctrl-plane-cas" : configmap "ziti-controller-ctrl-plane-cas" not found

Looking at the output from kubectl -n ziti get cm shows that ziti-controller-ctrl-plane-cas is not created:
NAME                     DATA   AGE
kube-root-ca.crt         1      4m43s
ziti-controller-config   4      4m43s

I had the thought that the initContainer was hanging, and not retrying, so I deleted the pod.
Then, describing the pod shows this:
  Warning  FailedMount  60s (x8 over 2m4s)  kubelet            MountVolume.SetUp failed for volume "ziti-controller-ctrl-plane-cas" : configmap "ziti-controller-ctrl-plane-cas" not found
  Warning  FailedMount  1s                  kubelet            Unable to attach or mount volumes: unmounted volumes=[ziti-controller-ctrl-plane-cas], unattached volumes=[], failed to process volumes=[]: timed out waiting for the condition

Something tells me that the initContainer needs remedying.
Looking at the deployment.yaml, I see that it is running ziti-controller-init.bash. Where is the Dockerfile/repository for the controller?

ziti-controller-ctrl-plane-cas should be created by trust-manager when it is able to source the secrets from the trust namespace that contain the CA certs for each PKI.
Here's the controller's Dockerfile.

The controller's init container is waiting to start because that CM isn't available.

I understand. With that, it seems that the initContainer has something unhappy going on, as deleting the pod, thus forcing a restart, caused the errors regarding secrets to go away.
Thank you for the link to the Dockerfile, although I could not find where ziti-controller-init.bash was coming from.
Where is that file?
I have a feeling that there is some sort of hard pause or a failure to wait/retry going on there.

Gack. I overlooked what you needed there. Yes, the controller's container image is relatively minimal. That initialization script is provided by the Helm chart here: https://github.com/openziti/helm-charts/blob/main/charts/ziti-controller/templates/configmap.yaml#L9
The logic simply checks whether the controller's BBolt DB file exists and runs the initialization procedure to create it if not.
The way the controller's pod is specified, the init container must succeed before the app container(s) start.
Are you saying you deleted the controller pod that was seemingly stuck at the init state and then both ran successfully?

That means the secrets-related warning messages like this occurred during the first run of the controller pod, and were resolved before the second run that happened when you deleted the first pod.
  Warning  FailedMount  6m22s (x6 over 6m38s)  kubelet            MountVolume.SetUp failed for volume "cert-ctrl-plane-identity" : secret "ziti-controller-ctrl-plane-identity-secret" not found

This lends credibility to the hypothesis that the problem is still trust-manager can't "see" the secrets that it needs to compose the Bundle resource that creates the ziti-controller-ctrl-plane-cas ConfigMap.
Let's look closer at that.
Here's a warning from trust-manager that represents the problem:
E0911 18:28:35.606260       1 bundle.go:165] trust/bundle "msg"="bundle source was not found" "error"="failed to retrieve bundle from source: Secret \"ziti-controller-ctrl-plane-identity-secret\" not found" "bundle"="ziti-controller-ctrl-plane-cas"

Does it exist in the "ziti" namespace?
kubectl -n ziti get secret ziti-controller-ctrl-plane-identity-secret

Is "ziti" trust-manager's trust namespace?
kubectl -n ziti get pods --selector app=trust-manager --output go-template='{{range .items}}{{range .spec.containers}}{{.args}} {{end}}{{end}}'

The secret does exist. kubectl -n ziti get secret ziti-controller-ctrl-plane-identity-secret:
NAME                                         TYPE                DATA   AGE
ziti-controller-ctrl-plane-identity-secret   kubernetes.io/tls   3      21h

However, the second output is blank, because I have trust-manager deployed to the trust-manager namespace.
As far as how I have it deployed, I have not modified this section from the values.yaml:
  trust:
    # -- Namespace used as trust source. Note that the namespace _must_ exist
    # before installing trust-manager.
    namespace: cert-manager

From my understanding of the link you provided, if I want to use trust-manager with multiple deployments, leaving the trust namespace set to cert-manager would be a centralised solution.
The only other way I could see it working, is if I create multiple trust-manager namespaces, like trust-manager-ziti, and modify the values.yaml to have the trust namespace match each deployment that would use it.
For example:

Helm deployment "first" links to the trust-manager-first namespace, which has one trust manager deployed to it
Helm deployment "second" links to the trust-manager-second namespace, which has another trust manager deployed to it

This seems a bit redundant, but I am not sure if that is the recommended way to configure everything.
Would it be more logical to have the ziti-controller chart use the cert-manager namespace by default/be configurable?

Does it show us the trust namespace arg if you give it the correct namespace?
kubectl -n trust-manager get pods --selector app=trust-manager --output go-template='{{range .items}}{{range .spec.containers}}{{.args}} {{end}}{{end}}'

Yes, it does, kubectl -n trust-manager get pods --selector app=trust-manager --output go-template='{{range .items}}{{range .spec.containers}}{{.args}} {{end}}{{end}}'
[--log-level=1 --metrics-port=9402 --readiness-probe-port=6060 --readiness-probe-path=/readyz --trust-namespace=cert-manager --webhook-host=<IP_ADDRESS> --webhook-port=6443 --webhook-certificate-dir=/tls --default-package-location=/packages/cert-manager-package-debian.json]

The issue is that trust-manager is only able to source secrets from trusted namespace "cert-manager," but the necessary secrets are in namespace "ziti."
Thanks for raising the question "How should cert/trust-manager be aligned for concurrent OpenZiti namespaces?" I haven't personally explored that deeply yet. The main constraint I've encountered is that trust manager can only have one "trust namespace," and I've engaged the devs to express the need for configurable multiple trust namespaces. As far as I know, that's on their backlog. Meanwhile, we could have a separate discussion to explore multiple instances of trust-manager, one per OpenZiti namespace, assuming the Helm release names are uniquely named and that trust-manager's Cluster-level resources, adopt the Helm release name to ensure uniqueness.

Indeed!
Sure thing :)
The elegant solution would be for trust-manager to have a section similar to the traefik chart:
  kubernetesIngress:
    namespaces:
      - "cert-manager"
      - "ziti"
      - "more-namespaces"

What seems to be most logical for the ziti-controller chart, is to have two different configurations:

Using the trust-manager sub-chart, which then can default to using the ziti namespace
Using a pre-installed instance of trust-manager, which would then take the trust namespace as an input.

Something like this:
trust-manager:
  # -- install the trust-manager subchart to provide CRD Bundle
  subchart-enabled: false
  app:
    trust:
      # -- trust-manager needs to be configured to trust the namespace in which
      # the controller is deployed so that it will create the Bundle resource
      # for the ctrl plane trust bundle
      preinstalled-namespace: cert-manager
      subchart-namespace: ziti

Helm is limited in its ability to check that an arbitrary set of input values expresses a sane configuration. It's still worthwhile to ensure that the default values are sane together, but things get complicated from there.
For this reason, it's necessary to have oversight or orchestration or expertise at some level that's higher than Helm. I've experimented with using Terraform to both document and automate feeding a sane set of inputs to the Helm chart. That worked pretty well, but I'm still hoping to arrive at something that feels more satisfying and acceptable to a wider audience.
Hypothetically, maintaining separate charts for each sane set of default input values would work, but it would also be hard work to rectify drift between them, so it would eventually demand some kind of nanny/parent system that renders each variant. That doesn't feel like the right direction.
A more appealing alternative is Kustomize, which can patch the rendered templates. I've fiddled with Kustomize, which is built-in to kubectl IIRC, but haven't delved deeply enough to be confident it's expressive enough to cross-check characteristics spanning the Helm release. A hypothetical workflow:

Helm renders templates to temporary storage as K8s resource manifests
Kustomize patches manifests according to target env and other arbitrary variables
Patched manifests are written to a hot dir for a Gitops-driven deployment scheme

The top-level trust-manager map in the controller chart's values.yaml is consumed by the trust-manager chart, not the controller chart. Since we don't control or modify that chart currently, there's no way to inject logic in the trust-manager chart like "let trust-manager namespace match the ziti-controller namespace" or invent new input values like subchart-namespace.
Kustomize would work well in this case when trust-manager is installed as a sub-chart. Helm could render the chart and sub-chart templates to manifests which can then be patched by Kustomize to ensure alignment.
We're currently pinning the upstream version of trust-manager, but another option would be to maintain a fork that requires a custom input value like the ziti-controller namespace, and ensures that it matches the trust namespace.

Thank you for all of the information!
I think the best solution at the moment is to just change the default trust namespace to ziti.
So you know, I tried that, and the pod does come up happily :)
With that, I do have one more query. How can I specify hostPath storage for persistence?

Glad to hear that! Also: I'm happy to respond here and want to make sure you're aware of a rich resource: the Discourse forum: https://openziti.discourse.group/. We'd be happy to have you asking/answering over there too. A lot of those topics start out as symptoms or ideas and mature into GitHub Issues when they become sufficiently well-defined.
I'll start working on the hostPath answer. Would you be willing to post that question in the forum?

I will create an account momentarily :)


Impact class needs to be tested

Description
Currently, Impact class is not tested. We should design some tests to check it out.

Cases to be tested

[ ] Impact template should complain when a non parameterized molecule is fetched.
[ ] Writer should be tested

Support
Set of three templates to use as reference: reference_templates.zip

metz: corresponds to the template we expect to obtain when loading the following molecule

from offpele.topology import Molecule
from offpele.utils import get_data_file_path
from offpele.template import Impact

pdb_path = get_data_file_path('ligands/methane.pdb')
m = Molecule(pdb_path)
m.parameterize('openff_unconstrained-1.2.1.offxml')

impact = Impact(m)

malz: corresponds to the template we expect to obtain when loading the following molecule

from offpele.topology import Molecule
from offpele.utils import get_data_file_path
from offpele.template import Impact

pdb_path = get_data_file_path('ligands/malonate.pdb')
m = Molecule(pdb_path)
m.parameterize('openff_unconstrained-1.2.1.offxml')

impact = Impact(m)

etlz: corresponds to the template we expect to obtain when loading the following molecule

from offpele.topology import Molecule
from offpele.utils import get_data_file_path
from offpele.template import Impact

pdb_path = get_data_file_path('ligands/ethylene.pdb')
m = Molecule(pdb_path, tag='ETL')  # Note that in this case we are assigning a tag to the molecule which will be used in the Impact template
m.parameterize('openff_unconstrained-1.2.1.offxml')

impact = Impact(m)

Implementation

Example

from test_templates import TestImpactTemplate

test = TestImpactTemplate()
test.test_input()
test.test_writer()

Support 2
I am attaching three reference Impact templates (corresponding to the ligands introduced in my previous post) obtained with the OPLS2005 force field: OPLS_reference_templates.zip


feat: setup for custom messages

Awesome plugin!
This was a pretty quick approach to expand it to allow for configured messages and icons!
Example use case
require("ror.minitest_reporter").setup({
  notification_messages = {
    file = "Running entire file..."
  }
})
local Remap = require("config.keymap")
local nnoremap = Remap.nnoremap

nnoremap("<Leader>mf", ":MinitestRun File<CR>")
nnoremap("<Leader>ml", ":MinitestRun Line<CR>")

Thanks for the PR, this is great! There are a few other features that I want to add in like rspec_reporter. I am not super familiar with building plugin with Lua (this is my second plugin), but can we achieve something like:
require("ror").setup({
  minitest_reporter = {
    notification_messages = {
      file = "Running entire file..."
    }
  },
  rspec_reporter = {
    success_icon = "🎉"
  }
})

I think this is doable? I am guessing we need a init.lua that requires all the other features available and provide a setup method there. However, I am not sure how I can access the settings set in my other file (but I think it's doable).
Otherwise, it will be an opt-in style for the user to decide what to use. Would love to hear your opinion on this.
require("ror.minitest_reporter").setup({
  notification_messages = {
    file = "Running entire file..."
  }
})

require("ror.rspec_reporter").setup({
  success_icon = "🎉"
})

-- Do the same for future features

@troyizzle Thank you for the PR again, I spent some time figuring out how I would want to do it, and did some restructuring of the code base. You should be able to customize the setting using this now:
require("ror").setup({
  minitest = {
    message = {
      file = "Running all the tests...",
      -- This will be follow by a space, current cursor line number and ...
      -- E.g. Running test on line 10...
      line = "Running test on line"
    },
    pass_icon = "✅",
    fail_icon = "❌"
  }
})


Unsatisfied constraint feedback

Problem
Presently when testing or debugging a complex circuit it is difficult to identify which constraints weren't satisfied for a given input. Working around this is cumbersome, and can involve commenting out large parts of the circuit to isolate the failed constraint.
This is the current feedback provided for a failed proof:
could not satisfy all constraints

Solution
Provide semantics for annotating constraints akin to an assert or require statement. The associated message should then be listed when proving fails. E.g.
require(x < 5, "x is too high");

could not satisfy all constraints:
  - x is too high

Alternatives considered
A simpler compromise would be to provide line numbers for the failed constraints. Note however this would insufficient when authoring failure case unit tests, which would want to test for a specific failure message.

Partially resolved by https://github.com/noir-lang/noir/pull/1864, opened a separate issue for assert messages: https://github.com/noir-lang/noir/issues/1939


Remove incorrect indents

Coverage remained the same at 84.455% when pulling e7764e5a8c0e99f3ff6f313c174cb66439e8ad98 on jcarpent:topic/bugs into aa06d835ce1e8ee07a4cf33d06ac566eec4c490d on stack-of-tasks:devel.


Add R - Jupyter - R Markdown - Data Science - Machine Learning DevConatiner

An environment to perform Data Science and Machine Learning in R with support for .R scripts, Jupyter Notebooks, and R Markdown Notebooks.

There is an existing R definition in this repository. https://github.com/microsoft/vscode-dev-containers/tree/main/containers/r Is there a reason we need to create a new one verses adapting what is there?
//cc @dynamicwebpaige as well for feedback along with @kmehant and @eitsupi on the existing definition.

Since this is a pure extension of the R definition, I don't think it is appropriate to include it in this repository.

Since this is a pure extension of the R definition, I don't think it is appropriate to include it in this repository.

@eitsupi yes yes. It is an extension of the R definition to include Jupyter Notebooks support. I had a really hard time trying to run Jupyter Notebooks on the existing R container.
Perhaps I could do a PR directly into the R definition instead of an entirely new definition?

There is an existing R, Jupyter datascience, and Anaconda definition in this repository. https://github.com/microsoft/vscode-dev-containers/tree/main/containers/r, https://github.com/microsoft/vscode-dev-containers/tree/main/containers/python-3-anaconda, and https://github.com/microsoft/vscode-dev-containers/tree/main/containers/jupyter-datascience-notebooks. Is there a reason we need to create a new one verses adapting what is there?
//cc @dynamicwebpaige as well for feedback along with @kmehant and @eitsupi on the existing definition.

@Chuxel, the reason for this definition is that we were in a situation where we wanted an out of the box container to run .R, .Rmd and Jupyter Notebooks for students without much fuss/tweaking of the existing definitions. Hence the reason for the PR. cc @leestott

Perhaps I could do a PR directly into the R definition instead of an entirely new definition?

Like the definitions of other languages, the definition of R is intended to include only the bare essentials.
For example, my personal preference is the tidyverse packages, so I use edited container definitions like the following for my own use.
https://github.com/eitsupi/r-ver/blob/be6add710fc31f77d70ddb6547c2d3ed6f10d574/.devcontainer/Dockerfile
I think it is a good idea to create a template repository or maintain documentation on VSCode Remote-Containers.
If you are willing to help, you could post such a document on the Rocker website.
https://github.com/rocker-org/website
If my understanding is correct, the VSCode team are currently working on a mechanism to easily download third party container definitions in https://github.com/microsoft/dev-container-spec.
Once that is in place, it is possible that you could include such definitions in another repository that is not here, and make it easier to download them.

@Chuxel So as @R-icntay  mention the reason for this definition is that we were in a situation where we want an out of the box container to run .R, .Rmd and Jupyter Notebooks for students and educator workshops, We are  in the process of launching some R modules on MS Learn + Learn R Jupyter Sandbox created.
Our longer term we want a R+Jupyter+DataScience+Machine DevContainer image  which will NOT require and tweaking of the existing definitions as this is a request from the Edu Community to have a preconfigured R+DataScience+ML image for Tinyverse/Tidy Model etc.
Hence the reason for the PR. cc @dynamicwebpaige  @eitsupi

Yeah, reading through more, this has quite a bit of opinion in it that makes it a bit more than a "definition" in this repository.  For example, things like gitlens are quality of life extensions rather than something to enable a scenario.  VS Code has settings sync to allow you to pull across these types of extensions from your personal preferences, so for a general scenario, including them in a definition is a bit counterproductive - and can actually irritate developers. e.g. ... this is a lot:
"ionutvmi.path-autocomplete",
"usernamehw.errorlens",
"mhutchie.git-graph",
"tomoki1207.pdf",
"DavidAnson.vscode-markdownlint",
"Rubymaniac.vscode-paste-and-indent",
"GrapeCity.gc-excelviewer",
"IBM.output-colorizer",
"Mohamed-El-Fodil-Ihaddaden.shinysnip",
"hediet.vscode-drawio",
"MS-vsliveshare.vsliveshare-pack",
"eamodio.gitlens",
"GitHub.vscode-pull-request-github"

I understand that this could make sense if a particular curriculum drove the desire to have these present, but part of me wonders whether what you are describing is more along the lines of the vscode-remote-try-* repositories. Different curriculums are going to push someone towards or away from adding these extensions - they add more UX that can actually cause confusion for people new to VS Code (our experience has actually been that educators often want to remove default VS Code features more than add more).
A starter repository can have much more opinion in it based on the assumptions about the curriculum than something designed to drop into an arbitrary project like these are intended to do. Is there perhaps a happy medium here?

Thank you for tagging me into this issue, @Chuxel! And thank you to @R-icntay for proposing an R-centric devcontainer definition. I agree that the current R devcontainer is a bit spare; and that the tidyverse data analysis tools might not mesh well with an environment for pure R language development.
To @Chuxel's point, above: adding too many extensions might result in performance degradations, or conflicts for shortcuts / hotkeys when using VS Code. Would it be possible just to include the R-centric and data analysis extensions in this devcontainer (as an example, the extension for Shiny snippets, but to remove the git-centric, Live Share, and formatting extensions?
A couple of additional questions:

Are you using VS Code as your primary IDE for R development?

If yes: have you been experiencing issues when attempting to use R kernels with VS Code notebooks?
If no: what other IDE(s) have you been using? Am assuming RStudio, and Jupyter / JupyterLab.

Will this devcontainer be in support of a data science course?

cc: @tanmayeekamath, as this devcontainer might be useful for the genomics team to review, once it has been created.

so for a general scenario, including them in a definition is a bit counterproductive

My understanding is that extensions like GitLens (which I also use all the time!) should be defined in remote.containers.defaultExtensions in each person's settings.json, and only extensions used by the whole project should be included in devcontainer.json.
https://code.visualstudio.com/docs/remote/containers#_always-installed-extensions
However, I think many users are unaware of this feature and try to include everything in devcontainer.json...

Jupyter

I prefer RMarkdown to ipynb and haven't written R in Jupyter on VSCode for a long time, although I do use VSCode Jupyter when writing Python.
I agree that this is a great extension, but note that even the devcontainer definitions for Python do not have IPython installed.

I tried about installing jupyter. It is enough to add the following contents to the existing Dockerfile.
RUN apt-get update && apt-get -y install \
    libzmq3-dev \
    && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* \
    && install2.r --error --skipinstalled --ncpus -1 IRkernel \
    && rm -rf /tmp/downloaded_packages \
    && python3 -m pip --no-cache-dir install jupyter \
    && R --vanilla -s -e 'IRkernel::installspec(user = FALSE)'

How about adding this to the documentation?
This is the first time I've touched R with Jupyter since the Jupyter extension became VSCode Native Notebook, and it was a pretty good experience.
However, there seems to be a problem that R variables do not show up in either jupyter variables or the vscode-R's R workspace.

@renkun-ken As the primary developer of vscode-R, do you have any thoughts?

@Chuxel , @dynamicwebpaige. Thank you for getting back with great feedback on this.
Yes, I must admit, there was a bit of an overkill with the extensions. It would be possible to remove the extensions suggested by @Chuxel and everything would work just fine. In the devcontainer.json, they had been commented as // Other extensions that make life a little bit easier right off the bat
@dynamicwebpaige, we wanted to use the devcontainer for workshops relating to an upcoming R course on Microsoft Learn. Ideally we want to use VS Code and VS Code Notebooks (since .ipynb is supported on Microsoft Learn). From what we have gathered from the learners community, part of making it easier for learners to ramp up on R and in extension R + VS Code is an out of the box environment where students can start running R code in no time. Tagging @leestott in case I missed anything.

I tried about installing jupyter. It is enough to add the following contents to the existing Dockerfile.
RUN apt-get update && apt-get -y install \
    libzmq3-dev \
    && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* \
    && install2.r --error --skipinstalled --ncpus -1 IRkernel \
    && rm -rf /tmp/downloaded_packages \
    && python3 -m pip --no-cache-dir install jupyter \
    && R --vanilla -s -e 'IRkernel::installspec(user = FALSE)'

How about adding this to the documentation?
This is the first time I've touched R with Jupyter since the Jupyter extension became VSCode Native Notebook, and it was a pretty good experience.
However, there seems to be a problem that R variables do not show up in either jupyter variables or the vscode-R's R workspace. (microsoft/vscode-jupyter#5264)

@renkun-ken As the primary developer of vscode-R, do you have any thoughts?

Thank you @eitsupi. Much neater implementation than the one I had. It would be great to have it documented somewhere. As a new user to docker and everything, it took a while to figure out how to make the R kernel visible to Jupyter.

we wanted to use the devcontainer for workshops relating to an upcoming R course on Microsoft Learn.

Note that the Rocker project has an image called rocker/binder with a large number of packages installed on rocker/r-ver, including IRkernel and tidyverse.
List of installed packages. https://github.com/rocker-org/rocker-versioned2/wiki/binder_6cc03d713ae1
This image is so huge that it may contain packages that are unnecessary for many users, but may be a good option for learning purposes.
RStudio Server and JupyterLab are already installed, and users can use either IDE.
If you want to use this with VSCode Remote-Containers, I think you just need to rewrite rocker/r-ver to rocker/binder and change the user name to rstudio in the R definition's Dockerfile and devcontainer.json.
cc @cboettig

I merged in the updated comments in #1320 given the discussion here.

Note that the Rocker project has an image called rocker/binder ...  I think you just need to rewrite rocker/r-ver to rocker/binder

@R-icntay @eitsupi There is also a way where you can wire up an option for Notebook support as an option that shows up in VS Code "Add Dev Container Config UX" based on a comment in the Dockerfile. We want to formalize this a bit more as we move forward on some of the repository proposals mentioned above, but it's in heavy use in the repo.  What you can do is the following:
# [Option] Enable Notebook support
ARG ENABLE_JUPYTER=false
RUN if [ "${ENABLE_JUPYTER}" = "true" ]; then
      apt-get update && apt-get -y install libzmq3-dev \
      && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* \
      && install2.r --error --skipinstalled --ncpus -1 IRkernel \
      && rm -rf /tmp/downloaded_packages \
      && python3 -m pip --no-cache-dir install jupyter \
      && R --vanilla -s -e 'IRkernel::installspec(user = FALSE);
    fi

devcontainer.json then lists this as a build arg, and the UX will present the option and update it as appropriate.
{
    "build": {
        "dockerfile": "Dockerfile",
        "args": {
            "ENABLE_JUPYTER":  "false"
        }
  }
}

You can also do this with the image - the Dockerfile could include the following:
# [Choice] Start with a minimal image (r-ver) or full image (binder): r-ver, binder
ARG VARIANT=r-ver
FROM rocker/${VARIANT}

The UX will update the "VARIANT" in devcontainer.json automatically based on what you pick.  This is how all the version and image variants work for things like the Python definition: https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/.devcontainer/Dockerfile

# [Option] Enable Notebook support
ARG ENABLE_JUPYTER=false
RUN if [ "${ENABLE_JUPYTER}" = "true" ]; then
      apt-get update && apt-get -y install libzmq3-dev \
      && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* \
      && install2.r --error --skipinstalled --ncpus -1 IRkernel \
      && rm -rf /tmp/downloaded_packages \
      && python3 -m pip --no-cache-dir install jupyter \
      && R --vanilla -s -e 'IRkernel::installspec(user = FALSE);
    fi

devcontainer.json then lists this as a build arg, and the UX will present the option and update it as appropriate.
{
    "build": {
        "dockerfile": "Dockerfile",
        "args": {
            "ENABLE_JUPYTER":  "false"
        }
  }
}

You can also do this with the image - the Dockerfile could include the following:
# [Choice] Start with a minimal image (r-ver) or full image (binder): r-ver, binder
ARG VARIANT=r-ver
FROM rocker/${VARIANT}

The UX will update the "VARIANT" in devcontainer.json automatically based on what you pick. This is how all the version and image variants work for things like the Python definition: main/containers/python-3/.devcontainer/Dockerfile

Thank you for your suggestion. That sounds good!
I would like to work on this when I have time.

@R-icntay @leestott @dynamicwebpaige
Switching the Remote-Containers extension to the pre-release version, we can use the latest R definition updated via #1327.
I think this will give you the container you are looking for if you only add some R packages to rocker/binder based Dockerfile and extensions to the devcontainer.json.

Thanks again for opening the PR and for the discussion so far.
As a heads up, our team has been actively focused on an updated plan for community contributions and this repo moving forward, which we've now outlined in this issue: https://github.com/microsoft/vscode-dev-containers/issues/1589. This includes moving to a couple new repos for images (https://github.com/devcontainers/images) and Features (https://github.com/devcontainers/features).
We anticipate to have a similar repo and distribution process for templates/definitions. We'll keep everyone updated (likely via another issue in this repo or comment on https://github.com/microsoft/vscode-dev-containers/issues/1589) when our new templates repo is available and the process is defined.
Please let me know if you have any questions, thank you!


GH-39500: [Docs] Pin pydata-sphinx-theme to 0.14

Rationale for this change
The latest pydata-sphinx-theme release 0.15 of a few days ago had some breakages. So let's pin to 0.14.x until 0.15 has stabilized.

Closes: #39500

@github-actions crossbow submit test-ubuntu-22.04-docs

@github-actions crossbow submit test-ubuntu-22.04-docs


Using ccxws in browser

Since we are using the ws module, we cannot use the the library in browser. If we can detect if the library is used nodejs or browser, and dynamically use the compatible websocket client, we can use the module on client side aswell. Something like this can be used i think.
A popular use case could be realtime charts since Candles api is also developed for some exchanges.

duplicate of #17, can you please close tehis?


Figure out how to handle drag-drop in an elevated session

Environment
Windows build number: 19041
Windows Terminal version: 1.0.1401.0

Steps to reproduce

Open Windows Terminal
Open a second tab (the shell does not matter)
Try to drag any tab

Expected behavior
Tabs are attached to the mouse cursor and can be dragged to the desired location.
Actual behavior
Nothing happens

I can only reproduce this issue on my work PC. My private PC works just fine. They use the exact same settings file. Also restarting the computer or reinstalling WT does not help.

Are you running the Terminal elevated / as an Administrator?

Yes, that seems to be it.
If I start it elevated on my private PC it also stops working. But on my work PC it seems to run elevated by default (UAC is configured to not show a prompt). Is there a way to disable it? As I'm working nearly exclusively in WSL, I don't really need to have it run as admin.

So, okay, here's a weird thing.
We are working around a crash (!) caused by the drag/drop host being at a different integrity level than the Terminal application. I know, that sounds silly. I agree.
Now, the problem here is that since your entire user session has UAC disabled, there is no integrity level separation. Drag/drop would work perfectly fine for you!
Unfortunately, we have no way of knowing that. All we can check is "does this user have admin rights?" without really violating the bounds of our contract with the system.
I'm going to make this bug the master for "figure out a good story for drag/drop during elevation".

So, okay, here's a weird thing.
We are working around a crash (!) caused by the drag/drop host being at a different integrity level than the Terminal application. I know, that sounds silly. I agree.
Now, the problem here is that since your entire user session has UAC disabled, there is no integrity level separation. Drag/drop would work perfectly fine for you!
Unfortunately, we have no way of knowing that. All we can check is "does this user have admin rights?" without really violating the bounds of our contract with the system.
I'm going to make this bug the master for "figure out a good story for drag/drop during elevation".

Could you elaborate on this? Is it related to your use of XAML islands?
I remember earlier preview versions crashing immediately when I tried to drag admin tabs. Not crashing is better than crashing, but being able to drag them would be even better. :)

Would there be a way to inform the user this is (currently) not supported, some visual clue maybe?

I'm pretty sure when you try to drag/drop into an elevated Terminal window, the OS automatically replaces the drag/drop visual with the 🚫 icon to indicate that this isn't supported

Just wondering if there's been any further development with this? I find the ability to reorder tabs extremely useful, and I quite often have my WT run as admin. It's quite frustrating not being able to reorder just because I'm in an elevated prompt.

@dracan Heyo sorry, missed this while I was on leave and only just finding this comment now.
No, unfortunately, there hasn't been any progress on drag/drop in elevated windows. Alas, that's not something we have a lot of power over. (Note to self, this is tracked in MSFT:35616520)
Now, on the bright side, there is a workaround for moving tabs without using drag/drop. There's a pair of actions in the Command Palette for "Move tab forward" / "Move tab backward" which will reorder your tabs without the need to invoke the drag/drop service. That might be a possible workaround.
Docs link

Now, on the bright side, there is a workaround for moving tabs without using drag/drop. There's a pair of actions in the Command Palette for "Move tab forward" / "Move tab backward" which will reorder your tabs without the need to invoke the drag/drop service. That might be a possible workaround.
Docs link

@zadjii-msft, thanks. This is useful.
However one must still wonder how Microsoft's leading, native, non-deprecated UI toolkit doesn't support drag and drop in 2023, almost 40 years after the first release of Windows.

No, unfortunately, there hasn't been any progress on drag/drop in elevated windows. Alas, that's not something we have a lot of power over. (Note to self, this is tracked in MSFT:35616520)

I understand that the Windows Terminal team is not responsible for the inadequacies of the team responsible for WinUI. Fixing WinUI itself is indeed "not something [you] have a lot of power over". But there is something over which you hold all the power and can't blame anyone else - the decision to use WinUI.
I have lots of programs on my computer, and every one of them but Windows Terminal that supports drag and drop supports it also while elevated. This includes both application using Windows only UI toolkits and cross-platform UI toolkits, such as IDA and Wireshark.
It seems extremely unreasonable that Microsoft produces software that run only on Windows, Microsoft's own operating system, and it doesn't support a basic if not trivial feature of Windows since the days of 1.0, while virtually every other application that runs on Windows, including applications that aren't designed specifically for Windows, do support it.

Boy there's a lot to unpack here, and frankly, the Terminal repo isn't the place for this discussion. It definitely impacts us, yea, but at the end of the day we're subjects of the platform the same as any other 3p application.
A better place to have that discussion might be the Windows App SDK repo. (It's my understanding that) Fundamentally, the modern drag/drop service was not designed to work with elevated processes. However, through the organic growth of the platform over the years, applications that require elevated processes which leverage the modern platform are now more common, and something the platform needs to do some work to close the gaps.
We're going to continue trying to use the cutting edge of the platform, if only to provide a high-impact surface with which we can identify shortcomings of the platform and push for improvements for the rest of the ecosystem.
I'd recommend continuing the discussion on the WASDK repo (which is basically the repo for the Windows platform). I'm gonna liberally mark comments as off-topic here, so we can focus on workarounds the Terminal might be able to leverage.

Boy there's a lot to unpack here, and frankly, the Terminal repo isn't the place for this discussion. It definitely impacts us, yea, but at the end of the day we're subjects of the platform the same as any other 3p application.
A better place to have that discussion might be the Windows App SDK repo.

I don't understand how the WASDK repo is the place to discuss Windows Terminal's decision to use WinUI/WASDK.
OK, WASDK is all kinds of broken. Why subject Windows Terminal to that?

(It's my understanding that) Fundamentally, the modern drag/drop service was not designed to work with elevated processes. However, through the organic growth of the platform over the years, applications that require elevated processes which leverage the modern platform are now more common, and something the platform needs to do some work to close the gaps.

That may be true but that's exactly the part that is irrelevant to this repository. That's WASDK's problem. Irrelevant here.

We're going to continue trying to use the cutting edge of the platform, if only to provide a high-impact surface with which we can identify shortcomings of the platform and push for improvements for the rest of the ecosystem.

How can you honestly say "cutting edge" and "doesn't support drag and drop" simultaneously?

I'd recommend continuing the discussion on the WASDK repo (which is basically the repo for the Windows platform).

I don't understand how the WASDK repo is the place to discuss Windows Terminal's decision to use WinUI/WASDK.
OK, WASDK is all kinds of broken. Why subject Windows Terminal to that?

I'm gonna liberally mark comments as off-topic here, so we can focus on workarounds the Terminal might be able to leverage.

I am proposing a workaround for Windows Terminal:
Use anything but WASDK/WinUI. Even UWP XAML apps support drag and drop when elevated. Why not use that?

@conioh - Sounds like you're suggesting a codebase re-write of all of WT to use a different platform just to fix this small issue of tab drag-and-drop when running as admin? That sounds like a MASSIVE undertaking to me just to fix this one thing!

Sounds like you're suggesting a codebase re-write of all of WT to use a different platform just to fix this small issue of tab drag-and-drop when running as admin? That sounds like a MASSIVE undertaking to me just to fix this one thing!

@dracan:
Only to someone's who's not really listening. Actually it sounds like I'm suggesting a search-and-replace of just a tiny edge of Windows Terminal - wherever it says Microsoft.UI.Xaml etc. (WinUI 3) replace it with Windows.UI.Xaml etc. (UWP). Calling it a "re-write of all of WT" and "a MASSIVE undertaking" is misleading, disingenuous, and incompatible with the project's CoC. I must request you to refrain from doing that.
See https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/migrate-to-windows-app-sdk-ovw
Just perform the equivalent of the 3 steps Microsoft officially suggests in the reverse direction:

Create a new UWP project ~WinUI 3 packaged desktop project (see Create your first WinUI 3 project)~. That could go into your existing solution.
Copy your XAML/UI code. In many cases you can simply change namespaces (for example, Microsoft.UI.* to Windows.UI.* ~Windows.UI.* to Microsoft.UI.*~).
Copy your app logic code. Some APIs need tweaks, such as Popup, Pickers, and SecondaryTiles.

@conioh Windows Terminal does not currently use WinUI 3 or WinAppSDK. It uses system XAML (built into Windows) plus Microsoft.UI.Xaml (WinUI 2) controls.
Moving the application from System XAML plus WinUI2 to System XAML only[^1] and packaging it as a "UWP" application (which runs at an integrity level that is inappropriate for the basic system management tasks Terminal is used to run (which is important because Terminal needs to spawn processes, which would be sandbox-restricted)) would present a significant regression in usability, deployment and project direction. It is not a simple search and replace, especially given that the Windows.UI.Xaml namespace doesn't have many of the controls which we are using (including the TabView, which is responsible for most of the actual UI 😆). We're just not going to do that, because on top of being a significant undertaking it will send us back to the halcyon days of 2016.
Moving the application from System XAML plus WinUI 2 to WinUI 3 where the drag-drop issue is expected to be fixed is also a significant undertaking.
Anyway, this discussion is not going anywhere. I'm going to lock it for a while.
[^1]: moving from whichever parts of Microsoft.UI.Xaml we are using to Windows.UI.Xaml as you recommend


update to capi v1.3.3

The dependabot PR updates capi to 1.3.3, but leaves out the version in capirc and .goreleaser.yaml. This PR resolves it

Thanks for fixing!

I see that the golang ci lint keeps timing out, should I address it in this PR too by increasing the timeout?

Thanks for fixing!

I see that the golang ci lint keeps timing out, should I address it in this PR too by increasing the timeout?

Yes. Is it still failing? Do you know why?

Thanks for fixing!

I see that the golang ci lint keeps timing out, should I address it in this PR too by increasing the timeout?

Yes. Is it still failing? Do you know why?

It's probably a timeout issue

Thanks for fixing!

I see that the golang ci lint keeps timing out, should I address it in this PR too by increasing the timeout?

Yes. Is it still failing? Do you know why?

It's probably a timeout issue we have this flag passed to it --timeout=5m. Ordinarily this is totally fine, but sometimes GH Actions runs very slow(could be due to increased load on GH infra) and this times out. I'll look at the failed action and try to find out

Okay, so I looked at the failing action and it indeed is timing out.


" Add Card to Apple Pay" error shown though Card exists in Phone

Version: "judokit-react-native": "3.0.1",
Implementation:

const applePayOptions: JudoApplePayConfiguration = {
        merchantId: AppConfig.JudoKit.merchantId,
        countryCode: 'GB',
        paymentSummaryItems: [
            {
                label: QUICK_CHECKOUT_STRINGS.PAY_FOODHUB,
                amount: isValidElement(total) && isValidString(total.value) ? total.value : '0.00'
            }
        ]
    };
    // 1. Create a Judo session by providing an authorization object (basic or session)
    const auth: JudoAuthorization = { token: AppConfig.JudoKit.token, secret: AppConfig.JudoKit.secret };
    const judoPay = new Judo(auth);

    // 3. Create a Judo configuration to setup your payment flow
    const amount: JudoAmount = {
        value: isValidElement(total) ? total.value : '0.00',
        currency: 'GBP'
    };

    const reference: JudoReference = {
        consumerReference: consumerRef,
        paymentReference: paymentReference(),
        metadata: metaData
    };

    const configuration: JudoConfiguration = {
        judoId: AppConfig.JudoKit.judoId,
        amount: amount,
        reference: reference,
        applePayConfiguration: applePayOptions
    };

    try {
        let response = yield judoPay.invokeApplePay(JudoTransactionMode.ServerToServer, configuration);
        yield handleResponse(false, response, null, cartID);
    } catch (e) {
        yield handleResponse(true, null, e);
    }

I have used in a different app https://www.npmjs.com/package/judo-react-native and there was no such problems.

Similar Issue:
https://community.revolut.com/t/apple-pay-add-a-card-that-is-accepted-by-this-app/27433/48

Please provide a resolution as this is a blocker for my team.

@radhakrishnant2s I was wondering if this issue persists on the native iOS SDK as well or is it exclusive to the React Native build?

The RN library internally uses the JudoKit-iOS SDK only. Hence this would happen.

That would depend. If the issue is present on React Native (which uses an older version of iOS), but not on native iOS, it would mean that there's either an issue with the RN wrapper code, or it's an issue that was fixed in the newer versions of the native SDK.
Anyways, thanks for opening this. We'll get back with more updates as soon as we start working on it.

We released the 3.1.0 that hopefully will solve most RN problems. Regarding this issue, setting your merchantCapabilities to JudoMerchantCapability.ThreeDS might solve your problem.

@radhakrishnant2s can you please confirm if this issue persists or was it fixed with the solution above?

This is resolved now


Is thumbnail upload confirmation necessary? (User feedback)

Can the file just be automatically uploaded after selection, without the extra button click?

personally, cant see the point.  you would not go through the process of selecting a file if you didn't want to use it (and upload).  Just a spurious step in the upload process.    Maybe, also, can we DRAG AND DROP the file, instead of selecting the BROWSE button? (you can drag and drop the video file)

It may not be in the right aspect ratio and may look strange in the preview, and then you'd want to choose another/resize. That's probably the main reason.


Logging

printStackTrace() was replaced with logging

I believe it is better to use Slf4j (as proposed in https://github.com/growthbook/growthbook-sdk-java/pull/24) so that users can pick whatever logging backend they want (including java logging)

I can only support @igorlovich. The SDK is now highly coupled to the java based logging framework. That would mean that every consumer/user of the SDK has to provide additional configuration to change the message format or other properties, although they might have these configuration already in place - but for the logging framework that they have in use, like Log4j or Logback. Using SLF4J would avoid such cases.

So, we need to add SLF4J


[feature request] IMU Visualization using sensor_msgs.imu

Hey all - just submitting this for tracking purposes. Was playing with WebViz today and was looking at a new feature idea:
"See most legged robot and aerial robots have the long-range wifi data transmission and stuff to be able to use webviz as a platform for debugging, but both of these platforms rely heavily on IMUs and specifically the orientation of the IMU for control. I think a feature (maybe part of the 3D block) that takes in a standard ROS IMU message and just produces some rectangle or polygon that can help you visualize the IMU orientation would be really helpful to developers in aerial and legged robots!
Just something very simple, it takes in the standard IMU message from ROS, calculate the Euler angles, and outputs a figure that shows the block and the roll/pitch/yaw (see the gif below)."

Great idea! If anyone wants to take this on, this should be relatively straightforward to add by doing something similar to our support for the Pose message here: https://github.com/cruise-automation/webviz/blob/deae0a7bced6829c55682354c9f40fc2cb79da28/packages/webviz-core/src/panels/ThreeDimensionalViz/SceneBuilder/index.js#L457-L460

To whoever does end up working on this :) - I did look around at some things on visualizing came up with this:

So for this, I made a ROS node that takes in the IMU data and re-publishes another /tf between the base_link of the robot and the /imu_frame by passing the imu outputted quaternion to the tf itself.
Then I made a block using ros markers (a cube) that just followed the same imu_frame or used the same translation from the base_frame: https://www.adim.io/post/chip-updates-tf-s-and-music-notes-updates some details.
So this approach worked but a better thing to do might be the 3D viewer recognizes the imu message itself, and visualizes that without having to setup any transforms.

this is kinda weird because usually base_link would move with the IMU it wouldn't stay fixed...


The provided destination instance is not of the required type.

Hi,
I think there is a bug in when try to map a primitive value via global provider.
The MappingEngineImpl.validateDestination() method does not use Primitives.wrapperFor(destinationType) which produces always following errors:

The provided destination instance 9 is not of the required type int.
The provided destination instance false is not of the required type boolean.

This error also happens when the primitive source value is directly assigned to destination (destinationType is primitive)!
Can this issue be fixed immediately, please?

Hi @Kilrath,  Did you ever get a fix or workaround for this issue?  I'm hitting an identical error:
The provided destination instance true is not of the required type boolean

I believe this issue may be linked to issue #450.  Although the exception message (see above) indicates that the value being converted is true or false, it appears that the BooleanConverter is receiving the original Source Object in the context argument instead of the true/false value returned by the provider.
My provider:
Provider isOwnerProvider = req -> {
boolean isOwner = false;
  InstanceOwner ownerEntity = (InstanceOwner) req.getSource();

  if(ownerEntity != null && sessionState != null && sessionState.getAuthedUser() != null) {
    if(sessionState.getAuthedUser().getId().equals(ownerEntity.getUserId())) {
      isOwner = true;
    }
  }
  return isOwner;
};

The provider above expects an instance of InstanceOwner.class and returns a boolean.
I have confirmed that my Provider is correctly invoked and that it returns the expected boolean value.  However, after the provider returns its value, BooleanConverter is called and my debugger shows that the value of context.getSource() is:
"InstanceOwner(id=7c243875-7ada-42f5-8b3e-949aeab4a41e, fullName=Joel Toby .....)"
In other words, the original instance of InstanceOwner.  This matches the behaviour highlighted in #450 I think.
For now I'll have to abandon my Provider in favour of a much less elegant and hacky Converter, but I would be very grateful if you could suggest any workarounds please?

I have tested with versions 2.3.1 and 2.3.3 - results are the same.
Also tried disabling implicitMapping but this doesn't seem to help.

Hi,
unfortunately I did the same as you and use a converter if the provider fails due to this issue.
Sorry

Thanks for taking the time to reply @Kilrath .
In case others hit the same issue, here is my workaround (using a Converter instead of a Provider):
// Disable implicit mappings
ModelMapper modelMapper = new ModelMapper();
modelMapper.getConfiguration().setImplicitMappingEnabled(false);

// Create a converter to provide the value you need
  Converter<InstanceOwner, Boolean> instanceOwnerToIsOwnerConverter = ctx -> {
    boolean isOwner = false;

    if(ctx.getSource() != null) {
      InstanceOwner ownerEntity = (InstanceOwner) ctx.getSource();

      if(ownerEntity != null && sessionState != null && sessionState.getAuthedUser() != null) {
        if(sessionState.getAuthedUser().getId().equals(ownerEntity.getUserId())) {
          isOwner = true;
        }
      }
    }
    return isOwner;
  };

// Create a PropertyMap for the conversion which uses the Converter for one property
private PropertyMap<Item, ItemDTO> ItemToDtoMapping() {
    return new PropertyMap <Item, ItemDTO>() {
      protected void configure() {
        // The false value in `setOwner(false)` is not used
        using(instanceOwnerToIsOwnerConverter).map(source.getHumanOwner()).setOwner(false);
      }
    };
  }

// Finally, add the mapper and add implicitMappings back on
modelMapper.addMappings(ItemToDtoMapping()).implicitMappings();


Feature request

Do we have to write http:// or socks5 per ip address in the proxy list?
This feature needs to be removed

no need


login redirect broken for /:slug/expenses/new

Most likely broken for /:slug/expenses too.

This is related to the following issue, which is now closed:
https://github.com/OpenCollective/OpenCollective/issues/180
Should this be closed as well?

Need to test it - could still be an issue.


Add robust U-turn check

This addresses  #94 and adds the additional U-turn checks.
The tests still need to be updated but I wanted to get some feedback first whether the general approach here makes sense.
The additional U-turn checks need more information about the tree structure so I had to alter the BinaryTree type to keep track of more phase points.

Thanks for the PR.
If I understand correctly, the modified BinaryTree struct essentially keeps tracking of two binary trees, one is the left subtree and one is the right subtree, as well as their left- and right-most nodes.
In this case, maybe instead of modifying the struct, we should just keep tracking of two trees within the build_tree  and transition? For example, currently build_tree returns tree, sampler, termination and we could modify it to return tree_left, tree_right, sampler, termination. Similarly to how trees are passed around in transition.
I would prefer this version if it doesn't introduce other complexities because it keeps the BinaryTree struct concise.

Thanks for the feedback! I realised that one can directly pass the left and right subtree to isterminated which avoids a lot of the changes I introduced. Does this look better now?
The tests also still need to be adapted to account for the new U-turn criterion. Any idea how to best do this? I didn't know how to best adapt the current tests to the new criterion because as far as I can tell the trajectories in the tests don't really have subtrees, right?

Thanks for the feedback! I realised that one can directly pass the left and right subtree to isterminated which avoids a lot of the changes I introduced. Does this look better now?

Yes! I like the current version more.

The tests also still need to be adapted to account for the new U-turn criterion. Any idea how to best do this? I didn't know how to best adapt the current tests to the new criterion because as far as I can tell the trajectories in the tests don't really have subtrees, right?

What do you mean by "the trajectories in the tests don't really have subtrees"?

Also, as the new check is a more strict approximation but not always better, ideally we should support this via introducing StrictGeneralisedNoUTurn and leave the choice of switching between the new and old ones. What we can do here is follow whatever interface required for StrictGeneralisedNoUTurn (i.e. passing left and right sub-trees to isterminated ), then define the isterminated  for both StrictGeneralisedNoUTurn and GeneralisedNoUTurn, just like what it is currently done for ClassicNoUTurn.

Following https://github.com/TuringLang/AdvancedHMC.jl/pull/207#issuecomment-655436469, we can in fact keep the current isterminated and add two functions, one for the new check and one to wrap old ones. Something like below
function isterminated(h::Hamiltonian, t::BinaryTree{T}, args...) where {T<:Union{ClassicNoUTurn, GeneralisedNoUTurn}}
    return isterminated(h::Hamiltonian, t) # just call the existing functions
end

function isterminated(h::Hamiltonian, t::BinaryTree{T}, tleft, right) where {T<:StrictGeneralisedNoUTurn}
    # Codes for the new check go here
end

This makes it clear that ClassicNoUTurn and GeneralisedNoUTurn only use the combined tree.
Besides, it also makes the existing tests in https://github.com/TuringLang/AdvancedHMC.jl/blob/master/test/trajectory.jl not-broken. Ideally we should also add some test cases for the new check though.

I refactored the code as suggested and I also factored the new checks into their own functions for testing purposes. I added some unit test which make some sanity checks that the new checks properly detect U-turns.

Thanks for the comments! I simplified the function signatures as suggested.

I think that's all we need for the PR. I want to play with this branch locally to reproduce the first 2 plots of the report Michael made here (https://discourse.mc-stan.org/t/nuts-misses-u-turns-runs-in-circles-until-max-treedepth/9727/36) before merging it. If it looks similar I will go merge the PR.

IID Normal

Correlated Normal (rho = 0.25)

Seems to be consistent to the figures from Michael's report in the sense that the new check only affects the IID normal after dimension reaches around 150. I'm going to merge the PR as the effects seem to be consistent with other implementations.
As a record, this is my script for the experiments.


feat: get records from store

@mariusheine FYI: I had a quick look on a different approach for use-feathers that uses a single store per service to "cache" and get the data from. Basically useGet and useFind are just returning the elements matching the filter / id from the store directly while they are filling the store with new data from the server in the background.


A question about handling multiple initial conditions in a better way

Many times we have multiple initial conditions, but our test case remains the same. At the moment, using CppUTest we have to define multiple groups and then copy paste same test code for each test group. So, if we have e-g 4 different initial conditions [which will be written in setup functions], then 4 test groups, which means 4 identical test cases for each group, even though we have only one test case scenario which is being tested, but under 4 different initial conditions.
Or the other approach to solve this problem, is to use empty setup function in test group and then write 4 test cases with initial condition in the start of each test case and then same test code. In both cases, we end up with 4 test cases, when in fact there is only one test scenario being tested.
This means, lots of code redundancy, in this case e-g, instead of 1 test case code, we end up with 4 tests with different initial conditions, but with identical test code. Now, Imagine a practical scenario where we have 10 different initial conditions, but our test scenarios are 30. We have to write 300 test cases, but in fact there should be only 30 test cases to look at, not 300.
This makes it hard to debug and maintain test code in the long run. It would be awesome if we can write only the test scenarios being tested in test cases and move the initial setup code to test groups or e-g create a multigroup containing multiple setups and teardowns, so we can focus on actual tests instead of making a bloated version of test file which is hard to debug and maintain and more prone to errors.
Sorry for long post, but I just want to know if there is already an existing solution for this?
If not, then any idea of what is the best way to handle this?
I do have a solution for this in which user can create a multigroup and TEST(multigroupname, test_name) will run same test on each setup/teardown written in that multigroup definition and I want to make a PR for this, but before that just want to get an idea if my approach is good or is there any better way to do this. Thanks :)

I've used functions in the test file for this purpose, so commonize the actual test code into a function, and have different test groups with the respective different setup, but each test calls the common function logic.
I do like the idea of a multigroup though.

I'm not sure what the best way to resolve this case is.
The important key to remember is that you want to be able to specify the parameters for a set of tests and repeat those tests with different initial conditions, without having to duplicate the test code. I wonder if something like this is possible with something akin to mixins?
i.e. define a single base set of tests and groups, and then define a new group that extends it and sets up different conditions? I'm not quite sure how CppUTest figures out which tests to run for a group, but that would be the direction I would investigate myself.
The idea is you'd have something like the following:
TEST_GROUP(group) {
  // test parameters
  int a_parameter;

  TEST_SETUP() {
  }
}

TEST(group, a_test) {
  result = foo(a_parameter);
  CHECK_EQUALS(expected, result);
}

TEST_GROUP_CONFIGURE(configured, group) {
  TEST_SETUP() {
    a_parameter = my_value;

    group::setup();
  }
}

Or something along those lines?

I think we'd need some modifications to the way that CppUTest figures out what tests to execute because right now when you extend a test group, as far as I can tell, the tests for the base group don't get re-run in the extended group.


Support model values as object

As discussed here: https://github.com/formly-js/angular-formly-website/pull/85
If I use a model like this:
vm.model = {
  range: {low: 0, high: 10}
}

then the vm.options.resetModel() doesn't work. This is due to the object reference that is the same between the model and the saved version.
What do you think of using angular.copy during the initial value storage (only if the value is an object or an array) ?

anothe example with ui-select. If we add any value in multi-select field, resetModel() does not clear model value (can verify this on model value json displayed below). Clicking reset again will only make model value null.
http://jsbin.com/tesagi/2/edit?html,js,output

@ValentinH Hi, I just tested http://jsbin.com/zoyiletefa/1/edit?js,output and Reset works fine, can you still replicate it?
Regarding @sasikumardr I can confirm both malfunctions. I suspect his might be a bug related to resetModel() with Array's

Indeed, the example you mentionned works as expected but it required quite a lot of code to display a simple range slider.
The original example (where reset does not work) is the following: http://jsbin.com/vudameneko/1/edit?js,output .


README.md: Add "Related" stuff

Just add some links to some related tools that might be of interest to people interested in this project.

The only one of these that I've personally tried is aptly-web-ui.

Coverage decreased (-0.04%) to 98.837% when pulling a1d2345fe65e78d8345dd49d7a72a4d31cffda1c on msabramo:related into 153bb55620b4a890734cbeeef95986b3e42ce840 on sepulworld:master.


feat: add package.json engines bun version

I just merged dev branch, which already had the bun lock file. Happy to merge the "engines" change if you can update this PR. Thanks!

Done!

Thanks!


(UI): Darken outer borders of park

Matthew requested that we darken out the area on the map that is on the outside of the border.
Something like this:

@MildogMiller can we close this issue?


use a more specific/restrictive type for userId

I just encountered a bug when trying for the first time to use the OpenPassportQRcode components.
(Quickly solved thanks to direct support from @remicolin ).
This issue is just to capture/discuss a potential improvement on the typing of the userId component prop.
https://github.com/zk-passport/openpassport/blob/7aba22edf4ceaa6259aef4a0984dd54bb821fcb2/sdk/src/QRcode/OpenPassportQRcode.d.ts#L6
Remi explained me that it can't actually be any string. but only hexifiable strings, so that it can be used as a signal for the circuit.
It would be nice to have either a runtime check/validation or a better TS type to avoid that devs naively put any string.
Eg the type of UUID?
E.g I had used my username at first. It resulted in a error: reference Error: document is undefined

@sripwoud thanks for opening the issue.
UUID and hexifiable strings are indeed the only type supported for now (with hexifiable strings).
I just raised #187 that fix the issue, a new version of the sdk is already available, we still need to push a new version of the app to the store to parse the string userId in the inputs of the circuit correctly.
Please note that max length of the userId for type string is capped by the use of BN254, i wrote more details about it here


Speed up android initial assets copy

Androids AssetManager.list method is known to have performance issues, leading to ASSETS_FOLDER_IN_NOT_YET_INSTALLED error in this case.
Initial assets copy uses now java.util.jar.JarFile to enumerate and extract
assets, wich is much faster.

Nice! Thanks for that!

Can you share some time comparisons on before and after the changes?

Sure, and first, thanks for you plugin - it saved me a lot of work ;).
In our case (2k+ files in 500+ directories) initial copy took over 70 seconds in emulator and never came back on test devices. With those changes it takes under 5 seconds in emulator and few seconds on test devices.

Awesome, thanks!

Released in v1.5.0.


Add a dependency on AbstractFFTs

Fixes #2

Wooooooooo tests are passing now! Want to take another look, @stevengj?

Lgtm

The macOS errors don't seem related to the package, but they are strange. I wonder if there's something I need to do differently with the Travis setup for Homebrew to work?


Preserve data in JSON files

In this Project Milestone -:

We have created methods for saving data in files using DataStorage class.
We have created methods for converting data in convert_data.rb file.
We modified our functions for listing accordingly to display the data correctly.
We make sure our app is loading all the data from JSON files at the startup of the app.
We make sure that app is storing data on exit.
Me - @baqar-abbas and my coding partner Andera - @rivasbolinga have worked in collaboration to complete this project.

Thanks @Lizdev-05 :)


Add soft line breaks to MathML

This PR revises KaTeX MathML so that it renders with a soft line break after a top-level binary operator or relational operator. This aligns with KaTeX HTML and with p. 173 of The TeXbook. It also resolves #2169.
Unfortunately, the MathML linebreakstyle attribute is not supported by Firefox or by the upcoming Chromium MathML project. So in order to achieve soft line breaks, this PR acts in a way similar to KaTeX HTML. It breaks the top level expression into a series of <mrow> elements. Each element ends with a binary or relational operator and the visual result is soft line breaks after those operators.
This tactic has other consequences. The <semantics> element only recognizes one presentation child. Multiple top level <mrows> are not rendered if inside <semantics>. So this PR removes the <semantics> tag and its other child, the <annotation> element. I've taken the text content that was previously in the <annotation> element and put it into a data-tex attribute of the span element that wraps the <math>.
So the wrapper tag now looks something like: <katex-mathml data-tex="a = b + c">.
Before removing the <semantics> element, I tried to see if that one-child rule is enforced by user-agent CSS and could therefore be countermanded by KaTeX CSS. It turns out that Firefox once did implement this rule via CSS, but no more. It must now be written into the browser source code. It was after that attempt failed that I resorted to the data-tex tactic.
To see an example in action, use Firefox to view the MathML test page.

Codecov Report

Merging #2175 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2175      +/-   ##
==========================================
+ Coverage   94.73%   94.76%   +0.02%
==========================================
  Files          83       83
  Lines        5304     5325      +21
  Branches      927      936       +9
==========================================
+ Hits         5025     5046      +21
  Misses        256      256
  Partials       23       23

Flag
Coverage Δ

#screenshotter
89.28% <100%> (+0.04%)
:arrow_up:

#test
88.54% <90%> (+0.08%)
:arrow_up:

Impacted Files
Coverage Δ

src/buildMathML.js
99.18% <100%> (+0.13%)
:arrow_up:

src/functions/symbolsSpacing.js
91.3% <100%> (+1.83%)
:arrow_up:

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 4b90506...c574cef. Read the comment docs.

Note to reviewer: One line of code is written:
const isOpenDelimiter = node.attributes.stretchy &&
        // $FlowFixMe
        "([{⌈⌊⎰⌜⌞⟦⟨⟪⟬⟮⦃⦅".indexOf(node.children[0].text) > -1;

I could instead attach an attribute of direction="open" or direction="close" to the node while in symbols.js or delimsizing.js. The MathML spec does not include a direction attribute, but it would not cause an error. The browser just ignores it. If I had that attribute, I would not need to examine the text and I would not need $FlowFixMe.
Let me know if you prefer the attribute or the text.

Thanks for the PR.  Screen readers don't seem to handle <semantics> containing presentational MathML very well so it's probably okay to get rid of this.  I am curious whether screen readers will still read our MathML at all after this change.

Yeah, it would be nice if browsers supported the  MathML linebreakstyle attribute, but they don't. My hope is that the effect of this PR on screenreaders is nothing worse than a comma pause after an operator.
Think of John Wayne reading math.

Codecov Report

Merging #2175 into master will increase coverage by 6.04%.
The diff coverage is 86.25%.

@@            Coverage Diff             @@
##           master    #2175      +/-   ##
==========================================
+ Coverage   88.54%   94.59%   +6.04%
==========================================
  Files          84       83       -1
  Lines        5370     5345      -25
  Branches      942      941       -1
==========================================
+ Hits         4755     5056     +301
+ Misses        542      262     -280
+ Partials       73       27      -46

Flag
Coverage Δ

#screenshotter
89.10% <80.00%> (?)

#test
88.47% <81.25%> (-0.08%)
:arrow_down:

Impacted Files
Coverage Δ

src/mathMLTree.js
100.00% <ø> (+10.34%)
:arrow_up:

src/functions/kern.js
64.10% <54.16%> (-17.15%)
:arrow_down:

src/buildMathML.js
99.28% <100.00%> (+3.91%)
:arrow_up:

src/functions/delimsizing.js
96.90% <100.00%> (+31.28%)
:arrow_up:

src/functions/operatorname.js
96.42% <100.00%> (+2.19%)
:arrow_up:

src/functions/symbolsOp.js
100.00% <100.00%> (ø)

src/functions/symbolsSpacing.js
91.30% <100.00%> (+22.88%)
:arrow_up:

src/functions/def.js
96.29% <0.00%> (-0.53%)
:arrow_down:

src/Token.js
100.00% <0.00%> (ø)

src/buildTree.js
88.88% <0.00%> (ø)

... and 31 more

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 7523e97...d77a0ae. Read the comment docs.

Note to reviewer: While working on this PR, I discovered that KaTeX MathML emitted space characters without enclosing elements. That is, it emitted <mi>a</mi> <mi>b</mi> instead of <mi>a</mi><mspace> </mspace><mi>b</mi>. That isn't right and it prevented this PR from working. So I fixed it.
Then I had to change \operatorname to catch <mspace> and revert back to a character, in order to deal with operators such as \limsup.
So there is a little more code in this PR than one would expect.

@ronkok the switch of <annotation> to data-tex breaks contrib/copy-tex/katex2tex.js.  Was this switch necessary to add soft line breaks?  Using <annotation> seems like a more official way of embedding non-MathML data in MathML.  It would be nice if we could keep using it.

Was this switch necessary to add soft line breaks?

Yes, <annotation>'s parent element, <semantics>, takes exactly two children. Only the first child is rendered visually. So all the visual elements must be lumped together in that first element, and this prevents soft line breaks.
This entire PR is irrelevant when HTML is the visual output. Perhaps it would be best if I were to withdraw this PR.

KaTeX supports rendering just the MathML so maybe some people are using that for visual output.

Unfortunately, the MathML linebreakstyle attribute is not supported by Firefox or by the upcoming Chromium MathML project.

@ronkok do you know if there any plans to support it in the future or have they explicitly stated that they won't be adding this feature?

The current version of MathML Core will not support linebreakstyle.  Future versions may support it. But such support would make it necessary for the layout algorithm to make a second pass. Given browser vendors emphasis on speed, this may never happen.


Use the element's innerHeight/Width

Closes #49

@homu r+

:pushpin: Commit 46c10e2 has been approved by poteto

:zap: Test exempted - status


How to authorise the user access in web API layer using claims

I just downloaded this project and it works fine. Now I want to authenticate my web service calls with same approach. Suppose my application has 2 project – a web project and a web api and both are running on same domain like app.mydomain.com and service.mydomain.com
During login from my web app, I am able to set claims and putting condition based on that in my web app controller.
Now I want to do the same in web API and this web API can be called from Web project and/or JQuery also. (want to send the claim details in web API and check the role there). Please guide.

What you would do is somewhere in your web project create a URL which is protected by cookie auth, and when loaded validates the user identity and creates a JWT token out of it.
You'd then send that to your web app, and configure the JWT middleware to validate the signing key. Then you'd get the identity on the other side.
There are no samples for this unfortunately.

Thanks for your quick response. Did get similar links and demo apps but none of them are working. Will have a fresh look again.

We are closing this issue because no further action is planned for this issue. If you still have any issues or questions, please log a new issue with any additional details that you have.


Readme updates

Updated docs for payouts.
Also changed example for createReceipt to match with sdk interfaces

Updated to 3.1.1


Support for scaled down crop images

When working with very large images it's not uncommon to have a scaled down version of the image, generated on the fly and cached by a server, sent to the browser to keep payload sizes reasonable.
By adding originalWidth and originalHeight props we can let getPixelCrop() return crop pixel values for the original image instead of the naturalHeight/naturalWidth of the scaled down image sent to the browser.
If either the originalWidth or the originalHeight prop is missing we fall back to the current functionality (using naturalHeight/naturalWidth) to prevent weird results.

Thanks for this, however it's quite a specific use case and I want to try and keep the API surface areas as small as possible. In this case I think it's ok to perform a calc in the onChange/onComplete callback to enlarge the values to the original width. Sorry and thanks for taking the time to make a PR though!

OK, no problem!


:sparkles: Jira authentication for Jira Cloud and Jira Server/Datacenter combo

Identities has two new kinds:

basic-auth : username(email) and password(token) fields are used for Jira Cloud and Jira Server/Datacenter use cases
bearer: key field (containing bearer token) used only for Server/Datacenter

Closes https://github.com/konveyor/tackle2-ui/issues/1011


feat(merge-patch-optional-properties): add new spectral-style rule

PR summary
This commit introduces the new spectral-style
'merge-patch-optional-properties' rule which will verify that
the requestBody schemas for "merge-patch" type operations do not
contain any required properties and do not specify a non-zero
value for the "minProperties" field.
Signed-off-by: Phil Adams<EMAIL_ADDRESS>PR Checklist
General checklist
Please make sure that your PR fulfills the following requirements:

[x] The commit message follows the Angular Commit Message Guidelines.
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[ ] Dependencies have been updated as needed
[ ] .secrets.baseline updated as needed?

Checklist for adding a new validation rule:

[x] Added new validation rule definition (packages/ruleset/src/rules/*.js, index.js)
[x] If necessary, added new validation rule implementation (packages/ruleset/src/functions/*.js, updated index.js)
[x] Added new rule to default configuration (packages/ruleset/src/ibm-oas.js)
[x] Added tests for new rule (packages/ruleset/test/*.test.js)
[x] Added docs for new rule (docs/ibm-cloud-rules.md)

Checklist for removing an old validation rule:

[ ] Removed old rule implementation (packages/validator/src/plugins/validation/*.js)
[ ] Removed or adjusted testcases (packages/validator/test)
[ ] Updated default configuration to deprecate old rule (packages/validator/src/.defaultsForValidator.js)
[ ] Removed docs of old rule (docs/ibm-legacy-rules.md)

:tada: This PR is included in version 0.40.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 0.91.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:


Migrate WebAssembly App With Blazor Bootstrap from .Net 7 to .Net 8

Hi @gvreddy04 Do you have documentation on how to migrate my existing WebAssembly App With Blazor Bootstrap from .Net 7 to .Net 8? I want to utilize the new cool stuffs in Blazor .Net 8 specifically different types of Render Mode.

@joselitogatchalianalonzo I'll add the documentation.

Thanks @gvreddy04

Hi @gvreddy04 What I've seen in documentation is for Web Assembly Stand Alone for .Net 8. I'm more interested in migrating my existing app using the Standard Web App template for .Net 8 recommended by Microsoft where I can utilize various render modes. Like I want to put Sidebar menu in Server project and all my forms in Web Assembly client project. Can you give an example of this kind of setup?

@joselitogatchalianalonzo We are already working on various scenarios to support developers in their migration to .NET 8.

How to utilized this with .NET 8 Blazor

@skasad21 Please check the docs here: https://docs.blazorbootstrap.com/getting-started/blazor-webassembly-net-8

Thanks @gvreddy04. I'm looking forward to it.


Use face_recognition on raspberry, “segmentation fault” occurred

face_recognition version:0.2.0
Python version:3.5
Operating System:raspbian

#python facerec_on_raspberry_pi.py
segmentation fault

Do you found a solution for this?

Have you found the solution? I met the same problem

Unfortunately I never found a solution to this, besides using some faster hardware. I'd love to hear if others have figured this out, though!

I was experiencing the same problem, segmentation fault when calling the face_encodings on the raspberry pi 3. In my case, I compiled dlib with OpenBLAS for linear algebra optimizations which allows dlib functionality to execute faster. However, OpenBLAS itself is multi-threaded and if you try and use it in a muilt-threaded application it will peg the CPU and cause the seg fault. For use in multi-threaded applications, OpenBlas recommends you set it to single thread mode.
In my case, I set some environmental variables in my virtual environment to tell OpenBLAS to only use a single thread by doing the following:
$ workon myvenv
$ nano VIRTUAL_ENV/bin/postactivate
add the following lines and save:
export OPENBLAS_NUM_THREADS=1
export OPENBLAS_MAIN_FREE=1
By doing this, I was able to achieve ~15 fps of facial recognition in my application that was previously crashing on my pi.

export OPENBLAS_NUM_THREADS=1
export OPENBLAS_MAIN_FREE=1
This solved my issue too. The Pi is now using only one CPU core instead of 4 but does not crash when calling face_encodings!

I was experiencing the same problem, segmentation fault when calling the face_encodings on the raspberry pi 3. In my case, I compiled dlib with OpenBLAS for linear algebra optimizations which allows dlib functionality to execute faster. However, OpenBLAS itself is multi-threaded and if you try and use it in a muilt-threaded application it will peg the CPU and cause the seg fault. For use in multi-threaded applications, OpenBlas recommends you set it to single thread mode.
In my case, I set some environmental variables in my virtual environment to tell OpenBLAS to only use a single thread by doing the following:
$ workon myvenv
$ nano VIRTUAL_ENV/bin/postactivate
add the following lines and save:
export OPENBLAS_NUM_THREADS=1
export OPENBLAS_MAIN_FREE=1
By doing this, I was able to achieve ~15 fps of facial recognition in my application that was previously crashing on my pi.

This solved my issue too. The Pi is now using only one CPU core instead of 4 but does not crash when calling face_encodings!
Any idea how all 4 cores could be used to increase the FPS?


Create FUNDING.yml

Hi,
This small PR creates a FUNDING.yml in your repo. It will enable the sponsor button on this repo.
The information in FUNDING.yml will be taken (and updated if needed) by F-Droid Bot automatically each time you tag a new release in this repo, to display this information on the website in the donate section and in the app. It has the advantage to let you control your donation links and methods, and it removes work for the F-Droid team in the future 👍
If you're ok with this method, and if this funding.yml is correct, maybe you can duplicate it in your other repos?

Thank you @Poussinou for the suggestion!

Hum apparently I missed something. I thought the display of the "sponsor" button was automatic, but apparently you have to join GitHub Sponsors.
I tried, and it looks like it's a complicated process, and they ask for way to much private information...
Could we keep the file as it is now, it will still work with F-Droid normally...

OK, thank you. Let's see how this will develop...


player_club_ids are flipped in appearances file

Reported in Kaggle (issue #1)

The following image shows the players who scored/assisted in the match belong to the club_id 45057 but they belonged to club_id 2778

Game ID: https://www.transfermarkt.co.uk/spielbericht/index/spielbericht/2923792
Player IDs:
https://www.transfermarkt.co.uk/jakob-johansson/leistungsdatenverein/spieler/540941
https://www.transfermarkt.co.uk/jakob-johansson/leistungsdatenverein/spieler/432982
Club ID of the players during the time of the game: https://www.transfermarkt.co.uk/fc-nordsjaelland/startseite/verein/2778/saison_id/2017
Till now I have observed this, while calculating the goal contribution percentage, for the matches that had the home team losing and away team winning (either with or without clean sheet) but not sure if the same trend follows for the other games as well (where home team won and did not concede or where both teams scored/conceded goals).

While the player IDs are correct now in transfermarkt, when I look at raw scraped data (scraped a while ago, since this si 2017 season) I can see the IDs where indeed flipped at the source at that time.
gzcat data/raw/transfermarkt-scraper/2017/appearances.json.gz | jq 'select((.href == "/andreas-skov-olsen/leistungsdaten/spieler/432982/plus/0") and (.matchday == "Third Round"))'

It does seem to be a problem with the source at the time of scrapping, rather than with the scraping logic and preparation scripts.