Popover crashes Android app. context.onOpenChange is undefined

Current Behavior
The Popover component is breaking the app on Android, throwing the following error:

It works as expected on iOS.
Expected Behavior
The Android App should not crash, and the Popover should close.
Tamagui Version
1.89.20

Platform (Web, iOS, Android)
Android

Reproduction
here is the popover implementation:

import { forwardRef } from "react";
import { Adapt, Popover, withStaticProperties } from "tamagui";

import { TransparentNavButton } from "../../form/TransparentNavButton";
import { Sheet } from "../Sheet";

import type { BaseIconProps } from "../../../helpers-icon";
import type { Ref } from "react";
import type { NamedExoticComponent } from "react";
import type {
  PopoverProps,
  ButtonProps as TamaguiButtonProps,
  TamaguiElement,
} from "tamagui";

type ButtonProps = Omit<TamaguiButtonProps, "color" | "icon"> & {
  icon: NamedExoticComponent<BaseIconProps>;
  label: string;
  iconProps?: BaseIconProps;
  color?: string | undefined;
};

const Button = forwardRef(
  (
    {
      icon: IconComponent,
      label,
      iconProps,
      color = "$gray800",
      onPress,
      ...rest
    }: ButtonProps,
    ref: Ref<TamaguiElement> | undefined
  ) => {
    return (
      <Popover.Close asChild="except-style">
        <TransparentNavButton
          icon={<IconComponent size={24} color="$gray700" {...iconProps} />}
          textProps={{
            col: color,
            fow: "$semibold",
            size: "$2",
          }}
          space="$3"
          onPress={onPress}
          ref={ref}
          {...rest}
        >
          {label}
        </TransparentNavButton>
      </Popover.Close>
    );
  }
);

export type ActionsDropdownProps = PopoverProps & {
  trigger: NamedExoticComponent<BaseIconProps>;
  triggerProps?: BaseIconProps;
};

export const ActionsDropdown = withStaticProperties(
  ({
    trigger: TriggerComponent,
    triggerProps,
    open,
    onOpenChange,
    children,
    ...rest
  }: ActionsDropdownProps) => {
    const { disabled } = triggerProps || {};

    return (
      <Popover
        size="$5"
        allowFlip
        open={open}
        onOpenChange={onOpenChange}
        {...rest}
      >
        <Popover.Trigger disabled={disabled} asChild="except-style">
          <TransparentNavButton
            p={0}
            icon={
              <TriggerComponent
                size={16}
                color="$gray700"
                disabled={disabled}
                {...(disabled && { opacity: 0 })}
                {...triggerProps}
              />
            }
            disabled={disabled}
          />
        </Popover.Trigger>

        <Adapt when="sm" platform="native">
          <Sheet
            native
            modal
            dismissOnSnapToBottom
            animationConfig={{
              type: "spring",
              damping: 20,
              mass: 1.2,
              stiffness: 250,
            }}
          >
            <Sheet.Body>
              <Adapt.Contents />
            </Sheet.Body>
          </Sheet>
        </Adapt>

        <Popover.Content
          ai="center"
          jc="center"
          br="$2"
          p="$3"
          bg="$white"
          enterStyle={{ y: -10, opacity: 0 }}
          exitStyle={{ y: -10, opacity: 0 }}
          elevate
          animation={[
            "quick",
            {
              opacity: {
                overshootClamping: true,
              },
            },
          ]}
        >
          <Popover.Arrow bg="$white" />
          {children}
        </Popover.Content>
      </Popover>
    );
  },
  {
    Button,
  }
);

export type ActionsDropdownButtonProps = ButtonProps;

System Info
System:
    OS: macOS 14.3.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 881.81 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.asdf/installs/nodejs/18.18.2/bin/node
    Yarn: 1.22.21 - ~/.asdf/installs/nodejs/18.18.2/bin/yarn
    npm: 9.8.1 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 121.0.6167.184
    Safari: 17.3.1
  npmPackages:
    @babel/core: ^7.22.9 => 7.22.15
    @techfx/eslint-config-main: 0.0.0 => 0.0.0
    @techfx/prettier-config: 0.0.0 => 0.0.0
    syncpack: ^12.3.0 => 12.3.0
    turbo: ^1.12.3 => 1.12.3

i got same issue. any solution yet ?

I can check that if you can a reproduction

Facing the same issue with version 1.98.0

Same error on version 1.94.0!

Facing the same issue on version 1.101.7. Any solutions?

Same error on version 1.102.3

Same Error on version [1.104.2]

Facing the same issue on latest tamagui. All I had done was copy the example Popover component from website.

Hi @byteab,
I tried reproducing the issue in a fresh app which I initialized with expo cli and later added tamagui with help of this page. The application contains a tab layout, and in the home screen there's a ScrollView just like my app, and then I've simply copied the Demo from here.
Please have a look, and here's a video of the issue as well.
Link to code: https://github.com/brokenstack/tamagui-popover-reproducible
For installation and running, simply clone and install the deps then run pnpm run local for locally running on connected android device.
https://github.com/user-attachments/assets/5c51514d-37c6-48d8-a720-edc4681cbf31

Adding this, not sure if it will fix but maybe: a912b23bec9affe91d01d9a96592ba2821c9275d

@natew I tried that, still same issue

Same error with tamagui v1.108.2

I found a workaround by adding a state to control the opening and closing of the Popover, and replacing Popover.Close with a custom close button.
I have tested this solution on versions "tamagui": "^1.101.7" and "tamagui": "^1.109.1", but only on Android.
export function PopoverDemo() {
  const [open, setOpen] = useState(false); // Added state control
  const closePopover = () => setOpen(false); // Custom close function

  return (
    <Popover
      size="$5"
      allowFlip
      placement="bottom"
      open={open} // Bind state to Popover open prop
      onOpenChange={setOpen} // Update state on open/close change
    >
      <Popover.Trigger asChild>
        <Button>Open Popover</Button>
      </Popover.Trigger>

      <Popover.Adapt when="sm" platform="touch">
        <Popover.Sheet modal dismissOnSnapToBottom>
          <Popover.Sheet.Frame padding="$4">
            <Popover.Adapt.Contents />
          </Popover.Sheet.Frame>
          <Popover.Sheet.Overlay
            animation="lazy"
            enterStyle={{opacity: 0}}
            exitStyle={{opacity: 0}}
          />
        </Popover.Sheet>
      </Popover.Adapt>

      <Popover.Content
        borderWidth={1}
        borderColor="$borderColor"
        enterStyle={{y: -10, opacity: 0}}
        exitStyle={{y: -10, opacity: 0}}
        elevate
        animation={[
          'quick',
          {
            opacity: {
              overshootClamping: true,
            },
          },
        ]}
      >
        <Popover.Arrow borderWidth={1} borderColor="$borderColor" />

        <YStack p="$3" gap="$3">
          <Text>This is the popover content</Text>

          {/* Removed default close button */}
          {/* <Popover.Close asChild>
              <Button size="$3">Submit</Button>
            </Popover.Close> */}

          {/* Added custom close button */}
          <Button size="$3" onPress={closePopover}>
            Close
          </Button>
        </YStack>
      </Popover.Content>
    </Popover>
  );
}

Thanks @castrosuellenx , It's work


Backport "Fix duplicate word in comments" to LTS

Backports #20359 to the LTS branch.
PR submitted by the release tooling.
[skip ci]

No regressions detected in the community build up to lts-20279.
Reference


Responsive charts with aspect ratios

We are on the way of replacing Chartist with Apex and some charts have an aspect ratio specified (instead of height) to make the chart truly responsive.
Here's a list of supported ARs https://codepen.io/jesperkc/pen/EyWevN and it would be nice to have these in Apex too.

Interesting point!
I just checked out how chartist handles it, and it seems most of the settings are in CSS. The user can specify the class, and it will set the aspect-ratio/height accordingly.
I think, calculating in JS will allow me to get it done in less code, as so much CSS will increase the bundle size.
Very good suggestion though, I never realized why my charts were looking a bit odd in very small devices.

@junedchhipa This looks like an old issue, and I'm not sure whether your thinking on this has changed/progressed, but without looking deeply at the source code I think that if apex switched from using <svg width="x" height="y"> with <svg viewbox="0 0 x y"> it could go a long way to making the charts properly responsive.
I guess the big blocker for this might be if you're doing other position calculations in JS based on the overall width/height rather than the rendered width height of the actual svg elements.
Thoughts?

@junedchhipa This looks like an old issue, and I'm not sure whether your thinking on this has changed/progressed, but without looking deeply at the source code I think that if apex switched from using  with  it could go a long way to making the charts properly responsive.
I guess the big blocker for this might be if you're doing other position calculations in JS based on the overall width/height rather than the rendered width height of the actual svg elements.
Thoughts?


