Create ExecutionContext to keep track of which plugin is currently on the execution path

Description
This PR creates a new part of the ThreadContext called ExecutionContext that is intended to hold an identifier to the plugin that is currently executing code. Ideally, this class is not exposed to plugins and is populated before the core defers execution to a plugin when handling an API request and is cleared upon returning back to the core.
Related Issues
Related to: https://github.com/opensearch-project/security/issues/4208
Check List

[X] Functionality includes testing.
[X] API changes companion pull request created, if applicable.
[X] Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@cwperks I have tons of questions regarding this change, it seems the scope of the change is to propagate the caller identity, is that right? If yes, we should:

make it a first class citizen of the ThreadContext, not limited to REST actions (support extensions, general thread pool scheduling, ...)
design it as a chain of callers instead, fe Plugin A -> Plugin B -> ... since in many cases plugin could call another plugin or extension

The way it is implemented now makes the  ThreadContext mutable since anyone could just call ThreadContext::setExecutionContextany time, anywhere. Also, we have to think about propagating caller chains between plugin and extensions, theThreadLocal` won't work there

@reta Thanks for the review! I raised this PR to solicit comments just like what you raised.
You are right, that the ultimate goal is to keep track of which plugin is currently on the execution path and to create a generic mechanism to do that. This PR shows the use of the proxy pattern to show how it can keep track for RestHandler, but it doesn't cover other extension points. On my fork I created a proxy for ActionPlugin which shows how other extension points can be wrapped similarly to what is done in this PR.
FYI with this change execution context is immutable and follows the same pattern as the rest of the ThreadContext. If the execution context is already set, trying to override it will throw an IllegalArgumentException similar to ThreadContext.putSingleHeader.
The only instance I am aware of for plugin chaining is Job Scheduler like this example where GeoSpatial uses the JS LockService when creating a datasource via Rest API. What are some other examples of plugin chaining?

Thanks @cwperks

This PR shows the use of the proxy pattern to show how it can keep track for RestHandler, but it doesn't cover other extension points.

I think this is not a point, right? The problem is much wider than that.

FYI with this change execution context is immutable and follows the same pattern as the rest of the ThreadContext. If the execution context is already set, trying to override it will throw an IllegalArgumentException similar to ThreadContext.putSingleHeader.

No, it is not immutable, it could be changed  any time, anywhere:
ThreadContext::clearExecutionContext();
ThreadContext::setExecutionContext("whatever I want here");

I think this is not a point, right? The problem is much wider than that.

It is, but RestHandlers are a good area to start to demonstrate this change since that is where most plugin system interaction takes place. If we can address all extension points at once, that would be my preference but the scope of the change is much larger.

No, it is not immutable, it could be changed any time, anywhere:

My bad, in a previous iteration I had those methods as package-private. Will update this to note expose these to plugins.

@cwperks could you may be start with the issue first to describe what we would like to capture, why and under which circumstances?  We could collect possible implementation options there and get feedback. Thank you.

@reta here is the issue I promised: https://github.com/opensearch-project/OpenSearch/issues/14733

@reta FYI in case you are curious, I opened a draft PR in the security repo that demonstrates how the changes in this PR are intended to be used: https://github.com/opensearch-project/security/pull/4570
Let me know your thoughts.

@reta FYI in case you are curious, I opened a draft PR in the security repo that demonstrates how the changes in this PR are intended to be used: opensearch-project/security#4570

Thanks @cwperks , I will try to get back to the issue shortly and share some ideas, have difficulties with time right now, sorry about that

I would love a solution that is a viable alternative for plugins to have a clean access model even if they don't fix the fundamental access exposed to the thread context and root node client as those are fundamental breaking changes to the plugin APIs.

I think this would need to be addressed to solve the issue completely. How would a plugin be prevented from doing anything if it has access to the threadPool and root node client?

How would a plugin be prevented from doing anything if it has access to the threadPool and root node client?

Why they should have access to threadPool and node client by default? We do have clear means to solve that

@peternied @reta Curious to get your thoughts on this now. This creates a higher-level class, called PluginContextSwitcher that plugins can use to switch contexts. This adds contextSwitcher as a protected member of the Plugin class and it gets initialized in Node.java via PluginService.initializePlugins(...). Every plugin, regardless if its an actionPlugin or otherwise, will get this class initialized.
Once we determine what the API looks like for plugins to switch contexts, I plan to create a PR to put stashContext behind a JSM permission similar to what we did with the other stashAndMergeHeaders and stashWithOrigin methods. PR for reference: https://github.com/opensearch-project/OpenSearch/pull/15039

@peternied @reta Curious to get your thoughts on this now.

Thanks @cwperks , I do have a few questions regarding the change in general: leaving thread management specifics aside, what exact problem we are trying to solve? May be more elaborate question(s) would be:

why plugin(s) should have a explicit knowledge about thread context?
under which circumstances plugin(s) need to manipulate thread context directly?

From https://github.com/opensearch-project/OpenSearch/issues/14931 (and related discussion), my understanding is that those changes are driven by security plugin needs to manage access to system index etc. I would suggest to think about the design of this feature in terms of plugin identity and impersonation, not low level thread context manipulation.
@peternied curious what do you think? thank you

what exact problem we are trying to solve?

Its currently possible for pluginA perform destructive transport actions on pluginB's system index. i.e. pluginA can delete pluginB's system index. The goal is stronger isolation.

why plugin(s) should have a explicit knowledge about thread context?

This is a big question and let me try to answer current state vs future state. Ideally, they should not and this PR introduces a higher-level class (in this case PluginContextSwitcher) which leaves the implementation to this class.
There are a few cases that plugins currently rely on for the ThreadContext:
Current State

Scheduled Job Security - Plugins that have scheduled jobs will read the user info from the ThreadContext when creating a scheduled job and persist the user in the job's metadata index. <- This is also an area I'd like to change in the future to centrally store identities in an index managed by the security plugin. Related RFCs: 1) https://github.com/opensearch-project/security/issues/2905, 2) https://github.com/opensearch-project/security/issues/4009
Resource Authorization - This is applicable to ML-Commons and Anomaly Detection (it may be applicable to others as well). These plugins read the user from the ThreadContext on resource creation and store the resource user in an index that holds the metadata for the resources. Examples of resources are Model Groups or Anomaly Detectors. For these use cases, authorization happens in the ML Commons or Anomaly Detection plugins and you can read the public documentation on that here: https://github.com/opensearch-project/documentation-website/blob/main/_ml-commons-plugin/model-access-control.md

For this use-case there's another proposal being discussed here on a path to using the Security plugin for resource authorization: https://github.com/opensearch-project/security/issues/4500

There may be other cases where plugins use the ThreadContext as a vehicle for carrying info.

There may be other cases where plugins use the ThreadContext as a vehicle for carrying info.

I think this is a key to the problem: it is low level mechanism to carry over the necessary info but in my opinion, it does not deserve any exposure, like dedicated public APIs (that we have to support).

That's the idea in this PR with creating a higher-level class to "switch context" for plugins.

I don't think any plugin developers would think in terms of context switching. Rather, plugins may use the identify mechanism to try execute/impersonate certain action under user / system / plugin  identities.

I don't think any plugin developers would think in terms of context switching. Rather, plugins may use the identify mechanism to try execute/impersonate certain action under user / system / plugin identities.

How about the idea of 2 separate node clients? One for executing transport actions in the context of the authenticated user, and the other for executing transport actions in the plugin system context (for index operations involving system indices).
I just pushed a commit to explore @peternied's idea here, but without an explicit call to activate. By using the pluginNodeClient it would automatically run transport actions in the context of the plugin invoking the action.

@cwperks @reta Great back and forth - thanks for the dialog.
By framing the problem in terms of the client plugin devs are using to perform actions - I think this creates an easier mental model than knowing what side effects are in play.  As mentioned by @cwperks using a pluginClient vs userClient it is clear to developers how to get the desired result. I like this kind of approach.

@reta @peternied I'm not trying to put the cart before the horse, but I wanted to share a META issue I created in the opensearch-plugin repo related to this change: https://github.com/opensearch-project/opensearch-plugins/issues/238
@reta Hopefully that META clearly outlines the rationale behind this change and what the next steps would be if this approach were to be taken. Please comment on that linked issue with any particular concerns. I'm trying to identify if there are cases where plugins need to perform transport actions in the system context where the transport actions are actions that do not involve system indices.

@reta @peternied I'm not trying to put the cart before the horse, but I wanted to share a META issue I created in the opensearch-plugin repo related to this change that describes what the next steps would be: opensearch-project/opensearch-plugins#238

Thanks @cwperks , I will try to look at this pull request shortly, sorry about the delay

the approach with specialized classes like node client etc is not scalable and also easy to circumvent

Curious why you think its not scalable. There would only be 2 different node clients that are meant to be used in different scenarios: 1) node client that executes transport actions in the context of the authenticated user and 2) the pluginNodeClient that is meant to be utilized by plugins that have system indices and is used for transport actions that interact with those system indices.This is a similar pattern done in other places in the OpenSearch ecosystem already where there are 2 clients. Here's one example I encountered last week in ISM where there is a REST client configured with basic auth and one with admin cert: https://github.com/opensearch-project/index-management/pull/1222. The client configured with the admin cert is referred to as the adminClient.
I agree on the circumvention via spawning a child thread, but as discussed above changing that would introduce quite a bit of risk since many plugins may rely on spawning threads. Should I file an issue for discussion about how to enforce that plugins spawn threads using a mechanism that maintains the parent context (i.e. transportService.getThreadPool().generic().submit(thread).get();).

Added CHANGELOG entry

@peternied See the SystemIndexTests test suite in the companion PR in the security plugin here: https://github.com/opensearch-project/security/pull/4665
This PR is very generic and introduces the extension points needed for the IdentityPlugin to provide an implementation.

Especially look at the ContextProvidingPluginSubject: https://github.com/opensearch-project/security/pull/4665/files#diff-915de36f9b99211ccc638572cc14dbf9969e38317ec49c5f64261cc101e7dd83
This would be the implementation of PluginSubject that the Security plugin provides and it injects a special pluginUser into the threadContext so that we can re-use the existing security authz implementation for this special pluginUser.

@peternied The end-to-end tests for this particular change are here: https://github.com/opensearch-project/OpenSearch/blob/4b8c7bd706c37f6c874d5512882779fcc49ed2e3/server/src/test/java/org/opensearch/identity/noop/NoopPluginSubjectTests.java
In the NoopIdentityPlugin, it will assign a NoopPluginSubject to IdentityAwarePlugins. When using NoopPluginSubject.runAs(() -> { ... }) it runs the Callable within a block where the ThreadContext is stashed which is the same behavior plugins use today so its a direct replacement to try (ThreadContext.StoredContext ctx = threadContext.stashContext()) { ... }.
By itself, this PR is not very interesting, but what the changes in this PR enable the Security plugin (the IdentityPlugin) to define an implementation for PluginSubject. If you look at the companion PR, the Security implementation of PluginSubject injects a pluginUser into the ThreadContext so that we can start using the existing security authz mechanisms to gate way plugins can do within the runAs block.

Resolved conflict in CHANGELOG

The Gradle check should be fixed by https://github.com/opensearch-project/OpenSearch/pull/15352, sorry about that @cwperks

np, thank you @reta! I was scratching my head to figure out why the tests were failing because the only commit I pushed since approval was a change to a variable name pluginSystemSubject -> pluginSubject

@reta @peternied I opened a related PR that I was planning to open after this one: https://github.com/opensearch-project/OpenSearch/pull/15430
As part of the review of this PR, the new functionality is part of IdentityPlugin which is behind a FeatureFlag. I opened up this PR as a step to removing the Identity feature flag. I am planning to remove the feature flag while keeping the IdentityPlugin interface marked as @experimental to signal that the interface can change between minor versions.

@reta @peternied I opened a related PR that I was planning to open after this one: #15430

@peternied I would definitely need your help here with doing the right thing. The underlying (and fundamental) problem is to have the control over what plugins / extensions can or cannot do depending on the identity of the caller at runtime. The security policy (Java) that we have now cannot cover such flows so the IdentityPlugin  (and related APIs) seemed t be a natural fit towards tackling the problem.
What think we should not do, is to introduce "specialized" APIs for different components (like pluginClient fe) - it introduces multiverse of similar components that behaves slightly differently and are supposed to be called in specific context. It is very difficult to maintain and also make sure proper wirings without a loopholes.

What I think we should not do, is to introduce "specialized" APIs for different components (like pluginClient fe) - it introduces multiverse of similar components that behaves slightly differently and are supposed to be called in specific context. It is very difficult to maintain and also difficult to make sure proper component wirings without a loopholes.

@reta I hear you - this is complex.  The reason why I single out the node client, this is the primary permissions boundary that plugin developers have been working around.  Are there any other systems that you think we should be guarding that I am not including?

Are there any other systems that you think we should be guarding that I am not including?

Extensions come to mind first, plus the core itself that uses node client (and this code could be called by plugin or/and extension indirectly causing the non-intended API calls).

Reverted the change to ActionRequest and AbstractClient and resolved conflicts in CHANGELOG.md


cargo package fails when binary crate depends on library crate

I have a simple project with a library crate and an executable crate that depends on the library crate:
#Cargo.toml

[package]

name = "borked"
version = "0.0.1"

[lib]

name = "borked"
path = "lib.rs"

[[bin]]

name = "borked-exe"
path = "main.rs"

// lib.rs

#![crate_name="borked"]
#![crate_type = "lib"]

pub const X : u32 = 42;

// main.rs

#![crate_name="borked-exe"]
#![crate_type = "bin"]

extern crate borked;

pub fn main() {
    println!("{}", borked::X);
}

I expect to be able to call cargo package successfully on this project, but instead I get an error:
$ cargo --version
cargo 0.0.1-pre-nightly (e4f0662 2015-03-09) (built 2015-03-09)
$ rustc --version
rustc 1.0.0-nightly (12b846ab8 2015-03-09) (built 2015-03-09)
$ cargo package --verbose
warning: manifest has no documentation, homepage or repository. See http://doc.crates.io/manifest.html#package-metadata for more info.
   Packaging borked v0.0.1 (file:///Users/dwrensha/Desktop/test-cargo)
   Archiving Cargo.toml
   Archiving lib.rs
   Archiving main.rs
   Verifying borked v0.0.1 (file:///Users/dwrensha/Desktop/test-cargo)
   Compiling borked v0.0.1 (file:///Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1)
     Running `rustc target/package/borked-0.0.1/lib.rs --crate-name borked --crate-type lib -g -C metadata=dd0cc381a16f4c06 -C extra-filename=-dd0cc381a16f4c06 --out-dir /Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug --emit=dep-info,link -L dependency=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug -L dependency=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug/deps`
     Running `rustc target/package/borked-0.0.1/main.rs --crate-name borked-exe --crate-type bin -g --out-dir /Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug --emit=dep-info,link -L dependency=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug -L dependency=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug/deps --extern borked=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug/libborked-10dfc3af5b511e89.rlib`
error: extern location for borked does not exist: /Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug/libborked-10dfc3af5b511e89.rlib
target/package/borked-0.0.1/main.rs:6:1: 6:21 error: can't find crate for `borked`
target/package/borked-0.0.1/main.rs:6 extern crate borked;
                                      ^~~~~~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
failed to verify package tarball

Caused by:
  Could not compile `borked`.

Caused by:
  Process didn't exit successfully: `rustc target/package/borked-0.0.1/main.rs --crate-name borked-exe --crate-type bin -g --out-dir /Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug --emit=dep-info,link -L dependency=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug -L dependency=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug/deps --extern borked=/Users/dwrensha/Desktop/test-cargo/target/package/borked-0.0.1/target/debug/libborked-10dfc3af5b511e89.rlib` (exit code: 101)

Same. This is blocking me from publishing new versions of my crates.

For now you can work around this by passing --no-verify, I'm working on a fix though.


Add fields to configure notification using Slack in the examples of wait-approval

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes part of #2342
Does this PR introduce a user-facing change?:

NONE

Should add links to the above added examples to this docs too
https://github.com/pipe-cd/pipe/blob/master/docs/content/en/docs/examples/_index.md

Great job! Thank you.
/lgtm

🚀
/approve


Added resizing transformer and tutorial for use and problem it solves

Good day.
Added resizing transformer and tutorial that describes error that is caused by inequal sized time series + use of transformer.
PR checklist for new estimators

[x] I have added unit tests and made sure they pass locally.
[x] I have updated the existing example notebooks or provided a new one to showcase how my algorithm works.
[ ] I have updated sktime's estimator overview and I'm committed to maintain my contribution and provide bug fixes if necessary.

Test was added

I still have a few questions:

What exactly happens if length is bigger than the length of the series in a cell? The series is stretched out to the required length?
What exactly happens if length is smaller than the length of the series in a cell?
If there is a time series (or pd.Series) in a cell, is the index also updated according to the interpolation?
Based on the answers to these questions, we should clarify the docstrings and perhaps rename it to make it clearer what it does

If length is bigger than the length of the series in a cell - series is stretched.
If length is lower than the length of the series in a cell - series is sampled in points between the series points. If you have 100 point and you need to resize them to 50 points, you will receive 50 points with values: (s100[2i]+s100[2i+1])/2 for i in range(50).
I think, yes. Series is converted to list firstly and back to series. Don't we always have a series in a cell?

Thanks for the clarifications!

So the values of the series are interpolated as you describe, but when you convert it into a list you loose the index, so the index is not interpolated, is that right?
Why do we work with lists and not numpy arrays?
Please update the docstrings accordingly to describe what it does

Use of list is my bad habit - corrected.
Yes there will be no index, type of cell value after transformation will be numpy. ".apply()" function can't return pandas.Series objects. But I can make additional cell-wise cycle for changing type to pandas.Series.
Docstrings refilled.

Okay, thanks for the updates!

I've left a minor comment on the doc string.
We're currently undergoing some refactoring and I want to merge those changes first because they add a number of additional unit tests. Once that's done, it may require you to make some additional minor changes. After that I'm happy to merge your PR. I'll keep you posted! We're aiming for a new release at the end of the month.

Please move your files into the sktime/transformers/series_as_features/  directory

@DmitriyValetov I fixed two minor things, hope that's okay. All tests seem to pass now, everything good to go from your side?

Merged now, thanks @DmitriyValetov for the contribution! 🎉

@DmitriyValetov the example notebook that came with this PR is broken, could you open a new PR to fix it? I've removed it for now.

@DmitriyValetov the example notebook that came with this PR is broken, could you open a new PR to fix it? I've removed it for now.

Done

@DmitriyValetov I can't see the PR, where did you push the changes?


Update Patch3D plotting

Previously, Patch3D objects wouldn't update colors, to which a workaround was made to plot several versions of the same object in the same location and to select one as the visible object. This bug was tracked in https://github.com/matplotlib/matplotlib/issues/3370.
A recent pull request fixes this bug https://github.com/matplotlib/matplotlib/pull/18189. The workaround can thus be removed.

Enhanced 3D plotting is performed via patches, but encounters error https://github.com/matplotlib/matplotlib/issues/18815, and is solved by https://github.com/matplotlib/matplotlib/pull/18816.


Write a spec for CKF deployment to AKS

Why it needs to get done
We need this because of https://github.com/canonical/bundle-kubeflow/issues/769. The spec will also help us verify our understanding and make sure that nothing is very off before starting implementing the solution.
What needs to get done
Write a small spec to expose how the overall process will be done, rationale followed and decisions made.
When is the task considered done
There is a spec approved

The spec has been approved


Fix LinuxPerfScriptEventParser when parsing timespamp event

When parsing timestamp of an event ("0.0") with the current culture set to "fr-FR", a System.FormatException is raised.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Codecov Report

Merging #311 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #311   +/-   ##
=======================================
  Coverage   24.36%   24.36%
=======================================
  Files         199      199
  Lines      112487   112487
  Branches    11230    11230
=======================================
  Hits        27402    27402
  Misses      85058    85058
  Partials       27       27

Flag
Coverage Δ

#2015
24.35% <100%> (ø)
:arrow_up:

#2017
24.36% <100%> (ø)
:arrow_up:

#Debug
15.81% <100%> (ø)
:arrow_up:

#Release
14.89% <100%> (ø)
:arrow_up:

Impacted Files
Coverage Δ

...w/OtherSources/Linux/LinuxPerfScriptEventParser.cs
81.52% <100%> (ø)
: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 316ebce...fbd5254. Read the comment docs.

Codecov Report

Merging #311 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #311   +/-   ##
=======================================
  Coverage   24.36%   24.36%
=======================================
  Files         199      199
  Lines      112487   112487
  Branches    11230    11230
=======================================
  Hits        27402    27402
  Misses      85058    85058
  Partials       27       27

Flag
Coverage Δ

#2015
24.35% <100%> (ø)
:arrow_up:

#2017
24.36% <100%> (ø)
:arrow_up:

#Debug
15.81% <100%> (ø)
:arrow_up:

#Release
14.89% <100%> (ø)
:arrow_up:

Impacted Files
Coverage Δ

...w/OtherSources/Linux/LinuxPerfScriptEventParser.cs
81.52% <100%> (ø)
: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 316ebce...fbd5254. Read the comment docs.

Thanks for submitting this! After a quick look at codecov, it appears this line was getting covered by tests prior to your change. To add a test validating your change, a new test could be added next to one of the existing tests that covers the line, and apply the UseCulture attribute to force the new test to run with fr-FR.

Thanks for your quick answer.
Prior to the PR, I tried to set the culture to "en-US" (using the UseCulture attribute) for one test, but it kept failing. When debugging step by step, I could see the Culture still set to "fr-FR". I dig deeper and noticed that this method was run in another thread (using  a Task) and that would explain why the test is failing. (https://msdn.microsoft.com/fr-fr/library/system.globalization.cultureinfo.currentculture(v=vs.110).aspx)
I'm not sure this test will bring any value, since on a machine with the Culture set to "en-US" with or without the fix, the test still will pass (it may confuse people playing with it).
But if you think it's worth it, I will add the test.

this method was run in another thread

Do you know where exactly this transition occurs? If so, we can explicitly preserve the culture at the boundary.

Do you know where exactly this transition occurs? If so, we can explicitly preserve the culture at the boundary.

Sorry, I removed the link when I cleaned up my message
https://github.com/Microsoft/perfview/blob/9dd9b1acee1f5f35ec28bb220777f81e64de22b8/src/PerfView/OtherSources/Linux/LinuxPerfScriptStackSource.cs#L51
Ok so, I will preserve the culture and add a test.
Thanks for your comment


Remove primer.css/octicons

Now that we've moved the new embed UI to MDC, we should remove any vestiges of primer and its icons still in the codebase.

We still use Octicons for the up/down triangles in the embeds, There might be a similar icon in Material, but I'm going to close this for now.

Discussed offline with @johnpryan. While octicons may remain in use for a while, we should still consider it a goal to replace them with MDC icons and remove that dependency.

🎉

🎉


mass renaming

Getting rid of namespace imports (bad for auto-import)
More specific names in places where we previously utilized namespaces as a means of preventing conflict

Namespace issues are somewhat addressed –– could also be interpreted as a duplicate of #556


There are some methods in VSCode that do not prompt or display highlighting.

Feature: There are some methods in VSCode that do not prompt or display highlighting.

Description
When using the module selenium in VSCode, the function can be used normally, but there are some methods that do not prompt or display highlighting. As shown below:
https://raw.githubusercontent.com/jill123-cc/11/6d04a51a08c190fd617c008d9f7a8334b2178c8c/key.PNG
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

@jill123-cc Are you using jedi, or pylance?

@karthiknadig thank you for your reply! Yes, I have tried to use the extension pylance, when I input "driver.f" it will prompt "driver.find_element_by_xpath", but when I continue to reference the method ".sent", it still doesn't give any prompt.

@jill123-cc Created an issue for this on pylance. Please follow this there.


oslat runtime parameter fix

Description
oslat doesn't have a --runtime parameter (anymore?), but a --duration instead:
This is an OS latency detector by running busy loops on specified cores.
Please run this tool using root.

Available options:

-b, --bucket-size      Specify the number of the buckets (4-1024)
-B, --bias             Add a bias to all the buckets using the estimated mininum
-c, --cpu-list         Specify CPUs to run on, e.g. '1,3,5,7-15'
-C, --cpu-main-thread  Specify which CPU the main thread runs on.  Default is cpu0.
-D, --duration         Specify test duration, e.g., 60, 20m, 2H
                       (m/M: minutes, h/H: hours, d/D: days)
-f, --rtprio           Using SCHED_FIFO priority (1-99)
-m, --workload-mem     Size of the memory to use for the workload (e.g., 4K, 1M).
                       Total memory usage will be this value multiplies 2*N,
                       because there will be src/dst buffers for each thread, and
                       N is the number of processors for testing.
-s, --single-preheat   Use a single thread when measuring latency at preheat stage
                       NOTE: please make sure the CPU frequency on all testing cores
                       are locked before using this parmater.  If you don't know how
                       to lock the freq then please don't use this parameter.
-T, --trace-threshold  Stop the test when threshold triggered (in us),
                       print a marker in ftrace and stop ftrace too.
-v, --version          Display the version of the software.
-w, --workload         Specify a kind of workload, default is no workload
                       (options: no, memmove)
-z, --zero-omit        Don't display buckets in the output histogram if all zeros.

Fixes

Fixes the call in oslat.sh
also fixes a misspelled node_selector

Codecov Report

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

@@            Coverage Diff            @@
##             master     #714   +/-   ##
=========================================
  Coverage          ?   53.48%
=========================================
  Files             ?        8
  Lines             ?      316
  Branches          ?        0
=========================================
  Hits              ?      169
  Misses            ?      147
  Partials          ?        0

Flag
Coverage Δ

gha
53.48% <0.00%> (?)

python-3.9
53.48% <0.00%> (?)

unit
53.48% <0.00%> (?)

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

Continue to review full report at Codecov.

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

all sorted.

@mkarg75 I'm wondering if we want to change the name of the argument as well for consistency?

I'm torn - this seems to be a non-consistent parameter, it worked before with runtime. But for the sake of stuff that's already out in the wild I'd say we leave the argument untouched.


Mistype fixed + clarification about managedType

The compilation error about Java.Lang.IComparable.CompareTo(Java.Lang.Object) comes from the incorrect parameter types, however current doc was mentioning only return type int even though it is not related to the compilation problem (incorrect parameter type)

@alexsorokoletov : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


Editor Warns when accessing static function in AutoLoaded script

Godot version
v4.0.beta.custom_build [efd2a8ac235ef8c1f75aa38985347f6aac238afb]
System information
Windows 10 x64; AMD Ryzen Threadripper 1950X
Issue description
Problem
If a script is added to the AutoLoad tab and contains static functions, Godot will throw a Warning in the Debugger when you attempt to call that function. Calling:
SomeAutoLoadedScript.some_static_function()
produces:
The function 'some_static_function()' is a static function but was called from an instance. Instead, it should be directly called from the type: 'res://AutoLoads/SomeAutoLoadedScript.gd.some_static_function()'.
Because SomeAutoLoadedScript is how the singleton instance is accessed, there isn't a way to call the static function except from the instance.
Expected Behavior
Calling a static function on an AutoLoaded script ideally should call the static function without accessing the singleton instance of the AutoLoaded script, and a Warning should not be produced.
If that cannot be accomplished but the issue is harmless, then the Warning should be suppressed.
If it cannot be accomplished but the issue is harmful, then another mechanism should be provided in order to explicitly access the static context without accessing the instance.
Note: This issue is simple enough that this author does not believe a reproduction project should be necessary. Please correct me if one still aught to be provided. Thank you.
Steps to reproduce

Create a script inherited from Node.
Add a static function to that script.
Add the script to the AutoLoad tab in the Project Settings.
Create another script attached to a Node in the scene.
From the second script, call the static method from the first script.
Observe the Debugger output.

Minimal reproduction project
No response

The warning is correct. Autload singleton is an instance. There is no point to have static methods in autoloads, because the instance is available globally.

If that is the case, then maybe the warning should be given to the user when they add a class to Autoload which contains static members. At the very least there aught to be some mention on the docs page https://docs.godotengine.org/en/latest/tutorials/scripting/singletons_autoload.html
And maybe you are correct there is not point. I am not familiar enough with the implementation of gdscript to know for certain. Are static methods handled differently than local methods? In a language like C# they absolutely are and may perform differently. And if there is a distinction in gdscript, then is AutoloadedScriptName.static_method_name() calling the static method or an instanced version of it? Does it distinguish?
I also think there is a point from a design perspective. If I want a function to provide some utility related to data involved in the singleton without necessarily mutating the singleton instance, then I would like it to be static, but I don't necessarily want to have it in a separate file.

The static methods of core classes (e.g. FileAccess) are the same static as in C++. Not sure about the exact GDScript implementation, but static methods have 2 main differences: a static method can be called on a script (either preloaded or a class_name) and you can't access any of the instance properties (i.e. vars outside of functions) from inside a static method. You can however access constants, because they are also static.


SoftAssertions collects only first fail in case of Exceptions

Describe the bug
SoftAssertions collects only first fail in case of Exceptions.
Output is:
[ERROR] SoftAssertionsTest.test  Time elapsed: 0.086 s  <<< FAILURE!
java.lang.AssertionError:
[A]
Expecting code to raise a throwable.
        at SoftAssertionsTest.lambda$test$0(SoftAssertionsTest.java:14)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
        at SoftAssertionsTest.test(SoftAssertionsTest.java:16)
[...]

However I would have expected something  like:
[ERROR] SoftAssertionsTest.test  Time elapsed: 0.086 s  <<< FAILURE!
java.lang.AssertionError:
[A]
Expecting code to raise a throwable.
        at SoftAssertionsTest.lambda$test$0(SoftAssertionsTest.java:14)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
        at SoftAssertionsTest.test(SoftAssertionsTest.java:16)
[...]
[B]
Expecting code to raise a throwable.
        at SoftAssertionsTest.lambda$test$0(SoftAssertionsTest.java:14)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
        at SoftAssertionsTest.test(SoftAssertionsTest.java:16)
[...]

assertj core version: 3.23.1
java version: 17.0.3
test framework version: JUnit 5.8.2

Test case reproducing the bug
import java.util.function.Consumer;
import java.util.stream.Stream;

import org.assertj.core.api.SoftAssertions;
import org.junit.jupiter.api.Test;

class SoftAssertionsTest {

    @Test
    void test() {
        SoftAssertions softly = new SoftAssertions();
        Consumer<String> f = s -> softly.assertThatExceptionOfType(Exception.class)
                                        .as(s)
                                        .isThrownBy(this::checkSomething);

        Stream.of("A", "B").forEach(f);
        softly.assertAll();
    }

    private void checkSomething() {
    }
}

Thanks for reporting this @stefanhh0, this is a bug indeed, the reason being we don't soft assert hasBeenThrown in isThrownBy:
  public ThrowableAssertAlternative<T> isThrownBy(final ThrowingCallable throwingCallable) {
    Throwable throwable = ThrowableAssert.catchThrowable(throwingCallable);
    assertThat(throwable).as(description).hasBeenThrown().isInstanceOf(expectedThrowableType);
    T castThrowable = (T) throwable;
    return buildThrowableTypeAssert(castThrowable).as(description);
  }

Great, thanks for the Fix!


update packages list before installing ffmpeg

Title
update packages list before installing ffmpeg
Description
update packages list before installing ffmpeg
Related Issue

Motivation and Context
tests were failing
How Has This Been Tested?
no need
Screenshots (if appropriate)
Types of Changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[x] My code follows the code style of this project
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
[x] I have read the CONTRIBUTING document
[x] I have read the  CORE VALUES document
[ ] I have added tests to cover my changes
[x] All new and existing tests passed

remember to add labels for release-drafter action!


Some bugs in the consine program need to be noted

Similarity calculation error in cosine, arrording to Cosine similarity Wiki 1-cos is not required.
In here, dimensional mismatch of hash functions clearly.

Hash_Function.resize(dimension ,vector<double>(k));
for(int i=0;i<k;i++){
  Hash_Function[i].clear();
  for(int j=0;j < dimension;j++){
      Hash_Function[i].push_back(normal_distribution_generator() );
  }
}

Some cumbersome code can be avoided as describion in #1  if the above bug is fixed.
3. Here is my reimplement if you are insterested in it.

Again, thank you for your time and for pointing out those errors. (1) and (2) were addressed in 456758fc3d00327ab3e9e080debae444beb9598e.
I will definitely have a look at your implementation, even though I don't know Chinese :)


Trying to upload a letterhead image

The Image upload seems te be broken or I am doing something wrong.
I want to upload an image to FedEx to later use that in my letterhead and signature. I want to reference that image later on as 'IMAGE_1'
I'm trying to use it like this:
I have a working $connector
        $image1 = base64_encode(file_get_contents(__DIR__.'/files/image.png'));

        $apiDocuments = $connector->tradeDocumentsUploadV1();

        $documentRules = new DocumentRules("LetterheadSignature");
        $documentMeta = new DocumentMeta('LETTERHEAD','IMAGE_1');
        $document = new Document(
            'IMAGE_1',
            'letterhead.png',
            'image/png',
            $documentRules,
            $documentMeta
        );
        $imageUploadService = new FullSchemaImageUploadServiceInputVo($image1,$document);
        $uploadResponse = $apiDocuments->imageUploadServiceInfo($imageUploadService);

I get this error:
[InvalidArgumentException] The value array must only contain Saloon\Data\MultipartValue objects.

#1  /app/vendor/saloonphp/saloon/src/Repositories/Body/MultipartBodyRepository.php:190
#2  /app/vendor/saloonphp/saloon/src/Repositories/Body/MultipartBodyRepository.php:64
#3  /app/vendor/saloonphp/saloon/src/Repositories/Body/MultipartBodyRepository.php:48
#4  /app/vendor/saloonphp/saloon/src/Traits/Body/HasMultipartBody.php:32
#5  /app/vendor/saloonphp/saloon/src/Traits/Body/HasMultipartBody.php:24
#6  /app/vendor/saloonphp/saloon/src/Helpers/Helpers.php:95
#7  /app/vendor/saloonphp/saloon/src/Http/PendingRequest/BootPlugins.php:28
#8  /app/vendor/saloonphp/saloon/src/Http/PendingRequest.php:315

For some reason it does not want to accept a string as the "attachment" input. But the specifiactions does say I should input a string here:
final class FullSchemaImageUploadServiceInputVo extends Dto
{
    /**
     * @param
final class FullSchemaImageUploadServiceInputVo extends Dto
{
    /**
     * @param  string  $attachment  Input the actual image file to be uploaded.
     * @param  Document  $document  Indicate the image reference metadata details.
     */
    public function __construct(
        public readonly string $attachment,
        public readonly Document $document,
    ) {
    }
}

https://stackoverflow.com/questions/78593938/restful-fedex-trade-document-upload-api-cant-upload-signature-or-letterhead-i/78697033#78697033
The fedex documentation is wrong according to this post. So this autogenerated API would also be wrong then...

Thanks for the report, we will test this as well.
Note, the FedEx REST API is according to FedEx still in a "pilot phase" so we expect there to be changes in the coming months. I recommend you request an exemption from the August 31 deadline if you are having any troubles with the current API.


updating grpc version and using newclient method grpc.Dial is deprecated

PR Template:
updating grpc version and using newclient method grpc.Dial is deprecated
close https://github.com/RedHatInsights/insights-rebac/pull/51
Describe your changes

...

Ticket reference (if applicable)
Fixes #
Checklist

[ ] Are the agreed upon acceptance criteria fulfilled?

[ ] Was the 4-eye-principle applied? (async PR review, pairing, ensembling)

[ ] Do your changes have passing automated tests and sufficient observability?

[ ] Are the work steps you introduced repeatable by others, either through automation or documentation?

[ ] If automation is possible but not done due to other constraints, a ticket to the tech debt sprint is added
[ ] An SOP (Standard Operating Procedure) was created

[ ] The Changes were automatically built, tested, and  - if needed, behind a feature flag - deployed to our production environment. (Please check this when the new deployment is done and you could verify it.)

[ ] Are the agreed upon coding/architectural practices applied?

[ ] Are security needs fullfilled? (e.g. no internal URL)

[ ] Is the corresponding Ticket in the right state? (should be on "review" now, put to done when this change made it to production)

[ ] For changes to the public API / code dependencies: Was the whole team (or a sufficient amount of ppl) able to review?

LGTM


[issue #7514] fix GsonPlugin to stop collect gson trace info when set…

…ting gson.profiler.enable=false

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.大庄 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


ADD Toaster service to the app for notification triggering

explain it ?

hey @Vin205, my plan is that when we go on the login page
then at the timeof login we do not have anything specified for notification
as when user successfully login or not, no error message is displayed

@shubhagarwal1 assigned!


Overwriting functions in the builtin namespace

I can overwrite the function builtin:return in this way:
⬥ return~ = { echo 'NOBODY expects the Spanish Inquisition!' }
⬥ builtin:return
NOBODY expects the Spanish Inquisition!

This does not happen if I use fn return { … } instead. It also does not happen if I run fn return { } and then perform the above assignment. (This is not surprising, really.)
The same thing happens with at least some other functions; maybe all of them. But testing is painful because of all the side effects of mutating the builtin namespace.

Oh, wait: I just discovered that this is documented behaviour. Still arguably a bug, but at least it is already known.

Oh, wait: I just discovered that this is documented behaviour. Still arguably a bug, but at least it is already known.

Documented yes, desirable no. I don't think there is a valid use case for overriding builtins, so I'll make these read-only.

Documented yes, desirable no. I don't think there is a valid use case for overriding builtins, so I'll make these read-only.


Node app started from within Jest node custom environment won't collect coverage

🐛 Bug Report
Using custom node environment which among other things starts the node server and exposes a global supertest variable on tests to use produces a coverage report which is empty, nothing gets collected from the run.

To Reproduce
Create a custom node environment with the minimal configuration. app.start & app.stop might differ according to the API exposed from your node server app.
const NodeEnvironment = require('jest-environment-node');
const superTest = require('supertest');

class CustomNodeEnvironment extends NodeEnvironment {
  constructor(...args) {
    super(...args);
    this.app = require('../app');
  }

  async setup() {
    await super.setup();
    if (this.global.supertest) {
      return;
    }
    const { server } = await this.app.start();
    this.global.supertest = superTest(server);
  }

  async teardown() {
    this.app.stop();
    await super.teardown();
  }

  runScript(script) {
    return super.runScript(script);
  }
}

module.exports = CustomNodeEnvironment;

Expected behavior
It was expected to get proper coverage report as it now happens when starting/stopping the app on each test's beforeAll & afterAll hooks

Here is more information:
Correct coverage appears only for:

modules required in the custom environment module and used (covered) by the custom environment code
modules required in the test module(s) and used (covered) by the test module(s) code

Incorrect (none) coverage appears for:

modules required in the custom environment module (the desired shared server) and used (covered) by the test module(s) code

Versions:

I first noticed the problem using v26.6.3 with which the "Uncovered Line #s" has very little information.
In attempt to determine when (under what version) the problem began, I reverted to v24.9.0 and the "Uncovered Line #s" show what appears to be correct information, however the "% Lines" shows almost all zeros.  The next version v25 is where v8 coverage specification was enhanced.
Under v26.6.3, runScript is never called, whereas under v24.9.0 it is called with an empty ContextifyScript (where typeof ContextifyScript == 'undefined')

testEnvironment runs outside the test's context, so this is working as expected (and designed). V8 coverage might give some since it picks up the the engine itself, but that's not supported.

What's done in setup and teardown in the example in the OP should be in beforeAll and afterAll inside a test (as you mention at the end). Note that setup and teardown happens for every test suite as well, so there's no performance benefit to sticking it in the env beyond the time to require the code itself (as that runs fresh in ever test)

I was hoping to use test environment as a way to make my tests run faster by starting up my server once for all of my project’s test suites.

Test env as mentioned would start it up once per test, so the only time saved would be require. What you can do is start it up in globalSetup, that will only run once. That's how jest-puppeteer works, if you want to look at an example.
But then you won't be able to collect code coverage for the server code


New Feature: Add a config enable general decorator.

Hey all,
I just used knockknock frequently in my previous research experiment. And I found it is inconvenient at this time if I want to use knockknock multiple times in my codebase. Because I need to maintain consistent sender function parameters in my code everywhere. And it is easy to leakage my personal security token (such as slack webhook_url). As a result, I propose to add a general decorator to handle these tricky things.
Property:

This general decorator can parse a config file to handle different sender function parameters.
The decorator can be silent when we are debugging our codebase. Since at the debug stage, we don't need verbose notification.
Separate the sender config in an independent config file can mitigate the risk of information leakage. (Just adding the config file into your .gitignore file.)

I finished the above properties. And I tested it on my personal desktop (Mac).
Below are some code examples:

Usage of general decorator

from knockknock import knockknock  # general decorator is named as knockknock (like tqdm)

@knockknock(config_path='./', config_name='test.ini')  # directly set your config path
def train_your_model(your_nicest_parameters):
    import time
    time.sleep(10)
    return {'loss': 0.9}  # Optional return value

@knockknock(config_path='./', config_name='test.ini')  # convenient to use it multiple times in your codebase
def eval_your_model(your_nicest_parameters):
    import time
    time.sleep(10)
    return {'acc': 0.9}  # Optional return value

train_your_model(None)
eval_your_model(None)

Config file test.ini

[knockknock]
sender=your_sender_type
notification=True
webhook_url=your_webhook_url
channel=your_channel

If notification is not set, it will be True by default.  The config file must be started with the knockknock tag. And the sender determines the sender type. Other parameters are related to according sender function.

And I will update the readme file in the next few days.

It seems the repository has stopped being maintained. I close my request.


use the package for higher ploidy

I get a genotype error when I try to use the "createlib" function on genotypes with dosages out of 0,1,2,9.
Can the package be used on crops with higher ploidy such as 4x?

@Mghanbari43 can you share a reproducible example?
All AlphaGenes software is primarily geared towards the diploid setting.

Then the error makes sense because I uses a SNP file of 4n to run the package.
tnx


Release candidate for 1.4

1.4 - [04-Mar-2024]
Added

Now it is possible to skip FASTP and FASTQC for the HIC module
Renamed ASSEMBLY_QC workflow to ASSEMBLYQC
Now using nf-core/FASTA_EXPLORE_SEARCH_PLOT_TIDK
Now redirecting validation errors to AssemblyQC report
Simplified layout of CITATIONS.md file
Now using pfr/gff3_validate sub-workflow for gff3 validation
Now listing software versions from the versions.yml file
Replaced custom GUNZIP module with nf-core/gunzip
Replaced custom gt/stat with pfr/gt/stat
Replaced custom fasta_validator with nf-core/fastavalidator
Added pre-commit version checking
Now gt/stat reports extended stats and multiple distribution plots have been added to the report
Added a tools tab to the report which lists the tools used by the pipeline to create the report
Refactored and cleaned data flows for all the custom sub-workflow
Started using nf-core template
Started using semantic versioning
Moved all python depending packages to 'docker.io/gallvp/python3npkgs:v0.6'

Fixed

All modules are now emitting versioning information
Fixed a bug which caused LAI to run with null assembly fasta
Fixed FASTA_LTRRETRIEVER_LAI sub-workflow so that it respects monoploid_ids parameter.

Dependencies

NextFlow!>=23.04.0
<EMAIL_ADDRESS>
Deprecated

Removed BIOCODE GFF3 STATS owing to its frequent failures

Fixes and Closes #78, #73, #62, #58
Deprecates and Closes #53, #67 as EDTA is removed from the pipeline


init --forcePush runs pre-push hooks before init

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v16.20.0
Amplify CLI Version
12.0.0
What operating system are you using?
Linux
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made.
Describe the bug
When amplify init is run with --forcePush the pre-push hook is run before init instead of before push.
Expected behavior
I expect the pre-push hook to run consistently before a push to an initialized environment.
Reproduction steps

Run the steps in https://github.com/aws-amplify/amplify-cli/issues/12644
Note during the branch build that the pre-push hook will run prior to a forced init/add of the environment.

Project Identifier
No response
Log output

# Put your logs below this line

Additional information
I thought downgrading to <12 should fix the issue thinking it runs the hooks during the init and the push of a --forcePush per #12512 but that only applies to post-push hook.
The hooks might be somewhat correct/somewhat bugged in the instance of a init --forcePush because it's really two different actions: amplify env add + amplify push. init creates all the resources that normally would come with an amplify env add. I've seen that the CLI populates different push parameters in a clean init --forcePush. It wouldn't matter as much for people if the pre-push would run twice but it doesn't I guess. Moving the pre-push to post init would avoided situations where stuff like #12640 occurs, ie on the forcePush --init, the cloudformation name isn't know for the hook.
Now with #12512 in, I think pre-push hooks running during the adding of the env is a bug and they should run after the init/add of the env.
Before submitting, please confirm:

[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

Hey @joekiller thanks for raising this! As promised, lifting my note from the linked issue this appears to be unique to init --forcePush in that the CLI is verifying environment variables and executing the pre-push hook https://github.com/aws-amplify/amplify-cli/blob/dev/packages/amplify-cli/src/commands/init.ts#L37
In this specific case I can see how this affects the chosen functionality for your pre-push hook, and will mark this as a bug to reevaluate the order of execution.


HelloWorld.Name instructions are incorrect

In the "Mix" reading the code to create a new module and function HelloWorld.Name is incorrect. Enum.random should take a list of strings and not three distinct strings.

Corrected with commit ece332fbb5cdcf8b0e23a017c892d94286e15aec


MediaLibrary: Refactoring web search API (Lombiq Technologies: ORCH-206), fixes #7118

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: I3undy sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Different kind of UI interactions trigger the following client-side error:

Uncaught TypeError: c.querySelectorAll is not a function at MutationObserver. (content_script_bundle.js:16)

Please provide repro steps because it is a Ghostery bug.


Start with adding parameters that allow the user to select which column(s) are used in various filtering or filtering-related visualization steps

:warning: This is a stacked PR based on PR #34 (which is based on PR #33). :warning:
Specifically this PR is focused on implementing changes after code review for PR #33.
Given code review for #33, we wanted to start incorporating parameters/arguments for more robust sample/column selection during QC visualization and filtering.
I am envisioning 3 parameters here.

One is for the zero count filter that by default looks at every sample column. (filter_zerocount_target_col)
Another is for the QC graphs (and potential future filter) that focus on replicate columns (visualizing variation within the replicates, or how many replicate samples have a raw count of 0). (filter_replicates_target_col)
The third is for the low log2 CPM plasmid filter and visualizations. This PR focuses on adding, functionalizing, and documenting this parameter.  (filter_plasmid_target_col)

Changes made in this PR

(minor but was working in these files): added to the header (don't run) examples some more throughout the files I was editing.
(minor but was working in these files/this function): Also majorly simplified the plasmid filter itself so that instead of using lapply, it's just plasmid_cpm_filter <- plasmid_data$plasmid_log2_cpm < cutoff.
Add all 3 potential parameters as parameters within 01-qc.R in the function definition and documentation/header.
Pass all 3 potential parameters as parameters to the template .Rmd file within 01-qc.R and add them as params within the template .Rmd header
Focusing on the log2 CPM plasmid filter and visualizations ...

Added the filter_plasmid_target_col parameter to the relevant visualization function in qc-plots.R.  Because I wanted this to be more robust in not just selecting any column, but being able to select multiple columns if there are plasmid replicated, I added a check that if more than one column is selected, we create one large vector to visualize all of the pooled values and find a suggested cutoff from that.
Added the filter_plasmid_target_col parameter to the relevant filter function in 02-filter.R. Because I wanted this to be more robust in not just selecting any column, but being able to select multiple columns if there are plasmid replicates, I added a check that if more than one column is selected, we create an average of those columns and apply the filter checking the cutoff value against those averages.

As I'm writing this up, I realize that means there are two different cutoff values with the visualization method and the actual filter if there is more than one plasmid column selected. One cutoff is based off of the lower outlier of the pooled values and the other is based on the lower outlier of the averaged values (respectively). This definitely needs to be fixed. What would you suggest I use? It could be one of the following or something else I haven't thought of:

If more than one column is selected, both cutoffs are based off of the lower outlier of all the pooled values
If more than one column is selected, both cutoffs are based off of the lower outlier of the averaged values (and this is plotted on top of pooled values or average values)
Default to one of these, but let users choose which one if they're not supplying their own, plotting both potential cutoffs but visualizing the pooled values.

Requested Review
Is this how you were envisioning incorporating a parameter and should I proceed with the other two, or are there changes/differences you'd like in the overall concept?
Thank you!!

Shorter description of problem:
Working on making the software robust to different data inputs: If there are replicates for the plasmid column, when looking at the distribution of log2 CPM values, would you want to find the filter based on the low log2 CPM looking at all pgRNA and replicates values at the same time or by looking at only averages of the pgRNA replicates?
From Alice in the meeting notes:

I think I would look at all pgRNAs at the replicate level

@cansavvy This no longer utilizes an average for finding the filter if multiple columns are selected. As discussed in our meeting, it pools the replicates, finds the cutoff, and then checks to see if any replicate is below that cutoff for each construct.
I also added some @importFrom's and reran document and load_all. Not sure if all my importFrom statements are necessary, so let me know if I overdid adding them please

After I merged PR #34 (which was branch filter_qc_ki2) and changed the base of this PR from filter_qc_ki2 to main, the pkgdown check failed. I haven't been able to figure it out yet @cansavvy

In the logs, this is what I'm zeroing in on. I think we need to add the janitor package to the DESCRIPTION file. We probably didn't use it before but clean_names() is a handy function you are using here so its worth adding!
I'll add it now!

All set! Just a stray comma and a missing dependency.
You decide about the colnames thing but then we can merge this!

All set! Just a stray comma and a missing dependency.

Sorry about the dependency issue. I ran document() but didn't run usethis::use_package() :(

You decide about the colnames thing but then we can merge this!

For the colnames thing, that is how I tend to set colnames in general, so if consistency is good, I think I'll leave it if that's ok.

In the logs, this is what I'm zeroing in on. I think we need to add the `janitor` package to the DESCRIPTION file. We probably didn't use it before but `clean_names()` is a handy function you are using here so its worth adding!
I'll add it now!

Where in the logs was that? I had looked at this log and didn't see anything about janitor, but instead:
✖ Failed to build gimap 0.1.0 (1.7s)
  Error:
  ! error in pak subprocess
  Caused by error in `stop_task_build(state, worker)`:
  ! Failed to build source package gimap.
  ---
  Backtrace:
  1. pak::lockfile_install(".github/pkg.lock")
  2. pak:::remote(function(...) { …
  3. err$throw(res$error)
  ---

This was the failed action log I was looking at -- https://github.com/FredHutch/gimap/actions/runs/9702648426/job/26779304887
I think I could have debugged the janitor error message had I seen it, which is why I'm asking where I should have been looking since clearly I didn't look in the right place. I've even been relooking at this log this morning and still don't see it

I should have looked at this log -- https://github.com/FredHutch/gimap/actions/runs/9702648423/job/26778978751, for macOS, not pkgdown!


App gray mode

Use case
we should add app global decolorization like gray mode.
I  use ColorFiltered/ShaderMask in root widget.But it will affect my native 3rd map sdk  render.

and when render h5 page , it will different between iOS & android.
|
Proposal
code sample

@illusionGeorge
Can you elaborate on your use case as what exactly are you trying to achieve ? Curious to know if this feature is already available in native ?

I just find ColorFiltered can let my app into gray mode . If my app include native view or H5 view. Under this gray mode will affect native render & H5 render . How can I solve this issue?

Please provide runnable reproducible code sample that shows the issue you are facing. Also, StackOverflow would be a better platform to ask for solution in code implementation.

ColorFiltered(         colorFilter: ColorFilter.mode(Colors.grey, BlendMode.saturation),         child: widgetTree, );
I use ColorFiltered warp my widget in my RootWidget.
But native map view render in my child view.
And H5 view also render in my child view.

I think you are hitting https://github.com/flutter/flutter/issues/39270 so please follow-up in it for further updates.
Closing this as a duplicate.


Changing Island Leveling formula

What it sounds like

Debating in which way this should be done. Will probably have something like
floor((BLOCK_MULTIPLIER)b+(SPREAD_MULTIPLIER)s) = island level
where BLOCK_MULTIPLIER and SPREAD_MULTIPLIER are editable. Putting in a whole string to math parser is way too much work and way too resource-heavy for this small of an issue.


SMD-555 - Funding Profiles B2 table extract transform validate

Ticket
SMD-555
Change description
Extracting and transforming data from B2 table ("TD Programme Management") in "4a - Funding Profiles" worksheet, ready for load. As we do not yet know exactly how this data will be stored in the database, the data is transformed into as basic a format as possible, with fields "Programme ID", "Payment Type" (which can be either "Towns Fund CDEL Programme Management Payment" or "Towns Fund RDEL Programme Management Payment" as per the two rows in the spreadsheet), "Reporting Period" and "Spend in Reporting Period", mimicking the early transformation that happens to the funding data in Section C of the same worksheet (see extract_funding_data in core/extraction/towns_fund_round_three.py), with the same data melting technique used to convert the data from wide to long format. Data passes through the validation layer unscathed by adding the new "Programme Management" key to the validation schema and parsing all columns as nullable strings.
A unit test and accompanying expected CSV has been added, and one of the Excel files used in integration testing (TF_Round_4_Success.xlsx) has been modified with the addition of some random figures into the B2 table, as per the ticket description.

Thanks @cyrusdobbs - the process now happens inside the R3 pipeline as well, and there's a new test for an empty DataFrame given non-TD input. Currently the two new unit tests only sit inside tests/extraction_tests/test_round_four_extraction.py - wasn't sure whether to duplicate them to test_round_three_extraction.py or not, happy to do whatever is conventional.


Linter warnings

Hi there,
I use CLion for C-dev, its built-in linter gives hundreds of warnings, mostly of the "Macro blah is never used" kind. Ignoring those, since the nature of this library, there are other warnings such as "Clang-Tidy: Macro replacement list should be enclosed in parentheses", "Clang-Tidy: Potential uncovered code path; add a default label", and "Clang-Tidy: Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'wchar_t' (aka 'int') is implementation-defined". It also complains about functions with no arguments, silenced by adding doing tb_width(void).
I am not asking that the project follow the "advice" of the linter, I would just like to know if this is something you care about or not, if not, why? I would like to know what the opinion is of those working on this project.
Apart from that, I like the suckless principle that went into this project, the small code base makes me very happy. I have recurring nightmares from working with ncurses. If at all possible, I'd like to contribute to this project.

Hi @purpledan, thanks for pointing that out. Yes, we care.

"Clang-Tidy: Macro replacement list should be enclosed in parentheses"

This indeed can guard against subtle mistakes. If you fix this, codegen.sh will need to be updated to output parens around define values. The code in tests/test_ffi.php that extracts define values will need to be updated to handle these parens as well.

"Clang-Tidy: Potential uncovered code path; add a default label"
"Clang-Tidy: Narrowing conversion from 'uint32_t' (aka 'unsigned int') to signed type 'wchar_t' (aka 'int') is implementation-defined"

Sounds like a good idea to fix these.

It also complains about functions with no arguments, silenced by adding doing tb_width(void).

Yes, technically that is the correct way to define a function that takes no args.
I'll add these to my backlog, but do feel free to submit PRs.

https://github.com/termbox/termbox2/pull/44


fadeDuration option added

I just added a fadeDuration options that makes use of duration parameter of jQuery animation functions. I hope there's nothing wrong with my code styling. Sincerely
--
ahmet alp balkan

screw that.


Refreshing In A Child Router Shouldn't Prevent Normally Working Routes From Being Found

I'm submitting a bug report

Library Version:
1.0.7

Please tell us about your environment:

Operating System:
Windows 10

Node Version:
6.9.1

NPM Version:
4.0.2

JSPM OR Webpack AND Version
webpack 2.1.0-beta.27

Browser:
all
Language:
ESNext

Current behavior:
When I reload a page while in a child router's child router the routes are not found even though if I load the page from the root the routes are found normally.
Expected/desired behavior:

Gist
Git Repo
Reproduction Instructions

Click on Documents
Click on Link
Click on Broken Edit and notice how it navigates to edit.
Click on Broken Details and notice how it navigates to details.
Reload the page.
Click Broken Edit, it shouldn't navigate away from Edit.
Click Edit
Click on Broken Details, it shouldn't navigate to details either.

aurelia.js:14793 ERROR [app-router] Error: Route not found: /details
        at AppRouter._createNavigationInstruction (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:16353:29)
        at AppRouter.loadUrl (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:16948:19)
        at BrowserHistory._loadUrl (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:14456:55)
        at BrowserHistory._checkUrl (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:14449:14)error @ aurelia.js:14793
    aurelia.js:14793 ERROR [app-router] Error: Route not found: /edit
        at AppRouter._createNavigationInstruction (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:16353:29)
        at AppRouter.loadUrl (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:16948:19)
        at BrowserHistory._loadUrl (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:14456:55)
        at BrowserHistory._checkUrl (https://jdanyow.github.io/rjs-bundle/bundles/aurelia.js:14449:14)

What is the expected behavior?
The expected behavior is that refreshing a page on a child router should not effect the route's from being found.

What is the motivation / use case for changing the behavior?
This doesn't make sense..

This is actually a repeat of #306


ADC period 22us only supports 4 channels

More than 3 analogue inputs, reduces mic rate
Try this in MakeCode live, then beta
https://makecode.microbit.org/_a277qf3sTHYs
https://makecode.microbit.org/_4q5L1eCcWFK9 (for import to beta with the pin blocks fixed)
Press A to record – see recording time in console
Press B to add 4 analogue inputs
Press A to record – see increased recording time in beta

Similar C++ example: recording.zip
The hex in the zip has
DMESG("possibleSamples %d", possibleSamples);
inserted at
https://github.com/lancaster-university/codal-nrf52/blob/8802eb49140e0389e535cb6160d9080efd951ba7/source/NRF52ADC.cpp#L559

The NRF52ADC period used to be set in MicroBit.cpp to 91us (note: 1e6/11000 == 90.9), but has been changed by MicroBitAudio to 45 (1e6/22000), then 90 (1e6/11000) and now 22 (1e6/44100).
The last change says "back up to 44100" but that number has not been used to set the NRF52ADC rate before, as far as I can see. Perhaps that referred to the Mixer2 output channel speed.
It looks like MicroBitAudio is turning the NRF52ADC speed dial up to 11 out of 10, even for programs that don't use the microphone. I don't think a MakeCode program can reduce the  NRF52ADC rate.

History... Originally, the default NRF52ADC period was set to 91us
https://github.com/lancaster-university/codal-microbit-v2/blob/a8470a76d9f3420f1daa1ecaf3eda80732bb857c/model/MicroBit.cpp#L69
MicroBitAudio started setting the default ADC period to 1e6/22000 (45) in https://github.com/lancaster-university/codal-microbit-v2/commit/98d7dc960b0af9b5249fa47f4755b0ef9e260594
MicroBitAudio was changed to set 1e6/11000 (90) in https://github.com/lancaster-university/codal-microbit-v2/commit/ceba6d7ed038af894443012e95ba7e3bfee33221
Macro CONFIG_MIXER_DEFAULT_CHANNEL_SAMPLERATE == 11000 was added after issue https://github.com/lancaster-university/codal-microbit-v2/issues/311 in https://github.com/lancaster-university/codal-microbit-v2/commit/d54ce9b784ef1bba22c075b281bb877abf53ea18
Finally, CONFIG_MIXER_DEFAULT_CHANNEL_SAMPLERATE was increased to 44100 in https://github.com/lancaster-university/codal-microbit-v2/commit/2e664e6294749c1444c002d2276674c3210ba0b8

Trying to understand CONFIG_MIXER_DEFAULT_CHANNEL_SAMPLERATE... It is

the default rate for a Mixer2 output channel
the default NRF52ADC sample rate

https://github.com/search?q=repo%3Alancaster-university%2Fcodal-microbit-v2 CONFIG_MIXER_DEFAULT_CHANNEL_SAMPLERATE&type=code
These two things don't seem logically closely connected.
I'm not sure why MicroBitAudio needs to set the NRF52ADC rate in its constructor.
Does LevelDetectorSPL need the same high rate as sound recording?
Won't the NRF52ADC rate get increased if a faster rate is requested?
Isn't it the input and output rates for a StreamRecording that need to match for https://github.com/lancaster-university/codal-microbit-v2/issues/311?
    SplitterChannel *splitterChannel = uBit.audio.splitter->createChannel();
    splitterChannel->requestSampleRate( SAMPLE_RATE );
    StreamRecording *recording = new StreamRecording(*splitterChannel, BUFFER_LEN);

Could the mic input pipeline be created on first use?
https://github.com/lancaster-university/codal-microbit-v2/blob/a8470a76d9f3420f1daa1ecaf3eda80732bb857c/source/MicroBitAudio.cpp#L74

Sound level is more noisy at 22us / 44100Hz.
When it’s quiet, MakeCode v6 sees lots of zeros, but v7 has a very jumpy graph.
https://makecode.microbit.org/_MDw9Tafqu9k3
C++
#include "MicroBit.h"

MicroBit uBit;

void forever()
{
    while (true)
    {
        int level = uBit.audio.levelSPL->getValue();

        uBit.serial.printf( "s:%d\r\n", (int) level);
        uBit.sleep(20);
    }
}

int main()
{
    uBit.init();
    //uBit.audio.activateMic();
    create_fiber( forever);
    release_fiber();
}


请问可以提供一下dataset吗

FileNotFoundError: [Errno 2] No such file or directory: '../data/negative.csv

For the positive dataset: https://www.csbio.sjtu.edu.cn/bioinf/QADD/positive.csv
For the raw negative dataset: https://www.csbio.sjtu.edu.cn/bioinf/QADD/negative.csv, and you may need to preprocess the negative dataset by property filters. (for example, we use QED < 0.605 and SAscore > 2.797)
I hope this helps.

I have fixed it, thanks for your feedback!

The two links seem to be wrong again, could you fix it once more?

The two links seem to be wrong again, could you fix it once more?

Hey, you can access them by running "wget + the download link" as follows:
wget http://www.csbio.sjtu.edu.cn/bioinf/QADD/positive.csv
wget http://www.csbio.sjtu.edu.cn/bioinf/QADD/negative.csv


geekbench: init at 4.1.1

Motivation for this change
It’s a nice (the most popular?) tool to benchmark your hardware across different OSes.
Things done
Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.

[x] Tested using sandboxing
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Thank you!


Replication improvements

Ask for a MFA token on the command line, and then store the credentials
in a file. The assume-role command returns an expiration time, so
check this with a 5 minute margin of error. If the token has expired
or is about to expire, prompt the user for their MFA token again.
This has the added benefit of subsequent runs of this script not
requiring a new MFA token if the STS session is still valid.
The dumps for mysql and postgres can be downloaded per database. This
means we can skip the download of ignored DBs like transition.

I'm not sure but it could be worth looking at aws s3 presign for some of this too.
That way you'd get a presigned URL using your assumed role and GET the object after that.

Nice idea @davbo but most of the work is using aws s3 sync, so might not be worth it.
Good call @dwhenry, updated.


Pagination Styling

Describe the bug
The styling for the pagination component is now available in the Figma file.
Add These styles to the We Count website
To Reproduce
n/a
Expected behavior
Should look the same as Figma.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

@TeddTech This looks like a duplicate of https://github.com/inclusive-design/wecount.inclusivedesign.ca/issues/123.


Merge DynaMem into long horizon llm code

Description

Adds dynamic memory

Checklist

[ ] I have performed a self-review of my code
[ ] If it is a core feature, I have added thorough tests
[ ] I have added documentation for the changes
[ ] I have updated the README file if necessary
[ ] I have run on hardware if necessary

Screenshots (if applicable)
Add any relevant screenshots or screen recordings to help reviewers understand the changes.
Additional context
Add any other context or information about the pull request here.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.2 out of 3 committers have signed the CLA.:white_check_mark: hello-cpaxton:white_check_mark: peiqi-liu:x: grail-stretchYou have signed the CLA already but the status is still pending? Let us recheck it.


RC Test: curve-fitting:1.0.0-rc.5

@amanda-phet, @KatieWoe, curve-fitting/1.0.0-rc.5 is ready for RC testing. This is a second RC (but has rc.5 because I was running into a few issues with deployment) for curve fitting (see #431). This is being published for the first time. Document issues in https://github.com/phetsims/curve-fitting/issues and link to this issue.
Assigning to @ariel-phet for prioritization.

General RC Test

What to Test

Click every single button.
Test all possible forms of input.

Test all mouse/trackpad inputs.
Test all touchscreen inputs.

If there is sound, make sure it works.
Make sure you can't lose anything.
Play with the sim normally.
Try to break the sim.
Test all query parameters on all platforms. (See QA Book for a list of query parameters.)
Download HTML on Chrome and iOS.
Make sure the iFrame version of the simulation is working as intended on all platforms.
Make sure the XHTML version of the simulation is working as intended on all platforms.
Complete the test matrix.
Don't forget to make sure the sim works with Legends of Learning.
Check this LoL spreadsheet and notify AR or AM if it not there.
If this is rc.1 please do a memory test.
When making an issue, check to see if it was in a previously published version
If there is a console available, check for errors and include them in the Problem Description.

Focus and Special Instructions
I was told to include here that any ongoing maintenance patches should be included as a part of this RC.

Issues to Verify

[ ] Pointer Area Dilated for Mouse

These issues should have the "status:ready-for-qa" label. Check these issues off and close them if they are fixed. Otherwise, post a comment in the issue saying that it wasn't fixed and link back to this issue. If the label is "status:ready-for-review" or "status:fixed-pending-deploy" then assign back to the developer when done, even if fixed.

Link(s)

Simulation
iFrame
XHTML
Test Matrix
Legends of Learning Harness

FAQs for QA Members

There are multiple tests in this issue... Which test should I do first?
Test in order! Test the first thing first, the second thing second, and so on.

How should I format my issue?

We typically assign the developer who opened the issue in the QA repository.

My question isn't in here... What should I do?
You should:

Consult the QA Book.
Google it.
Ask Katie.
Ask a developer.
Google it again.
Cry.

@ariel-phet It looks like the multiple commits since 1.0.0-rc.1 (for automated maintenance) relate to either detecting mobile safari (for full-screen, etc.) and applying the gradient fix correctly for iOS/iPadOS.

@KatieWoe although this test is mainly a spot check see the last comment...any recent maintenance release testing must be done on this RC, these can be of a "spot check" nature, but the various patches should be verified.

QA credits are needed.
Jaspe Arias, Logan Bray, Megan Lai, Liam Mulhall, Kathryn Woessner

Aside from https://github.com/phetsims/QA/issues/439#issuecomment-544676226 and possibly https://github.com/phetsims/scenery/issues/1006,
QA is done


Stuck on scroll

using your wonderful library on this site http://moniquemaloney.com/
locally it works just as intended but live only loads after you scroll. not sure what's up.

Hmm, that site doesn't seem to be loading for me... I get my default ISP not found page instead.

Yep, seems to be down according to this too: http://www.downforeveryoneorjustme.com/www.moniquemaloney.com

try again?
On Wed, Jan 28, 2015 at 10:00 PM, Mark Fischer, Jr.
<EMAIL_ADDRESS>wrote:

Yep, seems to be down according to this too: http://www.downforeveryoneorjustme.com/www.moniquemaloney.com
Reply to this email directly or view it on GitHub:
https://github.com/maxwellito/vivus/issues/23#issuecomment-71961043

Nice SVG :-)
I had a look, and I guess it's because you're using the default option values when you instantiate your Vivus object.
// Your code
new Vivus('floralpattern', {type: 'delayed', duration: 25});

So start  value is inViewport (default behavior). If you want is to load automatically once the page is loaded, set the value to autostart.
// What you should try
new Vivus('floralpattern', {
    start: 'autostart',
    type: 'delayed',
    duration: 25
});

that totally worked thanks so much.


Entrust permission caching

As discussed in issue #107

Most platforms passed, PHP 5.4 failed because of some composer dependencies. What should be done about 5.4?

We can drop 5.4. Can you change the travis requirements?

Done, and the Composer php requirement too. All tests are passing.

Awesome. Looks good.Thanks for the quick fix!

Hi Scott, unfortunately one of my applications runs in Laravel 4 and it does really a lot of permission checks per request. As I'm not really familiar yet with writing traits, how would you estimate the effort of rewriting this caching feature into the L4 branch ?


[$250] Android - Chat - List of emoji suggestions aren't visible in the self DM with the ":" method

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.21-1
Reproducible in staging?: Y
Reproducible in production?: Y
**Issue reported by:**Applause Internal Team
Action Performed:

Open the app
Log in with a new Gmail account
Open the self DM
Type ":smiley" into the composer

Expected Result:
List of emoji suggestions should appear.
Actual Result:
List of emoji suggestions aren't visible in the self DM with the ":" method. The emoji appears if you type in the full command ":smiley:".
Workaround:
Unknown
Platforms:

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

Screenshots/Videos
https://github.com/user-attachments/assets/e85daac8-6833-48da-90cb-09a8a4af8669

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~012a74b5c5a5d9e16c
Upwork Job ID:<PHONE_NUMBER>735071754
Last Price Increase: 2024-08-19

Issue OwnerCurrent Issue Owner: @allroundexperts

We think that this bug might be related to #vip-vsb

@CortneyOfstad  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

Sorry, was OoO, but reviewing this now!

I had this issue on iPhone as well so got eyes on this!

Hi! I am Jakub from Callstack - expert contributor group. I’d like to work on this job

Hey, I started to invesitigate that and for me this seems to be working like that by design
/**
 * Check if this piece of string looks like an emoji
 */
const isEmojiCode = (str: string, pos: number): boolean => {
    const leftWords = str.slice(0, pos).split(CONST.REGEX.SPECIAL_CHAR_OR_EMOJI);
    const leftWord = leftWords.at(-1) ?? '';
    return CONST.REGEX.HAS_COLON_ONLY_AT_THE_BEGINNING.test(leftWord) && leftWord.length > 2;
};```

