Allow custom text to be added into phpstorm.meta.php during/after generation.

Hello Barry, thanks for this wonderful project.
Was wondering if it is possible, or if not would you be amenable to allowing custom factories to be added to the .phpstorm.meta.php file when it's being generated?
For example. I've a custom GoogleAPI wrapper that creates the required Google_Service when a string is passed to the makeService() method. eg:
$google = new GoogleAPI();

$calendar = $google->makeService('Calendar'); //Returns Google_Service_Calendar class.

All I need to add to the phpstorm.meta.php to get full autocomplete is:
        \App\Service\Google\GoogleApi::makeService('') =>[
            '' == 'Google_Service_@',
        ],

This is working fine for me at the moment, but I have to manually add it eveytime the phpstorm.meta.php file gets created. Any workaround?

I'm voting for this too. I add custom items to the container with a different convention, it would really be helpful if we could append custom stuff to the meta file.

@jonnywilliamson : I don't know how Google Service there works, but I know if you create your services extending Laravel's service container, app() and other Laravel stuff get autocompleted via this package automatically. What I mean is, if you can get your service be called via, let's say app('google') then the rest should work.

@shehi I'm really sorry I just can't understand your comment there.
Even if what you suggest works and you can get full autocomplete from your method, the point of this request is to allow us to add some custom data to phpstorm.meta.php because at the moment it is completely generated automatically, and you can't add anything to it.

@jonnywilliamson : Do you know how to create services and service providers in Laravel? If so, they all are auto-included when .phpstorm.meta.php is generated. Otherwise I can't see how some resource not being part of Laravel's internals can be recognized by this package. By creating a Laravel service, you will have your own thing as part of its internals, and through that, this package will discover your services.
Have you even checked the source code of this tool?

If you register your service in the container, the command should find it and add it to the meta file.
If you have your own Container, just add the file to your own package. You can have multiple files, it works from the vendor dir also.

OK guys go easy on me, we're not all geniuses!
So I'll break it down in steps I've done, then you can point out the better and easier method I should do.
So I am using a service provider, and of course I have looked at the source code!
I want to use this php google api package (from google themselves).
**Please note, in the code below I've removed unneeded methods and doc blocks to make things clearer. If I have made a typo, please take it as a typo and not a functional issue as the code is currently working.

It's in a laravel project, and has been included with composer.

There are many google services that can be created with this library. Everyone of them needs a $client object, passed to it. Eg.

$client = new Google_Client();
$client->setApplicationName("Client_Library_Examples");
$client->setDeveloperKey("YOUR_APP_KEY");

$booksService = new Google_Service_Books($client);
$calendarService = new Google_Service_Calendar($client);

So I want to be able to create a goggle service object quickly, so I could do something like this:

$googleApi = app('GoogleApi::class');
$calendar = $googleApi->make('calendar');

With this code above, I will get no autocomplete in my IDE because it has no idea what type of object is returned from ->make() method. Unless I manually add a doc block comment like

    /** @var Google_Service_Calendar $calendar */

I need to start making my service provider.....so:

I created a service provider to generate the client for me automatically, using values from a google config file I have saved in the Laravel config directory:

<?php

namespace App\Providers;

use Auth;
use Google_Client;
use Illuminate\Support\ServiceProvider;

class GoogleApiServiceProvider extends ServiceProvider
{
    protected $defer = true;

    public function boot()
    {

    }

    public function register()
    {
        $this->app->singleton(Google_Client::class, function () {
            $client = new Google_Client(config('google'));
            $client->setScopes(config('google.scopes'));

            return $client;
        });

        $this->app->bind(GoogleApi::class, function () {
            return new GoogleApi(app(Google_Client::class));
        });
    }

    public function provides()
    {
        return [Google_Client::class, GoogleApi::class];
    }

}

Now I also write my API wrapper to implement the make method I want to use:

<?php

namespace App\Service\Google;

use Google_Client;
use Google_Service;
use InvalidArgumentException;

class GoogleApi
{

    /**
     * @var Google_Client
     */
    protected $client;

    /**
     * @var Google_Service[]
     */
    protected $service = [];

    public function __construct(Google_Client $client)
    {
        $this->client = $client;
    }

    /**
     * Create any type of GoogleService.
     *
     * @param string $service
     *
     * @throws InvalidArgumentException
     * @return object
     */
    public function make($service)
    {
        $service = 'Google_Service_'.ucfirst($service);
        if (class_exists($service)) {
            $class = new \ReflectionClass($service);

            return $this->service[$ucService] = $class->newInstance($this->client);
        }
        throw new InvalidArgumentException($service);
    }

}

So now things are working.If I make a GoogleApi object and call ->make($calendar) I WILL get a Google_Service_Calendar object back that works when I make calls to Google's servers.

However, there's still no autocomplete if I try:

$googleApi = app('GoogleApi::class');
$books = $googleApi->make('books');

$books-><NO AUTOCOMPLETE>.

If I add this line to the phpstorm.meta.php:

        \App\Service\Google\GoogleApi::make('') =>[
            '' == 'Google_Service_@',
        ],

I instantly get autocomplete.
Now I don't know where to go from here. How do I make this work with the service provider?

Shouldn't the line saying $googleApi = app('GoogleApi::class'); actually be $googleApi = app(GoogleApi::class);?

You might have missed the note:

**Please note, in the code below I've removed unneeded methods and doc blocks to make things clearer. If I have made a typo, please take it as a typo and not a functional issue as the code is currently working.

Of course you are right, but that is a typo. Please read the code as a 'high level' overview of what i am trying to do, and not run it as production code...it's been heavily reduced to keep it easy to follow in this thread.

@jonnywilliamson : :) No, I am not missing anything. Look, when you create a service provider, you bind certain service/class/whatever to Laravel's service-container, using certain key. Usually that key is the class's FQNS (fully qualified namespace). Sometimes it's just a readable string. Doesn't matter, in all cases, it's a string. Then when you need that service, you call it either by app('service-string-goes-here') or app()->make('service-string-goes-here'). This IDE-helper understands it and auto-completion works just fine.
In your case you have done that via class names. So when you "make" an instance, let's say of GoogleApi class, you should do so via:
$myGoogleApi = app(GoogleApi::class);
and it will work. It also will autocomplete. Just make sure you also have added your service provider to config/app.php file as well (under providers). That way application will identify its providers, and so will IDE-helper. Ok? Remember: add your provider to that file!!!

And make sure you are not on PhpStorm 2016 - autocompletion doesn't work it, due to a bug. See #440

@shehi Look thank you for commenting and looking at this, I do appreciate it, however I think we are arguing about different things.
If I wanted to bind 'calendar' to the service container I could.
Then I could bind books.
Then I could bind AdExchangeBuyer
Then I could bind Then I could bind
Then I could bind Then I could bind

I'm not using Phpstorm 2016, only v10
@shehi Look thank you for commenting and looking at this, I do appreciate it, however I think we are arguing about different things.
You keep mentioning the typo I make when using app(), please be assured I have no problems using the ::class syntax.
Just so you are not confused with what I am saying, I have no problems getting autocomplete for any method in my GoogleAPI class.
So for example,
$googleApi = app(GoogleApi::class);

$googleApi-><I **WILL** GET AUTOCOMPLETE HERE. NO PROBLEM>

//Now if I continue
$books = $googleApi->make('books');

$books-><I GET NO AUTOCOMPLETE HERE BECAUSE THE IDE HAS NO IDEA WHAT OBJECT WAS RETURNED FROM MAKE METHOD>.

If I wanted to bind 'calendar' in my service provider I could.
Then I could bind Books.
Then I could bind AdExchangeBuyer
Then I could bind Analytics
Then I could bind Blogger
Then I could bind Dataflow
Then I could bind Youtube
and so on and so on.....over 200 services can be returned from the google api package.
But I don't want to.
I want to use the clever ability of Phpstorm to be able to read what a factory can create and then provide autocomplete. It can do it! I only need that small line placed into the phpstorm.meta.php file.
I just don't know how to do that automatcially, or how to let this amazing package scan and do it for me.
https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata

Oh... But that would be almost impossible to achieve. You see, this package does that for Laravel services (which are dynamic) TO Phpstorm. What you want is GoogleApi services (dynamic) TO Laravel services (again dynamic) TO Phpstorm. Its like nesting IDE-helper with itself :)
Even if you removed Laravel from middleware and made it like GoogleServices TO Phpstorm, then you would have to create a tool similar this one, but instead of reading Laravel resources and populating them into phpstorm.meta.php, it'd need to read GoogleApi resource and populate/append accordingly.
Now I understand what you want. And I greatly doubt that task is in the scope of this package. Of course final verdict is @barryvdh 's.

So finally after this exhausting exchange we come back to the original request of the PR (from post 1)

Was wondering if it is possible, or if not would you be amenable to allowing custom factories to be added to the .phpstorm.meta.php file when it's being generated?

Which I could now reword slightly to:
@barryvdh Would you amenable to allowing the ability to add custom text to the phpstorm.meta.php file during/after it has been generated?
I don't need help on WHAT to insert into the file, I just would like an automatic way of including it during/after it is being generated.