internal/asm/*: use correct test len

f64 contains larger benchmarks than f32 and other packages. Make the test data large enough to pass benchmarks.
Please take a look.

In L1NormInc:
func L1NormInc(x []float64, n, incX int) (sum float64) {

Does n refer to the number of elements that need to be updated? If it's the number of elements that needs to be updated then L1NormInc and naiveL1NormInc both look correct implementations.

Does n refer to the number of elements that need to be processed?

Indeed, you are correct. So the const should be the greatest product of the test and inc. So you are also correct with the const. Apologies for the confusion.


AD410 Human detection on/off switch

Thanks for you work on the integration so far.  It works flawlessly here.
If possible, it would be nice to have a switch in HA to turn human detection on and off.
I hope it wasn't asked before.

This should be doable! I'll post back once it is done.

OK this isn't as easy as I thought it would be because the AD410 human detection isn't enabled/disabled the same way as a Dahua camera (which I've already added support for). I'm still poking around to see what I can find, but at this point I don't think I can add the feature because I don't know the API to call to enable/disable SmartHumanDetection

Looks like it is controlled via the VideoAnalyseRule. I'll try poking around with this...
VideoAnalyseRule[0][0].Enable=false
VideoAnalyseRule[0][0].Enable=true

OK this works...
On
http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseRule[0][0].Enable=true

Off
http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseRule[0][0].Enable=true

And the status can be fetched with...
http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule[0][0].Enable

Got this working and released in https://github.com/rroller/dahua/releases/tag/0.9.33
It looks like this...

Thanks, just tested it and it works great!


reorganize internal libraries to avoid library leakage and linking with wrong archive

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "reorg" git@github.com:samoht/datakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~3
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "reorg" git@github.com:samoht/datakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@dbuenzli: metagen gives some false positive but it's already pretty useful. e.g.
$ metagen datakit-client
 archive(native) = "datakit-client.cmxa"
 plugin(byte) = "datakit-client.cma"
 plugin(native) = "datakit-client.cmxs"
-requires = "astring cstruct fmt logs lwt protocol-9p result"
+requires = "astring cstruct fmt io-page.io_page ipaddr logs lwt protocol-9p result sexplib"

$ metagen datakit-server
 archive(native) = "fs9p.cmxa"
 plugin(byte) = "fs9p.cma"
 plugin(native) = "fs9p.cmxs"
-requires = "astring cstruct datakit-server.vfs fmt logs protocol-9p result rresult sexplib"
+requires = "astring cstruct datakit-server.vfs fmt io-page.io_page ipaddr logs lwt protocol-9p result rresult sexplib"

$ metagen datakit-github
 archive(native) = "datakit-github.cmxa"
 plugin(byte) = "datakit-github.cma"
 plugin(native) = "datakit-github.cmxs"
-requires = "datakit-client datakit-server.vfs github"
+requires = "astring biniou cohttp cohttp.lwt conduit conduit.lwt-unix cstruct datakit-client datakit-server.vfs fieldslib fmt github-hooks github-hooks.github_hooks github-hooks.github_hooks_unix github-hooks.unix github.core github.unix ipaddr logs lwt lwt.unix result rresult sexplib uri"

There are clearly some missing deps in datakit-github I will fix that later on. For the other packages, it gives too many dependencies.

@dbuenzli: metagen gives some false positive

What do you mean by false positive ?

io-page.io_page is a bit weird (and doesn't exists). ipaddr and sexplib are not direct dependencies of datakit-github.

Last TravisCI error should hopefully be fixed by https://github.com/ocaml/opam-repository/pull/7579

All green, merging!


Quick fix for non-updating LaTeX view (#24)

Since this issue #24 is critical, I have found a way to update the view when a @State string is passed to LaTeX. This is basically what I did:

Made the latex property from LaTeX a @Binding
Removed the latex property from Renderer but made the latex string a parameter of the rendering methods
Modified Renderer.parsedBlocks so that it always parses new blocks when the LaTeX string is changed
Added another init for LaTeX so that one can pass a @State property without using $

This is a quick fix since this kinda breaks optimisation with cache and stuff. It certainly will not be an issue for small renders, but a real fix is needed.

I can confirm this fixes my view not changing. Thank you @grdleo


Cannot forward SNMP ports 161/162 to Docker container

Operating system
Ubuntu 22
Description
I've tried multiple settings and cannot get ports 161/162 forward to my Docker Windows container. I have verified that SNMP works with snmp walk locally in Windows.
Docker compose
-p "161:161/udp"
-p "162:162/udp"
Docker log
None
Screenshots (optional)
No response

is there any solution


Set up gitHub Pages

I need to setup gitHub Pages for the project.

Everything went successfully.

Adding pages to project about website description.
Done.


APA style, Article.number (.number(int)) added twice when no pages information

For APA style, when no spage/epage/pages information provided along with 'number' - article number - article number appear in citation twice:
coca cola, T. V. (2015). test journal article 20210131-1 (No. 555). Article 555. https://doi.org/10.777/data.006137****
Same citation when pages information exist:
coca cola, T. V. (2015). test journal article 20210131-1 (No. 555). 1–111. https://doi.org/10.777/data.006137
Regards

Can you please send me the citation data (in JSON) and/or maybe the code you're using to create the citation so I can reproduce the issue? Thanks.


python37Packages.pyppeteer: 0.2.2 -> 0.2.4

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python37Packages.pyppeteer is: "Headless chrome/chromium automation library (unofficial port of puppeteer)"
meta.homepage for python37Packages.pyppeteer is: "https://github.com/pyppeteer/pyppeteer"
meta.changelog for python37Packages.pyppeteer is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 0.2.4 with grep in /nix/store/r5vd13lhkjd0qcz7abn2vvp8qa7pf7fp-python3.7-pyppeteer-0.2.4

directory tree listing: https://gist.github.com/15fded9e08eae756a9e1f078b25867f9

du listing: https://gist.github.com/628fa5a38be508bb545326a47d0eb095

Rebuild report (if merged into master) (click to expand)

13 total rebuild path(s)

4 package rebuild(s)

3 x86_64-linux rebuild(s)
3 i686-linux rebuild(s)
4 x86_64-darwin rebuild(s)
3 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
python37Packages.pyppeteer
python38Packages.pyppeteer
python39Packages.pyppeteer
urlwatch

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/r5vd13lhkjd0qcz7abn2vvp8qa7pf7fp-python3.7-pyppeteer-0.2.4 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python37Packages.pyppeteer https://github.com/r-ryantm/nixpkgs/archive/a969e9e22272a6cd246c6c850ccde3f88c78549b.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/r5vd13lhkjd0qcz7abn2vvp8qa7pf7fp-python3.7-pyppeteer-0.2.4
ls -la /nix/store/r5vd13lhkjd0qcz7abn2vvp8qa7pf7fp-python3.7-pyppeteer-0.2.4/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

3 packages built:

python37Packages.pyppeteer
python38Packages.pyppeteer
urlwatch

Maintainer pings
cc @kmein for testing.

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 108556 run on x86_64-darwin 1

4 packages built:

python37Packages.pyppeteer
python38Packages.pyppeteer
python39Packages.pyppeteer
urlwatch

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:
urlwatch:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

Tell pytest(CheckHook) where to find the tests included in the package
Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 108556 run on x86_64-darwin 1

4 packages built:

python37Packages.pyppeteer
python38Packages.pyppeteer
python39Packages.pyppeteer
urlwatch

The following issues got detected with the above build packages.
Please fix at least the ones listed with your changed packages:
urlwatch:

Zero tests run by pytest got detected: 'Ran 0 tests in 0.000s'
You have the following options to fix this:

Tell pytest(CheckHook) where to find the tests included in the package
Check if the GitHub Repo contains tests but they are not shipped with Pypi. If so please switch to fetchFromGitHub.
If the Packages does not contain any tests add 'doCheck = false;'and apythonImportsCheck`.


How do I use this

Doc Improvement Request:
I am trying to follow your readme, I made a new app and installed your package.
I am not really sure how to use it to implement the typescript transformer you mention.
Did I miss an example somewhere?
What should I do to make my source code transformed.
https://github.com/paganaye/vite-plugin-one

@paganaye what are you trying to do exactly?


Make debugging undefined children easier

I find this error to be a very common case: Cannot read property 'data' of undefined which occurs when a child of a vnode is undefined during the patch process.
You can never use the stack trace to see where it is coming from in your original code where you construct the tree with h() functions. This is because the error arises during the patch process, and no part of the execution path refers to where the h() function was originally called. I find this hard to debug
To make the stack trace useful for this error, I added a check at the time the h() function is called that will throw a type error if any children are undefined. For sparse arrays, I don't have a good type check for those, so instead I filter them into non-sparse arrays.
Example instances that cause this untraceable error, which can be hard to see just by looking:
h('div', [,h('p', 'Hi'])
h('div', ['hello, ', state.greeting] // state.greeting happens to be undefined or null

Kinda sorta related:

https://github.com/snabbdom/snabbdom/issues/123
https://github.com/snabbdom/snabbdom/pull/163
-https://github.com/snabbdom/snabbdom/issues/162

Overall i like this idea 😄 I'm wondering how infeasible it would be to log the virtual DOM tree you're giving patch and see where the undefined value occurred? Would that still be too bad with regards to debugging?
It is interesting that #123 was a wish for null/undefined values to simply be ignored. But you're saying that for you null/undefined values sneak in by mistake so you'd like them to throw. Personally that resonates a lot better with me. I've never wanted to leave in undefined intentionally but I have done so accidentally.
I don't know where that leaves us with regards to #163 which is about ignoring null as the third argument to h.
I'm worried about the implementation. filter is called twice which copies the children array twice. That is not good for performance. Also having throw directly inside h prevents h from being optimized. That also is not so good for performance.

Yeah, I'm in favor of an early type error rather than ignoring/coercing, as I'd rather find errors than have "null" and "undefined" silently printed out in apps. I definitely agree about the performance concerns and  was thinking that perhaps a type check could instead go in the VNode() constructor -- I will play around with that approach instead.

Yeah, I'm in favor of an early type error rather than ignoring/coercing, as I'd rather find errors than have "null" and "undefined" silently printed out in apps.

What was requested previously is that null/undefined was simply ignored so that they neither caused errors nor showed up in the DOM. So that if users have a property that may be null they want to pass the null to Snabbdom and have it ignored. But as mentioned I prefer your proposal.
Let me know how it goes with VNode. I'm not sure what you'd do in the example you mentioned originally where the undefined is where a string should have been.

I'm not fond of the perf penalty at all :(
Some Arrays are quite big (even with virtualization, etc) and it would be a shame to pay the price for what is a development edge case.
Also, when using typescript, that kind of check is completely unnecessary. Sparse arrays? I never encountered one, ever. A sparse Array should be made non sparse before reaching a render routine I think instead of being repeatedly filtered.
Another option would be for snabbdom to accept null/undefined children . They would work like the empty string and be ignored. What do you think ?


Trailing comma in Some()

I'm parsing result from rustc -Z unpretty=ast, which yields a customized format of ron.
My plan is to use regex and ron to parse the result.
Currently Some(1,) doesn't work.
Expected closing `)`

Is it supposed to work?

@qiujiangkun Thank you for the bug report - this was indeed wrong and I've pushed a fix for it


Direct Access to SCO Audio Streams

Hello, I am struggling to find a solution to access the Raw Audio Packets either in some other codecs or PCM format with the help of 32feet .NET Library I am able to dial/receive the calls via my Android Phone. But needs a way to access the Audio Stream so I can directly play some recorded sound files back to the caller automatically on call answer. But Windows 10 Bluetooth Drivers handle the SCO Connection within the driver. It will be great if you can help in getting the access to the Audio Packets/Stream someway either by the Default Microsoft Bluetooth Driver or some other custom simple driver giving SCO Connection access to the User-Space Application.

The APIs you used in your program can be only used for the Call Control.

You can't do that with the default Microsoft driver. You need to install third-party drivers or write a custom profile driver (user-mode).
See also:
https://github.com/MicrosoftDocs/windows-driver-docs/blob/staging/windows-driver-docs-pr/bluetooth/bluetooth-driver-stack.md
https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/accepting-sco-connections-in-a-bluetooth-profile-driver

You can't do that with the default Microsoft driver. You need to install third-party drivers or write a custom profile driver (user-mode).
See also:
https://github.com/MicrosoftDocs/windows-driver-docs/blob/staging/windows-driver-docs-pr/bluetooth/bluetooth-driver-stack.md
https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/accepting-sco-connections-in-a-bluetooth-profile-driver

Thanks.


Add support for building for arm64, once OpenSSL does.

I've tested this out with an OpenSSL build that has support for darwin64-arm64, and was able to build a universal OpenSSL build for both x86_64 and arm64. (See https://github.com/openssl/openssl/pull/12369)
Without an updated version of OpenSSL, this fails because the macos-arm64 target ends up re-compiling for x86_64 instead, and then lipo fails to merge the two together because they both have the same architecture. It seems like it would make sense to remove macos-arm64 from the default targets if the underlying OpenSSL doesn't support it, but I'm not sure if there's a feasible way to do that.

Here is a build configuration for arm64 macOS, tested on Xcode 12 beta 4 running on an Apple Silicon mac available at the time.

PR #6 adds Apple Silicon support for macOS, Catalyst, and Simulator.

This is now supported in the upstream repo by calling ./create-openssl-framework.sh xcstatic


View loses consistent state when using deferred

Here is example:
http://jsbin.com/wogifajiqe/1/
If you quickly click a then b checkboxes then a will stay checked while underlying value will be false.

Deferred is a red herring: commenting out the promise creation and
resolution still results in the same issue.

In a nutshell, what's happening is that clicking b resets the value of a before a redraw happens.
Interacting with the DOM element itself affects its state independently of Mithril because that's just how checkboxes work, but since the model value gets reset before the redraw, the diff engine thinks it hasn't changed and doesn't update the DOM element with the correct value.
Checking the DOM to be sure that the checkbox value is correct would beat the point of using a virtual dom algorithm because the engine would have to check every single attribute to ensure synchronization.
The solution is to force a redraw after setting the value of a to true (either by calling m.redraw or using the background option in the case of a request)


Digital Terminal voiding issue

When multiple stacks of the same item and the same amount are present in the system, attempting to take one out will remove all of those stacks, but only put one in the output slot, voiding the rest.

Fixed.


Add support for custom encoders

Current version creates a label encoder by default for each string column queried. This PR extends this capability to provide custom encoders for columns including non-string types.

@ridvan-eksi Thanks for the contribution!  Can you tell us a little more about how you're using the custom encoders for non-string columns? In case these non-numeric encoders might be useful to others, by default.

@atolopko-czi Main use case for users providing encoders would be to use fix mappings across different datapipe instances. In the current version, a new encoder is generated if the data release or query changes, but we would like to use consistent mappings even if the data or query expands.
A second use would be using encoders other than one hot encoding for string columns, like ordinal encoder. Ordinal encoding is required for using learnable embeddings.
A third, and maybe a more hacky use case for these custom encoders would be allowing more complex functions rather than encoders to process non-string/string columns. This would be similar to transform concept in torchvision datasets and datapipes. For example, we might have a function to parse/extract some information from development_stage column. We can do that by providing the parse function as a custom encoder.
I hope it's clear. As far as I can see, these encoder class should have a transform and inverse_transform methods which should be implemented in all custom encoders. (even though in some cases inverse_transform may not be possible)

Reviving PR; we still intend to review and incorporate this change.

Thanks for PR @ridvan-eksi. All of those use cases are valuable. We'd like to incorporate the changes, and it looks like some error checking may be needed and along some unit tests.
For the unit test, we'd welcome any suggestions you may have, otherwise we'll discuss this internally.

@ridvan-eksi, if you're still interested in seeing this merged, would you mind merging main into this branch? Then we'll be able to see all the CI checks run.
It'd also be good to see a test for this, since at the moment it looks to me like any custom encoders passed in here would be overwritten during initialization.

Hi @ivirshup. I will merge main into this branch, and I will add a test.
If I am not mistaken: If user provides a custom encoder for a specific column, that encoder is used for that column. For the remaining columns, the default encoder is used.


DB: Remove Deprecated MySQL Support

:heart: Thank you for your contribution!
Description

Remove deprcated MySql support

Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

[ ] I'm aware of the code of conduct.
[ ] I've created logical separate commits and followed the commit message format.
[ ] I've added relevant test cases.
[ ] I've added relevant documentation.
[ ] I've marked translation strings.
[ ] I've identified the copyright holder(s) and updated copyright headers for touched files (>15 lines contributions).
[ ] I've NOT included third-party code (copy/pasted source code or new dependencies).

If you have added third-party code (copy/pasted or new dependencies), please reach out to an architect.

Frontend

[ ] I've followed the CSS/JS and React guidelines.
[ ] I've followed the web accessibility guidelines.
[ ] I've followed the user interface guidelines.

Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

You license your contribution under the same terms as the current repository’s license.
You agree that you have the right to license your contribution under the current repository’s license.

could you bring it up for the discussion with the whole community during the telecon?
we reviewed it and decided we need community's feedback to officially drop the support for mysql


Question about how CFG is being applied.

The cfg_scale is being passed into the DiffusionTransformer class and used directly on the output of the DiT.
But the DiT is being trained to output v, not the noise. So we're taking a weighted combination of the conditional and unconditional v.
The model still generates reasonable outputs, but is this how its supposed to be?
As far as I know CFG is defined in terms of the score function which is a scaled version of the noise

I got your point.
I hadn't thought deeply about the implementation of CFG in V-diffusion, but I think it can be interpreted as follows. Please note that I'm not very familier with the math theory, so I apologize if there're any theoretical errors.
From the V-diffusion paper[1], prediction of v corresponds to simultaneous prediction of $\mathbf{\epsilon}$ and $\mathbf{x}$.
\mathbf{v} = \alpha \mathbf{\epsilon} - \sigma \mathbf{x}

In this context, just like the usual noise objective, considering $\mathbf{\epsilon}$ and $\mathbf{x}$ as score functions, we can apply CFG to each as follows.
\mathbf{v}_{cfg} =  \alpha( (1+\omega)\mathbf{\epsilon} - \omega\mathbf{\epsilon}_u ) - \sigma ((1+\omega)\mathbf{x} - \omega\mathbf{x}_u)

($\mathbf{\epsilon}_u$ and $\mathbf{x}_u$ are unconditional outputs)
Here, we can further transform the above expression as follows.
\begin{eqnarray}
\mathbf{v}_{cfg} &=& (1 + \omega)( \alpha \mathbf{\epsilon} - \sigma \mathbf{x}) - \omega ( \alpha \mathbf{\epsilon}_u - \sigma \mathbf{x}_u) \
&=& (1+\omega) \mathbf{v} - \omega \mathbf{v}_u
\end{eqnarray}

Therefore, this ultimately means that the usual implementation of CFG can also be applied in V-diffusion.
[1] https://arxiv.org/abs/2202.00512

hello, thanks for the reply. I was playing around with this model some more and I did some derivations as well.
I tried implementing the CFG how its usually done and the generations were slightly different, but not significantly so.
If there were to be any differences I suspect it would be a result of scaling the x0 embedded within the v:
# use phi for the noise level
cos := cos(phi) = alpha
sin := sin(phi) = sigma
# name the noisy latent z
z := cos*signal + sin*noise

# definition of v
v := cos*noise - sin*signal

################################
# _u indicates unconditional _c indicates conditional
################################
# Start
v_cfg = v_u + w*(v_c - v_u)
# Definition of v
v_cfg = (cos*noise_u - sin*signal_u) + w*((cos*noise_c - sin*signal_c) - (cos*noise_u - sin*signal_u))
# distribute w twice and make it a flat sum of terms
v_cfg = cos*noise_u - sin*signal_u + w*cos*noise_c - w*sin*signal_c - w*cos*noise_u + w*sin*signal_u
# group noise terms together and group signal terms together
v_cfg = (cos*noise_u + w*cos*noise_c - w*cos*noise_u) + (-sin*signal_u - w*sin*signal_c + w*sin*signal_u)
# factor out cos and -sin
v_cfg = cos*(noise_u + w*noise_c - w*noise_u) + -sin*(signal_u + w*signal_c - w*signal_u)
# factor out the w
v_cfg = cos*(noise_u + w*(noise_c - noise_u)) + -sin*(signal_u + w*(signal_c - signal_u))
################################
# signal_u + w*(signal_c - signal_u) might introduce differences.
# it depends on what the sampler does with the output it receives from the model
# because the noise_u + w*(noise_c - noise_u) part is what we usually use in CFG

I don't think this is really a problem with your repo, it's just something interesting I found while reading it.
I might read more and see if I can derive that everything works out as usual in the end. I need to convert the vpred formulation into the karras formulation used inside k-diffusion.
Thanks for your time. Have a nice day. :^)


DOC: remove reference to deleted code

Seems the fly_during() plan was dropped sometime in late March-early April of 2016.  It had moved from plans.py to plan_tools.py but was finally deleted.  I just spent time looking for it.  Time to get rid of this reference (or identify its new location).

Description

Motivation and Context

How Has This Been Tested?

Sorry @prjemian. This should list both bluesky.preprocessors.fly_during_wrapper and bluesky.preprocessors.fly_during_decorator.

@danielballan Thanks for finding the code.

Thanks @prjemian !


Operations Paging issues

[x] Page size is small (20). Would be nice to have more (200)
[ ] Current page (or time range) not mentioned anywhere in the page
[x] Current page is not reflected in the URL
[x] Prev should be disabled when on the first page (unclear what that does)
[x] Next usually goes on the right, Prev on the left

Fixed in v0.9.23

Page size is small (20). Would be nice to have more (200)

Increased to 100 records per page. Too huge pages have poor UX and memory/CPU overhead.

Current page (or time range) not mentioned anywhere in the page

We are using the cursor-based navigation, just like in Horizon API. Simple calculation of total records  number may take more than 30 seconds for assets with millions of operations, so "page N of T" style is a no go. Moreover, the data by nature is extremely volatile and page numbers will be irrelevant almost immediately after they arrive to the client.
Operation timestamps are displayed in the operations table itself.


Question: Way to determine complete test coverage?

I've been using tap --100, and it's a game changer! I love the fact I can lift side-effects out of the code I choose to test, and get guidance so I can know I've tested it completely, yet tap doesn't bother me about the stuff I don't want to unit test 💯.
However, I worry that I may have missed some files accidentally that I would like to cover, but just don't realise it. Is there a way to look at the full test coverage regardless of the coverage-map?
I thought I might be able to force tap to do this for me by setting a custom coverage-map that says that all test files cover all source code, like so:
const glob = require('glob')

const allSourceFiles = glob
  .sync('src/**/*.ts*')
  .filter((f) => !f.match(/\.(test|spec).tsx?$/))
  .filter((f) => !f.match('/generated/'))

