PythonRequirement woes: Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x

See https://github.com/Homebrew/brew/pull/2917#issuecomment-317272358. I ran into this today myself, even with HOMEBREW_ENV_FILTERING turned on:
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/gnuradio/3.7.11_1/libexec/vendor --single-version-externally-managed --record=installed.txt
Your PYTHONPATH points to a site-packages dir for Python 3.x but you are running Python 2.x!
     PYTHONPATH is currently: "/usr/local/Cellar/gnuradio/3.7.11_1/libexec/vendor/lib/python2.7/site-packages:/usr/local/lib/python3.6/site-packages"
     You should `unset PYTHONPATH` to fix this.

Reproducers

site-packages dir for Python 3.x but you are running Python 2.x: https://github.com/Homebrew/brew/issues/2958#issuecomment-318661866
site-packages dir for Python 2.x but you are running Python 3.x: https://github.com/Homebrew/brew/issues/2958#issuecomment-318917264

Diagnostics
I looked into python_requirement.rb and apparently it's picking up a wrong python_short_version when you have python3 as the default python on your PATH, which in turn inserts the wrong site-packages path into PYTHONPATH:
ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages"

Note that python_short_version is decided from which_python, which in turn is basically which python_binary, where python_binary is "python"; and which is defined in requirement.rb:
  def which(cmd)
    super(cmd, PATH.new(ORIGINAL_PATHS))
  end

You immediately see what's wrong here: it's looking inside ORIGINAL_PATHS, and no wonder HOMEBREW_ENV_FILTERING doesn't help a bit.
Resolution
I'm on a tight deadline for something else so I stopped my investigation there — I didn't do a bisect, and nor did I really think the problem through. However, it seems that since we're doing
# Homebrew Python should take precedence over other Pythons in the PATH
ENV.prepend_path "PATH", Formula["python"].opt_bin
ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin"

we should really be putting those paths in front of ORIGINAL_PATHS when we do the which. This might be the source of inconsistency here.
In the meantime, my quick and dirty workaround is setting python_binary to "python2.7".

CC @DomT4 @ilovezfs

Oh I just realized I was running into a py3x site-packages dir for py2x problem, while Dom ran into the opposite py2x site-packages dir for py3x problem. That's kinda funny, I'm slightly confused as to how he managed to get a 2.7 short version when python_binary is explicitly "python3". Anyway, I don't have the time to investigate now.

That's kinda funny, I'm slightly confused as to how he managed to get a 2.7 short version when python_binary is explicitly "python3"

The only change to my local setup around Python lately came post Mike's Python PR the other day when I chucked export PATH="$(brew --prefix python)/libexec/bin:$PATH" into my .zshrc. Otherwise I haven't changed anything else or set any new variables in the environment.
I tried to poke around various causes as to why it was happening to me but drew a consistent blank. If anyone has diagnostic ideas I'm happy to provide output against those where I can, but yeah, still a bit 🤷♂ as to how I ended up where I did.
My default python is definitely Homebrew's python:
~> which python
/usr/local/opt/python/libexec/bin/python
~>  python --version
Python 2.7.13
~> python-config --prefix
/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7

Have you checked whether a new user is affected?

@DomT4 Good old printf debugging may help:
diff --git a/Library/Homebrew/requirement.rb b/Library/Homebrew/requirement.rb
index cfb925b49a..bc76d2e194 100644
--- a/Library/Homebrew/requirement.rb
+++ b/Library/Homebrew/requirement.rb
@@ -151,6 +151,7 @@ class Requirement
   end

   def which(cmd)
+    puts "PATH for which: #{ORIGINAL_PATHS}"
     super(cmd, PATH.new(ORIGINAL_PATHS))
   end

diff --git a/Library/Homebrew/requirements/python_requirement.rb b/Library/Homebrew/requirements/python_requirement.rb
index c162b072c9..3cc8f367ab 100644
--- a/Library/Homebrew/requirements/python_requirement.rb
+++ b/Library/Homebrew/requirements/python_requirement.rb
@@ -15,6 +15,7 @@ class PythonRequirement < Requirement

   env do
     short_version = python_short_version
+    puts "python_short_version: #{python_short_version}"

     if !system_python? && short_version == Version.create("2.7")
       ENV.prepend_path "PATH", which_python.dirname
@@ -32,7 +33,9 @@ class PythonRequirement < Requirement
   end

   def which_python
+    puts "python_binary: #{python_binary}"
     python = which python_binary
+    puts "python: #{python}"
     return unless python
     Pathname.new Utils.popen_read(python, "-c", "import sys; print(sys.executable)").strip
   end

@zmwangx @DomT4 Can you both output what your PATH and (if set) PYTHONPATH are outside of Homebrew, too, and whether you have the Homebrew python and/or python3 installed? Thanks!

For me, I have ~/.pyenv/versions/3.6.1/bin in my PATH, which provides the first python. I also have both brewed python and python3. The diagnostics in my original post should explain this scenario fairly clearly; the question is how to fix it.
I'm confused about Dom's scenario though, and printing out some intermediate variables should shed some light.

@zmwangx And presumably you do not have a PYTHONPATH set manually, yes?

The diagnostics in my original post should explain this scenario fairly clearly; the question is how to fix it.

I don't have a series of reproducible steps yet, I'm trying to figure them out.

And presumably you do not have a PYTHONPATH set manually, yes?

No, I don't.
I'd imagine an reproducer could simply be:
mkdir -p /tmp/debug-brew-python
ln -s /usr/local/bin/python3 /tmp/debug-brew-python/python
PATH=/tmp/debug-brew-python:$PATH
unset PYTHONPATH
brew install <some thing that depends_on => :python>

Let me know if that doesn't cut it.

@zmwangx so those directions do trigger the failure with watson although I still cannot reproduce the issue Dom was reporting in https://github.com/Homebrew/homebrew-core/pull/15941.

@ilovezfs Cool. As I said I'm confused about Dom's reverse issue since :python3 explicitly looks for python3. The intermediate variables should most likely reveal what's going on.

ln -s /usr/local/bin/python3 /tmp/debug-brew-python/python

🆒 so I guess that's the main reproducer: python is a python3, thanks!

Yep that's the point.

Apologies for the delay here, and indeed a couple other Issues/PRs. Have been having some internet troubles this week which my ISP insist they've fixed 🙄.

 Thanks!

/Users/xyz/perl5/bin:/usr/local/opt/python/libexec/bin:/usr/local/opt/openssl/bin:/usr/local/opt/curl-max/bin:/Users/xyz/.opam/system/bin:/usr/local/var/rbenv/shims:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/go/libexec/bin:/Users/xyz/.cargo/bin:/Library/TeX/texbin:/Users/xyz/go/bin

And PYTHONPATH isn't set. Both Homebrew's python and python3 are installed.

@DomT4 I suppose you installed libmagic --with-python? I can reproduce the python_binary: python instances if that's the case, but not if libmagic is installed without python.
I didn't check the code, but it looks like when dependencies and requirements are collected recursively, the PythonRequirement of libmagic --with-python is being picked up, and its env is apparently overriding that of Python3Requirement from diffoscope.

I suppose you installed libmagic --with-python?

👀 Yup. Built from source on 2017-05-24 at 14:56:51 with: --with-python.

To summarize, here's a repro for Dom's case:
brew install python python3
# Make sure the first python in PATH isn't python3, or the following step will fail.
brew reinstall libmagic --with-python
brew reinstall -s diffoscope

=>
...
Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python 3.x!
...

So the choices I see are

stop setting PYTHONPATH automatically in all cases
stop setting PYTHONPATH automatically if the dependency tree is mixed, or can be mixed, given some option combination
manually use ENV.delete("PYTHONPATH") in such cases
any other ideas you have

3 seems like the least complicated one to implement, which limits potential for unintended consequences and/or major formulae rewriting.

(3) seems riskless but it's a form of perpetual Whac-A-Mole without any evidence that it's necessary.

My original proposal still stands, I believe.

However, it seems that since we're doing
# Homebrew Python should take precedence over other Pythons in the PATH
ENV.prepend_path "PATH", Formula["python"].opt_bin
ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin"

we should really be putting those paths in front of ORIGINAL_PATHS when we do the which. This might be the source of inconsistency here.

I'll put together a patch tomorrow.
By the way, it won't fix https://github.com/Homebrew/brew/issues/2958#issuecomment-318917264, since that's rooted deeper in the dependency resolution chain.

I should add that none of the proposals above would fix https://github.com/Homebrew/brew/issues/2958#issuecomment-318917264 for the same reason.

@zmwangx not sure what you're talking about. We know that ENV.delete("PYTHONPATH") works.

How does ENV.delete("PYTHONPATH") fix the problem where python2 is selected when python3 is expected?

@zmwangx I'm talking about Dom's case.

Oh never mind, I was confused.

Ah, OK.
Yeah, if you're talking about the python is python3 thing, your ORIGINAL_PATHS idea may work, or a rewrite of the python requirement that doesn't hard code the expectation of the binary name, or both.

Another option would be treat python like other versioned formulae, and disallow all mixed dependency trees, but that seems like an ideological approach.

hard code the expectation of the binary name

Not sure how that works.

disallow all mixed dependency trees

I would vote for that, but never put me in contact with all the people that would be frustrated by that change 😝

Not sure how that works.

https://github.com/Homebrew/brew/blob/master/Library/Homebrew/requirements/python_requirement.rb#L48-L50
https://github.com/Homebrew/brew/blob/master/Library/Homebrew/requirements/python_requirement.rb#L62-L64

I meant what's the replacement for hard coded binary names?

@zmwangx actually checking the version strings of each python*

@zmwangx e.g., https://github.com/Homebrew/brew/blob/master/Library/Homebrew/gpg.rb#L3-L13

Sure. That's more reliable in a mixed dependency situation.

@zmwangx yeah, I mean for solving your python == python3 thing.

Yeah, I was saying the ORIGINAL_PATHS fix should always work when Homebrew's python is installed, but could still break when there's no brewed python. (IMO It should still be implemented for consistency.) Checking each python* should work in all cases.

@zmwangx actually checking the version strings of each python*

This is what the RubyRequirement does. It would be good to make generic helpers in the base Requirement class to handle this stuff e.g. use which_all and then the @min_version, @max_version to keep comparing until you find one that matches.

stop setting PYTHONPATH automatically in all cases

This feels nicest to me if you can cope with the 🔥 😭 💥, @ilovezfs.

This feels nicest to me if you can cope with the :fire: :sob: :boom:, @ilovezfs.

There's only one way to find out for sure.