we have this piece of code which is checking if the string provided to composer looks like an emoji and we are checking firstly if the string start with colon and then if the string have more then 3 letters. So now the question is what we want to do with it? Do nothing because it is done by purpose or we want to change it?

Thanks for looking into this @kubabutkiewicz! Going to close this as this appears to be by design. If the team decides to change this logic, we can definitely do that, but with VIP-VSB being such a low priority I don't see that happening now.
Thanks again!


Only export demographics if available

Codecov Report

Merging #368 (4ed8908) into main (a0e7cd2) will decrease coverage by 0.29%.
The diff coverage is 45.45%.

@@            Coverage Diff             @@
##             main     #368      +/-   ##
==========================================
- Coverage   95.92%   95.62%   -0.30%
==========================================
  Files          49       49
  Lines        1765     1760       -5
  Branches      229      232       +3
==========================================
- Hits         1693     1683      -10
- Misses         30       31       +1
- Partials       42       46       +4

Impacted Files
Coverage Δ

mne_nirs/statistics/_glm_level_first.py
85.71% <45.45%> (-1.57%)
:arrow_down:

...e_nirs/visualisation/_plot_nirs_source_detector.py
91.66% <0.00%> (-4.17%)
:arrow_down:

mne_nirs/visualisation/tests/test_visualisation.py
100.00% <0.00%> (ø)