module.exports = () => allSourceFiles

but it didn't seem to work for me. Any guidance here please?

There's two ways to do this.
If you have a coverage map that maps every test to every file, then that's not particularly useful. (It's the same as not having a coverage map!)
But you can have a single test suite that had this mapping, and all it does is require() every file. We've done this with npm to track our progress towards 100% test coverage in npm v7.
Here's the coverage map file: https://github.com/npm/cli/blob/latest/test/coverage-map.js
And here's the "load all" test: https://github.com/npm/cli/blob/latest/test/lib/load-all.js
Then in "normal" tests in ci and dev, we aren't failing for missing coverage (but we are failing if coverage slips below 100% for any unit we've written new tests for), and we use npm run check-coverage to track our progress towards covering every unit.
This is of course rather elaborate and makes sense for a project of npm's scope and complexity. A much simpler approach is to set --nyc-arg=--all, if your project follows some basic conventions, but may not work for unusual cases.

Thank you so much for taking the time to respond, but also for sharing such an excellent piece of software ❤.


Improve functionality of legend in visualisations

Feedback from YFF: When you click on the line in the legend, it does random things (or nothing) rather than toggling the line on and off
Talk with @ODILMichelle or @taz-chiles to understand problem more as they have replicated this.

@taz-chiles and I have had a chat about the UX side of this.