@briedis Thought you might be interested in this I've just discovered in the past few days
https://github.com/barryvdh/laravel-ide-helper/issues/469

For anyone following along, here are some further results that may help you out. Using uptodate versions of phpstorm
https://github.com/barryvdh/laravel-ide-helper/issues/469#issuecomment-291265821


AudioSet temporally-strong labels

Firstly I would like to state that this repo is great, so many models, all in pytorch and getting them to work on my machine was very easy.
Have you tried fine-tuning the models on the temporally-strong labeled subset of the AudioSet dataset?

To follow up on this: we have fine-tuned a couple of transformer models on the temporally-strong labels of AudioSet:
https://github.com/fschmid56/PretrainedSED
The models are not yet low-complexity, but we will also publish something in that regard soonish :-)


feat(UnlockHeavyIcon): add UnlockHeavyIcon to regular icons

Overview

Adding UnlockHeavyIcon to Gamut icons
https://www.streamlinehq.com/icons/streamline-bold/interface-essential/lock-unlock/lock-unlock
Note this icon does not have an outline stroke. It was added as is from Streamline. Onlydesr removed and id changed.
Screenshot of new icon being used in portal preview env

PR Checklist

[x] Related to designs: https://www.figma.com/design/4BYMs8Ni85uVyvFaLXJ7Tw/Quiz-metering?node-id=119-49369&t=KmnRPab9DabjfSmL-0
[x] Related to JIRA ticket: FLOW-779
[x] I have run this code to verify it works
[ ] This PR includes unit tests for the code change
[x] This PR includes testing instructions tests for the code change
[x] The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions
Check out the new icon in the storybook link.
PR Links and Envs

Repository
PR Link
PR Env

Monolith
Monolith PR

Portal
Portal Link
Portal Env

📬Published Alpha Packages:@codecademy/gamut@55.20.1-alpha.52e568.0@codecademy/gamut-icons@9.24.3-alpha.52e568.0@codecademy/gamut-kit@0.6.409-alpha.52e568.0<EMAIL_ADDRESS>
🚀 Styleguide deploy preview ready!https://66574cb5cd59f831811112ed--gamut-preview.netlify.appDeploy Logs

📬Published Alpha Packages:@codecademy/gamut@55.21.1-alpha.a37083.0@codecademy/gamut-icons@9.24.4-alpha.a37083.0@codecademy/gamut-kit@0.6.410-alpha.a37083.0<EMAIL_ADDRESS>
🚀 Styleguide deploy preview ready!https://66578f5dcf4d19396d63eec0--gamut-preview.netlify.appDeploy Logs


LIVE DEMO LINK NOT

HI @Lucash2022
Great work  👏
You've done well, but there are still some that you haven't addressed.

Highlights
✔ Good job addressing most of the requirements.
✔ Followed GitHub flow.
✔ Good PR summary.
✔ No linter errors.
ISSUE ♻
YOUR LIVE DEMO SEEMS NOT TO BE WORKING;
IT WOULD BE NICE TO SEE IT FIXED, SO WE CAN VIEW WHAT THE PROJECT ACTUALLY LOOKS LIKE

Optional suggestions
Cheers and Happy coding!👏👏👏

Thank you so much for the review. I have updated the link.


Can not access SearchTextField properties

Hello @apasccon
I have just installed SearchTextField through cocoapds and I can not acces any of it's properties.
I am able to import it and Xcode gives no issues or warnings, but it behaves like none of it's properties are public/open.
I am using Xcode 10 with Swift 4.2.

This was totally my fault. Before installing SearchTextField, I subclassed UITextField with class named SearchTextField which apparently made conflicts.


Modifying component template in AOT mode has no affect only after restart

OS?
Linux Ubuntu 16.04
Versions.
Node: 6.7.0
Angular 2: 2.1.2
@ngtools/webpack: 1.1.4
Repro steps.
Using @ngtools/webpack with webpack-dev-server compiles the application right at startup, but when modifying a component template it still serves the old version after refresh.
Clone this repository and start the application with npm run start-plugin and modify the HelloWorldComponent.
If i stop the server and start it again, it shows the new version.

It's working from within the CLI, but am unsure why it wouldn't work with just the plugin. Maybe @hansl can shed some light on it.

Needed to add @ngtools/webpack to rules also.


Enforce osusergo build tag for releases

Similar to #1690, we need a new tag to use the go version and not the linked cgo version that fail on some distrib. In this case, we are using it to finding the runnning user.
Should fix #6841 and also reported bug on discourse

@sapk are you able to reproduce this problem? We need to ensure that the issue is solved by this addition.

Codecov Report

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

@@            Coverage Diff            @@
##             master    #6862   +/-   ##
=========================================
  Coverage          ?   41.17%
=========================================
  Files             ?      425
  Lines             ?    58489
  Branches          ?        0
=========================================
  Hits              ?    24084
  Misses            ?    31218
  Partials          ?     3187

Continue to review full report at Codecov.

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

@zeripath I can't reproduce the bug exactly since I don't know (yet) which glib is incompatible with which glib version but the output of the linker go in this direction :
#Without osuserog
root@a4d05b9c2e6c:/gitea# CGO_ENABLED=1 go build -tags 'netgo sqlite sqlite_unlock_notify' -ldflags '-linkmode external -extldflags "-static"' .
# code.gitea.io/gitea
/tmp/go-link-710302265/000011.o: In function `unixDlOpen':
/root/go/pkg/mod/github.com/mattn/go-sqlite3@v1.10.0/sqlite3-binding.c:38461: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-710302265/000015.o: In function `mygetgrouplist':
/workdir/go/src/os/user/getgrouplist_unix.go:16: warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from theglibc version used for linking
/tmp/go-link-710302265/000014.o: In function `mygetgrgid_r':
/workdir/go/src/os/user/cgo_lookup_unix.go:38: warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-710302265/000014.o: In function `mygetgrnam_r':
/workdir/go/src/os/user/cgo_lookup_unix.go:43: warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-710302265/000014.o: In function `mygetpwnam_r':
/workdir/go/src/os/user/cgo_lookup_unix.go:33: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-710302265/000014.o: In function `mygetpwuid_r':
/workdir/go/src/os/user/cgo_lookup_unix.go:28: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
#With osusergo
root@a4d05b9c2e6c:/gitea# CGO_ENABLED=1 go build -tags 'netgo osusergo sqlite sqlite_unlock_notify' -ldflags '-linkmode external -extldflags "-static"' .
# code.gitea.io/gitea
/tmp/go-link-514533019/000011.o: In function `unixDlOpen':
/root/go/pkg/mod/github.com/mattn/go-sqlite3@v1.10.0/sqlite3-binding.c:38461: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

The released gitea 1.8 binary seems to work on the docker image debian:9.6. I will try to find a tag that doesn't work.

I've been trying to find the broken version too... I think it's libc6 2.26 but I don't know which version of debian has that.

hmm... Is it possible that this might fix the static build problems for Arm7 might be fixed by osusergo too?

On the docker image 9.6  it is libc6 2.24

ubuntu:bionic has 2.27-3ubuntu1 and works

For testing, i use :
$ cat test.sh
#!/bin/sh
apt-get update
apt-get upgrade -y
apt-get install -y git
dpkg -l libc6
/gitea
wget https://github.com/go-gitea/gitea/releases/download/v1.8.0/gitea-1.8.0-linux-amd64 && chmod +x ./gitea-1.8.0-linux-amd64
docker run -ti --rm -v "$(pwd)/gitea-1.8.0-linux-amd64:/gitea" -v "$(pwd)/test.sh:/test.sh" debian:9.6 /test.sh

17.10 works even though its version is 2.26-0ubuntu2.1

so static_build appears to remove a few more warnings too - leaving only dlopen warnings which appears to be because sqlite3 can load shared objects so I think that might be irremovable.

@zeripath what warning do you got that where remove with static_build ? unixDlOpen was the only I still got using only netgo and osusergo.

oh sorry I'm talking nonsense. I misread your message earlier.

@sapk why don't you come to discord and we can chat a bit more without spamming this

I've decided to approve even though we can't prove that this will solve the problem.
Unfortunately it looks like this doesn't solve the arm7 problem (at least on pi2)

So this will need to be backported to 1.8 in order for us to fix the issue.

@zeripath done


The spectacular settings on the REST_FRAMEWORK value is missing

What happened?
The URL <IP_ADDRESS>:8000/api/docs/ is giving the following error :
Incompatible AutoSchema used on View <class 'drf_spectacular.views.SpectacularSwaggerView'>.
What should've happened instead?
The following value should be added to the REST_FRAMEWORK settings in base.py:
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',## Additional details

Thanks for reporting the issue, however, this issue was already solved yesterday on  https://github.com/cookiecutter/cookiecutter-django/pull/3592/ and already merged on the master branch


Add automatic CPLEX/Gurobi/SCIP installation routines

In order to simplify CNApy's installation process, automatic installation routines for CPLEX, Gurobi and SCIP should be added, in the best case one which is accessible under the Config menu.

As far as I researched, the new CPLEX and Gurobi helpers which I added to CNApy are the maximum of possible automation with reasonable access to user privileges. Hence, I think that this issue is probably solved as far as reasonably possible.


Add CONTRIBUTING doc & outline release process. Remind brews to version setup.py?

Need to consider being more disciplined about updating the version information in setup.py if users are installing this with pip on the side. That said, this is still primarily an application to be run from a Docker container. Need to stay focused on that.

This is stale. Please. Open a new issue for work related to this.


introducing frontend tests in playwright

sorry for the missing description. I am pushing some playwright front end tests if you would be interested in having some . we can work on them and make it more exhaustive over time.


Hidden Field in Dynamic Forms causes crash

If I run a vanilla instance of orchard with the Dynamic Forms module enabled and add a form to the home page with a single Hidden Field on it, the page crashes with the following error:
[RuntimeBinderException: Cannot implicitly convert type 'Orchard.UI.Zones.ZoneOnDemand' to 'string']
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Descriptors\ShapeAttributeStrategy\ShapeAttributeBindingStrategy.cs:75
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:56
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:204
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:100
   Orchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:30
   CallSite.Target(Closure , CallSite , Object , Object ) +220
   ASP._Page_Themes_TheThemeMachine_Views_Layout_cshtml.<Execute>b__9b(Object x) in c:\html_vanilla-orchard\Themes\TheThemeMachine\Views\Layout.cshtml:21
   CallSite.Target(Closure , CallSite , Func`2 , Object ) +95
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +975
   ASP._Page_Themes_TheThemeMachine_Views_Layout_cshtml.Execute() in c:\html_vanilla-orchard\Themes\TheThemeMachine\Views\Layout.cshtml:95
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +125
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +147
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:151
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:133
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:56
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:204
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:100
   Orchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:30
   CallSite.Target(Closure , CallSite , Object , Object ) +220
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +975
   Orchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass7.<FindView>b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:63
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +109
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +97
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +241
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +19
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) +126
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   Orchard.Mvc.Routes.<<ProcessRequestAsync>b__0>d__4.MoveNext() in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\Mvc\Routes\ShellRoute.cs:182
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   Orchard.Owin.<<UseOrchard>b__0>d__2.MoveNext() in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\Owin\OrchardMiddleware.cs:17
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   Orchard.Mvc.Routes.<ProcessRequestAsync>d__7.MoveNext() in c:\Development\Salween\EAM\ams_unbroken\src\Orchard\Mvc\Routes\ShellRoute.cs:189
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
   System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +98
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

