Remove lodash import

Hoist P/R Checklist
Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

[x] Caught up with develop branch as of last change.
[x] Added CHANGELOG entry, or determined not required.
[x] Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
[x] Updated doc comments / prop-types, or determined not required.
[x] Reviewed and tested on Mobile, or determined not required.
[x] Created Toolbox branch / PR, or determined not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

It seems that Lodash requires _ in most of its declaration files, specifically a number of the ones we are using. For example: object.d.ts begins with the line 'import _ = require("../index");' . In the Lodash version we are using, the lodash.js file adds _ to the window. There were tickets/PRs to split Lodash into two parts: one with the global variable, another without, but Lodash has declared issue bankruptcy, so it is unlikely this will happen. The way to remove it from global scope is to then add _.noConflict() in Bootstrap.js. @amcclain mentioned in a Slack discussion that this adds an entire static library to the window, but I think it is already added by lodash and this will remove it. Further discussion is required - these are my findings so far.

Thanks - not sure what to make of it. Unclear where the code screenshot above comes from.
I don't have / wasn't looking to claim any knowledge about the noConflict feature - not anything I have used or research.
I must have been wrong that previously we did not have _ on window, or something changed that we can't revert back. I don't have any further opinions on this, personally.

Looking


Problem with controllers

O padrino edge, if I run:
get :edit, with: :id do
   p params
end

and try to get this controller with ?id=1234&test=1234
Only the key :id is on the params, on the previous padrino versions the :test key would also be part.

Failed to confirm.

I send a test/example. Just give me 1 or 2 hours.

It's related with #1942
    get '/update', with: :id do
      p params[:id]
      p params[:test]
      params.inspect
    end

HTTP GET: /update/1234?test=message
Result:
p params[:id] => 1234
p params[:test] => nil
params.inspect => {"test"=>"message", "id"=>"1234"}

Can't reproduce. Please provide a failing project with Gemfile.lock
    get '/edit', with: :id do
      puts params[:id]
      puts params[:test]
      puts params.inspect
    end

ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
rack (1.6.4)
sinatra (1.4.6)
padrino (edge)

DEBUG -       GET (0.0013s) /edit/1234?test=message - 200 OK
1234
message
{"test"=>"message", "id"=>"1234"}

Re-tested and it's working. Hadn't updated to last edge code.
Sorry ujifgc for making you loose the time :/


feat(eos_designs): Implement tag for documentation

Change Summary
Implement documentation tag to allow user to not generate AVD documentation
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes)
[ ] Documentation content changes
[ ] Other (please describe):

Related Issue(s)
N/A
Component(s) name

arista.avd.eos_designs
arista.avd.eos_cli_config_gen

Proposed changes
Create a new tag named documentation that can be skipped with ansible CLI
How to test
> ansible-playbook playbooks/avd-eapi-generic.yml --tags build --skip-tags documentation
Playbook run took 0 days, 0 hours, 0 minutes, 33 seconds

> ansible-playbook playbooks/avd-eapi-generic.yml --tags build
Playbook run took 0 days, 0 hours, 1 minutes, 12 seconds

Checklist:

[x] My code has been rebased from devel before I start
[x] I have read the CONTRIBUTING document.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have updated molecule CI testing accordingly
[x] All new and existing tests passed (pre-commit, make linting and make sanity-lint).

LGTM, Maybe this should replace generate_device_documentation from eos_cli_config_gen, since this would be a better way to control it. @carlbuchmann


How to eval 3DOH dataset?

Hi, I'm struggling to process the 3DOH dataset to satisfy the fomat of the input data. How to get keypoints similar with DoubleB?

I've got answer from the author: "可以通过提供的SMPL标注生成人体网格，接着通过regressor https://github.com/boycehbz/DMMR/blob/main/data/J_regressor_halpe.npy根据网格获取人体三维关节点，将三维关节点投影到二维，符合DMMR的形式存储。"
Maybe it would be helpful to somebody who want to process the 3DOH dataset


The following modules are missing or built with a differente engine

Thx for the plugin!
When i enable the plugin in a blank project in unreal engine 4.24.2 and restart it wants to rebuilld the plugin, but fails to do so.
"The following modules are missing or built with a differente engine" Exodus import. Would you like to rebuild them now?"
"Porject could no be compiled. Try rebuilding from source manually."
In version 2.23.1 he is at least "starting to build" but also failing after a few moments with the same message.

Hi. Could you provide details? I are cloning from master branch? Are there build errors? I'll check this shortly.

Hi!
I downloaded (cloned) the repo master branch yes.
I had the same problem now with another project, but it got fixed by installing .net framework and visual studio for game development workload.
But for Exodus it still doesnt work.
When i am home i will try to add an empty c++ class to my blank project and try to build it again with visual studio via the .unrealproject context menu to see if that changes something.
i will keep you updated.

I've been stuck on trying to implement some feature on wip branch which is not here, and that included some tweaks to get it compile on 4.24 specifically. I'll see if I failed to provide them for the master.

Same problem here, is there any solution ?

@Rombond Given that this is a show stopper, check it in 48 hours to see if I uploaded a fix.

@Rombond , @vozer I've uploaded an update, see if this fixes the problem. 4.24 deprecated few things, seems that along the way they escalated from warnings to full errors.

Same error, i'm on 4.24.1

"The following modules are missing or built with a differente engine" Exodus import. Would you like to rebuild them now?"
"Project could not be compiled. Try rebuilding from source manually."

@Rombond I'm on windows system.
When you compile project on windows, there's a "show log" button which allows you to check the output.
If Mac OS version has similar, could you press the button and copy-paste the output here? This way at least I'll be able to check what the problem is.

https://imgur.com/a/2dC6EIL
that is what i have just before "Project could not be compiled. Try rebuilding from source manually."

@Rombond I need output from the moment AFTER the project fails to compile. Then it will have some sort of output. In the image you posted there are no error messages.

I know there is no error on my image,
i made a video on when i have an error https://imgur.com/a/NdYb7mB
There is no log with "Exodus" inside ...

@Rombond What happens when you try to compile project manually, like the error message suggest?

i can't open the project when ExodusImport is activate, i have to delete it manually

@Rombond  Compiling manually means compiling it through C++ IDE. Without opening UNreal Engine. On Windows it would be compiling through Visual Studio, and on Mac Os that would likely be compiling through XCode. On windows system solution file can be generated by right clicking on *.upgroject and selecting "Generate Visual Studio Project files". Mac OS should have something similar.

Hey!
So i now did the following:
Installed UE 4.24.2
Installed Visual Studio 2019
Added a Player-C++-Class in the Project
I tried starting it with Exodus Import in Plugins->Exodus Import,. no luck, still the same message.
I compiled the Project manually with Right-Click->Compile, no errors shown but when is tart the project still the same error.
I then opened the Project in Visual Studio and tried to run it and got the following error messages sry, thats in spansih
Severity	Code	Description	Project	File	Line	Suppression State Error	C1083	Cannot open include file: 'ModuleManager.h': No such file or directory	MyProject	C:\Users\User\Documents\Unreal Projects\MyProject\Plugins\ExodusImport\Source\ExodusImport\Public\JsonImport.h	5	 Error	MSB3075	The command ""C:\Program Files\Epic Games\UE_4.24\Engine\Build\BatchFiles\Build.bat" MyProjectEditor Win64 Development -Project="C:\Users\User\Documents\Unreal Projects\MyProject\MyProject.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.	MyProject	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets	44
https://imgur.com/rkHJHa6
https://imgur.com/744BJLC
https://imgur.com/QlpML9x

@vozer Okay, this is interesting. I'll try to replicate the issue on my end (because in my case this doesn't happen)

@vozer, @Rombond  Try the latest version from master and see if that fixes it.

In my case the problem was due to the fact I created a Blueprint project and tried to use the plugin, instead using a C++ project worked flawlessly!
The "only drawback" seems that there is no way to remove the plugin and keeping the material used which is complex to replicate, and removing the plugins folder breaks all the materials created. There should be a way to decouple the. plugin from the material allowing to removing the plugin when is not needed any more but keeping the materials generated (eg: cloning the material from the plugin folder to the import folder generated by the plugin).

In my case that cant be the problem bc i have a C++ Project.
But my USB with the Project on it unfortunateley died unexpectedly.
As soon as i recovered the data i will give you an update.
Thank you!

@Neogene I think you might be able to duplicate from plugin resources folder (after making it visible), but  easier decoupling is going to be a very low priority, and won't be implemented in near future.
@vozer There were few issues with include paths, and at some point include path became pedantic.  I fixed it and it should function now. If it doesn't, post an update here.