Do you want me to take a look at this? (Wondering as it's 'in review')

@ODILMichelle Taz and I have reviewed the new behaviour and are happy with it so you may want to take a look now and see if you are happy with it too.

Hello! Thanks ever so much for this.
I reckon we can consider this done, but I have opened two new tickets.
#203 - small niggle, hopefully easy to pick up & resolve!
#204 - which is one to discuss whether it is useful or not :)


ARTEMIS-2604 Optimizations on journal loading

I've opened this for discussion, so PLEASE DON'T MERGE IT YET.
I've yet to implement the same optimization for other properties (ie getDuplicateProperty and getLastValueProperty) and for the AMQPMessage, while providing adeguate test coverage.
I will need some help from @gemmellr and @tabish121 , because I see that implementing an AMQPMessage::searchProperty(SimpleString key) that won't force encoding (if not already happened) of the whole message isn't trivial due to my ignorance of the protocol and probably the wrong approach to the problem.

@michaelandrepearce @wy96f I finally got some numbers about the the loading of journal:
this commit:
start: 19:28:08,193
end: 19:28:28,391
~20 seconds
2.11:
start: 12:12:22,651
end: 12:13:15,625
~ 52 seconds
Is about twice as faster assuming a very fast disk :)

I'm merging this


Use the proper GPG key

Once the GPG signing is in place we need to use the GPG key that is currently being used to sign the packages.

Added GPG key.


Bug. Boxplot of different color is not possible

One-line summary [问题简述]
Hello,
I'm trying to set the label color for a Graphic but boxplot graphs is not generating when I try to add a custom series where the data entries are obj. Аlthough the documentation says it is possible.  https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data
For example, I may want the label color to be for Boxplot-1 red for Boxplot -2 green and for Boxplot -3 blue
Thanks in advance.
Version & Environment [版本及环境]

ECharts version [ECharts 版本]: 3.7.1
Browser version [浏览器类型和版本]: Chrome
OS Version [操作系统类型和版本]: Ubuntu 16.04

Expected behaviour [期望结果]
Boxplot-1 with a red color   Boxplot-2  with a green  color and  Boxplot-3 with a blue color
ECharts option [ECharts配置项]