This is the only field type in the dynamic forms that I have observed causing any problems.
To reproduce simply enable the Dynamic Forms module and add a Form widget to a page and add a Hidden Field to the form. When you load the page with the form on it, it will fail.

What name did you give the hidden field? I'm wondering if its clashing with something.
I remember from the Harvest video @sfmskywalker ran into an issue where he called a field Title which clashed with something else on the page and caused an error.
It sounds like maybe it has found something else when it went looking for your hidden field?

@rtpHarry Yes exactly. Not sure if that is related to said exception, but would be interesting to try the hidden field with a different name.

Hmm it does seem this is a real issue.
Made a fresh setup which was pulled from master (1.10.1), enabled dynamic forms, put a form on the homepage (name: Form Test), put a hidden field on it (name: Margaret), save, browse = crash.
Tried each of these and it crashed at every stage:

Add submit button
Add input field
Create new page, copy paste form over to new page

Then I deleted the hidden field from homepage, no crash. Deleted from page, no crash.

Its throwing the exception on this line in HiddenField.cshtml:
tagBuilder.Attributes["value"] = Model.ProcessedValue;

Adding an extra ?? string.Empty to the HiddenFieldElementDriver fixes it:
    protected override void OnDisplaying(HiddenField element, ElementDisplayingContext context) {
        context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
        context.ElementShape.ProcessedValue = element.RuntimeValue ?? string.Empty;
    }

If you leave Value blank, both HiddenField and TextField both have an element.RuntimeValue == null when they are assigned to ElementShape.ProcessedValue in the driver (like snippet above).
When you try to view them on the front end somehow InputField handles it ok where as HiddenField crashes.
I'm going to submit a quick PR to fix this as above unless @DanielStolt or @sfmskywalker have any deeper insight into the workings of Orchard.DynamicForms.

I wonder if it would be better to fix the code that doesn't check for null, rusher than setting the RuntimeValue to an empty string? I think that all code dealing with strings should be prepared to deal with null strings.

Ok I will move the code fix down into the view then.
I think I should probably add it everywhere that https://github.com/OrchardCMS/Orchard/commit/e29fb90298659a67b58711a64f0c23746817cb06#diff-b9120625318eac9c2ee807d720870f60 amended it.
While it seems that it only crashes the hidden tag we don't really know why and if something changes in then it could start happening with other fields.

I'm looking into this more and I think that the original fix I proposed is correct.
Its not failing because the string is null, its actually a ZoneOnDemand that is being assigned:

My guess is that if the .ProcessedValue is null then when the magic happens and it gets turned into a dynamic model and if finds something is set to null it just doesn't add it to the Model? And trying to access it, the system does it best and gives you a ZoneOnDemand.
If I change the line to:
tagBuilder.Attributes["value"] = Model.BlahBlahProcessedValue;

Which definitely doesn't exist I get the same ZoneOnDemand type.


Dataset creation crashes on GODataset k=5 graph

Using the latest version from PyPi
>>> from torch_pdb.datasets import GODataset
>>> GODataset(root="./data").to_graph(k=5).pyg()
Converting proteins to graphs:  49%|████████████████████████████████████████████████████████████▎                                                              | 9448/19267 [00:27<00:26, 372.78it/s]Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/torch_pdb/datasets/dataset.py", line 292, in to_graph
    return GraphDataset(self.root, self.proteins, *args, **kwargs)
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/torch_pdb/representations/graph.py", line 47, in __init__
    self.proteins = self.convert(proteins)
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/torch_pdb/utils/io.py", line 129, in wrapper
    result = function(self, *args, **kwargs)
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/torch_pdb/representations/graph.py", line 60, in convert
    return [self.protein2graph(p) for p in tqdm(proteins, desc='Converting proteins to graphs')]
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/torch_pdb/representations/graph.py", line 60, in <listcomp>
    return [self.protein2graph(p) for p in tqdm(proteins, desc='Converting proteins to graphs')]
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/torch_pdb/representations/graph.py", line 55, in protein2graph
    adj = kneighbors_graph(protein['coords'], n_neighbors=self.k, mode=mode)
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/sklearn/neighbors/_graph.py", line 124, in kneighbors_graph
    return X.kneighbors_graph(X=query, n_neighbors=n_neighbors, mode=mode)
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/sklearn/neighbors/_base.py", line 878, in kneighbors_graph
    A_ind = self.kneighbors(X, n_neighbors, return_distance=False)
  File "/Users/carlosgonzalezoliver/anaconda3/envs/biographs/lib/python3.9/site-packages/sklearn/neighbors/_base.py", line 724, in kneighbors
    raise ValueError(
ValueError: Expected n_neighbors <= n_samples,  but n_samples = 2, n_neighbors = 6
>>>

looks like maybe some proteins are too small for a k=5 graph?

looks like it, should be a one-liner k = min(k,len(protein))

on it

fixed in #47


Add support of media duration and position.

I believe all OS support showing of media duration and current position.
I propose adding support of passing such info to OS media widget.
Also, I believe it would also be useful to support setting playback position from OS widget.

With the rewrite in 0.5 which dropped everything besides windows for now while that transition is being made. This feature is now supported and will be supported when the other operating systems are programmed in again.


Wrong link on npm registry

On the npm registry package page, the link to the github page points to https://github.com/@nth-cloud/ng-toggle#readme when it should point to https://github.com/nth-cloud/ng-toggle#readme

Weird. I'll fix it in the next release. Thanks!


Separate build job with cache

Description of the Change
This PR adds separate job for install node and build with cache.

Node cache is identified by the hash of package-lock.json and includes Cypress binary from ~/.cache.
Build cache is identified by the hash of all files in src

A little more CPU energy to save!
Checklist:

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

Great update! I think this is something we want to add to 10up Open Source Best Practices > Testing as well.

GitHub Actions is less related to testing than CI/CD. As I can see there is a better place to describe caching and job-chains in https://10up.github.io/Open-Source-Best-Practices/github-process/#continuous-integration


html2pdf with pageBreaker and table border

Hey.
I'm using html2pdf with my React App. I send my HTML to jsPDF. It's a simple Table with borders.
Everything is correct, but when I have to print big Table with lot of  with  pdf.context2d.pageWrapYEnabled = true
My vertical border are not rendering correclty. If I set border-right 1 px solid black; the border will be renderer in wrong postion ( Top or bot, absolutly not where are my TD/TR)
Is there anyone succed to pageBreak Table with Border using html2pdf ?
Thanks.

how to import html2Pdf  in react?

@GreGGus  Still don't get it. I am getting error for html2pdf is not function. Do I need to import html2pdf from any library? can you share any example in detail about html2pdf.? Thanks.


ReactJS + Webpack Implementation

Hi
First of all, I would like to say that your project is nothing short of amazing, and thank you so much for this.
I have started a ReactJS + Webpack implementation of this project at https://github.com/ashwin01/ReactJS-AdminLTE. The widgets page is almost completed. Would love to hear your opinion on it.
Note: The widgets use velocity.js for animations.
Thanks once again!

@ashwin01 HI, how to use velocity.js replace app.js inner animatie speed; thanks

Hi @crperlin, to replace the animation speed, you can go to public/js/widgets/common-functions.js and change the duration there. Then you need to run webpack.

@ashwin01  you use RE replace animate, if can't use webpack ,[on static website] can replace velocity.js into admin lte app.js duration , provide fast animate !!! thanks

I'm not sure I understood what you mean @crperlin. I'm writing the functions / variables from app.js in another file the AMD way, which later is bundled by webpack, to avoid variables / functions from getting exposed in the global namespace.

@ashwin01 yes ...

@crperlin  I've submitted a PR for this, please have a look.

@ashwin01 nice work! I will add your implementation to our documentation. Please let us know when you have completed the pages. This looks promising :+1:

@almasaeed2010 Thanks a lot!!

@ashwin01 thank you ! I have successfully replaced app.js inner , use velocity.js .. so fast!!

@crperlin Glad you found it useful. :)

