Build .d.ts declaration files, comments are lost and duplicates are generated.

Describe the bug
When I try to use vite-plugin-dts to build the .d.ts declaration file of the lib.
In the final result, my props and emits comments are lost.
In the Demo, you can intuitively see that there are no comments in the icon.d.ts file.
I suspect the error is because I define the props and emits objects in separate files, which is why the comments are lost.
So I tried to put props and emits definitions in the same file in the ContextMenu.tsx component.
In the Demo, you can intuitively see that there are comments in the contextMenu.d.ts file.
Maybe I think this is a bug. It's vite-plugin-dts that doesn't handle this situation well.
And there is another problem. I must have defined the icon.tsx component and also exported it by default in the file.
But in the root directory of the Icon component, I placed an index.ts file, which references the ./src/icon(.tsx) file to export and install the component name.
However, in the final index.d.ts file, it seems that the declaration of the icon.d.ts file is regenerated by default.
I think this effect did not meet my expectations.
Regarding the expectations of comments, I hope that no matter how I define these variables, I can include these comment information in the final .d.ts declaration file. Similar to
import { PropType } from 'vue';
import { GContextMenuData, GContextMenuStates } from './type';

/**
 * GContextMenu 组件
 */
declare const _default: import('vue').DefineComponent<{
    /**
     * 数据
     */
    data: {
        type: PropType<GContextMenuData[]>;
        default: any[];
    };
}, {
    states: GContextMenuStates;
    contextMenuRef: import('vue').Ref<HTMLElement>;
    open: (axis?: {
        x: number;
        y: number;
    }) => void;
    close: () => void;
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
    /**
     * 点击事件
     */
    click: (event: MouseEvent, data: GContextMenuData) => boolean;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
    /**
     * 数据
     */
    data: {
        type: PropType<GContextMenuData[]>;
        default: any[];
    };
}>> & {
    onClick?: (event: MouseEvent, data: GContextMenuData) => any;
}, {
    data: GContextMenuData[];
}, {}>;
export default _default;

The expectation for the second question is actually optional. It just increases the file size after my lib mode packaging. However, it still needs to include comment information. The best expectation should be
import { ExtractPropTypes } from 'vue';
import { gIconProps } from './src/define';
import { default as Icon } from './src/icon';

export declare const GIcon: import('../../utils/vue/typescript').TSXWithInstall<typeof Icon>;
export default GIcon;
export * from './src/define';
export * from './src/type';
export type GIconInstance = InstanceType<typeof Icon>;
export type GIconProps = ExtractPropTypes<typeof gIconProps>;

Reproduction
https://stackblitz.com/edit/vite-build-dts-error-240823
Steps to reproduce
Run npm install followed by npm run build
System Info
System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700
    Memory: 11.95 GB / 31.79 GB
  Binaries:
    Node: 20.15.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.5.0 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @vitejs/plugin-vue: ^5.0.5 => 5.1.2
    @vitejs/plugin-vue-jsx: ^4.0.0 => 4.0.1
    vite: ^5.3.2 => 5.4.2
    vite-plugin-dts: ^3.9.1 => 3.9.1

Validations

[X] Read the FAQ.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] The provided reproduction is a minimal reproducible example of the bug.

Sadly, this is a limitation of Volar.

Sadly, this is a limitation of Volar.

Volar? But I thought Volar shouldn't be just a plugin for an IDE? Are there any limitations on the declaration files it generates?

You can use vue-tsc to generate the declaration files and see the limitation.

You can use vue-tsc to generate the declaration files and see the limitation.

I understand, because I tried it with vue-tsc and it did have the same effect, but there was no comment.
Would it be more convenient if we could communicate in Chinese?

@Shinigami92 Sure.

This is a problem in DefineComponent type. I don't have the energy to investigate at the moment. If anyone wants to deal with it, you can refer to my past PR:

https://github.com/vuejs/core/pull/5166
https://github.com/vuejs/core/pull/5871
https://github.com/vuejs/core/pull/11799

Looks like all 3 linked PRs are solved and merged. Is there something that needs to be done here? Or can the issue just get closed?

This is a problem in DefineComponent type. I don't have the energy to investigate at the moment. If anyone wants to deal with it, you can refer to my past PR:

feat(types): simplify ExtractPropTypes to avoid props JSDocs being removed vuejs/core#5166
feat(types): avoid props JSDocs loss due to default option vuejs/core#5871
types(runtime-core): using intersection type in Readonly<...> breaks JSDoc emit vuejs/core#11799

https://github.com/qmhc/vite-plugin-dts/issues/373#issuecomment-2327783802

This is a problem in DefineComponent type. I don't have the energy to investigate at the moment. If anyone wants to deal with it, you can refer to my past PR:

feat(types): simplify ExtractPropTypes to avoid props JSDocs being removed vuejs/core#5166
feat(types): avoid props JSDocs loss due to default option vuejs/core#5871
types(runtime-core): using intersection type in Readonly<...> breaks JSDoc emit vuejs/core#11799

Are these three PRs related to this issue? It seems that I have updated all packages to the latest version, but still failed to solve this problem.

@qmhc Hello, do you have time recently? For the previous Issues, I can customize the .d.ts declaration file and replace the final duplicate file by copy.
But there is a more urgent problem, which is the problem of jsDoc document comments.
Because in many cases, I define props emits including slots. So I can't put all the code in one file very elegantly, I need to reference it through different files.
So it also leads to that if it is defined in different files, the final generated .d.ts declaration file does not actually have jsDoc document comments, which is extremely inefficient for our developers.
I hope this jsDoc document comment problem can be solved as soon as possible. Because it really affects me.
For this reason, I specially re-provide a smaller Demo. https://stackblitz.com/edit/vue-tsc-jsdoc-error
Thank you very much!

+1

tsconfig.json set removeComments: false


Remove all bloatware won't completely remove OneDrive

When running the Remove all bloatware it seems to remove part of the OneDrive, so i'm forced to run the Uninstall OneDrive to remove OneDrive completely. I don't understand why it won't remove the OneDrive icon in the File Explorer? That seems to be the only thing the Remove all bloatware won't remove. at least what i can see. If OneDrive is included in Remove all bloatware then it should remove it completely too and not leave some parts of it.
I'm using the Windows10DebloaterGUI.ps1 and Windows Version 1809 (OS Build 17763.379)