Hello
I have the same problem. when I try to compile from the source this is the error i get from visual studio:
1>------ Build started: Project: MyProject2, Configuration: Development_Editor x64 ------
1>Parsing headers for MyProject2Editor
1>  Running UnrealHeaderTool "D:\unreal projects\New folder\MyProject2\MyProject2.uproject" "D:\unreal projects\New folder\MyProject2\Intermediate\Build\Win64\MyProject2Editor\Development\MyProject2Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
1>Reflection code generated for MyProject2Editor in 8.1416845 seconds
1>Using Visual Studio 2017 14.13.26128 toolchain (e:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.13.26128) and Windows 10.0.16299.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Building 4 actions with 4 processes...
1>  [1/4] Module.ExodusImport.cpp
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(53): error C2039: 'InvalidateDeriveDataCacheGUID': is not a member of 'USkeletalMesh'
1>  E:\New folder (5)\UE_4.23\Engine\Source\Runtime\Engine\Public\Animation/PreviewCollectionInterface.h(13): note: see declaration of 'USkeletalMesh'
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(102): error C2065: 'FSkeletalMeshBuildSettings': undeclared identifier
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(102): error C2146: syntax error: missing ';' before identifier 'buildSettings'
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(102): error C2065: 'buildSettings': undeclared identifier
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(103): error C2065: 'buildSettings': undeclared identifier
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(103): error C2228: left of '.bRecomputeNormals' must have class/struct/union
1>  D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(103): note: type is 'unknown-type'
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(104): error C2065: 'buildSettings': undeclared identifier
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(104): error C2228: left of '.bRecomputeTangents' must have class/struct/union
1>  D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(104): note: type is 'unknown-type'
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/Tests/SkinMeshTest.cpp(117): error C2039: 'BuildSkeletalMesh': is not a member of 'IMeshBuilderModule'
1>  E:\New folder (5)\UE_4.23\Engine\Source\Developer\MeshBuilder\Public\IMeshBuilderModule.h(9): note: see declaration of 'IMeshBuilderModule'
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/UnrealUtilities.cpp(34): warning C4996: 'UStaticMesh::SourceModels': Please do not access this member directly; use UStaticMesh::GetSourceModel(LOD) or UStaticMesh::GetSourceModels(). Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>  E:\New folder (5)\UE_4.23\Engine\Source\Runtime\Engine\Classes\Engine/StaticMesh.h(577): note: see declaration of 'UStaticMesh::SourceModels'
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/UnrealUtilities.cpp(43): warning C4996: 'UStaticMesh::SourceModels': Please do not access this member directly; use UStaticMesh::GetSourceModel(LOD) or UStaticMesh::GetSourceModels(). Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>  E:\New folder (5)\UE_4.23\Engine\Source\Runtime\Engine\Classes\Engine/StaticMesh.h(577): note: see declaration of 'UStaticMesh::SourceModels'
1>D:/unreal projects/New folder/MyProject2/Plugins/ExodusImport/Source/ExodusImport/Private/UnrealUtilities.cpp(52): warning C4996: 'UStaticMesh::SourceModels': Please do not access this member directly; use UStaticMesh::GetSourceModel(LOD) or UStaticMesh::GetSourceModels(). Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>  E:\New folder (5)\UE_4.23\Engine\Source\Runtime\Engine\Classes\Engine/StaticMesh.h(577): note: see declaration of 'UStaticMesh::SourceModels'
1>e:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""E:\New folder (5)\UE_4.23\Engine\Build\BatchFiles\Build.bat" MyProject2Editor Win64 Development -Project="D:\unreal projects\New folder\MyProject2\MyProject2.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "MyProject2.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I would very appreciate it if you could help me

Issue #21 is similar to Issue #47(UE4.25.4: Exodusimport "...module missing or built with a different engine version")

Issue #21 is similar to Issue #47(UE4.25.4: Exodusimport "...module missing or built with a different engine version")

