ImportError: failed to find libmagic.  Check your installation

I believe this may be an issue with the magic package used by thehive4py/api.py
After installing elastalert v <IP_ADDRESS> I get the following stacktrace when I try to run an elastalert test with a folder of rules
Traceback (most recent call last):
  File "/home/elastalert/.local/bin/elastalert", line 11, in <module>
    load_entry_point('elastalert==0.1.36', 'console_scripts', 'elastalert')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2328, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/elastalert/.local/lib/python2.7/site-packages/elastalert/elastalert.py", line 21, in <module>
    from alerts import DebugAlerter
  File "/home/elastalert/.local/lib/python2.7/site-packages/elastalert/alerts.py", line 31, in <module>
    from thehive4py.api import TheHiveApi
  File "/home/elastalert/.local/lib/python2.7/site-packages/thehive4py/api.py", line 7, in <module>
    import magic
  File "/home/elastalert/.local/lib/python2.7/site-packages/magic.py", line 181, in <module>
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
RMTMACSIERRA01:infrastructure-cm lucas.rudd$ docker run --rm -it -e ES_HOST=search-pss-pf-prod-es-51-gcm4nbuhxjuo6telgbszkp3i7u.us-east-1.es.amazonaws.com -e AWS_PROFILE=asurion-soluto-nonprod.dev -v ~/.aws:/home/elastalert/.aws  -v ~/Desktop/rules/:/home/elastalert/rules --entrypoint elastalert asurionpss/elastalert:test --verbose --es_debug
Traceback (most recent call last):
  File "/home/elastalert/.local/bin/elastalert", line 11, in <module>
    load_entry_point('elastalert==0.1.36', 'console_scripts', 'elastalert')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2328, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/elastalert/.local/lib/python2.7/site-packages/elastalert/elastalert.py", line 21, in <module>
    from alerts import DebugAlerter
  File "/home/elastalert/.local/lib/python2.7/site-packages/elastalert/alerts.py", line 31, in <module>
    from thehive4py.api import TheHiveApi
  File "/home/elastalert/.local/lib/python2.7/site-packages/thehive4py/api.py", line 7, in <module>
    import magic
  File "/home/elastalert/.local/lib/python2.7/site-packages/magic.py", line 181, in <module>
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

After manually installing libmagic the issue persists.
Has anyone else experienced this issue?

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

@synhershko Your solution doesn't work for me because python-magic requirement is >=0.4.15. Here is the error message:

pkg_resources.DistributionNotFound: The 'python-magic>=0.4.15' distribution was not found and is required by elastalert

I just installed libmagic and it fixed that error. I am running an alpine container

+1. Our elastalert suddenly started failing in our CI due to libmagic not being installed. Might want to add it to the docs that it is required. Even better, don't try to import it unless a Hive rule is configured.

+1. I got the same problem when I was run elastalert at alpine container

@primeroz , Can you tell me that how do you solve this problem, just install libmagic when build docker image?

We've just added apk add libmagic.

@wuxinwei as @eliasbrange mentioned just apk add libmagic

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

Observed the same issue while running elastalert
1)D:\elastalert>elastalert-test-rule "D:\elastalert\example_rules\example_frequenc
y.yaml"
Traceback (most recent call last):
File "D:\Python27\Scripts\elastalert-test-rule-script.py", line 11, in <module