...e_nirs/experimental_design/_experimental_design.py
100.00% <0.00%> (ø)

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 a0e7cd2...4ed8908. Read the comment docs.


#15: Implementation of PartialEq for minimap::Map

Are documentation tests allowed?

Codecov Report
Patch coverage: 75.00% and project coverage change: +0.18 :tada:

Comparison is base (7b68f51) 35.22% compared to head (2c3864f) 35.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   35.22%   35.40%   +0.18%
==========================================
  Files           7        8       +1
  Lines        1039     1045       +6
==========================================
+ Hits          366      370       +4
- Misses        673      675       +2

Impacted Files
Coverage Δ

src/lib.rs
14.53% <ø> (ø)

src/map.rs
87.85% <0.00%> (-1.43%)
:arrow_down:

src/ctors.rs
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@rultor merge

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 3min)

@Zefick many thanks! I don't document tests usually.

@Zefick BTW, I would rather move this new functionality to a separate eq.rs file, for better readability


What did i miss?

I can show the album view, but when i click the album, it get stuck.

[self.splitViewController showDetailViewController:nav sender:nil];

This function did not work.


Integration tests for guard methods

Test Scenario 1: Successful guard check
Steps to Reproduce:

Call the guard method with a valid pointer record, use cases, and destinations, and provide a successful onPass closure.
Await the response from the method call.

