Channel mapping with RawInputStream

I want to record 2 channels from a multi-channel soundcard. I thought that would be possible with the mapping parameter, but found out that the stream (e.g. RawInputStream) do not support this.
Is there another way to record selected channels with a stream?

PortAudio doesn't provide a platform-independent way to select arbitrary channels. You can only specify a certain number of channels N, which means that the channels 1 to N are used.
For convenience, I added the mapping argument to play() and rec() and input_mapping/output_mapping to playrec(). However, this simply checks for the largest channel number, requests this number of channels from PortAudio and fills the unneeded output channels with zeros (and ignores the unneeded input channels). It's not ideal if you have many unneeded channels, but it gets the job done
And that's what you can do in your code using RawInputStream, too.
Having said that, PortAudio also has some platform-specific functions to select certain channels (see http://portaudio.com/docs/v19-doxydocs/group__public__header.html), but those are currently not implemented in python-sounddevice (see #4). If you think they should be implemented, please leave a comment at #4. On what platform/host API would you need that feature?

Selecting arbitrary channels is now possible with ASIO (see #34). If you need other platform-specific features, please comment on #4 or open a new issue.


[w3c] ☂ Web Props (Part 1) umbrella issue

Note: All web props mentioned in this umbrella issue are available as part of the React Native 0.71 release

Add support for Web props to core components
Contingent on RFC feedback. This is the umbrella issue for basic React DOM / Web props support on React Native components, as described in this proposal: "RFC: Reduce fragmentation across platforms".
Each of the tasks listed below can be tackled with individual PRs that link back to this issue. Not every task has a known solution or implementation yet, so feel free to discuss implementation details in the comments. Each new prop should take priority over any existing equivalents.
Common props
These props should be supported by core components, i.e., <Image>, <View>, <Text>, <TextInput>, etc.
Prop aliases

[x] Add aria-label alias for accessibilityLabel. https://github.com/facebook/react-native/pull/34502
[x] Add aria-labelledby alias for accessibilityLabelledBy. https://github.com/facebook/react-native/pull/34725
[x] Add aria-modal alias for accessibilityViewIsModal (iOS). https://github.com/facebook/react-native/pull/34506
[x] Add id alias for nativeID. https://github.com/facebook/react-native/pull/34522

Accessibility State. https://github.com/facebook/react-native/pull/34524

[x] Add aria-busy alias for accessibilityState.busy.
[x] Add aria-checked alias for accessibilityState.checked.

[x] Support mixed value https://github.com/facebook/react-native/pull/34633

[x] Add aria-disabled alias for accessibilityState.disabled.
[x] Add aria-expanded alias for accessibilityState.expanded.
[x] Add aria-selected alias for accessibilityState.selected.

Accessibility Value. https://github.com/facebook/react-native/pull/34535

[x] Add aria-valuemax alias for accessibilityValue.max.
[x] Add aria-valuemin alias for accessibilityValue.min.
[x] Add aria-valuenow alias for accessibilityValue.now.
[x] Add aria-valuetext alias for accessibilityValue.text.

Prop equivalents

[x] Add aria-hidden. https://github.com/facebook/react-native/pull/34552

[x] Alias for importantforAccessibility='no-hide-descendants' (Android).
[x] Alias for accessibilityElementsHidden (iOS).

[x] Add aria-live. https://github.com/facebook/react-native/pull/34555

[x] Alias for accessibilityLiveRegion (Android).
[x] Map aria-live='off' to accessibilityLiveRegion='none'.

[x] Add role. https://github.com/facebook/react-native/pull/34538#issuecomment-1232918518 & https://github.com/facebook/react-native/pull/34976

[x] Alias for accessibilityRole but with full list of ARIA roles allowed.
[x] Map role='slider' to accessibilityRole='adjustable'
[x] Map role='img' to accessibilityRole='image'
[x] Map role='presentation' to accessibilityRole='none'
[x] Map role='summary' to accessibilityRole='region'
[x] Add role='option' support.

[x] Add tabIndex. https://github.com/facebook/react-native/pull/34486

[x] Only support for 0 and -1 values only.
[x] Map tabIndex={0} to focusable={true} (Android)
[x] Map tabIndex={-1} to focusable={false} (Android)

Example:
<View
  aria-hidden={true}
  aria-busy={false}
  aria-label="Accessibility label"
  aria-valuetext="Middle"
  id="native-id"
  role="slider"
  tabIndex={0}
>

// same as

<View
  accessibilityElementsHidden={true}
  accessibilityLabel="Accessibility label"
  accessibilityRole="adjustable"
  accessibilityState={{ busy: false }}
  accessibilityValue={{ text: "Middle" }}
  focusable={true}
  importantforAccessibility='no-hide-descendants'
  nativeId="native-id"
>

<Image> props
These props should be supported by <Image>.

[x] Add alt. https://github.com/facebook/react-native/pull/34550

[x] Support alternative text support.

[x] Add tintColor prop to replace non-standard style.tintColor. The tintColor style is currently forwarded to a native prop and should instead be exposed as a prop so that React Native for Web does not have to deopt styles for Image rendering. https://github.com/facebook/react-native/pull/34534#issuecomment-1232902094

These props are inter-related:crossOrigin and referrerPolicy should only apply if src or srcSet are defined; and src should be ignored if a valid srcSet is defined. The user-provided source prop should be ignored if a valid src or srcSet prop is also defined.
https://github.com/facebook/react-native/pull/34481

[x] Add crossOrigin.

[x] Potentially map crossOrigin='use-credentials' to source.headers['Access-Control-Allow-Credentials'] = true.

[x] Add height.
[x] Add referrerPolicy.

[x] Potentially map referrerPolicy to source.headers['Referrer-Policy'] = referrerPolicy.

[x] Add src.

[x] Map src to source.uri.

[x] Add srcSet.

[x] Map srcSet='path1 x1, path1 x2' to source=[{ uri: path1, scale: 1 },  { uri: path2, scale: 2 }].

[x] Add width.

Example mapping to source:
const { crossOrigin, height, referrerPolicy, src, srcSet, width } = props;
let source = null;
if (src != null) {
  const headers = {};
  if (crossOrigin === 'use-credentials') {
    headers['Access-Control-Allow-Credentials'] = true;
  }
  if (referrerPolicy != null) {
    headers['Referrer-Policy'] = referrerPolicy;
  }
  nextProps.progressiveRenderingEnabled = true;
  source = { headers, height, uri: src, width };
}
if (srcSet != null) {
  source = [];
  const srcList = srcSet.split(', ');
  srcList.forEach((src) => {
    const [uri, xscale] = src.split(' ');
    const scale = parseInt(xscale.split('x')[0], 10);
    const headers = {};
    if (crossOrigin === 'use-credentials') {
      headers['Access-Control-Allow-Credentials'] = true;
    }
    if (referrerPolicy != null) {
      headers['Referrer-Policy'] = referrerPolicy;
    }
    source.push({ headers, height, scale, uri, width });
  });
}

Example:
<Image
  alt="Alternative text"
  crossOrigin="use-credentials"
  height={300}
  referrerPolicy="origin"
  srcSet="https://image.png 1x, https://image2.png 2x"
  width={500}
>

// same as

<Image
  source={[
    {
      uri: "https://image.png",
      scale: 1,
      height: 300,
      headers: {
        'Access-Control-Allow-Credentials': true,
        'Referrer-Policy': 'origin'
      },
      width: 500
    }
    {
      uri: "https://image2.png",
      scale: 2,
      height: 300,
      headers: {
        'Access-Control-Allow-Credentials': true,
        'Referrer-Policy': 'origin'
      },
      width: 500
    }
  ]}
>

<TextInput> props
These props should be supported by <TextInput>.

[x] Redefine autoComplete. https://github.com/facebook/react-native/pull/34523

Unify values for Android (autoComplete) and iOS (textContentType) with Web (autoComplete).
See code below for example mapping.

[x] Add enterKeyHint. https://github.com/facebook/react-native/pull/34482

[x] Map to equivalent returnKeyType values.
[x] Map enterKeyHint === 'enter' to returnKeyType = 'default'
[x] Map enterKeyHint === 'done' to returnKeyType = 'done'
[x] Map enterKeyHint === 'go' to returnKeyType = 'go'
[x] Map enterKeyHint === 'next' to returnKeyType = 'next'
[x] Map enterKeyHint === 'previous' to returnKeyType = 'previous'
[x] Map enterKeyHint === 'search' to returnKeyType = 'search'
[x] Map enterKeyHint === 'send' to returnKeyType = 'send'

[x] Add inputMode. https://github.com/facebook/react-native/pull/34460

[x] Map to equivalent keyboardType values.
[x] Map inputMode === 'none' to showSoftInputOnFocus={false} https://github.com/facebook/react-native/pull/35228
[x] Map inputMode === 'text' to keyboardType = 'text'
[x] Map inputMode === 'decimal' to keyboardType = 'decimal-pad'
[x] Map inputMode === 'email' to keyboardType = 'email-address'
[x] Map inputMode === 'numeric' to keyboardType = 'numeric'
[x] Map inputMode === 'search' to keyboardType = 'search'
[x] Map inputMode === 'tel'to keyboardType = 'phone-pad'
[x] Map inputMode === 'url' to keyboardType = 'url'

[x] Add readOnly. https://github.com/facebook/react-native/pull/34444

[x] Map readOnly={false} to editable={true}.
[x] Map readOnly={true} to editable={false}.

[x] Add rows (for multiline={true}). https://github.com/facebook/react-native/pull/34488

[x] Map rows to numberOfLines (Android).

Example autoComplete mapping:
// https://reactnative.dev/docs/textinput#autocomplete-android
const autoCompleteAndroid = {
 // web: android
  'address-line1': 'postal-address-region',
  'address-line2': 'postal-address-locality',
  bday: 'birthdate-full',
  'bday-day': 'birthdate-day',
  'bday-month': 'birthdate-month',
  'bday-year': 'birthdate-year',
  'cc-csc': 'cc-csc',
  'cc-exp': 'cc-exp',
  'cc-exp-month': 'cc-exp-month',
  'cc-exp-year': 'cc-exp-year',
  'cc-number': 'cc-number',
  country: 'postal-address-country',
  'current-password': 'password',
  email: 'email',
  name: 'name',
  'additional-name': 'name-middle',
  'family-name': 'name-family',
  'given-name': 'name-given',
  'honorific-prefix': 'namePrefix',
  'honorific-suffix': 'nameSuffix',
  'new-password': 'password-new',
  off: 'off',
  'one-time-code': 'sms-otp',
  'postal-code': 'postal-code',
  sex: 'gender',
  'street-address': 'street-address',
  tel: 'tel',
  'tel-country-code': 'tel-country-code',
  'tel-national': 'tel-national',
  username: 'username'
};

// https://reactnative.dev/docs/textinput#textcontenttype-ios
const autoCompleteIOS = {
 // web: ios
  'address-line1': 'streetAddressLine1',
  'address-line2': 'streetAddressLine2',
  'cc-number': 'creditCardNumber',
  'current-password': 'password',
  country: 'countryName',
  email: 'emailAddress',
  name: 'name',
  'additional-name': 'middleName',
  'family-name': 'familyName',
  'given-name': 'givenName',
  nickname: 'nickname',
  'honorific-prefix': 'name-prefix',
  'honorific-suffix': 'name-suffix',
  'new-password': 'newPassword',
  off: 'none',
  'one-time-code': 'oneTimeCode',
  organization: 'organizationName',
  'organization-title': 'jobTitle',
  'postal-code': 'postalCode',
  'street-address': 'fullStreetAddress',
  tel: 'telephoneNumber',
  url: 'URL',
  username: 'username'
};

Examples:
<TextArea
  autoComplete="email"
  inputMode="email"
/>

// same as

<TextArea
  autoComplete="email"
  keyboardType="email-address"
  textContentType="emailAddress"
/>

<TextArea
  multiline
  readOnly={true}
  rows={3}
/>

// same as

<TextArea
  editable={false}
  multiline
  numberOfLines={3}
/>

Documentation

[x] Update react-native-website docs to include all these props. @gabrieldonadel has several PRs open for individual props, which we may want to consolidate into a single PR and add remaining props, so it can be merged in one commit.

See companion issue related to styles https://github.com/facebook/react-native/issues/34425

I'd love to help out. This would be my first real open source contribution. Is there anything I should be aware of in order to get started?

@necolas I've just opened a PR adding the readOnly prop to the TextInput component (https://github.com/facebook/react-native/pull/34444), please let me know if this is what was expected or if it should be implemented using a different approach

@necolas just FYI I've opened a PR tackling the Add tabIndex task here https://github.com/facebook/react-native/pull/34486

We have PRs either merged or open for every prop listed here except aria-hidden, aria-live, and alt. Big thanks to everyone who has contributed patches so far. This work is also going to indirectly help make React Native for Web better.
If you're still looking to contribute to this wider effort to bridge the gap between React Native and React DOM, we also have some styling tasks https://github.com/facebook/react-native/issues/34425

The following would also be great to add:

mask
clip-path
shape-outside
filter
mix-blend-mode

The following would also be great to add

Presumably you meant to post this on the styles umbrella issue?
There has to be an idea of how to implement these features though. Almost everything I've listed to date has already been bridged in RNWeb or a shim I wrote internally, so there's not a lot of new native work needed. Once we have added support for the easy props and styles, people can start looking into how to implement features that require new native code to be written.

Presumably you meant to post this on the styles umbrella issue?

Ah, yep, posted on the wrong one.

Once we have added support for the easy props and styles, people can start looking into how to implement features that require new native code to be written.

Sounds good.

I also want to set expectations: for at least the next 6 months, Meta is unlikely to be able to commit engineers to work on new native features to expand CSS support (with the exception of flexbox-related changes to Yoga). But if contributors who want these CSS features can develop and test them, we will help to integrate the code and give credit where it is due. Thanks!

Question:
what about data- attributes?
some headless web UI libraries make huge use of them to attach some "state" to DOM, I'm worried that they are not transferrable.
Are those supported?

One more task has been added, which is to update the react-native-website docs to include all these new props once all the PRs have been merged.

I think adding aria-labelledby aliases for accessibilityLabelledBy should be part of this Issue as well.

Good idea

I think role support is missing from Text (which appears to support accessibilityRole): https://github.com/facebook/react-native/blob/main/Libraries/Text/TextProps.js
This logic in View may need to be moved to a shared place so it can be used in Text too

I think role="option" is missing

I think role support is missing from Text (which appears to support accessibilityRole): https://github.com/facebook/react-native/blob/main/Libraries/Text/TextProps.js
This logic in View may need to be moved to a shared place so it can be used in Text too

Hi @necolas, just FYI I've opened a PR (https://github.com/facebook/react-native/pull/34976) a couple days ago tackling this

I think role="option" is missing

Good spot. I'll add one more task to add option.

Good spot. I'll add one more task to add option.

@necolas what should we map the role option to? Should we add this new value natively on accessibilityRole as well?

It maps to nothing AFAICT, but needs to be included in the type for role

It maps to nothing AFAICT, but needs to be included in the type for role

Got it, I've just opened a PR for that https://github.com/facebook/react-native/pull/35137

Hi @necolas, I saw that the Update [react-native-website](https://github.com/facebook/react-native-website/) docs to include all these props task was marked as completed. I believe some props are still missing tho, is someone from Meta going to work on this or is it still pending?

My mistake. Unchecked it again

All the props listed here have been implemented. Thanks so much to everyone who helped here, especially @gabrieldonadel for helping from start to end!
I'm going complete some updates to RNWeb so that it allows these props too.
And then I will probably create a "Part 2" issue with a few more props from the RFC. I'll also be updating the RFC with more details about the Event and Element APIs, which will likely form new umbrella issues.

If you have suggestions for more W3C props we could implement, please comment on "RFC: Reduce fragmentation across platforms". I will start to publish updates to that RFC in the coming weeks. Thanks

👋  Been closely following along this work and just want to thank all of you for pushing this effort forward!
Quick question: are there plans to align implementation/typescript values for accessibility props? I'm seeing react-native uses boolean while @types/react uses Booleanish which allows boolean | 'true' | 'false'

@necolas I noticed that Touchable* components doesn't have accessibilityLabelledBy & aria-labelledby props, is it  expected ?


Update mockito-scala-scalatest to 1.14.3

Updates org.mockito:mockito-scala-scalatest from 1.14.2 to 1.14.3.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.mockito", artifactId = "mockito-scala-scalatest" } ]

labels: test-library-update, semver-patch

Codecov Report

Merging #334 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #334   +/-   ##
=======================================
  Coverage   46.26%   46.26%
=======================================
  Files          24       24
  Lines         281      281
=======================================
  Hits          130      130
  Misses        151      151

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 a12252d...e30d8df. Read the comment docs.


Refused to load the script...

I've configured atom-pair with a slack web hook, and when I try to send the invitation, I got something like :

Refused to load the script 'https://stats.pusher.com/timeline/v2/jsonp/2?session=XXXX because it violates the following Content Security Policy directive: "script-src 'self'".

And the invitation is never sent. Any idea ?

Could you try this again now?


Bump versions

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2807857871

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2807857871
Status: failure

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2808044049

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2808142152

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2808044049
Status: failure

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2808142152
Status: success


[harrison_kreps] issue 2

Hi @jstac this makes use of the tol local varibale in the price_optimistic_beliefs and price_pessimistic_beliefs functions  here

Thanks @Harveyt47


chore(deps): Bump go.mod

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

NONE

/hold
I'll sort project-infra out now.

/test pull-common-instancetypes

/release-note-none
/retest

/test pull-common-instancetypes

/test pull-common-instancetypes

/test pull-common-instancetypes

@lyarwood I saw this error in the past. Try updating the golangci-lint to latest.

Yup thanks, should be fixed now if you could take a look @jcanocan

/test pull-common-instancetypes-kubevirt-functest-validation-os
/test pull-common-instancetypes-kubevirt-functest-opensuse-tumbleweed

/hold cancel

/lgtm


New results on .NET 5

Hi,
Awesome research you've done here.
Have you ran this on .net 5 to see how things have improved?

Hi, please check out https://medium.com/swlh/astonishing-performance-of-net-5-more-data-5cdc8d821e8c
Overall, .NET 5 didn't improve much in this sense, though I guess the issue with this test is that it doesn't involve pinned objects, and these objects were the main target of .NET 5 GC perf. improvements.

They added the bitonic sort in .net afaik.
Have you reached out to maoni or the .net pms?

No, I have not. I'll try to.

Any plan ran this test on .NET6? @alexyakunin

Any plan ran this test on .NET7 ? @alexyakunin

@InCerryGit
@PeterXiao
As far as I know, there are no much improvements in GC between .net 5 and .net 9.
Unless the .net team makes a major overhaul, the results won't improve significantly.

@InCerryGit @PeterXiao As I know, there are no much improvements in GC from .net 5 to net 9. Unless the .net team makes a major overhaul, the results won't improve significantly.

Actually, there are also some performance optimizations and changes, such as segments to regions, datas, etc.

Actually, there are also some performance optimizations and changes, such as segments to regions, datas, etc.

It can be predicted that the impact will not exceed 50%, while this test requires an improvement of dozens or hundreds of times.

Launch parameters:
Software:
  Runtime:            .NET Core
    Version:          .NET 8.0.5
    GC mode:          Workstation GC, Latency mode: Interactive, LOH compaction mode: Default, Large pages: disabled, Generations: 0..2
  OS:                 Microsoft Windows 10.0.19045 (X64)
Hardware:
  CPU:                AMD Ryzen 5 5600X 6-Core Processor
  CPU core count:     12
  RAM size:           32 GB

--- Stateless server (no static set) ---

Test settings:
  Duration:           10 s
  Thread count:       12
  Static set:
    Total size:       0 GB
    Object count:     0 M

Actual duration:      10.064 s
Allocation speed:
  Operations per second: 50.972 M/s
  Bytes per second:   4.379 GB/s
  Allocation stats:
    Size:
      Min .. Max:
        Min:          32 B
        Avg:          92.25 B
        Max:          131072 B
      Percentiles:
        50%:          40 B
        90%:          120 B
        95%:          144 B
        99%:          376 B
        99.9%:        5144 B
        99.99%:       19456 B
    Hold duration:
      Min .. Max:
        Min:          0 ms
        Avg:          11.586 ms
        Max:          40000 ms
      Percentiles:
        50%:          0 ms
        90%:          0 ms
        95%:          0.1 ms
        99%:          100 ms
        99.9%:        200 ms
        99.99%:       20000 ms
GC stats:
  RAM used:           0.03 -> 0.056 GB
  GC rate:
    Gen0, # per second: 53.162 /s
    Gen1, # per second: 2.484 /s
    Gen2, # per second: 2.186 /s
  Thread pauses:
    % of time frozen: 36.217 %
    # per second:
      Min .. Max:
        Min:          2 /s
        Avg:          788.606 /s
        Max:          970 /s
      Percentiles:
        50%:          870 /s
        90%:          914 /s
        95%:          936 /s
        99%:          945 /s
        99.9%:        956 /s
        99.99%:       956 /s
  Global pauses:
    % of time frozen: 30.729 %
    # per second:     769.106 /s
    Pause duration:
      Min .. Max:
        Min:          0 ms
        Avg:          0.4 ms
        Max:          34.312 ms
      Percentiles:
        50%:          0.241 ms
        90%:          0.583 ms
        95%:          0.672 ms
        99%:          4.278 ms
        99.9%:        15.167 ms
        99.99%:       22.083 ms

--- Worker / typical server (static set = 20% RAM) ---

Test settings:
  Duration:           10 s
  Thread count:       12
  Static set:
    Total size:       6.4 GB
    Object count:     74.482 M

Actual duration:      10.027 s
Allocation speed:
  Operations per second: 50.033 M/s
  Bytes per second:   4.298 GB/s
  Allocation stats:
    Size:
      Min .. Max:
        Min:          32 B
        Avg:          92.25 B
        Max:          131072 B
      Percentiles:
        50%:          40 B
        90%:          120 B
        95%:          144 B
        99%:          376 B
        99.9%:        5144 B
        99.99%:       19456 B
    Hold duration:
      Min .. Max:
        Min:          0 ms
        Avg:          11.586 ms
        Max:          40000 ms
      Percentiles:
        50%:          0 ms
        90%:          0 ms
        95%:          0.1 ms
        99%:          100 ms
        99.9%:        200 ms
        99.99%:       20000 ms
GC stats:
  RAM used:           6.43 -> 8.837 GB
  GC rate:
    Gen0, # per second: 775.669 /s
    Gen1, # per second: 272.352 /s
    Gen2, # per second: 12.865 /s
  Thread pauses:
    % of time frozen: 37.44 %
    # per second:
      Min .. Max:
        Min:          3 /s
        Avg:          740.894 /s
        Max:          999 /s
      Percentiles:
        50%:          789 /s
        90%:          890 /s
        95%:          932 /s
        99%:          981 /s
        99.9%:        995 /s
        99.99%:       995 /s
  Global pauses:
    % of time frozen: 34.778 %
    # per second:     726.304 /s
    Pause duration:
      Min .. Max:
        Min:          0 ms
        Avg:          0.479 ms
        Max:          29.839 ms
      Percentiles:
        50%:          0.407 ms
        90%:          0.784 ms
        95%:          0.835 ms
        99%:          0.96 ms
        99.9%:        1.9 ms
        99.99%:       6.074 ms

--- Caching / compute server (static set = 50% RAM) ---

Test settings:
  Duration:           10 s
  Thread count:       12
  Static set:
    Total size:       16 GB
    Object count:     186.218 M

Actual duration:      10.465 s
Allocation speed:
  Operations per second: 42.114 M/s
  Bytes per second:   3.618 GB/s
  Allocation stats:
    Size:
      Min .. Max:
        Min:          32 B
        Avg:          92.25 B
        Max:          131072 B
      Percentiles:
        50%:          40 B
        90%:          120 B
        95%:          144 B
        99%:          376 B
        99.9%:        5144 B
        99.99%:       19456 B
    Hold duration:
      Min .. Max:
        Min:          0 ms
        Avg:          11.586 ms
        Max:          40000 ms
      Percentiles:
        50%:          0 ms
        90%:          0 ms
        95%:          0.1 ms
        99%:          100 ms
        99.9%:        200 ms
        99.99%:       20000 ms
GC stats:
  RAM used:           16.03 -> 18.152 GB
  GC rate:
    Gen0, # per second: 1466.439 /s
    Gen1, # per second: 380.298 /s
    Gen2, # per second: 13.091 /s
  Thread pauses:
    % of time frozen: 47.137 %
    # per second:
      Min .. Max:
        Min:          371 /s
        Avg:          784.962 /s
        Max:          1157 /s
      Percentiles:
        50%:          785 /s
        90%:          1032 /s
        95%:          1075 /s
        99%:          1147 /s
        99.9%:        1149 /s
        99.99%:       1149 /s
  Global pauses:
    % of time frozen: 44.096 %
    # per second:     658.928 /s
    Pause duration:
      Min .. Max:
        Min:          0 ms
        Avg:          0.669 ms
        Max:          443.255 ms
      Percentiles:
        50%:          0.579 ms
        90%:          0.958 ms
        95%:          1.012 ms
        99%:          1.278 ms
        99.9%:        3.704 ms
        99.99%:       7.301 ms

@sgf
Thank you very much for your test results. Due to different machine configurations, it might be necessary to run the .NET 5 program on the same machine to compare results. Could you try running it with ServerGC and ServerGC+Datas separately?
set DOTNET_gcServer=1
set DOTNET_GCDynamicAdaptationMode=1

@sgf
Thank you very much for your test results. Due to different machine configurations, it might be necessary to run the .NET 5 program on the same machine to compare results. Could you try running it with ServerGC and ServerGC+Datas separately?
set DOTNET_gcServer=1
set DOTNET_GCDynamicAdaptationMode=1

With only 16GB, the longest pause time is close to 0.5 seconds. I don't think it's necessary to try again. If it's 5ms, maybe I will consider it.
.net's larger STW latency does not significantly affect the results even on better machines.
As for settings such as Serve GC, there will be no obvious difference.

@sgf
Thank you very much for your test results. Due to different machine configurations, it might be necessary to run the .NET 5 program on the same machine to compare results. Could you try running it with ServerGC and ServerGC+Datas separately?
set DOTNET_gcServer=1
set DOTNET_GCDynamicAdaptationMode=1

With only 16GB, the longest pause time is close to 0.5 seconds. I don't think it's necessary to try again. If it's 5ms, maybe I will consider it. .net's larger STW latency does not significantly affect the results even on better machines. As for settings such as Serve GC, there will be no obvious difference.

.NET has seen little improvement in WorkstationGC because its performance is already sufficient. However, ServerGC is a different story; it is actively being updated. Features like BGC, ConcurrentGC, and Regions are currently only available in ServerGC.

RAM=6.427 -> 7.867 GB max STW= 544 ms
RAM=16.029 -> 20.386 GB max STW=45.296 ms
Launch parameters:
Software:
  Runtime:            .NET Core
    Version:          .NET 8.0.5
    GC mode:          Server GC, Latency mode: Interactive, LOH compaction mode: Default, Large pages: disabled, Generations: 0..2
  OS:                 Microsoft Windows 10.0.19045 (X64)
Hardware:
  CPU:                AMD Ryzen 5 5600X 6-Core Processor
  CPU core count:     12
  RAM size:           32 GB

--- Worker / typical server (static set = 20% RAM) ---

Test settings:
  Duration:           10 s
  Thread count:       12
  Static set:
    Total size:       6.4 GB
    Object count:     74.482 M

Actual duration:      10.001 s
Allocation speed:
  Operations per second: 90.414 M/s
  Bytes per second:   7.768 GB/s
  Allocation stats:
    Size:
      Min .. Max:
        Min:          32 B
        Avg:          92.25 B
        Max:          131072 B
      Percentiles:
        50%:          40 B
        90%:          120 B
        95%:          144 B
        99%:          376 B
        99.9%:        5144 B
        99.99%:       19456 B
    Hold duration:
      Min .. Max:
        Min:          0 ms
        Avg:          11.586 ms
        Max:          40000 ms
      Percentiles:
        50%:          0 ms
        90%:          0 ms
        95%:          0.1 ms
        99%:          100 ms
        99.9%:        200 ms
        99.99%:       20000 ms
GC stats:
  RAM used:           6.427 -> 7.867 GB
  Thread pauses:
    % of time frozen: 35.697 %
    # per second:
      Min .. Max:
        Min:          2 /s
        Avg:          852.207 /s
        Max:          1153 /s
      Percentiles:
        50%:          866 /s
        90%:          1100 /s
        95%:          1126 /s
        99%:          1140 /s
        99.9%:        1144 /s
        99.99%:       1144 /s
  Global pauses:
    % of time frozen: 32.53 %
    # per second:     757.986 /s
    Pause duration:
      Min .. Max:
        Min:          0 ms
        Avg:          0.429 ms
        Max:          544 ms
      Percentiles:
        50%:          0.212 ms
        90%:          0.314 ms
        95%:          0.355 ms
        99%:          1.187 ms
        99.9%:        6.21 ms
        99.99%:       508.731 ms

--- Caching / compute server (static set = 50% RAM) ---

Test settings:
  Duration:           10 s
  Thread count:       12
  Static set:
    Total size:       16 GB
    Object count:     186.218 M

Actual duration:      10.007 s
Allocation speed:
  Operations per second: 90.499 M/s
  Bytes per second:   7.775 GB/s
  Allocation stats:
    Size:
      Min .. Max:
        Min:          32 B
        Avg:          92.25 B
        Max:          131072 B
      Percentiles:
        50%:          40 B
        90%:          120 B
        95%:          144 B
        99%:          376 B
        99.9%:        5144 B
        99.99%:       19456 B
    Hold duration:
      Min .. Max:
        Min:          0 ms
        Avg:          11.586 ms
        Max:          40000 ms
      Percentiles:
        50%:          0 ms
        90%:          0 ms
        95%:          0.1 ms
        99%:          100 ms
        99.9%:        200 ms
        99.99%:       20000 ms
GC stats:
  RAM used:           16.029 -> 20.386 GB
  Thread pauses:
    % of time frozen: 35.812 %
    # per second:
      Min .. Max:
        Min:          1 /s
        Avg:          760.402 /s
        Max:          839 /s
      Percentiles:
        50%:          771 /s
        90%:          802 /s
        95%:          819 /s
        99%:          836 /s
        99.9%:        837 /s
        99.99%:       837 /s
  Global pauses:
    % of time frozen: 33.965 %
    # per second:     735.363 /s
    Pause duration:
      Min .. Max:
        Min:          0 ms
        Avg:          0.462 ms
        Max:          45.296 ms
      Percentiles:
        50%:          0.416 ms
        90%:          0.517 ms
        95%:          0.569 ms
        99%:          1.166 ms
        99.9%:        7.483 ms
        99.99%:       22.55 ms

@sgf   Thank you for your benchmark results. It seems that ServerGC has made significant improvements compared to WorkstationGC. The 20% pause might be due to insufficient memory allocation, resulting in a longer pause. Once the GC adapts to the load, the pause time improves tenfold compared to WorkstationGC.

Name
Workstation GC
Server GC (20% RAM)
Server GC (50% RAM)

Duration
10 s
10 s
10 s

Thread count
12
12
12

Static set
50% RAM
20% RAM
50% RAM

Total size
16 GB
6.4 GB
16 GB

Object count
186.218 M
74.482 M
186.218 M

Operations per second
42.114 M/s
90.414 M/s
90.499 M/s

Bytes per second
3.618 GB/s
7.768 GB/s
7.775 GB/s

Size (Min / Avg / Max)
32 B / 92.25 B / 131072 B
32 B / 92.25 B / 131072 B
32 B / 92.25 B / 131072 B

50% Percentile
40 B
40 B
40 B

90% Percentile
120 B
120 B
120 B

95% Percentile
144 B
144 B
144 B

99% Percentile
376 B
376 B
376 B

99.9% Percentile
5144 B
5144 B
5144 B

99.99% Percentile
19456 B
19456 B
19456 B

Hold duration (Min / Avg / Max)
0 ms / 11.586 ms / 40000 ms
0 ms / 11.586 ms / 40000 ms
0 ms / 11.586 ms / 40000 ms

50% Percentile
0 ms
0 ms
0 ms

90% Percentile
0 ms
0 ms
0 ms

95% Percentile
0.1 ms
0.1 ms
0.1 ms

99% Percentile
100 ms
100 ms
100 ms

99.9% Percentile
200 ms
200 ms
200 ms

99.99% Percentile
20000 ms
20000 ms
20000 ms

RAM used (start -> end)
16.03 -> 18.152 GB
6.427 -> 7.867 GB
16.029 -> 20.386 GB

Gen0, # per second
1466.439 /s
-
-

Gen1, # per second
380.298 /s
-
-

Gen2, # per second
13.091 /s
-
-

Thread Pause

% of time frozen
47.137 %
35.697 %
35.812 %

# per second (Min / Avg / Max)
371 /s / 784.962 /s / 1157 /s
2 /s / 852.207 /s / 1153 /s
1 /s / 760.402 /s / 839 /s

50% Percentile
785 /s
866 /s
771 /s

90% Percentile
1032 /s
1100 /s
802 /s

95% Percentile
1075 /s
1126 /s
819 /s

99% Percentile
1147 /s
1140 /s
836 /s

99.9% Percentile
1149 /s
1144 /s
837 /s

99.99% Percentile
1149 /s
1144 /s
837 /s

Stop The World

% of time frozen
44.096 %
32.53 %
33.965 %

# per second
658.928 /s
757.986 /s
735.363 /s

Pause duration (Min / Avg / Max)
0 ms / 0.669 ms / 443.255 ms
0 ms / 0.429 ms / 544 ms
0 ms / 0.462 ms / 45.296 ms

50% Percentile
0.579 ms
0.212 ms
0.416 ms

90% Percentile
0.958 ms
0.314 ms
0.517 ms

95% Percentile
1.012 ms
0.355 ms
0.569 ms

99% Percentile
1.278 ms
1.187 ms
1.166 ms

99.9% Percentile
3.704 ms
6.21 ms
7.483 ms

99.99% Percentile
7.301 ms
508.731 ms
22.55 ms

@sgf Thank you for your benchmark results. It seems that ServerGC has made significant improvements compared to WorkstationGC. The 20% pause might be due to insufficient memory allocation, resulting in a longer pause. Once the GC adapts to the load, the pause time improves tenfold compared to WorkstationGC.

The improvement is not big enough, not radical enough. I hope that the ideal STW pause should be less than 5ms. And the memory within 256G can be easily controlled. Regardless of the number of objects, the STW time and frequency should not be affected.
Since my PC memory is limited, if you want to get the ideal results, you need to use a server for testing.
When developing large-scale Web sites or large-scale game servers, 48GB, 96GB, and 128GB are common memory.

Here is the information about .NET 9 Preview 6 running on a 32-core, 256GB server with 189GB of memory:

ServerGC

ServerGC + DATAs
Go only achieved a result of 126GB because it ran out of memory (OOM) at 189GB. Due to the lack of generational garbage collection and compaction in Go, the memory usage is significantly higher. For the 126GB test, it required 217GB of memory to complete.


BUG: Tippett’s and Pearson’s method for combine_pvalues are not monotonous

Describe your issue.
Something is wrong with the methods pearson and tippett for scipy.stats.combine_pvalues. They should be monotonically increasing with all components of the input, yet they are monotonically decreasing. At first glance, the output seems to be 1 − p when it should be p. It’s also straightforward to compute that Tippett’s method for an input of (½,½) should yield p = ¾ but it does not.
@rlucas7 IIUC, you should know best about this.
Reproducing Code Example
import numpy as np
from scipy.stats import combine_pvalues

n = 5
ps = np.linspace(0.1,0.9,5)

for method in ("pearson","tippett"):
	combined_ps = [
			combine_pvalues( np.full(n,p), method )[1]
			for p in ps
		]
	assert np.all( np.diff(combined_ps) >= 0 )

assert combine_pvalues([0.5,0.5],method="tippett") == 0.75

Error message
All assertions fail.
SciPy/NumPy/Python version information
1.6.3 1.19.5 sys.version_info(major=3, minor=9, micro=7, releaselevel='final', serial=0)

According to https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.combine_pvalues.html, the "meta"-p-value of Tippet's method is min(p_1, ..., p_N), Pearson's approach is -2 sum_i log(1-p_i), see e.g., Heard, N. and Rubin-Delanchey, P. “Choosing between methods of combining p-values.” Biometrika 105.1 (2018): 239-246.
Why do you think the p-value should be 0.75 if method='tippett`?

@chrisb83 What I learned as Tippet's defines meta-p-value as 1 - (1 - min(p_1, ..., p_N))^N. This is also the definition used by R's Tippet's Method Package, which cites the same 1931 book as the paper by Heard and Rubin-Delanchey.
Defined as above, the Tippet's meta-p-value is the probability of observing a minimum p-value among the N at least as small, assuming that the N p-values were generated iid from U(0, 1) (the uniform distribution with support [0 ,1]). It's possible that there were multiple methods discussed in Tippet's 1931 book, but I think it's more likely that this actually is a mistake.

Curiously, Heard and Rubin-Delanchy worked out that their version of Tippet's method is unsound, but didn't put together that they have had the incorrect formula.
From page 6 .

@Wrzlprmft thanks for pointing these out. I checked and your observation that SciPy’s Pearson p-value is actually 1 - p turns out to be correct. See for instance here.

clearly a bug
monotonicity in tippet goes in the wrong direction
Based on the example I guess the 1 - (1 - min(p_1, ..., p_N))^N transformation is the same as beta.cdf(min(pvalues), 1, n)
with cdf instead of sf as steppi pointed out.
1 - (1 - min(p_1, ..., p_N))^N  looks like the Sidak multiple testing correction to me applied to the smallest p-value

I think it's more likely that this actually is a mistake in Heard and Rubin-Delanchy's paper, since I don't think there's any good theoretical justification for taking the min of the p-values as the meta-p-value.

They don't do that, at least not skimming the definitions
min(pvalues) is the "test statistic", the actual p-value needs to come from the distribution of the test statistic, which is almost right in scipy except that's the complement, not left tail.
(based on a bit of fast skimming of small parts of articles)

They don't do that, at least not skimming the definitions
min(pvalues) is the "test statistic", the actual p-value needs to come from the distribution of the test statistic, which is almost right in scipy except that's the complement, not left tail.

You are correct. I skimmed too carelessly :)


Unable to retrieve the mime_type for file with Storage::download

Laravel Version: 9.8.1
PHP Version: 8.1.3
league/flysystem 3.0.16

Description:
$headers["Content-Type"] = "text/plain";
$headers["Content-Length"] = $file_size;
$headers["Accept-Ranges"] = "bytes";
$headers["Content-Disposition"] = "attachment; filename={$id}.left";
$headers["Content-Range"] = "bytes " . 0 . "-" . ($file_size) . "/" . $file_size;
Storage::disk("localdisk")->download($id.".found", $headers);

Results in the following error:
local.ERROR: Unable to retrieve the mime_type for file at location: 737.found.  {"exception":"[object] (League\\Flysystem\\UnableToRetrieveMetadata(code: 0): Unable to retrieve the mime_type for file at location: 737.found.  at /var/www/hostname/vendor/league/flysystem/src/UnableToRetrieveMetadata.php:49)

I believe this is caused by me having a non-standard extension, which is fine since I provided the content-type in the headers explicitly. But instead I'm getting errors now with my recent upgrade from laravel 8 to laravel 9. Any way to make this work?

I searched extensively but this is an almost undocumented error with very few people running into it (because everyone uses default file extensions). And to my knowledge there is nothing within laravel that can be changed to resolve this issue.
@driesvints

Please use the correct file extension for this.

What is the correct file extension for an arbitrary file for custom software? I believe there should be a default / settable fallback or optional way to specify non-standard file extensions and tie them to a known content-type. I believe I saw a commit on it a few days ago in the flysystem, but it didn't quite seem to work from what I can tell. (https://github.com/thephpleague/flysystem/commit/e8515341994dc2feb13a5723316ae521841eda0f)
For example csv, tsv, xml, json are all common filetypes that could also be .txt all the same.

@driesvints what is the 'correct file extension' for a custom file format?

same problem here we also use custom file formats and arent able to use them in storage because of this


MILO client not working with localhost OPCUA server. Using OPC2AAS repo.

I am trying to use Databridge functionality to connect Docker container with local opcua server running in my system. I followed all steps mentioned in this repo but still not able to connect to opcua server. It is trying to pick my system IP but showing errors
Repo: https://github.com/eclipse-basyx/basyx-applications/tree/main/opc2aas @FrankSchnicke
Please help me here.
Thank you in advance.

@aaronzi

Thank you for raising this issue. With local milo server you mean a server running outside of docker? Have you already verified that another OPC UA client can access the milo server? Also, is the server secured in any way?

Yes, I am using UAExpert to connect to OPCUA server running in my local window system and it is able to connect.

Thank you for the info. Is the DataBridge configuration autogenerated or did you manually add something to the opcuaconsumer.json? I am asking because the serverPort is not the OPC UA standard port (4840) and the pathToService is set to milo. Are you using milo on your local windows as OPC UA server?

Yes it was autogenerated but i added "Milo" manually

Ok, thank you for the info. You should remove the pathToService then. Could you try without that again and send me the log for the DataBridge if it still fails?

databridge.txt
databridge is not starting after removing pathToService

Sorry, I think my suggestion was not phrased in an optimal way. I actually meant to do it like this:
[
  {
    "uniqueId" : "source://Aliases/FindAliases/InputArguments",
    "serverUrl" : "host.docker.internal",
    "serverPort" : 4851,
    "pathToService" : "",
    "nodeInformation" : "i=23477",
    "requestPublishInterval" : 50
  }
]

Also what I noticed from your log is that you are using a timerconsumer. I would suggest to use event as trigger. This improves performance and in general works better. A route could look like this:
[
  {
    "datasource" : "source://Aliases/FindAliases/InputArguments",
    "transformers" : [ "dataValueToJson", "jsonataExtractValue" ],
    "datasinks" : [ "sink://sink/id" ],
    "trigger" : "event"
  }
]

Also make sure to remove the demo.txt file from the folder where you placed your DataBridge config. The log tells me there is this unrelated text file.

Okay, Thank you for your suggestions. I will try now..

databridge.txt
Seems like Java connector still not able to connect.

My guess would be that this is a DNS issue. The DataBridge is probably trying to reach the server by it's hostname which it can't find. What you could try is to use the IP address of the device your OPC server runs on instead of host.docker.internal.


Improve mock(_async)_callable & mock_constructor exceptions.

With #184  adding caller_frame_info to mock instances, we can now improve all exceptions that are raised by these mocks, ta all contain information regarding the file:lineno where the mock was defined.
This is a frequently asked feature by uses, which should simplify development significantly.

Hey @fornellas are you accepting new contributors, I would love to work on this project


feat(Examples): Change Project.md feature for MAX32655, MAX32665, and MAX32690

Description

BLE Examples: add feature to set advertising name through project.mk
BLE Examples: add feature to configure security though project.mk
BLE Examples: Allow user to select ME17 and ME14 chip version from project.mk and select PHY properly.

Can you add the advertising names update to otas and otac as well?

Can you add the advertising names update to otas and otac as well?

Done! I also synced these updates to ME17. Since I don't have the board for ME17, I didn't test it, but I think it should be good. Just copy and paste for these same updates.

/clang-format-run

Merged


[REQUEST] Skip connections / Residual blocks rendering

It would be awesome if some arrows would display skip connections like this:

Hand made example

Hi @ldeluigi I totally agree that this would be very useful. However, I would rather see this as part of a larger effort to include non-linear models. For example, there could also be downsampling convs on the skip connections, which visualkeras cannot show as of now. Feel free to participate in a PR if you'd like. There's also some starting code in an etra branch https://github.com/paulgavrikov/visualkeras/tree/non_sequential_layered_view


feat(rust): resolve forwarder project name in manager

Since project routes are not guaranteed to be stable this commit moves the resolution of project references to routes when creating a remote forwarder to the node manager. The command-line layer merely maps a project name to a project ID but leaves everything else to the node manager.
On top of https://github.com/build-trust/ockam/pull/3497.

@SanjoDeundiak: Could you review again please?


Sometime get wrong stage information

Describe the bug
A clear and concise description of what the bug is.
For now,<PHONE_NUMBER>(the day of 2019-03-02 18:00:00 in Beijing),
http://api.splatoon.terax235.me/schedules/current
your api get output:
"stage_b": {
            "name": "Skipper Pavilion",
            "id": 22,
            "image": "https://app.splatoon2.nintendo.net/images/stage/132327c819abf2bd44d0adc0f4a21aad9cc84bb2.png"
        },
        "rule": {
            "key": "turf_war",
            "name": "Turf War"
        },
        "game_mode": {
            "name": "Regular Battle",
            "key": "regular"
        },
        "stage_a": {
            "name": "Snapper Canal",
            "image": "https://app.splatoon2.nintendo.net/images/stage/8c95053b3043e163cbfaaf1ec1e5f3eb770e5e07.png",
            "id": 9
        },
        "end_time":<PHONE_NUMBER>,
        "id":<PHONE_NUMBER>923278000,
        "start_time":<PHONE_NUMBER>

But the true stages is starfish Mainstage and the reef.
Is it blamed to update too slow?
But why the time is right.
I can't find both stages in future hours status. It's weird.

Dude, do u plan to fix it ?
Sometime the http://api.splatoon.terax235.me/next_update return negative time value.
I'm going to use this api in my app. So, please let me know...

Ahh I see, I'll fix it as soon as possible.


try graphiz dev version

i think with these changes you can get rid of the baseline.xml from psalm :)
https://github.com/sensiolabs-de/deptrac/blob/master/baseline.xml


GPD Win Max 2 (2023/2024): hardware.graphics.package error.

Hi,
I've got a GPD Win Max 2 2024 (which should work with the 2023 profile), and the 24.05 compat doesn't appear to be taking effect for it.
The error trace I get is:
error:
       … while calling the 'seq' builtin

         at /nix/store/hkv63lvykwr520xf8yv2gcw3s78fjfpd-source/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

       … while calling the 'throw' builtin

         at /nix/store/hkv63lvykwr520xf8yv2gcw3s78fjfpd-source/lib/modules.nix:298:18:

          297|                     ''
          298|             else throw baseMsg
             |                  ^
          299|         else null;

       error: The option `hardware.graphics.package' does not exist. Definition values:
       - In `/nix/store/hkv63lvykwr520xf8yv2gcw3s78fjfpd-source/flake.nix':
           {
             _type = "if";
             condition = false;
             content = {
               _type = "if";
           ...

(You can find my config here)
Any ideas what's going on? I'm using the latest 24.05 Nixpkgs and latest nixos-hardware. I would rather stay on 24.05 for the main Nixpkgs.
Thanks!

I figured this out! It was a missing alias in the nixos-hardware compat shim. I've made a PR, and this issue should no longer be an issue for people building from the main branch of nixos-hardware.


Graph RAG

David, is RAG with graphs example in txtai essentially the same as what has been reported here?
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Thanks

Thank you for the question. I think both approaches are similar but I've looked at that article a couple times. It doesn't have a link to any reference implementation, which makes it difficult to do a comparison.

Closing this due to inactivity. Please re-open or open a new issue to continue the discussion.


Allow assignments from smaller string type to larger string type

What was wrong?
Semantic analysis for string is too strict.
let s: String<10> = "FOO"

should be accepted.

Codecov Report

Merging #663 (ec189e8) into master (e917dc3) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #663      +/-   ##
==========================================
+ Coverage   85.70%   85.78%   +0.08%
==========================================
  Files         100      100
  Lines        9029     9033       +4
==========================================
+ Hits         7738     7749      +11
+ Misses       1291     1284       -7

Impacted Files
Coverage Δ

crates/analyzer/src/traversal/expressions.rs
81.66% <100.00%> (+0.07%)
:arrow_up:

crates/analyzer/src/context.rs
65.25% <0.00%> (+0.84%)
:arrow_up:

crates/analyzer/src/namespace/types.rs
72.91% <0.00%> (+1.72%)
:arrow_up:

Continue to review full report at Codecov.

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


some help for correctly using JXInput

Hi,
I made a video game for PC with Java language under Eclipse. This game works fine with keyboard.
Now, I want to connect a XBOX360 to my game for improving the game quality. To do that, I want to use Xinput and your solution seems to be very pratical.
I follow your instructions but I think that I have not understood them very well. And I am stuck for 2 days on this problem. I do that:

I downloaded the packages from https://github.com/StrikerX3/JXInput
I put, in the right place, only two files:  the jxinput jar and the jxinput.dll (only). No native download ... OK?
I wrote small codes for using the JXinput API in my software (and solving the JXinput import problems). When I run it, on executing "XInputDevice[] devices = XInputDevice.getAllDevices();", the debugger raises this error "com.ivan.xinput.exceptions.XInputNotLoadedException: Native library failed to load
at com.ivan.xinput.XInputDevice.checkLibraryReady(XInputDevice.java:298)"

Your readme file says that it is necessary to download also " Visual C++ Redistributable Packages for Visual Studio 2015". I do that. What is the interest to use it if I write on Java codes?
And, as I have not Maven, I have to modify the pom.xml file. Which one among about the 10 pom.xlml under Eclipse?
Why it is necessary to get Visual C++, maven, .. for allowing to connect a PC with XBOX 360 through XInput?
Thank you very much for your help.
Note: Sorry about my poor english knowledge

Hello,
You need to use Maven to build JXInput. The generated .jar file will contain the DLLs in the proper location so that the library can extract and load them at runtime. Do not try to export JXInput as a .jar using Eclipse's Export to JAR option as the resulting file will not have the correct structure and will be unusable with your projects.
If you haven't disabled or uninstalled m2eclipse (an Eclipse plugin that adds Maven support), you should be able to do this:

If you already have JXInput loaded into Eclipse, delete it (but not from the hard disk!). Let's start from scratch
Import the XInputDevice_Java folder as a Maven Project:
Go to the File menu and select Import
Look for the Maven folder. Within it, select Existing Maven Projects, then click Next
Select the XInputDevice_Java folder (within the JXInput folder in your hard drive) for the Root Directory and click Finish
When the project is done importing, right-click it and select Run As > Maven Build
In the window that pops up, type install in the Goals field
Click Run. The console output should display the build process. If everything goes right, you should get BUILD SUCCESS
Right-click your game project and select Build Path > Configure Build Path
Remove any jxinput.jar or dll files you may have added there
On the right panel, go to the Projects tab and click Add...
Select the JXInput project and click OK on both windows
XInputDevice.isAvailable() should now return true

If you need to access the actual .jar, refresh the JXInput project after building it.  Note that you do not need to bundle the DLLs, as they are extracted automatically when you run the game.
If you say you have 10 pom.xml files, that means you probably have more than one Maven project loaded in Eclipse. You can distinguish between files by looking at their path -- they're listed as "pom.xml - <path in workspace>" in the Open Resource window (Ctrl+Shift+R), or you can just manually navigate to the projects. pom.xml files reside in the root folders of projects.
JXInput needs Visual C++ Redistributable Packages for Visual Studio 2015 installed because that's what was used to build the DLLs. Without it you may get an error saying that msvcr100.dll is missing, or something to that effect. JXInput makes use of the [Java Native Interface]
(https://en.wikipedia.org/wiki/Java_Native_Interface) to use XInput functionality needed to communicate with the Xbox controllers. The native layer was written in C++ using Visual Studio 2015, hence the requirement. Even though you're only writing Java code, this small portion of the code you cannot see does use C++ and the requirement applies to your project too.
You don't need Visual C++ or Visual Studio to use JXInput, unless you plan on making changes to the library itself. Your games can just use the .jar file without worrying about C++ or anything like that. Keep in mind that the game will still require the Visual C++ Redistributable Packages above (and so will your players).
Hope this helps!

Thank you very much for your information. I'll try to do that, as soon as possible
Pascal
----- Mail original -----
De: "Ivan Roberto de Oliveira"<EMAIL_ADDRESS>À: "StrikerX3/JXInput"<EMAIL_ADDRESS>Cc: "dutpas"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Envoyé: Lundi 13 Juin 2016 05:08:23
Objet: Re: [StrikerX3/JXInput] some help for correctly using JXInput (#11)
Hello,
You need to use Maven to build JXInput. The generated .jar file will contain the DLLs in the proper location so that the library can extract and load them at runtime. Do not try to export JXInput as a .jar using Eclipse's Export to JAR option as the resulting file will not have the correct structure and will be unusable with your projects.
If you haven't disabled or uninstalled m2eclipse (an Eclipse plugin that adds Maven support), you should be able to do this:
1. If you already have JXInput loaded into Eclipse, delete it (but not from the hard disk!). Let's start from scratch
2. Import the XInputDevice_Java folder as a Maven Project:
    1. Go to the File menu and select Import
    2. Look for the Maven folder. Within it, select Existing Maven Projects, then click Next
    3. Select the XInputDevice_Java folder (within the JXInput folder in your hard drive) for the Root Directory and click Finish
3. When the project is done importing, right-click it and select Run As > Maven Build
4. In the window that pops up, type install in the Goals field
5. Click Run. The console output should display the build process. If everything goes right, you should get BUILD SUCCESS
6. Right-click your game project and select Build Path > Configure Build Path
7. Remove any jxinput.jar or dll files you may have added there
8. On the right panel, go to the Projects tab and click Add...
9. Select the JXInput project and click OK on both windows
10. XInputDevice.isAvailable() should now return true

If you need to access the actual .jar, refresh the JXInput project after building it.  Note that you do not need to bundle the DLLs, as they are extracted automatically when you run the game.
If you say you have 10 pom.xml files, that means you probably have more than one Maven project loaded in Eclipse. You can distinguish between files by looking at their path -- they're listed as "pom.xml - " in the Open Resource window (Ctrl+Shift+R), or you can just manually navigate to the projects. pom.xml files reside in the root folders of projects.
JXInput needs Visual C++ Redistributable Packages for Visual Studio 2015 installed because that's what was used to build the DLLs. Without it you may get an error saying that msvcr100.dll is missing, or something to that effect. JXInput makes use of the Java Native Interface to use XInput functionality needed to communicate with the Xbox controllers. The native layer was written in C++ using Visual Studio 2015, hence the requirement. Even though you're only writing Java code, this small portion of the code you cannot see does use C++ and the requirement applies to your project too.
You don't need Visual C++ or Visual Studio to use JXInput, unless you plan on making changes to the library itself. Your games can just use the .jar file without worrying about C++ or anything like that. Keep in mind that the game will still require the Visual C++ Redistributable Packages above (and so will your players).
Hope this helps!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

Hi Ivan,
that's work fine. I got the console output:
"XInput 1.3 is available on this platform.
XInput 1.4 is available on this platform."
when I run:
XInputDevice[] devices = XInputDevice.getAllDevices();
		XInputDevice device = XInputDevice.getDeviceFor(0); // or devices[0]

		if (XInputDevice.isAvailable()) {
		    System.out.println("XInput 1.3 is available on this platform.");
		}

		if (XInputDevice14.isAvailable()) {
		    System.out.println("XInput 1.4 is available on this platform.");
		}

I can begin to connect a XBOX 360 joystick to my game.

Now, it is my turn to understand how to use these following notions (that work fine at the first test)
XInputComponents components = device.getComponents();
XInputButtons buttons= components.getButtons();
boolean bRight = buttons.right; // etc ....
XInputAxes axes = components.getAxes();
double xPos = axes.lx; // ou rawx ....
double yPos = axes.ly;
int dp = axes.dpad;
Do you know a good site explaining well these notions?
Because, I always get the following STEADY values:
dp: -1
xPos: -0.30999755859375
yPos: 0.638916015625
Regards and, still, thank you very much for your help
Pascal
----- Mail original -----
De: "Ivan Roberto de Oliveira"<EMAIL_ADDRESS>À: "StrikerX3/JXInput"<EMAIL_ADDRESS>Cc: "dutpas"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Envoyé: Lundi 13 Juin 2016 05:08:23
Objet: Re: [StrikerX3/JXInput] some help for correctly using JXInput (#11)
Hello,
You need to use Maven to build JXInput. The generated .jar file will contain the DLLs in the proper location so that the library can extract and load them at runtime. Do not try to export JXInput as a .jar using Eclipse's Export to JAR option as the resulting file will not have the correct structure and will be unusable with your projects.
If you haven't disabled or uninstalled m2eclipse (an Eclipse plugin that adds Maven support), you should be able to do this:
1. If you already have JXInput loaded into Eclipse, delete it (but not from the hard disk!). Let's start from scratch
2. Import the XInputDevice_Java folder as a Maven Project:
    1. Go to the File menu and select Import
    2. Look for the Maven folder. Within it, select Existing Maven Projects, then click Next
    3. Select the XInputDevice_Java folder (within the JXInput folder in your hard drive) for the Root Directory and click Finish
3. When the project is done importing, right-click it and select Run As > Maven Build
4. In the window that pops up, type install in the Goals field
5. Click Run. The console output should display the build process. If everything goes right, you should get BUILD SUCCESS
6. Right-click your game project and select Build Path > Configure Build Path
7. Remove any jxinput.jar or dll files you may have added there
8. On the right panel, go to the Projects tab and click Add...
9. Select the JXInput project and click OK on both windows
10. XInputDevice.isAvailable() should now return true

If you need to access the actual .jar, refresh the JXInput project after building it.  Note that you do not need to bundle the DLLs, as they are extracted automatically when you run the game.
If you say you have 10 pom.xml files, that means you probably have more than one Maven project loaded in Eclipse. You can distinguish between files by looking at their path -- they're listed as "pom.xml - " in the Open Resource window (Ctrl+Shift+R), or you can just manually navigate to the projects. pom.xml files reside in the root folders of projects.
JXInput needs Visual C++ Redistributable Packages for Visual Studio 2015 installed because that's what was used to build the DLLs. Without it you may get an error saying that msvcr100.dll is missing, or something to that effect. JXInput makes use of the Java Native Interface to use XInput functionality needed to communicate with the Xbox controllers. The native layer was written in C++ using Visual Studio 2015, hence the requirement. Even though you're only writing Java code, this small portion of the code you cannot see does use C++ and the requirement applies to your project too.
You don't need Visual C++ or Visual Studio to use JXInput, unless you plan on making changes to the library itself. Your games can just use the .jar file without worrying about C++ or anything like that. Keep in mind that the game will still require the Visual C++ Redistributable Packages above (and so will your players).
Hope this helps!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

You need to do device.poll() once every frame to read the controller input data, then you can use the values as you mentioned above. Polling must be performed per controller, so what you want to do is something like this in your game loop:
for (XInputDevice device : XInputDevice.getAllDevices() {
    if (device.poll()) {
        // controller is connected, implement your input handling logic here, e.g.:
        XInputComponents components = device.getComponents();
        XInputButtons buttons = components.getButtons();
        boolean bRight = buttons.right; // etc ....
        XInputAxes axes = components.getAxes();
        double xPos = axes.lx; // ou rawx ....
        double yPos = axes.ly;
        int dp = axes.dpad;

        // use device.getPlayerNum() if you need to know which player this device is associated with
    } else {
        // controller is not connected
        // in this situation games typically ask the player to reconnect the controller and pause if possible
    }
}

Components are just a logical grouping of all the input elements of an XInput controller. These include buttons (A, B, X, Y, start, back and others) and axes (sticks, triggers and the directional pad). If you need more information you can head over to the XInput documentation. Although the code examples are C++, the fundamentals are valid for JXInput.

Thank's a lot.
I can go ahead, now
Pascal
----- Mail original -----
De: "Ivan Roberto de Oliveira"<EMAIL_ADDRESS>À: "StrikerX3/JXInput"<EMAIL_ADDRESS>Cc: "dutpas"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Envoyé: Lundi 13 Juin 2016 18:42:02
Objet: Re: [StrikerX3/JXInput] some help for correctly using JXInput (#11)
You need to do device.poll() once every frame to read the controller input data, then you can use the values as you mentioned above. Polling must be performed per controller, so what you want to do is something like this in your game loop:
for ( XInputDevice device : XInputDevice . getAllDevices() { if (device . poll()) { // controller is connected, implement your input handling logic here, e.g.: XInputComponents components = device . getComponents(); XInputButtons buttons = components . getButtons(); boolean bRight = buttons . right; // etc .... XInputAxes axes = components . getAxes(); double xPos = axes . lx; // ou rawx .... double yPos = axes . ly; int dp = axes . dpad; // use device.getPlayerNum() if you need to know which player this device is associated with } else { // controller is not connected // in this situation games typically ask the player to reconnect the controller and pause if possible }
}
Components are just a logical grouping of all the input elements of an XInput controller. These include buttons (A, B, X, Y, start, back and others) and axes (sticks, triggers and the directional pad). If you need more information you can head over to the XInput documentation . Although the code examples are C++, the fundamentals are valid for JXInput.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

Great! I'm glad you could get it to work.

Hello Ivan,
Your classes work very fine: I mainly use Axes ans Buttons, and not Delta. Still thanks a lot.
I use XInputDevice.java against XInputDevice14.java.
In which case, XInputDevice14 could be used? Whereas XInputDevice works fine with my XBOX360 joystick, XInputDevice14 does not correctly work.
By reading the dpadFromButtons, I have noticed it seems there is a mistake:
"if (up) ", "if (left)", "if down", "if right"  should be replaced by "if u", "if l", "if d", "if r", respectively
Reason: when up and down is set at the same time, the action to do is ambiguous and should be annuled.
Same remark with left and right.
Do you agree?
Pascal

XInputDevice14 should be used only if you need the XInput 1.4 functionality, such as reading battery state or keyboard input. It also requires Windows 8 or higher.
Thanks for pointing out the issue with the dpadFromButtons method. I'll push a fix in a moment.

Hello,
I am very glad to use your package on my XBOX360. At this time, my development concerns a video game on PC. And, I intend to commercialize it in few months, if it is good enough. In this case, I'll contact you again for remunerating your help. About your driver, if you want to know how to correctly manage a stick for an object rotation (in other words, with accurate motion), I'll give you back it: after some attempts, I have found a good algorithm
But, my major aim is to commercialize this game on smartphones. To do that, I am adapting my PC game and, now, I am looking for a Java package that manages the phone accelerometer (like in Asphalt Nitro game). As you produce some drivers like JXinput, perhaps have you also produced a accelerometer as driver? Otherwise, do you know where I could find it?
Regards
Pascal
----- Mail original -----
De: "Ivan Roberto de Oliveira"<EMAIL_ADDRESS>À: "StrikerX3/JXInput"<EMAIL_ADDRESS>Cc: "dutpas"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Envoyé: Mercredi 22 Juin 2016 14:07:00
Objet: Re: [StrikerX3/JXInput] some help for correctly using JXInput (#11)
XInputDevice14 should be used only if you need the XInput 1.4 functionality, such as reading battery state or keyboard input. It also requires Windows 8 or higher.
Thanks for pointing out the issue with the dpadFromButtons method. I'll push a fix in a moment.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

Hello again Pascal, glad to hear back from you. I wish you success on your commercial release and please do send me a link to the game when it's released!
We can further discuss private matters through email. I'll send you an email from my personal account in a moment.
I'm curious about your rotation algorithm; you can create a gist or reply to my email if you wish to keep it private.
As for reading the acceleromoter on smartphones, I can guide you towards the standard APIs used on those platforms:

Android (sample)
iOS (sample)
Windows Phone 8+ (sample)
Apache Cordova (sample)
Xamarin (sample)
MonoGame.Framework can access the accelerometer and compass on Android and iOS

I believe most if not all game frameworks and engines that target smartphones will have some form of API for reading sensors, and they should not deviate too much from what you see above.

Hello Ivan,
Glad to read your information.
About the rotation algorithm, I'll post it in a gist, in few days
Regards
Pascal
----- Mail d'origine -----
De: Ivan Roberto de Oliveira<EMAIL_ADDRESS>À: StrikerX3/JXInput<EMAIL_ADDRESS>Cc: dutpas<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Envoyé: Sat, 13 Aug 2016 01:19:29 +0200 (CEST)
Objet: Re: [StrikerX3/JXInput] some help for correctly using JXInput (#11)
Hello again Pascal, glad to hear back from you. I wish you success on your commercial release and please do send me a link to the game when it's released!
We can further discuss private matters through email. I'll send you an email from my personal account in a moment.
I'm curious about your rotation algorithm; you can create a gist or reply to my email if you wish to keep it private.
As for reading the acceleromoter on smartphones, I can guide you towards the standard APIs used on those platforms:

Android (sample)
iOS (sample)
Windows Phone 8+ (sample)
Apache Cordova (sample)
Xamarin (sample)
MonoGame.Framework can access the accelerometer and compass on Android and iOS

I believe most if not all game frameworks and engines that target smartphones will have some form of API for reading sensors, and they should not deviate too much from what you see above.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/StrikerX3/JXInput/issues/11#issuecomment-239582400


'toAvro' does not work well in the presence of 'NamedType'

When implementing toAvro, sometimes you need to inspect the corresponding schema. However, if the original schema uses NamedType to reference other types (for example, in the implementation from HasAvroSchema), this is also what you get as argument. But at that point you have completely lost any context about what that NamedType is!
My suggestion is to make an invariant that toAvro is never called with a NamedType. The algorithm should ensure that any NamedType is resolved (or an error is issued if it cannot be found) before calling toAvro.

@serras It is likely a bug. We already have a functionality to "expand" the schema and to resolve all named types, we should indeed always call toAvro with the fully resolved schema.
I'll look into it when I have time.
An interesting question here is how we deal with recursive schemas... But I am sure that it can be handled.

@serras I have added a property test for this recursive schema:
{
  "type": "record",
  "name": "Recursive",
  "fields": [
    { "name": "index", "type": "int" },
    { "name": "tag", "type": ["null", "Recursive"] }
  ]
}

and for this mutually recursive schema:
{
  "type": "record",
  "name": "RecursiveA",
  "fields": [
    { "name": "index", "type": "int" },
    { "name": "recursiveB",
      "type": {
        "type": "record",
        "name": "RecursiveB",
        "fields": [
          { "name": "index", "type": "int"},
          { "name": "recursiveA", "type": ["null", "RecursiveA"] }
        ]
      }
    }
  ]
}

and it looks like at least generated code handles it well already.
The problem is maybe with manually defined ToAvro and HasAvroSchema?
If it is the case then it indicates that in this case instances should be implemented "smarter".
I think record helper function will have the same "problem" and can't be used in this case. We can provide a variant of record that resolves types internally (or "fix" the existing one), but it will have a performance impact because  it will do it for every single encode again and again... So it would be much better if ToAvro is implemented "smarter" in the first place...

Yes, this is for a manually defined HasAvroSchema instance. In fact, I had to be clever there to avoid infinite recursion.

I am closing this due to inactivity


How to get the contact form to work?

I love the theme, thanks for making it! Is there an easy way to make the contact form functional with my email?

It depends on how/where your site is hosted. If it is on github pages, you’ll need an extra form submission tool/service.
You can find some form submission tools on the official jekyll website: https://jekyllrb.com/resources/
There are some other hosting services which include a form submission tool like Netlify (https://netlify.com).
If you’re hosting on a service where you can run code on server side (like php) you could simply write your own script to process contact requests.

Great, thanks so much for the quick response!


ClusterRole and ClusterRoleBinding of kiali not namespace-isolated

Bug description
Cluster role and cluster role binding of kiali is not namespace-isolated. So that we can't install multiple istio-telemetry with kiali enabled. When I have installed a kiali in istio-telemetry and then install kiali in istio-telemetry-1, the previously one won't work.
Expected behavior
The two kiali work well simultaneously.
Steps to reproduce the bug

install kiali and mixer-telemetry in namespace istio-telemetry
install kiali and mixer-telemetry in namespace istio-telemetry-1
access kiali.istio-telemetry. you will see 403.

Version (include the output of istioctl version --remote and kubectl version and helm version if you used Helm)
1.3.6
How was Istio installed?
scripts in istio-installer, same as scripts in istio/manifests directory
Environment where bug was observed (cloud vendor, OS, etc)

fixed by #21754


change to profile desgin

change to profile design which will make it more user friendly.
🌝

new design working


Update DedicatedHost properties and add examples

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[y] I commit to follow the Breaking Change Policy of “no breaking changes
[y] I have reviewed the documentation for the workflow.
[y] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

[ ] Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

Adding new API(s)
Adding a new API version
Adding a new service

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in stable version
[ ] Removing properties in stable version
[ ] Removing API version(s) in stable version
[ ] Updating API in stable version with Breaking Change Validation errors
[ ] Updating API(s) in preview over 1 year

Please follow the link to find more details on PR review process.

/azp run automation - sdk

/azp run automation - sdk

Hi @dochung4 could you please resolve the Avocado error?

/azp run automation - sdk

Hi @dochung4 could you please resolve the Avocado error?

@ArcturusZhang , I tried to resolve the error, but it still fails. Do you know why, and is there an option to re-run the pipeline?
The error states that the example files that I added under 2020-09-30/examples are not referenced from the swagger file, but they are being referenced by compute.json under 2020-09-30. I double-checked and ensured that there are no typos.

/azp run

/azp run

@ArcturusZhang , thank you for re-running the pipeline, but it failed again. Is it possible that the reason is that compute.json under 2020-09-30 is not being recognized as a Swagger file? This appears to be the case, since there are no references to it in readme.md. If so, would it be fine to ignore the failure?

@dochung4 it is because 2020-09-30/compute.json is not referenced in the readme.md. Could you please introduce a new tag that contains the 2020-09-30/compute.json? Usually you need to duplicate the latest tag, rename it and replace the compute.json in it with this 2020-09-30/compute.json.

/azp run automation - sdk

/azp run automation - sdk

@dochung4 it is because 2020-09-30/compute.json is not referenced in the readme.md. Could you please introduce a new tag that contains the 2020-09-30/compute.json? Usually you need to duplicate the latest tag, rename it and replace the compute.json in it with this 2020-09-30/compute.json.

I tried that, and it fails with a different failure. I updated the PR to remove examples, since adding examples is not the main purpose of the PR. I will work on it separately.

Now avocado has passed. We can first ignore the breaking change CI, because I suppose this is not changing it to a stronger constraint, instead, this PR introduces a weaker constraint and it should not be a breaking change.
Let me ask the owner of the breaking change CI

Now avocado has passed. We can first ignore the breaking change CI, because I suppose this is not changing it to a stronger constraint, instead, this PR introduces a weaker constraint and it should not be a breaking change.
Let me ask the owner of the breaking change CI

Yeah I am not sure why it shows up as a breaking change. Thank you for checking!

Hi @dochung4 I confirmed with the owner of breaking change CI, it turns out that there is a bug in breaking change CI which makes it shows the wrong error message.
The right error message for this should be ConstraintIsWeaker which is also a breaking change unfortunately... You could check this rule here
Given that your PR is targeting the compute-09-01 branch, it is not very good to modify something in 2020-06-01 api-version, could you please split the changes for 2020-06-01 in another PR? We could deal the breaking changes in that PR.

/azp run automation - sdk

Hi @dochung4 I confirmed with the owner of breaking change CI, it turns out that I had some misunderstanding about breaking changes and there is a bug in breaking change CI which makes it shows the wrong error message.
The right error message for this should be ConstraintIsWeaker which is also a breaking change unfortunately... You could check this rule here
Given that your PR is targeting the compute-09-01 branch, it is not very good to modify something in 2020-06-01 api-version, could you please split the changes for 2020-06-01 in another PR? We could deal the breaking changes in that PR.

Okay sure. Done.

/azp run automation - sdk


Master node shares its delta to slaves

This should work, I hope...

Shouldn't this be merged into develop, and not master?

höhö yes :athletic_shoe:


AJ-1743 fix max value in WSM pact

The pact between WSM and WDS is failing.  I see the message "Expected [{"key":"key","value":"purpose"}, {"key":"value","value":"policy"}] to have maximum 1", so I'm hoping adjusting the minMaxArrayLikes to have a higher max will make a difference.
Reminder:
Releasing WDS
PRs merged into main will not automatically generate a PR in https://github.com/broadinstitute/terra-helmfile to update the WDS image deployed to kubernetes - this action will need to be triggered manually by running the following github action: https://github.com/DataBiosphere/terra-workspace-data-service/actions/workflows/tag-and-publish.yml. Dont forget to provide a Jira Id when triggering the manual action, if no Jira ID is provided the action will not fully succeed.
After you manually trigger the github action (and it completes with no errors), you must go to the terra-helmfile repo and verify that this generated a PR that merged successfully.
The terra-helmfile PR merge will then generate a PR in leonardo.  This will automerge if all tests pass, but if jenkins tests fail it will not; be sure to watch it to ensure it merges. To trigger jenkins retest simply comment on PR with "jenkins retest".
Keeping Docs Up To Date
If you make changes to the github actions or workflows, particularly when they are run or which other workflows they call, please update the GHA wiki page to stay up to date.

Expected [{"key":"key","value":"purpose"}, {"key":"value","value":"policy"}] to have maximum 1"

It's not the length requirement that's incorrect, it's the content of that array.
That should be [{"key":"purpose","value":"policy"}]

That was my first thought, but then I convinced myself that it was just representing it a weird way, but you're probably right.

Expected [{"key":"key","value":"purpose"}, {"key":"value","value":"policy"}] to have maximum 1

It's not the length requirement that's incorrect, it's the content of that array.
It should be [{"key":"purpose","value":"policy"}]

@nawatts Huh I thought I updated it to do that but now I'm getting the error "ERROR au.com.dius.pact.consumer.BaseMockServer$Companion -- PartialRequestMatch: a request to create a snapshot reference:
Expected a Map with keys [purpose] but received one with keys [key, value]".  I'm very confused.  @jladieu you know about the PactDSL can you help?

PartialRequestMatch: a request to create a snapshot reference:
Expected a Map with keys [purpose] but received one with keys [key, value]

Ok, sounds like the expectation is incorrect now. The expected keys are "key" and "value".

Still confused.  Is this expectation coming from WSM?  Do we need to update pact verification there?  Except that it's failing at the unit test stage, which presumably is before we contact WSM at all?

After further investigation, it looks like the issue is on the WSM side in the mock response
https://github.com/DataBiosphere/terra-workspace-manager/pull/1708

The problem was on the WSM side.


IHaskell notebook fails to create a virtualenv with Python 3.4

The problem appears to be fixed by changing installation/virtualenv.sh to grab a newer version.
VIRTUALENV=virtualenv-1.11.6

This is the error before:
Creating a virtualenv.
Failed to import the site module
Traceback (most recent call last):
  File "/home/sarah/.ihaskell/ipython/lib/python3.4/site.py", line 67, in <module>
    import os
  File "/home/sarah/.ihaskell/ipython/lib/python3.4/os.py", line 614, in <module>
    from _collections_abc import MutableMapping
ImportError: No module named '_collections_abc'
Using base prefix '/usr'
New python executable in /home/sarah/.ihaskell/ipython/bin/python
ERROR: The executable /home/sarah/.ihaskell/ipython/bin/python is not functioning
ERROR: It thinks sys.prefix is '/tmp/tmpThreadId425115/virtualenv-1.9.1' (should be '/home/sarah/.ihaskell/ipython')
ERROR: virtualenv is not compatible with this system or executable
IHaskell:
Ran commands:
mkdir -p /home/sarah/.ihaskell
mkdir -p /home/sarah/.ihaskell/ipython
withTmpDir
rm -f /tmp/tmpThreadId425115
mkdir /tmp/tmpThreadId425115
cd /tmp/tmpThreadId425115
bash /home/sarah/scratch/ihaskell/IHaskell/.cabal-sandbox/share/x86_64-linux-ghc-7.8.3/ihaskell-<IP_ADDRESS>/installation/virtualenv.sh /home/sarah/.ihaskell/ipython
which bash
rm -rf /tmp/tmpThreadId425115

Exception: error running: bash /home/sarah/scratch/ihaskell/IHaskell/.cabal-sandbox/share/x86_64-linux-ghc-7.8.3/ihaskell-<IP_ADDRESS>/installation/virtualenv.sh /home/sarah/.ihaskell/ipython
exit status: 1003.4
stderr:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1957k  100 1957k    0     0   697k      0  0:00:02  0:00:02 --:--:--  697k
Failed to import the site module
Traceback (most recent call last):
  File "/home/sarah/.ihaskell/ipython/lib/python3.4/site.py", line 67, in <module>
    import os
  File "/home/sarah/.ihaskell/ipython/lib/python3.4/os.py", line 614, in <module>
    from _collections_abc import MutableMapping
ImportError: No module named '_collections_abc'

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4330332-ihaskell-notebook-fails-to-create-a-virtualenv-with-python-3-4?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332399&utm_medium=issues&utm_source=github).

We no longer use virtualenv, so this is not an issue. Installation has been simplified in master.


error: cannot build manifest: failed inspect image: exit status 125, stderr ... acquiring lock 0 for container 9e0ee552... file exists

Following instructions from here: https://docs.fedoraproject.org/en-US/bootc/qemu-and-libvirt/
this is docker file:
FROM quay.io/centos-bootc/centos-bootc:stream9
RUN touch /etc/file.txt

this is build script:
podman build -t bootcentos .

Description: CentOS Stream 9
podman version 5.2.2
no docker installed
The error I get is the following:
[joe@centoshost bootc-vms]$ ./build.sh
STEP 1/2: FROM quay.io/centos-bootc/centos-bootc:stream9
STEP 2/2: RUN touch /etc/file.txt
--> Using cache 8cc6c6d06305cb1e5d684f8e9523514d38c7faa7ab46d1d07e6e97b5ef56805b
COMMIT bootcentos
--> 8cc6c6d06305
Successfully tagged localhost/bootcentos:latest
8cc6c6d06305cb1e5d684f8e9523514d38c7faa7ab46d1d07e6e97b5ef56805b
[sudo] password for joe:
Generating manifest manifest-qcow2.json
2024/09/11 22:29:59 error: cannot build manifest: failed inspect image: exit status 125, stderr:
time="2024-09-11T22:29:59Z" level=error msg="Refreshing container 17918797ec96d531f09db3fa7d26b237bc143e4f4e2f3ae4442be7c7af1afdba: acquiring lock 0 for container 17918797ec96d531f09db3fa7d26b237bc143e4f4e2f3ae4442be7c7af1afdba: file exists"
time="2024-09-11T22:29:59Z" level=error msg="Refreshing volume 5e9d4ded1e7ed3e10e29b65915769805368e92653e03ee91d7f44f108deabb32: acquiring lock 1 for volume 5e9d4ded1e7ed3e10e29b65915769805368e92653e03ee91d7f44f108deabb32: file exists"
time="2024-09-11T22:29:59Z" level=error msg="Refreshing volume 10abb114ca3486a9918ca1ac44068d02737f4e851976e26997227a743c7b9713: acquiring lock 2 for volume 10abb114ca3486a9918ca1ac44068d02737f4e851976e26997227a743c7b9713: file exists"
Error: localhost/bootcentos:latest: image not known

EDIT1: podman system reset did not help the problem
EDIT2: I tried the exact same thing on another centos9 machine and got a similar error but nothing about the Refreshing volume 3 times:
Trying to pull quay.io/centos-bootc/bootc-image-builder:latest...
Getting image source signatures
Copying blob d907935a8234 done   |
Copying blob d7daee9cdb60 done   |
Copying blob 999c1dd2d0b8 done   |
Copying config f64402d336 done   |
Writing manifest to image destination
Generating manifest manifest-qcow2.json
2024/09/12 00:00:50 error: cannot build manifest: failed inspect image: exit status 125, stderr:
Error: localhost/bootcentos:latest: image not known
[joe@centosmain bootc-vms]$ podman --version
podman version 5.2.2
[joe@centosmain bootc-vms]$ podman images
REPOSITORY                         TAG         IMAGE ID      CREATED        SIZE
localhost/bootcentos               latest      ac975cbdafb2  3 minutes ago  1.52 GB
quay.io/centos-bootc/centos-bootc  stream9     f64ef032ddac  18 hours ago   1.52 GB

EDIT3: when I tried it the second time, I got the rest of the error.
Generating manifest manifest-qcow2.json
2024/09/12 00:06:18 error: cannot build manifest: failed inspect image: exit status 125, stderr:
time="2024-09-12T00:06:18Z" level=error msg="Refreshing container d0050cb416a5a5330081c076479d1c87a6492135226fe0cdbd2dfc7beff2fc53: acquiring lock 0 for container d0050cb416a5a5330081c076479d1c87a6492135226fe0cdbd2dfc7beff2fc53: file exists"
time="2024-09-12T00:06:18Z" level=error msg="Refreshing volume e41656ab0485b922450f80da38bf66c6e0e97e712bffb57c733592b778506032: acquiring lock 1 for volume e41656ab0485b922450f80da38bf66c6e0e97e712bffb57c733592b778506032: file exists"
time="2024-09-12T00:06:18Z" level=error msg="Refreshing volume 397d10b2974c8dcd2cf0dfb634cd463a4f2c084b6d1ac6fc1416ae281c5eccb3: acquiring lock 2 for volume 397d10b2974c8dcd2cf0dfb634cd463a4f2c084b6d1ac6fc1416ae281c5eccb3: file exists"
Error: localhost/bootcentos:latest: image not known

I was creating the image as my account: podman build -t bootcentos
but trying to search for it as root: sudo podman run ...
instead running: sudo podman build -t bootcentos
fixed it


Support

I would like to be able to open ncml files that contains Enums as defined by .
I'm willing to contribute to xncml and will submit a PR in the near future.
Related issue #21

Completed with #60


Add helper function for multiband arrays

Add a helper function to help assert_image in raster tester test multi-band rasters. The rasters need to be transposed and the data needs to be bytescaled when plotted with ep.plot_rgb. The bytescale is done within ep.plot_rgb, and the transpotition is done by matplotlib. The current fix is to transform the example data using es.bytescale(threebandimage).transpose([1, 2, 0]). This could be added into a helper function to help with the assertion in assert_image. @lwasser

@lwasser we've decided against this in favor of using the axis object in conjunction with the new get_images() function merged here: https://github.com/earthlab/matplotcheck/pull/193 . This can be closed unless we decide further functionality is needed.


Document versioning approach

Release end of sprint, but can easily change.
Follow SEMVER, but with that breaking changes extra
Need to be bringing it into sprint planning/PI planning our major breaking changes
Need to communicate the regular releases (e.g. say 12 months) and how frequent and give people notice (give people the next tag)

We have this page ( https://design.sis.gov.uk/get-started/releases-versions) which I'm assuming closes the ticket - unless there is more required?


Probably wrong dependency management

Please check this gist(vagga.yaml is at the bottom, github decided to sort them):
https://gist.github.com/lilianmoraru/b904d6d68f8cc59fd2db
Observe that in linux-versions.yaml it uses container install_dep and in configs.yaml, containers qmake_[release/debug] also use install_dep. qmake_[release/debug] set an environment variable differently. This makes build-[release/debug] create 2 different containers and installs all the software all over again(I should also mention that for some reason these environment variables don't propagate down to the commands).
This issue could be harder to manage(probably needed a State Machine for that to manage all the cases). At the same time, is this to be expected? Should changing an environment variable be considered harmful, in the sense that it could change the way the package-manager installs the software?

I've only skimmed the config. But it seems you get environ wrong. It changes environment at runtime rather than container build time. You need !Env for changing build environment.
However, I'm not sure whether environ is merged from !SubConfig (probably not, just like volumes and other things, except setup). I think in many cases I want environ to clearly show what environment is. If you want to build it from multiple things, you may probably append lines to /etc/environment and use environ-file.

I changed to !Env but it doesn't save me from 2 copies of the crates.
Also, moving !Env under !SubConfig made the container rebuild all over again. My guess is that vagga remembers the modification timestamp of the file or the hash which I think is appropriate for tools like Make because they work with many files but here the tool could work based on properties changes for the files with different timestamps.
Just letting you know... I can find work-arounds...

Is this one still actual?

@tailhook I have to go to work and cannot check right now but I don't think anything changed here.
The issue is that you have a container(c1) that does - !Install [something] and nothing else, it just runs apt-get install -y(on Ubuntu) and another container(c2) which just exports an environment variable.
If you use both with !SubConfigs in container c3 and you change the environment variable in c2, it will rebuild. It does not do analysis like that(only apt-get install -y is run and there is no !Sh or anything like that? Ok, then changing an environment variable does not affect the only command running here which is !Install).
That of course if the environment variable cannot change the behavior of apt-get.
This of course needs deeper analysis and has to understand how the package manager of every Linux image used is working...
I'd say close it.


[AWS CLI] Have an option to not include the AWS Toolkit extension.

The AWS toolkit extension adds about 2.5 seconds to startup and I don't use it.
I've uninstalled it countless times.
I'm using an image from Dockerhub that I built with the devcontainer CLI but it still picks up the extension when in a devcontainer. That is awesome but it made it hard to figure out why it kept getting installed.

It would be nice if this was more "opt-in" than "opt-out", but vscode does let you specify extensions you want to opt out of in your devcontainer config by prefixing its name with "-".
Ex.
"customizations": {
	"vscode": {
		"extensions": [
			"-AmazonWebServices.aws-toolkit-vscode",
		]
	}
}

Thats actually really nice.


ntp service errors

ntp service does not exist under Ubuntu 22.04, so this call logs exceptions. From what I can tell, the equivalent service in ubuntu 22.04 handles ntp sync on internet connection automatically. This output should probably be captured and logged in an exception.
https://github.com/OpenVoiceOS/ovos_utils/blob/4ff31021d9c52860cd71a7cdbde516cd233ee4c2/ovos_utils/system.py#L54
From the logs:
Failed to stop ntp.service: Interactive authentication required.
See system logs and 'systemctl status ntp.service' for details.
/bin/sh: 1: ntpd: not found
Failed to start ntp.service: Interactive authentication required.
See system logs and 'systemctl status ntp.service' for details.

can be fixed with this PR I think

This is fixed as of these commits
https://github.com/OpenVoiceOS/ovos-PHAL-plugin-system/commit/165930ad170252420a311689a94be1e70e44764c
https://github.com/OpenVoiceOS/ovos-utils/commit/59a7b4a9287c3366ba329fdd9aacd73cf7e88e45
https://github.com/OpenVoiceOS/ovos-plugin-manager/commit/8619ac60ac6ef703bc1c84716a4229798e66a6fa
@NeonDaniel please verify