Allow building Code OSS behind a proxy

Allows users behind a proxy to build Code - OSS from source.
The following edit to the wiki would also help people behind a proxy, even if it depends on Electron more than on Code - OSS. (Feel free to reword it as english is not my native language)

diff --git a/How-to-Contribute.md b/How-to-Contribute.md
index 19fb4bc..195cc87 100644
--- a/How-to-Contribute.md
+++ b/How-to-Contribute.md
@@ -110,6 +110,11 @@ cd vscode
 yarn
 ```

+

+If you are behind a proxy, first ensure that the https_proxy environment variable is set, and then run the following commands:

yarn config set https-proxy $https_proxy
yarn config set proxy $https_proxy
GLOBAL_AGENT_HTTPS_PROXY=$https_proxy ELECTRON_GET_USE_PROXY=
true yarn.

Other commands will remain the same
+
+

+
 Then you have two options:

 - If you want to build from inside VS Code, you can open the `vscode` folder and start the build task with Ctrl+Shift+B
(CMD+Shift+B on macOS). The build task will stay running in the background even if you close VS Code. If you happen to cl
ose VS Code and open it again, just resume the build by pressing Ctrl+Shift+B (CMD+Shift+B</kb
d>) again. You can kill it by running the `Kill Build VS Code` task or pressing Ctrl+D in the task terminal.

@microsoft-github-policy-service agree

Continuing in https://github.com/microsoft/vscode/pull/204543


error when  calling straw.straw python api

Got this error when using straw.straw on a local hic file
Traceback (most recent call last):
  File "dumpWGstraw.py", line 16, in <module>
    result = straw.straw(norm, hicname, '14', '22', 'BP', resolution)
  File "/net/noble/vol2/home/gurkan/bin/anaconda2/envs/straw/lib/python3.6/site-packages/straw/straw.py", line 574, in straw
    records=readBlock(req, idx['size'])
  File "/net/noble/vol2/home/gurkan/bin/anaconda2/envs/straw/lib/python3.6/site-packages/straw/straw.py", line 384, in readBlock
    if (countsnot != 0x7fc00000):
NameError: name 'countsnot' is not defined

Not sure what is causing this error. Straw was installed with pip as instructed in the github page.

Which version of straw are you using?

Could you send the hic file that caused this error to Aiden lab?
On Tue, Jul 2, 2019 at 7:43 PM gurkanyardimci<EMAIL_ADDRESS>wrote:

Got this error when using straw.straw on a local hic file
Traceback (most recent call last):
File "dumpWGstraw.py", line 16, in
result = straw.straw(norm, hicname, '14', '22', 'BP', resolution)
File "/net/noble/vol2/home/gurkan/bin/anaconda2/envs/straw/lib/python3.6/site-packages/straw/straw.py", line 574, in straw
records=readBlock(req, idx['size'])
File "/net/noble/vol2/home/gurkan/bin/anaconda2/envs/straw/lib/python3.6/site-packages/straw/straw.py", line 384, in readBlock
if (countsnot != 0x7fc00000):
NameError: name 'countsnot' is not defined
Not sure what is causing this error. Straw was installed with pip as
instructed in the github page.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/aidenlab/straw/issues/34?email_source=notifications&email_token=AAK2EW7F5D53P6RL2F5LCHTP5PRYNA5CNFSM4H5AU2PKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G5AFCUA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAK2EW56E2HUDE3OYEC6WATP5PRYNANCNFSM4H5AU2PA
.

--
Neva Cherniavsky Durand, Ph.D.
Staff Scientist, Aiden Lab
www.aidenlab.org

Hi Neva,
I think I had this problem with a specific hic file I got from a
publication repository (it was the SNIPER paper from Jian Ma's lab). I
think I did not run into this problem with other hic files.
Gurkan
nchernia<EMAIL_ADDRESS>29 Oca 2020 Çar, 10:55 tarihinde şunu
yazdı:

@gurkanyardimci https://github.com/gurkanyardimci we've done a bunch of
improvements (still working on them), can you let us know if this is still
a problem? and if so please email the hic file, we'd like to debug.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aidenlab/straw/issues/34?email_source=notifications&email_token=AHEVNLEIWVE5DUE6XUWJB6TRAHGKXA5CNFSM4H5AU2PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKIKTZI#issuecomment-579906021,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHEVNLGVPBQMJHG7KW344D3RAHGKXANCNFSM4H5AU2PA
.


Sometimes I can't see my teammates' bombs while online

When teammates use wands to release various bombs, they become invisible and cannot see the bombs, which can easily harm teammates

is this after using spell refreshes? you kind have to open and close your inventory for spell refresh to sync

这是在使用法术刷新之后吗？您必须打开和关闭您的库存才能同步法术刷新

The initial wand bomb can sometimes be invisible, and I feel like there is a chance to see the invisible bomb in each level


Document that the corner-specific border radius props are unavailable for iOS's Image component

The corner-specific border radius props are ignored by iOS's Image component:

borderTopLeftRadius
borderTopRightRadius
borderBottomLeftRadius
borderBottomRightRadius

This fact should be documented.

me too

Agreed, either documented or fixed.


Can't load babel/register with new Babel 6

I tried to update my project to babel 6 and gulp stopped working.
I have gulp 3.9.0 and when i try to run it throws error on requiring babel/register
[00:00:19] Failed to load external module babel-core/register
[00:00:19] Failed to load external module babel/register

(function (exports, require, module, __filename, __dirname) { import ...
                                                              ^^^^^^

SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:53:16)

when i try to run require from node repl it fails with following.
> require('babel/register')
Error: Cannot find module './lib/api/register/node-polyfill'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/Users/schovi/work/webpack-chrome-extension/node_modules/babel-core/register.js:1:80)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)

My guess is that something terrible has changed with new babel, but cant find what  :)

This is a problem with babel. Please open it there.

This was top of a search, so although this is the wrong place for it, here is the answer:
It now needs to be
require('babel-core/register');

See https://babeljs.io/docs/usage/require/
Additionally, babel no longer transpiles by default, so you might need a .babelrc like:
{
  "presets": [
    "es2015",
    "react"
  ]
}


CrateDB Guide Configuration: Do not set language = ""

Setting language = "" causes downstream havoc.
Exception occurred:
  File "/Users/amo/dev/crate/docs/cratedb-guides/docs/.crate-docs/.venv/lib/python3.12/site-packages/docutils/parsers/rst/directives/parts.py", line 75, in run
    name = language.labels['contents']
           ^^^^^^^^^^^^^^^
AttributeError: module 'docutils.languages' has no attribute 'labels'

https://github.com/crate/crate-docs-theme/blob/f33bb4f7d1249af58331c702538b4baa072da062/src/crate/theme/rtd/conf/cratedb_guide.py#L34-L36

Fixed with GH-491.


BinWrite trait cannot be made into an Object

Trying to sort out implementation of AsyncRead and AsyncWrite for the BinRead and BinWrite traits, i ran into a fun compiler message saying
the trait `BinWrite` cannot be made into an object
`BinWrite` cannot be made into an objectrustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B14%5D?14#file...)
mod.rs(47, 10): for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>

My choices here are to implement async for binrw, hack up a bunch of Stream conversions into std with blocking runners, or rewrite everything to legacy sync code and then rewrite it back sometime down the line when async is more widely supported... so figure trying to tackle asyncrw seemed the most productive but that error message looks like doing this would require some internal reorganization. I'm looking into implementing future/await as an interface for this but it looks like we need those traits in the mix to work with async runtimes around the byte ops (or more specifically, the streams on which this library operates).

The read side doesn't seem to throw errors:
impl Unpin for dyn BinRead {}
impl AsyncRead for dyn BinRead {
    fn poll_read(
        mut self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut ReadBuf<'_>,
    ) -> Poll<binrw::io::Result<()>> {
        AsyncRead::poll_read(Pin::new(&mut self), cx, buf)
    }
}

the write side gets upset by the dyn and Unpin pieces:
impl Unpin for dyn BinWrite {}
impl AsyncWrite for dyn BinWrite {
    fn poll_write(
        mut self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &[u8],
    ) -> Poll<binrw::io::Result<usize>> {
        AsyncWrite::poll_write(Pin::new(&mut self), cx, buf)
    }

    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<binrw::io::Result<()>> {
        AsyncWrite::poll_flush(Pin::new(&mut self), cx)
    }

    fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<binrw::io::Result<()>> {
        AsyncWrite::poll_shutdown(Pin::new(&mut self), cx)
    }
}

I’m sorry, I don’t understand this ticket. It looks like you are trying to implement tokio traits on binrw objects, which means you must be editing binrw directly, but then this isn’t a bug with binrw. How can I help you? Please also see https://github.com/jam1garner/binrw/discussions/178.

I’ll close this issue for now since it seems like there is nothing to be done from this side. If you can provide more information that will turn this into an actionable ticket, please feel free to reply any time!


Clean temp dir on error

:tada: This PR is included in version 4.2.0 :tada:
The release is available on:

v4.2.0
npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add Status Sticker

:tada: This issue has been resolved in version 1.0.0-alpha.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Update jest to v27.0.6

Also configure the testEnvironment globally as 'jsdom', so that the tests have everything they need.
Closes #476
Please review.

Thanks for the review, I rebased and will merge once green.


Question: DId you use a library for your drag and drop query building?

I'm a huge fan of the drag and drop query building - do you know off hand if there are any libraries that I can utilize in my other projects to get close to this functionality?
Thanks in advance,
Paul

@paul42 this UI is based on node-red which uses jquery and D3.
It's tightly coupled to the rest of the codebase, so it might be a lot of work to try and re-use it.
D3 is pretty straight forward itself though.

Awesome, thanks for pointing me towards those libraries! your project looks really cool, I'm looking forward to tinkering 👍


ERROR: Login failed, required headers not found

Hello, I am trying to run program with the following parameters and I am encountering this error:
EXPORT KEENETIC_USERNAME=test
EXPORT KEENETIC_PASSWORD=some_password
EXPORT KEENETIC_BASE_URL='http://<IP_ADDRESS>'
DEBUG=1 ./keencli show system
(2024-12-03T19:27:46) DEBUG: KEENETIC_BASE_URL env is set, ignore the value from the --baseurl flag
(2024-12-03T19:27:46) ERROR: Login failed, required headers not found

User has all the permissions set in the UI and is able to log in via Web UI. What I am missing?

Ok, I've found the reason, it works via external KeenDNS URL.


debug notarize options

[X] I have read the contribution documentation for this project.
[X] I agree to follow the code of conduct that this project follows, as appropriate.
[ ] The changes are appropriately documented (if applicable).
[ ] The changes have sufficient test coverage (if applicable).
[ ] The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:
Add debug output for electron-notarize options

These options can contain credentials, we should avoid logging them

Okay. I assumed it wasn't a concern because the Packager Options debug output here could contain the same credentials


files.catbox.moe

Would it be possible to get files.catbox.moe removed from the list? I'm not sure why it would be on the list in the first place

This is upstream.  The files.catbox.moe comes to us via Digitalside Threat Intel and you can make a case for this here on their issues page.
cc @DavidDonzo Thanks David.

This is upstream.  The files.catbox.moe comes to us via Digitalside Threat Intel and you can make a case for this here on their issues page.
cc @DavidDonzo Thanks David.

This is upstream.  The files.catbox.moe comes to us via Digitalside Threat Intel and you can make a case for this here on their issues page.
cc @DavidDonzo Thanks David.

This is upstream.  The files.catbox.moe comes to us via Digitalside Threat Intel and you can make a case for this here on their issues page.
cc @DavidDonzo Thanks David.

@davidonzo

@davidonzo

Okay i'll make an issue over there thankyou

Okay i'll make an issue over there thankyou

3 malicious url detected in the last week.
Anyway, I can remove the domain withelisting it, considering the main site pourpose.
Next run the domain will be removed from the domain list, but related malicious urls will be shared in the urls list.

3 malicious url detected in the last week.
Anyway, I can remove the domain withelisting it, considering the main site pourpose.
Next run the domain will be removed from the domain list, but related malicious urls will be shared in the urls list.


"Open" button does not seem to work.

Hi!
I am trying to test Figproxy with the first example however I am having some problems.
When I press the "open" button beside "Serial port" it doesn't change to "close" so Im guessing something is wrong. I have given access to the program and also changed the default browser to figproxy when the popup came up. In the settings (Desktop & Dock) it says that the default browser is Safari and I can't change it manually to Figproxy, is it supposed to be like that?
Do you have any idea what could be wrong. Im happy to provide more information!
The arduino parts seem to work (pressing button and getting in serial monitor).
Thanks!

I figured out what my issue was. I was using the browser version instead of the application.


Widgets public API

Resolves #90
Assuming one has created a dashboard (dashboard = cdb.deepInsights.createDashboard('#selector', vizJSON))
From there the public API is:
// to access an existing widget:
widgetModel = dashboard.widgets.get('some-id') // returns a widget model object

// To add a new widget (each has their own arguments, see changeset for details):
widgetModel = dashboard.widgets.newCategoryModel();
widgetModel = dashboard.widgets.newHistogramModel();
widgetModel = dashboard.widgets.newFormulaModel();
widgetModel = dashboard.widgets.newTimeSeriesModel();

// To remove a widget (internally cleans up owned objects and removes widget view)
widgetModel.remove();

@xavijam @javierarce can you pair-review? :bow: since you're the first users of this
cc @javisantana @alonsogarciapablo FYI

Let me ask a question. The public API is a factory that creates a model, right? is that model a Backbone Model or it just have remove method?

Returns a concrete backbone model.
dashboard.widgets is a service/factory responsible to, given a set of params, validate and create a concrete widgetModel.
We was also though to put a dashboard.widgets.remove(someWidgetModel) method too to remove the widgets from the dashboard, but because the remove is needed to be implemented too on the widgetModel, to clean up itself, we finally opt to try this approach: create through the dashboard and remove by itself.

ok, thanks

If a editor widget model has been edited, how should we update the deep-insight widget model?

Since the actual requirements for what needs to be updated are not entirely clear yet (until we actually start implementing the forms) we left that out of scope (see issue desc).
That said, since we're returning the actual widget backbone models, one have access need to modify their state.  The caveat with this is that one would have to go to the source here to know what methods/attrs there are.
We should decide if we want to continue down this path, or hide away internals behind some semantic API on these returned objects. There are pros/cons with either approach.

from my experience is better to go in the backbone way to be fast but if you can encapsulate funcionallity is much better, for example, sometimes is better to have:
widget.setBins([......])

than having
widget.set('bins', [....])

It does not take so much work and it helps in the long term

in the other hand you need to know something about the attributes to listen for changes, but I guess that's fine for the moment

Ok, so IMHO, we should merge it :+1:.

:+1: Looks good. Let's see how it works for real today :)

I like proposal of continuing with backbone models but add semantic methods when/where it makes sense. Let's keep it in mind going forward. :+1:


Issue-4356: Add Code Linter To utopia-php/websocket

What
This PR aims to resolve the issue https://github.com/appwrite/appwrite/issues/4356.
How

Code Linter has been added to utopia-php/audit repository.
All existing files are formatted as per the Linting rules.
PR Template has been followed as mentioned in https://github.com/utopia-php/ab/pull/7.

Fixes https://github.com/appwrite/appwrite/issues/4356

@Meldiron Please review and suggest changes, if any. Thanks.
cc: @stnguyen90 @christyjacob4

Thank you so much for the PR 🤩. We're adding the hacktoberfest-accepted label to ensure this PR counts towards your Hacktoberfest contributions count. With that said, please stay active on this PR to address any comments once you receive a review. Happy Hacktoberfest! 🎃

@Rutam21 thanks a lot for your contributions during Hacktoberfest 2022!
Please reach out to me on our Discord server if you would like to claim your Appwrite swags! As a way of saying thank you, we would also love to invite you to join the Appwrite organization on GitHub. Please share your GitHub username with us on Discord.


Add pyjxslt to Combine ansible/VM build

Tackling XSLT 2.0 transformations (https://github.com/WSULib/combine/projects/1#card-5491669) has been a big one, but it looks like setting up a small, lightweight, but powerful server for XSLT transformations might be a good option.  pyjxslt provides that functionality.
So, we'll want one installed, and always running.  Currently hardcoded to port 6767 in Combine, so might be a reasonable port to start with the installation running as.

it's a pip install
command line is: pyjxslt 6767
probably needs to run from the combine conda env.?

Added for Vagrant build, but looks like we might still need it for Ansible build

Realized it also needs a log directory at /var/log/pyjxslt, and here's an example entry for supervisor:
[program:pyjxslt]
command = /opt/miniconda/envs/combine/bin/pyjxslt 6767
stdout_logfile = /var/log/pyjxslt/pyjxslt.stdout
stderr_logfile = /var/log/pyjxslt/pyjxslt.stderr
autostart = true
user = combine

Appears to be done!


address CI issues and improve tracing

Summary
This PR addresses CI issues (alongside SDK changes https://github.com/black-parrot-sdk/black-parrot-sdk/commit/2e1a9d3e680f532a413c7f3d839eebb5081da0bd) and improves various nonsynth tracers.
This PR supersedes #924 as its changes are included here.

This PR also captures #931 to address long timing path through the network xbar.


Update Vulnerability Handling Process

What changes were proposed in this pull request?
The policy for handling vulnerabilities is overdue. Removing the SECURITY.md can make it fallback to the ASF policy page
How was this patch tested?
NO

Thank you @weiting-chen


[ZEPPELIN-5680] Remove spark-dependencies module

What is this PR for?
This PR removed module spark-dependencies and also update interpreter.sh
What type of PR is it?
[Improvement]
Todos

[ ] - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-5680

How should this be tested?

CI pass

Screenshots (if appropriate)
Questions:

Does the licenses files need update? NO
Is there breaking changes for older versions? No
Does this needs documentation? No

I'm just curious that this means we need to download spark manually if we would like to use Spark Interpreter?

@zjffdu agreed. In an early stage, it was needed for expanding our community by providing easiest way to use Zeppelin itself but thing's are changed. BTW, we also need to change our guide if we remove it, don't we?

LGTM especially, it will help us to reduce whole build time as well.
By the way, if we forgive embedded mode, can we remove downloading python and R as well? We will replace them by setting paths based on SPARK_HOME. WDYT?

Good point @jongyoul  let me update that.

@jongyoul After looking at the code, I realise that downloading pyspark and sparkr can not be removed, they are required for unit test.

@jongyoul After looking at the code, I realise that downloading pyspark and sparkr can not be removed, they are required for unit test.

I have an idea about it. In my understanding, we are downloading Spark binary while running CI. Can we replace it? I'll also check it :-)

I don't think so, we should enable user to run unit test locally.

@zjffdu Yes, correct. Agreed. Then, does the download work only for testing? I just wonder if it's possible to reduce our whole binary or not. If it can, we'd better consider it sincerely.

@jongyoul I mean the downloading in this maven pom.xml (https://github.com/apache/zeppelin/blob/master/spark/interpreter/pom.xml#L355), it is only for unit test. It won't increase the zeppelin binary distribution as long as we remove spark-dependencies module

@zjffdu Thank you for the clarification. LGTM

BTW, I've checked the CI but the error is ...
ImportError: cannot import name 'Markup' from 'jinja2' (/usr/share/miniconda/envs/python_3_with_R/lib/python3.7/site-packages/jinja2/__init__.py) expected:<SUCCESS> but was:<ERROR>

Is it good?

The error above might be related to #4331

That's right @jongyoul Now, CI is passed


fix(pci.projects): allow instances to be flex

MSB-117

Even if the ticket is still in quality check I will merge this pull request in order to be able to provide a new release branch.
Feel free to correct me it shouldn't handled as is.
Otherwise use label to give more information about ticket status.
Thanks!


Sema: Don't warn on casts that change an ObjC generic's parameters.

Some ObjC generic APIs rely on covariance, and until we devise a systematic solution for SR-1522, you need to force-cast to get the types to line up in cases like this:
func foo(x: GenericClass<NSMutableString>) {
  let x2 = x as! GenericClass<NSString>
  takeGenericClassOfNSString(x2)
}

We currently raise a "cast will never succeed" warning, which is wrong because the dynamic cast can't even check the generic parameters. Suppress this warning. Fixes rdar://problem/26398265.

@swift-ci Please test

@swift-ci Please test and merge

@swift-ci Please test

@swift-ci Please test

Linux failure is in Foundation, and shouldn't be related. @parkera Do you know about this failure?
TestFoundation/TestNSJSONSerialization.swift:693: error: TestNSJSONSerialization.test_serialize_number : XCTAssertEqual failed: ("Optional("[0,-1]")") is not equal to ("Optional("[0,1]")") -

I encountered the same failure on #2645 -- that test has been failing for a while now.

Thanks for confirming @modocache .

@jckarter It looks like something changed with how clang is optimizing the CFNumber code. I looked into it a bit last night but didn't get very far.


Add support for *BLOB types as well as TINYTEXT

Add support for the following types:

Blueprint::tinyText() -- TINYTEXT
Blueprint::tinyBlob() -- TINYBLOB
Blueprint::blob() -- BLOB (like Illuminate's Blueprint::binary())
Blueprint::mediumBlob() -- MEDIUMBLOB
Blueprint::longBlob() -- LONGBLOB

Update README.md:

Add sample usage of new methods
Remove references to Illuminate methods to highlight new features
Correct package.json to composer.json

I would prefer to have binary('name') create a BLOB field and binary('name', 10) create a BINARY(10) field for compatibility purposes, but at this point it's a matter of whether it's worse to break compatibility for users of schema-extended or for users of Illuminate. :man_shrugging: At least the limitation is documented in README.md.
The important thing is now I can have BLOB and BINARY in the same table. :slightly_smiling_face:

@rafis Is this still supported?


Prevent fatal exception when not logged in

TwitterSession being null caused a fatal exception when attempting to create a new tweet.

Archiving repo


VSOL 2802RH bridge giving wrong ip after boot

Hello guys, i hope any1 can help me with this issue
the problem is relatively simple, i could clone my ONT with success on VSOL 2802RH but everytime it boot up, the ip that is provided via Ipv4 is something in the range of 10.XXX.XX.X.
I know that this private ip is related to vlan 220 that is responsable to VOIP.
im current using a openwrt router, so i just have to restart Wan interface and the right internet ip in the range of 172.XXX.X.XX or 220.XXX.X.XX is provided, and sucessive restarts after that always return a internet ip.
The only anoying issue is that everytime VSOL reboots i have to restart WAN. is there any config in VSOL that could exclude that 10.XXX.X.XX ip from pass trough bridge?
OBS: i tried setup some scripts on openwrt to exclude that voip ip but none have worked

In WAN, you can use VLAN 220 and assign to a different LAN port.


Properly setup EditorProperties in arrays and dictionaries

Now arrays will correctly identify their type (e. g. IntArray(size 0) instead of just (size 0)) when editing arrays/dictionary elements in the inspector.
Also, made possible to pick any resource in those as well, instead of just being able to load one from the filesystem.

Thanks!


second way to fix activity leak after configuration change

In continuation to this PR
https://github.com/adrielcafe/voyager/pull/415
I think this solution is better and i also checked it in our project
I don't actually see where onDispose in AndroidScreenLifecycleOwner would be called when configuration changes. And I think it's the client of AndroidScreenLifecycleOwner responsibility to decide when to dispose it
@DevSrSouza what to you think?

Thanks for the fix


Adjust repos for uyuni-tools

When deploying a containerized server the uyuni-tools are unconditionally taken from ContainerUtils repo. This needs to be configured depending on the product to install and the OS distrubution.

Also adding a variable to configure the image tag would be needed.

Changes merged in sumaform: https://github.com/uyuni-project/sumaform/pull/1475


Add public BuildCondition method for associations

[x] Do only one thing
[x] Non breaking API changes
[x] Tested

What did this pull request do?
This PR proposes to add a public variant of the buildCondition() method, as it would allow dynamic query creation, for cases when the user would like do additional filtering, ordering or limiting before calling Find() or Count() on the transaction statement.
User Case Description
I'm creating a connector between GORM and GraphQL, where associated fields on a model are returned as the result of a pagination function, which allows the user to apply ORDER, LIMIT and WHERE conditions before returning a page of associated records.
As the association struct does not allow for setting these before calling the Find() and Count() methods, having access to this private buildCondition() method is the next best way to be able to construct this query.

Hello @greencoda,
You should be able to call db.Order("xxx").Association("XXX").Find(&xxx), or perhaps you could implement Scopes support for Association mode?

Hi @jinzhu
My usecase is in building a paged result set for GraphQL resolver, and I need to run the Count() method both before and after the filtering conditions are applied:
func findAssociatedModels[M any](ctx context.Context, resolver *Resolver, obj any, associatedObj M, associationColumn string, objPath string, first *int, after *int, filterParams []filterParam, sortParams []sortParam) (M, int, int, error) {
	var (
		total       int64
		filtered    int64
		association = resolver.db.Model(&obj).Association(associationColumn)
	)

	if association.Error != nil {
		return *new(M), 0, 0, association.Error
	}

	stmt := buildCondition(association)

	err := stmt.Count(&total).Error
	if err != nil {
		return *new(M), 0, 0, err
	}

	stmt, appliedFilterCount := applyFiltering(stmt, filterParams)
	if appliedFilterCount > 0 {
		err = stmt.Count(&filtered).Error
		if err != nil {
			return *new(M), 0, 0, err
		}
	} else {
		filtered = total
	}

	if first != nil {
		stmt = stmt.Limit(*first)
	}

	if after != nil {
		stmt = stmt.Offset(*after)
	}

	for _, sort := range sortParams {
		stmt = stmt.Order(sort.field + " " + formatSortDirection(sort.direction))
	}

	for _, preload := range resolver.preloadableFieldCollector.CollectPreloads(ctx, objPath) {
		stmt = stmt.Preload(preload)
	}

	err = stmt.Find(&associatedObj).Error
	if err != nil {
		return *new(M), 0, 0, err
	}

	return associatedObj, int(total), int(filtered), nil
}

This is my whole method, where the buildCondition function is copied from GORM's code as-is, since it's not exposed.

Hi @jinzhu
My usecase is in building a paged result set for GraphQL resolver, and I need to run the Count() method both before and after the filtering conditions are applied:
func findAssociatedModels[M any](ctx context.Context, resolver *Resolver, obj any, associatedObj M, associationColumn string, objPath string, first *int, after *int, filterParams []filterParam, sortParams []sortParam) (M, int, int, error) {
	var (
		total       int64
		filtered    int64
		association = resolver.db.Model(&obj).Association(associationColumn)
	)

	if association.Error != nil {
		return *new(M), 0, 0, association.Error
	}

	stmt := buildCondition(association)

	err := stmt.Count(&total).Error
	if err != nil {
		return *new(M), 0, 0, err
	}

	stmt, appliedFilterCount := applyFiltering(stmt, filterParams)
	if appliedFilterCount > 0 {
		err = stmt.Count(&filtered).Error
		if err != nil {
			return *new(M), 0, 0, err
		}
	} else {
		filtered = total
	}

	if first != nil {
		stmt = stmt.Limit(*first)
	}

	if after != nil {
		stmt = stmt.Offset(*after)
	}

	for _, sort := range sortParams {
		stmt = stmt.Order(sort.field + " " + formatSortDirection(sort.direction))
	}

	for _, preload := range resolver.preloadableFieldCollector.CollectPreloads(ctx, objPath) {
		stmt = stmt.Preload(preload)
	}

	err = stmt.Find(&associatedObj).Error
	if err != nil {
		return *new(M), 0, 0, err
	}

	return associatedObj, int(total), int(filtered), nil
}

This is my whole method, where the buildCondition function is copied from GORM's code as-is, since it's not exposed:
func buildCondition(association *gorm.Association) *gorm.DB {
	var (
		queryConds = association.Relationship.ToQueryConditions(association.DB.Statement.Context, association.DB.Statement.ReflectValue)
		modelValue = reflect.New(association.Relationship.FieldSchema.ModelType).Interface()
		tx         = association.DB.Model(modelValue)
	)

	if association.Relationship.JoinTable != nil {
		if !tx.Statement.Unscoped && len(association.Relationship.JoinTable.QueryClauses) > 0 {
			joinStmt := gorm.Statement{DB: tx, Context: tx.Statement.Context, Schema: association.Relationship.JoinTable, Table: association.Relationship.JoinTable.Table, Clauses: map[string]clause.Clause{}}
			for _, queryClause := range association.Relationship.JoinTable.QueryClauses {
				joinStmt.AddClause(queryClause)
			}
			joinStmt.Build("WHERE")
			if len(joinStmt.SQL.String()) > 0 {
				tx.Clauses(clause.Expr{SQL: strings.Replace(joinStmt.SQL.String(), "WHERE ", "", 1), Vars: joinStmt.Vars})
			}
		}

		tx = tx.Session(&gorm.Session{QueryFields: true}).Clauses(clause.From{Joins: []clause.Join{{
			Table: clause.Table{Name: association.Relationship.JoinTable.Table},
			ON:    clause.Where{Exprs: queryConds},
		}}})
	} else {
		tx.Clauses(clause.Where{Exprs: queryConds})
	}

	return tx
}

It would be nicer if we didn't have to maintain a copy of this code, and we could use the one that's already implemented in GORM's code


⚠ Default Queue Latency has degraded performance

In 2b6f8b8, Default Queue Latency ($WORKER_HEALTH_URL/default/latency) experienced degraded performance:

HTTP code: 200
Response time: 167 ms

Resolved: Default Queue Latency performance has improved in 01b0365 after 8 minutes.


Rprox doesn't pipx --upgrade

It's a real hassle to try and upgrade rprox. A full uninstall and reinstall is necessary. Is that because we're using git? We can't upgrade? Has to be a Pypi package?

Interesting! For pip it's like this:
pip install git+https://github.com/in03/proxima
pip install git+https://github.com/in03/proxima --upgrade

For pipx:
pipx install git+https://github.com/in03/proxima
pipx upgrade proxima

However....
Since I haven't been doing semver and I've been relying on version constraint keys and git commit SHAs for versioning,
I get this error:
PS C:\Users\Caleb> pipx upgrade proxima
⚠  Overwriting file C:\Users\Caleb\.local\bin\proxima.exe with C:\Users\Caleb\.local\pipx\venvs\proxima\Scripts\proxima.exe
proxima is already at latest version 0.1.0 (location: C:\Users\Caleb\.local\pipx\venvs\proxima)

Pipx uses the package version, not the commit sha to determine version. Unfortunately, you can't use --force to download and reisntall anyway.
Looks like another good reason to start using semver.


Empty DataFrame constructor disregards dtype kwarg

This is new in 0.16.1
In [1]: import pandas as pd

In [2]: pd.__version__
Out[2]: '0.16.1'

In [3]: f = pd.DataFrame({'a': [0, 10, 20, 30, 40], 'b': [5, 4 ,3, 2, 1]},
                          index=[1, 2, 3, 4, 4])

In [4]: f.dtypes
Out[4]:
a    int64
b    int64
dtype: object

In [6]: pd.DataFrame(columns=['a', 'b'], dtype=f.dtypes).dtypes
Out[6]:
a    object
b    object
dtype: object

Also other mechanisms to convey dtype information yield uninformative errors
In [7]: pd.DataFrame(columns=['a', 'b'], dtype={'a': 'i4', 'b': 'f4'}).dtypes
ValueError: entry not a 2- or 3- tuple

In [8]: pd.DataFrame(columns=['a', 'b'], dtype=[('a', 'i4'), ('b', 'f4')]).dtypes
NotImplementedError: compound dtypes are not implementedin the DataFrame constructor

Is there a way to create an empty DataFrame with given dtypes in 0.16.1?

Oh, and this works on 2.7 but not on 3.4
In [11]: sys.version_info
Out[11]: sys.version_info(major=3, minor=4, micro=3, releaselevel='final', serial=0)

you can also do this
In [61]:
data = [(1,1.2), (2,2.3)]
dtype = [('a','i4'),('b','f4')]
a = np.array(data, dtype=dtype)
pd.DataFrame(a).dtypes

Out [61]:
a      int32
b    float32
dtype: object

Hrm, that's odd.  Tests started failing for me only recently.  This appeared to be the reason.  Looks like I'll have to dig more deeply.  Thanks for the rapid response.  Closing.

And thanks for the suggestions.  Those look like sane workarounds.

I had tests start failing with 0.16.1 also on empty DataFrames. For me the difference comes down this differing behavior even when both create empty DataFrames:
In [2]: pd.DataFrame(columns=['x']).x
Out[2]: Series([], Name: x, dtype: object)

In [3]: pd.DataFrame({'x': []}).x
Out[3]: Series([], Name: x, dtype: float64)

Note the different dtypes of the columns.

@jiffyclub these are not the same as the default for a list (even if empty, when no dtype is specified) is to return a float dtype
In [2]: np.array([]).dtype
Out[2]: dtype('float64')

In the first case (your [2]), however you haven't specified anything at all, so object is correct.

Yeah, I think that the new behavior is appropriate.
Both @jiffyclub and I were surprised by the change, but that's a small price to pay for progress.


BUILDKITE_GIT_CLONE_MIRROR_FLAGS not working

Ran into this when trying to get clone flags working in mirror mode. I tried using the environment variable listed in the docs (https://buildkite.com/docs/agent/v3/configuration), but it wasn't working.
I got the BUILDKITE_GIT_CLONE_FLAGS working properly in the same method and when I ran a regular clean it worked just fine, but the BUILDKITE_GIT_CLONE_MIRROR_FLAGS never worked. Dug through the agent code and saw this env was missed during a refactor so I figured that was the issue.

@triarius sorry! first time contributing back to OSS in a while and was heads down so I didn't pay enough attention to the PR. There's an updated description. Let me know if I can add any more context


fix: make execution errors fatal

It does not make sense to retry the stage over and over if we encounter an execution error.

Codecov Report

Merging #1428 (87a734c) into main (495db6e) will decrease coverage by 29.13%.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@             Coverage Diff             @@
##             main    #1428       +/-   ##
===========================================
- Coverage   76.55%   47.43%   -29.13%
===========================================
  Files         356      356
  Lines       40743    40774       +31
===========================================
- Hits        31192    19342    -11850
- Misses       9551    21432    +11881

Flag
Coverage Δ

integration-tests
22.41% <ø> (-0.02%)
:arrow_down:

unit-tests
37.64% <ø> (-33.30%)
:arrow_down:

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

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


Task4

Issues https://github.com/ramnasidharta/graphical-recipe/issues/27 https://github.com/ramnasidharta/graphical-recipe/issues/25 https://github.com/ramnasidharta/graphical-recipe/issues/24

Just fixed some methods generating compiling warnings.


Add unix offset formatting filters

Would like a filter to format moment to unix timestamp formats. This would be a helpful utility for working with other types of functionality. My particular situation involves sorting elements via the Isotope library. http://isotope.metafizzy.co/sorting.html

You can use amDateFormat filter with the 'X' or 'x' format specifiers. Read here for more information about supported formatting options:
http://momentjs.com/docs/#/displaying/format/

Thank you for pointing that out


canvas background fill

use egui's extreme bg color to match the color of the active tab in the tab strip

This only happens on the egui right?

Happens on apple clients too - I think I removed a thing that added a global background to FFI clients to make it consistent with egui. I can prob find a decent place in canvas to draw a rectangle if you don't want to bother

I can do it this week, might be a bit tricky to figure out the layer order of that rect such that it doesn't interfere with the canvas render, the toolbar and any other UI overlay

https://github.com/lockbook/lockbook/pull/3004 does the job with the background but now the toolbars are the same color


AWSSDK.Extensions.NETCore.Setup 3.3.100 broke TryAddAWSService on netcoreapp2.1

Expected Behavior
We are using .NET Core 2.1 for our Lambda function and after today NuGet update AWSSDK.Extensions.NETCore.Setup to 3.3.100, .TryAddAWSService stop working with IAmazonService and cannot build our project
We expect it to build properly with out error
Current Behavior
We are using DI with the following under our Lambda's startup.cs
Configuration = new ConfigurationBuilder()
    .AddEnvironmentVariables()
    .Build();

_services = new ServiceCollection()
    ...
    .TryAddAWSService<IAmazonSQS>(new AWSOptions { Region = RegionEndpoint.APSoutheast1 })
    .TryAddAWSService<IAmazonS3>(new AWSOptions { Region = RegionEndpoint.APSoutheast1 });

These were working perfectly with AWSSDK.Extensions.NETCore.Setup version 3.3.6.
But today after updating to 3.3.10, there is an error at ... AWSOptions { Region ... which said

The type 'RegionEndpoint' is defined in an assembly that is not referenced. You must add a reference to assembly 'AWSSDK.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null'.

If I change that to
_services = new ServiceCollection()
    ...
    .TryAddAWSService<IAmazonSQS>()
    ...

The error will point to .TryAddAWSService saying

The type 'Amazon.SQS.IAmazonSQS' cannot be used as type parameter 'T' in the generic type or method 'ServiceCollectionExtensions.TryAddAWSService(IServiceCollection, ServiceLifetime)'. There is no implicit reference conversion from 'Amazon.SQS.IAmazonSQS' to 'Amazon.Runtime.IAmazonService'.

We have tried AWSSDK.S3 and AWSSDK.SQS with version 3.3.100 and the older version and it seems the issue only related to AWSSDK.Extensions.NETCore.Setup version 3.3.100
Steps to Reproduce (for bugs)
Update AWSSDK.Extensions.NETCore.Setup to 3.3.100 through NuGet
Your Environment

AWSSDK.Core version used: 3.3.100
Service assembly and version used: 3.3.100
Operating System and version: Windows 10
Visual Studio version: 16.0.0 RC.3
Targeted .NET platform: Core 2.1

.NET Core Info

.NET Core version used for development: .NET Core 2.1
.NET Core version installed in the environment where application runs: .NET Core 2.1
Output of dotnet --info:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview3-010431
 Commit:    d72abce213

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17763
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\

Host (useful for support):
  Version: 3.0.0-preview3-27503-5
  Commit:  3844df9537

.NET Core SDKs installed:
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.302 [C:\Program Files\dotnet\sdk]
  2.1.400 [C:\Program Files\dotnet\sdk]
  2.1.401 [C:\Program Files\dotnet\sdk]
  2.1.402 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.500 [C:\Program Files\dotnet\sdk]
  2.1.502 [C:\Program Files\dotnet\sdk]
  2.1.503 [C:\Program Files\dotnet\sdk]
  2.1.504 [C:\Program Files\dotnet\sdk]
  2.1.505 [C:\Program Files\dotnet\sdk]
  2.1.600 [C:\Program Files\dotnet\sdk]
  2.1.601 [C:\Program Files\dotnet\sdk]
  2.1.602 [C:\Program Files\dotnet\sdk]
  2.2.100 [C:\Program Files\dotnet\sdk]
  2.2.102 [C:\Program Files\dotnet\sdk]
  2.2.104 [C:\Program Files\dotnet\sdk]
  2.2.105 [C:\Program Files\dotnet\sdk]
  2.2.200 [C:\Program Files\dotnet\sdk]
  2.2.201 [C:\Program Files\dotnet\sdk]
  2.2.202 [C:\Program Files\dotnet\sdk]
  3.0.100-preview3-010431 [C:\Program Files\dotnet\sdk]

....

Contents of project.json/project.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" />
    <PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.5.0" />
    <PackageReference Include="Amazon.Lambda.SQSEvents" Version="1.1.0" />
    <PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.3.100" />
    <PackageReference Include="AWSSDK.S3" Version="3.3.100" />
    <PackageReference Include="AWSSDK.SQS" Version="3.3.100" />
    <PackageReference Include="Dapper" Version="1.60.1" />
    <PackageReference Include="DotLiquid" Version="2.0.298" />
    <PackageReference Include="Ensure.That" Version="8.1.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
  </ItemGroup>

  ...

</Project>

Thanks for reporting the issue. I have reproduced the problem and working on a fix.

I just pushed out version <IP_ADDRESS> that fixes the issue. Thanks again for reporting the issue and sorry for the inconvenience.

@normj Thanks, just pulled <IP_ADDRESS>, seems working


Migrate to new version of purescript-aeson. Get rid of bridge-aeson-helpers.

Changes required to migrate to new version of purescript-aeson.
Get rid of bridge-aeson-helpers. Minor cleanups.
Pre-review checklist

[x] All code has been formatted using our config (make format)
[x] Any new API features or modification of existing behavior is covered as defined in our test plan
[ ] The changelog has been updated under the ## Unreleased header, using the appropriate sub-headings (### Added, ### Removed, ### Fixed), and the links to the appropriate issues/PRs have been included

@rynoV

Template also needs updating I believe

Not in this PR, will do before cutting a release


Added DuongDieuPhap.ImageGlass v<IP_ADDRESS>

[X] Have you signed the Contributor License Agreement?
[X] Have you checked that there aren't other open pull requests for the same manifest update/change?

[X] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Hmm, so is this error because of SmartScreen?

/azp run


ENV constants are not accessible

Hi,
I have cloned this project and followed all installation steps. I am able to see the first screen and others too.
But When I tried to login it thrown an error below::
0: cURL error 3: <url> malformed (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I went for debug and found that ENV('APP_URL') always returns null. Actually every env constants are returned as null. I am using windows 7 and wamp.

this mean the url you are providing is not proper, check your api url.

I know the api url is not proper. But the issue is, it is not loading from .env file. I went to print each variable defined in env was returned as null. I had to load .env file manually in bootstrap/app.php to make to working.

try updating laravel framework.


feat(tree): Added maximum binary tree problem.

Coverage remained the same at 100.0% when pulling e3f67ab70491d15459b7e440fd627b719174f987 on maximum-binary-tree into 12129f4eb2f9e75e098760a87fe90f5782e4dc5f on master.


int cannot be dereferenced

During compilation Screen Share it shows this error:
C:\code\screenshar\screensharing\src\main\java\io\agora\rtc\ss\ScreenSharingClient.java:86:
error: int cannot be dereferenced
intent.putExtra(Constant.FRAME_RATE, vec.frameRate.getValue());
^

how did you define intent? looks like you are trying to migrate the code into your own project and something went wrong? i tried our own demo and it's working fine.


Feature request: specify cognito client id

Right now next-fortress uses a regex to get the token /CognitoIdentityServiceProvider\..+\.idToken/.test(key)
Because I have multiple cognito clients I test with (dev, prod) it would be nice if I could pass in the web client ID to use there so we don't have to wildcard finding the token in cookies.
Thanks for the cool library!

@revmischa Thanks for your valuable idea.
I would like to be able to specify the client id as you suggested.

I have decided that it would be better to make it required rather than optional. Due to the destructive change in the type of the makeCognitoInspector argument, I' ll make the next release a major version.
#138

Amazing, thanks for this!


Draft) Expose shell's environment to extension

Resolves: https://github.com/microsoft/vscode/issues/227467
Bash/zsh/pwsh, etc -> capability -> env change event -> main thread -> env change event -> extension host  -> SI change event (env, cwd, shell integration) -> ext

TODO: Create setting so that we dont always pass in environment variables to extension host by default.
TODO: Dont even want to run env function in shell script without the setting.


Tree: Square-Ten Tree

Problem Link- https://www.hackerrank.com/challenges/square-ten-tree/problem
Category- Trees
Difficulty Level- Hard
In Language:

[ ] JAVA

Only java solution is missing. I want to add.

Go ahead


Getting Started with React Navigation on a Web Project

I'm working on a project where I want to implement react navigation on the web to help share code across platforms. I'm trying to read the source code of the docs website to get an understanding of what is necessary to wrap the react navigation router in a browser compatible component. Is this source code what you would want to include in your own project to implement React Navigation on a website? Thanks!
https://github.com/react-community/react-navigation/blob/master/website/src/BrowserAppContainer.js

@bsbechtel Hi! did you figure out how to get it to run on web?

I wasn't able to. I'm using meteor to deliver my bundle to the client, and something in React Navigation seems to break the bundle when it arrives on the client. I'm not sure if there is a global namespace conflict, or what exactly is going on. I only spent a few hours on it, however, as I was mainly just testing things out.

I see no worries then, thanks for getting back 👍
I'll just go with React Router 4 for web, too bad react navigation web docs aren't enough guidance to reuse navigation on web 👎

I'm going to try using react-navigation for a web project.

I've gotten this to work.  I basically used this boilerplate as a starting point and got my app up and running with webpack:
https://github.com/ndbroadbent/react-native-web-webpack
Then I used normal redux-based react-nativigation (tab navigator and stack navigator) and everything just worked out of the box.
Nothing custom, and no BrowserAppContainer.js was needed.  That threw me off for a while, but it isn't required.  I think if you want to to url based routing you might have to start to head in that direction but without that you shouldn't need it.

@hiddentao Good luck :)
@udfalkso Thank you for your comment :) Yup, I definitely need url routing to work as well, but since the docs are still very lacking, I started integrating React Router 4 for web. It's a pain to have 2 different routing libraries (one native, one web), but their docs are pretty solid and community very active 👍

Pinging OP @bsbechtel  since this issue is quite old and related to an old version of the lib. If no answer I'll close in 7 days.
Moreover, sadly with the new roadmap to v1.0 we are freezing the web support by the library since there is a lot of work that has an higher priority.

@kelset No worries. In an ideal world, it would be nice to have support for this, but having a solid RN router is a higher priority. Looking forward to seeing how things pan out and the new v1.0! Good luck!

As now there's react-native-web and it's getting quite popular, does anyone found a way to make it work on both worlds?

Any update on this? I've noticed react-navigation-web but unsure as to its stability.

Any update on this? I've veered towards react-native-web (thanks @rodrigobdz) and hopefully it will work. Has anybody tried [https://github.com/react-navigation/react-navigation-web]? I'm unsure as to its stability before taking a leap of faith.

Any update on this? I've veered towards react-native-web (thanks @rodrigobdz) and hopefully it will work. Has anybody tried ? I'm unsure as to its stability before taking a leap of faith.

@rodrigofeijao I have gotten react-navigation working for react-native-web (both web and mobile). See https://github.com/meth/app/tree/dev/src/ui/nav

Is this still not solved? I am trying to get hash or browser history, and it seems I still need to use react-router.
I'm thinking of creating an adapter, that is equal to react-navigation for most of userland code, and plug react-router behind, until this get solved within react-navigation. Or maybe one have already done that?
Thanks and best!

@kopax Any luck here? I'm trying to add the same features to my app...

Is this still not solved? I am trying to get hash or browser history, and it seems I still need to use react-router.
I'm thinking of creating an adapter, that is equal to react-navigation for most of userland code, and plug react-router behind, until this get solved within react-navigation. Or maybe one have already done that?
Thanks and best!

Did it work with a hash router?


ramp~

mode:
wrap <0> (default)
reset <1>
clip <2>
loop <0, 1>
susloop <>

ramp2~?
line2~?
create another object for sustain loop?

ramp~ is too complicated already... if you change it, make it simpler!!!

wavetable~... frequency and susloop

"line" like object is for envelops and setting time in ms

how about the extra "loop~" object?

create  0-wrap, 1-cli-, 2-reset
create example with what we got
create susloop~
create wave~ with index input

ramp~ "-mode 1" not working

-off not working


After Updating to Latest Version 24hrs and Current data Chat view is Not shown

After Updating to 0.17.0
24hrs and Current data Chat view is Not shown

Nothing changed in the tracker or collection code. What do you see in the network panel on your website?

Tracker, realtime, data collections are working well
no errors on console log
the issue only on chat view (the current day and 24 hours)

Can you send the queries from the umami dashboard? Like pageviews? Also, are you using MySQL?

are you using MySQL? - yes
Select today
2020-08-29T10:01:16.728380Z	 6244 Connect	root@localhost on analytics using TCP/IP
2020-08-29T10:01:16.728545Z	 6244 Query	SELECT @@socket
2020-08-29T10:01:16.728852Z	 6245 Connect	root@localhost on analytics using Socket
2020-08-29T10:01:16.729005Z	 6245 Query	SELECT @@max_allowed_packet
2020-08-29T10:01:16.729146Z	 6245 Query	SELECT @@wait_timeout
2020-08-29T10:01:16.729257Z	 6244 Quit
2020-08-29T10:01:16.729321Z	 6245 Query	SELECT @@max_allowed_packet
2020-08-29T10:01:16.729417Z	 6245 Query	SELECT @@wait_timeout
2020-08-29T10:01:16.729529Z	 6245 Query	SELECT 1
2020-08-29T10:01:16.730088Z	 6245 Prepare	select DATE_FORMAT(convert_tz(created_at,'+00:00','+05:30'), '%Y-%m-%d %H:00:00') t,
        count(distinct session_id) y
      from pageview
      where website_id=?
      and created_at between ? and ?
      group by 1
      order by 1
2020-08-29T10:01:16.730207Z	 6245 Execute	select DATE_FORMAT(convert_tz(created_at,'+00:00','+05:30'), '%Y-%m-%d %H:00:00') t,
        count(distinct session_id) y
      from pageview
      where website_id=1
      and created_at between '2020-08-28 18:30:00' and '2020-08-29 18:29:59.999000'
      group by 1
      order by 1
2020-08-29T10:01:16.771036Z	 6246 Connect	root@localhost on analytics using TCP/IP
2020-08-29T10:01:16.771178Z	 6225 Quit
2020-08-29T10:01:16.771371Z	 6246 Query	SELECT @@socket
2020-08-29T10:01:16.771795Z	 6247 Connect	root@localhost on analytics using Socket
2020-08-29T10:01:16.771926Z	 6247 Query	SELECT @@max_allowed_packet
2020-08-29T10:01:16.772053Z	 6247 Query	SELECT @@wait_timeout
2020-08-29T10:01:16.772146Z	 6246 Quit
2020-08-29T10:01:16.772281Z	 6247 Query	SELECT @@max_allowed_packet
2020-08-29T10:01:16.772398Z	 6247 Query	SELECT @@wait_timeout
2020-08-29T10:01:16.772520Z	 6247 Query	SELECT 1
2020-08-29T10:01:16.772904Z	 6247 Prepare	select DATE_FORMAT(convert_tz(created_at,'+00:00','+05:30'), '%Y-%m-%d %H:00:00') t,
        count(*) y
      from pageview
      where website_id=?
      and created_at between ? and ?
      group by 1
      order by 1
2020-08-29T10:01:16.772960Z	 6247 Execute	select DATE_FORMAT(convert_tz(created_at,'+00:00','+05:30'), '%Y-%m-%d %H:00:00') t,
        count(*) y
      from pageview
      where website_id=1
      and created_at between '2020-08-28 18:30:00' and '2020-08-29 18:29:59.999000'
      group by 1
      order by 1

select 24 hrs
2020-08-29T09:59:43.036701Z	 6222 Connect	root@localhost on analytics using TCP/IP
2020-08-29T09:59:43.036878Z	 6222 Query	SELECT @@socket
2020-08-29T09:59:43.037216Z	 6223 Connect	root@localhost on analytics using Socket
2020-08-29T09:59:43.037334Z	 6223 Query	SELECT @@max_allowed_packet
2020-08-29T09:59:43.037433Z	 6223 Query	SELECT @@wait_timeout
2020-08-29T09:59:43.037516Z	 6222 Quit
2020-08-29T09:59:43.037599Z	 6223 Query	SELECT @@max_allowed_packet
2020-08-29T09:59:43.037677Z	 6223 Query	SELECT @@wait_timeout
2020-08-29T09:59:43.037926Z	 6223 Prepare	select sum(t.c) as "pageviews",
        count(distinct t.session_id) as "uniques",
        sum(case when t.c = 1 then 1 else 0 end) as "bounces",
        sum(t.time) as "totaltime"
      from (
         select session_id,
           DATE_FORMAT(created_at, '%Y-%m-%d %H:00:00'),
           count(*) c,
           floor(unix_timestamp(max(created_at)) - unix_timestamp(min(created_at))) as "time"
         from pageview
         where website_id=?
         and created_at between ? and ?
         group by 1, 2
     ) t
2020-08-29T09:59:43.038024Z	 6223 Execute	select sum(t.c) as "pageviews",
        count(distinct t.session_id) as "uniques",
        sum(case when t.c = 1 then 1 else 0 end) as "bounces",
        sum(t.time) as "totaltime"
      from (
         select session_id,
           DATE_FORMAT(created_at, '%Y-%m-%d %H:00:00'),
           count(*) c,
           floor(unix_timestamp(max(created_at)) - unix_timestamp(min(created_at))) as "time"
         from pageview
         where website_id=1
         and created_at between '2020-08-28 10:30:00' and '2020-08-29 10:29:59.999000'
         group by 1, 2
     ) t
2020-08-29T09:59:43.042793Z	 6219 Quit

install umami on august 25
server - Hetzner Cloud VPS
Mysql 8
full site pageview and visitors result

I think it may be an issue with how the timezone is calculated. But you should still be recording data so that's good. I'll work on a fix.

@mskian This should be fixed in the latest version v0.19.0

@mikecao Thanks now it shows the graph on chat


useReplicant contains stale values when using a different repName/namespace.

Currently, swapping out the namespace using a prop does not cause useReplicant to use the new replicant name. My suspicion is that its because the internal useEffect never runs on subsequent re-renders.
Here's a gist where this problem manifests. The "OBSControlView" object always binds to the first namespace, even if the prop changes.
https://gist.github.com/CarlosFdez/ab3ab575a62c048daacb8f6b38a6f2d3
My suggestion is to add repName as a param to line 39. I wanted to ask here for the go-ahead before doing it.

Trying to test it locally so I cloned the project. Getting a cryptic error when I try to run it. Using yarn and the newest version of node (11.14), adding an exception to engines so that yarn can install it. This happens even if I run build first
PS D:\Programming\Node\use-nodecg> yarn run test
yarn run v1.15.2
$ run-s format-test lint
$ yarn format --list-different
$ prettier "**/*.{js,ts,tsx,md,yml,yaml,json}" --list-different
.codecov.yml
.eslintrc.json
.prettierrc.js
.travis.yml
CHANGELOG.md
cjs\index.d.ts
cjs\index.js
cjs\useListenFor\index.d.ts
cjs\useListenFor\index.js
cjs\useReplicant\index.d.ts
cjs\useReplicant\index.js
cjs\useReplicantOnce\index.d.ts
cjs\useReplicantOnce\index.js
esm\index.d.ts
esm\index.js
esm\useListenFor\index.d.ts
esm\useListenFor\index.js
esm\useReplicant\index.d.ts
esm\useReplicant\index.js
esm\useReplicantOnce\index.d.ts
esm\useReplicantOnce\index.js
jest.config.js
README.md
src\__tests__\use-replicant.tsx
src\index.ts
src\useListenFor\index.ts
src\useReplicant\index.ts
src\useReplicantOnce\index.ts
tsconfig.cjs.json
tsconfig.esm.json
tsconfig.json
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "format-test" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Recently my impression is we probably should change the API to pass replicant instance instead of replicant name.
It allows more flexibility for declaring replicant, unless we duplicate the API in this library, which is not ideal. Also it allows reusing one replicant over different components.

@CarlosFdez @tedkulp I would be interested in what you think about the idea above.

In the case of this bug, I was able to fix it locally by adding replicant as a dependancy to useEffect, which is what the linter recommended I do anyways. Only problem is that I couldn't get the tests to work on my machine so no way I can submit a PR.
As far as that API change is concerned though, I'm fine with that, however I can imagine that being a bit verbose for the common case. Luckily, its pretty easy to detect if the first parameter is a string or if its a replicant, so I think its very possible to support both.
IMO my personal thought is that if breaking changes are not something we're concerned about, it should support both  useReplicant(replicant) and useReplicant(name, replicantOptions).

Supporting both with the same hook would make more confusion than the benefit (of either) IMO. The way would be making another hook function.
As for the tests, the problem seems to be because of the lack of .prettierignore file. Would you be able to add that too?

Probably so, not particularly agreeing but that said I'm used to function overloading since nearly every language out there supports it, so its your call. That said replicantOptions is much more flexible than intialValue, as it also contains its own initial value. Your call either way.
Turns out that locally I solved it by using repName, not replicant. I'll have to see if nodecg caches Replicant instances cause otherwise it'll cause problems, especially if a version is made that takes a replicant directly.
What would I put in prettierignore? Never used prettier before.

For prettierignore, you can just copy paste the content of gitignore.

Didn't work, same issue just with less entries in the list.
PS D:\Programming\Node\use-nodecg> yarn run test
yarn run v1.15.2
$ run-s format-test lint
$ yarn format --list-different
$ prettier "**/*.{js,ts,tsx,md,yml,yaml,json}" --list-different
.codecov.yml
.eslintrc.json
.prettierrc.js
.travis.yml
CHANGELOG.md
jest.config.js
README.md
src\__tests__\use-replicant.tsx
src\index.ts
src\useListenFor\index.ts
src\useReplicant\index.ts
src\useReplicantOnce\index.ts
tsconfig.cjs.json
tsconfig.esm.json
tsconfig.json
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "format-test" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I can look into it if you could submit the PR.

luckily npx jest works, its just that npm run test doesn't call it. There's a broken test in the current version so might as well try to fix it.

I do have a few questions though. Currently I'm trying to fix the bug as its not decided what the new API will be. It also turns out that what I reported isn't exactly right. The problem isn't with namespaces, its with replicant name prefixes. nodecg-obs calls it a namespace but its not actually a namespace other the hood, its just a replicant name prefix ('compositor:websocket transmssion:websocket etc).

So NodeCG if you use the same replicant name it will return the same replicant. Do we emulate this behavior in the tests, or do I pass repName as a dependency in useEffect to sidestep everything? Either works.

General question, what's the recommended way of testing if a value is null OR undefined? Normally I use == null as it coalesces but the linter isn't liking that for this test. The answers I find on the internet are extremely verbose.

I'd prefer using === always. If coalescing is preferred I would use !something though you have to make sure you are OK to negate empty string and 0 too.

If I use [replicant] as the dependancy in line 39 in useReplicant/index.ts, it'll work in an actual environment but fail the tests I added because your test always reuses the same replicant instance. In an actual nodecg environment, the same rep name returns the same replicant instance, changing it returns a new one.
However I just added eslint-plugin-react-hooks and it seems it wants me to use replicant regardless, so the question has been answered: mimic live functionality.

Didn't work either (eslint no-negated-condition). This is the current code:

const RunnerName: React.FC<RunnerNameProps> = (props): JSX.Element => {
	const { prefix } = props;
	const repName = (!prefix) ? 'currentRun' : `${prefix}:currentRun`;
	const [currentRun] = useReplicant(repName, {runner: {name: 'foo'}});
	return <div>{currentRun.runner.name}</div>;
};

Checking for undefined is extremely annoying in javascript...

Just gonna solve 2 like this. I really don't like javascript's coalescing capability but unfortunately I can't change it: const repName = ${prefix || 'default'}:currentRun;. Sending a PR soon.

Fixed in #7


Multiple move files destinations

I have two folders that contain tv shows, one folder contains shows that i watch alone and the other is shows that I watch with my fiance. is there a way we can create multiple destinations and then have an option after renaming the file that will allow us to choose where to move the file?
essentially it would run like this:
run script on video file
choose search results from list
confirm new filename
choose new destination
etc.

You could create two different config files with different paths and then run them slightly seperately
tvnamer --config=/home/zakphi/programsforme.json Filthy.dirty.honeys.S01E02.mkv
tvnamer --config=/home/zakphi/programsforbothofus.json Soppy.romcom.S01E02.mkv
you could even create aliases for these makeing calling them easier

thanks for the help. now i just gotta figure out how the moving of files work


[REFACTOR] Worldpay payments integration

Feature Description
WorldPay payments integration currently makes use of modular APIs which gives more control over the integration. This approach is not best compatible with HyperSwitch due to WP's 3DS flows - which requires sending PAN (card numbers) in multiple places. For on_session transactions, this would contribute to the added complexity since data is not stored in such transactions (or stored for ~15mins in redis cache).
Migrating to WP's standard payments API follows payment resource creation in an uniform way.
Possible Implementation
Migrate from modular APIs [ref] to standard payment APIs [ref].
Have you spent some time checking if this feature request has been raised before?

[X] I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

[X] I have read the Contributing Guidelines

Are you willing to submit a PR?
Yes, I am willing to submit a PR!

Propagate the refusal codes as error codes in HyperSwitch.

3

Make payment_method_type non-mandatory
Fix PM filters

# 4

Add cypress test cases

# 5

Use automatic capture by default

# 6

Mandates
Webhooks

# 7 Bugs

Use 4 digit expiry year

Re-opening for https://github.com/juspay/hyperswitch/pull/6468


Add Prometheus metrics

Problem
We do not have metrics, we cannot monitor backups successful/failed attempts, we cannot alert about that, we cannot get a sum of occupied storage.
Preferred solution
There is a big block in the documentation that covers monitoring and metrics. Just follow the docs.

Added to the main.


Fix for inconsistency between GetX and Getx when using the package name.

Hi,
Hope this is okay. Noticed a few inconsistencies where sometimes it was Getx and sometimes it was GetX. Small change but my first pull-request into open-source :)
Think it makes the docs a little nicer to read.

Thanks for your contribution.
Could you please include the change in the readme for other languages?


Add Azure Device Update APIs

closing to merge main first so we don't have files that looked changed


Add docs and integration test for native asyncpg connection pool

Port of https://github.com/GoogleCloudPlatform/cloud-sql-python-connector/issues/1180, we should update async usage guide of README to showcase both SQLAlchemy connection pool and native asyncpg connection pool.

Description
As of asyncpg v0.30.0 it is now possible to pass a custom connection function into the asyncpg.create_pool method, which means it is now possible to use the cloudsql connector without SQLAlchemy, thus maintaining the original API of the asyncpg pool (which is rather important if you are migrating an existing codebase that made heavy use of an asyncpg pool).
Might be helpful to future readers of the docs to reflect that here.

cc @d1manson who contributed this awesome feature to asyncpg 👏

FYI: Cloud SQL PR
https://github.com/GoogleCloudPlatform/cloud-sql-python-connector/pull/1182


Wanted ebooks: Add BBC 2015 collection

Corrected errors as per request

Looks good to me, though I’ll wait for Alex to merge.
In future, you don’t need to close and open a new PR. You can either rework your original commit(s) and force push, or just add a new commit with the requested changes. It’ll update the existing PR. But no problem!

Thanks for the advice re PRs, I realised the issue was an incomplete or failed merge of my fork or my local repository and rather than risk compounding the problem (or spend the time investigating beyond that) I thought it best to just make a fresh one. But I'm not as experienced with how force pushes work with forks and PRs on Github so I'll bear this in mind! Apologies for not noticing the errors in the first place.

Thanks!


The contrast ratio is < 4.5:1 for the here links in "EXPERIMENTAL WARNING" view

OS: Win11
Bicep Version: v0.26.170
Repro Step:

Create the main.zip file and open it in VS Code.
Right click the file -> Click "Show Deployment Pane to the Side".
Expand "EXPERIMENTAL WARNING" view.
Check the contrast ratio for the here links.

Expect:
The contrast ratio is > 4.5:1 for the here links.
Actual:
The contrast ratio is < 4.5:1 for the here links.

This UI is going away.  Won't fix.


[WFLY-3988] Authorization denied for authenticated users when @PermitAll...

... is used on EJB JAX-WS endpoint

@asoldano any update on this?

@asoldano any updates?

Let's go ahead and close this PR, and I can file a new one if I make progress on this.


[T4A3][T16-B4]ZhaoTianze

Extract commonalities from Phone, Email and Address classes into a parent class called Contact.

ready for review

@tankztz added some comments here. Please close this PR after reading the comments


Add License file

The main repo includes a license file but this one does not.
We should probably add it to this repo.
https://github.com/ddev/ddev/blob/master/LICENSE

Hey
@bmartinez287 can I work on this issue??

yeah, welcome to the DDev community.

@bmartinez287
thanks


0.4.1 build 1 - downpin OFFTK

Checklist

[x] Temporary fix for https://github.com/openforcefield/openff-qcsubmit/issues/230
[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

As a note - I was looking for the psi4 version where the PCM API changed so I could add a run_constrained, but since that doesn't affect the source code/API of QCSubmit (it's a passed-through API change from another package - a change in the key name in a dictionary - which only requires changes to QCSubmit tests and not its source) I'm not going to put in psi4 constraints on this package.


ENH: _lib._util: make _lazywhere compatible with Array API

Reference issue
Along the lines of gh-18668
What does this implement/fix?
This makes scipy._lib._util compatible with the array API. Also:

The output dtype is now determined based on the types required by the outputs (rather than the types of the inputs).
The input validation s is simplified.
~cond is now computed only once.
np.empty is now used to initialize the output array when f2 is specified (instead of np.full).

For small (NumPy) arrays (<10k elements), this version tends to be faster. For moderate arrays (say 1 million elements), the execution time depends a lot on cond. Its distribution is spread out over more than order of magnitude, but is slightly (<6%) slower on average (gmean) with this PR. I'd be happy to find out that this can be improved, but I've studied it, and it seems to be accounted for by the use of array API-compatible features. Fortunately, it seems to asymptote to <7% slower as the array size increases.
Temporary memory is increased, but that seems necessary if we want to determine the output type based on what is going to be output (rather than the type of the input).
Additional information
Todo:

unit tests (especially with array API array)
When inputs are scalars, _lazywhere should return a scalar rather than 0D array. Is there a canonical way to determine the difference between the two (since the size, shape, and ndim are the same)?
The output is an ndarray even when the input is an array_api.Array. That's because xp.full and xp.empty create ndarrays. I'm assuming that's supposed to happen for now?

Once gh-18927 merges, I'll add this test:
    @array_api_compatible
    @given(arrays=arrays, fillvalue=fillvalue, p=p)
    def test_basic(self, arrays, fillvalue, p, xp):
        arrays = xp.asarray(arrays)
        fillvalue = xp.asarray(fillvalue)

        def f(*args):
            return args[0]

        def f2(*args):
            return args[0]*0.5

        if arrays.ndim <= 1:
            arrays = (arrays,)

        rng = np.random.default_rng(84268954369357456)
        cond = rng.random(size=arrays[0].shape) > p

        res = _lazywhere(cond, arrays, f, fillvalue)
        ref = np.where(cond, f(*arrays), fillvalue)
        assert_allclose(res, ref)

        res = _lazywhere(cond, arrays, f, f2=f2)
        ref = np.where(cond, f(*arrays), f2(*arrays))
        assert_allclose(res, ref)

@tupui is this how you'd use @array_api_compatible here?
Note that https://scipy.github.io/devdocs/dev/api-dev/array_api.html doesn't say where to import that decorator from.
This PR will add
  from scipy.conftest import array_api_compatible
  ...

to the top of the example on that page.

@tupui is this how you'd use @array_api_compatible here?

Yes 👍
Also maybe np.where should also be converted to xp.where.

doesn't say where to import that decorator from.
This PR will add
from scipy.conftest import array_api_compatible
...
to the top of the example on that page.

Good catch 👍 Yes this is the correct import.

Thanks. Yes, I planned to test this once the Hypothesis PR merges, but it looks like adding xp.asarray to the cond variable will save me some trouble.

I do note that mixing hypothesis in here does make things a bit tricky on top of array API. Testing still fails on the device (with CuPy) with that patch because we can't just use assert_equal(res, ref) with host-device transfers.

Is the problem inherent to Hypothesis, or is it that np.testing.assert_equal doesn't work for arbitrary array types?

Testing still fails on the device (with CuPy) with that patch because we can't just use assert_equal(res, ref) with host-device transfers. I haven't checked if we've merged an official way to do that just yet, I know I did draft some ideas.

My PR incorporated your code Tyler:
if "cupy" in xp.__name__:
    import cupy as cp
    cp.testing.assert_allclose(...)
else:
    assert_allclose(...)

For the fft PR, I actually asked @lucascolley to make a standalone helper function that we can use elsewhere more easily.

is it that np.testing.assert_equal doesn't work for arbitrary array types

Yeah, it is more on that side, but CuPy does provide its own testing functions, etc. That would be a bigger decision to use though: https://docs.cupy.dev/en/stable/reference/generated/cupy.testing.assert_array_equal.html
For torch I also noticed this, which you'll see when you start iterating I suppose:
scipy/_lib/_util.py:93: in _lazywhere
    cond, arrays = args[0].astype(bool, copy=False), args[1:]
E   AttributeError: 'Tensor' object has no attribute 'astype'

I was able to patch around that with:
--- a/scipy/_lib/_util.py
+++ b/scipy/_lib/_util.py
@@ -90,7 +90,7 @@ def _lazywhere(cond, arrays, f, fillvalue=None, f2=None):
         raise ValueError("Exactly one of `fillvalue` or `f2` must be given.")

     args = xp.broadcast_arrays(cond, *arrays)
-    cond, arrays = args[0].astype(bool, copy=False), args[1:]
+    cond, arrays = xp.astype(args[0], xp.bool, copy=False), args[1:]

     temp1 = f(*(arr[cond] for arr in arrays))

But then hypothesis started doing stuff that seemed hard for the torch control flow to handle:
scipy/stats/tests/test_distributions.py:9455: in test_basic
    @given(arrays=arrays, fillvalue=fillvalue, p=p)
        f          = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7f1018bee0c0>
        self       = <scipy.stats.tests.test_distributions.TestLazywhere object at 0x7f1018ac7410>
        xp         = <module 'torch' from '/home/treddy/python_venvs/py_311_scipy_dev/lib/python3.11/site-packages/torch/__init__.py'>
scipy/stats/tests/test_distributions.py:9458: in test_basic
    fillvalue = xp.asarray(fillvalue)
E   ValueError: given numpy array has byte order different from the native byte order. Conversion between byte orders is currently not supported.
E   Falsifying example: test_basic(
E       self=<scipy.stats.tests.test_distributions.TestLazywhere object at 0x7f1018ac7410>,
E       xp=<module 'torch' from '/home/treddy/python_venvs/py_311_scipy_dev/lib/python3.11/site-packages/torch/__init__.py'>,
E       arrays=array([0.], dtype=float16),
E       fillvalue=array(0., dtype='>f2'),
E       p=0.0,
E   )

AttributeError: 'Tensor' object has no attribute 'astype'

astype is in the array API. Shouldn't array_api_compat be taking care of that @tupui?

I see astype is a function, not a method. Got it.

astype is in the array API. Shouldn't array_api_compat be taking care of that @tupui?

I think it is with the small patch I added

I see astype is a function in the Array API, not a method. Got it.

Yes that's the main design change, everything is a function instead of a method in the Array API standard.

For the fft PR, I actually asked @lucascolley to make a standalone helper function that we can use elsewhere more easily.

For my PR (which will appear on the main repo soon) this has been added to conftest.py:
def set_assert_allclose(xp=None):
    if 'cupy' in xp.__name__:
        import cupy as cp
        return cp.testing.assert_allclose
    else:
        return npt.assert_allclose

That's because xp.full and xp.empty create ndarrays.

Is this true? With xp == numpy.array_api they seem to create numpy.array_api arrays for me:

In [1]: import numpy as np

In [2]: import numpy.array_api as npa
<ipython-input-2-47d1a2ee1bbf>:1: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.
  import numpy.array_api as npa

In [3]: a = npa.asarray([1, 2, 3, 4])

In [4]: cond = a > 2

In [5]: isinstance(cond, npa._array_object.Array)
Out[5]: True

In [6]: isinstance(cond, np.ndarray)
Out[6]: False

In [7]: x = npa.full(cond.shape, fill_value=npa.nan)

In [8]: isinstance(x, npa._array_object.Array)
Out[8]: True

In [9]: isinstance(x, np.ndarray)
Out[9]: False

Perhaps xp is not being set correctly?

I don't think they are set to numpy.array_api. IIUC, For now, they are using array_api_compat.numpy on purpose.

Very sorry if I am misunderstanding, but I think that xp should be set to numpy.array_api as long as the global switch SCIPY_ARRAY_API is not False.
The first line of _lazywhere is xp = array_namespace(cond, *arrays), which calls array_namespace in _array_api.py:

if not _GLOBAL_CONFIG["SCIPY_ARRAY_API"]:
        # here we could wrap the namespace if needed
        return array_api_compat_numpy

    arrays = [array for array in arrays if array is not None]

    compliance_scipy(*arrays)

    return array_api_compat.array_namespace(*arrays)

Which in turn calls array_namespace from array_api_compat:

namespaces = set()
    for x in xs:
        if isinstance(x, (tuple, list)):
            namespaces.add(array_namespace(*x, _use_compat=_use_compat))
        elif hasattr(x, '__array_namespace__'):
            namespaces.add(x.__array_namespace__(api_version=api_version))
        elif _is_numpy_array(x):
            _check_api_version(api_version)
            if _use_compat:
                from .. import numpy as numpy_namespace
                namespaces.add(numpy_namespace)
            else:
                import numpy as np
                namespaces.add(np)
        # ...
    if not namespaces:
        raise TypeError("Unrecognized array input")

    if len(namespaces) != 1:
        raise TypeError(f"Multiple namespaces for array inputs: {namespaces}")

    xp, = namespaces

    return xp

Since hasattr(x, '__array_namespace__') is True when x is a numpy.array_api._array_object.Array, numpy.array_api is returned by this function.
Am I missing something? It seems to me that xp would only be array_api_compat.numpy for a numpy.array_api._array_object.Array input if SCIPY_ARRAY_API was set to False, which shouldn't be the case whenever -b is used with python dev.py test.

Very sorry if I am misunderstanding, but I think that xp should be set to numpy.array_api as long as the global switch SCIPY_ARRAY_API is not False.

array_api_compat.numpy is returned when the flag is False. This is so that normal NumPy arrays are made compatible with the standard. Hence we can start adding compatibility.
When the flag is on. The namespace that we get back is coming from the the function array_api_compat.array_namespace. Here it's making the decision for NumPy to give us back the portable version, i.e. array_api_compat.numpy as well.

from scipy._lib.array_api_compat.array_api_compat import array_namespace
Here you are actually calling array_api_compat. array_namespace . But we have our own:
from scipy._lib._array_api import array_namespace

Ok yes, so array_api_compat.array_namespace is indeed going to return numpy.array_api if you pass in numpy.array_api. This is a pass through to allow to check the standard. So there is no wrapping. Internally, the compat library look for __array_namespace__ and as it founds it for numpy.array_api, it directly returns this namespace.

Yep that's it. Matt, was this with the SCIPY_ARRAY_API flag set or not?

The output is an ndarray even when the input is an array_api.Array. That's because xp.full and xp.empty create ndarrays.

Yeah, not set.

@lucascolley A few thoughts about the new _array_api assertions:

Should they be named something different in case they need to be used in the same file as np.testing assertions? Here, I've done the import assert_equal as xp_assert_equal.
Does passing the assertion already imply that the result and reference are the same array type? If not, should it?
What do you think of adding options that check the shape and dtype of the resulting array? I might suggest that this be part of the default comparison behavior to force us to be more careful about these things as we head into the Array API world.

Should they be named something different in case they need to be used in the same file as np.testing assertions? Here, I've done the import assert_equal as xp_assert_equal.

I'm happy to add the xp_ prefix.

Does passing the assertion already imply that the result and reference are the same array type? If not, should it?

I don't think that this is implied - maybe it should be. However, testing that the correct namespace is returned should always be done at least somewhere other than these functions. For fft I have a separate class called TestNamespaces, but these could be worked into the existing tests to be slightly more efficient if needed. These tests use Tyler's _assert_matching_namespaces.

What do you think of adding options that check the shape and dtype of the resulting array? Although a little inconvenient if all elements of an array are supposed to be the same number (e.g. 0), I would even suggest that checking shape and dtype should be part of the default comparison behavior to force us to be more careful about these things as we head into the Array API world.

Yep, this sounds good. I'm not sure whether they even need to be options, we should probably always do this. torch does this anyway, so I'll just need to change np and cupy.
I'll make a follow-up PR with these improvements. We can always come back and tweak again as needed.

However, testing that the correct namespace is returned should always be done at least somewhere other than these functions.

Why shouldn't it be baked into all the tests that also check the numerical results?

why can't it just be baked into all the tests that also check the numerical results?

Some functions will be tested with these assertions, some won't. To me, having a separate class to test namespaces, or at least a separate line in the test functions with that explicit purpose, will ensure that we have full coverage of these checks.
For groups of functions which are all tested using these functions, having it baked in would be sufficient, but I don't really like how implicit that is.
What do you think?

I thought that python dev.py test -t scipy/_lib/tests/test__util.py -b all was passing for me yesterday, but now I am getting a failure with torch, where res1 and ref1 are both nan:

_____________________________________________________________________________________ TestLazywhere.test_basic[torch] ______________________________________________________________________________________
scipy/_lib/tests/test__util.py:364: in test_basic
    @pytest.mark.filterwarnings('ignore::RuntimeWarning')  # overflows, etc.
        f          = <function given.<locals>.run_test_as_given.<locals>.wrapped_test at 0x7fc27cc78040>
        self       = <scipy._lib.tests.test__util.TestLazywhere object at 0x7fc27d02c2d0>
        xp         = <module 'torch' from '/home/lucas/mambaforge/envs/scipy-dev/lib/python3.11/site-packages/torch/__init__.py'>
/home/lucas/mambaforge/envs/scipy-dev/lib/python3.11/site-packages/hypothesis/core.py:790: in execute_once
    result = self.test_runner(data, run)
        data       = ConjectureData(VALID, 61 bytes)
        example_kwargs = None
        expected_failure = None
        is_final   = True
        print_example = True
        run        = <function StateForActualGivenExecution.execute_once.<locals>.run at 0x7fc27d00bba0>
        self       = <hypothesis.core.StateForActualGivenExecution object at 0x7fc27d02c4d0>
        test       = <function TestLazywhere.test_basic at 0x7fc27cc77e20>
        text_repr  = None
/home/lucas/mambaforge/envs/scipy-dev/lib/python3.11/site-packages/hypothesis/executors.py:47: in default_new_style_executor
    return function(data)
        data       = ConjectureData(VALID, 61 bytes)
        function   = <function StateForActualGivenExecution.execute_once.<locals>.run at 0x7fc27d00bba0>
/home/lucas/mambaforge/envs/scipy-dev/lib/python3.11/site-packages/hypothesis/core.py:786: in run
    return test(*args, **kwargs)
        a          = []
        args       = ()
        argslices  = {'dtype': (6, 7), 'n_arrays': (0, 1), 'p': (7, 18), 'rng_seed': (1, 6)}
        context    = <hypothesis.control.BuildContext object at 0x7fc3b545bb10>
        data       = ConjectureData(VALID, 61 bytes)
        example_kwargs = None
        expected_failure = None
        is_final   = True
        kw         = {'data': data(...), 'dtype': <class 'numpy.float32'>, 'n_arrays': 2, 'p': 0.0, ...}
        kwargs     = {'data': data(...), 'dtype': <class 'numpy.float32'>, 'n_arrays': 2, 'p': 0.0, ...}
        print_example = True
        printer    = <hypothesis.vendor.pretty.RepresentationPrinter object at 0x7fc27d077e10>
        self       = <hypothesis.core.StateForActualGivenExecution object at 0x7fc27d02c4d0>
        test       = <function TestLazywhere.test_basic at 0x7fc27cc77e20>
        text_repr  = None
scipy/_lib/tests/test__util.py:401: in test_basic
    xp_assert_equal(res1, ref1)
        arrays     = [tensor(0.), tensor(nan)]
        cond       = tensor(True)
        cond_shape = ()
        data       = data(...)
        dtype      = <class 'numpy.float32'>
        f          = <function TestLazywhere.test_basic.<locals>.f at 0x7fc3b7f8a200>
        f2         = <function TestLazywhere.test_basic.<locals>.f2 at 0x7fc27cc15760>
        fillvalue  = tensor(0.)
        input_shapes = ((), (), ())
        mbs        = mutually_broadcastable_shapes(num_shapes=3, min_side=0)
        n_arrays   = 2
        p          = 0.0
        ref1       = tensor(nan)
        ref2       = tensor(nan)
        res1       = tensor(nan)
        res2       = tensor(nan)
        result_shape = ()
        rng        = Generator(PCG64) at 0x7FC27CC70200
        rng_seed   =<PHONE_NUMBER>
        self       = <scipy._lib.tests.test__util.TestLazywhere object at 0x7fc27d02c2d0>
        shapes     = [(), ()]
        xp         = <module 'torch' from '/home/lucas/mambaforge/envs/scipy-dev/lib/python3.11/site-packages/torch/__init__.py'>
scipy/_lib/_array_api.py:188: in assert_equal
    return xp.testing.assert_close(actual, desired, rtol=0, atol=0,
E   AssertionError
        actual     = tensor(nan)
        desired    = tensor(nan)
        err_msg    = ''
        xp         = <module 'scipy._lib.array_api_compat.array_api_compat.torch' from '/home/lucas/dev/myscipy/build-install/lib/python3.11/site-packages/scipy/_lib/array_api_compat/array_api_compat/torch/__init__.py'>
------------------------------------------------------------------------------------------------ Hypothesis ------------------------------------------------------------------------------------------------
Falsifying example: test_basic(
    self=<scipy._lib.tests.test__util.TestLazywhere object at 0x7fc27d02c2d0>,
    xp=<module 'torch' from '/home/lucas/mambaforge/envs/scipy-dev/lib/python3.11/site-packages/torch/__init__.py'>,
    n_arrays=2,
    rng_seed=1000000000,
    dtype=numpy.float32,
    p=0.0,
    data=data(...),
)
Draw 1: BroadcastableShapes(input_shapes=((), (), ()), result_shape=())
Draw 2: array(0., dtype=float32)
Draw 3: array(0., dtype=float32)
Draw 4: array(nan, dtype=float32)
========================================================================================= short test summary info ==========================================================================================
FAILED scipy/_lib/tests/test__util.py::TestLazywhere::test_basic[torch] - AssertionError
====================================================================================== 1 failed, 21 passed in 13.53s =======================================================================================

@lucascolley Isn't that the same as https://github.com/scipy/scipy/pull/18930#discussion_r1315898607, fixed by adding equal_nan=True in gh-19186?

What do you think?

These sort of separate checks (I'm lumping this in with checks of shape, dtype, and scalar vs array) have been forgotten for the past 20 years, so I imagine they will continue to be forgotten. But it seems to me that performing them automatically in these very widely used assertions can only help. I mean, I can anticipate an argument like "If we make it standard practice to include a separate namespace check separately, then it will never be forgotten, whereas if it is not written separately when these assertions are used, it may be forgotten when these assertions are not used." I just don't believe that assertion.

Isn't that the same as #18930 (comment), fixed by adding equal_nan=True

Ah yes exactly, apologies, I forgot that I tested with that parch yesterday. I'll approve now 👍.

"If we make it standard practice to include a separate namespace check separately, then it will never be forgotten, whereas if it is not written separately when these assertions are used, it may be forgotten when these assertions are not used."

Yup, that's the argument I was thinking about.

But I don't believe that statement.

Fair enough. Happy to go along with whatever you think is best here 👍.


[Docs] Document new methods like jest.resetModuleRegistry

@cpojer if you don't have time for this could you list out the new functions in 0.7 and label this issue as "help wanted"?

There are no new APIs in 0.7. I removed APIs that were undocumented in open source and never should have been open sourced in the first place. jest.resetModuleRegistry() is being called implicitly before each test run. It simply wipes away the module registry for all modules and has been around forever. It was previously called require('mock-modules').dumpCache().

Also, the reason I'm doing this is to

refactor jest into a codebase that a human can understand and read
replace node-haste in the future

Oh ok. I just remembered that a lot of tests called dumpCache() and thought that resetModuleRegistry() was a public API.

Yeah, it is a public API because there exists a config option to disable the reset, mainly for the react/relay open source projects. I'm hoping to kill this option and also to completely revamp configs (+ have some sort of legacy-options converter or something).


micronaut: 4.0.4 -> 4.0.5

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/micronaut-projects/micronaut-starter/releases.
meta.description for micronaut is: Modern, JVM-based, full-stack framework for building microservice applications
meta.homepage for micronaut is: https://micronaut.io/
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 4.0.5 with grep in /nix/store/albvq34qgs3fa89qc211dvm15q9zbvxk-micronaut-4.0.5
found 4.0.5 in filename of file in /nix/store/albvq34qgs3fa89qc211dvm15q9zbvxk-micronaut-4.0.5

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

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
micronaut

Instructions to test this update (click to expand)

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

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

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/albvq34qgs3fa89qc211dvm15q9zbvxk-micronaut-4.0.5
ls -la /nix/store/albvq34qgs3fa89qc211dvm15q9zbvxk-micronaut-4.0.5/bin

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

1 package built:

micronaut

Maintainer pings
cc @moaxcp for testing.

Result of nixpkgs-review pr 252123 run on x86_64-linux 1

1 package built:

micronaut


Auto PC Heals counting occurs twice for a whiteout

Able to repro on v0.4.1a.
When all of your pokemon feint and causes a whiteout, that increments the PC Heal counter by one (assuming it's auto-enabled). Then when you arrive back at the Pokecenter, it increments by one again because of the healing animation. Thus resulting in two total PC Heal bumps for a "single" event.
Honestly not really sure how to separate these events... Overall, this isn't that big of an issue for permadeath challenges like IronMon, but should still be fixed since this is a solid general-use tracker.

This is a low priority bug as the latest updates to the Tracker remove the automatic PC heal counting (manually counting still works). Ideally this feature can get added back in and when it does it's possible this issue gets fixed at the same time.