Expected Result:

The method should return a Deferred value.
The value should be true if the user has access, false otherwise.
The onPass closure should execute, indicating that the LicenseRecord was resolved against the use cases and destinations.

Possible Implementation:
guard(
    ptr: "example-ptr",
    usecases: [.attribution],
    destinations: ["https://example.com"],
    onPass: {
        // Perform the action allowed by the LicenseRecord.
    }
).await()

Test Scenario 2: Failed guard check with no onFail closure
Steps to Reproduce:

Call the guard method with an invalid pointer record, use cases, and destinations, and do not provide an onFail closure.
Await the response from the method call.

Expected Result:

The method should return a Deferred value.
The value should be false, indicating that the LicenseRecord could not be resolved against the use cases and destinations.
The method should throw an IllegalStateException, as the SDK is not initialized.

Possible Implementation:
try {
    guard(
        ptr: "invalid-ptr",
        usecases: [.attribution],
        destinations: ["https://example.com"]
    ).await()
} catch (e: IllegalStateException) {
    // Handle the exception.
}

Test Scenario 3: Failed guard check with onFail closure
Steps to Reproduce:

Call the guard method with an invalid pointer record, use cases, and destinations, and provide an onFail closure.
Await the response from the method call.

Expected Result:

The method should return a Deferred value.
The value should be false, indicating that the LicenseRecord could not be resolved against the use cases and destinations.
The onFail closure should execute, passing an error message describing the reason for failure.

Possible Implementation:
guard(
    ptr: "invalid-ptr",
    usecases: [.attribution],
    destinations: ["https://example.com"],
    onFail: { error ->
        // Handle the error.
    }
).await()

outdated


Force add incase gitignore and fix exits on warning

#patch#
Only question is if we want to use chalk or something similar to print out errors in color. I tried octo literals to color but apparently those aren't allowed in strict mode
Fixes: https://github.com/ciena-blueplanet/ember-cli-visual-acceptance/issues/27 , https://github.com/ciena-blueplanet/ember-cli-visual-acceptance/issues/25

Visual Acceptance tests:
No changes

Chalk is cool and already present via ember-cli, but that's totally a nice to have

Approved