@Rombond This issue seems to be specifically related to running UE4 on MacOS.
I was able to work around this problem by installing UE4.23.4 on Windows10 on Parallels on  MacOS 10.15.
ExodusImport works perfectly on the SampleScene while running on UE4.23.4 on Windows10.
IMPORTANT NOTE: ExodusImport is still BROKEN in UE4.25.4 on MacOS 10.15.
I am CLOSING issue (#47) and leaving the original issue (#21) OPEN.

@Rombond This issue seems to be specifically related to running UE4 on MacOS.
I was able to work around this problem by installing UE4.23.4 on Windows10 on Parallels on  MacOS 10.15.
ExodusImport works perfectly on the SampleScene while running on UE4.23.4 on Windows10.
IMPORTANT NOTE: ExodusImport is still BROKEN in UE4.25.4 on MacOS 10.15.
I am CLOSING issue (#47) and leaving the original issue (#21) OPEN.

@MarshalScorpion This issue was related to a skeletal mesh test code which could not be compiled on unreal 4.23 or lower. The test has since been disabled for unreal 4.23.  I believe you contacted me via email regarding it and it was fixed.

@MarshalScorpion This issue was related to a skeletal mesh test code which could not be compiled on unreal 4.23 or lower. The test has since been disabled for unreal 4.23.  I believe you contacted me via email regarding it and it was fixed.

I'm closing this issue due to original report being fairly old and no followup from vozer/Rombond for a year. In case someone experineces a similar issue, please open a new issue.

I'm closing this issue due to original report being fairly old and no followup from vozer/Rombond for a year. In case someone experineces a similar issue, please open a new issue.

@Rombond Compiling manually means compiling it through C++ IDE. Without opening UNreal Engine. On Windows it would be compiling through Visual Studio, and on Mac Os that would likely be compiling through XCode. On windows system solution file can be generated by right clicking on *.upgroject and selecting "Generate Visual Studio Project files". Mac OS should have something similar.

Hi, i am using Ubuntu 18.04, and i get also the tip "try rebuilding from source manually", then I "make" the code in folder".../UnrealBlankProject", but I get 2 errors:
"/home/chris/exodus-demos/UnrealBlankProject1/Plugins/ExodusImport/Source/ExodusImport/Private/JsonObjects/getters.h:41:20: error: use of undeclared identifier 'jsonVal'
auto jsonObj = jsonVal->AsObject();
^
In file included from /home/chris/exodus-demos/UnrealBlankProject1/Plugins/ExodusImport/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/ExodusImport/Module.ExodusImport.cpp:3:
In file included from /home/chris/exodus-demos/UnrealBlankProject1/Plugins/ExodusImport/Source/ExodusImport/Private/builders/GeometryComponentBuilder.cpp:3:
In file included from /home/chris/exodus-demos/UnrealBlankProject1/Plugins/ExodusImport/Source/ExodusImport/Private/JsonImporter.h:7:
/home/chris/exodus-demos/UnrealBlankProject1/Plugins/ExodusImport/Source/ExodusImport/Private/MaterialBuilder.h:4:10: fatal error: 'MaterialBuilder/MaterialFingerprint.h' file not found
#include "MaterialBuilder/MaterialFingerprint.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Makefile:950: recipe for target 'UE4Editor' failed
make: *** [UE4Editor] Error 5
"
so, would you mind giving me some tips to solve this error?  I appreciate!


After installing packages manually, it still does not run.

Maybe more packages missing or 3.10 not supported.
Python version
(venv) 08:54:38|C|demo-face-gan> python --version
Python 3.10.0

My requirements.txt
requirements.txt
Error
2022-08-11 08:43:47.223040: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-08-11 08:43:47.223212: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
C:\Users\HaraldEllingsen\demo-face-gan\pg_gan\tfutil.py:179: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if v.shape.ndims is 0:
C:\Users\HaraldEllingsen\demo-face-gan\pg_gan\tfutil.py:181: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif v.shape.ndims is 1:
C:\Users\HaraldEllingsen\demo-face-gan\pg_gan\tfutil_cpu.py:179: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if v.shape.ndims is 0:
C:\Users\HaraldEllingsen\demo-face-gan\pg_gan\tfutil_cpu.py:181: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif v.shape.ndims is 1:
2022-08-11 08:44:55.899 Uncaught app exception
Traceback (most recent call last):
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\cache_utils.py", line 126, in get_or_create_cached_value
    return_value = cache.read_value(value_key)
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\singleton_decorator.py", line 262, in read_value
    raise CacheKeyNotFoundError()
streamlit.caching.cache_errors.CacheKeyNotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\scriptrunner\script_runner.py", line 557, in _run_script
    exec(code, module.__dict__)
  File "C:\Users\HaraldEllingsen\demo-face-gan\streamlit_app.py", line 227, in <module>
    main()
[requirements.txt](https://github.com/streamlit/demo-face-gan/files/9306758/requirements.txt)

  File "C:\Users\HaraldEllingsen\demo-face-gan\streamlit_app.py", line 28, in main
    session, pg_gan_model = load_pg_gan_model()
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\cache_utils.py", line 145, in wrapper
    return get_or_create_cached_value()
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\cache_utils.py", line 137, in get_or_create_cached_value
    return_value = func(*args, **kwargs)
  File "C:\Users\HaraldEllingsen\demo-face-gan\streamlit_app.py", line 137, in load_pg_gan_model
    config = tf.ConfigProto(allow_soft_placement=True)
AttributeError: module 'tensorflow' has no attribute 'ConfigProto'
2022-08-11 08:45:05.428 Uncaught app exception
Traceback (most recent call last):
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\cache_utils.py", line 126, in get_or_create_cached_value
    return_value = cache.read_value(value_key)
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\singleton_decorator.py", line 262, in read_value
    raise CacheKeyNotFoundError()
streamlit.caching.cache_errors.CacheKeyNotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\scriptrunner\script_runner.py", line 557, in _run_script
    exec(code, module.__dict__)
  File "C:\Users\HaraldEllingsen\demo-face-gan\streamlit_app.py", line 227, in <module>
    main()
  File "C:\Users\HaraldEllingsen\demo-face-gan\streamlit_app.py", line 28, in main
    session, pg_gan_model = load_pg_gan_model()
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\cache_utils.py", line 145, in wrapper
    return get_or_create_cached_value()
  File "C:\Users\HaraldEllingsen\demo-face-gan\venv\lib\site-packages\streamlit\caching\cache_utils.py", line 137, in get_or_create_cached_value
    return_value = func(*args, **kwargs)
  File "C:\Users\HaraldEllingsen\demo-face-gan\streamlit_app.py", line 137, in load_pg_gan_model
    config = tf.ConfigProto(allow_soft_placement=True)
AttributeError: module 'tensorflow' has no attribute 'ConfigProto'

Hey @haellingsen,
Sorry for the late reply! Indeed this app does not work for Python 3.10 as can be seen in the README:

The demo requires Python 3.6 or 3.7 (The version of TensorFlow we specify in requirements.txt is not supported in Python 3.8+)

Closing this


feat: transfer asset from one account to another

@inaie-makerx feel free to check my last 2 commits, fixed the issue with params on transfer assets as well. You fixed it on transfer algos but this was still the case for transfer assets as well, hence extra tests for max fee check as well. Also minor typo for param in the docs was changed to asset_id from assetID


update scalastyle to actually check our source code

What changes were proposed in this pull request?
update scalastyle version to 1.0.0.
How was this patch tested?
mvn scalastyle:check

I'll merge this upon tests pass.


Remove Delete Patient Functionality

Remove the functionality to remove a patient. This is currently possible by swiping right on a patient card on the main screen.

Removed swipe left to delete functionality on main screen (5988423 ff).


[Bug?] We fail generate 'PR review' command

Hi
These days we faced to fail PR-Agent every time when I command /review.
We tried to update latest master  branch but still we have this issue.
How do I fix this one?
The output is here (omit)
{"text": "Failed to review PR: 'str' object has no attribute 'get'\n", "record": {"elapsed": {"repr": "0:00:09.215349", "seconds": 9.215349}, "exception": null, "extra": {"command": "review"}, "file": {"name": "pr_reviewer.py", "path": "/app/pr_agent/tools/pr_reviewer.py"}, "function": "run", "level": {"icon": "❌", "name": "ERROR", "no": 40}, "line": 153, "message": "Failed to review PR: 'str' object has no attribute 'get'", "module": "pr_reviewer", "name": "pr_agent.tools.pr_reviewer", "process": {"id": 7, "name": "MainProcess"}, "thread": {"id":<PHONE_NUMBER>45504, "name": "MainThread"}, "time": {"repr": "2024-06-13 05:19:47.602679+00:00", "timestamp":<PHONE_NUMBER>.602679}}}

environment

platform: github actions
PR-Agent Pro?: No
version: aac7aeabd13a647c09b2df29c5d70388d72adbd6

actions workflow is here
name: pr-agent-commented

on:
  issue_comment:
    types: [created, edited]

permissions:
  pull-requests: write
  issues: write

jobs:
  pr_agent:
    name: PR Agent
    runs-on: ubuntu-latest
    if: github.event.sender.type != 'Bot' &&
        github.event.issue.state == 'open' &&
        github.event.issue.pull_request != null &&
        startsWith(github.event.comment.body, '/')
    env:
      COMMON_INSTRUCTIONS: >-
        - Please use Japanese in descriptions.
    steps:
      - name: PR Agent actions step
        id: pr-agent
        uses: Codium-ai/pr-agent@aac7aeabd13a647c09b2df29c5d70388d72adbd6
        env:
          OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CONFIG.MODEL: 'gpt-4o-2024-05-13'
          PR_REVIEWER.EXTRA_INSTRUCTIONS: ${{ env.COMMON_INSTRUCTIONS }}
          PR_REVIEWER.ENABLE_REVIEW_LABELS_SECURITY: false
          PR_REVIEWER.ENABLE_REVIEW_LABELS_EFFORT: false
          PR_REVIEWER.REQUIRE_CAN_BE_SPLIT_REVIEW: true

its not a "general" problem. Review works:
https://github.com/Codium-ai/pr-agent/pull/954#issuecomment-2164499647
Provide a reproducible example from a public repo. I cannot debug what went wrong with private self-deployed hosting.

(1)
I was able to reproduce.
It is related to your very specific setup: " use Japanese" + "REQUIRE_CAN_BE_SPLIT_REVIEW"
(2)
I think:
https://github.com/Codium-ai/pr-agent/pull/965
would help the issue.
(3)
But I don't recommend using " use Japanese" as a consistent instruction.
I know its nice to see an answer in your native language. but in practice, GPT-4 quality deteririotes dramatically when answering in Japanese, compared to english. and it can also lead to producing an invalid YAML, as happened in your case.

Thank you so much @mrT23
I will discuss with our team to use english 👍


Remove hover animation on main navigation links

Now, there is an annoying delay on the main menu links hover animation.
The delay increases from top to bottom items (try the hover on "cast" link).
I removed the delay completely, so the hover effect is immediate.

Wow, great


Normalize URI-Path components

Fix for #127 (more work might be required for others options).

@guimier do you want to help maintaining this module?


Failure install marion as app

Bug Report
Expected behavior/code
Try to install marion as app
Actual Behavior
Crash after app declaration in settings.py
Environment

Marion version: 0.1.0
Platform: Docker image Joanie

Steps to Reproduce

Install package into your env
Then declare marion app in INSTALLED_APPS in settings.py
And then the bug happens!

🐳(entrypoint) running your command: /bin/sh -c python manage.py runserver <IP_ADDRESS>:8000
django-configurations version , using configuration Development
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/marion/__init__.py", line 16, in _get_version
return importlib.metadata.version("marion")
File "/usr/local/lib/python3.8/importlib/metadata.py", line 530, in version
return distribution(distribution_name).version
File "/usr/local/lib/python3.8/importlib/metadata.py", line 503, in distribution
return Distribution.from_name(distribution_name)
File "/usr/local/lib/python3.8/importlib/metadata.py", line 177, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: marion
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 76, in raise_last_exception
raise _exception[1]
File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 357, in execute
autoreload.check_errors(django.setup)()
File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python3.8/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.8/site-packages/marion/__init__.py", line 23, in <module>
__version__ = _get_version()
File "/usr/local/lib/python3.8/site-packages/marion/__init__.py", line 18, in _get_version
return read_configuration(Path(__file__).parent / ".." / "setup.cfg")[
File "/usr/local/lib/python3.8/site-packages/setuptools/config.py", line 80, in read_configuration
raise DistutilsFileError(
distutils.errors.DistutilsFileError: Configuration file /usr/local/lib/python3.8/site-packages/setup.cfg does not exist.

Thanks for your feedback. We've renamed the package since and forgot to fix this. :sweat_smile:


[Unit Test] Session cannot be started after headers have already been sent

          > > Hey again Carlos,

I am currently testing the Container.php in domain layer and experiencing some difficulties with session_start(). I load the services from the /Config directory. I am providing you with some screenshots.
Do you have a clue where the problem is?

Usually the error "Session cannot be started after headers have already been sent" is due to some output being sent before the session started, some "echo" perhaps or some test output. Try just running the container test separately to rule out any previous output.

Yes, I tried to resolve it but seems like something in the autoload.php causes it.
If I add 'ob_start();' before the ComposerAutoloader it fixes the problem but not after.
I am not sure how to approach this problem.

Originally posted by @Qupiter in https://github.com/CubaDevOps/flexi/issues/2#issuecomment-2165030594

I can't reproduce this situation working under Docker container, i implement a little test and it run successfully:
@Qupiter do you can test this example isolated?
<?php

declare(strict_types=1);

namespace CubaDevOps\Flexi\Test\Domain\Classes;

use CubaDevOps\Flexi\Domain\Classes\Container;
use CubaDevOps\Flexi\Domain\Classes\NativeSessionStorage;
use CubaDevOps\Flexi\Infrastructure\Classes\Configuration;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class ContainerTest extends TestCase
{
    private Container $container;

    /**
     * @throws NotFoundExceptionInterface
     * @throws \ReflectionException
     * @throws ContainerExceptionInterface
     * @throws \JsonException
     */
    public function setUp(): void
    {
        $this->container = new Container();
        $this->container->loadServices('./src/Config/services.json');
    }

    /**
     * @throws \ReflectionException
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function testSessionInstantiation(): void
    {
        $this->assertInstanceOf(Configuration::class, $this->container->get(Configuration::class));
        $this->assertInstanceOf(NativeSessionStorage::class, $this->container->get(NativeSessionStorage::class));
    }
}

Anyway, I've improved the start of the session a bit.

I can't reproduce this situation working under Docker container, i implement a little test and it run successfully: @Qupiter do you can test this example isolated?
<?php

declare(strict_types=1);

namespace CubaDevOps\Flexi\Test\Domain\Classes;

use CubaDevOps\Flexi\Domain\Classes\Container;
use CubaDevOps\Flexi\Domain\Classes\NativeSessionStorage;
use CubaDevOps\Flexi\Infrastructure\Classes\Configuration;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class ContainerTest extends TestCase
{
    private Container $container;

    /**
     * @throws NotFoundExceptionInterface
     * @throws \ReflectionException
     * @throws ContainerExceptionInterface
     * @throws \JsonException
     */
    public function setUp(): void
    {
        $this->container = new Container();
        $this->container->loadServices('./src/Config/services.json');
    }

    /**
     * @throws \ReflectionException
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function testSessionInstantiation(): void
    {
        $this->assertInstanceOf(Configuration::class, $this->container->get(Configuration::class));
        $this->assertInstanceOf(NativeSessionStorage::class, $this->container->get(NativeSessionStorage::class));
    }
}

Hmm.. I tried to commit my changes into the new branch but it seems I don't have permissions. Maybe after I push my changes you can have a look at it if it persists.


how to merge my program and dlls with relative directory path

i have a winform project release like this:
a.exe  b.dll c.dll en-US/d.dll
i use ./ILMerge.exe /targetplatform:v4 /ndebug /target:winexe /out:sa.exe a.exe b.dll c.dll en-US/d.dll
but when i run sa.exe, it says d.dll cannot be loaded.
i am new to ILMerge, is there anyone who can help me?  thanks

https://stackoverflow.com/questions/1613407/ilmerge-and-localized-resource-assemblies
Hope you are not new to use search engine, as this Stack Overflow thread is well known.

@lextm thanks for your reply. i just read this thread, it write a class to override resource-finding fallback mechanisms...
i want to know if there is a better method, no coding, no changes after every update of XXX.Designer.cs
perhaps ILMerge.exe/ILRepack.exe can add path/directory support in the future?
i have an stupid method, compress my release directory to a .rar file, set self-extraction and auto execute my program after the extraction. it works, but not perfect too...
if there is any better method, or better plan, please tell me here, thanks all

There seems to be no "better method, no coding, no changes".
.NET Core 3.0 should finally eliminate the needs of ILMerge/IL Repack as well, if Microsoft can fulfill the promise to "bundle your app and .NET Core together as in a single executable",
https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/

@lextm ok, i accept, thanks


Tutorials package

A collection of interactive tutorials

Interactive hints
Tracks (collections of tutorials)

Exploratory data analysis
Machine learning
Cheminformatics

Badges

Tutorials:

[ ]  Scatter Plot
[ ] Viewers
[ ] Filters
[ ] Data Aggregation
[ ] Scripting
[ ] Predictive Modeling
[ ] Multivariate Analysis
[ ] Data Connectors


wiki: describe why no quic default port is needed

The default port used for inter-AS control plane traffic, which is the thing using QUIC these days, is documented:

Control Service

Purpose
Protocol
Control Plane

Control plane (inter-AS)
SCION/UDP
30252

Control plane (intra-AS)
TCP
30252

...
...
...


pip install taking long time for Sundial

From Sundial:

Closing this as per @jakeloo request, item was resolved by customer without any changes on our side


Daily run broken over the weekend for term-apply

Description
Upstream nixpkgs seemed to break our daily build of the container images: https://github.com/Nebulaworks/nix-garage/actions/runs/2529987212
Seems to be fixed via: https://github.com/NixOS/nixpkgs/pull/178313
AC:

Confirm that daily build is indeed fixed with upstream changes
Follow up accordingly on anything additional that needs addressing

Were back in business as of today: https://github.com/Nebulaworks/nix-garage/actions/runs/2536488370


Handle case where some values don't exist gracefully

Signed-off-by: Sai Sindhur Malleni<EMAIL_ADDRESS>

Can one of the admins verify this patch?

Only nit is the title, benchmark-wrapper doesn't deal in CRs... but I understand what you are saying ;)

/rerun all

Results for SNAFU CI Test

Test
Result
Runtime

snafu/uperf_wrapper
FAIL
00:07:37

Only nit is the title, benchmark-wrapper doesn't deal in CRs... but I understand what you are saying ;)

UGH :-)

/rerun all

The patch fixed the issue on my local test.

Results for SNAFU CI Test

Test
Result
Runtime

snafu/uperf_wrapper
PASS
00:28:04

Given the merget patch at https://github.com/cloud-bulldozer/benchmark-wrapper/pull/252 , I think we don't need this anymore

Given the merged patch at #252 , I think we don't need this anymore

Yep, I guess a new PR was opened without merging this ;) @rsevilla87 I do have some questions though, for fields where values do not exist why are we assuming it to be 0? I think that is misleading, can we just not send "" ?

/rerun all

Results for SNAFU CI Test

Test
Result
Runtime

snafu/uperf_wrapper
PASS
00:28:04

/rerun all

/rerun all

Results for SNAFU CI Test

Test
Result
Runtime

snafu/uperf_wrapper
PASS
00:27:42


Release 1.3.0-alpha.0 has invalid firmware blob

Describe the bug
The firmware file released in 1.3.0-alpha.0 has an invalid firmware file in it. The file fails the CRC checksum when attempting to update the firmware on the device.
To Reproduce

Use nuget to get the latest firmware image
nuget install Microsoft.Azure.Kinect.Sensor -version 1.3.0-alpha.0

Use AzureKinectFirmwareTool to attempt to update the firmware
AzureKinectFirmwareTool -Update <path to firmware in extracted nuget package>

See the following error

== Azure Kinect DK Firmware Tool ==
[2019-09-23 09:48:50.971] [critical] [t=1720] ..\src\usbcommand\usbcommand.c (360): find_libusb_device(). libusb device(s) are all unavalable. Is the device being used by another application?
[2019-09-23 09:48:50.978] [error] [t=1720] ..\src\depth_mcu\depth_mcu.c (68): usb_cmd_create(USB_DEVICE_DEPTH_PROCESSOR, device_index, NULL, &depthmcu->usb_cmd) returned failure in depthmcu_create()
Loading firmware package .\Microsoft.Azure.Kinect.Sensor.1.3.0-alpha.0\firmware\AzureKinectDK_Fw_1.6.102075014.bin.
File size: 132 bytes
[2019-09-23 09:48:51.059] [error] [t=1720] ..\src\firmware\firmware.c (393): parse_firmware_package(). Firmware Package CRC error. original crc: 0x0A343832 calculated crc: 0xA863DFC6
[2019-09-23 09:48:51.059] [error] [t=1720] ..\src\firmware\firmware.c (416): parse_firmware_package(). Firmware Package too many Depth Configurations. 28426
[2019-09-23 09:48:51.060] [error] [t=1720] ..\src\firmware\firmware.c (435): parse_firmware_package(). Firmware Package Authentication block not found.
ERROR: CRC check failed

Expected behavior
The firmware updates correctly.
Additional context
It looks like this is a git lfs issue. If you cat the contents of the firmware file you see the following

version https://git-lfs.github.com/spec/v1
oid sha256:5d4fc072102d0a0940d6713f83844b8131beea78ba7755c95bf84aee8148cda5
size 1290284

During the packaging the lfs files must not be pulled in.

This will be fixed in 1.3.0-alpha.1

1.3.0-alpha.1 has been published. We have unlisted 1.3.0-alpha.0.


Support for any website

Hey man, I was wondering if you could adapt this script to be used with any website that has an html5 player in it, instead of being tied to a specific platform. Cheers

I don't think it could be easily done super generally very easily, the way elements like the settings tray are styled if a website had a different structure to their video player there'd probably be overlapping.
I think the bigger issue would be privacy concerns though. The script currently only runs on two very specific page URLs, in order to make it run on any html5 video player it'd need to have access to run on every site you go to. I know I'm not going to do anything malicious with that, but that's a lot of trust that people would be giving to some random guy on the internet!
I appreciate the ideas though!


error at start Cannot find module 'svelte/internal'

pnpm create astro@latest -- --template ntsd/astro-svelte-tailwind
pnpm i
pnpm dev

{
  "name": "webapp",
  "description": "Astro Starter Template with Svelte, Tailwind, DaisyUI, and Service Worker",
  "type": "module",
  "version": "0.0.1",
  "author": "Jirawat Boonkumnerd<EMAIL_ADDRESS>(https://ntsd.dev)",
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
  "devDependencies": {
    "@astrojs/svelte": "^4.0.0",
    "@astrojs/tailwind": "^5.0.0",
    "@tailwindcss/typography": "^0.5.9",
    "astro": "^3.0.3",
    "astrojs-service-worker": "^1.1.0",
    "autoprefixer": "^10.4.14",
    "daisyui": "^3.5.1",
    "nanostores": "^0.9.3",
    "postcss": "^8.4.24",
    "tailwindcss": "^3.3.2"
  }
}

fix by
pnpm astro add svelte

cannot run it will fails to find astro binary
must follow by
pnpm i

 WARN  Issues with peer dependencies found
.
└─┬ @astrojs/svelte 4.0.1
  └── ✕ unmet peer<EMAIL_ADDRESS>found 3.0.3

pnpm upgrade

The problem is because of pnpm is not installed the peerDependencies
you can check here that @astrojs/svelte include svelte
https://github.com/withastro/astro/blob/0a2567c288bc2a3ccc92afd643944c9a4e6d604b/packages/integrations/svelte/package.json#L52

Fixed by this https://github.com/ntsd/astro-svelte-tailwind/commit/3614338081810cdd673054ee18cf0a341c9b391f


replace win10 file exlporer

Describe the bug
I replaced win explorer with UWP as described in Wiki, but when I open a desktop folder shortcut, UWP crashes
To Reproduce
replaced win explorer with UWP as described in Wiki, but when I open a desktop folder shortcut, UWP crashes
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS Version: Windows 10 19041.508
App version: 0.16

Additional context
Add any other context about the problem here. Does this problem occur again after restarting the app?
Log file
2020-10-12 11:08:16.4006|INFO|Files.App|App activated|
2020-10-12 11:08:17.1348|ERROR|Files.App|The system cannot find the file specified. (Exception from HRESULT: 0x80070002)|System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
at Files.Filesystem.StorageFileExtensions.d__4.MoveNext() + 0x629
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
at Files.Filesystem.ItemViewModel.d__27.MoveNext() + 0x584
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
at Files.BaseLayout.d__54.MoveNext() + 0x278
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__7_0(Object) + 0x1e
at System.Action1.Invoke(T) + 0x28    at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33    at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21    at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8    at __Interop.ForwardComStubs.Stub_11[TThis](__ComObject, Int32) + 0x24    at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x3d --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21    at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x75    at System.EventHandler1.Invoke(Object, TEventArgs) + 0x2e
at __Interop.Intrinsics.HasThisCall__23[TArg0](Object, IntPtr, Object, TArg0) + 0x36
at Files!+0x1369df0.

The method in the wiki is not supported and is only there for debug purposes.

The method in the wiki is not supported and is only there for debug purposes.

This is strange. You should put this information inside the wiki if this is the case. We are testing UWP and reporting bugs in order to help everyone, I think we deserve a different treatment. Sorry.

@whdmike You are absolutely correct, it was a mistake on our part that we thought the wiki made it clear that it was unsupported. Upon checking the page, I was able to confirm that the warning was not clear enough and the page has since been updated. I am sorry about the confusion. Once we feel that the app is in a more stable position, we will explore replacing the File Explorer UI with Files.


Flaky-test: org.apache.pulsar.tests.integration.presto.TestBasicPresto.testForSchema

org.apache.pulsar.tests.integration.presto.TestBasicPresto.testForSchema is flaky. It fails sporadically.
example failure
  2022-08-07T15:28:25,634 - ERROR - [docker-java-stream--278407304:DockerUtils$2@279] - DOCKER.exec(pulsar-sql-test-presto-worker:/bin/bash -c /pulsar/bin/pulsar sql --execute 'select * from pulsar."public/default"."schema_key_value_separated_test_ghyiy" order by entryid;'): completed with non zero return code: 1
  stdout:
  stderr: Query 20220807_152823_00003_wcx2v failed: Decoding avro record failed.

I find this issue  https://github.com/apache/pulsar/issues/9704  has related on the test failure.  And I can reproduce it on my Mac  if I follow the steps,  even build from master branch.
What confused me is that  this test can pass on other PR, e.g,: success test,  but always fail on example failure, and always fail on Mac  when I try to  reproduce it.
I'll appreciate it very much if anyone can explain it.
error stack here.

query sql is :
select * from pulsar."public/default"."kv-schema-test2";

@gaoran10 Do you have some ideas about this issue?


httpbackend header example in doc

for methods like "when(method, url, [data], [headers]);"
please add an example for the [headers] possible content in the doc
For instance I try to mock a 400 ish error and I have no idea how to.
Responses in google use an old version of angular mock where the parameters are not identical.

There are several examples that pass headers and at least one that uses the function version of the headers argument of when/expect. Hopefully they are sufficient.
If anyone feels like adding more, go ahead :smile:


[memutils] Add support for > 32b memories

Pack > 32bit memory loads into wider RAM instances. Fixes #790
Signed-off-by: Tom Roberts<EMAIL_ADDRESS>

@imphil - I didn't end up making any changes on the C++ side, but might have misunderstood what was required, let me know if so!

Looks like the prim_generic_ram_1p.sv in Ibex already diverged from the one in OT, the 32 bit generate block isn't in OT. But we'll get that sorted next.
Your approach should do the trick for now. However, it changes the original meaning of the simutil_verilator_set_mem() function from "load the mem block in whatever width (but we haven't implemented anything other than 32 bit width yet)" to "this is a special case function to always load 32 bit words into the memory and pack them neatly next to each other".
Can you:

Either retain the original meaning by widening the argument of simutil_verilator_set_mem() to whatever Width the memory has, and doing the packing on the C++ side, or
Rename this function (or add another one) along the lines of simutil_verilator_set_mem_32b().

The first approach gives us more flexibility in the future if we want to add other parity or checksum data in a pre-computed form into memories with "odd" width. The second approach is easier and sufficient for now.

I had a go at fixing it on the C++ side, allowing an extra parameter to be registered for each memory type.
I'm assuming we can pass arbitrary data widths for packed arrays through the DPI interface, but I haven't tested it - @imphil any experience with that? I moved from svLogicVecVal to svBitVecVal since that's just a uin32_t pointer rather than a struct, and I don't think we need the 4-state stuff here.

All comments addressed - thanks for the review!


Code Helper (Renderer) Constantly at above 100% CPU usage and causing machine to overheat

Issue Type: Performance Issue
Within the last 2 weeks, a runaway process has appeared in which during even a few minute of having VS Code open, my fans start spooling up to a ridiculous RPM and at least one Code Helper (Renderer) process is using more than 100% of CPU. It's forcing me to have to use a different IDE.
Reproduce:

open vscode
open any file, but specifically json and html files for some reason
look at task manager/activity monitor and observe runaway process that only stops once the app has been ended.

VS Code version: Code 1.46.0 (a5d1cc28bb5da32ec67e86cc50f84c67cc690321, 2020-06-10T08:59:06.977Z)
OS version: Darwin x64 19.5.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
2, 3, 2

Memory (System)
16.00GB (1.59GB free)

Process Argv

Screen Reader
no

VM
0%

Process Info
CPU %	Mem MB	   PID	Process
   16	    98	  1641	code main
    0	    49	  1642	   gpu-process
    0	    16	  1644	   utility
    0	    82	  1653	   shared-process
    0	     0	  1775	     /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0	   590	  1687	   window (index.html — data_dashboard)
    0	   262	  1688	     extensionHost
    0	   115	  1692	       /private/var/folders/wg/rt2wy89x7cg8004dgmbxl5yr0000gn/T/AppTranslocation/595A30C6-7797-4C99-8FBC-DC8B506E1369/d/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /private/var/folders/wg/rt2wy89x7cg8004dgmbxl5yr0000gn/T/AppTranslocation/595A30C6-7797-4C99-8FBC-DC8B506E1369/d/Visual Studio Code.app/Contents/Resources/app/extensions/html-language-features/server/dist/htmlServerMain --node-ipc --clientProcessId=1688
    0	    82	  1697	       /private/var/folders/wg/rt2wy89x7cg8004dgmbxl5yr0000gn/T/AppTranslocation/595A30C6-7797-4C99-8FBC-DC8B506E1369/d/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /private/var/folders/wg/rt2wy89x7cg8004dgmbxl5yr0000gn/T/AppTranslocation/595A30C6-7797-4C99-8FBC-DC8B506E1369/d/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/jsonServerMain --node-ipc --clientProcessId=1688
    0	    33	  1690	     watcherService
    0	    82	  1772	   window (Issue Reporter)

Workspace Info
|  Window (index.html — data_dashboard)
|    Folder (data_dashboard): 399 files
|      File types: js(179) css(135) json(10) png(10) html(4) DS_Store(3)
|                  map(3) csv(2) scss(2) swf(1)
|      Conf files: package.json(3);

Extensions: none

My Code Helper has been crashing a lot lately as well, on Mac. Windows appears to be unaffected, but I'm not 100% sure. I have to force quit it (or reopen VSCode) for the auto-completion to work again.

/needsMoreInfo
Please use this guide to provide more information: https://github.com/Microsoft/vscode/wiki/Performance-Issues. Thanks.


redo faster sparse_categorical_crossentropy

update LR and DECAY in resnet default that help convergence too

looks good on both red (tiny20) and green (tiny14)


Plugin crashes on import

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots or Screencasts
If applicable, add screenshots to help explain your problem.
https://tokens-studio.slack.com/archives/C02DLQXNY6Q/p1685017494665869

Closing due to lack of information


TypeScript: EventEmitter methods not inherited by UdpSocket

Description
The produced TypeScript is not working as it should, i.e. EventEmitter methods (e.g. .on()) are not properly inherited.
Current behavior
import dgram from 'react-native-udp'

const socket = dgram.createSocket({ type: 'udp4', debug: __DEV__, reusePort: true })
// …
socket.on('message', () => { … })
// Property 'on' does not exist on type 'UdpSocket'.ts(2339)

checking https://github.com/tradle/react-native-udp/blob/master/lib/types/UdpSocket.d.ts#L262 locally I get:
import { EventEmitter } from "node/events"
// File<EMAIL_ADDRESS>is not a module.ts(2306)

That error persists after npm install --save-dev @types/node and the mentioned file being readable on disk.
Expected behavior
UdpSocket properly exposes methods inherited from EventEmitter.
I patched that locally by patching EventEmitter methods onto UdpSocket:
import type { EventEmitter } from 'events'
import type _UdpSocket from 'react-native-udp/lib/types/UdpSocket'

import dgram from 'react-native-udp'

type UdpSocket = EventEmitter & _UdpSocket

const socket: UdpSocket = dgram.createSocket({ type: 'udp4', debug: __DEV__, reusePort: true }) as UdpSocket
// …
socket.on('message', () => { … })
// works fine

Relevant information

typescript
4.1.3

react-native-udp
4.1.0

@rodneyrehm, thanks for the feedback! What TS version are you using?

Hey @Rapsssito :)

Relevant information

typescript
4.1.3

react-native-udp
4.1.0

I can also share my tsconfig (stripped of obviously irrelevant parts):
{
  "compilerOptions": {
    "outDir": "./dist",
    "rootDir": "./",
    "baseUrl": "./",
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "forceConsistentCasingInFileNames": true,
    "importHelpers": true,
    "jsx": "react-native",
    "typeRoots": ["./src/@types", "./node_modules/@types"],
    "lib": [
      "es2017"
    ],
    "module": "es2015",
    "moduleResolution": "node",
    "noEmitHelpers": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "paths": {
      "*": ["types/*"],
      "expo": [
        "../node_modules/@types/expo",
        "../node_modules/expo"
      ],
      "$src/*": ["src/*"],
      "$assets/*": ["assets/*"],
    },
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "sourceMap": false,
    "strict": true,
    "target": "es2017",
    "allowJs": true
  }
}

@rodneyrehm, thanks for the info! This is certainly a bug. I am working on it.

@rodneyrehm, could you test this declaration file?

UdpSocket.d.ts
/**
 * @typedef {"ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"} BufferEncoding
 */
export default class UdpSocket extends EventEmitter {
    /**
     * @param {{ type: string; reusePort?: boolean; debug?: boolean; }} options
     * @param {((...args: any[]) => void) | undefined} [onmessage]
     */
    constructor(options: {
        type: string;
        reusePort?: boolean;
        debug?: boolean;
    }, onmessage?: ((...args: any[]) => void) | undefined);
    type: string;
    reusePort: boolean | undefined;
    debugEnabled: boolean | undefined;
    /** @private */
    private _destroyed;
    /** @private */
    private _id;
    /** @private */
    private _state;
    /** @private */
    private _address;
    /** @private */
    private _port;
    /** @private */
    private _subscription;
    /**
     * @private
     */
    private _debug;
    /**
     * For UDP sockets, causes the `UdpSocket` to listen for datagram messages on a named `port`
     * and optional `address`. If `port` is not specified or is `0`, the operating system will
     * attempt to bind to a random port. If `address` is not specified, the operating system
     * will attempt to listen on all addresses. Once binding is complete, a `'listening'` event
     * is emitted and the optional `callback` function is called.
     *
     * Specifying both a `'listening'` event listener and passing a callback to the `socket.bind()`
     * method is not harmful but not very useful.
     *
     * If binding fails, an `'error'` event is generated. In rare case (e.g. attempting to bind
     * with a closed socket), an `Error` may be thrown.
     *
     * @param {any[]} args
     */
    bind(...args: any[]): void;
    /**
     * Close the underlying socket and stop listening for data on it. If a callback is provided,
     * it is added as a listener for the `'close'` event.
     *
     * @param {(...args: any[]) => void} callback
     */
    close(callback?: (...args: any[]) => void): number | undefined;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {number} port
     * @param {string} address
     * @param {(...args: any[]) => void} callback
     */
    connect(port: number, address: string, callback: (...args: any[]) => void): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     */
    disconnect(): void;
    /**
     * @private
     * @param {{ data: string; address: string; port: number; ts: number; }} info
     */
    private _onReceive;
    /**
     * Broadcasts a datagram on the socket. For connectionless sockets, the
     * destination `port` and `address` must be specified. Connected sockets,
     * on the other hand, will use their associated remote endpoint,
     * so the `port` and `address` arguments must not be set.
     *
     * The `msg` argument contains the message to be sent. Depending on its type,
     * different behavior can apply. If `msg` is a Buffer, any `TypedArray` or a `DataView`,
     * the `offset` and `length` specify the offset within the `Buffer` where the message
     * begins and the number of bytes in the message, respectively. If `msg` is a
     * `string`, then it is automatically converted to a `Buffer` with `'utf8'` encoding.
     * With messages that contain multi-byte characters, `offset` and `length` will be
     * calculated with respect to byte length and not the character position.
     * If `msg` is an array, `offset` and `length` must not be specified.
     *
     * The `address` argument is a string. If the value of `address` is a host name,
     * DNS will be used to resolve the address of the host. If `address` is not provided
     * or otherwise falsy, `'<IP_ADDRESS>'` (for `udp4` sockets) or `'::1'`
     * (for `udp6` sockets) will be used by default.
     *
     * If the socket has not been previously bound with a call to `bind`, it's
     * assigned a random port number and bound to the "all interfaces" address
     * (`'<IP_ADDRESS>'` for `udp4` sockets, `'::0'` for `udp6` sockets).
     *
     * An optional `callback` function may be specified to as a way of
     * reporting DNS errors or for determining when it is safe to reuse the
     * `buf` object.
     *
     * The only way to know for sure that the datagram has been sent is by
     * using a `callback`. If an error occurs and a `callback` is given,
     * the `error` will be passed as the first argument to the `callback`.
     * If a `callback` is not given, the error is emitted as an `'error'`
     * event on the `socket` object.
     *
     * Offset and length are optional but both _must_ be set if either are used.
     * They are supported only when the first argument is a `Buffer`,
     * a `TypedArray`, or a `DataView`.
     *
     * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
     *
     * @param {string | Buffer | Uint8Array | Array<any>} msg Message to be sent.
     * @param {number} [offset] Offset in the buffer where the message starts.
     * @param {number} [length] Number of bytes in the message.
     * @param {number} [port] Destination port.
     * @param {string} [address] Destination host name or IP address.
     * @param {(error?: Error) => void} [callback] Called when the message has been sent.
     */
    send(msg: string | Buffer | Uint8Array | Array<any>, offset?: number | undefined, length?: number | undefined, port?: number | undefined, address?: string | undefined, callback?: ((error?: Error | undefined) => void) | undefined): void;
    /**
     * @private
     * @param {string | Buffer | Uint8Array | Array<any>} msg
     * @param {BufferEncoding} [encoding]
     */
    private _generateSendBuffer;
    /**
     * Returns an object containing the address information for a socket.
     * For UDP sockets, this object will contain `address`, `family` and `port` properties.
     */
    address(): {
        address: string;
        port: number;
        family: string;
    };
    /**
     * Sets or clears the `SO_BROADCAST` socket option. When set to `true`,
     * UDP packets may be sent to a local interface's broadcast address.
     *
     * This method throws `EBADF` if called on an unbound socket.
     *
     * @param {boolean} flag
     */
    setBroadcast(flag: boolean): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {string} multicastInterface
     */
    setMulticastInterface(multicastInterface: string): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {boolean} flag
     */
    setMulticastLoopback(flag: boolean): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {number} ttl
     */
    setMulticastTTL(ttl: number): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {number} size
     */
    setRecvBufferSize(size: number): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {number} size
     */
    setSendBufferSize(size: number): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {number} ttl
     */
    setTTL(ttl: number): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     */
    unref(): void;
    /**
     * Tells the kernel to join a multicast group at the given `multicastAddress` and
     * `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option.
     *
     * If the `multicastInterface` argument is not specified, the operating system will
     * choose one interface and will add membership to it. To add membership to every
     * available interface, call `addMembership` multiple times, once per interface.
     *
     * @param {string} multicastAddress
     * @param {string} [multicastInterface]
     */
    addMembership(multicastAddress: string, multicastInterface?: string | undefined): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {string} sourceAddress
     * @param {string} groupAddress
     * @param {string} [multicastInterface]
     */
    addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string | undefined): void;
    /**
     * Instructs the kernel to leave a multicast group at `multicastAddress` using the
     * `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
     * kernel when the socket is closed or the process terminates, so most apps will
     * never have reason to call this.
     *
     * If `multicastInterface` is not specified, the operating system will attempt to
     * drop membership on all valid interfaces.
     *
     * @param {string} multicastAddress
     * @param {string} [multicastInterface]
     */
    dropMembership(multicastAddress: string, multicastInterface?: string | undefined): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     * @param {string} sourceAddress
     * @param {string} groupAddress
     * @param {string} [multicastInterface]
     */
    dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string | undefined): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     */
    getRecvBufferSize(): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     */
    getSendBufferSize(): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     */
    ref(): void;
    /**
     * NOT IMPLEMENTED
     *
     * @deprecated
     */
    remoteAddress(): void;
}
export type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
import { EventEmitter } from "events";
import { Buffer } from "buffer";

@Rapsssito I can confirm that works 🎉
while we're on the topic, have you thought about converting the src/*.js files to *.ts, to not have to maintain types separately?
You might also want to look at Function Overloads to convert
bind(...args: any[]): void;

to something along the lines of
bind(port: number, address: string, callback?: Function): void;
bind(address: string, callback?: Function): void;
bind({ port: number, address: string, callback?: Function }, callback?: Function): void;

@rodneyrehm, glad it works! I will release a new version ASAP with a fix.
The thing about the .js files is that I use the JSDoc to generate the declaration files dynamically on release. This way I just have to maintain the JavaScript code while the TypeScript is generated automatically (and also enjoy static type checking). This has benefits such as the larger developer base for JS and also being able to do // @ts-ignore to maintain backwards compatibility (like CommonJS requires, see #136).
However, you are right. JSDoc is limited and does not allow function overloads. I am still waiting for https://github.com/microsoft/TypeScript/issues/25590 to be resolved...


Tweaks, cherry-pick and tests

Fixing a few things:

Add more pre-commit (requires splitting pylint target)
Clean dependencies in setup.py
added some extra Makefile targets
change make generate so it uses pipenv
fix --user inside container
bump to python version 3.9

Also cherry-picked few extra tests.
Do we want to keep Pipfile.lock in git? I added it to .gitignore for now as it was causing some issues for me.
@mayankshah1607

@sugarraysam Looks like the README has a conflict. Could you rebase against main please? :)


od/2.0/hi/index.markdown

Open Definition in Hindi by K. Srivally, Hindi Translator, National Institute of Agricultural Extension Management (MANAGE) Rajendranagar, Hyderabad 500030, Telangana, India. E-mail<EMAIL_ADDRESS>

Hi, thanks for this translation!
I added 'front matter' needed for the file to display at http://opendefinition.org/od/2.0/hi/ -- see the very top of the file. Not sure I got the title right. I suspect some additional formatting would be useful, possibly just more newlines.

@gutam2000 could you make another pull request with these changes? Thanks!


Domain switching

This PR basically eliminates the need for hard-coded domains.
Would be handy in the event the domain needed to be changed - it's even configurable.

Can this support multiple domains? IE the default, but also an additional one?

Well, it would be possible to add a second resolver based upon input domains.
Would the idea be that you have an entire stack of pygmy containers for each container?
Not entirely sure what that would look like, but the idea is that this makes that goal a little easier. It'll remove a blocker for that later down the line, if that is intended.

@tobybellwood see here for example:
https://github.com/amazeeio/docker-haproxy/pull/3
That would be freaking sweet actually and pygmy would do it, but it's not something I have influence over.


Handle github exceptions with no messages

Sometimes the error returned doesn't have a message field, and the
exception formatter doesn't handle the case. This fixes the behavior.

@therve pep8 failure :)

Pull-request updated, HEAD is now f95d3832ad5ddd4472687c8a92002a3bdce04c4e


Find boundary

Major feature: create function to search the task space and get the costs
This is just a early version.
Urgent thing here is how to combine the intersected codes (trajectory optimization) between find_goldilocks_model and find_boundary.

Finished changing the code as requested. I also add the python files used for plotting. It is the original version without applying the feature we talked on Tuesday. I will add the method of plotting triangular region later.

Generalize the search function by using a recursion.
Make changes to codes following the comments


Largest Element in Array

🚀 Feature
Given an array . The task is to find the largest element in it.
Have you read the Contributing Guidelines on Pull Requests?
yes
Motivation
I want to add code in cp in c++
Pitch
Want to add as GSSoC'21 participant

/assign


Where can I download Vegas?

Add the following jar as an SBT dependency

Which jar?

libraryDependencies += "org.vegas-viz" % "vegas_2.11" % "0.3.11"

http://search.maven.org/#artifactdetails|org.vegas-viz|vegas_2.11|0.3.11|jar


Project 7 - UUID id property

Hi,
you might want to change your chosen fix for the "Immutable property will not be decoded because it is declared with an initial value which cannot be overwritten" problem with the UUID id property and the Codable conformance.
struct ExpenseItem: Identifiable, Codable {
  let id = UUID()
  let name: String
  let type: String
  let amount: Double
}

⇓
struct ExpenseItem: Identifiable, Codable {
  private(set) var id = UUID()
  let name: String
  let type: String
  let amount: Double
}

instead of
struct ExpenseItem: Identifiable, Codable {
  var id = UUID()
  let name: String
  let type: String
  let amount: Double
}

The current fix allows item.id = UUID()—breaking the concept of having a stable unique ID:
Button("💣") {
  let same = UUID()
  for i in expenses.items.indices {
    expenses.items[i].id = same
  }
}

List {
  ForEach(expenses.items) { item in
    // ... depends on Identifiable and stable unique IDs
  }
}

Whereas the proposal would prohibit it but still allow struct initialization and decoding.

Excellent 🫡


how to make three slides

but to the extreme slides were narrow?

centerPadding with centerMode

four slides shows

$( '.gallery' ).slick( {
'centerMode': true,
'centerPadding': '0px',
'slidesToShow': 3,
} );

add variableWidth: true -> ok

Variable width can get tricky.
Please read this


Support __dirname __filename properly for NodeJS

index.ts or index.js
The __dirname __filename should be as is.
The imported moduble by index.ts should dynamically
create the new index.ts & index.js properly.

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.


Update tapir-akka-http-server, ... to 1.2.1

Updates

com.softwaremill.sttp.tapir:tapir-akka-http-server
com.softwaremill.sttp.tapir:tapir-enumeratum
com.softwaremill.sttp.tapir:tapir-json-circe
com.softwaremill.sttp.tapir:tapir-swagger-ui-bundle

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

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.softwaremill.sttp.tapir" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "com.softwaremill.sttp.tapir" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, commit-count:1

Superseded by #400.


Who is using Docusaurus v1

We are trying to automate the v1 to v2 migration with a CLI.
If you own a Docusaurus v1 open-source website, please report it here.
We want to see if the migration cli works on your site.
We already know some of those sites, from the spreadsheet of #1834, so it's not necessary to report if you are already in that list:
https://docs.google.com/spreadsheets/d/18SWTklRJVvOTOQEStTo8LXBc78ZMFdbdwp2EEJK5q8g/edit?usp=sharing
Thanks

React NativeScript’s docs are on v1: https://github.com/shirakaba/react-nativescript-site

https://webdriver.io/ is on v1

EthVigil is on v1.
Repo: https://github.com/blockvigil/ethvigil-docs
PR tracking v2 migration: https://github.com/blockvigil/ethvigil-docs/pull/22

Hey guys.
We still run docusaurus v1 at https://pype.club
I've played a bit with a migration to v2 a few months back, but had to drop it for other things. Would love to migrate in near future.

Hey,
The migration cli has been released, if you want, try it, and we can help in Discord

Many projects of the scala ecosystem are on v1 and use a solution called mdoc: https://scalameta.org/mdoc/docs/docusaurus.html#installation


Decide on a Unit Testing Framework

Unit testing is a vital part of ensuring the quality of our application by catching issues early in the development process. In this task, we need to decide on a unit testing framework suitable for our Java application.
Tasks include:

Research: Investigate available unit testing frameworks for Java. This may include, but is not limited to, JUnit, TestNG, and Spock. Understand the pros and cons of each framework, their community support, and their compatibility with our current project.
Ease of Use: Consider how easy it is to write and run tests using each framework. Some frameworks may have features like parameterized tests, advanced assertions, or setup/teardown facilities that can make writing tests easier.
Integration: Look into how well each framework integrates with our chosen development environment, build tool, and continuous integration system.
Decision: Based on the above factors, decide on a framework to use for our project.

Acceptance Criteria:

A thorough comparison of different unit testing frameworks has been conducted.
A unit testing framework has been chosen for our project.

Feature comparison

Feature
JUnit
TestNG
Mockito

Test Annotations
JUnit uses annotations like @Test, @Before, @After to define test methods and setup/teardown methods.
TestNG also provides annotations like @Test, @BeforeMethod, @AfterMethod for defining test methods and setup/teardown methods.
Mockito does not have specific annotations but uses a fluent API to define and configure mock objects.

Assert Framework
JUnit provides a built-in assert framework for making assertions about expected outcomes in tests.
TestNG also includes an assert framework similar to JUnit for making assertions in tests.
Mockito focuses on mocking dependencies rather than making assertions, so it doesn't have an assert framework.

Data-Driven Testing
JUnit supports data-driven testing using parameterized tests with the @ParameterizedTest annotation.
TestNG has built-in support for data-driven testing through various features like @DataProvider and test parameters.
Mockito is not specifically designed for data-driven testing, but it can be used in combination with JUnit or TestNG for such scenarios.

Parallel Test Execution
JUnit 5 introduced parallel test execution support with the @Execution annotation, allowing tests to run in parallel.
TestNG has robust support for parallel test execution out of the box, enabling tests to run concurrently across multiple threads or even on distributed environments.
Mockito does not have built-in support for parallel test execution.

Mocking Capabilities
JUnit does not have native mocking capabilities. However, it can be used in conjunction with Mockito or other mocking frameworks to mock dependencies.
TestNG does not have native mocking capabilities either but can be combined with Mockito or other mocking frameworks for mocking dependencies.
Mockito is primarily focused on mocking and stubbing dependencies, providing a rich set of APIs for creating and configuring mock objects.

Test Execution Order
JUnit 4 executes test methods in a deterministic but unspecified order. JUnit 5 introduced a new execution order feature with @TestMethodOrder annotation to specify order constraints.
TestNG allows explicit ordering of test methods using the @Test annotation's dependsOnMethods parameter or through the use of @Test(priority = x) to assign priorities to tests.
Mockito does not define a specific test execution order as it primarily focuses on mocking behavior rather than test order.

IDE and Tool Support
JUnit has excellent support in popular Java IDEs like Eclipse and IntelliJ IDEA. It integrates with build tools like Maven and Gradle.
TestNG is also well-supported in Java IDEs and integrates with popular build tools. It provides additional features like test configurations and advanced reporting.
Mockito integrates seamlessly with JUnit and TestNG and works well with Java IDEs and build tools.

Summary
The unit testing framework for this project will be Junit because of its features, and also because it's the most popular one.


Improved handling for streaming content and tool calls at the same time

Description
Currently, we would do something like this:
from typing import Generator

from mirascope.openai import (
    OpenAICall,
    OpenAICallParams,
    OpenAICallResponseChunk,
    OpenAIToolStream,
)

def print_book(title: str, author: str, description: str):
    """Prints the title and author of a book."""
    return f"Title: {title}\nAuthor: {author}\nDescription: {description}"

class BookRecommender(OpenAICall):
    prompt_template = "Please recommend some books to read."

    call_params = OpenAICallParams(tools=[print_book])

def regenerate(
    chunk: OpenAICallResponseChunk,
    stream: Generator[OpenAICallResponseChunk, None, None],
) -> Generator[OpenAICallResponseChunk, None, None]:
    yield chunk
    for chunk in stream:
        yield chunk

stream = BookRecommender().stream()
first_chunk = next(stream)
generator = regenerate(first_chunk, stream)
if (
    first_chunk.delta.content is None
):  # note content property is always string, but delta.content can be None
    tool_stream = OpenAIToolStream.from_stream(generator)
    for tool in tool_stream:
        if tool:
            output = tool.fn(**tool.args)
            print(output)
    # > Title: The Name of the Wind\nAuthor: Patrick Rothfuss\nDescription: ...
    # > Title: Dune\nAuthor: Frank Herbert\nDescription: ...
else:
    for chunk in generator:
        print(chunk.content, end="", flush=True)
    # > I'd be happy to recommend some books! Here are a few options: ...

Instead, we should look into moving the regenerator into a more convenient single line function imported from mirascope.

This spawned originally from #254

@off6atomic I'm laughing because I just ran into this myself in a separate side project. The above solution isn't terrible, but we can definitely clean this up.

I just created a more complex example that involves streaming, chat history, and agent behavior (repeat using tools until done). Might be useful for making it into a document.
This code creates an agent that has access to multiply and sqrt functions. It uses these tools, append response (either text or tool type) to the chat history, and repeat generation until it finds the answer.
I also created a slight abstraction around your regenerate function by creating a function called stream_with_chunk_type. I'm not sure if this is the right abstraction though. But if we haven't yet found the right abstraction, I think we can ship the function to the user for them to inspect and modify. The idea is similar to shadcn.
import pprint
from typing import Generator

from mirascope.openai import (
    OpenAICall,
    OpenAICallParams,
    OpenAICallResponseChunk,
    OpenAIToolStream,
)
from openai.types.chat import ChatCompletionMessageParam

def regenerate(
    chunk: OpenAICallResponseChunk,
    stream: Generator[OpenAICallResponseChunk, None, None],
) -> Generator[OpenAICallResponseChunk, None, None]:
    yield chunk
    for chunk in stream:
        yield chunk

def stream_with_chunk_type(call: OpenAICall):
    """Call OpenAI and return the generator and the type of each chunk from the generator."""
    stream = call.stream()
    first_chunk = next(stream)
    generator = regenerate(first_chunk, stream)
    is_text = first_chunk.delta.content is not None
    chunk_type = "text" if is_text else "tool"
    return generator, chunk_type

def multiply(a: float, b: float) -> float:
    """Multiplies two numbers."""
    return a * b

def sqrt(a: float) -> float:
    """Square root of a number."""
    return a**0.5

class Mathematician(OpenAICall):
    prompt_template = """
    SYSTEM: You are a mathematician. Help the user with their math problem.
    MESSAGES: {history}
    USER: {question}
    """

    history: list[ChatCompletionMessageParam] = []
    question: str = ""
    call_params = OpenAICallParams(model="gpt-3.5-turbo", tools=[multiply, sqrt])

def call_mathematician(mathematician: Mathematician):
    """Streams the Mathematician's response to stdout. The response can be tool
    calls or text tokens.
    This function doesn't mutate the Mathematician object's state, but it returns
    a list of messages that can be used to update the object's chat history.

    The only side effects of this function is calling OpenAI API, calling tools,
    and printing the response to stdout.
    """
    print("Executing question:", repr(mathematician.question))
    generator, chunk_type = stream_with_chunk_type(mathematician)
    print("Streaming response with type:", chunk_type)

    messages = []  # prepare messages to be appended to the chat history
    if mathematician.question:
        messages.append({"role": "user", "content": mathematician.question})

    if chunk_type == "tool":
        tool_calls = []
        tool_output_messages = []
        tool_stream = OpenAIToolStream.from_stream(generator)
        for tool in tool_stream:
            if tool:
                print("Calling tool:", tool.tool_call.function)
                output = tool.fn(**tool.args)
                print("Tool output:", output)
                tool_calls.append(tool.tool_call.model_dump())
                tool_output_messages.append(
                    {
                        "role": "tool",
                        "content": str(output),
                        "tool_call_id": tool.tool_call.id,
                        "name": tool.tool_call.function.name,
                    }
                )

        messages.append(
            {
                "role": "assistant",
                "tool_calls": tool_calls,
            }
        )
        messages += tool_output_messages

    else:  # text stream
        chunks = []
        print("Response: ", end="", flush=True)
        for chunk in generator:
            print(chunk.content, end="", flush=True)
            chunks.append(chunk.content)
        print()

        messages.append(
            {
                "role": "assistant",
                "content": "".join(chunks),
            }
        )

    print("Messages:")
    pprint.pp(messages, indent=2)
    print()

    return messages

mathematician = Mathematician(question="What is sqrt(1674) x sqrt(6931) x sqrt(1234) ?")
# The correct answer is 119655.663

messages = call_mathematician(mathematician)
mathematician.history += messages

# if the last message is a tool, the chatbot needs to keep going
while mathematician.history[-1]["role"] == "tool":
    mathematician.question = ""
    messages = call_mathematician(mathematician)
    mathematician.history += messages

mathematician.question = "Explain how you arrived at the answer in detail."
messages = call_mathematician(mathematician)
mathematician.history += messages

Here is the output:
Executing question: 'What is sqrt(1674) x sqrt(6931) x sqrt(1234) ?'
Streaming response with type: tool
Calling tool: Function(arguments='{"a": 1674}', name='Sqrt')
Tool output: 40.91454509095757
Calling tool: Function(arguments='{"a": 6931}', name='Sqrt')
Tool output: 83.25262758616091
Calling tool: Function(arguments='{"a": 1234}', name='Sqrt')
Tool output: 35.12833614050059
Messages:
[ {'role': 'user', 'content': 'What is sqrt(1674) x sqrt(6931) x sqrt(1234) ?'},
  { 'role': 'assistant',
    'tool_calls': [ { 'id': 'call_L4Q0HfGYc6dXyHYsIyHltoxn',
                      'function': {'arguments': '{"a": 1674}', 'name': 'Sqrt'},
                      'type': 'function'},
                    { 'id': 'call_77UKaj9CXJr2lw91PSmcyNLP',
                      'function': {'arguments': '{"a": 6931}', 'name': 'Sqrt'},
                      'type': 'function'},
                    { 'id': 'call_e3tqv0wG2ydrpDS8caq0EXil',
                      'function': {'arguments': '{"a": 1234}', 'name': 'Sqrt'},
                      'type': 'function'}]},
  { 'role': 'tool',
    'content': '40.91454509095757',
    'tool_call_id': 'call_L4Q0HfGYc6dXyHYsIyHltoxn',
    'name': 'Sqrt'},
  { 'role': 'tool',
    'content': '83.25262758616091',
    'tool_call_id': 'call_77UKaj9CXJr2lw91PSmcyNLP',
    'name': 'Sqrt'},
  { 'role': 'tool',
    'content': '35.12833614050059',
    'tool_call_id': 'call_e3tqv0wG2ydrpDS8caq0EXil',
    'name': 'Sqrt'}]

Executing question: ''
Streaming response with type: tool
Calling tool: Function(arguments='{"a":40.91454509095757,"b":83.25262758616091}', name='Multiply')
Tool output: 3406.2433853146786
Messages:
[ { 'role': 'assistant',
    'tool_calls': [ { 'id': 'call_arAaqMBcthgnGxzuZfj2R8qF',
                      'function': { 'arguments': '{"a":40.91454509095757,"b":83.25262758616091}',
                                    'name': 'Multiply'},
                      'type': 'function'}]},
  { 'role': 'tool',
    'content': '3406.2433853146786',
    'tool_call_id': 'call_arAaqMBcthgnGxzuZfj2R8qF',
    'name': 'Multiply'}]

Executing question: ''
Streaming response with type: tool
Calling tool: Function(arguments='{"a":3406.2433853146786,"b":35.12833614050059}', name='Multiply')
Tool output:<PHONE_NUMBER>1569072
Messages:
[ { 'role': 'assistant',
    'tool_calls': [ { 'id': 'call_CkwUZJkzWkbihHSHNLr1VXDi',
                      'function': { 'arguments': '{"a":3406.2433853146786,"b":35.12833614050059}',
                                    'name': 'Multiply'},
                      'type': 'function'}]},
  { 'role': 'tool',
    'content': '119655.66261569072',
    'tool_call_id': 'call_CkwUZJkzWkbihHSHNLr1VXDi',
    'name': 'Multiply'}]

Executing question: ''
Streaming response with type: text
Response: The result of \( \sqrt{1674} \times \sqrt{6931} \times \sqrt{1234} \) is approximately 119655.66
Messages:
[ { 'role': 'assistant',
    'content': 'The result of \\( \\sqrt{1674} \\times \\sqrt{6931} \\times '
               '\\sqrt{1234} \\) is approximately 119655.66'}]

Executing question: 'Explain how you arrived at the answer in detail.'
Streaming response with type: text
Response: To find the result of \( \sqrt{1674} \times \sqrt{6931} \times \sqrt{1234} \), we first calculated the square roots of each of the given numbers individually:
1. \( \sqrt{1674} \) is approximately 40.9145
2. \( \sqrt{6931} \) is approximately 83.2526
3. \( \sqrt{1234} \) is approximately 35.1283

Next, we multiplied these square roots together:
\( 40.9145 \times 83.2526 \times 35.1283 \approx 119655.66 \)

Therefore, the result of \( \sqrt{1674} \times \sqrt{6931} \times \sqrt{1234} \) is approximately 119655.66.
Messages:
[ { 'role': 'user',
    'content': 'Explain how you arrived at the answer in detail.'},
  { 'role': 'assistant',
    'content': 'To find the result of \\( \\sqrt{1674} \\times \\sqrt{6931} '
               '\\times \\sqrt{1234} \\), we first calculated the square roots '
               'of each of the given numbers individually:\n'
               '1. \\( \\sqrt{1674} \\) is approximately 40.9145\n'
               '2. \\( \\sqrt{6931} \\) is approximately 83.2526\n'
               '3. \\( \\sqrt{1234} \\) is approximately 35.1283\n'
               '\n'
               'Next, we multiplied these square roots together:\n'
               '\\( 40.9145 \\times 83.2526 \\times 35.1283 \\approx 119655.66 '
               '\\)\n'
               '\n'
               'Therefore, the result of \\( \\sqrt{1674} \\times \\sqrt{6931} '
               '\\times \\sqrt{1234} \\) is approximately 119655.66.'}]

This is awesome! Definitely want to include this as an example once we implement the improvements here and for inserting tool calls :)
Once we have those merged in, would you be up for submitting a PR with this example post cleanup?
Happy to include it myself if you'd prefer as part of the other changes.

Another thing worth thinking about here:
The call_mathematician function could be included as a method of the Mathematician class so that you can call something like mathematician.help(problem="...") which may make it more reusable elsewhere in your codebase and take advantage of colocation and versioning.

@willbakst I'm happy for you to create a PR. Just tag me in it. That's all.
About moving the function to be included as method, that's good too.


Easy Access to setting.json

Type: Bug
Hi,
It would be great to be able to access settings.json directly from the "servers" view without having to search for setting-intersystems and so on.
Thanks,
Mark
Extension version: 3.6.1
VS Code version: Code 1.91.0 (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:52:22.949Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info

Item
Value

CPUs
13th Gen Intel(R) Core(TM) i7-13800H (20 x 2918)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
63.62GB (10.70GB free)

Process Argv
--crash-reporter-id 6e1da3bb-9b02-4f5b-9446-28dcb121dc70

Screen Reader
no

VM
67%

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:31067544
chatpanelc:31048052
dsvsc021:30996838
f3je6385:31013174
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
legacy_priority:31082724

Hi @mmassias, can you please clarify the request please? If you right-click on a server in the tree there is a menu option called Edit Settings.

I assume you have already discovered the Edit Settings option from each server's context menu. It is also available from the titlebar's ... menu.
Those lead you to VS Code's Settings Editor, filtered to show only the settings for this extension. However the bulk of its settings lie in the intersystems.servers object, which Settings Editor can't handle. So instead you get a link to that object in your settings.json etc.
What is your suggestion?

Hi Brett, what I am suggesting is a direct entry point to settings.json, i.e. less number of clicks to get there. Thanks, Mark


Does the Signer only allow ECPrivateKey?

Hi, I am trying to create VDS using RSAPrivateKey. But the signer class only allows ECPrivateKey. is there any way to fit RSAPrivateKey while creating VDS?
N.B: My CA certificate is built using RSAPrivateKey.

Hi alam156,
according to the specification, only ECDSA is permitted as a signature for VDS. Therefore, the Signer class does not offer the option of using RSA certificates. An RSA signature would also make the VDS very large.


mojave-xcode-10.3 not starting

I've been trying to use the mojave-xcode-10.3 image in my builds, but they won't seem to start. Also, I've noted that the image isn't listed on the official documentation. Aren't the image supported yet, and if so, when can we expect it to be 😄

Hey @budde377, Xcode 10.3 was released after Xcode 11 Betas started coming out so we were only building mojave-xcode-11. Xcode 10.3 looked like a very minor update. Is there something particular that you are missing?

@fkorotkov No, it would seem that the mojave-xcode-10.2 image is actually doing the trick. I'll close this issue.


fix: Compute mesh u16 split size corretly

The u16 max value is 1<<16 - 1 not 1<<16 (https://doc.rust-lang.org/std/u16/constant.MAX.html)

This is more a case of a bad name. If you make this change you also need to change all < MAX_SIZE to <= MAX_SIZE

Ah yes, it is the check lower down that is wrong! I'll clean it up slightly

I added some clarifications in https://github.com/emilk/egui/pull/2459


Pass format function to Y and X labels

Motivation
As described in #212 in my project I had a very particular use case, but maybe this could help others. As I mentioned in the issue, another libraries have a callback like that.
What changed

Add two props in the LinearChart(formatYLabel and formatXLabel) that receive functions with the label value as parameter and should return string.
Update README with the new props description.
As I was adding description to the props in index.d.ts I took the liberty to describe all LineChartProps based on the current docs info.

Final thoughts

I didn't remove yAxisLabel, yAxisSuffix and xAxisLabel props and this works with both approaches, but the formatYLabel and formatXLabel can be used to add prefix and suffix to the label as mentioned here, but again because of this I didn't want to bring breaking changes.
Changes made only in LinearChart.

Thanks 👍 this is now available in 3.12.0

Hi guys ... any idea of an ETA for the other chart types.
p.s this works beautifully, great work!!

Thanks @Thembelani . When I was doing that I started to doing in other chart types to, but couldn't finish yet. I'll try to make another PR for this 👍 .

@Thembelani types have significantly improved in v4.0.0, which is now out thanks to @Charanor

Is there any example for formatYLabel?

@brendan1809 you can pass whatever function that receives the value and return a string. A simple example would be to convert the value in bytes to human readable(bytes is a lib to do that):
<LineChart
  data={data}
  width={screenWidth}
   height={220}
  formatYLabel={value => bytes(value)}
  chartConfig={chartConfig}
/>

Another example would be to just add a prefix:
<LineChart
  data={data}
  width={screenWidth}
   height={220}
  formatYLabel={value => `$ ${value}`}
  chartConfig={chartConfig}
/>