@crperlin Could you publish somewhere a live demo?

@ivantcholakov   yes ,, look my demo

Thank you.

@almasaeed2010 The widgets page is ready...!


Automations editor's API calls return '404 not found' error

Home Assistant release (hass --version): 0.45.0
Python release (python3 --version): Python 3.4.2
Component/platform: Automations editor
Description of problem: The automations editor cannot load config through API with as result an empty interface. The request to load the automation returns a 404 not found error. I've used random strings as ids, e.g.: aafh39. The api request then becomes /api/config/automation/config/aafh39
Expected: The interface to edit the automation
Problem-relevant configuration.yaml entries and steps to reproduce:
- id: afh93f
  alias: 'Turn off lights'
  hide_entity: True
  trigger:
    platform: state
    entity_id: input_boolean.asleep
    to: 'on'
  action:
    service: light.turn_off
    entity_id: group.all_lights
    data:
      transition: 20

Add id to existing automations
Try to edit them through the web-based automations editor
Open the browsers inspector to see the failing requests

The only difference I can see right now is that I'm using hide_entity: True for all automations. Could that affect the api?

I can confirm that it does not make a difference whether hide_entity: True is added to a automation.
Also I tried other id formats, e.g. a number, or a string with quotes, but that doesn't make a difference either.
No one else experiencing this problem?

What's the file name of the yaml file where your automations are located?

automation.yaml.
And the alias titles are listed correctly.

Try naming the file automations.yaml.

That indeed solves the problem, thanks!
Though this particular issue can be closed, it would still be nice if an error message is shown in a situation like this. Or that a check is done on all requirements before the editor is loaded at all.


Comparing contents of a message

message = group.messages().newest
print(message.text) #printout is @user
print(message.text == "@user") #false
print(message.text is "@user") #false

Hopefully this library is still under development.
I'm trying to compare the contents of a message to a string. No matter what I try, the output is false. Any idea on how I should compare?

Hey, hope you got this sorted out :)


The "Azure Cloud Shell (Bash)" is not support in Azure China account

OS: All
Build Version: 20240525.1
Regression: Not a regression
Repro Steps:

Make sure setting "Microsoft-sovereign-cloud: Environment" to ChinaCloud.
Sign out.
Open VS Code's Terminal view and click the dropdown to create a new terminal -> Select "Azure Cloud Shell (Bash)".
Click "Open" button after pop up a notification.
Check whether the opened page is the Azure China account portal.

Expect:
The opened page is the Azure China account portal.
Actual:
The opened page is the Azure account portal.
More Info:
The Azure China account portal doesn't have Cloud Shell command.

Do you know if this used to work when we did it through Azure Accounts?

It works when through Azure Accounts. But it doesn't work in Azure Account Extension. There are two related bugs:
https://github.com/microsoft/vscode-azure-account/issues/484
https://github.com/microsoft/vscode-azure-account/issues/257

Azure Cloud Shell is not supported in Azure China.


update to 0.2.65

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@sodre I updated the .patch to the right line references. However it is still not completing the build, i don't think it's related to the recipe though. Look here: abetlen/llama-cpp-python#479
import: 'llama_cpp'
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/llama_cpp_python_1714409450875/test_tmp/run_test.py", line 2, in <module>
    import llama_cpp
  File "/home/conda/feedstock_root/build_artifacts/llama_cpp_python_1714409450875/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.12/site-packages/llama_cpp/__init__.py", line 1, in <module>
    from .llama_cpp import *
  File "/home/conda/feedstock_root/build_artifacts/llama_cpp_python_1714409450875/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.12/site-packages/llama_cpp/llama_cpp.py", line 1046, in <module>
    @ctypes_function(
     ^^^^^^^^^^^^^^^^
  File "/home/conda/feedstock_root/build_artifacts/llama_cpp_python_1714409450875/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.12/site-packages/llama_cpp/llama_cpp.py", line 128, in decorator
    func = getattr(lib, name)
           ^^^^^^^^^^^^^^^^^^
  File "/home/conda/feedstock_root/build_artifacts/llama_cpp_python_1714409450875/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.12/ctypes/__init__.py", line 392, in __getattr__
    func = self.__getitem__(name)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/conda/feedstock_root/build_artifacts/llama_cpp_python_1714409450875/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.12/ctypes/__init__.py", line 397, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: /home/conda/feedstock_root/build_artifacts/llama_cpp_python_1714409450875/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.12/lib-dynload/../../libllama.so: undefined symbol: llama_numa_init


crypt: add automatic darwin support

Currently one would have to pass a macos flag explicitly to build on OSX, but if we replace macos with darwin this happens automatically.

Thanks Martin! Should now be fixed :)

CI seemed to be stuck so I restarted it. I'll wait for it to complete even though I don't expect any issues.

CI failures are unrelated (failed to download RPMs)


update release roles links in security release process

meanwhile: remove build admins due to https://github.com/kubernetes/website/pull/43408

/cc @saschagrunert

ping @enj

/lgtm
/approve

Thanks!


supporting Python-3.10 ?

trying guidata-1.8 on python-3.10/pyside6-6.2, I get this error

I'm not sure how it shall be fixed.
I saw this https://github.com/hylang/hy/pull/2115/files

it works by replacing collections.Callable per collections.abc.Callable.
C:\python-3.10.0.amd64\Lib\site-packages\guidata\dataset\dataitems.py (2 hits)
Line 537:         if isinstance(choices, collections.abc.Callable):  # stonebig
Line 543:         if default is FirstChoice and not isinstance(choices, collections.abc.Callable): # stonebig

Fixed by dd3d7ff8f5db7a535fa588b4bb0a80b6d0105128

Thanks, guidata-2.0.2 works way better now on Pyside6/Python-3.10. only test_dataframeeditor.py seems not happy, will have to digg.

Fixed by 5cb6ebbb3c40301233d48df5cb663164190419bc


sourcemap(s) are causing warnings (details added)

Please see issue #18
** I added details there **

Yes, will look


⚠ AnimeBytes has degraded performance

In bd49167, AnimeBytes ($AB) experienced degraded performance:

HTTP code: 200
Response time: 2015 ms

Resolved: AnimeBytes performance has improved in 238dc4a.


Javascript type checking through checkJs: true in tsconfig.json does not use local declaration files correctly