option = {
	yAxis: {
    	        type: 'category',
    	        data: ['Boxplot-1',  'Boxplot-2',  'Boxplot-3']
	},
	xAxis: {
    	        type: 'value'
	},
	series: [
    	{
        	name: 'boxplot',
        	type: 'boxplot',
        	data: [
            	         [713.75, 807.5, 810, 870, 963.75],
            	         [713.75, 807.5, 810, 870, 963.75],
            	        {
                	        value: [713.75, 807.5, 810, 870, 963.75],
                	        itemStyle: {
                    		      color: ' #0d0ded ',
                    		      borderColor: '#000000'
                		}
            	         },
        	],
    	},
    	{
        	name: 'outlier',
        	type: 'scatter',
        	data: [ [650, 'Boxplot-1'], [500, 'Boxplot-2'], [620, 'Boxplot-3'] ]
    	}
	]
}

It is a bug fixed on 3.7.2, which has been released yesterday.

thanks


Missing information

Was sent to this page for information about access requirements to "Manage Portal Authentication Key" (from this source: https://docs.microsoft.com/en-us/powerapps/maker/portals/admin/manage-auth-key) - but this document does not clearly list which task that is.  Is it "reset portal" or "download private key"?

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

ID: ff0331e6-6c2b-4728-4c3b-3e141c285dc7
Version Independent ID: 936bdd2f-3b1e-45d9-ed1a-c2c13e45ba46
Content: Details about different security roles required to administer Power Apps portals with specific actions. - Power Apps
Content Source: powerapps-docs/maker/portals/admin/portal-admin-roles.md
Service: powerapps
GitHub Login: @neerajnandwana-msft
Microsoft Alias: nenandw

Thank you for reaching out. Documentation has been updated. Changes will be visible soon.


It's possible to replace the mongoClient to mongoose?

I have trouble with connect between collection in mongoclient and i want to use the mongoose populate function. can i replace the mongoclisnt with mongoose?

The short answer is yes, if you were to edit passport-strategies.js and auth.js, but it's not as obvious or easy as it could be.
I intend to make it easier by refactoring passport-strategies.js and auth.js to take addUser and updateUser methods as arguments and then provide examples of how it could be used with any database.
I'll leave this issue open until that's resolved (or a new issue to resolve it is created).


Flask to klein strikes back

Proposed changes:

[X] Replacing flask by Klein for handling asynchronous request
[ ] Rasa logic should work with agents (endpoints) instead of models.

Status:

[X] ready for code review
[X] there are tests for the functionality
[ ] documentation updated
[ ] changelog updated

Issues introduced by this change:

~~https://github.com/joblib/joblib/issues/180~~

So this is just a working draft currently only handling asynchronous training request. As mentioned it introduced an issue related to sklearn and joblibs but that may be circumvented. The idea behind this is to enhance how RASA handles multiple apps to be on par with services like api.ai.
Indeed when you have a client sending a training request like this <IP_ADDRESS>:5000/train?name=agent_A you expect your agent (endpoint) to still be available for parsing requests and updated with the newly trained model once available (updating the server config server_model_dirs with a callback using DeferredLock to prevent unsafe concurrent access). So models would be a way to version your agent:

agent_A

model_YYYYMMDD-HHMMSS (model actually in use)
model_YYYYMMDD-HHMMSS
model_YYYYMMDD-HHMMSS
...

agent_B

model_YYYYMMDD-HHMMSS
...

This may collide with online training if you ever plan to implement it but I don't really think online training would give any greater benefits (at least in a backend context). What do you think?

Really cool, great job! Had a quick look at the code and it already looks pretty good. Couple of general questions

Concerning the joblib bug you mentioned, I only had a quick look and the bug itself is closed and from skimming the comments it seems it is somewhat more of a feature than a bug (?). How is this issue impacting Rasa?
I like the idea of having models with different versions and supporting a hot swap of the models. I can't see a reason why online training wouldn't be possible (although we don't support it just now, I still want to keep it in mind), can you explain that a bit?

sklearn is relying on jobllib. I fear that we may loose parallelism of the training process for everything components related to sklearn. The reason behind that wasn't extremely clear for me (I mean a thread should be able to spawn any number of workers threads, but it appears that it is not possible) but the warning Multiprocessing backed parallel loops cannot be nested below threads, setting n_jobs=1 appears during training (when using sklearn).
You are right I was just confused about online training: for whatever reason I thought it was kind of a continuous training whereas it is more of an incremental process.

Would you be interested by such changes or would it be too disruptive?

To be honest, the only thing that is stopping me from being enthusiastic about this is the lost parallelism of the sklearn training. Otherwise, I really like the advantages it provides.

Me too. I am looking for a solution for this specific issue.

I eventually managed to get a basic functional version solving the lost parallelism of the sklearn training by using a process pool in the data router (a bit like the actual code) instead of a thread pool at the server level. The only issue with that code is that call arguments and returned values must be pickable as they are put on Queues. It appears that most components instances are not pickable as they may contain function pointers like the MitieNLP object which is a Python interface over the C++ MITIE backend.
And functions pointers mustn't be shared between processes which means that each process will have to build its own copy of the pipeline during training.

Logging concurrent accesses need to be taken care of.

@PHLF, love the work your doing here!  I'm a big fan of twisted (and Klein by extension)
I don't know if I'll be able to help but I've been skimming the code to see if I can get my head around your current issues.
(If you already know) could you point at the rasa/library bits that aren't picklable? (I.E. the stuff thats returning function pointers) - I'm not immediately seeing it in my skimming.

I adapted the do_train function called in the datarouter consequently not to return the unpickable objects. Il not a huge fan if Twisted by the way as it is quite old tech by now but it does the job and I can't see a better python2 compatible solution.

@tmbo I think I can't really fix the details and get further (getting into the agent as endpoints) until your review. As I told you earlier, I think this solution is the best we can get to make the existing RASA serveer async.

awesome, going to have a look at it tomorrow :+1:

I am afraid I'll have pushed some more work by tomorrow :)

No worries :D

Agents now replace endpoints instead of models. See the corresponding commit message for details.
I may put this commit on a different PR.

What's driving the move to agent as opposed to model?

From my point of view, it's the most natural way to express your services. You don't serve models to your end users but a restaurant search for the English language or a weather info service for the German language, etc... not a model_XXXX. That's why, as you know, RASA allows one to define multiple endpoints through the server_model_dirs parameter. What I propose simply extends this by having the RASA data structure better reflect your services.

I get what you're going for, I don't necessarily like agent, because it makes me think dialogue agent/conversation agent, which without the dialogue piece you really don't have.

Seeing these tests pass makes me as happy as seeing Santa Claus himself.

Closing as this is separated in two different PRs now.


[META] Update CODEOWNERS

Tickets addressed: N/A
Review: By commit
Merge strategy: Merge (no squash)

Description

Switches the CODEOWNERS to @NASA-AMMOS/aerie-backend, so we can leverage the built-in github code review goodies. The backend team is currently set up to automatically request 2 members as reviewers with a load balancing algorithm. It is recommended to manually request one or two contributors you think would be a good fit to review your PR.
Verification

Documentation

Future work

As you can see above, by requesting review from the aerie-backend team, Github automagically requested review from pcrosemurgy and Mythicaeda. Of course, anyone from the aerie-backend team is still able to approve this PR, which would count towards the CODEOWNER required approvals


Incompatible with base-index 1

First of all: Epic Tool you made here and I hope you haven't abandoned it ;).
The only problem that I encountered is that setting
set -g base-index 1
set -g pane-base-index 1

(which is handier to type than 0)
shows me only one of two windows that normally come up with tcon start .... Are you aware of this or think it could be fixable?

Hi Bijan,
glad you like it.
I'm not actively using it as I don't need to often manage manually many
servers at once anymore. But it's not abandoned. :)
I'm currently crazily busy, particularly till mid November. So not sure
when I'll have time to play with it more. If you submit a pull request,
I'll be happy to merge it in the mean time. If you don't do that, I'll
still eventually come back to it, but it will probably take some time.
Hoping for a pull request. :)
Best
--
Ivan Kusalic
www.ikusalic.com
@ikusalic
On Tue, Oct 20, 2015, at 17:59, Bijan Chokoufe Nejad wrote:

First of all: Epic Tool you made here and I hope you haven't abandoned it ;).

The only problem that I encountered is that setting

set -g base-index 1
set -g pane-base-index 1
(which is handier to type than 0)

shows me only one of two windows that normally come up with tcon start .... Are you aware of this or think it could be fixable?

—
Reply to this email directly or view it on GitHub[1].

Links:

https://github.com/ikusalic/tmux-connector/issues/1

Hi Ivan,
I'm not only using it for managing but also for monitoring. When you are running a calculation on 25 nodes of a cluster, it's nice to have an overview, see below:

No pressure when you are busy. It's a minor inconvenience. I try to look into it at the weekend but I have zero experience with ruby, so no promises ^^.
Best,
Bijan


Menu Bar autohiding

[x] I made sure this command is not in the commands list
[x] I searched and didn't find this command in the listed issues
[x] I know this defaults command exists
[x] I know this command works on macOS current version
[ ] I know this command is deprecated on macOS current version

Folder:

Menu Bar

Command:

AppleMenuBarVisibleInFullscreen = 1;
"_HIHideMenuBar" = 1;
defaults write NSGlobalDomain _HIHideMenuBar -bool true
defaults write NSGlobalDomain AppleMenuBarVisibleInFullscreen -bool true

Argument type (if applicable):

bool

Examples:

You can find the way to set this in System Prefs, Dock & Menu Bar (I'm beta testing Ventura so System Settings is kinda different but it existed in prior versions of Mac OS X, now it's Desktop & Dock)

I'm unsure how to apply it tho... sudo killall -KILL SystemUIServer might kinda work?

Thanks for sharing this - I too am unsure how to apply this programmatically, but the setting took affect after logging out and back in.

Isn't the menu bar tied to the Dock? For that it'd be:
killall Dock

Has anyone found a good way to apply these commands?  I found that sudo killall -KILL WindowServer technically works, but that just triggers a logout.  It would be cool to find a way to refresh this without a logout.


Corrective action url fix

Description

Checklist:

[ ] Have you documented your changes in the pull request description?
[ ] Does the change present any security considerations?
[ ] Is any gem functionality overloaded? Eg: Devise controller methods being overloaded.
[ ] Has acceptance criteria been tested by a peer?
[ ] Has the CHANGELOG been updated? (If change is worth telling users about.)

General testing (author)

[ ] Test without JavaScript
[ ] Test on small screen

Accessibility testing (author)

[ ] Works keyboard only
[ ] Tested with one screen reader
[ ] Zoom page to 400% - content still visible
[ ] Disable CSS - does content make sense and appear in a logical order?

Codecov Report

Merging #1549 (fe589b4) into master (138b09e) will decrease coverage by 72.15%.
The diff coverage is 6.66%.

@@             Coverage Diff             @@
##           master    #1549       +/-   ##
===========================================
- Coverage   86.87%   14.72%   -72.16%
===========================================
  Files         388      388
  Lines        8330    10974     +2644
  Branches     1210      545      -665
===========================================
- Hits         7237     1616     -5621
- Misses        900     9304     +8404
+ Partials      193       54      -139

Impacted Files
Coverage Δ

...dit_activity/corrective_action/update_decorator.rb
0.00% <0.00%> (-97.83%)
:arrow_down:

...elpers/investigations/corrective_actions_helper.rb
30.76% <14.28%> (-64.24%)
:arrow_down:

app/models/role.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

app/models/contact.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

app/models/accident.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

app/models/incident.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

app/forms/alert_form.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

app/forms/comment_form.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

app/forms/sign_in_form.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

app/jobs/send_alert_job.rb
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 315 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 138b09e...fe589b4. Read the comment docs.


Differentiate between top and bottom

/format

\format

(I needed to close and re-open because of a CI bug.)


fix(parser): allow hyphen in attribute keys

Same as #14  but for -

@dmlittle could you cut a release with this change?

@gordonbondon the v0.1.2 release is now available!

@dmlittle hey, just noticed that scenery is for some reason released as chamber

@gordonbondon I was trying a new release script I wrote based of chamber and it looks like I forgot to rename the output binary name (the actual binary was still scenery). Regardless, that is now fixed. Thanks for reporting it!


Inputs don't look like inputs

There's no way for a user to know without clicking that this is an input field.

How about a label to the side of it?
Placeholder:

With Value:

+1 to you. Didn't even think about that.

That looks better. The label next to it and the underline help. Might want to make the underline a bit thicker/darker for visibility (though in this case it seems clean design and visibility are at odds).

Just working on this code now (as above pictures were renders)

Done. The fix has been made in the latest commit:  263b91e


Error when running Multiclass linear SVM (without intercept) example

When running the Multiclass linear SVM (without intercept) example, (https://jaxopt.github.io/stable/auto_examples/constrained/multiclass_linear_svm.html) the QP solver yields the following error:
OSQP solution solution: Traceback (most recent call last):   File "multiclass_linear_svm.py", line 144, in <module>     app.run(main)   File "/home/qbe/anaconda3/lib/python3.7/site-packages/absl/app.py", line 303, in run     _run_main(main, args)   File "/home/qbe/anaconda3/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main     sys.exit(main(argv))   File "multiclass_linear_svm.py", line 127, in main     W_osqp = multiclass_linear_svm_osqp(X, Y, l2reg)   File "multiclass_linear_svm.py", line 105, in multiclass_linear_svm_osqp     init_params = osqp._box_osqp.init_params(init_x=None, **hyper_params)   File "/home/qbe/jaxopt/jaxopt/_src/osqp.py", line 410, in init_params     init_z = projection_box(self.matvec_A(params_eq)(init_x), params_ineq)   File "/home/qbe/jaxopt/jaxopt/_src/osqp.py", line 47, in projection_box     return tree_map(_clip_safe, x, lower, upper)   File "/home/qbe/jax/jax/_src/tree_util.py", line 180, in tree_map     all_leaves = [leaves] + [treedef.flatten_up_to(r) for r in rest]   File "/home/qbe/jax/jax/_src/tree_util.py", line 180, in <listcomp>     all_leaves = [leaves] + [treedef.flatten_up_to(r) for r in rest] ValueError: Expected list, got None.
I guess the API of OSQP changed, but I did not managed to find a quick fix.
I am using the main branch of the developement version of  jaxopt

Confirmed on my side. CC @Algue-Rythme


Inconsistent drag event behaviour (in jsfiddle vs. local environment)

Vue.js version
2.1.6
Reproduction Link
http://jsfiddle.net/bvjfa9xk/8/
Steps to reproduce
What is Expected? / What is actually happening?
Dragging list item from one bucket to another paints outer item red on a dragenter event.
This is what the fiddle does as expected. I start to drag an item from the 3rd column to the 2nd, upon dragstart the 3rd gets the class immediately. The second gets it only when the mouse hovers over it. As I said this is what I expect to happen.

But if I copy the exact same code from the fiddle and paste it in a local folder /index.html, main.js, also link to vue 2.1.6/ This happens:

Upon dragstart in the 3rd column, the 2nd one immediately gets the class as well.
Same code, same versions, same browser /latest Chrome/
  methods: {
    dragenter: function (ev) {
      debugger
      this.$el.classList.add('drop-target')
      console.log(this)
    }
  }

If I place a debugger statement before the class addition, by the time it stops there I see that the column where I started to drag already got the class and $el now referring to the second column.
Everything is the same, I don't know why it behaves different (I'm trying to develop a drag-and-drop application and I just bumped to this issue). First I thought it was webpack/node-module related, so I trashed all of these and started on a single html/js file.

Hmm, cannot reproduce this myself, the behavior seems to be exactly the same when I copy your jsfiddle verbatim into a local file. Maybe it has to do with some of your Chrome extensions?

Hi @yyx990803 Thanks for looking at it. I deleted all Chrome extensions, emptied cache, browsehistory, etc... It is still wrong in Chrome, but I've found several differences:
If I drag it somewhere in the 2nd half of the cell, it works as it should (only highlights second column as mouse enters it):

But if I drag it closed to the left edge, it fails (notice: I even drag it to the right):

More strange is that it is now fails in the fiddle as well:

And this is the weirdest (if I drag it closer to the right, it does something completely different):

Same Chrome version: 55.0.2883.87 m, same code.
On top of that in Edge it is perfect, no matter where I drag:

I checked on my co-workers system as well. One works fine on Chrome with the fiddle, the other ones fails as well.

Chrome Version 54.0.2840.98 (64-bit), not reproducible in jsfiddle

@KingMario I checked the divs, they seem normal. Besides we are looking at the same fiddle ( http://jsfiddle.net/bvjfa9xk/8/ ) I don't see how they can be layed out differently in the same browser.

Still cannot reproduce. This may have something to do with Windows Chrome?

Seems to work fine on Windows x64 1607(14393.447), Chrome 55.0.2883.87

Hmm, sorry @szmarci , but given the test cases, the issue seems unlikely to be related to Vue. Maybe you can try testing it on a different machine...
Anyway, closing for now, but feel free to follow up with more information.

To make things even more strange:

If I am in full screen and grab the first item in the list it works. Then I downsize the window and grab the same element it fails.
Also I have tested it on several machines of my coworkers:
Windows 10, latest Chrome - fails,
Windows 10, latest Chrome - fails,
Windows 10, latest Chrome - fails,
Windows 8.1, latest Chrome - works
One would assume it is W10 related, but @fnlctrl uses a W10 build.
I have no idea what this is. I'm gonna check it at home on my Mac

update: it works fine on a Mac (OS 10.11), latest Chrome

Hi, I encountered the same problem in my project. I am also able to reproduce the behavior from the jsfiddle mentioned in this issue. Maybe I can shed some more light on the problem, because I noticed some very specific nuances.
WHAT IS HAPPENING:
Dragenter and dragleave events are triggered on an incorrect (i.e. preceding sibling) element from v-for loop together with or instead of the events of the actually dragged element (DragTarget). The problem seems to be related to v-for specifically, I haven’t encountered it on non-v-for’ed elements. It appears on Chrome only.
My own jsfiddle with Vue 2.2.1:
https://jsfiddle.net/Eggon666/d6htzpr0/12/
Bug behavior on this js fiddle is erratic. There are 5 v-for elements:

The problem does not always occur on the first drag
Buttons 1 and 2 always work fine
Button 3 sometimes works fine and sometimes does not trigger any dragenter/dragleave event at all
Buttons 4 and 5:
a.	sometimes work fine (rarely),
b.	sometimes they trigger events only on the preceding element (eg dragging No 4 triggers dragenter/leave on No 3)
c.	sometimes they trigger events on both the dragged element and the preceding element. In such case the order is: 1) PrecedingSibling.Dragenter 2) DragTarget.Dragenter 3) PrecedingSibling.Dragleave 4) DragTarget.DragLeave
d.	However, if you start the drag and don’t move the pointer outside of the DragTarget the bug is very unlikely to occur! If it occurs it never triggers PrecedingSibling only, it triggers both elements: 1) PrecedingSibling.Dragenter 2) DragTarget.Dragenter 3) PrecedingSibling.Dragleave
e.	On the other hand, if you move the pointer out of the element immediately after drag start, the bug is very likely to occur.
f.	When the dragenter is triggered on the DragTarget again, i.e. when you move out of the element and come back into it – the sibling event is not triggered anymore, just on the beginning of the drag.