Leave it be bot. Still an issue AFAIK.

Closing this as it doesn't seem anyone is working on it.


RSA key (tuple) to openssl format

Hi.
First off, thank for this beautiful lib and sorry to bother you.
I currently start to use you library for a project that involve a nodejs server. I have currently a big problem for transforming the openssl format key to a tuple like the generateKey return for using your libs.
I have seen #90, and I'm in a worker which doesn't allow me to use the WebCrypto API.
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDb4DtfQLq8/Rfr7gr+b65kDBWC
Zl5W1h8WC4HUsEza3hvtnKi2sV9thyHtSLbKnsZK4jMyyuEFYD0Bt2W+894zbjg3
t3S+Ql2Tq+O7TKs3HYU83JSJ6LOM5qHXQtIIWGyIPTYTtktQOuhiHycGBip7lSTd
t+Tnm3vyH4iCot11RQIDAQAB
-----END PUBLIC KEY-----

I would like to understand how I could achieve that.
PS: I am not realy advanced in any crypto things.

Once you generate a key at the server side you can transform it into asmCrypto-capable format with the following code snippet:
$ openssl rsa -pubin -in your.key -noout -text
Public-Key: (1024 bit)
Modulus:
    00:db:e0:3b:5f:40:ba:bc:fd:17:eb:ee:0a:fe:6f:
    ae:64:0c:15:82:66:5e:56:d6:1f:16:0b:81:d4:b0:
    4c:da:de:1b:ed:9c:a8:b6:b1:5f:6d:87:21:ed:48:
    b6:ca:9e:c6:4a:e2:33:32:ca:e1:05:60:3d:01:b7:
    65:be:f3:de:33:6e:38:37:b7:74:be:42:5d:93:ab:
    e3:bb:4c:ab:37:1d:85:3c:dc:94:89:e8:b3:8c:e6:
    a1:d7:42:d2:08:58:6c:88:3d:36:13:b6:4b:50:3a:
    e8:62:1f:27:06:06:2a:7b:95:24:dd:b7:e4:e7:9b:
    7b:f2:1f:88:82:a2:dd:75:45
Exponent: 65537 (0x10001)

You'll get something like this. Stripe : character from the Modulus and 0x from the Exponent and convert both into binaries.
Another way, when you retrieve the key from user input and don't want to disclose it to your server side You have to use ASN.1 parsing library. I tried asn1js for my purposes and it just works.

Thank you so much, I will try with ASN1js and I will come back if I have any trouble.
I keep this issue open for the moment, hope you doesn't mind.
Thanks again :)


go.mod: gvisor.dev/gvisor v0.0.0-20221209225809-6ec92611f024

*stack.PacketBuffer is now replaced with stack.PacketBufferPtr.
Changes: https://github.com/google/gvisor/compare/edc830a43ba6...6ec92611f024

/lgtm


positive phase order and negative phase order in DBM model

Hi,
Could any one tell me something about how to set the positive phase order and negative phase order in DBM model? I have read the given example in deepnet, but I can't understand it.

This is trying to setup the order of the calculation. When there are more than 2 hidden layers in the model, this is quite useful since edge in DBM are bi-directional. Usually, people use the "even and odd" way to do the calculation: fix odd (index) layers calculating all even (index) layers, mean-field (positive phrase) or gibbs (negative phrase) sampling, and then vice versa .


Milestone

think about creating milestones: internal version for Apogee; internal version for RAVE&APOGEE, version for outside beta-testers, etc.. @Hogg: what's sensible here?

I think milestones should be deliverables -- like code releases, paper submissions, etc.


When predator will be available in maven central?

When predator will available in maven central?

We are still working towards a milestone release. Soon hopefully


Changing height of SortableItem after drag start breaks size calculations

We wanted to shrink the dragged element onSortStart, but at that time the height of the element is already read and subsequently used for move coordinate calculations. Is there any thing we can hook into in order to set height before it is read, or do we need to start working on an enhancement to react-sortable-hoc?
If element 1 is 500px high and we set it to 50px on sort start, it will displace the following elements 450px too far towards the top of the container.

Hmmm. I haven't given much thought to this scenario, but it is something I'd be willing to support. Not sure what the best approach would be though, because detecting element resize can be tricky.
One way I can think of to solve this in a flexible manner would be by passing in a getHelperHeight({index, collection, node}) function that returns the height of the element. Thoughts?
If you don't mind getting your hands dirty, I'd be happy to look at any PR that would attempt to solve this :)

It is tricky, because we probably want to animate the shrink-effect, so it wouldn't help to detect size after the outer onDragStart. In our specific case we are going from dynamic heights to a fixed height, so it could even be a number prop as configuration. But a configuration function would be great as well. I'm happy to come up with a PR, just thought I would ask you first in case you had already though of it, or had ideas :)

@clauderic do you suppose that instead of copying the raw dom node to the base of the body tag, could it make a new react component, using the SortableItem, and just passing in different props to indicate that it is in drag mode ?
That way, it might be possible to allow people to change whatever they like in the dragable component, even whilst it is in flight, and then measurements could be taken of this on the fly element ?


Does embed dim vary across Transformer blocks?

I was confused with this question when I read the paper of AutoFormer. According to the gif file in the README.md, the embed dim parameter does vary across blocks. So how do you deal with the shortcut when the input embed dim is different with the output embed dim for a Transformer block? And how do you deal with the dimension mismatch between one block's output embed and next one's input embed?

Hi,
Thanks for your interest. The embed dim does not change across blocks. We will update the gif to make it clearer soon.


Polymer 2.0 integration