load_entry_point('elastalert==0.1.36', 'console_scripts', 'elastalert-test-r

ule')()
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 480, in l
oad_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 2693, in
load_entry_point
return ep.load()
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 2324, in
load
return self.resolve()
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 2330, in
resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "D:\Python27\Lib\site-packages\elastalert\test_rule.py", line 20, in
import elastalert.config
File "D:\Python27\Lib\site-packages\elastalert\config.py", line 9, in
import alerts

File "D:\Python27\Lib\site-packages\elastalert\alerts.py", line 31, in <module

from thehive4py.api import TheHiveApi

File "D:\Python27\Lib\site-packages\thehive4py\api.py", line 7, in
import magic
File "D:\Python27\Lib\site-packages\magic.py", line 181, in
raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
D:\elastalert>
C:\Users\u3xlbes>elastalert --start NOW --verbose
Traceback (most recent call last):
File "D:\Python27\Scripts\elastalert-script.py", line 11, in
load_entry_point('elastalert==0.1.36', 'console_scripts', 'elastalert')()
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 480, in l
oad_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 2693, in
load_entry_point
return ep.load()
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 2324, in
load
return self.resolve()
File "D:\Python27\Lib\site-packages\pkg_resources_init_.py", line 2330, in
resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "D:\Python27\Lib\site-packages\elastalert\elastalert.py", line 21, in
from alerts import DebugAlerter
File "D:\Python27\Lib\site-packages\elastalert\alerts.py", line 31, in <module

from thehive4py.api import TheHiveApi

File "D:\Python27\Lib\site-packages\thehive4py\api.py", line 7, in
import magic
File "D:\Python27\Lib\site-packages\magic.py", line 181, in
raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
C:\Users\u3xlbes>
we are using python 2.7.15 . any workaround for this issue?

Do we have any workaround or solution for this issue?

Check out https://github.com/pidydx/libmagicwin64 for installing libmagic on windows.

Do we have any workaround or solution for this issue?

Check out https://github.com/pidydx/libmagicwin64 for installing libmagic on windows.

I have downloaded all 4 files which are mentioned in the above link and placed under C:\Windows\System32.. But when I try to import magic or import liblogic, its giving same error.

import magic
Traceback (most recent call last):
File "", line 1, in
File "D:\Python27\Lib\site-packages\magic.py", line 181, in
raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
import libmagic
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named libmagic

Do we need to run/configure  any thing after download those 4 files?

Hi,
I had the same problem.
I solved it by adding this requirement : python-magic
pip install python-magic==0.4.15

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

I love you.

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

it works thank you

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

This has worked for me, thanks!!!!

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

This has worked for me, thanks!!!

I have the same issue, I tried to remove magic by this command:
pip uninstall python-magic
and then reinstall, but it didn't work.
What I did in the end: I cloned the github code: https://github.com/ahupp/python-magic
into the local folder to the directory where the actual project is, and then renamed the folder to 'magic'. After that it worked.

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

Worked for me too.  Note that I uninstalled libmagic in addition to python-magic.

neither solution worked for me

What is this for a crap? I get this error on Windows and Mac OS.

Solved it by running
brew install libmagic

Use the method by @synhershko
i.e, 1. pip uninstall python-magic
2. pip install python-magic-bin
Except, don't include the  python-magic-bin version!

Solved it by running
brew install libmagic

In my case this is what helped (MacOS obviously...)

In my case, I had to install pip install python-magic-bin only. If I uninstall then I get following error:-
"pkg_resources.DistributionNotFound: The 'python-magic>=0.4.15' distribution was not found and is required by elastalert"

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

this issue happens on any python software running on mac.  I don't fully understand why python-magic doesn't fix this or if this issue shouldn't be fixed because it's a mac only issue.  It isn't an issue on any containers containing linux.

Installation
The current stable version of python-magic is available on PyPI and can be installed by running pip install python-magic.
Other sources:
PyPI: http://pypi.python.org/pypi/python-magic/
GitHub: https://github.com/ahupp/python-magic
This module is a simple wrapper around the libmagic C library, and that must be installed as well:
Debian/Ubuntu
$ sudo apt-get install libmagic1
Windows
You'll need DLLs for libmagic. @julian-r has uploaded a version of this project that includes binaries to PyPI: https://pypi.python.org/pypi/python-magic-bin/0.4.14
Other sources of the libraries in the past have been File for Windows . You will need to copy the file magic out of [binary-zip]\share\misc, and pass its location to Magic(magic_file=...).
If you are using a 64-bit build of python, you'll need 64-bit libmagic binaries which can be found here: https://github.com/pidydx/libmagicwin64. Newer version can be found here: https://github.com/nscaife/file-windows.
OSX
When using Homebrew: brew install libmagic
When using macports: port install file

thehive4py is gone now

We had this error on a popular Jupyter Notebook image, scipy-notebook. The fix ended up being to install libmagic with the Anaconda package manager:
conda install libmagic
Tracking down this error was a pain in the neck, so I hope this helps someone.

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

this worked for me too!

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

This workaround was perfect.

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

This worked for me too

In my case (M1 MacBook), it was all about telling the system where to find the library files. So after obvious brew install libmagic (on M1s, homebrew installs libmagic to /opt/homebrew/Cellar/libmagic), it was necessary to create a symbolic link from the library files to the place where the system expects libmagic to be located, which is /usr/local/lib.
Therefore, this worked for me:
sudo ln -s /opt/homebrew/Cellar/libmagic/5.41/lib/libmagic.dylib /usr/local/lib/libmagic.dylib
FYI: my version of python-magic is 0.4.18 (and I wasn't willing to downgrade as suggested above)

another possible fix :
https://stackoverflow.com/questions/59661022/django-versatileimagefield-issues-no-matching-distribution-found-for-python-ma

My laptop is MacBook Pro M1, and I succeed with the following process:

brew install libmagic
pip install python-magic (since pip install python-magic-bin not working)

2. pip install python-magic

When you did this, did you test (import magic) to see if it worked.
I just did this now and it wasn't working for me.
Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magic/__init__.py", line 209, in <module>     libmagic = loader.load_lib()   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/magic/loader.py", line 49, in load_lib     raise ImportError('failed to find libmagic.  Check your installation') ImportError: failed to find libmagic.  Check your installation

On my Macbook with M1 chip. This worked for me.

brew install libmagic
pip install python-magic-bin==0.4.14

pip uninstall python-magic
pip install python-magic-bin==0.4.14

Worked for me.

When I run pip uninstall python-magic and then pip install python-magic-bin==0.4.14 I get the error message: ERROR: Could not find a version that satisfies the requirement python-magic-bin==0.4.14 (from versions: none) ERROR: No matching distribution found for python-magic-bin==0.4.14. Has anyone else seen this error?

Happened to me, solved using python-magic-debian-bin==0.4.25

I have the same issue (Linux mint), I tried to remove magic by this command: pip uninstall python-magic and then reinstall, but it didn't work. What I did in the end: I cloned the github code: https://github.com/ahupp/python-magic into the local folder to the directory where the actual project is, and then renamed the folder to 'magic'. After that it worked.

thank You! I've been on this for hours!!

I'm on MacOS m1 and I fix this issue by installing libmagic using Homebrew:
brew install libmagic

I'm on MacOS m1 and I fix this issue via installing libmagic using Homebrew:
brew install libmagic

This worked for me:
pip uninstall python-magic pip install python-magic-bin==0.4.14

it's really work!

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

This works for my windows 11.

On my Macbook with M1 chip. This worked for me.

brew install libmagic
pip install python-magic-bin==0.4.14

I tried this by only doing brew install libmagic and having the python-magic already works
Thanks!!

brew install libmagic

this code works like magic . Easy and quick fix

When I run pip uninstall python-magic and then pip install python-magic-bin==0.4.14 I get the error message: ERROR: Could not find a version that satisfies the requirement python-magic-bin==0.4.14 (from versions: none) ERROR: No matching distribution found for python-magic-bin==0.4.14. Has anyone else seen this error?

same,bro

In my case (M1 MacBook), it was all about telling the system where to find the library files. So after obvious brew install libmagic (on M1s, homebrew installs libmagic to /opt/homebrew/Cellar/libmagic), it was necessary to create a symbolic link from the library files to the place where the system expects libmagic to be located, which is /usr/local/lib.
Therefore, this worked for me:
sudo ln -s /opt/homebrew/Cellar/libmagic/5.41/lib/libmagic.dylib /usr/local/lib/libmagic.dylib
FYI: my version of python-magic is 0.4.18 (and I wasn't willing to downgrade as suggested above)

savior

None of these solutions are working for me in windows.  Tried installing libmagic, tried 1. pip uninstall python-magic
2. pip install python-magic-bin, tried the windows libmagic dll prebuilts.  No change to my error message "
libmagic is unavailable but assists in filetype detection on file-like objects.Please consider installing libmagic for better results."

This worked for me:
pip uninstall python-magic
pip install python-magic-bin==0.4.14

pip install python-magic-bin==0.4.14
ERROR: Could not find a version that satisfies the requirement python-magic-bin==0.4.14 (from versions: none)
ERROR: No matching distribution found for python-magic-bin==0.4.14

Is not for Linux, the package is only for Widnows and MacOS https://pypi.org/project/python-magic-bin/0.4.14/#files
For me it works (22.04 Ubuntu):
pip uninstall python-magic
apt install libmagic1
pip install python-magic

"As of eyeD3 0.9 libmagic is no longer required."
as per this comment: https://github.com/nicfit/eyeD3/issues/344#issuecomment-586556313

In my case (M1 MacBook), it was all about telling the system where to find the library files. So after obvious brew install libmagic (on M1s, homebrew installs libmagic to /opt/homebrew/Cellar/libmagic), it was necessary to create a symbolic link from the library files to the place where the system expects libmagic to be located, which is /usr/local/lib.
Therefore, this worked for me:
sudo ln -s /opt/homebrew/Cellar/libmagic/5.41/lib/libmagic.dylib /usr/local/lib/libmagic.dylib
FYI: my version of python-magic is 0.4.18 (and I wasn't willing to downgrade as suggested above)

This worked for me (M2 pro). Just make sure you use the correct version inside the /opt/homebrew/Cellar/libmagic/.

I was using an online IDE environment (Kaggle) and this was what worked for me as well:
!pip uninstall python-magic
!apt install libmagic1 -y
!pip install python-magic

pip install python-magic-bin==0.4.14
ERROR: Could not find a version that satisfies the requirement python-magic-bin==0.4.14 (from versions: none)
ERROR: No matching distribution found for python-magic-bin==0.4.14

Is not for Linux, the package is only for Widnows and MacOS https://pypi.org/project/python-magic-bin/0.4.14/#files
For me it works (22.04 Ubuntu):
pip uninstall python-magic
apt install libmagic1
pip install python-magic

work for ubuntu 18 too

Hello everyone, after having a lot of issues with it, the solution that worked for me was to use the following commands (use python_magic_bin without version):
python-magic==0.4.27
python_magic_bin
It downloads python-magic-bin==0.4.14 but if I mention the version, it doesn't work. Strange behavior.

MacOS
$ pip install pylibmagic
$ pip install python-magic

Then ensure you import pylibmagic before you import magic

MacOS (maybe others too)
$ pip install pylibmagic
$ pip install python-magic

Then ensure you import pylibmagic before you import magic

Thank you! it worked

Follow this article for Mac users:
https://nixloop.com/fix/fixing-libmagic-installation-issues-on-apple-silicon-macs-for-python/

This worked for me:
pip uninstall python-magic
pip install python-magic
I'm on Apple M2 Max.

Not specifying the version for python-magic-bin worked for me (Windows):
pip uninstall python-magic
pip install python-magic-bin

MAC M1/M2 People,
This should work, and please note this solution because when you restart terminal, python related things in Mac somehow restarts, you probably faced that
https://stackoverflow.com/a/79042514/6806531

brew install libmagic

pip uninstall python-magic
pip install python-magic

# comma separated list for --find-links
export PIP_FIND_LINKS=https://github.com/ddelange/python-magic/releases/expanded_assets/0.4.28.post7
pip install --force-reinstall python-magic

Also within the codebase, use that:
`
mime = magic.Magic(mime=True, magic_file = "/usr/local/Cellar/libmagic/5.45/share/misc/magic.mgc") # For local test on mac : mime = magic.Magic(mime=True, magic_file = "/usr/local/Cellar/libmagic/5.45/share/misc/magic.mgc")
file_type = mime.from_buffer(file_bytes)
`
You can findyour magic.mgc file by
brew list libmagic
it's in share/misc/magic.mgc


Show "??" entry in the list

Object Explorer shows the content of "\" by calling NtQueryDirectoryObject recursively.
This approach overlooks one particular directory - ?? (a.k.a. "local \DosDevices"), which is not returned when querying the root directory, unlike the global version of \DosDevices (GLOBAL??).
This directory typically contains a symbolic link to Global, network drives, subst drives and whatever else the user defined with DefineDosDevice.
This information is also available under \Sessions\<SESSION_ID>\DosDevices\<LOGON_SESSION_ID>, but getting there is more cumbersome and requires Administrator rights.
It can be added manually (I'm not familiar with the code, so apologies if something is horribly wrong):
diff --git a/Source/WinObjEx64/kldbg.c b/Source/WinObjEx64/kldbg.c
index 0d5b62e..1477191 100644
--- a/Source/WinObjEx64/kldbg.c
+++ b/Source/WinObjEx64/kldbg.c
@@ -70,6 +70,12 @@ static UNICODE_STRING g_usGlobalNamespace = {
     OB_GLOBALNAMESPACE
 };

+static UNICODE_STRING g_usLocalDevices = {
+    sizeof(OB_LOCALDEVICES) - sizeof(WCHAR),
+    sizeof(OB_LOCALDEVICES),
+    OB_LOCALDEVICES
+};
+
 /*
 * ObGetPredefinedUnicodeString
 *
@@ -94,6 +100,8 @@ PUNICODE_STRING ObGetPredefinedUnicodeString(
     case OBP_ROOT:
     default:
         return &g_usObjectsRootDirectory;
+    case OBP_LOCALDEVICES:
+        return &g_usLocalDevices;
     }
 }

diff --git a/Source/WinObjEx64/kldbg.h b/Source/WinObjEx64/kldbg.h
index 7cf596d..422ef1a 100644
--- a/Source/WinObjEx64/kldbg.h
+++ b/Source/WinObjEx64/kldbg.h
@@ -100,6 +100,7 @@
 #define OBTYPES_DIRECTORY       L"\\ObjectTypes"
 #define OB_GLOBALROOT           L"\\GLOBAL??\\GLOBALROOT"
 #define OB_GLOBALNAMESPACE      L"\\??"
+#define OB_LOCALDEVICES         L"??"

 #define OBJECT_SHIFT 8

@@ -135,6 +136,7 @@ typedef ULONG_PTR *PUTable;
 #define OBP_OBTYPES         2
 #define OBP_GLOBAL          3
 #define OBP_GLOBALNAMESPACE 4
+#define OBP_LOCALDEVICES    5

 //enum with information flags used by ObGetObjectHeaderOffset
 typedef enum _OBJ_HEADER_INFO_FLAG {
diff --git a/Source/WinObjEx64/list.c b/Source/WinObjEx64/list.c
index aa83f34..d9d2c4e 100644
--- a/Source/WinObjEx64/list.c
+++ b/Source/WinObjEx64/list.c
@@ -346,6 +346,12 @@ VOID xxxListObjectDirectoryTree(

     } while (TRUE);

+    xxxListObjectDirectoryTree(HeapHandle,
+        ObGetPredefinedUnicodeString(OBP_LOCALDEVICES),
+        directoryHandle,
+        ViewRootHandle,
+        prevItem);
+
     NtClose(directoryHandle);
 }

The result:

Links:
https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/local-and-global-ms-dos-device-names
https://www.osronline.com/article.cfm^article=381.htm
https://superuser.com/questions/884347/win32-and-the-global-namespace
https://stackoverflow.com/questions/4686897/sessions-window-stations-and-desktops

The problem is that there is no such object, it doesn't exist. It is internal redirection made by MS for easy use in all of their mess for compatibility reasons.
All your local ?? symlink objects are stored inside \Sessions<SessionId>\DosDevices<LogonSessionId> as you said and when you specify \?? this is translated to real object directory (e.g. \Sessions\0\DosDevices\00000000-0004bd70) by API internally. Adding what you suggest will bring mess as there is no clear indication what is "real" object and what is just hardcoded virtual name redirector.


Microarchitectural test for DCCM

This PR adds a microarchitectural test for the DCCM module. The test is written using pyuvm framework.

LGTM


Adds support for imperial units

This change adds in support for supporting and automatically converting between Fahrenheit and Celsius. Using this, you can use SmartIR climate devices in your preferred temperature format, instead of being forced to use Celsius (which can cause issues when other software like Apple Home is expecting the temperatures to be in Fahrenheit already).
This ports over the changes from https://github.com/smartHomeHub/SmartIR/pull/1103, originally made by @devbyaccident and @kevin-brown, with an additional change to stop using a deprecated constant. This is a flaw that has existed in the original project since 2019, and has been reported numerous times over the years (https://github.com/smartHomeHub/SmartIR/issues/29, https://github.com/smartHomeHub/SmartIR/issues/155, https://github.com/smartHomeHub/SmartIR/issues/160, https://github.com/smartHomeHub/SmartIR/issues/669, https://github.com/smartHomeHub/SmartIR/issues/686) with several ignored pull requests to fix this behavior (https://github.com/smartHomeHub/SmartIR/pull/692, https://github.com/smartHomeHub/SmartIR/pull/795, https://github.com/smartHomeHub/SmartIR/pull/1103).

Hello @TheAppleFreak , than you very much for this PR and sorry for later reply, I missed it.
It would be very nice to close this issue indeed, but I would rather propose to use HA native temperature converter, something like this should work:
 from homeassistant.util.unit_conversion import TemperatureConverter

self._min_temperature = TemperatureConverter.convert(
    self._min_temperature, self._unit, UnitOfTemperature.CELSIUS
)

There is also small glitch in your PR, as you convert self._min_temperature only after it is already assigned as default target temperature (which shall be also IMHO internally kept as Celsius)
self._target_temperature = self._min_temperature
Also due to recently activated CodeQL checks merge is failing on formatting - please use python black formatter. Would you please mind to correct those issue or shall I?

Two more finding.

Rounding to whole number as originally proposed should not be used, a the result number shall follow precision set in self._precision.
It is not possible to use in the send_command conversion the self._target_temperature as input value, as it is not yet set to the requested temperature value (it is only set at the end of the send_command()). It is required to use temperature or target_temperature instead.

  target_temperature = "{0:g}".format(temperature)

   if self._unit == UnitOfTemperature.FAHRENHEIT:
                    target_temperature = "{0:g}".format(self._fahrenheit_to_celsius(self._target_temperature))

OK, and third probably the most important issue. In the best case, TemperatureUnit set in the HA corresponds with the units used in the device data codes in the .json file. This is then working well without any needs for conversion. Conversion is only required if those units are different. We know HA temperature unit as it is available in:
self._unit = hass.config.units.temperature_unit
but we do not explicitly know which temperature unit is used in the device data json file for temperature data:
  "minTemperature": 18.0,
  "maxTemperature": 32.0,
....
  "commands": {
    "off": "[3793, -1883, 480, -463, 477, -1410, 479, -461, 479, -1411, 478, -461, 478, -1411, 478, -463, 477, -1411, 477, -464, 476, -1412, 477, -464, 476, -1411, 476, -1412, 477, -464, 477, -1411, 477, -463, 477, -1411, 478, -1411, 477, -1411, 477, -1410, 479, -463, 477, -467, 473, -1410, 479, -1386, 502, -462, 477, -464, 477, -464, 477, -463, 477, -1409, 479, -463, 478, -463, 476, -464, 477, -1411, 477, -1410, 478, -1411, 478, -1409, 479, -462, 478, -463, 478, -463, 477, -463, 478, -1410, 477, -463, 477, -464, 476, -464, 477, -464, 476, -1412, 477, -462, 478, -464, 476, -463, 478, -1409, 479, -462, 477, -465, 477, -463, 477, -1411, 477, -463, 477, -463, 477, -464, 478, -462, 477, -464, 477, -461, 479, -463, 477, -463, 477, -464, 477, -463, 477, -463, 477, -463, 478, -464, 476, -1410, 479, -463, 477, -462, 478, -464, 476, -464, 476, -464, 478, -462, 478, -463, 477, -463, 477, -463, 477, -464, 477, -463, 477, -1410, 479, -461, 478, -464, 476, -464, 477, -462, 479, -463, 477, -462, 478, -464, 476, -463, 478, -462, 478, -1410, 478, -1409, 480, -461, 479, -1410, 477, -1388, 502, -1410, 477, -1411, 478, -1410, 478, -462, 478, -463, 477, -463, 477, -1411, 478, -462, 478, -464, 477, -1410, 478]",
    "auto": {
      "auto": {
        "18": "[

IMHO the only proper fix is to add new field for temperatureUnit in the .json and maybe add some logic to try to guess the unit in case it is not declared (backward compatibility)

I did implemented (hopefully) Fahrenheit support in this branch.
As I am not able to test it, could you please? If successfully tested I will merge and release. Thank you.


Update README.md

Hi @sutt,
I hope you're doing well!
I'm excited about the opportunity to contribute and believe I can be a valuable contributor here. I'm particularly interested in platforms that offer bounties for contributions, and I'd love to get involved.

@MahtabBukhari Thanks for the great PR #30. We'll add you as a contributor in the readme in the v1.2 release this week.
Closing this PR until then.
Cheers,


VulnerableGavs.csv

Dear Andreas, all,
Great tool, thank you for taking this initiative!
I just had a quick look at VulnerableGavs.csv and noticed that groupId and artifactId are confused for some of the GAVs (e.g. io.apiman:apiman-gateway-platforms-vertx3).
Also, I wondered whether you think it is useful to add an additional column indicating whether the respective GAV declares a dependency on the original log4j-core, or whether it re-bundles the vulnerable code. The presence of a classifier may be an approximation, but does not cover all cases (e.g. org.ops4j.pax.logging:pax-logging-log4j2 re-bundles a vulnerable log4j-core version, but does not have a classifier).
Cheers, Henrik

Hi Henrik,
thank you for raising the issue.

I just had a quick look at VulnerableGavs.csv and noticed that groupId and artifactId are confused for some of the GAVs.

Good catch!
We'll go over it and fix ASAP.

respective GAV declares a dependency on the original log4j-core, or whether it re-bundles the vulnerable code
This is an excellent idea. I see the current version is confusing, adding this flag would make it much easier to distinguish these cases. Thanks again for the idea.

The presence of a classifier may be an approximation, but does not cover all cases.
That's a good one. Actually, we might to adapt/fix our implementation. We introduced the classifier in order to not overapproximate since we often saw the case that the jar-with-dependencies re-bundle the vulnerable code but the other versions did not.
Nevertheless, I'll take a look asap.

Thanks for your detailed issue 👍 .
Our goal is to address the issues today.
Cheers,
Andreas

Great, thank you for the prompt answer!

Hi Andreas,
Thank you for updating the CSV file. Overall, there are "just" 409 out of 18168 artifacts that rebundle vulnerable Log4j code, which is less than what I expected.
Cheers, Henrik


chore(main): release 0.5.0

:robot: I have created a release beep boop
0.5.0 (2024-10-24)
Features

Add support for toml arrays (#38) (78a2adb)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/nvim-neorocks/toml-edit.lua/releases/tag/v0.5.0 :sunflower:


AdventureBackpacks duplicating and deleting items

Describe the bug
Backpack weight remaining heavy after being emptied.
Backpack inventory that was previously removed re-appearing after removing/re-equiping backpack .
Backpack inventory being absent after experiencing above, and then logging into different world.
Seems to appear reliably every time I log from one world to another.
On one world-entry I noticed "your backpack feels useful" - as if it was being initialised for the first time. (see below)
Same session while i was reproducing the bug i got "do not anger the gods" at the moment i (iirc) left clicked the backpack.  (see below)
To Reproduce
Steps to reproduce the behavior:

load backpack
log out and then into a different world.
empty backpack onto ground
check if your weight reduced or not
de-equip it and re-equip it
empty same stuff from backpack again - so now you have twice as much on the ground
pick it all back up again
log out
log in (im not sure it matters if the world is different or the same)
note that all items have been deleted.

Expected behavior
Not this. Soooo not this.
Screenshots

Video : two instances of this happening.
https://odysee.com/@BETLOG:0/2024-09-17--11-42-37.039_Valheim:b
Logs:
Player_2024-09-17--13-18-04.zip
LogOutput_2024-09-17--13-41-15.zip
Mod List (please list your mods that are being used):
client (and one of the worlds - locally hosted)
AdventureBackpacks.dll
AzuClock.dll
Build Camera.dll
ComfyQuickSlots.dll
ConfigurationManager.dll
DualWield.dll
GizmoReloaded.dll
HitboxFix.dll
Jotunn.dll
NoBuildDust.dll
Queue_Me_Maybe.dll
RemoveAttackFreezeFrame.dll
TargetPortal.dll
Valheim.DisplayBepInExInfo.dll

some version info:

server (one of the worlds' dedicated - files copied from client; they are the same versions)
AdventureBackpacks.dll
Backpacks.dll
DualWield.dll
Jotunn.dll
PlanBuild
TargetPortal.dll
Valheim.DisplayBepInExInfo.dll

Additional context
Conflict with ComfyQuickslots seems like a logical possibility, but it seems to integrate well with AB otherwise, so maybe not. I guess I will try EquipmentAndQuickSlots and hope for full compatibility and a more compact layout than what I just saw i on an old youtube.

EquipmentAndQuickSlots

Describe the bug Backpack weight remaining heavy after being emptied. Backpack inventory that was previously removed re-appearing after removing/re-equiping backpack . Backpack inventory being absent after experiencing above, and then logging into different world. Seems to appear reliably every time I log from one world to another.
On one world-entry I noticed "your backpack feels useful" - as if it was being initialised for the first time. (see below) Same session while i was reproducing the bug i got "do not anger the gods" at the moment i (iirc) left clicked the backpack. (see below)
To Reproduce Steps to reproduce the behavior:

load backpack
log out and then into a different world.
empty backpack onto ground
check if your weight reduced or not
de-equip it and re-equip it
empty same stuff from backpack again - so now you have twice as much on the ground
pick it all back up again
log out
log in (im not sure it matters if the world is different or the same)
note that all items have been deleted.

Expected behavior Not this. Soooo not this.
Screenshots
Video : two instances of this happening. https://odysee.com/@BETLOG:0/2024-09-17--11-42-37.039_Valheim:b
Logs: Player_2024-09-17--13-18-04.zip LogOutput_2024-09-17--13-41-15.zip
Mod List (please list your mods that are being used): client (and one of the worlds - locally hosted)
AdventureBackpacks.dll
AzuClock.dll
Build Camera.dll
ComfyQuickSlots.dll
ConfigurationManager.dll
DualWield.dll
GizmoReloaded.dll
HitboxFix.dll
Jotunn.dll
NoBuildDust.dll
Queue_Me_Maybe.dll
RemoveAttackFreezeFrame.dll
TargetPortal.dll
Valheim.DisplayBepInExInfo.dll

some version info:
server (one of the worlds' dedicated - files copied from client; they are the same versions)
AdventureBackpacks.dll
Backpacks.dll
DualWield.dll
Jotunn.dll
PlanBuild
TargetPortal.dll
Valheim.DisplayBepInExInfo.dll

Additional context Conflict with ComfyQuickslots seems like a logical possibility, but it seems to integrate well with AB otherwise, so maybe not. I guess I will try EquipmentAndQuickSlots and hope for full compatibility and a more compact layout than what I just saw i on an old youtube.

[update]
Removing ComfyQuickSlots and adding EquipmentAndQuickSlots seems to have solved the problem.
Suggestion: an explicit warning about this incompatibility, and the almost certainty that inventory will be lost under these circumstances.

[update]
Removing ComfyQuickSlots and adding EquipmentAndQuickSlots seems to have solved the problem.
Suggestion: an explicit warning about this incompatibility, and the almost certainty that inventory will be lost under these circumstances.


Portable Ruby 2.6.10

Release notes: https://github.com/Homebrew/homebrew-portable-ruby/releases/tag/2.6.10

Review period will end on 2022-10-26 at 14:58:53 UTC.

/usr/bin/mkdir: Command not found

Odd, probably picking up something from when we changed to use 22.04.


SDK for Browser

Making PR on behalf of @MichaelEdwardBlack

I can fix that when I get home. You shouldn't commit auto generated files,
that clutters the history and creates confusion.
On Tue, Jun 15, 2021, 18:20 Michael Boyd @.***> wrote:

@.**** commented on this pull request.
In node/test/ProviderService.test.js
https://github.com/trinsic-id/sdk/pull/47#discussion_r652192320:

@@ -28,7 +28,7 @@ const createProfile = async () => {
}

test("make an invitation", async t => {

let providerService = new TrinsicProviderService();

let providerService = new TrinsicProviderService("<IP_ADDRESS>:5000");

ideally with a force commit to overwrite it from version history
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/trinsic-id/sdk/pull/47#discussion_r652192320, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AD7QPF5GEZSDIQQ2VZ7XOK3TS7G37ANCNFSM46X6WHJA
.


Bug: pipeline initialization issue causes occasional UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse exception

We have encountered occasional exception
java.lang.UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse (expected: ByteBuf, FileRegion)

According to this answer: https://github.com/netty/netty/issues/3333#issuecomment-70613647 that is a Little Proxy's bug:
HttpResponseEncoder should be before HttpObjectAggregator on pipeline, HttpObjectAggregator's javadoc bewares of it: https://github.com/netty/netty/blob/netty-4.0.36.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectAggregator.java#L54
But Little Proxy (possibly) adds HttpObjectAggregator first and encoder after it:
https://github.com/adamfisk/LittleProxy/blob/master/src/main/java/org/littleshoot/proxy/impl/ClientToProxyConnection.java#L772
Moving that line a few lines above should fix the bug.
I didn't check ServerToProxyConnection - it should probably fixed in similar way.

Hello Nikolay,
Thank you very much for this hint! Sounds very interesting. I'll have a
closer look at this.
Regards Frank
Am 12.07.2016 um 17:35 schrieb nikolay-popov:

We have encountered occasional exception
|java.lang.UnsupportedOperationException: unsupported message type:
DefaultFullHttpResponse (expected: ByteBuf, FileRegion) |
According to this answer: netty/netty#3333 (comment)
https://github.com/netty/netty/issues/3333#issuecomment-70613647 that
is a Little Proxy's bug:
HttpResponseEncoder should be before HttpObjectAggregator on pipeline,
HttpObjectAggregator's javadoc bewares of it:
https://github.com/netty/netty/blob/netty-4.0.36.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectAggregator.java#L54
But Little Proxy (possibly) adds HttpObjectAggregator first and encoder
after it:
https://github.com/adamfisk/LittleProxy/blob/master/src/main/java/org/littleshoot/proxy/impl/ClientToProxyConnection.java#L772
Moving that line a few lines above should fix the bug.
I didn't check ServerToProxyConnection - it should probably fixed in
similar way.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/adamfisk/LittleProxy/issues/311, or mute the thread
https://github.com/notifications/unsubscribe/AKIGhu3qjyPpg7vqDiZ6Nzg8aRF3AaaUks5qU7Q5gaJpZM4JKhxH.

Hi,
please consider, I don't understand why LittleProxy needs two
ChannelPipelines. I could miss here therefore.
But I know a ChannelPipeline invokes the read (Inbound) handlers in
ascending ordering of the list and then the write (Outbound) handlers in
the descending ordering. See the figure in the JavaDoc of
ChannelPipeline too.
So I'm reordering as follows: first bytes read/write monitors, then a
inflater always on (why not an compressor too), then encoder/decoder,
then more monitors, then the aggregator, then the handler himself.
I'll give it a test...
Regards Frank
Am 12.07.2016 um 17:35 schrieb nikolay-popov:

We have encountered occasional exception
|java.lang.UnsupportedOperationException: unsupported message type:
DefaultFullHttpResponse (expected: ByteBuf, FileRegion) |
According to this answer: netty/netty#3333 (comment)
https://github.com/netty/netty/issues/3333#issuecomment-70613647 that
is a Little Proxy's bug:
HttpResponseEncoder should be before HttpObjectAggregator on pipeline,
HttpObjectAggregator's javadoc bewares of it:
https://github.com/netty/netty/blob/netty-4.0.36.Final/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectAggregator.java#L54
But Little Proxy (possibly) adds HttpObjectAggregator first and encoder
after it:
https://github.com/adamfisk/LittleProxy/blob/master/src/main/java/org/littleshoot/proxy/impl/ClientToProxyConnection.java#L772
Moving that line a few lines above should fix the bug.
I didn't check ServerToProxyConnection - it should probably fixed in
similar way.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/adamfisk/LittleProxy/issues/311, or mute the thread
https://github.com/notifications/unsubscribe/AKIGhu3qjyPpg7vqDiZ6Nzg8aRF3AaaUks5qU7Q5gaJpZM4JKhxH.

Am 17.07.2016 um 12:57 schrieb Frank Ganske:

please consider, I don't understand why LittleProxy needs two
ChannelPipelines. I could miss here therefore.

Sorry for confusion. LittleProxy (every proxy) acts as a server with a
ServerBootstrap and as a client with a separate Bootstrap. So it have to
contain ChannelPipeline twice. (of course, see
https://github.com/ganskef/shortcircuit-proxy#using-handlers)

I've found a way to reproduce it. With Little Proxy listening on local port 8080 the following script will make the request fail with the exception:
curl -vvvv http://httpbin.org/post -H "Expect: 100-continue" -H "Content-Type: application/javascript" -d '{"blah":"lbah"}' -x http://localhost:8080

Note "Expect: 100-continue" header - it will make netty send 100 status code triggering the bug at LP.

Hi @nikolay-popov thank you very much for the reproducer! Sadly I could not reproduce the failure on Linux and Mac OS X with Java 1.8. I've tried some curl versions but everything seems to work well. I've merged the PR nevertheless.
Would you like to see the outputs? What's your environment?


refactor dns

Signed-off-by: Long<EMAIL_ADDRESS>Sync from https://github.com/kubeedge/kubeedge/pull/1840

/assgin

/lgtm


Readme update: Markdowner is dead

The link goes to a "domain for sale" page. It should be removed from the readme.

Thanks, I've submitted a pull request for this.

Pull from @junderhill  has been merged now.


Altair GraphQL Theme?

Would be nice to get a theme for https://altair.sirmuel.design/
More info about theming: https://www.xkoji.dev/blog/theming-in-altair-graphql/
There is a dracula theme built it but it has a few bugs and does not loom that good. Has room for improvement.
Thanks!

I will probably report this in the Altair Repo instead.


xsl:for-each Code Coverage Non-Conformance

Current Non-Conformance
The xslt-code-coverage-behavior-by-element.md file says that xsl:for-each elements should be marked based on the XSpec trace data.
The coverage-report.xsl in 3.0.3 marks them correctly but uses trace data from their child elements rather than trace data from the xsl:for-each element itself.
Changes in coverage-report.xsl
The coverage-report.xsl in 3.0.3 includes xsl:for-each as a match in a xsl:template that has the following comment above it:
<!-- A hit on these nodes doesn't really count; you have to hit       their contents to hit them -->
The rule needs to be amended to use the XSpec trace data for the xsl:for-each element.
Changes in test/end-to-end/cases-coverage/expected
None.

Now that the end-to-end/cases-coverage/xsl-map-01.xsl file has an instance of xsl:for-each whose only child is xsl:map-entry (which is never traced), that coverage report currently has a bug where xsl:for-each is marked as "missed" instead of "hit". So, I added the "bug" label, and we can expect the fix for this issue to change that particular coverage report.


issue compiling roapi-http v0.1.13  could not compile actix-cors

Hello,
I try to compile roapi-http from the source zip
I have an error when I compile
cargo install --verbose --path ./roapi-http --bin roapi-http
building
...
...
error[E0053]: method `error_response` has an incompatible type for trait                                                              │
  --> /usr/local/cargo/git/checkouts/actix-extras-3214827614a42f65/ab3bdb6/actix-cors/src/error.rs:53:5                               │
   |                                                                                │
53 |     fn error_response(&self) -> HttpResponse {                                                                                │
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `BaseHttpResponse`, found struct `actix_web::HttpResponse`          │
   |                                                                                │
   = note: expected fn pointer `fn(&CorsError) -> BaseHttpResponse<actix_web::dev::Body>`                                             │
              found fn pointer `fn(&CorsError) -> actix_web::HttpResponse`                                                            │
                                                                                │
error: aborting due to previous error                                                                                │
                                                                                │
For more information about this error, try `rustc --explain E0053`.                                                                   │
error: could not compile `actix-cors`                                                                                │

@Diluted could you share the rust version here?

rust version 1.51 because 1.50 gives me another set of error with flatbuffers regarding const generics:
error[E0658]: const generics are unstable
|
28 | pub struct Array<'a, T: 'a, const N: usize>(&'a [u8], PhantomData);
|                                   ^
|
= note: see issue #74878 https://github.com/rust-lang/rust/issues/74878 for more information

I can reproduce this on my end as well, looks like cargo install doesn't honor the Cargo.lock file shipped in the source. From my cargo build log, I see:
actix-web v4.0.0-beta.6

But in the lock file, it's pinned to beta.4.
As a work around, you could use cargo build to produce the binary, then manually install it into your PATH.

released v0.2.0. I am going to try to migrate away from actix-web because it's not being actively maintained anymore unfortuately.

welp, looks like even pinning the version in Cargo.toml is not enough to make cargo install work :thinking:

oh well, turns out this is a well known problem, see https://github.com/rust-lang/cargo/issues/7169. I will update all instructions to run cargo install with --locked argument.

updated docs everywhere.

@houqp thanks, I will have a look today or later this week


DescribeTable call hidden in read_items

I'm using read_items but  inside that call is another API call. Can this be avoided?
https://github.com/aws/aws-sdk-pandas/blob/6c0f65b6b63b223bec1059ecd037697b068f7e63/awswrangler/dynamodb/_read.py#L617
To:
https://github.com/aws/aws-sdk-pandas/blob/6c0f65b6b63b223bec1059ecd037697b068f7e63/awswrangler/dynamodb/_utils.py#L22
To:
https://github.com/aws/aws-sdk-pandas/blob/6c0f65b6b63b223bec1059ecd037697b068f7e63/awswrangler/dynamodb/_utils.py#L42
When I enable debug logging (boto3.set_stream_logger(name='botocore') and call table.key_schema I see:
2023-07-18 09:19:42,633 botocore.hooks [DEBUG] Event request-created.dynamodb.DescribeTable: calling handler <function add_retry_headers at 0x1a316ec20>

This means every read_items call is doing this extra lookup. Could an option be added to provide the key_schema explicitly? Only so many items can be provided to read_items (100 max) so it's guaranteed that for someone using this library they're going to make this extra call 1% of their requests - if they're doing massive read traffic in the millions this adds up.

Hey,
More than 100 items can be returned by read_items, so this extra call to DescribeTable shouldn't happen that frequently.
However, I do see the case for allowing a customer to provide key_schema manually. I will discuss this with the rest of the team.
Best regards,
Leon

@mooreniemi can you expand on this please:

Only so many items can be provided to read_items (100 max)

as Leon mentioned read_items is not limited in size and returns as much as the call reads

@mooreniemi can you expand on this please:

Only so many items can be provided to read_items (100 max)

as Leon mentioned read_items is not limited in size and returns as much as the call reads

Jump in just to (hopefully) clarify what @mooreniemi is referring to.
The usage of wr.dynamodb.read_items is actually bounded by the intrinsic limit of underlying boto3 client iff explicitly provided with a list of partition/sort values with more than 100 items, as stated here
A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items.

A possible workaround is to implement a sort of manual pagination, and this might be addressed directly into aws-sdk-pandas itself, something like
CHUNK_SIZE = 100

partition_values = ... # list with more than 100 items
counter = 0
items = []

for _ in itertools.count():
    _partition_values = partition_values[counter : counter + CHUNK_SIZE]
    if _partition_values:
        items.extend(
            wr.dynamodb.read_items(
                table_name=table_name,
                partition_values=_partition_values,
            )
        )
        counter += CHUNK_SIZE
    else:
        break


:seedling: Improve the verification of Image

What this PR does / why we need it:
Add verification processing when DiskFormat is live-iso.
Signed-off-by: Zhou Hao<EMAIL_ADDRESS>

/retest

/test-v1b1-ubuntu-integration

@kashifest @furkatgofurov7 @smoshiur1237 PTAL

PTAL

@kashifest @furkatgofurov7 @smoshiur1237 PTAL

@kashifest @furkatgofurov7 @smoshiur1237  PTAL

What are we trying to achieve here, can you pleas give a bit more context of the issue?

What are we trying to achieve here, can you pleas give a bit more context of the issue?

Checksum can be ignored when the value of DiskFormat is live-iso.
I try to increase this part of the verification. Added comments to the code

/test-v1b1-ubuntu-integration

/test-v1b1-ubuntu-integration

cc @adilGhaffarDev @Xenwar

@kashifest @furkatgofurov7 Please see if there are any other questions.

/test-ubuntu-integration-main

Will be removed, this is to test CI behaviour.
/hold

/hold

/hold cancel

/test-ubuntu-integration-main

@mboukhalfa PTAL

/lgtm

/lgtm


Crash when a link is not clickable

The script crashes when selenium is unable to perform a click action on an element.
selenium.common.exceptions.ElementClickInterceptedException: Message:
Element <a class="post-url post-title" href="https://SITE_NAME/COURSE_NAME/"> is not
clickable at point (573,681) because another
element <iframe id="aswift_0" name="aswift_0"> obscures it

I think such errors should be caught and handle properly.

No worries, I'll fix that in my next commit


Apollo client should report errors into sentry

The Chore
The current shared apollo client implementation is not reporting errors into sentry.
Tasks
libs/apollo-client/src/lib/apollo-client.ts

[ ] Add the ability to report errors into the client, probably a function argument so this can remain sentry independent.
[ ] Report non-not found errors into sentry in ErrorLink
[ ] Do something smart to avoid floods of the same errors (Edd can point us at something we used to do for this)

A scope of this issue has been done, in https://github.com/vegaprotocol/frontend-monorepo/issues/644 (?)


Mcagl/better startapp template

I filed a ticket regarding this pull request, where I explained the motivations of the patch I propose: https://code.djangoproject.com/ticket/28307
I hope to have done everything right.
Kind regards,
Mark

Isn't # coding: utf-8 implicit on Python 3?

@charettes if I understand correctly, utf-8 is the standard in Python 3, so it seems redundant (https://www.python.org/dev/peps/pep-3120/)
I admit that adding the encoding is "muscular memory" from the Python 2 years.
But maybe it's still useful for some editors that can set the right encoding using that line?

Yes, I believe # coding: utf-8 is obsolete -- we removed it from the Django code. Based on past discussion, I doubt there will be consensus to more "stub files". I left a more detailed reply on the ticket.


Session expiration isn't signed

The expiration date+time is written to a section of the cookie that isn't signed. This makes it simple to use old session cookies to access systems.

The code says something else:
https://github.com/pallets/itsdangerous/blob/c96e82d42ed46b889321989569d40ce7b205bded/src/itsdangerous/timed.py#L41-L42

Ah, my bad! Thanks for the clarification, @ThiefMaster.


Admin User Management

...promote other user accounts to have admin status, so that new administrators can have the same privileges I have
...delete a user, so users who should not be able to log in anymore cannot
...trigger password reset for a user (that is, the next time they successfully log in with their old password, they are prompted for a new one), so that I can be proactive in getting users to change their passwords after a period of time


HSEARCH-2299 Add a CONTRIBUTING.md file

@gunnarmorling I based this on the Validator CONTRIBUTING.md. I added a few things so if we agree on this, I'll also update the Validator CONTRIBUTING.md.

@Sanne all taken care of!

thanks, merged!


Implemented ProperIn and ProperContains

Fix for issue #47

A few consistency/cleanup things to fix before we merge this:

The NOT-FAILING test ProperlyIncludesNullLeft was deleted in the XML version of CqlListOperatorsTest but retained in the older CQL+Java version; it should not have been deleted unless your new set makes it redundant.

Also the test ProperlyIncludedInNullLeft was made to pass by your fix but it still has the TODO marker indicating it needs fixing, so you'll need to remove that marker, or remove that test times three if it was replaced by your new tests which it probably was.

Also, new test DateTimeAfterMonthNull was added to the CQL+Java but not to the XML; it probably should not have been added in this commit.


Error when clicking "Create Army"

After making an army and clicking the create army button, this error pops up and nothing happens. I was able to create armies fine half an hour ago and with these models. My internet was up fine.

After making an army and clicking the create army button, this error pops up and nothing happens. I was able to create armies fine half an hour ago and with these models. My internet was up fine.

I too have received this error.

with current workshop BS2TTS

Re-downloading a clean workshop copy of the mod fixed the issue for me

This should be fixed now


Add  Op  MultiHeadAttention and GroupNorm  Support

we find some error in some special model:
File "C:\Users??\anaconda3\Lib\site-packages\onnx_tool\node.py", line 158, in value_infer
raise NotImplementedError(f'this Node {self.op_type}-{self.name} has no value_infer')
NotImplementedError: this Node MultiHeadAttention-MultiHeadAttention_0 has no value_infer
raise NotImplementedError(f'this Node {self.op_type}-{self.name} has no value_infer')

NotImplementedError: this Node GroupNorm-GroupNorm_0 has no value_infer

Hi, I can not find these two operators in ONNX operators. Are they the custom operators created by you?

Hi .
not my custom operators .
I convert the Pytorch  unwayml/stable-diffusion-v1-5  model to  onnxruntime_directml  mode by  Microsoft Olive .
I find there are two operators don't support value infer and profiling
Here is the link:
https://onnx.ai/onnx/operators/onnx__GroupNormalization.html
https://github.com/microsoft/onnxruntime/blob/1c6cb5dfebe38b09627430f0add54416653a2ceb/onnxruntime/contrib_ops/cpu/bert/multihead_attention.h#L13

@elonw2008 GroupNormalization (GroupNorm you wrote, I believe, is ONNXRuntime's GroupNorm) is an ONNX operator. But multihead_attention is an operator of ONNXRuntime. It's more like a custom operator of the runtime library. Other runtime libraries may not have this operator.

So I will suggest you add these OPs with onnx-tool's custom registry: code. I hope you understand that onnx-tool is a tool of ONNX, not ONNXRuntime.


Update getSubmitToAccountID with category and tag approver

Details

Update getSubmitToAccountID with category and tag approver
Fixed Issues

$ https://github.com/Expensify/App/issues/51001
PROPOSAL: https://github.com/Expensify/App/issues/51001#issuecomment-2419241110
Tests

Precondition:

Create a WS and invite three users: employee, approver1, approver2
Enable workflows and assign admin as an approver
Add approver1 as approver of any category (CAT_APPROVER) in OD
Add approver 2 as approver of any tag (TAG_APPROVER) in OD

[Employee] Go to WS chat and submit an expense with the category CAT_APPROVER
[Employee] Submit the expense and verify that the approver1 appears in the next step and the expense is submitted successfully
[Employee] Submit another expense with the tag TAG_APPROVER
[Employee] Submit the expense and verify that the approver2 appears in the next step and the expense is submitted successfully
[Employee] Submit two expenses, the first expense with the category CAT_APPROVER and the second one with the tag TAG_APPROVER
[Employee] Submit two expenses and verify that the approver1 appears in the next step and that the expense is submitted successfully
[Employee] Submit two expenses, the first expense with the tag TAG_APPROVER and the second one with the category CAT_APPROVER
[Employee] Submit two expenses and verify that the approver1 appears in the next step and that the expense is submitted successfully

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

Offline tests

Do the same step above and only need to verify that the approver display in the next step is correct.
QA Steps

[Employee] Go to WS chat and submit an expense with the category CAT_APPROVER
[Employee] Submit the expense and verify that the approver1 appears in the next step and the expense is submitted successfully
[Employee] Submit another expense with the tag TAG_APPROVER
[Employee] Submit the expense and verify that the approver2 appears in the next step and the expense is submitted successfully
[Employee] Submit two expenses, the first expense with the category CAT_APPROVER and the second one with the tag TAG_APPROVER
[Employee] Submit two expenses and verify that the approver1 appears in the next step and that the expense is submitted successfully
[Employee] Submit two expenses, the first expense with the tag TAG_APPROVER and the second one with the category CAT_APPROVER
[Employee] Submit two expenses and verify that the approver1 appears in the next step and that the expense is submitted successfully

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

PR Author Checklist

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

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

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

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

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

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

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

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

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

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

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

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

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

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

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

Screenshots/Videos

Android: Native
https://github.com/user-attachments/assets/f9f23c1f-889d-48be-83a7-8c83f1866786

Android: mWeb Chrome
https://github.com/user-attachments/assets/d6446d55-f126-4600-9ee0-dde43471aae1

iOS: Native
https://github.com/user-attachments/assets/21bf1a23-291d-478f-a13d-ec6a2d1b2388

iOS: mWeb Safari
https://github.com/user-attachments/assets/2a5e1404-7d2e-4058-9670-fc4b897418f1

MacOS: Chrome / Safari
https://github.com/user-attachments/assets/461f6d63-3e3d-4621-b854-95b8d25c7f42

MacOS: Desktop
https://github.com/user-attachments/assets/cc70616e-af1d-420d-b3db-821e8c18aa4b

@Beamanator We have an issue where the approver for either a tag or a category cannot approve the expense.
https://github.com/user-attachments/assets/86fbd90d-24eb-4b96-a805-52868764b00c
Have we got another rule from the backend regarding approvers for categories or tags? And is it included in the scope of this issue?
@nkdengineer I discovered an issue where the selected approver becomes unstable if there’s a value submission error
https://github.com/user-attachments/assets/f3b8841d-e65f-4c99-90d4-75f5956ec55b

Oof good to know! I'll look into this right meow

Ok so this is all a bit new at the moment (supporting category & tag approvers in NewDot) so we've def got some bugs to work out. Let's try to make each as clear & reproducible as possible so it's easy to resolve them 1 by 1 🙏

I am noticing that when the submitter submits to a category/tag approver, that approver is not invited to the workspace chat, they only have access to the expense report. I believe that's a 🐛
@suneox I see you somehow got an error 'Policy approve error', can you reproduce? I couldn't figure out how to reproduce that issue
And sorry but I'm a bit confused what exactly you're testing in your 2nd video & what the bug(s) are since it's a bit long 😅

@suneox I see you somehow got an error 'Policy approve error', can you reproduce? I couldn't figure out how to reproduce that issue

We can reproduce the issue in this PR after an employee submits an expense has category X that requires approval from approver A on category X, then approver A approve the expense.

And sorry but I'm a bit confused what exactly you're testing in your 2nd video & what the bug(s) are since it's a bit long

The issue happen from second 1:06 -> 1:11 (and 1:32 -> 1:39) approver change from CP 51196 to CP Approver 2

@Beamanator We can reproduce the issue in this PR after an employee submits an expense has category X that requires approval from approver A on category X, then approver A approve the expense.

@suneox what am I doing different here?
https://github.com/user-attachments/assets/6d25207c-245e-486e-8993-c819cfd178c5

And sorry but I'm a bit confused what exactly you're testing in your 2nd video & what the bug(s) are since it's a bit long

The issue happen from second 1:06 -> 1:11 (and 1:32 -> 1:39) approver change from CP 51196 to CP Approver 2

I saw some things but again, it's only helpful if you have reproducible steps 🙏  from your video it looked like you clicked around kinda quickly & re-submitted even when you hit some errors instead of refreshing the page. It's useful to refresh to know if the error comes from the backend or the optimistic onyx data

The issue happen from second 1:06 -> 1:11 (and 1:32 -> 1:39) approver change from CP 51196 to CP Approver 2

I saw some things but again, it's only helpful if you have reproducible steps 🙏 from your video it looked like you clicked around kinda quickly & re-submitted even when you hit some errors instead of refreshing the page. It's useful to refresh to know if the error comes from the backend or the optimistic onyx data

I’m still trying to reproduce the issue but haven't found the exact steps to consistently reproduce it yet. So i will continue process with checklist and try it later

FYI I am seeing a bug locally where, when we are forwarding these category reports, initially the report action doesn't show up, but it will after a refresh -> I have a PR up to fix that

Reviewer Checklist

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Screenshots/Videos

MacOS: Desktop
https://github.com/user-attachments/assets/9024a4ba-8117-4c0b-af0a-08ff67c847a3

MacOS: Chrome / Safari
https://github.com/user-attachments/assets/6f85be20-ded4-4dc2-abf3-392a86eb235a

Android: Native
https://github.com/user-attachments/assets/01922afc-c9cf-4987-9f26-d4da4f573ef3

Android: mWeb Chrome
https://github.com/user-attachments/assets/aa67c68c-a146-4f52-b6dd-c6ae6a0a1e29

iOS: Native
https://github.com/user-attachments/assets/5c1648eb-64aa-4cd0-9cb9-3325b0389dcf

iOS: mWeb Safari
https://github.com/user-attachments/assets/2892d2d8-fabb-4268-af8d-346d77602884

Warning: TRenderEngineProvider: Support for defaultProps was raised on slack
Warning: Function components cannot be given refs was raised on slack
Warning: findDOMNode is deprecated in StrictMode was raised on slack

@nkdengineer would you mind pulling main? I have another backend PR to fix the issue in this flow with the correct / incorrect approver following a category/tag approver - if these work well together, i think we can get this merged soon!

@Beamanator Just merged.

@nkdengineer just checking in, did you end up testing out https://github.com/Expensify/App/pull/51196#discussion_r1816169977?

What's the latest on this PR? We're trying to wrap up support for this use case so that we can remove a related beta.

We're waiting the backend fix here.

@nkdengineer the Web-E PR just went live, can you please retest?

Sure.

So the plan will be:

Get this PR merged
Open next issue that accounts for a "better approval chain / next approver / receiver" code. In this issue we'll account for:

Multiple category / tag approvers
Managers who have been removed from the approval chain & who is next after they approve a report
Combinations of all of the above

Let's get this merged - I'll be creating a new issue today for the approval-side of category/tag approvers & updating the approval chain / next receiver logic

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


T182: locally metrizable ==> first countable

The contrapositive will then automatically deduce that a lot more spaces are not locally metrizable.

If we add "locally pseudometrizable" as a property, and "pseduometrizable => locally pseduometrizable" and "locally metrizable => locally pseudometrizable", we can instead update https://topology.pi-base.org/theorems/T000057 to say "locally pseudometrizable => first countable". Thoughts?

If we add "locally pseudometrizable" as a property, and "pseduometrizable => locally pseduometrizable" and "locally metrizable => locally pseudometrizable", we can instead update https://topology.pi-base.org/theorems/T000057 to say "locally pseudometrizable => first countable". Thoughts?

Yeah, "locally pseudometrizable" is not a very important property, but it does tidy up some things.  We can close this PR and do another one.  Would you like me to give it a stab, or you?
BTW, I thought of adding this theorem to automatically deduce "not locally metrizable" for #241.

Yeah, "locally pseudometrizable" is not a very important property, but it does tidy up some things.

Hard agree - I don't think it's the last "technical" property that we'll add to the pi-Base that is there to simplify the connections of more important/interesting stuff.
I'm scrambling to get two talks ready for STDC tomorrow (I offered, perhaps unwisely, to put together a pi-Base workshop last minute, if you're available to join at 3:05 central, email me for details).

So please feel free to edit this PR or close and reopen a new one yourself.

I'm scrambling to get two talks ready for STDC tomorrow (I offered, perhaps unwisely, to put together a pi-Base workshop last minute, if you're available to join at 3:05 central, email me for details).

Forgot about STDC.  Best of luck for your talks.  Unfortunately I have a dentist appointment at that time.

Will open a separate PR as discussed.

For the purpose of my workshop, I plan on implementing the changes we discussed here for a new PR (and maybe have Chris or Lynne review it), and to review your #241.

For the purpose of my workshop, I plan on implementing the changes we discussed here for a new PR (and maybe have Chris or Lynne review it), and to review your #241.

Very good idea!


just changing my project's primaryUrl

@jesseilev Just a heads up, your primaryUrl doesn't currently resolve with https, but it does with http. Do you want to change it? Or is there something you need to fix on the server end for https?


Replace HTTP with HTTPS

TPB now redirects to https, which leads to open-uri errors

Oops, just noticed that there's already a pull request open, sorry.


Add new update and delete features

Is your feature request related to a problem? Please describe.
ExecuteUpdate and ExecuteDelete are a way to save data to the database without using EF's traditional change tracking and SaveChanges method.
Describe the solution you'd like
Extension of the update and delete methods with functions of an expression tree.
Describe alternatives you've considered
Leave it as it is.
Additional context
Saving Data

This is not going to happen.

This is not going to happen.


[HAMMER] Don't raise error when tenant is not find in chargeback VM

back port of https://github.com/ManageIQ/manageiq/pull/19280
@miq-bot assign @simaishi

@miq-bot add_reviewer @gtanzillo


Combine individuals and sample set tables

This PR combines the two tables (thus finally closes #16 and closes #18) and adds a global refresh button as an improvement of the temporary fix which closes #114.

If you change Update to Refresh (or the other way round) you can go ahead and merge.

Right. Thank you for the reminder


update bootstrap example app url

Use direct heroku url since CNAME config doesn’t work anymore

Thanks!


split is no longer callable from python?

Hello, I installed ersatz shortly after your talk your ACL 2021 talk. I was calling split() from python. I recently reinstalled it and split is no longer exposed?
I used to be able to import split as
from ersatz import split as ersatz_split
Then I could from python split text, which is a very handy alternative to the nltk spliter or using stanza or spacy.
Perhaps it's something I am missing, but it would be great to have it. Our group planned to include it as an option for our text summarizer once it is released.

That's because from ersatz import split will import the split module (split.py) instead of the split() function inside __init__(), which is what should be exposed, right?
from ersatz.__init__ import split works for me. (But isn't really nice...)


CLOUD-42308: integration test fix: ssh key have to be base64 encoded when creating azure rm credential

@doktoric pls review

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1723/

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1724/

Please be more specific with the description of the commit and please rebase it to master.

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1727/


[Enhancement] Lazy properties in code output

Description
Instead of generating a custom singleton pattern for every icon, we could use the built-in lazy functionality.
For example:
val ArrowLeft: ImageVector
    get() {
        if (_ArrowLeft != null) {
            return _ArrowLeft!!
        }
        _ArrowLeft = ImageVector.Builder(....).build()

        return _ArrowLeft!!
    }

private var _ArrowLeft: ImageVector? = null

becomes
val ArrowLeft: ImageVector by lazy {
     ImageVector.Builder(....).build()
}

A minor thing to be sure but it does:

Reduce indentation by one level
Make the singleton pattern clearer
Reduce the lines of code by 8 / per file which across something like 300 icons becomes significant

P.S. Love the plugin!

Hello, thanks for idea 🙂
I thought about this option and want to add in next releases.
One point, I think better to add LazyThreadSafetyMode.NONE) to avoid unnecessary synchronization in this place.
Smth like this:
val ArrowLeft: ImageVector by lazy(LazyThreadSafetyMode.NONE) {
     ImageVector.Builder(....).build()
}

Even better, looking forward to it!
Feel free to close this issue unless you want to keep it around as a reminder.

Will keep open to track progress 🙂

I believe this is not ideal because lazy init will increase memory consumption by keeping a reference to the initializer and the lazy property delegate wrapper that in this case will serve no purpose other than looking pretty. If Google wanted to use lazy for their icons, they would have already done that, but they didn't.

Yes, it is one of the reason why backing property is default output in plugin 🙂
Lazy block is just an alternative, but devs should be careful with this.

@vladmircan feature implemented in latest nightly build: https://github.com/ComposeGears/Valkyrie/releases/tag/Nightly
could you please check on your project?

@egorikftp It works, great job! Love that you added a toggle to choose between code outputs.
For my information and others that may stumble upon this thread, what is the expected additional memory footprint per image?

GPT has other opinion about lazy block:
Memory Differences Analysis
Memory Overhead:

Custom Lazy Initialization: The first approach has a slight overhead due to the nullable _Icon property. Each access involves a check and an additional property holder.

lazy Delegate Initialization: It allocates additional memory through its internal mechanisms, but generally more optimized and compact compared to manually handling the lazy initialization.

The actual memory difference between these approaches is likely minimal and may not significantly impact performance, especially if the initialization code is lightweight and the application doesn't heavily rely on these icons.
However, lazily initializing via lazy is usually more idiomatic, concise, and potentially more performant because it avoids the manual null check and reduces boilerplate code.
Conclusions:

Maintainability and Readability: Using lazy is generally more readable and maintainable.

Memory Efficiency: lazy is optimized for memory and skips explicit null checks.

Thread Safety: Both approaches, as provided, are not thread-safe. For thread safety, use LazyThreadSafetyMode.SYNCHRONIZED as needed.

@egorikftp Something to be aware of for sure, thanks for posting the analysis!

GPT is not entirely correct.
If we use non-thread-safe lazy, the additional footprint will be an additional class header and instance allocation + a dynamic mutable reference. The lazy internally also uses an if check to determine if the variable is initialized. The null value is only using a few cpu cycles for dereferencing and memory pointer comparison.
At this point this discussion is mostly nitpicking and overengineering, but I think the best solution is to just let the user choose the approach they want to use.

Will close issue as completed in 0.5.0 release
https://github.com/ComposeGears/Valkyrie/releases/tag/Valkyrie-0.5.0


Shuffle tests

Test robustness of unittests. They should pass in any order.

I ran into some pickling errors with parallel turned out. I am not really sure what we would need to do to get that working. If shuffle works here, I think that would still make for a pretty big win 😀

I ran into some pickling errors with parallel turned out. I am not really sure what we would need to do to get that working. If shuffle works here, I think that would still make for a pretty big win 😀

Yes, I was pleasantly surprised by it as well.
I do not see some easy fix for --parallel so I will keep only --shuffle here and I will try to fix --parallel in separate PR.

@kiblik I think tests were passing here by coincidence like the last time we tried something like this.. Very frustrating... We're going to revert for now, and then fix more widely in the future. Once those fixes are applied, we can enable shuffle again
I found something out about this one

I ran into some pickling errors with parallel turned out. I am not really sure what we would need to do to get that working.

The error raises from an exception/stacktrace during the test that is not able to be pickled. I think exceptions are intended to be handled, and then the test will fail via the assertions.

@kiblik I think tests were passing here by coincidence like the last time we tried something like this.. Very frustrating... We're going to revert for now, and then fix more widely in the future. Once those fixes are applied, we can enable shuffle again
I found something out about this one

I ran into some pickling errors with parallel turned out. I am not really sure what we would need to do to get that working.

The error raises from an exception/stacktrace during the test that is not able to be pickled. I think exceptions are intended to be handled, and then the test will fail via the assertions.

I suppose the problem with pickling is mainly in --parallel (#10408). But I agree that --shuffle is not behaving "well". I planned to offer to exclude unittests.test_rest_framework and run it separately without --shuffle. But full revert is probably better idea for now.


Add DevicePixelRatioCapability

This capability that allows for specifying the device pixel ratio on painters that support it. It is especially meant to be used to render the scene in standard resolution on Macs with high resolution displays.

Let's not make everything into a capability. Remember: There should be as few capabilities as possible. As far as I see, the devicePixelRatio was already taken into account by using Qt's functionality, and the result was passed on to the viewport capability, which is exactly what I would expect. No need for the painter to know anything else. So why should this be necessary?

Rendering fourth the amount of pixels on notebooks is not, what you usually want. Instead, most would like to render in to framebuffers of "standard" resolution and blit into the high resolution main framebuffer. therefore, I need both sizes.
I thought about merging it into the ViewportCapability, but didn't find it appropriate. Maybe there should be an intermediate capability like "ScreenDeviceCapability" that contains the only the size of the render target and other information like "devicePixelRatio". this could be translated into the viewportcapability in the painter.

@scheibel proposed a better way to solve this. Instead of painters, the viewer could implement such functionality. The only thing that would need to be adapted is the blitting into the main frame buffer. This is currently done by the painters, but would have to be done by the viewer.

I'm not sure if this is better, because it means that the Painter is not even able any more to use the full resolution, because it doesn't know about it, so we would in fact ignore the high resolution of high resolution displays. For complex scenes I understand why a reduced resolution is wanted, but what about, e.g., 2D painters for image processing? I think the painter should know the real resolution (as it is now), and a proposed reduced resolution it can use if it wants to (it could even do so on its own, but of course it's better to pass on the values from the OS). This could be done through the Viewport capability. Please let's wait with further proposals until the property refactoring is done, then we can focus on improving (and maybe repairing) the gloperate architecture.

I think it is not a painters job to know about it's surroundings or even make assumptions or demands on them. The only exception to this should be provided with capabilities.
If a painter wants to know the resolution it should use to render, then there is a viewport capability. This resolution has no extra information attached (e.g., if it is native, if it is only a part of a canvas or it it reresents a fullscreen canvas).
If we want a painter to use such information, we have to adapt existing or create additional capabilities.
I rather create and use painters that doesn't need to know about the overall resolution than painters that change their behavior regarding these purely viewer-dependent states.
If a painter actually wants to adapt to the type of environment it is executed, I would either use separate painters for separate environments (the viewer is in control), additional provided information via capabilities (the painter is in control), or non-capability-specific properties on a painter (user / specific interaction technique/viewer control).

Rephrase this in a way I can understand, please.
Of course a painter needs to know the resolution?! Otherwise it would be hard to make a 1:1 pixel rendering into a window, which I think is still the main use case for rendering. And yes, to pass that information, the ViewportCapability seems right.

I think the painter needs to know a resolution (maybe, including an indication about the dpi ratio or the original viewport), not the resolution and it is the viewers responsibility to pass a 1:1 dpi ratio where it is appropriate. But between "the painter interpretes and acts upon the resolution" and "the viewer interpretes and manipulates the resolution" there is a third option where both negotiate about the resolution and both have influence on the rendered outcome.

That's all I ever proposed - the painter should get the necessary information (resolution and devicePixelRatio), so it can decide what it renders. I never said anything about the painter demanding anything.

Wouldn't be the easiest implemention to implement an option inside the viewer to switch between native / scaled mode? After all, I thought the painter should be device independent. The device pixel ratio is a very mac specific concept and, thus, handling it once instead in the viewer which is to some degree platform independent seems more appropriate than multiple times in painters. Of course the painter would be able to use the native resolution, if the user wanted it. He just would have to enable the option.

The gloperate 2.0 branch handles differing device pixel ratios including all cases. Thus, this PR isn't required anymore.


fix: Maximum call stack size exceeded at guessClassName

Related issues: #653

Codecov Report

Merging #665 (3069496) into main (0a0f456) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #665   +/-   ##
=======================================
  Coverage   88.16%   88.17%
=======================================
  Files          57       57
  Lines        4860     4864    +4
  Branches     1034     1036    +2
=======================================
+ Hits         4285     4289    +4
  Misses        311      311
  Partials      264      264

Impacted Files
Coverage Δ

src/utils/tools.ts
94.27% <100.00%> (+0.10%)
:arrow_up:

Continue to review full report at Codecov.

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


merge package template from Kronos-Tools/npm-package-template

package.json

chore(devDependencies): update<EMAIL_ADDRESS>from template
chore(devDependencies): update<EMAIL_ADDRESS>from template

Coverage remained the same at 91.667% when pulling b59e017cac31016cf6ab7942c7469c766aaacaf3 on template-sync-1 into ea077f4ae4e48bb1f0ddbacdbf0d721e64f78aa4 on master.


Dark mode for Squoosh homepage

Is your feature request related to a problem? Please describe.
Every time I open the Squoosh app I get this big white "flash" that blinds me because of the background.
Describe the solution you'd like
Dark mode is enabled on all the apps I use. A dark mode for Squoosh would be great as well.
Does other service/app have this feature?
Basically any app that has a dark mode feature.
Additional context
Example of what a dark mode could be on the Squoosh homepage.
White mode :

Dark mode :

Thank you in advance!

Can you give me the color specifications? Maybe I can open a PR with a solution implementation.

Hi @surma,
Any news on this please ? :pray:
Thanks