Issue Type: Bug
I am editing a quite simple Javascript file to be served by our backend for use with a static web site. To avoid having to setup a build workflow for it I thought I would use tsc's ability to type check Javascript files.
After a bit of trial and error I can get to the point where running tsc from the command line seems to be working correctly but the error checking inside of VSCode does not work as expected.
I am using an external third party simple global JS module from a CDN. I have added my own custom declaration file for the part of the API that I want to have checking for.
The file is in "src/types/flex-microform/index.d.ts" and it basically contains a declare class Flex { ... }. I have a main tsconfig.json for my regular backend TypeScript code. I then added a tsconfig.frontend.json with the following content:
{
  "compilerOptions": {
    "lib": ["ES2022", "dom"],
    "noEmit": true,
    "checkJs": true,
    "rootDir": "."
  },
  "extends": "./tsconfig.json",
  "include": ["assets/scripts/**/*.js"<EMAIL_ADDRESS>}

When I run tsc --project tsconfig.frontend.json the errors are shown correctly however VSCode shows a red squiqqly line on Flex inside const flex = new Flex(captureContext) with the error message Cannot find name 'Flex'. Did you mean 'flex'?ts(2552) this is not correct since if the correct project file would be used the flex-microform/index.d.ts file would be included and therefore the types would be available.
I tried to use the "JavaScript: Go To Project Configuration" action to check whether VSCode is able to detect it, but it seems to expect that JS files must be included in jsconfig.json files. Which is not necessarily the only way for them to be part of a project.
VS Code version: Code 1.69.2 (Universal) (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:57.074Z)
OS version: Darwin arm64 21.5.0
Restricted Mode: No

System Info

Item
Value

CPUs
Apple M1 Max (10 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
3, 2, 3

Memory (System)
64.00GB (0.56GB free)

Process Argv
--crash-reporter-id d03b914e-23da-4b9f-9ed2-7e40a42cdb21

Screen Reader
no

VM
0%

Extensions (30)

Extension
Author (truncated)
Version

vscode-openapi
42C
4.11.4

pgformatter
bra
1.18.0

vscode-eslint
dba
2.2.6

xml
Dot
2.5.1

gitlens
eam
12.1.2

EditorConfig
Edi
0.16.4

prettier-vscode
esb
9.5.0

haskell
has
2.2.0

Ionide-fsharp
Ion
7.0.0

language-haskell
jus
3.6.0

theme-karyfoundation-themes
kar
27.2.3

vscode-docker
ms-
1.22.1

csharp
ms-
1.25.0

python
ms-
2022.10.1

jupyter
ms-
2022.6.1201981810

jupyter-keymap
ms-
1.0.0

jupyter-renderers
ms-
1.0.9

remote-containers
ms-
0.241.3

vscode-typescript-tslint-plugin
ms-
1.3.4

vsliveshare
ms-
1.0.5663

sqltools
mtx
0.23.0

vscode-xml
red
0.21.2022062916

vscode-yaml
red
1.9.1

synthwave-vscode
Rob
0.1.11

rust
rus
0.7.8

jinjahtml
sam
0.17.0

vscode-fileutils
sle
3.5.0

ayu
tea
1.0.5

shellcheck
tim
0.19.6

vim
vsc
1.23.1

(9 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vscaac:30438847
pylanb8912:30529769
vsclangdc:30486549

Ah yeah, forgot to mention. It was working for a while when I was trying to include the JS file into my backend tsconfig.json include files. However that didn't work because I need to make some changes for the frontend JS file (eg. add dom to lib).
But even in that case "JavaScript: Go To Project Configuration" was not able to figure out that the file was actually part of a TS project.

Finally figured out a workaround. I moved the tsconfig.frontend.json file above into assets/scripts/jsconfig.json.

Except that was no good either. I think what happens is jsconfig.json implicitly sets allowJs to true. Some index.d.ts files that get looked up may require some module that doesn't have a @types/module_name package available. Then because of allowJs tsc starts checking those very old JS files for errors and reports something I don't care about.

If "JavaScript: Go To Project Configuration" doesn't think the file is part of a project, checkJS won't be enabled in the editor
This is likely not a bug but a question about how to structure your project. Can you share a minimal project that demonstrates this issue?

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


examples: fix URL in build_report

URLs have changed in SQUAD 1.14 and this patch reflects new URLs
Signed-off-by: Milosz Wasilewski<EMAIL_ADDRESS>

LGTM.


Mock available contentTypes to make test run as it should

Coverage increased (+0.06%) to 93.601% when pulling 89029aecac53ef12a96536411d04ac3178d509d0 on dopesong:abstract-handler-phpunit into fd0228637e75bb9411a16dc170e40cb3c9c9b7c8 on slimphp:3.x.


is this umodel error?

Loading Texture2D eyepet_ball from package eyepet_ball.uasset
WARNING: StructProperty "UTexture2D::AlphaCoverageThresholds" was not found
Skipping SourceArt: TSF_BGRA8, NumMips=1, Slices=1, PNGCompressed=1
******** eyepet_ball.uasset:  Texture2D'eyepet_ball' ********
*** Unknown texture format: PF_Unknown (0)
WARNING: Texture2D eyepet_ball has no valid mipmaps

Hi all,
im really new at UE4 and try my first skills here, for a newby its a nice tool but for this error i cant find a solition
i have created a PNG (did try with TGA, same error), imported it to my project and saved,
after this opened UMODEL tool and did a check for my new created texture,
and i got this error,
duno why UMODEL show me PF_Unknown, on UE4 it shows PF_DXT5
is something wrong with compiler or UMODEL tool is buggy?
cya
uragan

Hi
In UE4 DXT5 texture is stored in DerivedDataCache. Inside uasset, only PNG-compressed texture is stored. When you'll cook your project, DXT texture will go from DDC to uasset, replacing PNG texture.

wow you are really fast 👍
will be nice to get this on error message
"Texture is not cooked"


Internal console

#28

This looks good for me.

Use the '~` key not show output window now, Use shift+'~' to show output (Call of Duty style)
And the consolas unicode is intergated now(But the exe size is incrased)

Sorry, I didn't mean to close it

have you done any changes to imgui?

have you done any changes to imgui?

Yep, Check ImFont::RenderText of imgui_draw.cpp, I did some change to get ImGui rendering colored font using ^1 ^2 ^3 ^4 etc.

@Ochii Please add this, Too lazy to make a commit, Just disable gameinput while console enabled to avoid some issue:
#include "tier2/tier2.h"
#include "inputsystem/iinputsystem.h"

void GameConsole::ToggleConsole( bool extend )
{
// ...
    // Disable gameinput while console enabled
    g_pInputSystem->EnableInput(!m_bShowConsole);
// ...
}


Fix logger using in tests

Fix conflicts #52 and #53 (both are mine...)

Contribution License Agreement

[x] By placing an "x" in the box, I hereby understand, accept and agree to be bound by the terms and conditions of the Contribution License Agreement.

Plz change label to "chore"


Add AAS Part 2 / API Model Classes

Solves #15

Same problem as with #159, this PR needs to be rebased first.

Solves also #175

@mjacoby I think we have our stuff together. Please have a look again!
(Big thanks to @emildinchev for your work!)

Hi @mjacoby, @sebbader-sap,

About the JsonSerializer and JsonDeserializer classes: we will be able completely to remove them and use the JsonMapper created by JsonMapperFactory, if we agree to remove the custom deserialization provided by JsonDeserializer::useImplementation(...) method. If this is not possible, then I agree with the proposal of Michael to go with generic methods only.
I have removed all mixins that has not influence to to the tests. I have removed the serialization of all empty list and null values, because I thought that this corresponds to the required statement in the JSON schema. If you think that this is wrong, I will restore the mixins with (@JsonInclude) annotations.
I will check for SAP copyright.
I agree to have one test class per class to be tested instead of multiple test classes testing the same class.
Please give me feedback about topics 1 and 2.

The capability to tell the deserializer to use a certain class for deserialization is a quite important feature that we need to keep. However, there might be other ways to achieve this which that might not require having custom deserializer class. I would actually prefer if we could find a way to make this work with a few lines of code and/or some helper method instead of the own deserializer class.
After thinking about it I guess you might be right because removing the @JsonIgnore mixins probably only causes issues when serializing a model that is not valid in the first place, e.g. because a mandatory property is null. I am not sure if we should still keep the old behavior as it might be useful in some cases, e.g. image the scenario where you use AAS4J to create a model that is invalid because it is missing a mandatory property (which is allowed as our paradigm is to allow creation of invalid model instances and only check their validity upon explicit call to a validator class) and you want to serialize this model to JSON to load it into another tool for modelling. With your changes this will probably create JSON that does not match the JSON schema and other tools might reject or fail to parse it for that reason. When keeping the the old @JsonIgnore mixins, this would result in JSON that is compliant with the JSON schema - although that would not be a guarantee that another software could import that JSON file without problems.
So I am unsure what to do...personally, I do not see harm in keeping thing as they were which makes AAS4J a little more robust. What do you think @sebbader-sap @FrankSchnicke ?
Please see the corresponding review comments such as (incomplete list) #1, #2, #3
Typically this is not checking if the actual test result equals the expected one but only checks some sub-conditions like jsonNode.has("xy") instead of checking the complete returned JSON.

About the required properties in the JSON schema and the mixins:
A mixin cannot make a given object valid.
In case of arrays, we can just add to the JSON schema:
"minItems": 1

Keeping your example, my thinking was that if we serialize an identifiable without having the annotation results in something like this
{
	"someOtherProperty": ...
	// id not serialized at all
}

while with the annotation it would probably result in
{
	"someOtherProperty": ...,
	"id": null
}

The difference is, that the first one probably is not valid according to the JSON schema while the second one is (although it is still not a valid model because the id is null).
I am no expert on JSON schema and did not manually check if this actually is true and behaves the way I described so if I am wrong please correct me. If not I think there is a subtle difference between the two approaches as there is a difference between the model being invalid and the JSON serialization being not compliant to the schema.

In case of arrays, we can just add to the JSON schema:
"minItems": 1

The schema is not managed by us and it would take a lot of time and effort to try to get this change into the official specification. Therefore, this is not a short-term solution.

Removing all these mixins would drastically reduce the amount of code that we have to maintain. Nevertheless, always creating a schema-conforming JSON also has its merits.
In both cases, the resulting JSON would represent an invalid model due to wrong user input. However, I can imagine that a JSON that is not correct from a constraint perspective but conforming to the schema ("id": null) is preferable to a JSON that is not conforming to the schema at all. The latter choice will most likely crash tooling or lead to errors while the former one will most likely be processable in some way.
Thus, I would vote for keeping the mixins to ensure that at least the json structure is correct.

@mjacoby, @sebbader-sap, @FrankSchnicke,
The PR is ready for a new review.

@emildinchev just letting you know that I finished review

@mjacoby Ready


TDTM does not respect namespacing on objects & fields

Feature or bug?
Bug
What is the current behavior?
If a user has an object and EDA introduces TDTM for its own object with the same name as the end users object it will cause an error. Users are forced to turn off EDA's TDTM record or migrate to EDA's object
What is the expected behavior?
TDTM should be able to recognize that Object_Name_c is different from hed_Object_Name_c and when EDA introduces
What is the motivation / use case for changing the behavior?
TDTM should be able to respect namespacing on objects & fields
Steps to reproduce:

Create a Custom Object that EDA already provides (ex: Application_Custom_Object__c)
Create a Custom Trigger for the Custom Object (ex: TDTM_Application_Custom_Object_Trigger)
Interact with the Custom Object to fire the Custom Trigger
Notice that EDA's TDTM specific Trigger for that object (ex: TDTM_Application) is unable to differentiate between the HED TDTM framework and the custom Trigger.

Work Around (using the example above):
Users will need to turn off EDA's TDTM record or Migrate to EDA's object

Tracking W-9667534

Never-ing. This is how the platform works. I believe we've documented it.


toBlob# and toBase64# fails on node.js

toBlob# calls new Blob# which is unavailable on node.js. This causes these two functions to fail.

#toBlob is a browser-only function since, as you noted, Blob does not exist in Node.js. Rather than trying to implement a special case, like creating a buffer if Blob is not detected, it might be better to note this in the docs and alert the user as an error (via console.error()?).
#toBase64, however, should definitely be implemented for Node.js. I'll take some time later to implement this. Or if you have some time to submit a PR, the help is welcomed. 😄

v0.10.0 published to NPM. Thanks again! 👍


Transparent Background for Images read from Blob

Like in issue #580 for read from file - setting the background to transparent is needed when reading SVG from Blob to avoid a white backround

Thanks


When I used bottomNavigationBar + IndexedStack with PageTransitionSwitcher, I tried to save the state of each page, which caused PageTransitionSwitcher to lose the animation effect.

When I used bottomNavigationBar + IndexedStack with PageTransitionSwitcher, I tried to save the state of each page, which caused PageTransitionSwitcher to lose the animation effect.
here is the code
List<Widget> _navPageList = [PageA(), PageB(), PageC()];

return Scaffold(
      body: PageTransitionSwitcher(
        transitionBuilder: (
          Widget child,
          Animation<double> animation,
          Animation<double> secondaryAnimation,
        ) {
          return FadeThroughTransition(
            animation: animation,
            secondaryAnimation: secondaryAnimation,
            child: child,
          );
        },
        child: IndexedStack(
          index: _navIndex,
          children: _navPageList,
        ),
      ),
      bottomNavigationBar: BottomNavigationBar(
        onTap: didTapBottomItem,
        currentIndex: _navIndex,
        items: _items,
      ),
    );

@FieeA
Please provide flutter doctor -v and a minimal complete reproducible code sample that shows the issue.
Thanks.

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G2021, locale zh-Hans-CN)
• Flutter version 1.17.5 at /Users/imac/Desktop/flutter
• Framework revision 8af6b2f038 (4 months ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/imac/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0, Build version 12A7209
• CocoaPods version 1.8.4
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.50.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.13.2

class NavigationPage extends StatefulWidget {
@override
_NavigationPageState createState() => _NavigationPageState();
}
class _NavigationPageState extends State {
List _items = [
BottomNavigationBarItem(
title: Text('PageA'),
icon: Icon(Icons.business),
),
BottomNavigationBarItem(
title: Text('PageB'),
icon: Icon(Icons.colorize),
),
BottomNavigationBarItem(
title: Text('PageC'),
icon: Icon(Icons.person),
),
];
List _navPageList = [PageA(), PageB(), PageC()];
int _navIndex = 0;
didTapBottomItem(int index) {
setState(() {
_navIndex = index;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: PageTransitionSwitcher(
transitionBuilder: (
Widget child,
Animation animation,
Animation secondaryAnimation,
) {
return FadeThroughTransition(
animation: animation,
secondaryAnimation: secondaryAnimation,
child: child,
);
},
child: IndexedStack(
index: _navIndex,
children: _navPageList,
),
),
bottomNavigationBar: BottomNavigationBar(
onTap: didTapBottomItem,
currentIndex: _navIndex,
items: _items,
),
);
}
}

I usually use BottomNavigationBar + IndexedStack to implement the bottom navigation bar and maintain the state, but when I nest PageTransitionSwitcher outside of IndexedStack, its animation effect is invalid.
thanks!

@FieeA
You seem to be on older version of Flutter. Please upgrade to latest stable (1.22.3) and try again to see if you still experience the issue.
Thanks.

I update my flutter version to 1.22.3 , but it still doesent work. Whether PageTransitionSwitcher does not support keepalive of single pages in the bottom navigation bar?

@FieeA
You seem to be using a third party plugin for PageTransitionSwitcher and FadeThroughTransition. Can you remove the relevant plugin code and use Flutter's core animation transitions to see if you get similar behavior ? If so, please provide the updated code sample.
Thanks.

after all i tried,i decide not use this plugin,anyway thank you very much for your reply


Update CometBFT to v0.38.x

We've been using the v0.37.x release series of CometBFT since 2023-10 (#4021). We don't yet have compatibility with CometBFT v0.38.x, which implements full support for ABCI++, and requires our app code to add support for VoteExtensions. This issue to track priority of that upgrade.
Prereqs

[ ] Support VoteExtensions in ABCI++
[ ] Support FinalizeBlock - https://github.com/penumbra-zone/penumbra/issues/4095

The current version of CometBFT required for Penumbra, v0.37.x, was recently downgraded to high-security updates only, as of 2024-10-01. By EOY it'll be fully EOL. For reference see this calendar of schedule:

We should investigate what's required for to change versions. For instance, do the code changes required require a chain upgrade? Or can existing nodes just upgrade-in-place?


fix: Extra brace in Azure Files link

@nschonni : Thanks for your contribution! The author, @jasonwhowell, has been notified to review your proposed change.

Thanks @nschonni for the fix. #sign-off


Update Embed.swift with Embedded Map

Embedded Maps are simple enough to use Embed Element whereas more complex maps will have their own element with differing parameters.

Let's focus on getting the Map working well. Once that API lands, I think a convenience initializer for Map would work better than Embed, to keep things nice and clear.


Improvements in space_ops functions

Changelog / Overview

Rewrite :func:get_norm to directly use np.linalg.norm
Rewrite :func:cross to directly use np.cross
Rewrite :func:norm_squared to use a numpy dot product
Rewrite :func:angle_between_vectors to use a more numerically stable method
Deprecated :func:angle_between as it duplicates the functionality of :func:angle_between_vectors and isn't used anywhere

Motivation
While rewriting put_start_and_end_on to work in 3D, I encountered weird numerical errors in angle_between_vectors which made working with almost (anti-)parallel vectors unreliable, with that function returning NaN pretty frequently. This PR rewrites that function to use a more numerically stable approach. I also rewrite some other functions to directly use the numpy result, rather than reinventing the wheel.
Explanation for Changes

Testing Status
Tests pass in CI.
Further Comments

Checklist

[x] I have read the Contributing Guidelines
[x] I have written a descriptive PR title (see top of PR template for examples)
[x] I have written a changelog entry for the PR or deem it unnecessary
[ ] My new functions/classes either have a docstring or are private
[ ] My new functions/classes have tests added and (optional) examples in the docs
[ ] My new documentation builds, looks correctly formatted, and adds no additional build warnings

Reviewer Checklist

[ ] The PR title is descriptive enough
[ ] The PR is labeled correctly
[ ] The changelog entry is completed if necessary
[ ] Newly added functions/classes either have a docstring or are private
[ ] Newly added functions/classes have tests added and (optional) examples in the docs
[ ] Newly added documentation builds, looks correctly formatted, and adds no additional build warnings

It's best if we deprecate angle_between before fully removing it.

It seems like the changes in this branch cause the following scene to render non-deterministically, for some reason:
class MovingVertices(ThreeDScene):
    def construct(self):
        self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
        vertices = [1, 2, 3, 4]
        edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]
        g = Graph(vertices, edges)
        self.play(Create(g))
        self.wait()

I installed this branch on Colab and also got the non-deterministic errors, so it's not just my system.
I genuinely have no idea why this is the case, any ideas?

At the point where some of the utility functions are only a single line it'd be better just to replace the call sites with the implementation.

At the point where some of the utility functions are only a single line it'd be better just to replace the call sites with the implementation.

I can do it, but is there general agreement for this?

It's best if we deprecate angle_between before fully removing it.

Done.

At the point where some of the utility functions are only a single line it'd be better just to replace the call sites with the implementation.

I can do it, but is there general agreement for this?

I strongly agree. Fewer functions to worry about regarding testing and documentation is an excellent idea. +1 for deprecating all of the functions that just directly call numpy in space_ops.

Should I do import numpy as np and call the functions like np.cross and np.linalg.dot? Or should I specifically import those functions (from numpy import cross, from numpy.linalg import dot)? I'm leaning towards the second, but I would like to know before I begin refactoring because there's a lot of places these functions are used and I don't know of an automated way to replace them (simple find and replace won't work because it doesn't automatically sort the imports).

Should I do import numpy as np and call the functions like np.cross and np.linalg.dot? Or should I specifically import those functions (from numpy import cross, from numpy.linalg import dot)? I'm leaning towards the second, but I would like to know before I begin refactoring because there's a lot of places these functions are used and I don't know of an automated way to replace them (simple find and replace won't work because it doesn't automatically sort the imports).

I'd prefer an explicit import numpy as np and usage of np.X in our library code as this will not introduce namespace/variable name conflicts. We may already have variables named dot/cross/norm/etc. in our library code and doing from numpy.linalg import dot as dot_ doesn't seem like a good solution.


Merge dev into service

This needs to be merged, not squashed, so that we can maintain branch history correctly. Once it's approved, I'll enable that form of merge and handle it.


Rename libstd.so to libruststd.so

This is a file we will be installing in /usr/lib. Simply calling it 'std' is not very nice. The crate can still be named 'std' - it will just have a friendlier file name.

Hi lht.
Thanks for investigating this. I agree that is hackish. The obstacle here is that we're interpreting the filename as crate metadata; in other words, when looking for a crate named 'foo', we expect it to be in a file named 'libfoo.so'. In all other respects we treat the crate metadata as actual metadata.
I think what we should try is to completely separate these two concepts, so the crate metadata is independent of the library name.
So in find_library_crate_aux the first sanity check we do is look for a library containing the crate_name. Instead I think this function should just verify that the file looks like a library, e.g. lib*.so on linux, etc. then inspect the metadata to check the crate name.
The thing you are going to run into is that the current code handles the case where the 'use' statement doesn't specify any metadata. In find_library_crate, when it's building the crate_name it uses either the 'name' meta-item, as in use std(name = "std");, or it falls back to the identifier used in the 'use' statement, as in use std;. If we were to just match the matadata in the library with the metadata provided in the use statement, then this would match any library to any use statement that doesn't explicitly specify metadata (so 'use std;' would end up matching libfoo.so).
To remedy this we'll need to implicitly create a "name"=val meta-item when the use statement doesn't provide one and match the library metadata against that.
This approach does pose a performance risk since we will end up opening every library on the search path. I suspect that this won't be an immediate problem since our default search paths are in rustc-specific directories; we're not searching /usr/lib. Nonetheless, we should probably time a full run of 'make check' both before and after this change to make sure there isn't a serious regression.
I checked in some additional logging to creader that might help debugging.
I hope that all made sense.

Hi, Brian! Thanks a lot of such a thorough explanation! And I learnt using log fmt to help understand the code. Very useful! :)
$ git log --oneline -n 2
69e4ba4 Rename libstd.so to libruststd.so
28bec1d rustc: Find crates by matching the name metadata
I see some slow down after the commit.
before:1m18.574s
after:	  1m18.832s
This only run single time, and there are 2 failed cases since commit 2cebef0.
failures:
io::buffered_file_buf_writer_bad_name
io::file_buf_writer_bad_name
I wonder is there a simple way to just compile tests but not running them?

Looks good! I compared the time for a full 'make check' before and after your patch and don't see a regression, so that's ok.
Merging this is going to require some temporary makefile tweaks and a new snapshot since the stage0 compiler is still using the old rules to find libstd.so (try doing a make clean then building and you'll see the stage0 compiler can't find the standard library with the new name). I will work on that and try to get this merged on Monday.
Which OS are you running on? None of the bots show those build failures. There's no way currently to compile the tests without running them.

I found there is actually a "/?" file exists. That's because I forgot to change owner of the root directory to "root" after migrating data from Btrfs to Ext4 months ago. Fix it and now all cases are passed.
Sorry for the false alarm!

Oh. Those tests are pretty bad then, since they will fail when running as root.

OK. This is integrated. Thanks, lht.


Opensearch metadata_field and metadata_filter not working

System Info
langchain version = 0.0.281
python =  3.11
opensearch-py = 2.3.0
Who can help?
No response
Information

[ ] The official example notebooks/scripts
[X] My own modified scripts

Related Components

[X] LLMs/Chat Models
[X] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[X] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[ ] Callbacks/Tracing
[ ] Async

Reproduction
I am trying to do metadata based filtering alongside the query execution using OpensearchVectorSearch.similarity_search(). But when I use metadata_field and metadata_filter, the search doesn't seems to take that into account and still returns results outside of those filters.
Here is myr code:
response = es.similarity_search( query = "<sample query text>", K =4, metadata_field = "title", metadata_filter = {"match":{"title": "<sample doc title>}}, )
Here es is the OpenSearchVectorSearch object for index1
The output structure is like this:
[Document(page_content = ' ', metadata={'vector_field' : [], 'text' : ' ', 'metadata' : {'source' : ' ', 'title' : ' ' }})]
Here the title I see is not the title I specified in my query.
Steps to reproduce:

Create an Opensearch index with multiple documents.
Run similarity_search() query with a metadata_field and/or metadata_filter

Expected behavior
The query should be run against the specified metadata_field and metadata_filter and in output, I should only see the correct document name I specified in metadata_field and metadata_filter

So, if I want to execute my query against a set of documents in my index and not all the documents, how would I go about executing that query using the metadata_field parameter in max_marginal_relevance_search() ? Is this supported through OpensearchVectorSearch? assume that the metadata_field is named title and value of title is present in a list.

🤖
Hello,
Thank you for bringing this issue to our attention. Based on the information you've provided and the context from the LangChain repository, it appears that the similarity_search() function in the OpenSearchVectorSearch class of LangChain does not directly handle the metadata_field and metadata_filter parameters. These parameters are not mentioned in the function's signature or its body.
However, the metadata_field parameter is used in the max_marginal_relevance_search() function of the same class. This function uses metadata_field to access the metadata of the search results. The metadata_filter parameter is not used in any of the provided code.
Therefore, if you're trying to use metadata_field and metadata_filter parameters with the similarity_search() function, it might not work as expected because these parameters are not handled within this function.
As for your question about any changes or updates in the similarity_search() function from version 0.0.281 to the latest version (v0.0.287), I wasn't able to find any specific changes related to this function in the repository. However, it's possible that there might be changes or updates that I might have missed.
I hope this information helps. If you have any further questions or need additional clarification, please don't hesitate to ask.
Sources

libs/langchain/langchain/vectorstores/chroma.py
libs/langchain/langchain/vectorstores/faiss.py
libs/langchain/langchain/vectorstores/annoy.py
libs/langchain/langchain/vectorstores/mongodb_atlas.py
libs/langchain/langchain/vectorstores/opensearch_vector_search.py

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.

So, if I want to execute my query against a set of documents in my index and not all the documents, how would I go about executing that query using the metadata_field parameter in max_marginal_relevance_search() ? Is this supported through OpensearchVectorSearch? assume that the metadata_field is named title and value of title is present in a list.

Hi @abhinavmishra05
Were you able to fix this?
I'm having the same issue, I want to filter out the documents on the basis of metadata. This functionality is available in case of PGVector but I think it's not available for OpenSearch.

It's still unclear if this is fixed.  When I try to run a query with a filter:
filter = {"bool": {"filter": {"match": {"metadata.section_title": "<filter>"}}}}

vectorstore.similarity_search(
    "<query>",
    k=5,
    pre_filter=filter,
)

The filter is completely ignored.

It's still unclear if this is fixed. When I try to run a query with a filter:
filter = {"bool": {"filter": {"match": {"metadata.section_title": "<filter>"}}}}

vectorstore.similarity_search(
    "<query>",
    k=5,
    pre_filter=filter,
)

The filter is completely ignored.

use:
boolean_filter=filter


Postpone StickyMessages cleanup to outside of finalizer

IO cannot be done from within the finalizer. Also add a test for empty!() which wasn't tested.
Fixes #6

Codecov Report

Merging #7 into master will increase coverage by 3.29%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
+ Coverage    94.4%   97.69%   +3.29%
==========================================
  Files           3        3
  Lines         125      130       +5
==========================================
+ Hits          118      127       +9
+ Misses          7        3       -4

Impacted Files
Coverage Δ

src/StickyMessages.jl
100% <100%> (+7.69%)
:arrow_up:

Continue to review full report at Codecov.

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


The pain of maintaining a polymer app

Some things I found while building on starter kit

bower with its "questions" really raises the question if components still work.
the community is not so fast. Maybe a little more tooling would help.
starter kit takes all the elements, maybe introduce users to a little more choices. Selecting and installing just a part of the components is not so common. The general polymer world has some x megabyte repos in terms of dependencies for one element. Is that necessary, or just a result of development docs saying so?
starter kit installs the test toolchain multiple times. that takes time
To upgrade a old application the best way seems to reinstall all modules via bower. Using the offcial bower repo was my choice! Not using the direct git urls anymore.

I came from pre 1.0 and now is 1.6.0. Updating takes a lot of effort. I know a lot of these issues are with 3rd party modules. But maybe have a closer look at some elements that are reularly used and re-used and maybe support these a little more. Maybe a kind of validator and wizard can help generate the right pull requests for these. Online and connected to github.
In a nutshell.
Please,

make starter kit a little leaner and teach users to build small
help upgrades with even more tooling. Non Module authors must be able to shortcircuit a dead component a little better.
try reduce the pain form quirky bower installs please

Moved to https://github.com/PolymerElements/polymer-starter-kit/issues/858


Improve the AzureConnection in a number of ways (details inside)

This pull request comprises four commits that individually improve the Azure connection.
b6aaf6a755ceb3e94c655b9f1ec9ec13a3a36d9d - Azure: rewrite user input handler
This commit replaces the AzureConnection's input handler with one that
acts more like "getline()". Instead of the Read thread setting a state
and WriteInput filling in the right member variable, the reader blocks
on the user's input and receives it in an optional.
This moves the input number parsing and error case handling closer to
the point where those inputs are used, as opposed to where they're
collected.
It also switches our input to be "line-based", which is a huge boon for
typing tenant numbers >9. This fixes #3233. A simple line editor
(supporting only backspace and CR) is included.
It also enables echo on user input, and prints it in a nice pretty green
color.
It also enables input queueing: if the user types anything before the
connection is established, it'll be sent once it is.
Fixes #3233.
e10dec7f - Azure: display the user's options and additional information in color
This commit colorizes parts of the AzCon's strings that include "user
options" -- things the user can type -- in yellow. This is to help with
accessibility.
The implementation here is based on a discussion with the team.
Alternative options for coloration were investigated, such as:

Embedding escape sequences in the resource file.
This would have been confusing for translators.
The RESW file format doesn't support  escapes, so we would need
some magic post-processing.
Embedding "markup" in the resource file (like #{93m}, ...)
This still would have been annoying for translators.

We settled on an implementation that takes resource names, colorizes
them, and string-formats them into other resources.
0dd87454ff2c7d6f007fadb480d0bd8cc24dd3e6 - Azure: follow the user's shell choice from the online portal
Fixes #2266.
5bfff2b122ae900b - Azure: remove all credentials instead of just the first one
just a silly bug.


Rebalancing Blue Jade - Is necessary? If yes, how?

There are two ways to analyze Blue Jade: as a Relic that gives more power and that's it, or as a balanced relic, that offers an experience and a challenge.

As a Relic that gives more power, it should just give the three relics and that's it. (and I'm not entering at the refactoring and changes that Spiky Bracers has to pass by).
As a Relic that should be a challenge...

Maybe we could do both, and have a modifier that interacts directly with the other modifiers.
Anyway, as a challenge:

Remove the Starting Relic, it's a not needed boost.
Change MAX HP % to 60%.

Let's start here and see what happens.

Ideas:

Relics from the character substitutes the first equivalent in rarity as a reward.
One specific relic per Act.

Conclusion: better to leave the balancing to the player, and give him tools for it.


Add a nonce to transactions

Transactions are currently indexed for up to 60 seconds (after which they expire) to prevent double spend attacks. Depending on time has pitfalls that may even open up a double spend attack.

Timer fails to delete the tx from the index the index will become bloated
Timer deletes the tx too soon, a double spend attack will become viable

The nonce is a counter based on the number of transactions an account has made. During consensus, the numbers must match exactly to prevent a double spend or other invariances. If an account has made 2 transactions, then the expected nonce is 3.
Reward transactions are special in that their nonce should always be 0 as these transactions are generated by the blockchain.
By using a nonce, indexing the entire tx will no longer be necessary, which is lighter on storage space utilized. Preventing a double spend is guaranteed and non-dependent on system time to enforce this variant.

The benefits of time based tracking outweighs the nonce tracking system and has been implemented. A different strategy is used to avoid the pitfalls mentioned above.


FIX local command flag added to example

As discussed in Slack, just a simple fix in the getting started page. The user is running locally, so you need the --local flag in the example command, just like all the others are on the page, to allow it to run without error.
- Now try running `converge plan helloYou.hcl`. The same thing happens as if you had called the module yourself!
+ Now try running `converge plan --local helloYou.hcl`. The same thing happens as if you had called the module yourself!

Thanks @philcryer!


Claim "aud" is filled with client-id, but should be list of allowed resource servers

I'm trying to migrate deprecated spring oauth server to this new one. I miss field "resource_servers" on registered client.
I would expect audience claim in JWT to be a list of allowed resource servers, but now it is filled with client-id.
According to RFC 7519:
The "aud" (audience) claim identifies the recipients that the JWT is intended for. Each principal intended to process the JWT MUST identify itself with a value in the audience claim. If the principal processing the claim does not identify itself with a value in the "aud" claim when this claim is present, then the JWT MUST be rejected. In the general case, the "aud" value is an array of case- sensitive strings, each containing a StringOrURI value. In the special case when the JWT has one audience, the "aud" value MAY be a single case-sensitive string containing a StringOrURI value. The interpretation of audience values is generally application specific. Use of this claim is OPTIONAL.

@kubav182

I would expect audience claim in JWT to be a list of allowed resource servers, but now it is filled with client-id.

The client is the "intended" audience of the access token, since the authorization server mints the access token for use by the client.
To add additional audience(s) to aud claim, the application needs to customize the Jwt. This can be accomplished by registering a @Bean of type OAuth2TokenCustomizer.
Please see this
comment for additional details.

@jgrandja Thanks for your reply, I have already implemented as you mentioned via OAuth2TokenCustomizer. I'm ok with custom solution.

The client is the "intended" audience of the access token, since the authorization server mints the access token for use by the client.

This has two conditions. The client == resource server && the client can call just only itself. I'm not sure if most of the real use cases fit this. Thats why i thought the lib should have better support for the audience claim as it is not the name of client, but the name of resource server the client wants to call and it is not the client id in really many cases (microservices, SPA, SSO).

@kubav182. Totally agree with you, I´m also trying to migrate to the newest spring versions and there´s no "easy" way to set the audience claims.

@lojc there is snippet of code as example, its not hard, but would be better if library comply with the RFC and real use cases, this RFC and claim aud is misunderstood, maybe they're confusing it with client_id claim.
@Bean
 OAuth2TokenCustomizer<JwtEncodingContext> tokenCustomizer() {
        return context -> {
            Authentication principal = context.getPrincipal();
            if (OAuth2TokenType.ACCESS_TOKEN.equals(context.getTokenType())) {
                // check principal and set audience from config or db
                context.getClaims().audience(List.of("ms1", "ms2"));
            }
        };
 }

@kubav182 It depends on the flow (and associated parameters) that is performed that determines what goes into the aud claim.

I would expect audience claim in JWT to be a list of allowed resource servers

That is true if the resource parameter is sent, which is part of the Resource Indicators for OAuth 2.0 spec. However, this feature has not been implemented by Spring Authorization Server.
The client_id is a sensible default for the aud claim. If you need to override it then you can register a OAuth2TokenCustomizer, which is fairly easy.


heimdall: Odin protocol version 4 support

I investigated with Odin3 and wireshark to see the differences. Odin versions 3.12.xx sent version 3, and the newer ones send version 4. This is needed for S8/S8+ american variants it seems.
Heimdall thus far did not send version number at all.

This is successfully tested with S6 and upwards, different models.

I updated the pull request, I'm not sure if I did it properly though.

@Blefish Thanks for this.
Before I merge I'll have to find some time to dust off all my old Samsung devices (pre S6) and see how this affects them. Also have an S8 on hand so will test there as well.

Sounds good to me, I would like to know if if actually fixes the problem for someone else as well, because this commit is from december and I used older Heimdall version to base this on originally.

I'll bite. I'm seeing a successful (?) output from heimdall:
Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...
Initialising protocol...
Protocol initialisation successful.
Beginning session...
Releasing device interface...
But I get the error "Odin protocol version error" on the S7 I'm working with.
If I can get the updated version for Linux (I don't know how to build from source) I'll give it a try.

@swedishjeff about linux build, see Linux/README at the very end.

This fix worked for me also. Why it doesn't accepted?
Percentage fix: https://github.com/fftmp/Heimdall/commit/04e8eb6f62dd967a75de9a95afa6558131eafa2d

This fix worked for me as well on a Samsung S7.

This fix doesn't work for me:
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
ERROR: Protocol initialisation failed!

Releasing device interface...


.ToString() in  Lambda Query for Collection.Find()

I have a collection items when i query using a lambda expression with a .ToString() it cause an exception. For example:
 var y = items.Find(x => x.Year.ToString() == "1993");   // Year is int
The exception is : "Property 'Year.ToString(' was not mapped into BsonDocument"

Hi @MoamenMohamed, there is not index functions supports. If you want create an index based on a function returns, create a field like this:
public string YearString { get { return this.Year.ToString(); } }

And than use as items.Find(x => x.YearString == "1993")

Thanks, that is exactly what i did.

Just to know, next version will support virtual function field in BsonMapper, some like this:
db.Entity<Customer>().Index("year-fn", (b) => b.Year.ToString());
So, you query will be: items.Find("year-fn", "1993")

That is great, I really love using LiteDB.


Add Avro loader

Add Avro Data Loader and its example.

We shall update the website docs on the Avro support later.


[2.5] Fix for machine_cpu_cores being removed from cadvisor metrics

Backport of https://github.com/rancher/rancher/pull/29860 to 2.5.x.
Related Issue: https://github.com/rancher/rancher/issues/29292

Closing in favor of https://github.com/rancher/rancher/pull/30339.