Hi!
This is not actually a bug report but more of an integration question (so I'm not sure if this is the place to put it).
I've been using Aurelia and Polymer together for the last year and I just been reading some of the Polymer 2.0 documentation and watching the Polymer Summit videos.
I was wondering if someone has already tested the Aurelia and Polymer 2.0 integration. I think it can be of a great use if you want to override some of the Polymer elements behavior/properties but actually I'm not quite grasping any more improvements over the Aurelia + Polymer 1 combination that I've been using till now.
A couple of months ago I was using a polymer-element that wasn't working as expected in some platforms and I had to fork the element code and override the problem with my own solution to solve the unexpected behavior. I think I could solve this now more easily now with Polymer 2, but I haven't tested yet.
Anyway, as I said, I was just wondering if someone has already tested it and if some of you can give some insight about the usefulness of this integration.
Thanks!

I haven't tested myself. I'm a bit out of the loop with the latest Polymer news. I'd love it if you were able to provide us some information from any experiments you did with the new version :)

Yep, I'll experiment a bit and keep you posted. ;)

Hi!
I know I said that I would try something but still been able to do so. Anyone did it already? 😜


Document Generator | Azure Open AI & Cosmos DB Icons Updated

Description
Azure Icons updated in architecture diagram

Contribution Checklist

[ ] I have built and tested the code locally and in a deployed app
[ ] For frontend changes, I have pulled the latest code from main, built the frontend, and committed all static files.
[ ] This is a change for all users of this app. No code or asset is specific to my use case or my organization.
[x] I didn't break any existing functionality :smile:

@Roopan-Microsoft can you update the architecture to have the Azure OpenAI icon the same size and centered as the other icons, along with the text being centered. It's off in both boxes.

@Roopan-Microsoft can you update the architecture to have the Azure OpenAI icon the same size and centered as the other icons, along with the text being centered. It's off in both boxes.

Thanks @toherman-msft for the feedback, Updated the icons with same size and center aligned as well. Got the screenshot from James as I was not able to take screenshot with higher resolution. Let me know if we need it in same resolution


Fix #8647, shared file needed to be moved to Common folder

This change moves the LoadProfilesOnStartup script from Demos/EyeTracking to Common as it is shared between more than one demo. When importing via UPM, samples are individually imported and this file must be available.
Fixes: #8647

/azp run


Generate production files using CLI

Is your feature request related to a problem? Please describe.
I want to generate production files in a GitHub Action by invoking a CLI instead of generating them from the GUI.
Describe the solution you'd like
Is there a way to generate the production files using a CLI? The workflow I would like to have is where you assign the parts from the GUI and commit the SQLite database. A GitHub Action then generates the production files and creates a release. This way only source files are committed to git.
Describe alternatives you've considered
Kicad provides a CLI that can generate production files but as far as I can see this does doesn't work together with the plugin.

I recommend you use KiBot as it specifically made for that use case: https://kibot.readthedocs.io/en/master/
This plugin was never meant to be used headless so I never seperated the buissness logic from the GUI in away that I can easily allow headless usage ...


Catch any error when linting

This enables catching any kind of error when linting the contract

closes https://github.com/OpShin/opshin/issues/179


#768 resolved (Community Page Updated)

Before -

After-
Uploading Screen Recording 2024-10-19 022022.mp4…

After-
https://github.com/user-attachments/assets/b9db4a0d-d281-4f6a-add6-f89014e43ec8
@ML-Fusion-Lab I have updated the issue have a look

@eshaalal there were seperate pages for the resource library, visit forum, Connect with Mentors, social media groups.
I can't see them, the links are broken.
example:
when i open the deploy preview and click the visit forum page, i can't see the page, similarly for others
can you check and update it.

@eshaalal and the footer is also different.


7.2.0+: ripple not correctly applied on Android using borderRadius

Make sure to check the demo app(s) for sample usage
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?

Android
multiple versions
emulator and device

Please, provide the following version numbers that your issue occurs with:

CLI: 8.6.1
Cross-platform modules: 8.6.1
Runtime(s): Android 8.6.2
Plugin(s): @nativescript-community/ui-material-ripple 7.2.4

Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
After upgrading plugin version 7.1.4 to 7.2.4, I notice that the ripple is not correctly applied on Android when using a borderRadius.
It was working correctly before updating the plugin on Android and it is still working correctly using the latest version on iOS.
That's the layout:
<GridLayout rows="*">
        <mdr:Ripple className="btn" tap="test">
            <Label text="Test"/>
        </mdr:Ripple>
</GridLayout>

and the CSS:
.btn {
    height: 40;
    width: 120;
    ripple-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

The result:
Android left, iOS right
https://github.com/nativescript-community/ui-material-components/assets/6443021/616b5125-3488-4b54-9c5e-14c4f1576623
Is there any code involved?
the complete sample:
ns-ripple-issue-android.zip

@felixkrautschuk just released a fix
BTW the ripple component is kind of unnecessary in most cases.
Follow this then rippleColor can be applied on any view (the label in the example code).
It will faster

@farfromrefug thanks for the quick fix, now it works as expected.
And I was not aware of that Mixins approach, thank you!
However, I notice an issue with that on iOS.
As soon as I call installMixins method in app.ts (without changing anything on the layout or css), the "%" in the border-radius is ignored.
https://github.com/nativescript-community/ui-material-components/assets/6443021/4ab6f1ad-ce99-4fb3-8cc2-e9511e6655b4
On Android, it is still working as expected.
Not such a big deal in my case, as I get the correct result on iOS as well when calculating the half of the height myself and apply the fix number tot the border-radius:
height: 40;
border-radius: 20;

But maybe you could fix this.
Updated sample app:
ns-ripple-issue-android.zip

@felixkrautschuk thanks i ll take a look at it

@felixkrautschuk i fixed in the latest version. However there is one bug i cant seem to find a fix for. If you use mixins with non uniform borderRadius  + elevation then the elevation is not showing (it is clipped).
Tricky to fix

@farfromrefug thanks for providing the fix. It is working now on iOS in the sample app.
However, when using the latest version (2.5.7) in our real app, the app crashes with the following log:

Cannot read properties of null (reading 'layer')
undefined
TypeError: Cannot read properties of null (reading 'layer')
at GridLayout.updateLayers (file: node_modules/@nativescript-community/ui-material-core/index.ios.js:234:0)
at GridLayout._onSizeChanged (file: node_modules/@nativescript-community/ui-material-core/index.ios.js:250:0)
at derivedCtor. (file: node_modules/@nativescript-community/ui-material-core/index.common.js:32:0)
at GridLayout.updateBackground (file: node_modules/@nativescript/core/ui/core/view/index.ios.js:100:0)
at GridLayout.layout (file: node_modules/@nativescript/core/ui/core/view/index.ios.js:91:0)
at ViewHelper.layoutChild (file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
at View.layoutChild (file: node_modules/@nativescript/core/ui/core/view/view-common.js:783:18)
at Page.onLayout (file: node_modules/@nativescript/core/ui/page/index.ios.js:471:12)
at Page.layout (file: node_modules/@nativescript/core/ui/core/view/index.ios.js:88:0)
at ViewHelper.layoutChild (file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error:
Uncaught TypeError: Cannot read properties of null (reading 'layer')
at
updateLayers(file: node_modules/@nativescript-community/ui-material-core/index.ios.js:234:0)
at _onSizeChanged(file: node_modules/@nativescript-community/ui-material-core/index.ios.js:250:0)
at derivedCtor.(file: node_modules/@nativescript-community/ui-material-core/index.common.js:32:0)
at updateBackground(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:100:0)
at layout(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:91:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:783:18)
at onLayout(file: node_modules/@nativescript/core/ui/page/index.ios.js:471:12)
at layout(file: node_modules/@nativescript/core/ui/core/view/index.ios.js:88:0)
at layoutChild(file: node_modules/@nativescript/core/ui/core/view/view-helper/view-helper-common.js:96:0)
at layoutView(file: node_modules/@nativescript/core/ui/core/view/view-helper/index.ios.js:209:18)
at UIViewControllerImpl.viewDidLayoutSubviews(file: node_modules/@nativescript/core/ui/page/index.ios.js:305:21)

I was not able yet to make it reproducable in the sample app.
And yes, I also noticed the missing elevation on Android. Box shadow seems to be working still so I could use that instead.

Will try to reproduce. And for thé élévation bug I was talking about iOS ;)

@felixkrautschuk should be fixed in latest


:bookmark: release v0.4.2

Description

Smarter database release v0.4.2:

Import greek chios-mytilini-boutsko sheep dataset
Track multiple location for sample (deal with transhumant breeds )
Import greek skopelios-eghoria goat dataset
Use sample data to deal with multi breeds illumina row files
Determine fid from database with IlluminaReportIO
Import greek frizarta-chios-pelagonia sheep dataset
Import greek frizarta-chios sheep dataset
Import sweden foreground goat dataset
Update ADAPTmap breed names and phenotypes import
Check that breed exists while inserting phenotype data
Import french foreground sheep dataset
Use elemMatch in projection in plinkio.SmarterMixin.fetch_coordinates
(ex: VariantSheep.objects.fields(elemMatch__locations={"imported_from": "SNPchiMp v.3", "version": "Oar_v4.0"}))
Use elemMatch to search a SNP within the desidered coordinate systems in plinkio.SmarterMixin.fetch_coordinates
Skip SNPchimp indels when importing from SNPchimp
Skip illumina indels when reading from manifest

Related Issue

closes #27
closes #19
related to #31 (it's the alternative approach described, however it doesn't resolve such issue)
Motivation and Context

This pull request will solve some issues when importing foreground data and add some improvements in calculating the desidered genotypes. Adaptmap breeds were revised to improve the phenotype informations. Indels illumina variants are excluded from imports. This releases require importing variants and goat samples from scratch.
How Has This Been Tested?

Code has been tested with CI and by importing foreground datasets
Types of changes

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

Checklist:

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

Coverage increased (+0.03%) to 91.586% when pulling 8e92366aa362628d9ac3b3aa64ab76ba43e7a720 on devel into a3b0d4a3a11f6d1a8e17ba6ff16ac35ba8dd20d9 on master.

Missing things:

[ ] execute requirements before initialize


Adds arm64/amd64 intercompatibility

This PR adds full arm64/amd64 intercompatibility.
This has been designed so that there should be no need to change the way anything works.  It builds without extra arguments for the correct platform that you're running it on.

I spun this up locally on my x86_64 Fedora machine and all the binaries are showing up as ELF 64-bit LSB executable, x86-64.
It's connecting to clusters as well and I can interact with apis so it all looks good to me.
LGTMing and holding for now. Feel free to take the hold off when you are ready to merge.
/lgtm
/hold

/lgtm
/unhold


[BUG] Failed deploy of Data Extension causes crash of remaining objects

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
when an update of the data extension fails, then the response is not a rejected promise, but rather an empty object.
This is due to a previous change which handled different soap error issues, but returning an empty ({}) object.
Expected Behavior
any failed responses shouldnt crash the remaining data
Steps To Reproduce

Go to '...'
Click on '....'
Run '...'
See error...

Version
3.0.3 (Default)
Environment

OS: Windows
Node: 17
npm: 8

Resolved in 3.1.0


Enable DEBUG environment variable

Fix #23

Example terminal screenshots would probably be useful (mostly because I don't have a Mac to test this on).

@malept here are some screenshots from my laptop:
Without anything specified:

With DEBUG exported:

With opts.verbose overwriting the DEBUG flag:

Also, I'm still deciding whether the opts.verbose should overwrite the DEBUG flag, or if to deprecate it so DEBUG does the logging and warning.

If it were up to me, I would deprecate opts.verbose. Having more than one way to do something leads to maintenance headaches.

@malept yea, I agree. I'll have a think about it and deprecate the opts.verbose flag.
Also, I've been wondering if the Application signed: *.app should be moved to DEBUG message; most of the unix executables don't give much stdout I imagine. (stderr is displayed normally.) Then DEBUG just get all those logs/messages displayed.


Error catching outside of add page

Also not everything on add page turns red because of unpredictable names

I think add categories is all that's left


how to set multi-GPUs

when I train the network, I got the information as following:
(I build the caffe-training environment under the  https://github.com/yjxiong/temporal-segment-networks)
You are running caffe compiled with MPI support. Now it's running in non-parallel model
what's meaning?
What's more, I can't use the multi-gpus to train my model.
Looking forward to any advice.

@mzolfaghari would you mind supporting your caffe docker images?
Thanks

@mzolfaghari Thanks, I also set the 'iter_size' for increasing the batch size.

Hello,
Thank you for making the code available - I have a follow-up on your PyTorch comment - is there a scheduled release date for the PyTorch version?
Thanks,

Hi @sophia-wright-blue
The code will be available next week.

That's awesome - looking forward to learning more about your model.


Datalab API not supported

Very sorry if I am a dummy.  I really don't know what I am doing. I am trying to configure the endpoint in the settings. I'm using the data lab api but it doesn't connect. I checked that the service is working fine. How do I properly format the endpoint in the settings page on obsidian?

nice! As soon as obsidian publishes the update I will give it a test.

Thanks for testing! 1.2.0 is now published correctly, so you can try and see if it works

No probs. And thanks for the plugin!
I get an error when trying to convert. here is the console log (if its helpful):
Error during PDF conversion: Error: Request failed, status 400
at new t (app.js:1:2030716)
at vK (app.js:1:2030908)
at app.js:1:2031587
at app.js:1:237138
at Object.next (app.js:1:237243)
at a (app.js:1:235961)

Error.
plugin:marker-api:309 Error during PDF conversion: Error: Request failed, status 422
at new t (app.js:1:2030716)
at vK (app.js:1:2030908)
at app.js:1:2031587
at app.js:1:237138
at Object.next (app.js:1:237243)
at a (app.js:1:235961)

This was way more complicated than I thought, but I used the same approach now for the self hosted version, and there It works. So I'm very confident now that it will work also for the datalab endpoint. Please test again with version 1.2.2 if this finally fixes the issue.

connection test works. error on conversion. Maybe I'm doing something wrong here.
Error during PDF conversion: Error: Request failed, status 422
at new t (app.js:1:2030716)
at vK (app.js:1:2030908)
at app.js:1:2031587
at app.js:1:237138
at Object.next (app.js:1:237243)
at a (app.js:1:235961)

Now it should really work, version 1.2.3 and if not, I still added more debugging messages so we can find the problem. But I think I already found the problem, now no 422 error comes up anymore, the request is now formatted correctly.

Good news: no connection error. Bad news: no markdown file. Here is the console log after trying a few different pdfs. I tried them manually with a crappy py script and they work with the api so it isn't on that end I think.
plugin:marker-api:317 Error in convertWithDatalab: TypeError: data is not iterable
at Marker.processConversionResult (plugin:marker-api:459:29)
at eval (plugin:marker-api:299:28)
eval @ plugin:marker-api:317
plugin:marker-api:318 Uncaught (in promise) Error: Error in convertWithDatalab: TypeError: data is not iterable
at eval (plugin:marker-api:318:21)
plugin:marker-api:317 Error in convertWithDatalab: TypeError: data is not iterable
at Marker.processConversionResult (plugin:marker-api:459:29)
at eval (plugin:marker-api:299:28)
eval @ plugin:marker-api:317
plugin:marker-api:318 Uncaught (in promise) Error: Error in convertWithDatalab: TypeError: data is not iterable
at eval (plugin:marker-api:318:21)
plugin:marker-api:317 Error in convertWithDatalab: TypeError: data is not iterable
at Marker.processConversionResult (plugin:marker-api:459:29)
at eval (plugin:marker-api:299:28)
eval @ plugin:marker-api:317
plugin:marker-api:318 Uncaught (in promise) Error: Error in convertWithDatalab: TypeError: data is not iterable
at eval (plugin:marker-api:318:21)

Okay, the error should now be fixed in 1.2.4, datalab once again differs from marker-api and doesn't return data the same way.

the md is created but empty. Thanks for working on this!

Sorry, this update took a bit longer, but now I had the time to look into it once again. Can you please test it again? I also added more logging to the function getting the results after starting the request in case it still doesn't work

solved. well done. chapeau.


JukeAlertLogger.removeIgnoredGroup doesn't support more then 1 group

removeIgnoredGroup retrieves the muted groups list but then does a string compare of that list against the single group name to be removed. This means that once more then one group is muted, no group can ever be unmuted for that player.

Hmm is a confirmed bug? I remember explicitly testing this.
The group list is stored in the database as a space separated string..:
The first comparison is for if they only have one ignored group it later splits group names into a list then removes that group element and stores back in the db as a string?

is looks like some user is in modmail with this problem, so I assume erocs observed its cause first hand if he made this bug report.

Can you get what was out putted to them with just running Jamute with no args?

Also is user getting any message when they attempt to unmute the group?

I made the issue quick to get the ball rolling so the reasoning might be
wrong.  It should be easy to try out on civtest.
On Jul 8, 2015 6:46 AM, "jjj5311"<EMAIL_ADDRESS>wrote:

Also is user getting any message when they attempt to unmute the group?
—
Reply to this email directly or view it on GitHub
https://github.com/Civcraft/JukeAlert/issues/35#issuecomment-119583785.

from what they reported no messages when they try to unmute.

I got the "removed group from mute list" message. But never any info from the snitches, they stayed muted.

Ok that is the message I thought they should receive I will take a look
tonight
On Wednesday, July 8, 2015, Langly-<EMAIL_ADDRESS>wrote:

I got the "removed group from mute list" message. But never any info from
the snitches, they stayed muted.
—
Reply to this email directly or view it on GitHub
https://github.com/Civcraft/JukeAlert/issues/35#issuecomment-119777313.

I also have the same few groups a whole bunch of times in /nllg on the first few pages, over and over, never seen that before, not sure if it's related.

I cannot seem to reproduce the bug. I think it may be related to having the same group in your list multiple times...
Once we get up to 1.8.7 everywhere i can add some logging that will help us figure out why the removal is not working

How would you get the same group more than once?

This is how they look with /nllg http://imgur.com/a/iBeNc the broken one isn't one that is repeated at all though.

Hmmm someone should check the database on that
On Thursday, July 9, 2015, Langly-<EMAIL_ADDRESS>wrote:

This is how they look with /nllg http://imgur.com/a/iBeNc the broken one
isn't one that is repeated at all though.
—
Reply to this email directly or view it on GitHub
https://github.com/Civcraft/JukeAlert/issues/35#issuecomment-120067637.

Huh thought I fixed that.  I'm guessing you merged multiple groups into
their correct?
On Jul 9, 2015 1:58 PM, "jjj5311"<EMAIL_ADDRESS>wrote:

Hmmm someone should check the database on that
On Thursday, July 9, 2015, Langly-<EMAIL_ADDRESS>wrote:

This is how they look with /nllg http://imgur.com/a/iBeNc the broken one
isn't one that is repeated at all though.
—
Reply to this email directly or view it on GitHub
<https://github.com/Civcraft/JukeAlert/issues/35#issuecomment-120067637
.

—
Reply to this email directly or view it on GitHub
https://github.com/Civcraft/JukeAlert/issues/35#issuecomment-120087511.

I never did any group merging, I had been member, then I was transfered owner on them.

@rourke750  any ideas?

Update: After 1.8.7 I still couldn't unmute the group, I finally made it unmute by systematically unmuting other groups until I found the one that would unmute, then moving on to clear the muted list.

where on the list was the one that worked?

IIRC it was the first one on the list when just using /jamute
I just wish my snitches weren't muted the other day when for some reason my wolf left by them warped to me and I was suddenly combat tagged even though no one was around me. I'd know who had done it.
A side note, a group I've just been added to also shows in my group list many times, so what ever is going on with group merging is also derpy not sure if that makes it affect this or not. I've seen some really bizarre interactions before.

Just to throw this out there, I'm in the group b_general1 twice, have been since I originally accepted the group invite; two separate people had sent me invites, one while I was offline and another the next day when I reconnected. I've assumed that was the reason, but I never thought to report it :shameface: and it may be coincidence, dunno.


how to set indicator's width to the textview's width

the UI designer wants the indicator's width the same as the textView's width,not the width of the tab,how can i do it?

app:stl_distributeEvenly="true"
app:stl_indicatorWithoutPadding="true"

@yuzhongxingke I tried that and it didn't work.


WIP: glTF custom extension support

Features
Added pc.GlbExtensionRegistry which allows users to register custom extension parsers to be used when parsing extension data in pc.GlbParser. The registry is accessed via pc.Application.glbExtensions.
An extension parser is a function that receives three arguments; an engine object (pc.Entity, pc.Material etc depending on the type of glTF object being parsed), extension data and the glTF file contents. The function should return a modified version of the engine object, or a new object of the same type.
Extension parsers are grouped by type of glTF object, i.e. node (pc.GlbExtensionRegistry.node), material (pc.GlbExtensionRegistry.material) etc. Each group is its own sub-registry, an instance of the generic class pc.GlbExtensionParserRegistry<T>.
The extension parsers are called from pc.GlbParser after each respective object has been parsed by the internal methods in pc.GlbParser. The purpose of extension parsers is to enrich or replace the engine objects created by pc.GlbParser.
Rationale
This allows users to extend the pc.GlbParser to support glTF extensions that are not currently handled in the parser itself. This will be useful for an application/game that handles files containing custom glTF extensions.
Other changes
To get the typings for pc.GlbExtensionParserRegistry<T> to work correctly I added support for generic types using the @template JSDoc syntax.
API
/**
 * Container for extension parsers to be used when parsing glTF files.
 */
class GlbExtensionRegistry {
    /**
     * Registry for handling node extension parsers.
     */
    readonly node: pc.GlbExtensionParserRegistry<pc.Entity>;
    /**
     * Registry for handling scene extension parsers.
     */
    readonly scene: pc.GlbExtensionParserRegistry<pc.Entity>;
    /**
     * Registry for handling texture extension parsers.
     */
    readonly texture: pc.GlbExtensionParserRegistry<pc.Texture>;
    /**
     * Registry for handling material extension parsers.
     */
    readonly material: pc.GlbExtensionParserRegistry<pc.Material>;
    /**
     * Registry for handling mesh extension parsers.
     */
    readonly mesh: pc.GlbExtensionParserRegistry<pc.Mesh[]>;
    /**
     * Registry for handling skin extension parsers.
     */
    readonly skin: pc.GlbExtensionParserRegistry<pc.Skin>;
    /**
     * Registry for handling animation extension parsers.
     */
    readonly animation: pc.GlbExtensionParserRegistry<pc.AnimTrack>;
    /**
     * Destroy all registered extension parsers.
     */
    destroy(): void;
    /**
     * Remove all extension parsers.
     */
    removeAll(): void;
}

/**
 * Container for extension parsers for a single glTF object type.
 */
class GlbExtensionParserRegistry<TObject> {
    /**
     * Let go of all registered parsers.
     */
    destroy(): void;
    /**
     * Add a new extension parser to the registry.
     * @param name - The name of the extension.
     * @param parser - Function used transform objects that have an extension matching name.
     * @returns Returns true if the parser was successfully added to the registry, false otherwise.
     */
    add(name: string, parser: pc.callbacks.ParseGlbExtension<TObject>): boolean;
    /**
     * Remove an extension parser from the registry.
     * @param name - The name of the extension.
     */
    remove(name: string): void;
    /**
     * Remove all extension parsers from the registry.
     */
    removeAll(): void;
    /**
     * Find an extension parser in the registry.
     * @param name - The name of the extension.
     * @returns The found extension parser or null.
     */
    find(name: string): pc.callbacks.ParseGlbExtension<TObject> | null;
    /**
     * Get the index of all extension parsers currently in the registry.
     * @returns An object of parsers by extension name.
     */
    index(): {
        [key: string]: pc.callbacks.ParseGlbExtension<TObject>;
    };
    /**
     * Apply a single extension to an object.
     * @param name - The name of the extension to be applied to "object".
     * @param object - The object to be modified or replaced.
     * @param extensionData - Extension data that should be applied to "object".
     * @param gltf - The contents of the glTF file being parsed. Can be used to find glTF objects referenced in "extensionData".
     * @returns The new or modified object derived from "object" using "extensionData". Must be of the same type as "object".
     */
    apply(name: string, object: TObject, extensionData: any, gltf: any): TObject;
    /**
     * Apply multiple extensions on an object.
     * @param object - The object to be modified or replaced.
     * @param extensionDataByName - Object containing extension data that should be applied to "object", grouped by extension name.
     * @param gltf - The contents of the glTF file being parsed. Can be used to find glTF objects referenced in "extensionData".
     * @returns The new or modified object derived from "object" using "extensionData". Must be of the same type as "object".
     */
    applyAll(object: TObject, extensionDataByName: any, gltf: any): TObject;
}

/**
 * Function used by {@link pc.GlbExtensionRegistry} to apply extension data to parsed glTF objects.
 * @param object - The object to be modified or replaced.
 * @param extensionData - Extension data that should be applied to "object".
 * @param gltf - The contents of the glTF file being parsed. Can be used to find glTF objects referenced in "extensionData".
 */
type ParseGlbExtension<TObject> = (object: TObject, extensionData: any, gltf: any) => TObject;

Examples
glTF file with custom extension
{
  "extensionsUsed": [
    "MY_hotspots"
  ],
  ...
  "nodes": [
    ...
    {
      "name": "Some node",
      "extensions": {
        "MY_hotspots": {
          "hotspot": 0,
        }
      }
    }
  ],
  "extensions": {
    "MY_hotspots": {
      "hotspots": [
        {
          "name": "Some hotspot",
          "color": "#ff0ff0"
        }
      ]
    }
  }
}

Parser for custom extension on nodes
app.glbExtensions.node.add("MY_hotspots", (node, extension, gltf) => {
  const hotspots = gltf?.extensions?.MY_hotspots?.hotspots;
  if (!hotspots) {
    return node;
  }

  const hotspot = hotspots[extension.hotspot];
  if (!hotspot) {
    return node;
  }

  node.addComponent("script");
  node.script.create("hotspot", {
    attributes: {
      name: hotspot.name,
      color: hotspot.color,
    },
  });

  return node;
});

Closed in favour of #3 where the recently added "official" support for custom extensions is used instead


netdisco connecting to meethue.com despite ignore discovery statement

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.41
Python release (python3 --version):
3.4.2
Component/platform:
netdisco.philips_hue_nupnp
Description of problem:
I do not have any Philips Hue (or similar devices) in my environment, but with the release of 0.41, I have seen where HA is attempting to connect to meethue.com.  I have attempted to disable Hue discovery as shown in the included discovery statement, but I am still getting this periodically.
Expected:
HA should not be attempting connections, especially if that discovery for that component has been disabled.
Problem-relevant configuration.yaml entries and steps to reproduce:

Discover some devices automatically

discovery:
ignore:
- philips_hue
2.
3.
Traceback (if applicable):
17-03-28 09:40:58 WARNING (Thread-1) [netdisco.philips_hue_nupnp] Could not query server https://www.meethue.com/api/nupnp: HTTPSConnectionPool(host='www.meethue.com', port=443): Read timed out. (read timeout=5)

Additional info:

We do not control what discoveries netdisco does. Ignoring will only impact how Hass treats the service when it shows up.

Having the same problem here, what to do now???

This seems to be the same issue: https://community.home-assistant.io/t/why-do-i-get-philips-hue-errors-not-using-it/13284/9
I myself have this error in my log:
 17-04-01 12:45:02 WARNING (Thread-3) [netdisco.philips_hue_nupnp] Could not query server http://<IP_ADDRESS>/description.xml: HTTPConnectionPool(host='<IP_ADDRESS>', port=80): Max retries exceeded with url: /description.xml (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0xae3d12b0>, 'Connection to <IP_ADDRESS> timed out. (connect timeout=5)'))
When visiting https://www.meethue.com/api/nupnp I get the following response though I do not use Hue: [{"id":"001788fffe48cff4","internalipaddress":"<IP_ADDRESS>"}]

I have a Chromecast and a Plex Server at Home, I don't get it on dashboard,
also it says that Discovery can't be setup...
On Apr 1, 2017 4:20 PM, "tleegaard"<EMAIL_ADDRESS>wrote:

This seems to be the same issue: https://community.home-
assistant.io/t/why-do-i-get-philips-hue-errors-not-using-it/13284/9
I myself have this error in my log:
17-04-01 12:45:02 WARNING (Thread-3) [netdisco.philips_hue_nupnp] Could
not query server http://<IP_ADDRESS>/description.xml:
HTTPConnectionPool(host='<IP_ADDRESS>', port=80): Max retries exceeded
with url: /description.xml (Caused by ConnectTimeoutError(<requests.
packages.urllib3.connection.HTTPConnection object at 0xae3d12b0>,
'Connection to <IP_ADDRESS> timed out. (connect timeout=5)'))
When visiting https://www.meethue.com/api/nupnp I get the following
response though I do not use Hue: [{"id":"001788fffe48cff4","
internalipaddress":"<IP_ADDRESS>"}]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/6831#issuecomment-290912528,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO4eM6D-hqvYB1FpA1hK_DyvYkn5zYLlks5rriwDgaJpZM4MsBoq
.


Prints test log output to a file

This request addresses issue #182.
Each CircleCI job prints its log into a file as well. The printed file gets saved into an artifact, which can be downloaded via CircleCI interface.

I was thinking of changing the configuration of logback so that a part of its output (debug or below) is only sent to a file. The raw stdout is already available from CircleCI, using tee seems to be redundant.

I misunderstood what you asked. It is certainly possible to separate the logs, but wouldn't that actually make it harder to debug a bug if one needs to go back and forth between two logs?

The scenario I was imaging is the following.

Test time

Console only shows the summary (without lengthy sql expressions).
If some error occurs, we open the log file to see more details of the failed test cases (in this case, just searching in the file will be enough)

Regular use cases

Console only shows important information (ERROR or WARN). Maybe INFO too.
If some error occurs, we ask the user to send the log file to us.

Let me know if you have another idea.

Just pushed a change that works as following:

During test:
console -> INFO or above
log file (/tmp/verdictdb-debug.log) -> DEBUG or above
During normal execution:
console -> INFO or above
logfile (/tmp/verdictdb.log) -> DEBUG or above + rolling log for everyday for 30 days max + 1GB cap

I guess saving a log at /tmp/verdictdb.log can be problematic for some, but I am not sure whether there is a better alternative at this point.

I noticed time-out error occurred from CircleCI, which could simply be prevented by adding some System.out.pritln() after each test.

Codecov Report

Merging #184 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #184      +/-   ##
=========================================
- Coverage   71.63%   71.6%   -0.02%
=========================================
  Files         140     140
  Lines        8122    8122
  Branches     1281    1281
=========================================
- Hits         5817    5815       -2
- Misses       1971    1972       +1
- Partials      334     335       +1

Impacted Files
Coverage Δ

.../core/scrambling/FastConvergeScramblingMethod.java
88.93% <0%> (-0.65%)
:arrow_down:

Continue to review full report at Codecov.

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


Deployment continuously failing

https://github.com/xebia-functional/xef-website/actions/runs/6095227248/job/16538714401

Fixed now


Primary buttons not in primary color

The following buttons should be in black in stead of yellow:
Edit Devices: https://appv3.beep.nl/measurements
Add alert rule: https://appv3.beep.nl/alertrules
Edit checklist + Date of inspection: https://appv3.beep.nl/hives/166/inspections/196
Add own device + (open settings) Add sensor definition : https://appv3.beep.nl/devices

Done! (not live yet).
in darker yellow color instead of black  :)


fix(Turborepo): Drop root from calculation of in-scope workspaces

Description

Don't fill in a default value for pkg_inference_root if we don't have one supplied
Don't set an empty pkg_inference_root
Don't enumerate the Root workspace when setting in-scope packages to all packages.

Testing Instructions
Fixes ordered/stream.t integration test
Fixes https://linear.app/vercel/issue/TURBO-1549/revisit-removal-of-root-package

Need to update some output text due to dropping empty pkg inference strings.


Added support for Python 3.4

@ajkumar25 Ping! If you're still up for it, it'd be great to get 3.4 support. :)

Closing in favour of #20. Thanks!


Modular Arithmetic Libraries

What should we add?
As part of a quantum computing project for trying to implement Shor's algorithm against a 3 digit number, I ended up implementing https://arxiv.org/pdf/2112.10537 in Qiskit by converting the example code/pennylane code into qiskit. Would this be good to add?

Thanks @dfinder for the suggestion and for your willingness to contribute the code!
I have taken a brief look at the linked paper and it seems that the described synthesis methods form an extension/improvement of what we have in Qiskit already, see https://docs.quantum.ibm.com/api/qiskit/circuit_library for the arithmetic circuit classes that are already supported, and see  https://docs.quantum.ibm.com/api/qiskit/transpiler_synthesis_plugins for the available synthesis algorithms for these classes. (Note that while I say "circuit classes", the recommended way is to represent these objects as Gates and not as QuantumCircuits, e.g. one should use ModularAdderGate and not DraperQFTAdder).
Could you please make a list of the existing/new arithmetic gate classes + the corresponding synthesis algorithms that you would be willing to add?
Especially where the new gates are concerned, we have an ongoing discussion in #13571 of which gates should be a part of Qiskit's circuit library. There are many useful gates that we may not want to include in Qiskit itself, yet have them available somewhere in the Qiskit ecosystem. For instance, a possible choice is to implement new gate classes + synthesis methods as a new package within https://github.com/qiskit-community.
One more question, do you have any data on the 2-qubit gate counts / 2-qubit depths for the gates that already exist in Qiskit (i.e. FullAdderGate, ModularAdderGate, MultiplierGate, etc. ) and for which the paper's synthesis methods apply?

Considering that modular exponentiation is at the heart of some of the most compelling use cases thus far for quantum computing[Cracking RSA and Diffie–Hellman], I found it somewhat fascinating that modular exponentiation wasn't already baked into the system.
I would be willing to add functions that work as follows:
N|> => N+K mod M|>
N|> => N*K mod M|>
N|> => C^N mod M|>, for constant C.
So we have:
With x = ceil(lg(m))
Add K fourier:O(x) with x qubits.
Modular adder in place: 1 work qubit, x normal qubits. 5 add k fouriers, and 4 QFTs, and some flips on the work bit.(2x^2+5x+2)
Multiplication out mod k is 2 QFTs, and a modular adder for each qubit.(3x^3+7x^2+2x), this requires 2x+1 qubits.
Modular Multi in place adds another x qubits.
Modular multi in place uses 2*multiply out+x swaps: 6x^3+14x^2+5x
And then exponentiation is n (modular multiplies, reset the adder).
So modular exponentiation with modulo N uses 7x^4+14x^3+5x^2+1 gates and 3x+1 qubits.
But you wanted the 2-qubit gate decomposition. I am afraid I'll have to use math and get back to you shortly.
Wait, are you asking also for the decomposition numbers for the pre-existing implemented quantum adders/multipliers?
this sounds like a fun research project, I'll get back to you shortly.

Thank you for clarifying. So the first function N|> => N+K mod M|> is exactly the same as ModularAdderGate, defined as $|a\rangle_n |b\rangle_n \rightarrow |a\rangle_n |(a+b) \mod 2^n\rangle_n $, at least when $M= 2^n$, where $n$ is the number of bits required to represent $a$, $b$ and $a+b\mod 2^n$. In your suggestion, is $M$ always a power of 2? If this is indeed the case, then we already have the relevant gate within Qiskit, and adding a new synthesis method here and make it available via a plugin interface here would be much appreciated.
My question about the data was to just run all the different synthesis methods to compare the number of 2-qubit gates and the 2-qubit depth for the new synthesis method for the ModularAdderGate that you are offering to implement against the synthesis methods that we have already, for example here is the code that I have used to evaluate the existing synthesis methods:
from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import ModularAdderGate
from qiskit.transpiler.passes.synthesis import HLSConfig
from qiskit.transpiler.passes import HighLevelSynthesis

def depth_2q(circ):
    return circ.depth(lambda op: len(op.qubits) == 2 and op.name != "barrier")

def size_2q(circ):
    return circ.size(lambda op: len(op.qubits) == 2 and op.name != "barrier")

configs = [
    ("qft     ", HLSConfig(ModularAdder=["qft_d00"])),
    ("ripple04", HLSConfig(ModularAdder=["ripple_c04"])),
    ("ripple95", HLSConfig(ModularAdder=["ripple_v95"]))
]

for nq in range(1, 10):
    for na in range(5):  # number of available ancilla qubits
        for config in configs:
            adder = ModularAdderGate(nq)
            qc = QuantumCircuit(adder.num_qubits + na)
            qc.append(adder, range(adder.num_qubits))
            qct = HighLevelSynthesis(basis_gates=['cx', 'u'], hls_config=config[1])(qc)
            print(f"nq = {nq}, na = {na}, method = {config[0]}: count = {size_2q(qct)}, depth = {depth_2q(qct)}")

I believe the new synthesis method should offer an advantage but it would be nice to see some concrete numbers (of course, these could be easily worked out from the formulas that you have listed above).
Regarding the two other functions, N|> => N*K mod M|> and N|> => C^N mod M|>, I believe we don't have these in Qiskit (ok, we do have a MultiplierGate, but it's not an in-place multiplier like the one I think you have, and we don't have the exponentiation gate). Personally, I would like to see them in Qiskit as well, but I suggest to wait till the #13571 is resolved.


.NetCore2 branch running error

Can anyone run .net core 2 branch?
After running those setup commands, the website loaded, after login, register and login buttons are still there. and click them will result in new view been insert in the current page.

Yes. Same bug for me with SQL Express.

Me too.

Try change "View/Home/Index.html" file.

to

looks like this is related to this

this should be fixed now.


Is its possible to do someting with content area. Such as, Put  page number inside the content area

Can i do someting with content area. Such as, Put  page number inside the content area
What versions are you running?
$ go list -m github.com/chromedp/chromedp
github.com/chromedp/chromedp v0.8.2
$ google-chrome --version
Version 103.0.5060.114 (Official Build)
$ go version
go version go1.18.2 windows/amd64

What did you do? Include clear steps.

chromedp.ActionFunc(func(ctx context.Context) error {
			buf, _, err := page.PrintToPDF().
				WithPrintBackground(false).
				WithPreferCSSPageSize(false).
				WithScale(1).
				WithDisplayHeaderFooter(true).
				WithPaperWidth(8.27).
				WithPaperHeight(11.69).
				WithLandscape(false).
				WithMarginTop(0.7).
				WithMarginRight(0).
				WithMarginBottom(0.7).
				WithMarginLeft(0).
				WithHeaderTemplate(" ").
				WithFooterTemplate(" ").
				Do(ctx)
			if err != nil {
				return err
			}
			*res = buf
			return nil
		})

What did you expect to see?
I want to put  page number inside the content area
What did you see instead?
I dont how to customize with a content area

Duplicate of #1112.


Fix ACL example

What does this PR do?

This PR this fixed Docs about ACL example yaml
Port changed from string to number

Fixes #778
How to test it

make test
make test-integration

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

Hello @yekangming,
Thanks for your contribution and interest in Traefik Mesh!
As your fixing a documentation issue, this PR should be rebased onto v1.4 and target the v1.4 branch.
Can you update your PR  accordingly?


Bounding box

Hi,
I am looking for a reference document on how-to setup my MRDL bounding box to scale by only x or y axis. Not only Uniform.
Anyone know of a site that they can point me towards?
Thanks!!

It worked at my setup by changing the script manually, it doesn't get variable from the inspector very well. Somewhere in the script it's noted which axes should be adjusted.

Thanks for your feedback!
Unfortunately I will just be doing a lot of guess work as to what I need to change within the code. I will take a look and see if I can figure any thing out.

I have made a lot of modification within the code and still cannot get the bounding box to scale by the x  axis only. Has it ever been possible? The only functionality that I have is drag, uniform scale and rotate by y and x.
I know that a new version is coming out with the MRTK but as soon as you update any version of Unity or Holotoolkit it usually blows up your whole project.
Currently I am using HUX so I cannot switch at this time. I need to finish this project before I can start the project from fresh. If there is anyway to make modifications to the existing code to make this work please let me know. Thank you for any ones hard work!

Hi @tspaddock,

Here's what I would suggest trying if you haven't.  All of the logic for scaling is based on the handle types so within "HUX/Scripts/Interaction/BoundingBoxManipulate.cs" and in particular within "public static OperationEnum GetBoundingBoxOperationFromHandleType(BoundingBoxHandle.HandleTypeEnum handleType, BoundingBoxHandle.HandleTypeFlattenedEnum flattenedHandleType)".

1. Open up and add handle type enums to BoundingBoxHandle for non-uniform scaling
2. In the function above (GetBoundingBoxOperationFromHandleType) add the new handle types to the case statement.
3.  Return the operation type based on the scaling axis. "return OperationEnum.ScaleX;"

Let me know that doesn't work.  We're in the process of updating HUX and MRDL with MRTK as well as streamline what's in HUX for rapid proofing.

thanks,
-pat


[A11y][screen reader] Announce component added after adding a component

Signed-off-by: Ruby Zhu<EMAIL_ADDRESS>
Description

After component added, announce "xxx component added"
Checklist

[ ] I have added screenshots above for all UI changes.
[ ] I have added e2e tests for all UI changes.
[ ] Documentation was updated if it was needed.

Codecov Report

Merging #1751 (763ff28) into main (069254a) will decrease coverage by 13.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main    #1751       +/-   ##
===========================================
- Coverage   88.30%   75.29%   -13.02%
===========================================
  Files          90        9       -81
  Lines        5252      255     -4997
===========================================
- Hits         4638      192     -4446
+ Misses        614       63      -551

Flag
Coverage Δ

unittests
75.29% <ø> (-13.02%)
:arrow_down:

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

Impacted Files
Coverage Δ

...tools/counterfactual/dashboard_schemas/__init__.py

...bleai/responsibleai/_tools/causal/causal_config.py

...ponsibleai/responsibleai/rai_insights/constants.py

...onsibleai/responsibleai/serialization_utilities.py

raiwidgets/raiwidgets/interfaces.py

...is/erroranalysis/_internal/process_categoricals.py

...onsibleai/responsibleai/managers/causal_manager.py

...eai/responsibleai/databalanceanalysis/constants.py

raiutils/raiutils/webservice/__init__.py

...i/responsibleai/managers/counterfactual_manager.py

... and 71 more

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


[BUG]: upload document just refreshing, reinstall doen't work

How are you running AnythingLLM?
AnythingLLM desktop app
What happened?
Reinstall doens't work because the anythingllm files still out there. I reinstall and my workspaces still in place. How can I do a clean uninstall, in order to delete all?
Are there known steps to reproduce?
No response

Win + R %AppData%
/Roaming/
Deleted anythingllm folder and reinstalled. Fixed.


GET /api/v1/object/{object_id}/reports/ only ever returns one result

Lets say I want to find all reports (posts) <IP_ADDRESS> was found in.
I would run a request GET /api/v1/object/ipv4-addr--1234/reports/
(the id of <IP_ADDRESS> will be the same for all extractions).
However, this endpoint only ever returns one report result.
I suspect it is something to do with _is_latest and somewhat related to this discussion
https://dogesec.slack.com/archives/D05L8JEAM1N/p1730474596676819
A good way to test this is using
python3 tests/add_fakeblog123.py

which ingests the same posts (using two distinct feed URLs)

can't reproduce. after a lot of testing, I figured that the profile with id bcf09ec5-d124-528a-bb21-480114231795 did not exist

the second job never started and because of that only one of the ip was created


OSC-8 Korrel8r does not deply on Openshift 4.15 due to security profile restrictions

OSC-8 Korrel8r does not deply on Openshift 4.15 due to security profile restrictions

Fixed by 7918dc5 * Use wildcard "get" view role to access all stores.
Fix available in v0.6.3


switch off deprecated elliptic.Marshal

elliptic.Marshal was deprecated, we can replace it with the ECDH methods (even though we aren't using ECDH here, the underlying Marshal format is the same). See:

https://github.com/golang/go/commit/f03fb147d773f3e0cee437e02ac2de5ce1d5e981

We still use elliptic.Unmarshal because this issue needs to be resolved first:

https://github.com/golang/go/issues/63963

Note, it looks like UnmarshalPublicKey might never be supported:
https://github.com/golang/go/issues/63963#issuecomment-2080414860

Personally, I might actually prefer it over PKIX / PKCS#8, but since the latter is predominant, I think deprecated functions might actually be sufficient as support: they give a clear signal that this is not the common path.


Fix resize op with roi attr

Fix resize op with roi attr

Thank you for your PR, but we've already fixed that. You can see it here: https://github.com/ENOT-AutoDL/onnx2torch/pull/67.


confusing related synonyms for adaptors

Is it confusing  to have "protein complex scaffold" terms as related synonyms of "molecular adaaptor"
Researchers I speak to seem to view "scaffolding" and "adapting" as differnet activities appear to view a protein complex scaffold more as a structural molecule activity.
Conversation with a researcher this week:
"distinction between adaptor and scaffold and we have very good examples with our work: TTT is an adaptor in the sense that it recruits and temporarily stabilizes interactions between a chaperone and its substrates. These interactions are by nature weak and transient and happen cotranslationally (at least in S. pombe: PMID: 34686329). In contrast, a scaffolding subunit is a subunit that resides in the complex and is essential to hold it together – without it the other subunits disassemble and are often destabilized. This is the case in SAGA for Spt7 and, Ada1 (Hfi1) for example."
The particular example  above is in the context of a co-chaperone (TTT) which acts as a chaperone substrate adaptor (but could also apply to other substrate adaptors).  This distinction would not solve our problem completely because in the context of a membrane adaptor  the transient nature would not apply. So some adaptors are not transient (although I think they would be described as transient when compared to complexes, which appear to usually be very stable after assemlby). My problem is that there are plenty of protein complex subunits which are described as scaffolds, but that it would be difficult to describe as adaptors, so these activities are not interchangable.
Any suggestions on how to annotate protein complex scaffolding subunits? Should I use structural molecule activity? If so should we have a more specific term, and should  protein complex scaffold activity be added to this term?
It would be very useful  good to discuss on an annotation call.
I can add plenty of examples of complexes where I have this annotation problem.

At the same time we should discuss, in the context of chaperone adaptors which are not part of the final complex, if they should be annotated to the  processes that the complex is involved in (personally I would not, these are indirect phenotypes because the mature protein does not fold correctly, and is then not assembled into the complex at all, or incorrectly). These poteis have no role in regulatin the process in a 'normal' situation.
Here is an example:
https://www.ebi.ac.uk/QuickGO/annotations?geneProductId=Q9NWS0
(I will list the indirct terms when I get chance, and challenge the original annotations and the PAINT transfer)
This is unsurprising since the  GO  Complex term
GO:0097255   R2TP complex
Definition
A highly conserved protein complex comprised of two ATP-dependent DNA helicases (Rvb1p and Rvb2p in yeast, Pontin52 and Reptin52 in humans), Pih1p in yeast or PIH1D1 in humans, and Tah1 in yeast or RPAP3 in humans. The complex associates with Hsp90 and is thought to have a role in assembly of large protein or protein/nucleic acid complexes. In this role it is involved in multiple processes such as box C/D snoRNP biogenesis, phosphatidylinositol-3 kinase-related protein kinase (PIKK) signaling, RNA polymerase II assembly, and others. PMID:15766533 PMID:21925213
Implies that it is OK to annotate to these downstream processes:
phosphatidylinositol-3 kinase-related protein kinase (PIKK) signaling
Even though TTT is a co-translational chaperone.
Nice summary here:
https://www.cell.com/cell-reports/fulltext/S2211-1247(21)01334-6?_returnURL=https%3A%2F%2Flinkinghub.elsevier.com%2Fretrieve%2Fpii%2FS2211124721013346%3Fshowall%3Dtrue
https://www.cell.com/cms/attachment/26c358d2-4bdb-4cde-8725-4a4eaf33908e/gr7.jpg
and in figure 7 (which shows the various complexes that TTT chaperones)
Also, need to consider that (Rvb1p and Rvb2p in yeast, Pontin52 and Reptin52 in humans)
have an additional role in some complexes because they are part of the final assemlby. However this isn't the case for  the "phosphatidylinositol-3 kinase-related protein kinase", so any annotations to this (or TOR signalling) are indirect)

MMs19 is another example. Scaffod, adaptor , or something else:
see fig 7 https://www.sciencedirect.com/science/article/pii/S0021925820417314

Can we discuss this on a future annotation call? @vanaukenk @pgaudet

....I would think something like an E3 ligase is an adaptor (?), whereas scaffolds are either proteins whose sole purpose is to glue stuff together in a complex, or to organize a cascade of events (eg see below)

@ValWood  - happy to put this on an agenda for a future annotation call.  If tomorrow is too soon, we could plan for next week?  Let me know.

Tommorrow might be too soon.
I had a discussion with a user today  who does a lot of biochemistry around chromatin remodeling complexes and SAGA.
He had some useful suggestions. I will plug them in here tomorrow and we'll see if there is a conflict wuth what we have.
I think my major issue is if an adaptor has 2 inputs, sometimes and is an adaptor to another adaptor the models are going to get a bit crazy. I have better examples, just need to dig them out.
It's important to ge this right becasue so many  gene products function as adaptors

Sounds fine @ValWood
We could at least point curators to this ticket for them to start thinking about this issue?  We would likely have a better chance of getting good feedback if people have time to think/prepare ahead.

I agree with the above comments, but this isn't necessarily how the terms are represented in the ontology. I tried to summarize here and provide some questions and examples:
https://docs.google.com/document/d/1Qakmsk19Sr4H_2cDpzMU0bi8duD7Rbye5aJ_Rne-7ZE/edit?usp=sharing
I started a doc. I will flesh it out over the next couple of weeks but I'm really busy for the next 2 weeks with meetings and reviewing etc.
If you have any  more questions or answers please add with 'track changes'
The problems aren't huge here, the ontology and the annotation best practice just requires a little of clarification to make sure we are consistent.

I think the ontology part is easy (clear distinction between scaffold and adaptor) , but I'm also  interested how we should model substrates for GO-CAM when an adaptor has 2 inputs. Or if we only need to model the substrate/client. I think that is the gist of it.


Upgrade to<EMAIL_ADDRESS>

This upgrades the dependencies to work with Rustls 0.23
Part of https://github.com/n0-computer/iroh/issues/2273

please document somewhere that this uses the ring backend only for rustls

Eh - comments loaded late.
Will open a new PR!

Opened #13

@flub, @dignifiedquire and @matheus23 - thanks a lot for landing this!
I've taken it for a spin and it seems to be working well, could I trouble you for a 0.4 release please as I would like to be able to publish my code which depends on tokio-rustls-acme to crates.io.
Cheers 🚀

Haha yeah I'm hoping we can get a release out today, too. We need this as well.

@tmpfs we've released version 0.4.0 :) :tada:

Thanks @matheus23 for the heads up, this has unblocked me so much appreciated 🙏


[release-0.53] Update golang.org/x/net to 0.17.0

Address CVE-2023-39325 and CVE-2023-44487

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note:

NONE

/retest-required

/retest-required

/hold
debugging test failures

/retest-required

@xpivarc any idea what could be going on with network test failures?  The "expose" tests seem to be particularly flaky

/test pull-kubevirt-e2e-k8s-1.22-sig-compute-migrations

/test pull-kubevirt-e2e-k8s-1.22-sig-compute-migrations-0.53

/retest-required

/hold cancel

@EdDev I've run thes network tests succesfully in local env multiple times.  Thoughts on ignoring these errors and doing a force merge?

@EdDev I've run thes network tests succesfully in local env multiple times. Thoughts on ignoring these errors and doing a force merge?

I can confirm that running it locally it passed for me as well.
As the local setup and the one on CI is a bit different, I assume this somehow is effected by the CI infra.
If we take the risk to override the CI, this issue may drag alone from now on with other future patches if they every are added. And that has the potential to mask other issues.
@AlonaKaplan , WDYT?

@mhenriks , have we tried to run only the problematic tests on CI? I think we cannot use the focus mark on the tests, but there may be other hacky ways to do it.
@oshoval , I think you once added an option to run a specific set of tests on CI. Is it possible in this version?

Maybe this will help: https://github.com/kubevirt/project-infra/pull/3108
@brianmcarey may know more of that DNS issue

@akalenyu that definitely seems like it's worth a shot!

Hi, there is no option to run specific tests atm beside hacky ones
for the bug, indeed please try to use newer bootstrap as mentioned above

Note please grpc should be bumped as well (see https://github.com/advisories/GHSA-qppj-fm5r-hxr3 which mention it)
same for some of the other relevant branches

/retest

The 3 failing tests can be ignored IMO: https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/10604/pull-kubevirt-e2e-k8s-1.23-sig-network-nonroot-0.53/1732326357993525248
They already have exceptions (expecting to fail: XFAIL) when concerning IPv6 and I do not think it is worth investigating further.
Feel free to override.

I think the image should be fixed first as was done for the other images

I think the image should be fixed first as was done for the other images pull-kubevirt-e2e-k8s-1.23-sig-network-nonroot image wasn't updated
Also if all are XFAIL, aint the lane should pass ? what do i miss ?

https://github.com/kubevirt/project-infra/pull/3112
I think only the IPV6 overload is xfail, others are not

I think the image should be fixed first as was done for the other images pull-kubevirt-e2e-k8s-1.23-sig-network-nonroot image wasn't updated
Also if all are XFAIL, aint the lane should pass ? what do i miss ?

kubevirt/project-infra#3112 I think only the IPV6 overload is xfail, others are not

The 3 tests I saw have an xfail on IPv6 checks. The failing assertion is also failing on IPv6 but at another assertion which is not wrapped with xfail.

Note please grpc should be bumped as well (see GHSA-qppj-fm5r-hxr3 which mention it) same for some of the other relevant branches

@oshoval grpc bump is already included in this pr.

/test pull-kubevirt-e2e-k8s-1.23-sig-network-nonroot-0.53

Note please grpc should be bumped as well (see GHSA-qppj-fm5r-hxr3 which mention it) same for some of the other relevant branches

@oshoval grpc bump is already included in this pr.

Nice thanks, sorry my bad, also on all other branches?

/lgtm

/approve


Fast scrolling - loosing focus when having images from an url in the items

Hello again,
another issue I had some time ago:
Having a vertical recyclerview with an imageview inside the item (loading the image from an url to the imageview), when I was scrolling fast I always lost the focus (mostly when I was getting to the bottom or top of the list).
I was able to solve it using: setSmoothFocusChangesEnabled(false)
So I don't know if it's really a bug (maybe it has also to do with the image libraries I tested [Glide & Picasso]), but eventually you want to have a look at it. (for me it's not mandatory, as there is a work-around).

Which views are you marking as focusable? If it's the root view of your ViewHolder, focus should persist there. A sample  here would also help

I have following recyclerview:
<com.rubensousa.dpadrecyclerview.DpadRecyclerView
       android:id="@+id/rv_layout_TvChannels"
       android:layout_width="0dp"
       android:layout_height="match_parent"
       android:orientation="vertical"
       app:layout_constraintStart_toEndOf="@id/linLayout_tv_categories"
       app:layout_constraintTop_toTopOf="parent"
       app:layout_constraintBottom_toBottomOf="parent"
       app:layout_constraintWidth_percent="0.50"
       tools:listitem="@layout/rv_item_tvchannels"/>

and the root view of the rv_item_tvchannels holds the focus: ```

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/cardView_tvchannel"
android:layout_width="match_parent"
android:layout_height="80dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants"
android:background="@drawable/channel_item_background"
xmlns:app="http://schemas.android.com/apk/res-auto">

So in the adapter to handle key events etc. I am using always cardView_tvchannel

You shouldn't use android:descendantFocusability="afterDescendants if the focus should stay in that view. Please remove that or replace it with beforeDescendants

You can also figure out where the focus is being held with the developer option "Show layout bounds". This should show you a cross on the view that's receiving focus. You can also use these APIs to see if they solve your problem: https://rubensousa.github.io/DpadRecyclerView/api/dpadrecyclerview/com.rubensousa.dpadrecyclerview/-dpad-recycler-view/set-focus-out-allowed.html

Changing android:descendantFocusability="afterDescendants to beforeDescendants or removing it didn't help. Using the focus out allowed apis neither (I was already using them):
private fun prepareTvChannelsRecyclerView() {
        tvChannelsAdapter = TvChannelsAdapter(onChannelClickListener, onChannelLongClickListener,this, helpViewModel)
        binding.rvLayoutTvChannels.apply {
            adapter = tvChannelsAdapter
            addItemDecoration(
                DpadLinearSpacingDecoration.create(
                    itemSpacing = 6,
                    edgeSpacing = 6,
                    perpendicularEdgeSpacing = 6
                )
            )
            setFocusOutAllowed(false, false)
            setFocusOutSideAllowed(false, false)
        }
    }

The only thing that helped was setting:   setSmoothFocusChangesEnabled(false), with this the issue is gone. Why could it work with set to false?
I think I know where the focus goes (when loosing the focus, navigating up or down changes the channels, as I would be in the tv_categories_recyclerview):
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/const_tv"
    android:background="?attr/backgroundLight"
    android:descendantFocusability="afterDescendants"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <LinearLayout
        android:id="@+id/linLayout_tv_categories"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="?attr/backgroundLight"
        app:layout_constraintStart_toEndOf="@id/linLayout_tvCountries_menu"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_percent="0.20">

        <TextView
            android:id="@+id/tv_focusedCountry"
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:gravity="center_vertical"
            android:paddingStart="18dp"
            android:paddingEnd="10dp"
            android:layout_margin="1dp"
            android:background="?attr/backgroundMain"
            android:textColor="?attr/textMainColor"
            android:textSize="12sp"/>

    <com.rubensousa.dpadrecyclerview.DpadRecyclerView
        android:id="@+id/rv_layout_tv_categories"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#34373C"
        android:orientation="vertical"
        android:layout_marginStart="2dp"
        android:layout_margin="1dp"
        tools:listitem="@layout/rv_item_tvcategory"
        app:layout_constraintStart_toEndOf="@id/rv_layout_tvCountries_menu"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_percent="0.20"/>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/linLayout_tvCountries_menu"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintTop_toTopOf="parent"
        tools:listitem="@layout/rv_item_activated_countries"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:orientation="vertical"
        app:layout_constraintWidth_percent="0.20">

        <View
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:layout_margin="1dp"
            android:background="?attr/backgroundMain"/>

    <com.rubensousa.dpadrecyclerview.DpadRecyclerView
        android:id="@+id/rv_layout_tvCountries_menu"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/backgroundMain"
        android:orientation="vertical"
        android:layout_margin="1dp"
        app:layout_constraintTop_toTopOf="parent"
        tools:listitem="@layout/rv_item_activated_countries"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintWidth_percent="0.20"/>

    </LinearLayout>

    <com.rubensousa.dpadrecyclerview.DpadRecyclerView
        android:id="@+id/rv_layout_TvChannels"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:orientation="vertical"
        app:layout_constraintStart_toEndOf="@id/linLayout_tv_categories"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintWidth_percent="0.50"
        tools:listitem="@layout/rv_item_tvchannels"/>

If this still didn't work, I would appreciate a drawing with the problematic focus states please. Show me where the focus is held when you fast scroll. setSmoothFocusChangesEnabled(false) will trigger layout requests for each position change, which is more expensive. Maybe you could modify the sample project on this repo to reproduce this issue so I can have a look at your fork

@rubensousa
I made a video of loosing the focus, or what do you mean by drawing?
https://github.com/rubensousa/DpadRecyclerView/assets/83220273/fc627d25-17f7-4f9e-a9f5-5fddbebefd94
So I have to fork the sample project, modify it in android studio and update the fork with it, is this correct? (sorry, never done this before :-) )

Looks like you're updating the adapter while fast scrolling. Are you using DiffUtil to apply diffing or requesting focus somewhere else? Please enable the "Show layout bounds" and then upload a new recording.
If you can, please fork the project and create a sample inside it that reproduces the issue.

Yes i am using DiffUtil in the adapter:
companion object {
private val MANAGE_TVCHANNELS_COMPERATOR = object : DiffUtil.ItemCallback() {
override fun areItemsTheSame(oldItem: TvChannelsWithEpgData, newItem: TvChannelsWithEpgData) =
oldItem.tvChannel.channelId == newItem.tvChannel.channelId
        @SuppressLint("DiffUtilEquals")
        override fun areContentsTheSame(oldItem: TvChannelsWithEpgData, newItem: TvChannelsWithEpgData) =
            oldItem.epgDataList == newItem.epgDataList &&
                    oldItem.tvChannel.showingName == newItem.tvChannel.showingName &&
                    oldItem.tvChannel.epgChannelId == newItem.tvChannel.epgChannelId &&

    }
} and notifyitemchanged in the fragment to update specific channels (I just removed the notifyitemchanged parts, but it didn't solve the problem).

Following the video with enabled Show layout bounds..
https://github.com/rubensousa/DpadRecyclerView/assets/83220273/4c4a4c43-35e2-48f8-b5d4-a7237677e873
ps. For forking the project etc. I need some time, as I never did that before and I a have only short time on PC the rest of this + most of the next week (easter, family, kids..)

@rubensousa
Just to let you know, I've been sick in bed for a few days. If you're still waiting for the fork, it may take a while, sorry...

@rubensousa
Sorry, but it seems that I am to stupid to fork and modify.. Do I have to add also things like RetrofitInstance etc.? So everything I need or use in my app??
Or would there be an easier way, so that you can investigate the issue? (eventually step by step what happens in the issue-part of my app?)
Thanks,
Alex

@fankloano No, you don't. Just create a similar project in github that reproduces the problem so I can investigate. You don't need to copy our real app

Same here, I think this happens because of lazy updating of the list that changes positions in the list

@homayoonahmadi can you share a sample that reproduces this problem?

@fankloano @homayoonahmadi Can you please try this: setLayoutWhileScrollingEnabled(false) and let me know if it solves the issue?

@rubensousa
Hello, tried with:
private fun prepareTvChannelsRecyclerView() {
tvChannelsAdapter = TvChannelsAdapter(onChannelClickListener, onChannelLongClickListener)
binding.rvLayoutTvChannels.apply {
adapter = tvChannelsAdapter
addItemDecoration(
DpadLinearSpacingDecoration.create(
itemSpacing = 6,
edgeSpacing = 6,
perpendicularEdgeSpacing = 6
)
)
setLayoutWhileScrollingEnabled(false)
setFocusOutAllowed(false, false)
setFocusOutSideAllowed(false, false)
}
}
Unfortunately, this did not solve the problem.
setSmoothFocusChangesEnabled(false) is still what seems to solve the problem.

@fankloano Can you please create a project in github using this library that reproduces that problem? Otherwise it's really hard for me to help

@fankloano Fix attempt in 1.3.0-alpha03 will be released. Please try it out

@fankloano Released in 1.3.0-alpha03 now. Please try it out and let me know

DpadRecyclerView disables the focus search automatically during animations, which are triggered when you change the contents: https://rubensousa.github.io/DpadRecyclerView/api/dpadrecyclerview/com.rubensousa.dpadrecyclerview/-dpad-recycler-view/set-focus-search-enabled-during-animations.html
This is done on purpose because on TVs the experience of focus would be interrupted. There was a bug with that implementation and I solved it in the last release. I think if you used setFocusSearchEnabledDuringAnimations(true) in the last release you should've been fine too


[Bug] Worker.finalize_shutdown seems to hang when poll never succeeded due to server permission failure

Describe the bug
Originally reported at https://github.com/temporalio/sdk-python/issues/459.
To replicate, first run a local Temporal server, then alter https://github.com/temporalio/samples-go/blob/main/grpc-proxy/proxy-server/main.go to change the gRPC dialing to:
	grpcClient, err := grpc.Dial(
		upstreamFlag,
		grpc.WithTransportCredentials(insecure.NewCredentials()),
		// grpc.WithUnaryInterceptor(clientInterceptor),
		grpc.WithUnaryInterceptor(func(
			ctx context.Context, method string,
			req, reply any,
			cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
			if strings.HasPrefix(method, "/temporal.api.workflowservice.v1.WorkflowService/Poll") {
				return status.Error(codes.PermissionDenied, "DENIED!")
			}
			return invoker(ctx, method, req, reply, cc, opts...)
		}),
	)

This will simulate permission denied upstream. Then run it, e.g. go run ./grpc-proxy/proxy-server and it'll run a proxy at <IP_ADDRESS>:8081 that proxies to <IP_ADDRESS>:7233 by default. Then run the Python script given in that issue pointing to this proxy:
import asyncio
from temporalio import activity, client, workflow, worker

@activity.defn
async def a() -> None:
    pass

@workflow.defn
class Workflow:
    @workflow.run
    async def run(self) -> None:
        pass

async def main():
    c = await client.Client.connect(
        "<IP_ADDRESS>:8081",
        rpc_metadata={"authorization": "wrong_token"},
        # tls=True,
    )
    w = worker.Worker(
        c,
        task_queue="default",
        activities=[a],
        workflows=[Workflow],
    )
    await w.run()

if __name__ == "__main__":
    asyncio.run(main())

After about a minute or so, the worker will fatally error due to too many permission denials. But the worker process gets to await finalize_shutdown and hangs. Feel free to add logs inside .venv/Lib/site-packages/temporalio/worker/_worker.py's run call to see how far it gets.

It looks like there is a race condition. Sometimes when I run, I get RuntimeError: Workflow worker failed and the test app ends. Other times, it hangs on worker.finalize_shutdown().await; in worker.rs finalize_shutdown

The worker is hanging on line 295 self.poll_returned_shutdown_token.cancelled().await; in worker/activities.rs. It seems like self.poll_returned_shutdown_token.cancel() should be getting called at some point but it is not so the activity never gets cancelled and the await never resolves.
I added the following code to the poll method to test if sending the cancel message on a poilling error fixes the issue and it does:
      if r.is_err() {
            self.poll_returned_shutdown_token.cancel();
            return Err(PollActivityError::TonicError(tonic::Status::internal("Internal error")));
      }

Obviously that needs to be cleaned up. However, I'm not at all sure that this is the correct place to send cancel().
@cretz can you comment?

It's not the right place to call the cancel, no, the real issue in this case is that the poller_stream in that function you are referring to never terminates in this case (only ever getting poll errors), but it should still.
As for exactly where to fix that, I'd have to look a bit more. Might have some time later today.

It's not the right place to call the cancel, no, the real issue in this case is that the poller_stream in that function you are referring to never terminates in this case (only ever getting poll errors), but it should still.
As for exactly where to fix that, I'd have to look a bit more. Might have some time later today.

Ok, thanks! If I get some time, I'll try to go in and take a look too.

Looking into this today


Doc2 mihai

Thanks for looking over these so carefully!

@bsharpataz, @kwalcock: I cleaned up my tests based on today's meeting.

@kwalcock mind if I merge this today/tomorrow?

Go right ahead.  It was still red until you fixed it.  Thanks!