Bug behavior on my local project (Vue 2.6.10) is slightly different. The setup is slightly different as well (v-for is used on components which have some nested divs in them). Bug behavior:

The problem does not always occur on the first drag
Once the problem occurs for the first time it occurs on every consecutive drag – except for element no 2 which can behave correctly again.
Dragging element triggers dragenter/dragleave triggers on both the dragged element and on the preceding v-for sibling (sibling first) or just on the preceding sibling.
a.	When the dragenter is triggered on the DragTarget again, i.e. when you move the pointer on the child div or when you leave the element and come back into it – the sibling event is not triggered anymore, just on the beginning of the drag.

The difference between js fiddle and local behavior is mainly (but not only) frequency of particular behaviors. On the local setup:
a. second v-for element is also affected, although can react correctly sometimes,
b. third element very rarely ignores the drag (I’m not sure if this part of bug is not JS fiddle issue)
c. starting from third element, once the bug occurs, it will occur every time (although might oscillate between triggering on preceding sibling only or two elements together),
d. the fact of not moving the cursor out of the DragTarget does not prevent the bug from happening (in contrary to jsfiddle point 4.d ). This might be caused by children divs?
Problem occurs on my two computers (Win7 HP and Win7 Professional), only on Chrome (74.0.3729.157). Mozilla and IE work fine. On one of the computers I removed Chrome with all extensions and history and reinstalled it. The problem persisted. Kaspersky’s Chrome extension is unfortunately automatically loaded on Chrome install, though not activated. Turning off Kaspersky on Windows did not prevent the extension from loading, and I don’t know how to prevent it other than uninstalling Kaspersky which I’d rather not do. Removing the Kaspersky’s extension from Chrome does not change the situation though.