Even though explorer is closed, it couldn't remove onedrive's some dlls. When i checked what is using them, i saw that firefox was the one (dunno why, i haven't try to open them with it).
I think it is seperate, because it is another kinda pain. I've unistalled it before, but something else (i guess office) installed it back.

One drive is not part of the remove all option because sometimes it's used in enterprise environments so it's a secondary optional option,
I personally tried to include it with the debloat all but I do agree that it should be an optional removal instead of always getting removed with all the other apps BECAUSE it's not an "app" per se AND the removal process is a little unique in order for it to be done correctly
the fact that the debloat all isn't removing one drive isn't an issue, it's intentionally left out


pretrain_weight

i got an error when i use pretrain weight from the release from this repo.
NotFoundError (see above for traceback): Restoring from checkpoint failed.
This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key conv52/batch_normalization/beta/ExponentialMovingAverage not found in checkpoint
	 [[node save/RestoreV2 (defined at /Users/lees/Desktop/yolov3/evaluate.py:50)  = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]

So, how to fix it ?

you should delete last charactors of weight name

Did you solve it? @ZH-Lee

you should delete last charactors of weight name

I didn't get it. are you talking about the last characters of weight file name? or something else? would you mind elaborate your answer?

you should delete last charactors of weight name

I didn't get it. are you talking about the last characters of weight file name? or something else? would you mind elaborate your answer?
Did you solve it?


add docstring and refactor code of callback.py

Codecov Report

Merging #658 (e4bbbde) into training (7e27aba) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           training     #658      +/-   ##
============================================
+ Coverage     60.08%   60.12%   +0.04%
============================================
  Files           147      147
  Lines          6313     6312       -1
  Branches        971      971
============================================
+ Hits           3793     3795       +2
+ Misses         2228     2225       -3
  Partials        292      292

Impacted Files
Coverage Δ

towhee/trainer/callback.py
68.80% <100.00%> (+1.07%)
: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 7e27aba...e4bbbde. Read the comment docs.


Causal Loop Diagram - draw a graph

Maybe with D3?
https://observablehq.com/@d3/mobile-patent-suits?intent=fork

{source: "Microsoft", target: "Amazon", type: "licensing"}


⚠ Economy API Endpoint has degraded performance

In 3149da9, Economy API Endpoint (https://economy.roblox.com) experienced degraded performance:

HTTP code: 503
Response time: 7531 ms

Resolved: Economy API Endpoint performance has improved in be6d876.


chore: add matrix versions for ci until python 3.11

Run tests for supported versions of python 3.9, 3.10, 3.11
Pin versions in metadata
Add nice looking badges.
jira: https://issues.redhat.com/browse/AAP-13387

Created just for testing, real PR is https://github.com/ansible/eda-server/pull/574


Preview 4 - FolderPicker and FilePicker not working / App crashes

Simple to reproduce:
I have downloaded VisualStudio 2019 Preview Version 16.9 and installed with WinUI 3 preview 4.
I have created a new WinUI Desktop App with .Net 5.
In the method myButton_Click i have this code:
string Filename = "";
var picker = new Windows.Storage.Pickers.FileOpenPicker();
((IInitializeWithWindow)(object)picker).Initialize(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle);
Windows.Storage.StorageFile file = await picker.PickSingleFileAsync();

and the interface in the same namespace:

[ComImport]
        [Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        public interface IInitializeWithWindow
        {
            void Initialize(IntPtr hwnd);
        }

I build my app, the app starts without errors. After i click on the button, the app crashs with this message:
Ausnahmefehler bei 0x76E36D21 (combase.dll) in App1.exe: 0xC000027B: Anwendungsinterne Ausnahme (Parameter: 0x1BD90608, 0x00000001)
Without the interface i receive the message "Invalid Window handle".
The same behavior is with the FolderPicker.

Windows app type:

UWP
Win32

No
Yes

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

October 2020 Update (19042)
Yes

May 2020 Update (19041)

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

This is my first bug report an i hope this is correct.
Best regards
Andy

@rkarman this is good feedback to consider for the future with AppWindow (maybe we can make the need for initializeWithWindow go away?). Anyways, closing this issue as this is by-design and expected that you must call initializeWithWindow today.

@AndyMahub,
I have just tested the code below with Preview 4 bits, and it works for me.
 public sealed partial class MainWindow : Window
 {
      ...

        private async void myButton_Click(object sender, RoutedEventArgs e)
        {
            var filePicker = new FileOpenPicker();

            //Get the Window's HWND
            var hwnd = this.As<IWindowNative>().WindowHandle;

            //Make folder Picker work in Win32

            var initializeWithWindow = filePicker.As<IInitializeWithWindow>();
            initializeWithWindow.Initialize(hwnd);
            filePicker.FileTypeFilter.Add("*");

            var folder = await filePicker.PickSingleFileAsync();
            myText.Text = folder != null ? folder.Path : string.Empty;
        }

        [ComImport]
        [Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        public interface IInitializeWithWindow
        {
            void Initialize(IntPtr hwnd);
        }
        [ComImport]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        [Guid("EECDBF0E-BAE9-4CB6-A68E-9598E1CB57BB")]
        internal interface IWindowNative
        {
            IntPtr WindowHandle { get; }
        }
...
}

YES! This works for me! :-) Thank you!
But, is this a temporarily solution? Or comes a fix for this issue?

But now, it's not working for 0.8

@Aloento can you explain what's not working? Can you share your full code sample? What exception is being thrown and at what line?
Make sure you're calling this.As<IWindowNative>().WindowHandle; from a foreground UI thread from directly within a Window class (or pass your window instead of the this parameter`, you need to obtain the window handle from a Window class

@Aloento can you explain what's not working? Can you share your full code sample? What exception is being thrown and at what line?
Make sure you're calling this.As<IWindowNative>().WindowHandle; from a foreground UI thread from directly within a Window class (or pass your window instead of the this parameter`, you need to obtain the window handle from a Window class

There is an unhandled exception at 0x76556AB1 (combase.dll) (in Reunion.exe): 0xC000027B: An internal application exception has occurred. (Parameter: 0x1D07C6E0, 0x00000001).
using System;
using System.Runtime.InteropServices;
using Microsoft.UI.Xaml;
using Windows.Storage.Pickers;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace Waifu2x_Vulkan_Reunion
{
    public sealed partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private async void MyButton_Click(object sender, RoutedEventArgs e)
        {
            var filePicker = new FileOpenPicker();

            //Get the Window's HWND
            var hwnd = As<IWindowNative>().WindowHandle;

            //Make folder Picker work in Win32

            var initializeWithWindow = FileOpenPicker.As<IInitializeWithWindow>();
            initializeWithWindow.Initialize(hwnd);
            filePicker.FileTypeFilter.Add("*");

            var folder = await filePicker.PickSingleFileAsync();
        }

        [ComImport]
        [Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        public interface IInitializeWithWindow
        {
            void Initialize(IntPtr hwnd);
        }
        [ComImport]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        [Guid("EECDBF0E-BAE9-4CB6-A68E-9598E1CB57BB")]
        internal interface IWindowNative
        {
            IntPtr WindowHandle { get; }
        }
    }
}

@Aloento can you explain what's not working? Can you share your full code sample? What exception is being thrown and at what line?
Make sure you're calling this.As<IWindowNative>().WindowHandle; from a foreground UI thread from directly within a Window class (or pass your window instead of the this parameter`, you need to obtain the window handle from a Window class

There is an unhandled exception at 0x76556AB1 (combase.dll) (in Reunion.exe): 0xC000027B: An internal application exception has occurred. (Parameter: 0x1D07C6E0, 0x00000001).
using System;
using System.Runtime.InteropServices;
using Microsoft.UI.Xaml;
using Windows.Storage.Pickers;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace Reunion
{
    public sealed partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private async void MyButton_Click(object sender, RoutedEventArgs e)
        {
            var filePicker = new FileOpenPicker();

            //Get the Window's HWND
            var hwnd = As<IWindowNative>().WindowHandle;

            //Make folder Picker work in Win32

            var initializeWithWindow = FileOpenPicker.As<IInitializeWithWindow>();
            initializeWithWindow.Initialize(hwnd);
            filePicker.FileTypeFilter.Add("*");

            var folder = await filePicker.PickSingleFileAsync();
        }

        [ComImport]
        [Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        public interface IInitializeWithWindow
        {
            void Initialize(IntPtr hwnd);
        }
        [ComImport]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        [Guid("EECDBF0E-BAE9-4CB6-A68E-9598E1CB57BB")]
        internal interface IWindowNative
        {
            IntPtr WindowHandle { get; }
        }
    }
}

I know where is the problem.
I should use using WinRT;
It works fine.

I'm facing something similar and not solutions seems to work for me. I'm building a WinUI 3 Desktop app on Windows 11 and in VS2019.
Code:
// Open a text file.
FileOpenPicker open = new();
open.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
open.FileTypeFilter.Add("*");

// When running on win32, FileOpenPicker needs to know the top-level hwnd via IInitializeWithWindow::Initialize.
if (Window.Current == null)
{
    IntPtr hwnd = GetActiveWindow();
    IInitializeWithWindow initializeWithWindowWrapper = FileOpenPicker.As<IInitializeWithWindow>();
    initializeWithWindowWrapper.Initialize(hwnd);
}

var files = await open.PickMultipleFilesAsync();

Exception:
Specified cast is not valid.
Screenshot:

@thehaseebahmed
I had the same problem, the same workaround everywhere, but it didn't work for me. The solution is to add using WinRT;. Then the myPicker.As<IIInitializeWithWindow>(); works.

It appears the same work around is now required for MessageDialog. I'm still not sure I understand why this is "by-design" and if it is, I'm not sure I agree with the design.
@andrewleader is there any way we can track an on-going issue to tidy this up in the long term? Surely there must be a more intuitive way so that we don't end up with code being littered with As() calls.

Longer term, we're looking into adding Microsoft.Windows.* variants of these types, so you'd say like var open = Microsoft.Windows.Storage.Pickers.FileOpenPicker(targetWindowId) (where targetWindowId is a Windows.UI.WindowId you acquired from either Window.Current or somewhere else.)  See also #370 for a longer discussion of Windowing in the WinApSDK and how we're looking to slot it in.
There's a whole group of these "windowing interop helpers" that are relevant - anything that took an "implicit CoreWindow" needs to be updated.  See https://github.com/AdamBraden/WindowsInteropWrappers for a start at some.

I have just tested the small code below, and it works for me.
private async void MyButton_Click(object sender, RoutedEventArgs e)
{
  var filePicker = new FileOpenPicker();

  // Pass in the current WinUI window and get its handle
  var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
  WinRT.Interop.InitializeWithWindow.Initialize(filePicker, hwnd);

  filePicker.FileTypeFilter.Add("*");

   // Now you can call methods on filePicker
  var file = await filePicker.PickSingleFileAsync();
}

Without writing  Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")
Wiki Call WinRT COM interop interfaces from .NET 5+ apps

I have just tested the small code below, and it works for me.
private async void MyButton_Click(object sender, RoutedEventArgs e)
{
  var filePicker = new FileOpenPicker();

  // Pass in the current WinUI window and get its handle
  var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(this);
  WinRT.Interop.InitializeWithWindow.Initialize(filePicker, hwnd);

  filePicker.FileTypeFilter.Add("*");

   // Now you can call methods on filePicker
  var file = await filePicker.PickSingleFileAsync();
}

Without writing Guid("3E68D4BD-7135-4D10-8018-9FB6D9F33FA1")
Wiki Call WinRT COM interop interfaces from .NET 5+ apps

Using WinUI3, you'd better do like this:
WinRT.Interop.WindowNative.GetWindowHandle(App.MainWindow);

I've tried all your proposal, unfortunnately none of them works on my side (WUINUI3 + .net 6.0).
I'm pretty disapointed to see even basics aren't fully supported yet...

@orapps44 - do you have more information on the issues you ran into? There is a code sample for picker objects in the article call interop APIs from a .NET 5+ app. Feel free to file a new issue if you ran into problems following those docs.

What if we are trying to do this from something like a UserControl that doesn't have access to the Window? In my case it's a UserControl within a Page within a Frame, would I have to pass the Window handle all the way down the chain?

WinRT.Interop.WindowNative.GetWindowHandle(App.MainWindow);

private async void LoadFromFile(object sender, RoutedEventArgs e)
{
    var fPicker = new FileOpenPicker();

    var handle = WinRT.Interop.WindowNative.GetWindowHandle(**ABootstrap.Resolve<MainWindow>()**);
    WinRT.Interop.InitializeWithWindow.Initialize(fPicker, handle);

    fPicker.FileTypeFilter.Add("*");

    var selected = await fPicker.PickSingleFileAsync();
}

Replace ABootstrap.Resolve() with a reference to your MainWindow, in my case I use dependencie injection to aquire it from everywhere.. you can just make a static reference if you like

I've tried all your proposal, unfortunnately none of them works on my side (WUINUI3 + .net 6.0).
I'm pretty disapointed to see even basics aren't fully supported yet...

private async void LoadFromFile(object sender, RoutedEventArgs e)
{
    var fPicker = new FileOpenPicker();

    var handle = WinRT.Interop.WindowNative.GetWindowHandle(ABootstrap.Resolve<MainWindow>());
    WinRT.Interop.InitializeWithWindow.Initialize(fPicker, handle);

    fPicker.FileTypeFilter.Add("*");

    var selected = await fPicker.PickSingleFileAsync();
}

Replace ABootstrap.Resolve() with a reference to your MainWindow, in my case I use dependency injection to aquire it from everywhere.. you can just make a static reference if you like

@KenionX, are you using the latest version of the WinAppSDK? For example, I have installed the VS2022 17.1 and I selected the Windows App SDK project templates in the .NET Visual Studio Workload.  I  just replaced the default ButtonClick event that comes from the Blank app within your code, and it works well.

@marb2000 it does not work on WASDK 1.1 preview 3. Tried same code
private async void Button_Click(object sender, RoutedEventArgs e)
    {
        var picker = new FileOpenPicker();
        picker.FileTypeFilter.Add("*");

        InitializeWithWindow.Initialize(picker, App.MainWindow.GetHandle());

        var file = await picker.PickSingleFileAsync();
    }

GetHandle is an extension method that calls WinRT behind.
I use it in a ContentDialog that's attached to the XamlRoot of the MainWindow.

Running into issues when applying this solution to FileSavePicker. Win UI 3 + .NET 5/6/7 + WASDK last 10 versions tested. No issues with FileOpenPicker though.


[SVCS-492] Remove unused path property from BoxRevision

refs: https://openscience.atlassian.net/browse/SVCS-492
Purpose
BoxRevision had an unused path property. Removing it keeps code and tests clean.
Summary of Changes
Did git archeology to make sure the propery was unused. It was last touched around 3 years ago when the box addon was initially being set up. It was indeed unused.
Removed the unused path property and removed the test referencing it.
QA/Testing Notes
I went through and tested edits/revisions locally a bit on the OSF. There seem to be some errors with requesting the most recent revision via the revision picker, but that is unrelated to this change.

Coverage increased (+0.02%) to 87.116% when pulling<PHONE_NUMBER>2bff8ec4b89a659ef914d5d8c774ab on AddisonSchiller:freature/remove-box-revision-path into 69656b703d7f41979c432b2850eab68551f3e792 on CenterForOpenScience:develop.


Pluggable lingual parser

This PR adds

LingualParser class, which any lingual parser like Spacy should inherit from
lingual_parser as an argument to Parser to be able to plug a custom lingual parser
Unless otherwise specified, Spacy will be used by default for backward-compatibility.

Thanks for the suggestions. I'm currently adopting all of them.
Will push them when I'm done.

Rebased and (force) pushed. Let me know if there is anything.

I believe the following question is for #290. Let me know if I'm wrong.

One more question about typing: do you think it's a good idea to have type folder to include all types in Fonduer?

Yes, you are right!


istio virtualservice-ingress with retries as 0

Hi,
We are seeing unwanted retries due to 500 status code by the service, and this is annoying as it is running in a serverless environment and the error had to be immediately propagated back.
Need to add the below code to https://github.com/knative-sandbox/net-istio/blob/524afbe8aa70b5589360d0e96b92ef2cd8c6a317/pkg/reconciler/ingress/resources/virtual_service.go#L221,
Retries: &istiov1alpha3.HTTPRetry{
				Attempts:      0,
				PerTryTimeout: nil,
			},

This is a very bad situation to be in, as the actual service is returning error but we are retrying it for 3 times before returning the response.

We do not set the HTTPRetry field since https://github.com/knative-sandbox/net-istio/pull/263.
The behavior you are describing will be in the next release.

Perfect @JRBANCEL, When is the next release scheduled for?

The next release (v0.18) is scheduled next week. You can find the schedule here https://github.com/knative/pkg/blob/master/RELEASE-LEADS.md#schedule

/close


WIP Remove --directory flag

In anticipation of new style configuration and string.Template substitution --directory is no longer needed to define file_group.pattern correctly explicitly from the command line
This PR will remove all FileGroup.directory magic from the code base

It is becoming obvious that FileGroup is trying to support too many interfaces and that DatasetSpec is a more natural fit

An additional flag --replace-dir is needed to support command line usage of --database. We could remove command line usage of --database in a future PR

This PR has been addressed by #231 which implemented the same refactoring restricted to a smaller scope


Some arguments hot fixes

Discovered a couple of bugs in the arguments code while debugging the failing tests on the other branch. Since these bugs are now blockers, separating the fixes into their own PR first.

Ok, looks good to me and seems to fix the rather glaring bug in my demo presentation this afternoon.
Since this is somewhat time-sensitive now, I'd like to fast-track this for the tutorial demo. So please shout now if you have any objections to this going in.

Note that 386 will include some tests that would have found these issues.


Update .travis.yml

adding power support.

Can you elaborate on why you want to do this and what purpose it serves?
This will not change anything about Guice, it will just change the way it's continuous integration tests run.

@sameb - we would want to have CI run to happen on different arch (ppc64le) too to have regression happening on power too fo this repo.

Why?  Guice has no interaction with low level native architectures.  Do you have some reason to suspect otherwise?

I signed it!


Give xyplot its containers height always

Is their a way to give xyplot 100% height like this?
 <FlexibleXYPlot
               height={'100%'}
               stackBy="y"
               xType="ordinal"
               margin={{bottom:'100'}}
  >
   //::TODO
 </FlexibleXYPlot>

Hi, if you are using FlexibleXYPlot you already have a responsive chart that takes the full height/width of it's parent.
The only think you have to take care is that the parent element of your FlexibleXYPlot needs to have a computed height.

@markov00 When the page is resized the graphs height stays the same I implemented a fix for it by making my graph component handle its own height state using window.innerHeight to scale the height of the graph when the window is resized.

const ratio = .4;
class ResponsiveHeightPlot extends Component {
  state = {
    height: 0,
    width: 0
  }
  componentDidMount() {
    this.updateWindowDimensions();
    window.addEventListener("resize", this.updateWindowDimensions);
  }

  componentWillUnmount() {
    window.removeEventListener("resize", this.updateWindowDimensions);
  }

  updateWindowDimensions = () => {
    this.setState({width: window.innerWidth, height: window.innerHeight});
  };
  render() {
    return (
      <FlexibleXYPlot
        margin={this.props.margin}
        height={this.state.height * ratio}
        yType="ordinal"
        xDistance={100}>
        <VerticalGridLines />
        <HorizontalGridLines />
        <XAxis />
        <YAxis />
        <HorizontalBarSeries
          colorType="literal"
          data={this.props.data}
        />
      </FlexibleXYPlot>
    );
  }
}

This is the solution which will resize the plot when the window itself is resized by a user.


fix(example): Use createStructuredSelector instead of createSelector in RepoListItem

Currently the example app in the dev branch shows an error message when you try to fetch information:

git bisect pointed me to the Jest integration commit and there I noticed this change: https://github.com/mxstbr/react-boilerplate/commit/98f2d0d931ad0945961b66047b47f519734c9db2#diff-f66d28b72b146f6d22bdc2e7aab68001L57 that broke RepoListItem component; unless I'm missing something, it's better to replace createSelector with createStructuredSelector to fix this error.

Coverage remained the same at 98.605% when pulling b51bd4b4063e19283a413b65f6c0ca09d7020f86 on Dattaya:bug-regression-98f2d0d into dc42825d5400cf8994f92f663e767cca3d63f426 on mxstbr:dev.

Coverage remained the same at 98.605% when pulling b51bd4b4063e19283a413b65f6c0ca09d7020f86 on Dattaya:bug-regression-98f2d0d into dc42825d5400cf8994f92f663e767cca3d63f426 on mxstbr:dev.

Need to figure out why tests haven't detected this.

Ran into this while preparing a dependency update.
I can confirm that the code patch fixes the issue in my environment :100:

@gihrig, thank you for confirmation, much appreciated.
@mxstbr, the reason for false positives could be that props are directly passed and are not returned from the store (?):
    const renderedComponent = renderComponent({
      item,
      currentUser: item.owner.login,
    });

Anyhow, I think this is ready to be merged, we can improve tests later.

Thank you!


Timestamp config is not saving selection

System information:

Operating system: Ubuntu 20.04
DBeaver version: 22.1.2

Describe the problem you're observing:
Client Timezone setting is not persisting selection.
To reproduce the problem simply select a Timezone and apply and close.
If you reenter the config, Default is selected. (And actually what is 'Default'?)

This in turn produces some strange behavior with databases (e.g. Snowflake).
Currently is 18:06 (Europe/Rome timezone). If you run:
SELECT
localtime(),
localtimestamp(),  -- ok
current_time(),
current_timestamp(), -- ok
sysdate(); -- UTC

And even if you set timezone, you get strange result:
ALTER SESSION SET TIMEZONE = 'Europe/Rome';

SELECT
localtime(), -- UTC+3 wrong
localtimestamp(),
current_time(), -- UTC+3 wrong
current_timestamp(),
sysdate();

It is ok in Snowflake WebUI

Hi, I looked into described problems

Unfortunately couldn't reproduce it, a video may.
Data editor applies current timezone for used dates if there is no manual override, you can disable date/time formatting in Data Formats preferences


[BUG][GUI] cluster ouput/output edit output buffer got schema error

Describe the bug

Same issue like https://github.com/harvester/harvester/issues/6825

Sorry, it's already fixed in ui-extension.


Enhancement: Redis SSL & Sentinel integration

What's the feature you'd like to ask for.
Extend the RedisCacheBackend to allow for SSL & Sentinel based Redis connections

SSL should already be possible (you can simply pass in a Redis instance or pass an appropriate URL to with_client. Supporting sentinel clients should only be a matter of typing as far as I can tell.

Scratch that last part, I was thinking about something else.
@cofin I'm not sure if explicit support for Sentinel clients is actually needed, as we wouldn't want to do the setup within the storage backend anyway, and you would just pass a slave client to the storage, something like this:
from redis.asyncio.sentinel import Sentinel
from starlite.storage.redis import RedisStorage

sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1)

storage = RedisStorage(redis=sentinel.slave_for('mymaster', socket_timeout=0.1))

@cofin can you take this one on?


more flexibility in the use of 'av.audio.frame.from_ndarray'

Hi, congratulations for this beautiful module project!
The interface between to_ndarray and from_ndarray is not "homogeneous", I had to struggle a while to understand it. This pull request is to make the from_ndarray function easier to use.

This looks interesting, but it definitely needs some unit tests, could you please add them?

Oops, sorry for this negligence! I'm not familiar with compilation, so I can't run the tests locally. I hope they will pass!


Merge changes for release v1.8 into master

What type of PR is this?

/kind enhancement

What does this PR do / why we need it:
This PR updates the master branch with latest changes of release v1.8. This PR is required to keep the master branch up-to-date with all the latest changes.
Which issue(s) this PR fixes:
This PR holds of bunch of changes related to

Render_templates modifications
Test platforms stability
KAM pod security policy.

How to test changes / Special notes to the reviewer:

@wtam2018 @jaideepr97  All the tests are passing. Can you please review and approve.

@varshab1210 the kuttl tests are failing as they are unable to spin up the pods.
Is it a known issue or should I rerun the failed tests ?

@varshab1210 the kuttl tests are failing as they are unable to spin up the pods.
Is it a known issue or should I rerun the failed tests ?
If I am not wrong, its because in this PR there are bundle related changes, gitops-operator:latest has changed to gitops-backend-operator here
CI is looking for quay.io/redhat-developer/gitops-operator:latest.
Can you please change


⚠ GitLab Server has degraded performance

In 6b4f6e4, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 6750 ms

Resolved: GitLab Server performance has improved in 27d6890.


Add Finetuning experiment pipeline for BirdSet datasets

In this PR, we implement finetuning (FT) like done in DT in BirdSet to compare the results. Due to the covariate shift, the results of Linear Probing were a lot worse than those from the BirdSet paper where FT was done. To use the already implemented models we want to do FT through the already created FT module.

[x] Create FT module for multilabel
[x] Create BirdSet experiment config
[x] Implement experiments for testing with HSN
[x] Optimize hyperparams for ConvNeXt to see how it compares to BS
[ ] Optimize hyperparams for BEATS
[ ] Do a full run for the paper
[ ] Maybe try hybrid module due to train/test distribution change?!

This PR contains a multilabel_finetune config, several configs for running FT BS experiments and a nice run script

Perch can't easily be finetuned so how is DT done in BirdSet? Our linear probing results are a lot worse than the DT Perch results on HSN...

And only LT is done with perch and is that only training the classifier? I will use a different model to compare the results!

@XgamerTV I am currently in the process of reviewing this PR, I merged main and refactor to use the experiment structure of #21
TODO

[ ] biolingual
[ ] convnext
[ ] eat

@raphaelschwinger there are 2 eat file, which one do you mean? eat_ssl or eat_soundnet

@PariaValizadeh I think we should definitely check eat_ssl but maybe also eat_soundnet (maybe with a BS checkpoint)


Upgrade from 0.11 to 0.12

Upgrading a single server of 0.11 to 0.12 may be broken due to the fact that the raft based meta store no longer exists in 0.12.  We need to provide a way to upgrade.

Fixed vai #6158


Callonce called with different arguments ignore the second call

Repro: https://github.com/Decat-SimonA/karate-bug792
With util.feature defined as:
@ignore
Feature:

  Scenario:
    When match args == "foo"

This should not pass
Feature:

  Scenario:
    * callonce read('util.feature') { args: "foo"}
    * callonce read('util.feature') { args: "bar"}

util.feature is currently not called with the second set of parameters

follow these instructions to reopen https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

re-open this please

callonce works based on the feature file which you are calling not on the argument which you are passing.. so if you want to run a feature more than once  you can use call

and if I want to call a feature once with different arguments ?
Use case: setup the server with multiple parameters before launching the tests

there are plenty of ways for this, you can use Scenario Outline in your feature passing n number of values you want from Examples and do callonce or else try,
* callonce read('util.feature')  [{ args: "foo"}, { args: "bar"}]
this should work

Repro: https://github.com/Decat-SimonA/karate-bug792
With util.feature defined as:
@ignore
Feature:

  Scenario:
    When match args == "foo"

This should not pass
Feature:

  Scenario:
    * callonce read('util.feature') { args: "foo"}
    * callonce read('util.feature') { args: "bar"}

util.feature is currently not called with the second set of parameters

I had to call a single file (multiple times) with different params, but once for a feature file. We just have to put callonce with the last call in the order. It worked for me.
Feature:

  Background:
    * call read('util.feature') { args: "foo"}
    * callonce read('util.feature') { args: "bar"}


Preview server refactoring

Extracted webrick server logic in separate class
Use threads and queues signals instead loop for web server reload and stop logic

Thanks @tdreyno


Query images

Hello，thank you for your work! I have a question. Do query images in your code come from coco val2017?

Yes. During inference, the query images are from coco val2017.

Ok, thank you!

Where are the query images from during the training phase?
Are the query images from coco val2017 too in the training phase?

No. In the training, the query images are from coco train2017.

In your work, you visualized the bounding boxes with scores larger than 0.8. What are the scores related to? Is it related to both IOU and categories?


Unable to retrieve metrics from k8s custom metrics server

What did you do?
I deploy Prometheus Operator(kube-prometheus/hack/cluster-monitoring/deploy) and custom metrics server(kube-prometheus/manifests/custom-metrics-api).  The metrics are able to access through curl and kubectl but not from direct api call inside a program.  I try to know if I miss somehing.
What did you expect to see?
I am calling /apis/custom.metrics.k8s.io/v1beta1/namespaces/default/pods//memory_max_usage_bytes, and I expect to get the result back just like "curl http://hostname:port//apis/custom.metrics.k8s.io/v1beta1/namespaces/default/pods//memory_max_usage_bytes.
What did you see instead? Under which circumstances?
I see no result or error back.  When I call /apis/custom.metrics.k8s.io/v1beta1, I can see a list of metrics.
Environment
ubuntu 16.04

Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:40:06Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:40:06Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}

Kubernetes cluster kind:
I am using kubeadm script from https://github.com/Mirantis/kubeadm-dind-cluster

Manifests:

insert manifests relevant to the issue

Prometheus Operator Logs:

insert Prometheus Operator logs relevant to the issue here

This is likely something to ask in the adapter repository, as I believe it's about using the API correctly. This walk through is slightly outdated, but except for the apiGroup change it should conceptually work similarly.

@brancz I will post the question to adapter repo.  Thanks.


[member #3] Create a schema.sql file #26

[x] In this milestone i was able to create the following;
Create a schema.sql file with tables that will be analogical to the structure of the classes that you created:
games table (add all properties and associations from the parent Item class as table columns)
authors table

Hi @AbdimulhinYussuf3675, good job implementing those changes. Please, go ahead and merge it.


DevOps add max-async-wait-time to PowerPlatformRestoreEnvironment

Hello,
Is it possible to add max async wait time to the PowerPlatformRestoreEnvironment task?
If i want to restore our production enviroment to test it will time out because it's needing more then 1 hour (default)

Second this. We have the same issue with CopyEnvironment.

Added to our backlog, internal tracking as AB#3306126


The private/public keys must be in PEM format.

I had my ssh keys generated with ssh-keygen and  by default it makes 2 files:
~/.ssh/github_com_ssh_1
and
~/.ssh/github_com_ssh_1.pub
It looks like ssh-agent-client-rs does not like these formats.
I tried to use the sign() function without success.
The same keys must be converted into the PEM format.
I converted the private key
Warning: It will replace the same file ! SO make the copy first.
cp ~/.ssh/github_com_ssh_1 ~/.ssh/github_com_ssh_1.priv
ssh-keygen -p -m PEM -f ~/.ssh/github_com_ssh_1
cp ~/.ssh/github_com_ssh_1 ~/.ssh/github_com_ssh_1.priv.pem
mv ~/.ssh/github_com_ssh_1.priv ~/.ssh/github_com_ssh_1

I converted the public key
ssh-keygen -e -m PEM -f ~/.ssh/github_com_ssh_1.pub  > ~/.ssh/github_com_ssh_1.pub.pem

Now I added this new formats of the same key to ssh-agent
ssh-add -t 1h ~/.ssh/github_com_ssh_1.priv.pem

And all works fine.
It signs the "message" with the private key that is inside the ssh-agent.
Great. Thanks.

The ssh-agent-client-rs crate leans on the ssh-key crate to deal with parsing ssh-keys, so any trouble you might have turning some key file in some specific format into a PrivateKey or PublicKey struct for use with this crate is better directed to that project.
That said, if you look at the tests in codec.rs there are some examples of code successfully reading both public and private ssh keys as they are generated by ssh-keygen (where private keys are in PEM format and public keys are in the openssh single line format.


Using a mutable reference and shared read-write pointers (Cell references) at the same time is not caught

This is based on as_cell feature that introduces opt-in temporary interior mutability via referencing using reference to a Cell.
For summary, the deal is that the default standard library interface to create such Celled references makes sure that you are not able to reuse the original mutable reference again. However if you would use unsafe code directly you basically keep that mutable reference and you are also able to use Cell references (pointers underneath) along leading to supposedly undefined behavior relatively to stacked borrows due to using a borrow that is not on top of the stack. I am not sure which one though.
Maybe from_mut method in the standard library explicitly creates a reborrow through lifetime parameter therefore example code does not make a reborrow at all so the problem is simply about aliasing rules. If these are not the reasons, feel free to point that out to remove my misleading commentary.
Happens on miri 0.1.0 (8681d4c 2022-11-25) and miri 0.1.0 (a28f3c8 2022-11-20).
Rust permalinks:

https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=fa1942088b465debeeaee74559791647
https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=aed6c79d046c4e56941901bc3843b3e7

If I understood correctly, you are only reading from the mutable reference. So I think this is deliberate -- mutable references allow writes to pointers derived from them, and don't kill derived pointers on reads.
In fact under the model @Vanille-N is currently working on, this code would be fine even if you added some writes to a. Basically when you are turning a into a raw pointer, under that model you are allowed arbitrary aliasing between this mutable reference and that particular raw pointer, and then the UnsafeCell inherits all that.

If I understood correctly, you are only reading from the mutable reference. So I think this is deliberate -- mutable references allow writes to pointers derived from them, and don't kill derived pointers on reads.

Doesn't this somehow represent noalias behavior in LLVM as in reference? Information about such topics is pretty scattered and it's pretty hard to make a picture that captures every language specifics. So, citating:

noalias
This indicates that memory locations accessed via pointer values based on the argument or return value are not also accessed, during the execution of the function, via pointer values not based on the argument or return value.

That is, being based on is a synonym to being derived from.
And also:

In fact under the model @Vanille-N is currently working on, this code would be fine even if you added some writes to a. Basically when you are turning a into a raw pointer, under that model you are allowed arbitrary aliasing between this mutable reference and that particular raw pointer, and then the UnsafeCell inherits all that.

Basically what caught my eye was using both means of accessing memory at the same time while having an exclusive reference to the data in the first place. Is there some consistent explanation on how it currently works, maybe in unsafe-core-guidelines or internals/users forum? Perhaps I have read badly and this was thoroughly explained in stacked borrows articles.

Doesn't this somehow represent noalias behavior in LLVM as in reference? Information about such topics is pretty scattered and it's pretty hard to make a picture that captures every language specifics. So, citing:

Yes I think what Miri does matches what the LLVM docs say. Do you see a contradiction?
It is explicitly okay in LLVM to derive q from p (where p: noalias), and then use both pointers in an interleaved way.

Basically what caught my eye was using both means of accessing memory at the same time while having an exclusive reference to the data in the first place. Is there some consistent explanation on how it currently works, maybe in unsafe-core-guidelines or internals/users forum? Perhaps I have read badly and this was thoroughly explained in stacked borrows articles.

What Miri currently does follows the 'Stacked Borrows' model, which is described here. This is all WIP.

Thank you very much, after I re-read the stacked borrows reference everything has become more clear to me. Looking forward to the new model!
I was kind of oblivious (sorry!) of the internals but now I don't think I have any remaining questions.

No worries, I know this stuff is complicated, and we haven't spent a lot of effort on docs yet. We're still in the model finding phase.


Pluggable cache

See #31 for discussion.

@rahul-malik Can you please restart Ci build? For some reason it failed to download one of a test images.

Restarted. Travis is unreliable sadly :(

Thanks so much for putting this up!

Sorry for all the minor little suggestions, I think we're almost there!

@garrettmoon Np, naming stuff is first issue in programming (along with deciding, when to clear cached data) :)

Thanks so much @skeeet !

@garrettmoon Thanks for putting this awesome library altogether in the first place.
Now another question - any suggestions on pluggable download manager API?

@skeet It would be very valuable to have!
I'm guessing it's going to be a bit more difficult to extricate sadly though.
Opened #227 with some comments that hopefully will point you in the right direction.


FundingSourceApprovalForm not tested

This form is tested, but there is still not submission of the form. A post using the django web client might suffice.


Upgrade ember-source to 4.8.4

make sure we still support 3.28

make sure we still support 3.28

So it seems ember try:each correctly detected features that are not yet supported in 3.28.


Compiler panics and no DCA warning when a configurable is never used

The configurable MAX_SUPPLY is never used and optimized away but there is no dead code warning generated and that confuses the developers.
Additionally, the code compiles without warnings or errors on Sway v0.60.0 but the compiler panics on the current master:
thread 'main' panicked at sway-core/src/semantic_analysis/ast_node/declaration/configurable.rs:106:18:
called `Result::unwrap()` on an `Err` value: ErrorEmitted { _priv: () }

contract;

abi Test {
    fn test() -> bool;
}

configurable {
    MAX_SUPPLY: u64 = 3,
}

impl Test for Contract {
    fn test() -> bool {
        true
    }
}

Possible Solution
Prevent Optimization of Constants:
Ensure constants like MAX_SUPPLY are not optimized away by using them in a way that the compiler recognizes as necessary. For example:
const MAX_SUPPLY: u64 = 1000;
fn main() {
println!("MAX_SUPPLY is: {}", MAX_SUPPLY); // Dummy usage to prevent optimization
// Your application logic
}
Enable Dead Code Warnings:
Ensure dead code warnings are enabled in your development environment to catch unused constants and other dead code. Add the following to Cargo.toml:
[profile.dev]
rustflags = ["-Awarnings"]
Handle Errors Properly:
Avoid using unwrap() on Result types where an Err could occur. Instead, handle errors using match or the ? operator for proper error propagation and handling.
i hope this helps


Allow gameservers to not have port

When gameservers are deleted, their port is removed. This fixes it so that the gameserver will have a port of zero instead of returning an error.

🤔 on deletion I don't think we remove anything from the status part of the GameServer CRD (there's no reason to) in Agones. I should go double check though.
I wonder what is causing Quilkin to see this.

@markmandel Interesting, it doesn't happen all the time, it happens some of the time, I'll log the output and post here.

Sounds good.  Let's merge this though!

Figure it would be good to have a fix in, and then we can also look to a potentially better solution over time.


Skip rendering embed fields with empty values

Overview
Whether a facility was submitted without a value for an embed field or was submitted with an empty string or other effectively null value do not want to show the field header on the detail page.
Connects #1561
Testing Instructions
The test CSVs were created by pulling header and raw values from the example facilities in #1561
Setup

Checkout develop
Run ./scripts/resetdb
Log in as<EMAIL_ADDRESS>Contribute 1561-1.csv

Run ./tools/batch_process 16

Contribute  1561-2a.csv

Run ./tools/batch_process 17

Log out. Log in as<EMAIL_ADDRESS>Contributed 1561-2b.csv

Run ./tools/batch_process 18

Log out. Log in as<EMAIL_ADDRESS>Browse http://localhost:6543/settings and select the embed tab
Enable all of the custom fields and set a size so that the embed preview loads
Use the embed preview to view the 2 submitted facilities and verify that fields with empty values appear
Checkout this branch, feature/jcw/hide-empty-embed-fields
Refresg http://localhost:6543/settings and select the embed tab
Use the embed preview to view the 2 submitted facilities and verify that no empty fields are rendered on the embed detail pages.

Checklist

[x] fixup! commits have been squashed
[ ] CI passes after rebase
[x] CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

Thanks for the review.


Added midi save feature

Will fix this in the morning. I'm just about to head home :)

Thanks for the PR!


Lesions for DBT processing

Hi there,
How can I use DBT projection when I don't have ROI lesions info? Is there a default version?
Thanks!

Hi Elena, I updated a few lines on the code and the pipeline should now be taking a default ROI size when not provided. Check 726e2cd855b39c7d45955d5adf3a203ad1affed4


[#4733] prevent download when unauthenticated

Resolves #4733

Pull Request Checklist:

[X] Positive Test Case Written by Dev

[ ] Automated Testing

[ ] Sufficient User and Developer Documentation

[ ] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case

Create a public resource
Log out of HS
Attempt to download the resource file(s) using

Full zipped bag
Single file (file browser menu button)
Single file (right click context menu)
API

In all cases, modal requesting login/singup is shown

METRIC
VALUE

https://sonarqube.cuahsi-workstation.com:9000/dashboard?id=hydroshare-4835


PHPStan 1.12.1 reports incorrect return value from EloquentBuilder calls that are forwarded to QueryBuilder

PHPStan Version: 1.12.1
Larastan Version: v2.9.8
Laravel Version: v11.22.0

I understand this is not a bug by Larastan, but rather a Laravel-specific PHPStan issue.
Description
PhpStan 1.12.1 has released and includes a change that checks @mixin PHPDoc tags. The Eloquent Builder class (Illuminate\Database\Eloquent\Builder) uses @mixin \Illuminate\Database\Query\Builder to indicate the forwarded calls.
The problem is that the query builder methods return $this, and even though the __call() by the Eloquent Builder ignores it, PhpStan now reads this using the @mixin and thinks that these methods change the builder instance to the Query builder one.
Laravel code where the issue was found
use Illuminate\Database\Eloquent\Builder;

function (Builder $query, string $search): Builder {
    $lower = mb_strtolower($search);

    return $query
        ->where('email', 'like', "%{$search}%")
        ->orWhereRaw("LOWER(billing_address->'$.name') LIKE ?", ["%$lower%"]);
}

PHPStan report:
Anonymous function should return Illuminate\Database\Eloquent\Builder but returns Illuminate\Database\Query\Builder.

Thanks for this report, I'll dig into this

If someone needs a temporary solution, fixing the version of phpstan/phpstan to 1.12.0 solved it for me.

Fixed in PHPStan: https://github.com/phpstan/phpstan-src/commit/c889baa9ec60394e9201b2a7054486c66b40fa9b
Can you please verify this works for you by installing phpstan/phpstan:^1.12.2? It will install a current dev version.
I'd also like a regression test to be added here in Larastan to make sure PHPStan doesn't break this in the future: https://github.com/phpstan/phpstan/issues/11342#issuecomment-2331400649

@ondrejmirtes Just tried it with 1.12.2 locally and that also works for me. Thanks :)

Fix is released: https://github.com/phpstan/phpstan/releases/tag/1.12.2

Looks like this can be closed. Thank you everyone involved 👍🏽


Intermittent EMFILE errors on initialization

Sometimes on initialization so many files are opened an EMFILE error gets thrown (at different places), for example:
Error: spawn /node_modules.asar.unpacked/@vscode/ripgrep/bin/rg EMFILE

Error: EMFILE: too many open files, open '/Users/user/Projects/project/api/.idea/.gitignore'

This seems to happen especially on darwin. We should examine our initialization code to make sure we aren't opening extra files or leaving them open, with an eye toward optimizing it and possibly delaying some work until after we've initialized. It's possible on darwin fswatches also open files, so we need to make sure we're only watching what we need.
Also, it would be good if the initalization could recover from these errors.

https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fportal.azure.com%2Fsignin%2Findex%2F&response_type=code id_token&scope=https%3A%2F%2Fmanagement.core.windows.net%2F%2Fuser_impersonation openid email profile&state=OpenIdConnect.AuthenticationProperties%3DunI5Je_MR3VGAjk-RY56BeCM-Iqs8oSL666lLvVJ9g10HY38kPoSVV3KUew9YmDKy6BSVPpyTcu7-zHfAsWe3EZpgj1zYdyImr08_KobiTSupSn8kOZNHX63E_9medPkhdSuSesQmljIHyIpD51RUiiskarS1M_Lc0ThnP3V4u6XU_GIfX9BzsZzVcfOP-Y87oeogX1TDyYbydlV-Lkm5fdd6zIjMZR6Rp0dK0G8U3lPjSoTFUpG5n2St9z58ENGEU_PmHo7FKjpS_9TdRf5EejMy_gPpeIdSc7N0o-qoOb7IZBa7xo2Ix6d2bnUBSdophANeXivYbhipIfqPoiM3MuX9o_mXhkeMc56ZcyEzJHSqe9Tl9tXa3NO15HUCsqZiBSLlZuvy5MSUl9urOO0kPF5JHhlewCoW3smjZC9NgZAX6z20681GUMYhEf_4hdlYC9QQcHBf_I48J9Ev0AetqUANflAaicgDadGG4m7MAg&response_mode=form_post&nonce=638047198792995927.NWYzNWRhYWYtMGUxYS00MjY0LWI2ZmUtOTM2YjgzZjZjNjg0NjRhNDFiYmEtYjQ5Yi00ZDUyLWI4MzQtMmNiZTU1M2VhYjQw&client_id=c44b4083-3bb0-49c1-b47d-974e53cbdf3c&site_id=501430&client-request-id=92491c4d-6aee-4160-9ca9-7e7f9b74488a&x-client-SKU=ID_NET472&x-client-ver=<IP_ADDRESS>

One reason it happens so much on Darwin is the limit of 256 file descriptors on Darwin.
% ulimit -a | grep 'file descriptors'
-n: file descriptors                256

On Ubuntu 20 Linux this limit is 1024.

Saw ENFILE instead of EMFILE
log
slack
Error: spawn /node_modules.asar.unpacked/@vscode/ripgrep/bin/rg ENFILE
    at O (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2026:6570)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2049:4934
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2049:3425

Seems like they're related. However, we're not spawning rg directly, is this error even relevant to our code?


Feature request

Can you add the possibility to disable only players nametags? (but not from mobs or other entities)

Yep! I'll get to work on a config system ASAP and add this along with this system

Hey there! You can now toggle this using /toggleothernametags command. I will push the update to Modrinth right now.

Added in 1.2 release. Please note that this update does NOT hide armor stand entity labels.


started a module for plotting

A  script is initiated for plotting of KDE using KDE classes. The goal is to accomplish task described in issue #9.

I can't really tell which parts of code I am supposed to review in this change. It seems to have lots of unfinished or unused extra parts.  Please change the PR so that it contains only functional code, ie code that works and is necessary to produce some plot.  At the moment I cannot properly review it as the changes seem to be for two or three different ways of making plots which conflict with each other.
Looking at the 'plot' method in the density estimate module, it is not going to do something useful because it creates a new density estimate instance with new (fake?) data.  I don't see what the point of that would be.  We want the plotting methods of a density estimate object to make plots of the data and KDE that are attributes of that object.  Not some random new data.
Can you try just writing a method which makes a 2d contour plot of the KDE for the simple KDE class.  For a 2d data set it will be straightforward, for more dimensions it should get arguments telling it which dimensions are the plot axes, and the values of the other dimensions to make the 'slicing' over.

resolved some commits and add a very simple method in kde class for sliced plot.

Basically this does not quite make sense yet, as the idea of having a plotting module is to import the functions from that module into the main density estimate module.
Also I would prefer to name the module plot_utils (we now have transform_utils), hopefully it is not too much trouble to rename it via git mv.

I think there is 1 suggestion still to be looked at (the plot title)


Guidance Needed: Mapping Single Points Using Homography for Images of Different Sizes

I've been exploring your library and am genuinely impressed with its performance. As I'm relatively new to point/line mapping, I'm seeking guidance on transforming single points after estimating the homography matrix. Using the method:
H = hest.ransac_point_line_homography(matched_kps0, matched_kps1, line_seg0, line_seg1, tol_px, False, [], [])

I obtained the homography matrix H. My intention was to use this matrix to map individual points from img0 to img1. To achieve this, I utilized:
mapped_point = cv2.perspectiveTransform(np.array([[[x, y]]], dtype='float32'), H)
x_mapped, y_mapped = mapped_point[0][0]

However, the results from this transformation were not as expected. Notably, when using the homography matrix H with cv2.warpPerspective() to warp the entire image, the results are accurate and as anticipated. Furthermore, the images I'm working with differ in size:
img0: (1080, 1920)
img1: (2020, 3584)
Could the differing image dimensions influence the transformation results? If so, how should I appropriately handle this scenario?
Any insights or guidance on whether I need to adopt a different approach or utilize another function would be greatly appreciated.
Thank you for your assistance!

@rpautrat Thank you for the detailed response. I tested it but the H derived from
H = hest.ransac_point_line_homography(matched_kps0, matched_kps1, line_seg0, line_seg1, tol_px, False, [], [])

Is a 3x3 Matrix so can't be reshaped using
H = (H / H[-1, -1]).reshape(8)

# ERROR:
# RuntimeError: shape '[8]' is invalid for input of size 9

If I reshape it to 9 using
H = (H / H[-1, -1]).reshape(9)

# ERROR: from the relevant function
# geometry.py, line 67, in warp_points_torch
# H_mat = torch.cat([H, torch.ones_like(H[..., :1])], axis=-1).reshape(out_shape)
# RuntimeError: shape '[3, 3]' is invalid for input of size 10

Can you guide me how to resolve this?

Sorry I forgot one part. You should reshape it like this:
H = H.reshape(9)[:-1] / H[-1, -1]

I think there are more issues around reshaping
Now with inverse=True
H_mat = torch.inverse(H_mat)
RuntimeError: linalg.inv: The input tensor A must have at least 2 dimensions.
Now with inverse=False
warped_points = torch.einsum('...nj,...ji->...ni', points, H_mat.transpose(-2, -1))
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got -2)
Here's my code for more clearity
from gluestick.models.two_view_pipeline import TwoViewPipeline
from gluestick.drawing import plot_images, plot_lines, plot_color_line_matches, plot_keypoints, plot_matches
from gluestick import batch_to_np, numpy_image_to_torch, GLUESTICK_ROOT
from gluestick.geometry import warp_points_torch
import homography_est as hest
import cv2
import numpy as np
import random
import torch

# Global variables

MAX_N_POINTS, MAX_N_LINES = 1000, 300
DATASET_BASE = "/path/to/images"
IMG_PATH1 = DATASET_BASE + 'path_to_image2.jpg'
IMG_PATH2 = DATASET_BASE + 'path_to_image1.jpg'
IMG1 = None
IMG2 = None
MATRIX = None
TOL_PX = 1.0

def transform_point(x, y, H):
    # Convert to homogeneous
    pt_src = np.array([[x], [y], [1]])

    # Transform using H
    pt_dst_homogeneous = np.dot(H, pt_src)

    # Convert back to Cartesian
    w = pt_dst_homogeneous[2][0]
    x_mapped = pt_dst_homogeneous[0][0] / w
    y_mapped = pt_dst_homogeneous[1][0] / w

    return x_mapped, y_mapped

def click_event_img1(event, x, y, flags, param):
    global MATRIX, IMG1

    if MATRIX is not None and event == cv2.EVENT_LBUTTONDOWN:
        _map_and_display_points(IMG1, x, y, MATRIX)

def _map_and_display_points(IMG1, x, y, MATRIX):
    color = (0, 0, 255)

    img1_copy = IMG1.copy()
    cv2.circle(img1_copy, (x, y), 10, color, -1)
    cv2.imshow('Image 1', img1_copy)

    points = torch.tensor([[[x, y]]], dtype=torch.float)
    warped_points = warp_points_torch(points, MATRIX, inverse=False)
    print(warped_points)

    # mapped_point = cv2.perspectiveTransform(
    #     np.array([[[x, y]]], dtype='float32'), MATRIX)
    # x_mapped, y_mapped = mapped_point[0][0]
    # x_mapped, y_mapped = transform_point(x, y, MATRIX)
    # print(x_mapped, y_mapped, "Mapped Values")
    # Check if the point lies within the boundaries of img2
    # x_mapped = x_mapped * (3584 / 1920)
    # y_mapped = y_mapped * (2020 / 1080)

    # if 0 <= x_mapped < 3584 and 0 <= y_mapped < 2020:
    #     print("The point lies within the boundaries of img2.")
    # else:
    #     print("The point is outside the visible area of img2.")

    img2_copy = IMG2.copy()
    # img2_copy = cv2.resize(img2_copy, (1080, 1920))
    # cv2.circle(img2_copy, (int(x_mapped), int(y_mapped)), 10, color, -1)
    cv2.imshow('Image 2', img2_copy)

def get_configs():
    # Evaluation config
    return {
        'name': 'two_view_pipeline',
        'use_lines': True,
        'extractor': {
            'name': 'wireframe',
            'sp_params': {
                'force_num_keypoints': False,
                'max_num_keypoints': MAX_N_POINTS,
            },
            'wireframe_params': {
                'merge_points': True,
                'merge_line_endpoints': True,
            },
            'max_n_lines': MAX_N_LINES,
        },
        'matcher': {
            'name': 'gluestick',
            'weights': str(GLUESTICK_ROOT / 'resources' / 'weights' / 'checkpoint_GlueStick_MD.tar'),
            'trainable': False,
        },
        'ground_truth': {
            'from_pose_depth': False,
        }
    }

def load_model(conf, device):
    model = TwoViewPipeline(conf).to(device).eval()
    return model

def get_images():
    gray1 = cv2.imread(IMG_PATH1, 0)
    # gray1 = cv2.resize(gray1, (0, 0), fx=0.25, fy=0.25)
    gray2 = cv2.imread(IMG_PATH2, 0)
    # gray2 = cv2.resize(gray2, (0, 0), fx=0.25, fy=0.25)
    return gray1, gray2

def create_model_input(x1, x2, device):
    # Convert images into torch and execute GlueStick💥
    torch_gray0 = numpy_image_to_torch(x1).to(device)[None]
    torch_gray1 = numpy_image_to_torch(x2).to(device)[None]
    x = {'image0': torch_gray0, 'image1': torch_gray1}
    return x

def run_model(model, x):
    return model(x)

def log_preds(pred):
    print(
        f"Detected Keypoints: {pred['keypoints0'].shape[1]} img1, {pred['keypoints1'].shape[1]} img2"
    )
    print(
        f"Detected Lines: {pred['lines0'].shape[1]} img1, {pred['lines1'].shape[1]} img2\n"
    )
    print(
        f"Matched {(pred['matches0'] >= 0).sum()} points and {(pred['line_matches0'] >= 0).sum()} lines"
    )

def create_homography_matrix(pred):
    kp0, kp1 = pred["keypoints0"], pred["keypoints1"]
    line_seg0, line_seg1 = pred["lines0"], pred["lines1"]

    kp_matches = pred["matches0"]
    line_matches = pred["line_matches0"]

    valid_matches = kp_matches != -1
    match_indices = kp_matches[valid_matches]
    matched_kps0 = kp0[valid_matches]
    matched_kps1 = kp1[match_indices]

    valid_matches = line_matches != -1
    match_indices = line_matches[valid_matches]
    matched_lines0 = line_seg0[valid_matches]
    matched_lines1 = line_seg1[match_indices]

    line_seg0 = [hest.LineSegment(l[0], l[1])
                 for l in matched_lines0.reshape(-1, 2, 2)]
    line_seg1 = [hest.LineSegment(l[0], l[1])
                 for l in matched_lines1.reshape(-1, 2, 2)]

    # H, _ = cv2.findHomography(matched_kps0, matched_kps1, cv2.RANSAC, 10.0)

    H = hest.ransac_point_line_homography(matched_kps0,
                                          matched_kps1,
                                          line_seg0,
                                          line_seg1,
                                          TOL_PX,
                                          False,
                                          [],
                                          [],
                                          )

    H = torch.tensor(H, dtype=torch.float)
    H = H.reshape(9)[:-1] / H[-1, -1]
    # H = (H / H[-1, -1]).reshape(8)

    # H = hest.ransac_point_homography(
    #     [matched_kps0],
    #     [matched_kps1],
    #     TOL_PX,
    #     False,
    #     []
    # )
    return H

def setup_interactive_viewer(img1, img2):
    global MATRIX
    # Display images
    cv2.imshow('Image 1', img1)
    cv2.setMouseCallback('Image 1', click_event_img1)

    cv2.imshow('Image 2', img2)

    # warped = cv2.warpPerspective(img2, MATRIX, img1.shape[:2][::-1])
    # cv2.imshow('Transformed ', warped)

    # Keep the window open until 'q' key is pressed
    while cv2.waitKey(1) & 0xFF != ord('q'):
        pass

    cv2.destroyAllWindows()

def main():
    global IMG1, IMG2, MATRIX

    conf = get_configs()
    device = 'cuda' if torch.cuda.is_available() else 'cpu'
    pipeline_model = load_model(conf, device)
    img1, img2 = get_images()
    print("shape of img1", img1.shape)
    print("shape of img2", img2.shape)
    model_input = create_model_input(img1, img2, device)
    preds = run_model(pipeline_model, model_input)
    log_preds(preds)
    preds_np = batch_to_np(preds)
    H = create_homography_matrix(preds_np)
    print(f"Homography Matrix Created...")

    IMG1 = img1
    IMG2 = img2
    MATRIX = H

    setup_interactive_viewer(img1, img2)

if __name__ == "__main__":
    main()

I think from the above code you can easily reproduce this error

and it's quite accurate. Thank you for the great work :heart:

Great, happy to hear that!


"Add point" button in "Draw polygon" task appears incorrectly

When the task index is > 0, an additional button "previous" is added to the task for navigating to the previous task. This results in "Add point" button to look incorrectly due to insufficient space.

Hi @shobhitagarwal1612! Do you have bandwidth for this one?

Couple of other approaches considered:

Replace text buttons with icon based buttons
Dynamically reduce the size of the existing buttons as we add new buttons
Add more buttons vertically if we're out of horizontal space.

We spoke. The "Skip" and revert icon are mutually exclusive, with the former being shown when there are zero vertices specified, the latter when N>=1. That should provide enough space for all buttons, in English at least.


Memory freed by GC doesn't seem to claim properly when same slice variable is initialised in a loop

I am initialising the same slice variable in a loop, why is the memory going up?
Since I am making the same variable point to a different memory every time, earlier memory should be cleaned up.
https://play.golang.org/p/g-UY3AqlInV
package main
import (
"fmt"
"runtime"
//"time"
)
var testslice [] byte
var m runtime.MemStats
func main() {
    for i := 0; i < 100; i++{
testslice = make([]byte, 100000)
fmt.Printf("test slice length %d", len(testslice))
runtime.ReadMemStats(&m)
fmt.Printf(" memory allocated %d %d\n",  m.Alloc, m.NumGC)
//runtime.GC()
    }

}
test slice length 100000 memory allocated 224592 0
test slice length 100000 memory allocated 331104 0
test slice length 100000 memory allocated 437616 0
test slice length 100000 memory allocated 544128 0
test slice length 100000 memory allocated 650640 0
test slice length 100000 memory allocated 757152 0
test slice length 100000 memory allocated 863664 0
test slice length 100000 memory allocated 970176 0
test slice length 100000 memory allocated 1076688 0
test slice length 100000 memory allocated 1183200 0
test slice length 100000 memory allocated 1289712 0
test slice length 100000 memory allocated 1396224 0
test slice length 100000 memory allocated 1502736 0
test slice length 100000 memory allocated 1609248 0
test slice length 100000 memory allocated 1715760 0
test slice length 100000 memory allocated 1822272 0
test slice length 100000 memory allocated 1928784 0
test slice length 100000 memory allocated 2035296 0
test slice length 100000 memory allocated 2141808 0
test slice length 100000 memory allocated 2248320 0
test slice length 100000 memory allocated 2354832 0
test slice length 100000 memory allocated 2461344 0
test slice length 100000 memory allocated 2567856 0
test slice length 100000 memory allocated 2674368 0
test slice length 100000 memory allocated 2780880 0
test slice length 100000 memory allocated 2887392 0
test slice length 100000 memory allocated 2993904 0
test slice length 100000 memory allocated 3100416 0
test slice length 100000 memory allocated 3206928 0
test slice length 100000 memory allocated 3313440 0
test slice length 100000 memory allocated 3419952 0
test slice length 100000 memory allocated 3526464 0
test slice length 100000 memory allocated 3632976 0
test slice length 100000 memory allocated 3739488 0
test slice length 100000 memory allocated 3846000 0
test slice length 100000 memory allocated 3952512 0
test slice length 100000 memory allocated 4059024 0
test slice length 100000 memory allocated 4165536 0
test slice length 100000 memory allocated 326192 1
test slice length 100000 memory allocated 432720 1
test slice length 100000 memory allocated 539248 1
test slice length 100000 memory allocated 645776 1
test slice length 100000 memory allocated 752304 1
test slice length 100000 memory allocated 858832 1
test slice length 100000 memory allocated 965360 1
test slice length 100000 memory allocated 1071888 1
test slice length 100000 memory allocated 1178416 1
test slice length 100000 memory allocated 1284944 1
test slice length 100000 memory allocated 1391472 1
test slice length 100000 memory allocated 1498000 1
test slice length 100000 memory allocated 1604528 1
test slice length 100000 memory allocated 1711056 1
test slice length 100000 memory allocated 1817584 1
test slice length 100000 memory allocated 1924112 1
test slice length 100000 memory allocated 2030640 1
test slice length 100000 memory allocated 2137168 1
test slice length 100000 memory allocated 2243696 1
test slice length 100000 memory allocated 2350224 1
test slice length 100000 memory allocated 2456752 1
test slice length 100000 memory allocated 2563280 1
test slice length 100000 memory allocated 2669808 1
test slice length 100000 memory allocated 2776336 1
test slice length 100000 memory allocated 2882864 1
test slice length 100000 memory allocated 2989392 1
test slice length 100000 memory allocated 3095920 1
test slice length 100000 memory allocated 3202448 1
test slice length 100000 memory allocated 3308976 1
test slice length 100000 memory allocated 3415504 1
test slice length 100000 memory allocated 3522032 1
test slice length 100000 memory allocated 3628560 1
test slice length 100000 memory allocated 3735088 1
test slice length 100000 memory allocated 3841616 1
test slice length 100000 memory allocated 3948144 1
test slice length 100000 memory allocated 4054672 1
test slice length 100000 memory allocated 4161200 1
test slice length 100000 memory allocated 4266880 2
test slice length 100000 memory allocated 1178776 2
test slice length 100000 memory allocated 1178808 2
test slice length 100000 memory allocated 646360 2
test slice length 100000 memory allocated 752888 2
test slice length 100000 memory allocated 859416 2
test slice length 100000 memory allocated 965944 2
test slice length 100000 memory allocated 1072472 2
test slice length 100000 memory allocated 1179000 2
test slice length 100000 memory allocated 1285528 2
test slice length 100000 memory allocated 1392056 2
test slice length 100000 memory allocated 1498584 2
test slice length 100000 memory allocated 1605112 2
test slice length 100000 memory allocated 1711640 2
test slice length 100000 memory allocated 1818168 2
test slice length 100000 memory allocated 1924696 2
test slice length 100000 memory allocated 2031224 2
test slice length 100000 memory allocated 2137752 2
test slice length 100000 memory allocated 2244280 2
test slice length 100000 memory allocated 2350808 2
test slice length 100000 memory allocated 2457336 2
test slice length 100000 memory allocated 2563864 2
test slice length 100000 memory allocated 2670392 2
test slice length 100000 memory allocated 2776920 2
test slice length 100000 memory allocated 2883448 2
Beginning memory was 224592 and end its 2883448.
If I explicitly call runtime.GC() within loop then memory stays same.

This is all behaving as expected. What about this do you think is wrong?
The garbage collector works in batches. It does not collect unreferenced items immediately.

The Go project does not use the issue tracker for questions.  Please use a forum for this discussion.  See https://golang.org/wiki/Questions.  Thanks.

This is all behaving as expected. What about this do you think is wrong?
The garbage collector works in batches. It does not collect unreferenced items immediately.

Sorry to bother you again..
But at the end of program, this is the o/p
test slice length 100000 memory allocated 2883448 2
which is way more than than the start of program ( 225K)...
Are you saying GC will run again in the background and free up the memory?
How to verify that?


‘cn' locale fix part1

‘cn' locale fix
I have some more that I don't understand and let me revise it in a subsequent version

if possible, please include them in this PR.

I found a suitable translation with the dictionary of the paper, etc. I submitted it

如果可能的话，请把它们包括在这个PR中。

It's done


feat: job offers 💸

Description ✏
This PR implements the job offers page. There are two tables, one for internships and one for full-time roles. There are also a variety of filters implemented.
Type of Change 🐞

[X] Feature - A non-breaking change which adds functionality.
[ ] Fix - A non-breaking change which fixes an issue.
[ ] Refactor - A change that neither fixes a bug nor adds a feature.
[ ] Documentation - A change only to in-code or markdown documentation.
[ ] Tests - A change that adds missing unit/integration tests.
[ ] Chore - A change that is likely none of the above.

Checklist ✅

[X] I have done a self-review of my code.
[X] I have manually tested my code (if applicable).
[ ] I have added/updated any relevant documentation (if applicable).

CI test will fail until previous PRs are merged (#596 and #595)


Add laravel 7 support

updating the dependency limits to support laravel 7

Coverage decreased (-1.1%) to 96.591% when pulling 0f6b05f0d08dd1843c6f78e48c69c29dabd752f6 on yswery:master into f4ab5e5478fc78ddf0cc104e6fd3123aa97157d3 on mohammad-fouladgar:master.

@yswery Thanks!


if run() returns a result, is result() even needed?

In this case, it might make sense to say that only read() defaults to trim=True. Could that be confusing?

Maybe it's better to say everything defaults to trim=True, so long as the output type is str? What's the common use case for ...run(stdout=str, ...)?


#275 Fixed parse error on plain scalars containing flow indicators

As reported in #275, plain scalars containing flow indicators ([], {}, and ,) caused either incorrect parse result or parse errors.
That was because fkYAML couldn't handle context (whether a current node is within flow context or not).
This PR has fixed the reported issues, and now fkYAML can successfully parse such plain scalars.

Pull Request Checklist
Read the CONTRIBUTING.md file for detailed information.

[x] Changes are described in the pull request or in a referenced issue.
[x] The test suite compiles and runs without any error.
[x] The code coverage on your branch is 100%.
[x] The documentation is updated if you added/changed a feature.

Please don't

The C++11 support varies between different compilers and versions. Please note the list of supported compilers. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with #ifdefs or other means.
Please refrain from proposing changes that would break YAML specifications. If you propose a conformant extension of YAML to be supported by the library, please motivate this extension.
Please do not open pull requests that address multiple issues.

The job using clang sanitizers on ubuntu-latest runner image failed due to segmentation faults.
(The same test on my local environment passes...)
As a workaround, I've changed the job to use the silkeh/clang:latest docker container, which seems to fix the issue somehow.

Now that all the tests pass successfully, I'll merge this PR.


Names for HS Institutions reference faker.name & faker.address

Feature Description
I don't like the default Faker city name generator. My testing yielded names like "South Melissamouth High School" which is a problem with the city, not with the work you did here.
I also don't love that professional suffixes (MD, PhD, DVM, DDS) are included in the names sent back. I would have expected only professional prefixes.
Proposed Solution
City: pull an actual list of cities...
Names: define a separate namer that doesn't include professional suffixes, and sometimes has only initials for the first/middle name.

For cities, unlike states, Faker actually generates the names.  I didn't look into the pattern it uses in any detail so I don't know what elements get fed in. That means we'd have to create our own list instead of using a generated list. That would significantly reduce the size of the generated pool.  Not a deal breaker, but worth considering.
For names, it absolutely should be broken into pieces to avoid the issues when full names are used.

Here it is. They use first names as part of the city generation. I'd prefer to have a smaller list that wasn't quite so strange looking. https://github.com/joke2k/faker/blob/001ddee39c33b6b82196fe6a5ecc131bca3b964c/faker/providers/address/en_US/init.py#L445-L450


List view

I needed a list view component that highlighted lines and allowed you to get the selected text on the screen.

OK, closing the PR then.
I don't think there is much upside in having a central repository for all custom controls, as with loosen rigor those controls would end up not being coherent (so probably should not be bundled together).
I think I prefer how the community addresses it in WPF - where whoever feels like it releases his/her own package with controls of their liking.
But even for those (or when just writing control implementations directly in your project), feel free to add me to PRs for a more loose review - always happy to help.


helm install cert-manager with errors

helm install cert-manager jetstack/cert-manager --version v1.11.1

I just tried this and it worked for me in a fresh cluster. Usually something like this might be because your machine is part of a corporate network and the traffic might be going via a proxy? Could that be the case here.
Does this command work for you now?
If not, can you do the following and paste the output?
helm repo ls

This could be a proxy issue or a temporary hosting issue.
Anyway, the issue is not present currently.


[FEATURE] Design Improvement of Quiz Section

Detailed description
Design Improvement of Quiz Section
Context

Possible implementation
No response
Additional information
If you need any help or have any doubts or questions let us know.
Thank you 😄.
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @kabir0x23,  can you let me know where is quiz section on the website is?

Hi @kabir0x23, can you let me know where is quiz section on the website is? So I can look at it.

hi @DhavalDobariya333
you can find quiz under: learn > prep > quiz

Hi @kabir0x23, can I do this issue?

sure

Hey @kabir0x23!  I'll like to work on this issue

Hey @kabir0x23 I'll like to work on this issue but I need to clarify something first. Is this a design + code implementation, meaning I come up with a new design and turn it into code?

Hey @jahtomini
Yes, we have to improve the design (layout design)
one of the example
buttons width and the quiz section width are miss match, so this is looking wierd

Oh I see, I came up with a redesign with further tweaks to the UI, let me know what you think

Nice, better


Migrate README.rst to README.md

Rewrite of README file from rst to md format with some updates of links to audreyfeldroy account and cookiecutter repository.

Rewrite of HISTORY file from rst to md also added


TearDown not available

Hello,
I am trying to set the "teardown" to false so that objects are not removed every time service stops.
Does SqlTabledependancy support teardown functionality. It was mentioned in the release notes version 5 as a new feature. I looked at the code and don't see a constructor for tabledepenndancy  which takes teardown as parameter

Please, version 5 in totally out of date and with bugs. Please do not use, because there are situations that will bring issue to your DB.

I am using version 6. Does version 6 support teardown?
I am trying to use a constructor like this
new SqlTableDependency(ConnectionString, teardown: false);

Teardown has been removed

Thanks  much!

So what is alternate  option for teardown?
Please clarify can i active connection all time .


"Print Test Page" in GNOME results in error

Issue description
Setting up a printer in GNOME and pressing "Print Test Page" (in system-config-printer) results in this error dialog:
CUPS server error
There was an error during the CUPS operation: 'No such file or directory'.

AFAIK, this is not a regression, it has simply never worked.
Steps to reproduce
$ nix-build -A system-config-printer
$ ./result/bin/system-config-printer
... add printer
... select "Print Test Page"
... watch the error message appear and no print being done

Technical details

System: NixOS 16.09.git.6bfe459 (Flounder) (latest master as of today)
Nix version: 1.11.2
Nixpkgs version: b71d71c576df3dbac8af76241260246010e08536  (latest master as of today)

I increased cups debug level with sudo cupsctl LogLevel=debug2. Didn't spot the problem.
Started system-config-printer again, now with --debug flag:

delete printer
add printer
select "Print Test Page" results in

...
Printing default test page
Authentication pass: 1
Authentication: password callback set
1030: 'No such file or directory'

After adding a small patch to system-config-printer I get a tiny bit more detail: cups.IPPError: (1030, 'No such file or directory')

Running system-config-printer under strace found it:
2033  access("/usr/share/cups/data/testprint", R_OK) = -1 ENOENT (No such file or directory)
2033  access("/usr/share/cups/data/testprint.ps", R_OK) = -1 ENOENT (No such file or directory)
2033  access("/usr/local/share/cups/data/testprint", R_OK) = -1 ENOENT (No such file or directory)
2033  access("/usr/local/share/cups/data/testprint.ps", R_OK) = -1 ENOENT (No such file or directory)
2033  open("/usr/share/cups/data/testprint", O_RDONLY) = -1 ENOENT (No such file or directory)

Ugh, system-config-printer has lots of /usr/share, /usr/lib hardcoded strings...

So the testprint file it's looking for comes from the cups-filters package. Should we make it compile time or runtime dependency? cc @abbradar (has done lots of printing stuff lately, AFAIR).

It looks like the offending part is here:
https://github.com/Distrotech/pycups/blob/140c5591190b7dfc2516eee7ef9cc0769696ce4c/cupsconnection.c#L3965-L3967
Perhaps we can set CUPS_DATADIR, somewhere?

Try wrapping system-config-printer with CUPS_DATADIR=${cups-filters}/share/cups (as @matthewbauer suggested but give it cups-filters instead) -- it may help.

@matthewbauer: Ah, there it is! I was looking in the wrong places (cups), found some false positives. I'll make a patch.

@abbradar: Will do.

Fixed in 90de10b3eeb5b327d1aa1c70564437fe1f3021fb.


Enable checkstyle for test code （rocketmq-namesrv and rocketmq-container）

Continue with #5122

Can I have a try?

Can I have a try?

Nice, it's assigned to you.


ui settings - bug when entering user page as auditor

Duplicate to #1178
Nutzer lokal hinzufügen - Nicht klassifizierter Fehler: . Für Details in den Log-Dateien nachsehen!
==> api.log <==
Oct 28 12:11:04 localhost fworch-api[3461300]: {"type":"http-log","timestamp":"2021-10-28T10:11:03.444+0000","level":"error","detail":{"operation":{"user_vars":{"x-hasura-visible-devices":"{ 1,2 }","x-hasura-role":"auditor","x-hasura-visible-managements":"{ 2,1 }","x-hasura-user-id":"2","x-hasura-tenant-id":"1","x-hasura-uuid":"uid=test,ou=tenant0,ou=operator,ou=user,dc=fworch,dc=internal"},"error":{"path":"$.selectionSet.insert_uiuser","error":"field \"insert_uiuser\" not found in type: 'mutation_root'","code":"validation-failed"},"request_id":"320257cf-3f7d-4c0f-a9f8-d5ddc94e563e","response_size":135,"request_mode":"error"},"request_id":"320257cf-3f7d-4c0f-a9f8-d5ddc94e563e","http_info":{"status":200,"http_version":"HTTP/1.1","url":"//v1/graphql","ip":"<IP_ADDRESS>","method":"POST","content_encoding":null}}}

reason: auditor rule is not allowed to insert into uiuser table
I guess we have to revisit the user settings menu and mechanisms.
Maybe we can also tackle a second issue here: displaying user table sometimes takes a few seconds.

fixed


NPM version is outdated

Can have we the latest update to NPM? It's 6 months old.

no update

no update

@kenberkeley we could use this one: https://github.com/Klainer/vue2-datatable/commit/76129dee74e92bc667fddb4d8324dd6bf7215940 in https://github.com/OneWayTech/vue2-datatable/issues/142


feat!: node version upgrade, axios upgrade

Fixes
This PR:
Drops support for node v 6, 8, 10
Checklist

[x] I acknowledge that all my contributions will be made under the project's license
[ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
[ ] I have read the Contribution Guidelines and my PR follows them
[ ] I have titled the PR appropriately
[ ] I have updated my branch with the main branch
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added the necessary documentation about the functionality in the appropriate .md file
[ ] I have added inline documentation to the code I modified

If you have questions, please file a support ticket.

@tiwarishubham635 @manisha1997  can you please trigger a release for this version?

Is anyone else getting axios3 is not a function or similar since updating?
I patched Axios in one of our repos recently and discovered they'd updated the default export (see comment).
So my imports changed from
const axios = require('axios');

to
const axios = require('axios').default;

Don't know enough about JS modules to understand if this change is also required here.

Never till launch.

Is anyone else getting axios3 is not a function or similar when calling send() since updating? (i'm on 8.1.0)
I patched Axios in one of our repos recently and discovered they'd updated the default export (see comment).
So my imports changed from
const axios = require('axios');

to
const axios = require('axios').default;

Don't know enough about JS modules to understand if this change is also required here.

Can you share your axios verion?
"@sendgrid/mail": "^8.0.0",
"axios": "^1.6.2",

these are mine

Is anyone else getting axios3 is not a function or similar when calling send() since updating? (i'm on 8.1.0)
I patched Axios in one of our repos recently and discovered they'd updated the default export (see comment).
So my imports changed from
const axios = require('axios');

to
const axios = require('axios').default;

Don't know enough about JS modules to understand if this change is also required here.

Can you share your axios verion?
"@sendgrid/mail": "^8.0.0",
"axios": "^1.6.2",

these are mine

Sure, I'm using
@sendgrid/mail at 8.1.0
axios 1.6.5


Replace Issue

I have this code...
return gulp.src('app/*.html')
    .pipe($.htmlReplace({
      vulcanized: {
        src: 'elements/elements.vulcanized.html',
        tpl: '<link rel="import" href="%s">'
      }
    }))
    .pipe(gulp.dest('dist'));

<!-- build:css styles/vendor.css -->
  <!-- bower:css -->
  <!-- endbower -->
  <!-- endbuild -->

  <!-- build:css styles/main.css -->
  <link rel="stylesheet" href="styles/main.css">
  <!-- endbuild-->

  <!-- build:js bower_components/webcomponentsjs/webcomponents.min.js -->
  <script src="bower_components/webcomponentsjs/webcomponents.js"></script>
  <!-- endbuild -->

  <!-- build:vulcanized elements/elements.vulcanized.html -->
  <link rel="import" href="elements/elements.html">
  <!-- endbuild-->
</head>
<body class="polymer-theme" unresolved>
  <!-- build:js scripts/vendor.js -->
  <!-- bower:js -->
  <!-- endbower -->
  <!-- endbuild -->

  <!-- build:js scripts/app.js -->
  <script src="scripts/app.js"></script>
  <!-- endbuild-->

After
<!-- build:css styles/vendor.css -->
  <!-- bower:css -->
  <!-- endbower -->

  <!-- build:css styles/main.css -->
  <link rel="stylesheet" href="styles/main.css">

  <!-- build:js bower_components/webcomponentsjs/webcomponents.min.js -->
  <script src="bower_components/webcomponentsjs/webcomponents.js"></script>

  <!-- build:vulcanized elements/elements.vulcanized.html -->
  <link rel="import" href="elements/elements.html">
</head>
<body class="polymer-theme" unresolved>
  <!-- build:js scripts/vendor.js -->
  <!-- bower:js -->
  <!-- endbower -->

  <!-- build:js scripts/app.js -->
  <script src="scripts/app.js"></script>

Hi @JosefJezek, sorry for the delay. First of all your HTML tag looks wrong. Look at usage section, you don't need anything other than task name. In fact this plugin will ignore such syntax because it thinks this is something for some other plugin :) So your HTML tag should look like this:
<!-- build:vulcanized -->

I made some changes and published v1.4.4, it shouldn't wrongly remove end tags, thank you for the report.
And also, just to make sure, look at options provided by this plugin if you didn't already. Since you're using it with some other replacement tools you may want to keep unused build tags or maybe don't want to remove those tags even if they're in your gulpfile. There are options for that.

Ok, thank you.


MeshMetric: issue collection from Test Friday session

Where is the problem?
https://docs.konghq.com/mesh/dev/policies/meshmetric/
What happened?

[x] Language: Refer to Prometheus “deployments” instead of “instances”.

Link: https://docs.konghq.com/mesh/dev/policies/meshmetric/#running-multiple-prometheus-instances
Fixed in: https://github.com/kumahq/kuma-website/pull/1689

[x] Issue: In config example (endpoint: http://otel-collector.observability.svc:4317), it shouldn’t include scheme (http://).

Link: https://docs.konghq.com/mesh/dev/policies/meshmetric/#opentelemetry-experimental
Fixed in: https://github.com/kumahq/kuma-website/pull/1689

[x] Issue: Missing default under spec.targetRef in the first two MeshMetric config examples.

Link: https://docs.konghq.com/mesh/dev/policies/meshmetric/#backends
Fixed in: https://github.com/kumahq/kuma-website/pull/1689

[x] Improvement: Better example for “And the Prometheus configurations:”.

Link: https://docs.konghq.com/mesh/dev/policies/meshmetric/#backends
Fixed in: https://github.com/kumahq/kuma-website/pull/1702

What did you expect to happen?
The above to be correct
Code of Conduct and Community Expectations

[X] I agree to follow this project's Code of Conduct
[X] I agree to abide by the Community Expectations

This was done.


Example for using DocFormer

Contains a sample code for training docformer

Hi @uakarsh and @shabie, thank you for providing the implementation of Docforme and examples to understand the methods.
In this post, I would like to understand the file named 'rvl_cdip_dataset.csv' you have used in the docformer/examples/dataset_creation_for_docformer.py file. I could not figure out what is the structure of this file. Please provide the file structure of this mentioned CSV file to know better.
Thanks,
Gyanendro

Hi @uakarsh and @shabie, thank you for providing the implementation of Docformer and examples to understand the methods.
In this post, I would like to understand the file named 'rvl_cdip_dataset.csv' you have used in the docformer/examples/dataset_creation_for_docformer.py file. I could not figure out what is the structure of this file. Please provide the file structure of this mentioned CSV file to know better.
Thanks, Gyanendro

Hi there,
Actually, this part was quite initial, and it was just a rough work kind of thing (this CSV has not been used anywhere, and we would remove it).
Meanwhile, I would suggest that, if you want to use DocFormer, you can open the colab notebook, which I have shared for the purpose of MLM, and extend it further for your usecase.
And, feel free to ping, if you have more questions on the same. Happy to help.
Akarsh

This code would help for using DocFormer for the task of MLM

Thank you so much Akarsh... I will go through the colab notebook... Thanks a lot...