I reduced the test case to vanilla js.
The bug happens when you open the page on Chrome on a HDPI screen with windows scaling (150%). In the console, you can see that when you move item from the list on the right over its own area, Chrome fires two dragenter events instead of one. Duplicated event has different clientX and clientY and that is probably connected with triggering first list's handler :).

@mciesin  I have this bug on Chrome, standard PC monitor, scale 100%.


Inserted other updated way of installation of CRA

Now, the documentation of react showing the example "npx create-react-app my-app" because it is made easy from npm 5.2+.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thanks for contributing to the freeCodeCamp repository. Congratulations on your first PR! 🎊
Look forward to more contributions from you! ✈


Small summary about the Galaxy related work

We worked on:

tools and workflows, including Conda and Biocontainers
automatic data upload and processing
world-wide distributed compute network

Thank you, @bgruening!

Thanks for the fast merge!


Fix/33990: Not here page appear when refreshing

Details

This PR will fix the issue: Web - Chat- Hmm it's not here page displayed on reloading page after selecting Request money
We'll change the app behavior to always present the last visited report in the central pane, regardless of the reportId (the pre-set money request participant) in the URL. The change only apply with the URLs that are related to IOU flows, for example /create/request/start/1/6791232472013355/manual

Fixed Issues

$ https://github.com/Expensify/App/issues/33990
PROPOSAL: https://github.com/Expensify/App/issues/33990#issuecomment-1878409305
Tests

Login with gmail account on ND site
Go to any 1:1 DM
Tap + FAB button
Select either Manual, Scan or Distance option
Reload page
Previous opened chat history should display on reloading page after selecting Request money options

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

Login with gmail account on ND site
Go to any 1:1 DM
Tap + FAB button
Select either Manual, Scan or Distance option
Reload page
Previous opened chat history should display on reloading page after selecting Request money options

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Cannot test in this platform

Android: mWeb Chrome

Screencast from 26-01-2024 06:04:40.webm

iOS: Native

Cannot test in this platform

iOS: mWeb Safari

Screencast from 26-01-2024 06:06:42.webm

MacOS: Chrome / Safari

Screencast from 26-01-2024 06:02:27.webm

MacOS: Desktop

Screencast from 26-01-2024 07:04:01.webm

@cubuspl42 I fixed your comment

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/2590174/98bdefa6-12c6-4cf7-8986-422b805e4d2b

MacOS: Desktop
https://github.com/Expensify/App/assets/2590174/66677b0a-2c94-4ae4-835d-e928816d8b54

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/francoisl in version: 1.4.33-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
cancelled 🔪

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅


Support custom settings module by enviornment variable

Right now, the python settings file that we can create, must be importable as mattermost_bot_settings and that usually do not work so well when we package our bot custom code into a cli for example.
What would be great to change is to add the ability to specify a environment variable similar to how django can handle a custom settings file. Django has the DJANGO_SETTINGS_MODULE=... and this module could use for example MATTERBOT_SETTINGS_MODULE=... and it tries to import the mattermost_bot_settings.py  file inside that module.

Good idea :+1:


Avoid leaking sys::mrb_data_type on class::Spec construction

The fuzz GitHub Actions workflow found a small memory leak:
https://github.com/artichoke/artichoke/runs/1469791093?check_suite_focus=true
This leak was intentionally introduced in #927 to allow the
BoxUnboxVmValue implementation for HeapAllocatedData to pass the
data type to mrb_data_object_alloc without holding a borrow on the
interpreter so the mruby API call could be wrapped in
Artichoke::with_ffi_boundary.
This leak to raw *mut sys::mrb_data_type is not necessary:

mrb_data_types can be safely cloned.
It is safe to reference a cloned free function or &CStr name.
mrb_data_object_alloc only takes *const sys::mrb_data_type.

These three factors allow implementing class::Spec::data_type in safe
code without ever leaking the mrb_data_type.

Sample leak:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x563f9261194d  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x7b594d)
    #1 0x563f92d9cdc1  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0xf40dc1)
    #2 0x563f92fb780c  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x115b80c)
    #3 0x563f92fb83a8  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x115c3a8)
    #4 0x563f92fb933d  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x115d33d)
    #5 0x563f92fcb2d1  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x116f2d1)
    #6 0x563f92681356  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x825356)
    #7 0x563f9264fa44  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x7f3a44)
    #8 0x563f939dde10  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1b81e10)
    #9 0x563f939dda6f  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1b81a6f)
    #10 0x563f93a1e4e8  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1bc24e8)
    #11 0x563f93a250c0  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1bc90c0)
    #12 0x563f93a2786e  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1bcb86e)
    #13 0x563f93a28fa7  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1bccfa7)
    #14 0x563f939ed942  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1b91942)
    #15 0x563f92597112  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x73b112)
    #16 0x7fe385af3bf6  (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x563f9261194d  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x7b594d)
    #1 0x563f92d9cdc1  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0xf40dc1)
    #2 0x563f92e3252d  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0xfd652d)
    #3 0x563f92fa582f  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x114982f)
    #4 0x563f92fb931f  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x115d31f)
    #5 0x563f92fcb2d1  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x116f2d1)
    #6 0x563f92681356  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x825356)
    #7 0x563f9264fa44  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x7f3a44)
    #8 0x563f939dde10  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1b81e10)
    #9 0x563f939dda6f  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1b81a6f)
    #10 0x563f93a1e4e8  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1bc24e8)
    #11 0x563f93a268a1  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1bca8a1)
    #12 0x563f93a28e19  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1bcce19)
    #13 0x563f939ed942  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x1b91942)
    #14 0x563f92597112  (/home/runner/work/artichoke/artichoke/fuzz/target/x86_64-unknown-linux-gnu/release/eval+0x73b112)
    #15 0x7fe385af3bf6  (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)

This PR was also required to fix https://github.com/artichoke/artichoke/issues/930.


refactor: replaced logrus with zap and improved use of internal.Context

This PR replaces logrus for zap and improves the usage of the instance.Context. The instance package is replaced with the broker package. Contexts are passed as arguments to the logger.

Codecov Report

Merging #99 into master will increase coverage by 0.07%.
The diff coverage is 92.83%.

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   83.02%   83.09%   +0.07%
==========================================
  Files          62       64       +2
  Lines        4077     4142      +65
==========================================
+ Hits         3385     3442      +57
- Misses        432      438       +6
- Partials      260      262       +2

Impacted Files
Coverage Δ

pkg/specs/property.go
96.77% <0.00%> (-3.23%)
:arrow_down:

middleware.go
92.59% <50.00%> (ø)

pkg/transport/http/listener.go
73.85% <68.75%> (+0.52%)
:arrow_up:

pkg/codec/metadata/manager.go
66.66% <75.00%> (ø)

pkg/flow/node.go
83.46% <75.00%> (ø)

pkg/transport/grpc/caller.go
74.15% <85.71%> (-0.85%)
:arrow_down:

pkg/transport/grpc/listener.go
75.00% <87.50%> (+0.21%)
:arrow_up:

pkg/broker/broker.go
90.47% <90.47%> (ø)

pkg/broker/logger/logger.go
92.00% <92.00%> (ø)

options.go
94.73% <100.00%> (+0.19%)
:arrow_up:

... and 23 more


Run time

From time to time, we need to run rules only on range time basis, example in working hours. This pull request adds run_time (and run_time_format) to achieve this.
example configuration: running rule all days from 00:00:00 to 01:00:00 and mondays + fridays from 13:00:00 to 20:00:00
run_time:

start: "00:00:00"
end: "01:00:00"
start: "13:00:00"
end: "20:00:00"
week_day: ["mon", "fri"]

This functionality is also covered by https://github.com/Yelp/elastalert/pull/1298.


Zol issues with managing running of HMM to find gene-cluster homolog segments

I have been trying to run Zol through the prepTG/fai/zol pipeline, but I am always facing the same issue after Step 4 (Identifying homologous gene-cluster segments) starts. The run always generates the error below (independently if I am trying to use any of the 3 input types):
→ fai -pq cluster_ptn.faa -tg prepTG_DB -o fai_Results/ -c 3 -gp
Output directory exists. Overwriting in 5 seconds ...
 Running fai version '1.02'
Beginning fai searches using protein queries FASTA file at: cluster_ptn.faa
--------------------
Step 1
--------------------
Getting protein sequences of known gene-cluster instance(s).
--------------------
Step 2
--------------------
Running DIAMOND BLASTp and Processing Results.
--------------------
Step 3
--------------------
Loading target genomes database prepared by prepTG.
--------------------
Step 4
--------------------
Identifying homologous gene-cluster segments.
Issues with managing running of HMM to find gene-cluster homolog segments.
'NoneType' object is not subscriptable
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/Volumes/Expansion/fai/zol/zol/fai.py", line 649, in identify_gc_instances
    for scaffold in hgs_ordered_dict[sample]:
TypeError: 'NoneType' object is not subscriptable
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Volumes/Expansion/fai/zol/zol/fai.py", line 631, in identifyGCInstances
    p.map(identify_gc_instances, identify_gc_segments_input)
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Volumes/Expansion/fai/zol/zol_conda_env/bin/fai", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/Volumes/Expansion/fai/zol/bin/fai", line 527, in <module>
    faiMain()
  File "/Volumes/Expansion/fai/zol/bin/fai", line 494, in faiMain
    fai.identifyGCInstances(query_information, target_information, diamond_results, hmm_work_dir, logObject,
  File "/Volumes/Expansion/fai/zol/zol/fai.py", line 641, in identifyGCInstances
    raise RuntimeError(traceback.format_exc())
RuntimeError: multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/Volumes/Expansion/fai/zol/zol/fai.py", line 649, in identify_gc_instances
    for scaffold in hgs_ordered_dict[sample]:
TypeError: 'NoneType' object is not subscriptable
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Volumes/Expansion/fai/zol/zol/fai.py", line 631, in identifyGCInstances
    p.map(identify_gc_instances, identify_gc_segments_input)
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/Volumes/Expansion/fai/zol/zol_conda_env/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
TypeError: 'NoneType' object is not subscriptable

Any ideas of what might be happening?

Hi @lucssantos ,
Thanks for giving zol a try!
Yes, this was confusing me as well but if you please check out zol from Github again since v1.2.1, this issue should be resolved. This is related to a difference in the multiprocessing library between macOS (where I assume you are running it) and unix.
Also, I've been making some changes to the code base recently to develop a docker image and bioconda recipe, these should not affect installation the way it is described and none of the programs should be changing.
Please let me know if your issue persists or a new one comes up!
Rauf


Missing rec results in post-condition proof failure

This code is from the tutorial, section "4.2. To type intrinsically, or to prove lemmas?" I typed it in myself and forgot a rec when defining rev_involutive:
module Bug_Report

open FStar.List.Tot

val reverse: list 'a -> Tot (list 'a)
let rec reverse = function
  | [] -> []
  | hd :: tl -> append (reverse tl) [hd]

let snoc l h = append l [h]

val snoc_cons: l:list 'a -> h:'a -> Lemma (reverse (snoc l h) == h :: reverse l)
let rec snoc_cons l h = match l with
  | [] -> ()
  | hd :: tl -> snoc_cons tl h

val rev_involutive: l:list 'a -> Lemma (reverse (reverse l) == l)
let rev_involutive l = match l with
  | [] -> ()
  | hd :: tl ->
    rev_involutive tl;
    snoc_cons (reverse tl) hd

I would expect the compiler to complain about rev_involutive not being in scope, but instead if says:

$ fstar.exe  bug_report.fst
bug_report.fst(18,23-22,29): (Error 19) could not prove post-condition (see also bug_report.fst(17,39-17,65))
Verified module: Bug_Report (842 milliseconds)
1 error was reported (see above)

Making it let rec rev_involutive ... it verifies correctly. Is this expected behavior or a bug? I found it a bit confusing.
Reproducing
I compiled fstar.exe from the git repository using the provided OCaml sources:
$ fstar.exe --version
F* <IP_ADDRESS>~dev
platform=Linux_x86_64
compiler=OCaml 4.07.1
date=<not set>
commit=0f326698b8e268f06a56297a6af49510cb0e02e8

This is confusing, but not a bug!
The rev_involutive in the body is resolving to FStar.List.Tot.Properties.rev_involutive, and not to the one you're defining. When you add the rec, it does resolve to the one in your module, as expected.
Now why are you getting a could not prove post-condition error? Because the lemma in ulib speaks about FStar.List.Tot.Base.rev, and not the reverse you are defining which is potentially completely different.
Just for fun, you can add this just before your last lemma to make it succeed (and prove it if you want):
val rev_is_reverse : l:list 'a -> Lemma (reverse l == rev l) [SMTPat (reverse l)]
let rev_is_reverse l = admit ()

Oh, nice one! Thanks for the quick and detailed response.
So, follow-up question. In F*, can I open modules in a way that they're qualified? I'm mostly doing Haskell programming otherwise, and I'd like to do something like:
import qualified FStar.List.Tot as List
import               FStar.List.Tot (list, Cons, Nil)

I'm not very good with OCaml/ML in general, maybe there's a way of doing this that also exists in F*? Thanks!

You can qualify the import with
module List = FStar.List.Tot

But I don't think you can select what to import from it.

Thanks!


fix: link_texts was breaking postgres destination connector

Formatting of link_texts was breaking metadata storage. Turns out it didn't need any conforming and came in correctly from json.

actually: should we add a test that would have failed?

actually: should we add a test that would have failed?

yeah. was definitely on my mind :)


Bank onboarding -- switch steps

Summary
Switch steps 1 (partners) and 2(storage locations) in the new bank onboarding sequence
Why?
There is a default storage location on the partner, so if someone is adding partners by hand, it would be good to be able to add that in.
Details
How do I see this?
Sign in to a (newly seeded) local copy as<EMAIL_ADDRESS>What needs to happen
Switch steps 1 and 2 (both labels and functionality).  An initial look indicates this is handled in app/views/dashboard/_getting_started_prompt.html.erb
Criteria for completion

[ ] steps switched
[ ] please include screenshots

@cielf @dorner May I have this issue?

Yup!


Asynchronous API for 2.0

This is a placeholder issue for the work being done to add an async API for 1.1
Create a behaviour table in spec and also examples to explain interactions.

We are moving this to a branch which will be labelled asyncapiproposal. We are marking it for 2.0 which will require a new JSR.

This is too big to do in JSR107 so closing.