Use with Enaml

Is there any way this could be implemented as a toolkit for use with Enaml?
Flexx does have a nice declarative way of defining the structure, however the data binding aspect is separated into different handlers, which (from experience) quickly gets tedious in larger applications.  Enaml nicely keeps everything contained.
Just wondering... I think flexx is pretty awesome 👍

Is there any way this could be implemented as a toolkit for use with Enaml?

Not sure, I don't have sufficient experience with Enaml to anwer this. But if you consider Flexx as a GUI backend, and if any GUI backend can be used with Enaml, than why not ...
You might be interested to know that the author of Enaml (Chirs Colbert) is also the author of PhosphorJS, which is the GUI library (and more) that Flexx uses for most of its layout.

which (from experience) quickly gets tedious in larger applications. Enaml nicely keeps everything contained.

Yes, this is a common problem. I think Flexx makes connecting things up really easy, but for larger applications / more complex interactions, we've felt that there might be room for improvement. Which is why I am interested to hear from you how Enaml keeps things more contained? Is it the declarative way to connect certain model attributed to views?

You might be interested to know that the author of Enaml (Chris Colbert) is also the author of PhosphorJS, which is the GUI library (and more) that Flexx uses for most of its layout.

Yes, I did see that.  Perhaps he would know if this is feasible.
I do know it's easy to add a toolkit for creating the widget tree and a different application/event loop to Enaml, but I'm unsure if it's possible to swap the data binding part (atom) of Enaml with an alternative.

interested to hear from you how Enaml keeps things more contained? Is it the declarative way to connect certain model attributed to views?

Basically, yes.  Instead of manually having to connect signals the Enaml parser does it for you, and it's all defined within the actual declarative widget tree, so handlers are not scattered all over.  I've used Enaml for several projects and it's by far the cleanest way I've ever seen to do a model based UI.

If I were to mock up a few examples rewritten using an "enaml flexx toolkit".
This example http://flexx.readthedocs.io/en/latest/ui/lineedit.html
when converted to enaml it would look something like:
from enaml.flexx.api import App, VBox, Label, LineEdit

enamldef Example(App):
    VBox:
        LineEdit: line:
             placeholder_text = 'type here'
             autocomp = ['foo','bar']
        Label:
             text << line.text # this is the @event.connect('line.text') and _change_label in one line

Enaml uses '<<' to indicate a read only binding.
Likewise
http://flexx.readthedocs.io/en/latest/ui/progressbar.html
Would be something like:
from enaml.flexx.api import App, HBox, Button, ProgressBar

enamldef Example(App):
    HBox:
        Button:
            text = "Less"
            clicked :: prog.value -= 0.1 # @event.connect(b1.mouse_down) to prog.value
        Button:
            text = "More"
            clicked :: prog.value += 0.1 # @event.connect(b2.mouse_down) to prog.value
        ProgressBar: prog:
            value = 0.1 # = sets Initial value

Enaml uses '::' or '>>' to indicate an outgoing event, emit, or write only binding.
The plotwidget example:
http://flexx.readthedocs.io/en/latest/ui/plotwidget.html
from enaml.flexx.api import App, VBox, HBox, Label, Slider, PlotWidget

enamldef Example(App):
    VBox:
        HBox:
            Label:
                text = "Frequency"
            Slider: s1:
                min = 1
                max = 10
                value = 5
                flex = 1
            Label:
                text = "Phase"
            Slider: s2:
                min = 0
                max = 6
                value = 0
                flex = 1
        PlotWidget:
            flex = 1
            xlabel = 'time'
            ylabel = 'amplitude'
            title = 'a sinusoid'
            xdata = [i/100 for i in range(100)]
            ydata << [s1.value * x * 2 * window.Math.PI + s2.value] # connects ydata to s1.value and s2.value

There's no examples I could find but you can also do two way data binding in enaml using the ':=' operator.
from enaml.flexx.api import App, LineEdit, VBox

enamldef Example(App):
    VBox:
        LineEdit: line1:
            pass
        LineEdit: line2:
            text := line1.text # Would keep both in sync, or they could both be tied to a model property

In all the examples they would need to be started in an enaml like way.
if __name__=='__main__':
    from enaml.flexx.app import FlexApplication
    app = FlexApplication()
    view = Example()
    view.show()
    app.start() # starts flexx io loop

It's a bit more ugly/verbose when defining multiple properties but you can see it keeps all the handlers / signals within the widget using them which really keeps large UI's organized well.

Thanks for these! I think we can distinguish between two approaches that make Enaml look so declarative. The first is the structure of the code, which is something that we can achieve pretty well in vanilla Flexx as it is, though its somewhat more verbose. For example the progressbar example:
class Example(Widget):
    def init(self):
        with HBox():
                 Button(
                     text = "Less",
                     clicked = ??
                 )
                 Button(
                       text = "More",
                       clicked = ??
                )
                self.prog = ProgressBar(
                    value = 0.1 # = sets Initial value
                )

The other approach (the main point of this discussion, I think) is the way that Enaml allows declaring connectivity in-line at the place where a widget is defined. I see two variants of this: a property having a calculated value (from one or more other properties), and an in-line event handler.
Enaml solves these by defining a Python/yaml -like format. One approach (as you suggested in the initial post) could be to make Flexx work with Enaml.
Another path could be to keep writing Python and come up with something to put at the question marks above. Something that is both feasible and easy enough to get that "declarative" feel ...

Thinking about the first case (a property that has a calculated value), let's look at the simplest example:
In Enaml:
LineEdit: line:
    ...
Label:
    text << line.text

Current Flexx inline approach (yes, this looks verbose in comparison!):
label = Label()
line = LineEdit(...)

@line.connect('text')
def on_line_change(self, *events):
     label.text =line.text

First things that popped to mind:
label = Label(text=lambda: line.text)  # a prop with a function as a value is a calculated prop
label = Label(text='<<line.text')  # some kind of prefix to indicate a calculated value

The problem with the above lambda is that there is no way for the code to know what events it should connect to. Unless we create an AST for the code and see what variables the lambda uses, which could work in theory, but only in Python, because in JS we cannot parse Python code.
The string is problematic because it refers to 'line.text', meaning that the variable 'line' should somehow be evaluated in the namespace that defines the string, which is possible with sys._getframe() but hacky/ugly/fragile.
Perhaps something like this could work though:
label = Label(text=follow(line, 'text'))

The follow() function does not have to perform any black magic; it just returns a special object that hold the object and event name that the label should connect to. The mechanics that sets properties can detect such an object and wire things up. I can even see such a pattern working for more complex cases:
plot = PlotWidget(...., xdata = [i/100 for i in range(100)],
                        ydata=follow(s1, 'value', s2, 'value', 'xdata',
                          lambda s1_val, s2_val, xdata: [s1_val * x + 2 * PI + s2_val for x in xdata]))

As for in-line event handlers, I think this would be more difficult, since lambdas are not really suited (cannot set an attribute in a lambda, for instance). I can imagine something like this:
def on_click(*events):
    prog.value += 1

button1 = Button(on_mouse_click=on_click)

where keyword args starting with on_ can be provided to easily provide handlers. Though this would safe only one line compared to how you'd write it now, so this might not be worth it.

To me, it seems like the simplest syntax for the user is most desirable.
label = Label(text=line.text)

line.text is an @event.prop proxy object, and Label(text= also maps to an @event.prop proxy object. It seems kind of weird to me that that is not enough for Flexx to connect the two?

line.text returns the value of the property, not the prop object.

Well, that's what I'm thinking; it should perhaps be the prop object instead. That's how libraries like vue.js and react.js accomplish it, I think.

I am not sure if I follow. That would mean that you'd have to write line.text.value everywhere. This brings us more or less back to the Signal system that we had a year and a half ago.
But thinking in this direction, maybe something like Label(text=line.prop('text')) could work as an alternative to Label(text=follow(line 'text')) ...

On 21.02.2017 01:47, Almar Klein wrote:

As for in-line event handlers, I think this would be more difficult,
since lambdas are not really suited (cannot set an attribute in a
lambda, for instance). I can imagine something like this:
def on_click(*events):
prog.value += 1
button1 = Button(on_mouse_click=on_click)

I can set attribute in lambda:
b1 = Button(on_mouse_click=lambda val: setattr(prog, 'value', val))
HTH
Niki

You can make a prop object and the value behave like they are the same thing by implementing the Object Proxy pattern.

The follow() function does not have to perform any black magic; it just returns a special object that hold the object and event name that the label should connect to.

At minute 10 in this video Enaml - A Framework for Building Declarative User Interfaces , he explains cases in which using something like follow wouldn't work. However I think most cases would be fine.

As for in-line event handlers ... where keyword args starting with on_ can be provided to easily provide handlers

This is similar to how kivy does it: https://kivy.org/docs/guide/lang.html. While it does not really save many lines (unless using lambdas with setattr) it does somewhat help keep the code more organized, and is nicer than doing separate bindings. Not sure how scoping would work with js handlers, aren't they in separate classes?

Regarding a potential enaml toolkit implementation...
I found out that with enaml can you can override the operators and define code tracers that can watch any object that can be observed with callbacks (ie so it could be made to observe changes to flexx.app.Model).
What is also interesting is that NEW custom operators can be defined (as is done here). So for instance you could define separate js handlers and py handlers by using different operators for each.
Since enaml manipulates python bytecode I doubt it can run in js. I'm not sure how that would impact it's use with flexx as I don't quite understand what get's converted to js and pushed to the browser and what doesn't.

On a side note (possibly should move to another discussion), is there a reason why flexx uses annotations for properties instead of a declarative property pattern (like traitlets, atom, kivy properties, django model fields, etc...)?  If properties then could be tagged with metadata, it would be easy to know if a property is or is a not a js property.
class MyModel(Model):

   # String, List, and Float would all be a subclass of some base Property object (ie an event.prop)
    baz = String().tag(js=False) # Py only property
    foo = Float(0) # defaults to both js and py
    bar = List([1,2,3]).tag(py=False)
    fee = Int(28).tag(writable=False) # Read only
    sig = Emitter() # Emitter

    @event.connect('foo')
    def handle_changes_to_foo_in_python(self, *events):
        ...  # knows it's a binding for both since foo is tagged for py and js by default

   @event.connect('bar')
   def handle_changes_to_foo_in_js(self, *events):
        ...  # knows it's a js only binding because bar is tagged py=False

Don't know, just wondering..

Thanks for that video link. Very interesting how Enaml achieves this feat of not having to setup any connections. Unfortunately, like you expected, this approach cannot be used in the JS part of our models, which makes it not well suited for Flexx.
I did some experimenting yesterday, and I think that via another approach we can achieve this:
# Simply track one property
label = Label(text=lambda: line.text)

# More complex case
plotwidget = PlotWidget(...,
    ydata=lambda:[slider1.value * x**2 + slider2.value * x for x in plotwidget.xdata]
    )

This would set up a handler wrapping the lambda, and connect that handler automatically to any properties used in the handler. Similarly, this allows writing handlers without having to specify any connection strings. The method below would get automatically called when any of the properties it uses
change, and its connections are also updated accordingly.
class MyModel(ui.Widget):
    @trackthis
    def some_method(self):
         self.label.text = 'The names: ' + ', '.join([c.name.value for c in self.children])

I'd need to look into this some more. I am not sure yet how this will affect performance, for instance. But I do like the idea of this. Also, how do events that don't originate from a property fit into this (perhaps just connect these as is done now)?

About the declarative property pattern: that is something that I've kept in mind, and I think this could still be implemented without having to change any of the existing behavior. I've been reluctant to do this though, because then we'd have 2 ways to do the same thing, and although the pattern is way more compact for simple cases, this advantage gets less when one adds proper documentation, or when you get complex enum structures, which are often solved much easier in a more imperative way. If you'd like to discuss this more, let's open a new issue.

when you get complex enum structures, which are often solved much easier in a more imperative way

I'd love to dive into a few specific examples and see how declarative UI libraries measure up against imperative approaches.

Some more thoughts ... which you may not like :)
Although I was enthusiastic at first, I now think that I do not like the inline lambda pattern:
Label(text=lambda: line.text)

The reason is that such a pattern can only be applied Python side, because models are only instantiated from Python. Propagating such an approach would make people write apps that cannot be exported to standalone HTML.
You could use a pattern of setting a property to a function in JS ... but I think that somewhat defeats the purpose. :
class MyModel(app.Widget):
    def init(self):
        self.line = TextEdit()
        self.label = Label()

    class JS:
        def init(self):
            self.label.text = lambda: self.line,text

What is seems to come down to, is that by its nature of classes that define Python and JS behavior, Flexx likes the handlers to be methods. Either on the main class (for Python-side behavior) or in the nested JS class (for JS-side behavior).
What we could make work (as I mentioned earlier in a slightly different form):
@event.react
def _react_line(self):
    self.label.text = self.line.text

Which would be a handler, that you can define either for Py or JS, and that gets automatically called whenever line.text changes. And it can be made as complex as you want. We could even consider leaving the decorator and make all methods with a certain prefix reactive.
In the same line, it could allow computed properties:
@event.computed
def full_name(self):
    return self.first_name + ' ' + self.last_name

This pattern would co-exists with the current @event.connect(...) pattern, I think, because I cannot think of a matching way to hook up to e.g. mouse events.

To clarify my previous comment. I think that if we go with the @react methods, we can also allow setting a property with a (reactive) function, and thus allow Enaml-like syntax. Its just that I don't think we should use that pattern in the examples (except specific ones).


Make condition delegates more flexible

Allow any number of properties in conditions

Partially fixed by setting the default value of conditions parameter as 0, so it can be omitted when not needed (just a temporary workaround)


feat: finset.uIcc on concrete structures

Match https://github.com/leanprover-community/mathlib/pull/18838

@eric-wieser, the changes to data.finset.locally_finite are just whitespace. I'll bump the SHA.

Well now this touches 14 files but only 13 are on the dashboard! Which one is the extra one?

Mathlib/Data/Finset/Lattice.lean

See comment above. There's one file with an unnecessary SHA bump.

bors merge


(krita) migrated from dtgm

Description
Embedded, updated, modernized... Rewritten.
Motivation and Context
Package is outdated and unmaintained.
How Has this Been Tested?
Testing environment.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[x] Migrated package (a package have been migrated from another repository)

Checklist:

[x] My code follows the code style of this repository.
[ ] My change requires a change to documentation (this mean usually the notes in the description of a package).
[x] I have updated the documentation accordingly (this mean usually the notes in the description of a package).
[x] All files is up to date with the latest Contributing Guidelines
[x] The added/modified package passed install/uninstall in the chocolatey test environment.
[x] The changes only affect a single package (not including meta package).

Original Location

Original Repository
[x] PR: https://github.com/dtgm/chocolatey-packages/pull/337
[x] The migration guidelines have been followed

@dimqua @AdmiringWorm @majkinetor I believe that I have done everything that is outstanding for this PR, so going to get it merged in...


Add diagrams with code structure and usage of various packages

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 88.45%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
291

Relevant Lines:
329

💛  - Coveralls


Add (failing) test for extension encoding

Hi,
this adds a test with a encoding for extension messages. It fails. I'll push a fix to @hyperspace/client, with which it does not fail anymore.

Fixed by https://github.com/hypercore-protocol/hyperspace-client/pull/6


Mac Catalyst

Unable to compile with Mac Catalyst
Showing All Messages
Building for Mac Catalyst, but linking in dylib built for iOS Simulator, file 'Documents/GitHub/BlueWallet/node_modules/react-native-tor/ios/Libsifir_ios.framework/Libsifir_ios' for architecture x86_64

Zero testing was done on Catalyst. Focus was really iOS.

Zero testing was done on Catalyst. Focus was really iOS.

Is there documentation that I can follow in order to tackle this?

Is there documentation that I can follow in order to tackle this?

@marcosrdz you probably want "Development and Building from Scratch" section from README, it has instructions on how to  build rust code, then ios code, then typescript code

@marcosrdz you probably want "Development and Building from Scratch" section from README, it has instructions on how to  build rust code, then ios code, then typescript code

Hey @marcosrdz Thanks for offering to tackle this!
I'm not really well versed in Catalyst and thus not exactly sure what the error means, If you can give me your insight I would be able to better point you in the correct direction relative to this repo.
That said, from my limited understanding of the cryptic message seems like it's looking for an architecture that it's not finding or incorrectly linking to (?).
It could be simply that something needs to be added to the dylib headers or the Info.plist of the framework, if so this is done here:
https://github.com/Sifir-io/sifir-rs-sdk/blob/main/sifir-ios/scripts/into_framework.sh#L31-L59
Again if you would give me more context on what the error means relative to Catalyst I would probably be able to give you better information.
Thanks again!
G

Hey @marcosrdz Thanks for offering to tackle this!
I'm not really well versed in Catalyst and thus not exactly sure what the error means, If you can give me your insight I would be able to better point you in the correct direction relative to this repo.
That said, from my limited understanding of the cryptic message seems like it's looking for an architecture that it's not finding or incorrectly linking to (?).
It could be simply that something needs to be added to the dylib headers or the Info.plist of the framework, if so this is done here:
https://github.com/Sifir-io/sifir-rs-sdk/blob/main/sifir-ios/scripts/into_framework.sh#L31-L59
Again if you would give me more context on what the error means relative to Catalyst I would probably be able to give you better information.
Thanks again!
G

https://github.com/BlueWallet/BlueWallet/pull/2487
I have this branch ready to build so you can see the same error as I do. Change the destination from an iPhone sim to "my mac" and press Run

https://github.com/BlueWallet/BlueWallet/pull/2487
I have this branch ready to build so you can see the same error as I do. Change the destination from an iPhone sim to "my mac" and press Run

https://stackoverflow.com/questions/58916615/how-do-i-build-for-mac-catalyst-x86-64-apple-ios-macabi
additional info

https://stackoverflow.com/questions/58916615/how-do-i-build-for-mac-catalyst-x86-64-apple-ios-macabi
additional info

Will try building for this target, but considering it's Tier2 , i'm keeping my fingers crossed that dependencies used in the rs-sdk will build. I'll keep you posted.
Thanks !

Will try building for this target, but considering it's Tier2 , i'm keeping my fingers crossed that dependencies used in the rs-sdk will build. I'll keep you posted.
Thanks !

Looks like This has been added as Tier3 on main channel Rust 1.5.0
https://github.com/rust-lang/rust/pull/77484
Should be able to compile for this target now without _too much trouble_™
Will add todo.

Any update on this issue?


ci: add GitHub Actions for CI

This PR adds GitHub Action for typecheck, test, and lint tasks.
ref. https://github.com/vercel/swr/pull/872#issuecomment-756849888
The setup is based on the configuration of TravisCI.
https://github.com/vercel/swr/blob/master/.travis.yml
The result of a GitHub Action is here.
https://github.com/koba04/swr/runs/1673115189?check_suite_focus=true
If you have any requests like running on various environments (Node versions and OS), I'll add them to the configuration.
I have also left the setting for TravisCI, so let me know if you no longer need the setting, then I'll remove it.

@shuding Thank you!

@shuding Thank you!


Add cache logic for llm api keys

Adds simple logic to save and persist llms api keys to a "cache" .env file on users' disk.
Automatically load these when available, so no need to call llm.set_api_key every time.

llm/main.py is changed as follow:
# Try loading api keys from cache on the fly
from llm.utils.apikeys import load_keys_from_cache
load_keys_from_cache()

# `llm.set_api_key` interface remains unchanged
# but will save any valid (syntax) api key to cache
from llm.utils.apikeys import configure_api_keys
def set_api_key(*args, **kwargs):
    return configure_api_keys(*args, **kwargs)

On the fly I also:

Fixed logic for loading keys from json file (there was a TypeError).
Rearranged the util.py file into a separate utils module for clarity.
Pushed a pyproject.toml config file for poetry lovers!

Nope. Poetry can be removed easy. But you're missing something :)

Thank you!


XML documentation texts should not end with exclamation or question mark

Following should trigger a violation:
/// <summary>
/// Some text!
/// </summary>

The reason is that if it is important, it should be placed inside a <note type="important"> tag, so that the user, when reading the comment (assuming the website), can immediately see that there is something to be aware of.
Following should NOT trigger a violation:
/// <summary>
/// Some text.
/// </summary>
/// <remarks>
/// <note type="important">
/// Some warning!
/// </note>
/// </remarks>

The same is valid for any other tag except of:

<note>
<para> inside a <note>
<c>
<code>

Beware of links, such as:
/// https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/loggermessage?view=aspnetcore-6.0.


Update dependencies

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (e397db9) to head (23265de).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #54   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           17        17
  Lines         4045      4044    -1
  Branches       585       585
=========================================
- Hits          4045      4044    -1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


NET CORE 3.0 MONO 6.4.0

Hi team,
I'm moving this from here:https://github.com/MicrosoftDocs/xamarin-docs.zh-cn/issues/56
@naughtyGitCat commented 2 days ago — with docs.microsoft.com
the Resources folder and then the layout folder does not contain Main.axml, only have activity_main.xml and content_main.xml

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 660b0f7c-9941-2db3-63bf-fc8a97765b1e
Version Independent ID: 5aa1e6f6-534a-05b9-c44a-1f62b24c201a
Content: Hello, Android: Quickstart - Xamarin
Content Source: docs/android/get-started/hello-android/hello-android-quickstart.md
Product: xamarin
Technology: xamarin-android
GitHub Login: @conceptdev
Microsoft Alias: crdun

Thanks for submitting an issue and we apologize for the delayed response. The requested updates haven't been made since the creation of the issue, and the timeline for resolution may vary based on resourcing, so the issue is being moved to an internal repo to better track it.


Broken aka.ms link to 1.4 latest

Describe the bug
The link for the latest 1.4 build is broken: https://aka.ms/windowsappsdk/1.4/latest/windowsappruntimeinstall-x64.exe
This is the link used by the big button in the latest downloads page:
https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads

Incidentally, it is also the link we use in the installer for our application. We had to move from v1.3 to 1.4 after the 1.3 installer stopped working also due to broken links....
Steps to reproduce the bug

go to
Click the "Download the latest x64 stable installer" button

You are redirected to: https://www.bing.com/?ref=aka&shorturl=windowsappsdk/1.4/latest/windowsappruntimeinstall-x64.exe
Expected behavior
The latest installer is downloaded
Screenshots
No response
NuGet package version
None
Packaging type
No response
Windows version
No response
IDE
No response
Additional context
No response

My apologies. This issue should be fixed now. There was some downtime transitioning over to the next patch.


Wrong texture in official demo

see the wheel texture

@PirateJC would you be able to check ?

What demo is that?

Done! :-)


Assert crash on launch solid_pen_lines num >= 2

Hello, thanks for a great way to run notepad-plus-plus!
A couple of days ago I did an update of the snap and I started getting this on launch:
a couple of these
ERROR: ld.so: object '/snap/notepad-plus-plus/409/gnome-platform/$LIB/bindtextdomain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
and then
notepad-plus-plus.exe: dlls/win32u/dibdrv/objects.c:812: solid_pen_lines: Assertion `num >= 2' failed.
I couldn't find this solid_pen_lines anywhere in your git log, so I assume some new thing platform, core, wine, something that you switched to has a dependency that I am not aware of.
I am on Ubuntu 22.04 and I installed using instructions on this page, worked great before, started crashing recently (unfortunately I dont know which version worked great or how to revert to it, this snap thing only uses stable and edge as versions?)
Cheers ...

Hello,
I'm facing the same problem, same ignored error messages about bindtextdomain.so, then the application window briefly shows up, and it crashes instantly showing exactly the same message about solid_pen_lines assertion.
It also happened after the last snap app update, in my case on Ubuntu 24.04.
I think it's worth to mention that when the app window appears for a fraction of a second, I can see the menu's buttons and the tabs of my previously opened files, so the app is almost finished loading.
Just in case it helps... Thanks!

Try fresh install of snap with snap data removed following this

Removing previous stuff works, it gets notepad-plus-plus starting ok.
I can still get it to crash though, if I go into setting and select dark mode, that throws me out again with same error.
So, maybe the issue was triggered by settings? When I started it with settings from before, it will crash, but starting with default settings after purge is enough to get it up?
I can avoid that setting obviously, but might also get triggered by more things than just dark mode?
Cheers ...

Yep, complete uninstall and reinstall worked for me too.
But I had made a copy of the settings in snap app .wine dir (drive_c/Users/<my_user>/AppLocal/Roaming/Notepad++). After restoring old settings it crushed again with the same error and it turns out I also had Dark Mode theme in my previous setup.
So yes it must have to do with that. Thanks for the tip tho, I could make it work again :)

That seems to be wine issue though I can reproduce with wine devel 9.20 AppImage as well.


how do i get ARCHE.ttl from my basrow tables

i guess you have some script but its not mentioned in the readme and it seems not to be part of the code

This repo is only meant to parse arche and vocabs schemas, create tables and upload it with a preset schema. Everything else should be handled seperately. Currently I use this repo. Once, I finalized the first part I will create a common more generalized repo. https://github.com/Auden-Musulin-Papers/amp-archive


The schema.xml doesn't work under Solr 9

Our current schema.xml works with solr 8.*. However, it doesn't work with solr 9. Some field types are not supported any more. We also need to replace the obsoleted field types as well.

The current Solr helm chart installs Solr 9.

Modify the location field type, so it can work under solr 9.
See the commit c9e95fa6009cc87ef5a16451d9da2b331c69b751


Optimization-specific keyword arguments

Optimizations are both essential for efficient computations and frequently get in the way.
We've allowed a little bit of customization by allowing users to turn them off with the optimize_graph=True keyword to compute().  However users also want to turn on or off or send keyword arguments down to specific optimizations.  For example "don't fuse in dask.array" or "send the keys=['x', 'y'] keyword to the fuse function".  The problem is that these optimizations are hard coded and hidden within the collection's ._optimize method and so are difficult to reach.
There are a few options here:

We could arrange the optimizations in some sort of data structure rather than a method (Theano does this)

We could develop a convention to send keyword arguments to specific optimizations.  For example like sklearn we could prepend the name of the optimization to the keyword argument:
x.compute(fuse_keys=['x', 'y'], inline_functions_fast_functions={inc, dec})

??

(I accidentally hit submit early, the title comment is now populated with actual content)
Currently I'm in favor of option 2.  Would love to hear other options:
cc @jcrist @shoyer

Hmmm, I'm not sure. Perhaps just enforce that optimizations accept `**kwargs``, and can ignore any keywords that don't apply to them?
Pro:

simple to implement, just splat all kwargs to all optimizations
no need to duplicate keywords to optimizations if they're the same fuse_keys=['x', 'y'], other_opt_keys=['x', 'y'], ...

Con:

Things that may be different must have different keyword names.

The best option might be to mix these. If prefixed by an optimization name, then forward to only that optimization, otherwise forward to all optimizations?

Yeah, as it turns out fuse_keys and cull_keys are quite different.
The fuse_keys= option is also simple to implement if we do it naively:
Before
def optimize(dsk, keys, **kwargs):
    """ Optimize dask for array computation

    1.  Cull tasks not necessary to evaluate keys
    2.  Remove full slicing, e.g. x[:]
    3.  Inline fast functions like getitem and np.transpose
    """
    keys = list(flatten(keys))
    fast_functions = kwargs.get('fast_functions',
                                set([getarray, getarray_nofancy, np.transpose]))
    dsk2, dependencies = cull(dsk, keys)
    dsk4, dependencies = fuse(dsk2, keys, dependencies)
    dsk5 = optimize_slices(dsk4)
    dsk6 = inline_functions(dsk5, keys, fast_functions=fast_functions,
                            dependencies=dependencies)
    return dsk6

After
def optimize(dsk, keys, fuse_keys=None, inline_functions_fast_functions={getarray, getarray_nofancy, np.transpose}, cull_dependencies=None):
    """ Optimize dask for array computation

    1.  Cull tasks not necessary to evaluate keys
    2.  Remove full slicing, e.g. x[:]
    3.  Inline fast functions like getitem and np.transpose
    """
    keys = list(flatten(keys))
    dsk2, dependencies = cull(dsk, keys, dependencies=cull_dependencies)
    dsk4, dependencies = fuse(dsk2, keys + (fuse_keys or []), dependencies)
    dsk5 = optimize_slices(dsk4)
    dsk6 = inline_functions(dsk5, keys, fast_functions=inline_functions_fast_functions,
                            dependencies=dependencies)
    return dsk6


bug: hanging connection causing blank screen

Bug Report
Description
Bug Summary:
If the Open WebUI backend hangs indefinitely, the UI will show a blank screen with just the keybinding help button in the bottom right.

Steps to Reproduce:
I noticed this because I run Open WebUI on my desktop, and Ollama on another machine. If I connected to a VPN on my desktop, LAN connections from my desktop would hang indefinitely. When I tried to boot up Open WebUI, I would just see the screen above.
The easiest way to reproduce this is to run nc -lp 11434 and try to use that as the Ollama server. You will see something like:
$ nc -lp 11434
GET /api/tags HTTP/1.1
Host: host.docker.internal:11434
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Python/3.11 aiohttp/3.9.5

As the Open WebUI backend tries to connect to Ollama, but nc will never respond to the request, nor will it close the connection. You will see the above screen when you open the web interface.
I was able to work around my VPN issue by splitting my connection to only route traffic that I want to access over the VPN with the virtual interface.
Expected Behavior:
You can see the web interface, and ideally there will be some sort of timeout to show a connection error.

Environment

Open WebUI Version: v0.1.124

Ollama (if applicable): NA

Operating System: NA

Browser (if applicable): NA

Reproduction Details
Confirmation:

[x] I have read and followed all the instructions provided in the README.md.
[x] I am on the latest version of both Open WebUI and Ollama.
[ ] I have included the browser console logs.
[x] I have included the Docker container logs.

Logs and Screenshots
Browser Console Logs:
NA, the connection issue is on the backend. There is nothing that fails in the UI logs.
Docker Container Logs:
This is what happens when you load the index page:
INFO:     <IP_ADDRESS>:58940 - "GET /api/config HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:58940 - "GET /api/v1/auths/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:58940 - "GET /api/changelog HTTP/1.1" 200 OK
INFO:apps.ollama.main:get_all_models()

If you kill nc, the UI will actually show up:
ERROR:apps.ollama.main:Connection error: Server disconnected
INFO:apps.ollama.main:get_all_models()
ERROR:apps.ollama.main:Connection error: Cannot connect to host host.docker.internal:11434 ssl:default [Connection refused]
INFO:     <IP_ADDRESS>:40308 - "GET /ollama/api/tags HTTP/1.1" 200 OK
INFO:apps.openai.main:get_all_models()
INFO:apps.openai.main:get_all_models()
INFO:     <IP_ADDRESS>:40308 - "GET /openai/api/models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:40308 - "GET /litellm/api/v1/models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:40308 - "GET /api/v1/modelfiles/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:40308 - "GET /api/v1/prompts/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:40308 - "GET /api/v1/documents/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:40308 - "GET /api/v1/chats/tags/all HTTP/1.1" 200 OK
INFO:apps.ollama.main:get_all_models()
ERROR:apps.ollama.main:Connection error: Cannot connect to host host.docker.internal:11434 ssl:default [Connection refused]
INFO:apps.ollama.main:get_all_models()
ERROR:apps.ollama.main:Connection error: Cannot connect to host host.docker.internal:11434 ssl:default [Connection refused]
INFO:     <IP_ADDRESS>:40308 - "GET /ollama/api/tags HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:40308 - "GET /static/favicon.png HTTP/1.1" 304 Not Modified
INFO:apps.ollama.main:get_all_models()
INFO:     <IP_ADDRESS>:40308 - "GET /api/v1/chats/ HTTP/1.1" 200 OK
ERROR:apps.ollama.main:Connection error: Cannot connect to host host.docker.internal:11434 ssl:default [Connection refused]
ERROR:apps.ollama.main:Connection error: Cannot connect to host host.docker.internal:11434 ssl:default [Connection refused]
INFO:     <IP_ADDRESS>:49174 - "GET /ollama/api/version HTTP/1.1" 500 Internal Server Error
INFO:apps.openai.main:get_all_models()
INFO:apps.openai.main:get_all_models()
INFO:     <IP_ADDRESS>:49174 - "GET /openai/api/models HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:49174 - "GET /litellm/api/v1/models HTTP/1.1" 200 OK

Screenshots (if applicable):
See above.
Installation Method
Docker, but probably does not matter.

PR welcome!

Updated some code on our dev branch, let us know if that did anything for you.

Hey @tjbck, I got around to testing the dev branch today. The problem still seems to happen. I should have said to use nc -lk 11434 or ncat -lk 11434, that will continue to listen to connections after the first one. If you do not use -k, refreshing the page will kill netcat, and the UI will appear.

having the same exact issue here but Im not using docker
❯ bash start.sh
Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
Loading WEBUI_SECRET_KEY from .webui_secret_key

  ___                    __        __   _     _   _ ___
 / _ \ _ __   ___ _ __   \ \      / /__| |__ | | | |_ _|
| | | | '_ \ / _ \ '_ \   \ \ /\ / / _ \ '_ \| | | || |
| |_| | |_) |  __/ | | |   \ V  V /  __/ |_) | |_| || |
 \___/| .__/ \___|_| |_|    \_/\_/ \___|_.__/ \___/|___|
      |_|

v0.2.0.dev1 - building the best open-source AI user interface.
https://github.com/open-webui/open-webui

INFO:     Started server process [72181]
INFO:     Waiting for application startup.
INFO:apps.litellm.main:start_litellm_background
INFO:apps.litellm.main:run_background_process
INFO:apps.litellm.main:Executing command: ['litellm', '--port', '14365', '--host', '<IP_ADDRESS>', '--telemetry', 'False', '--config', '/home/hirad/tool/WEBUI/open-webui/backend/data/litellm/config.yaml']
ERROR:apps.litellm.main:Failed to start subprocess: [Errno 2] No such file or directory
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-3' coro=<start_litellm_background() done, defined at /home/hirad/tool/WEBUI/open-webui/backend/apps/litellm/main.py:130> exception=FileNotFoundError(2, 'No such file or directory')>
Traceback (most recent call last):
  File "/home/hirad/tool/WEBUI/open-webui/backend/apps/litellm/main.py", line 145, in start_litellm_background
    await run_background_process(command)
  File "/home/hirad/tool/WEBUI/open-webui/backend/apps/litellm/main.py", line 106, in run_background_process
    process = await asyncio.create_subprocess_exec(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/subprocess.py", line 223, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 2820, in subprocess_exec
  File "uvloop/loop.pyx", line 2778, in __subprocess_run
  File "uvloop/handles/process.pyx", line 611, in uvloop.loop.UVProcessTransport.new
  File "uvloop/handles/process.pyx", line 112, in uvloop.loop.UVProcess._init
FileNotFoundError: [Errno 2] No such file or directory
INFO:     Application startup complete.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8080 (Press CTRL+C to quit)
INFO:     <IP_ADDRESS>:43710 - "GET / HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/entry/start.b373985c.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/chunks/scheduler.bcadb9af.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43744 - "GET /_app/immutable/chunks/index.33abb791.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/preload-helper.a4192956.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/singletons.7b5aa448.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/entry/app.5440acdc.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/chunks/index.bbb895f1.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /logo.svg HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/nodes/0.f688e5ad.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/chunks/globals.7f7f1b26.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/chunks/index.9487f70b.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/navigation.7ceac460.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/spread.8a54911c.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/assets/Toaster.ebb080d6.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43744 - "GET /_app/immutable/chunks/Toaster.svelte_svelte_type_style_lang.a4036649.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/assets/0.95c63d39.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/chunks/each.f3e982ad.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/assets/dayjs.beb6c5d8.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/index.dffa361e.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/index.2f7d24b6.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/assets/Messages.e8d876d7.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/assets/2.f41ff901.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43744 - "GET /_app/immutable/assets/Chat.2c02f5b5.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/chunks/index.e5c8c553.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/nodes/1.a362bd41.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/stores.94806990.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/nodes/2.c36cbd74.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/chunks/FileSaver.min.898eb36f.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/chunks/_commonjsHelpers.de833af9.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43744 - "GET /_app/immutable/chunks/index.b538cffa.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/chunks/index.c7f29288.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/index.ad993ff1.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/index.8f7d3b63.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/chunks/index.0c08649e.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43744 - "GET /_app/immutable/chunks/dayjs.min.e4172223.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/chunks/index.3d76b714.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/chunks/AdvancedParams.600b48aa.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/chunks/index.07ab8f60.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/index.1df8947f.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/create.324e2fd2.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43744 - "GET /_app/immutable/chunks/UserMenu.40971939.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/chunks/menu-trigger.9c7a531b.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/chunks/updater.a83b9f1f.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/chunks/Tags.3118ecf3.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/index.4a35aec8.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/index.c4ca6160.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43744 - "GET /_app/immutable/nodes/4.613b5850.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43710 - "GET /_app/immutable/chunks/Chat.67cb31ce.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43754 - "GET /_app/immutable/chunks/Messages.6443db80.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /_app/immutable/chunks/AddFilesPlaceholder.f82566d6.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/Selector.a20a77c5.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /_app/immutable/chunks/MenuLines.ccad0b33.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /favicon.png HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /manifest.json HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:43736 - "GET /api/config HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:43736 - "GET /static/favicon.png HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:43764 - "GET /_app/immutable/chunks/translation.fb9f8d12.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43736 - "GET /api/v1/auths/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:43736 - "GET /api/changelog HTTP/1.1" 200 OK
INFO:apps.ollama.main:get_all_models()
INFO:     <IP_ADDRESS>:43736 - "GET /assets/fonts/Arimo-Variable.ttf HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:43724 - "GET /api/v1/modelfiles/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:43754 - "GET /api/v1/documents/ HTTP/1.1" 200 OK
INFO:apps.ollama.main:get_all_models()
INFO:     <IP_ADDRESS>:43710 - "GET /api/v1/prompts/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:43744 - "GET /api/v1/chats/tags/all HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:43764 - "GET /ollama/api/tags HTTP/1.1" 200 OK
INFO:apps.openai.main:get_all_models()
INFO:apps.openai.main:get_all_models()
INFO:     <IP_ADDRESS>:43764 - "GET /openai/api/models HTTP/1.1" 200 OK

and I also have these vars set
export OLLAMA_MODELS=/run/media/hirad/HSSD/AI
I ran ollama with ollama serve command (no docker again)
I have llama3 and codellama
( ollama is running on gpu mode )
and the os is arch linux with lts kernel

@Hiradpi I'm going to guess this is on Windows. You'll need to set ENABLE_LITELLM=False as an environment variable since it's not supported running directly on Windows with the method we're using, and will soon be deprecated and removed from the project anyway.

this worked thanks a lot I added ENABLE_LITELLM=False to the .env file and it solved the problem thanks a lot <3

For clarity this is unrelated to the issue originally described. I just tested it again on the latest dev branch, and the UI is still blank when the Ollama service is reachable but unresponsive (such as when using netcat instead of ollama to listen to the port).

 Much thanks!

Now the UI will be blank for 5 seconds, and then it will appear after the backend connection to Ollama times out.

The UI appears after the models connection finishes. It is definitely much better than indefinitely showing a blank screen (enough that I would consider the original issue resolved), but I do think the UI should be able to show before that request completes. Feel free to close this issue, or use it to continue tracking the UI not appearing until this request finishes at your discretion.

@Zambito1  could you try disabling Ollama connection from settings > connections?

Hm, that menu actually has some weird behavior when I try to do that. When I navigate there while listening with netcat instead of Ollama, the UI will show Ollama and Open AI as disabled.

When the connection attempt to Ollama times out, the UI will change automatically, switching both to be enabled.

I did not interact with anything manually between the above screenshots.
If I have nothing listening on the port that Open WebUI expects Ollama to be on (neither netcat nor Ollama), these are both immediately populated and on when I navigate to the menu.

Note that I did not manually enter the URL between the above two screenshots. I just closed netcat, and then reopened the settings window.

Just added a fix to include a loading screen, let me know if you encounter the same set of issues!

On commit b7fc37d9 the settings will load for 12 seconds before timing out (2 sequential 6 second time outs).

After the connection times out, the settings will show with the URLs populated and the connections enabled.

If I disable the Ollama connection now, I am able to refresh the page without waiting on a blank screen like my earlier tests today.

Loading times are greatly improved since I followed this issue but I'm still getting 6 seconds of loading time. Is this intended?


Release with Swift 4.2 support

Is something pending to do a release with Swift 4.2 support?

Pushed! Sorry for the delay. Thanks for reminding me :)

Thanks!


Fix wheels workflow script

Should address #196

The results of the Download and list artifacts job confirm that the issue is fixed; we're no longer overwriting the artifacts


[Bug Report]: The API deployment for this resource does not exist

Module path
gpt ask
review-gpt CLI version
0.9.4
Describe the bug
openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
To reproduce
How do we set the deployment name (for azure openai service)? Docs need improving
I have set the key and API URL
Code snippet
python3 main.py ask "hello"

Relevant log output
python3 main.py ask "hello"
This command is in preview. It may be changed/removed in a future release.
The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/knack/invocation.py", line 224, in execute
    cmd_result = parsed_args.func(params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/knack/commands.py", line 149, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/knack/commands.py", line 256, in _command_handler
    result = op(client, **command_args) if client else op(**command_args)
                                                       ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/gpt_review/_ask.py", line 121, in _ask
    response = _call_gpt(
               ^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/gpt_review/_openai.py", line 91, in _call_gpt
    completion = openai.ChatCompletion.create(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 25, in create
    return super().create(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
                           ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/openai/api_requestor.py", line 298, in request
    resp, got_stream = self._interpret_response(result, stream)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/openai/api_requestor.py", line 700, in _interpret_response
    self._interpret_response_line(
  File "/opt/homebrew/lib/python3.11/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.

https://github.com/microsoft/gpt-review/issues/129#issuecomment-1877812109


AutoSizer with SSR outputs at 0x0 sized div

When I enabled SSR using the new defaultHeight/defaultWidth properties
https://github.com/bvaughn/react-virtualized/blob/master/source/AutoSizer/AutoSizer.js#L48-L49
The SSR content output from here https://github.com/bvaughn/react-virtualized/blob/master/source/AutoSizer/AutoSizer.js#L119 becomes:

Think the 0x0 sized div is coming from here:
https://github.com/bvaughn/react-virtualized/blob/master/source/AutoSizer/AutoSizer.js#L96
https://github.com/bvaughn/react-virtualized/blob/master/source/AutoSizer/AutoSizer.js#L101
My current workaround is to disableWidth/disableHeight when in SSR mode
<AutoSizer
	disableWidth={isserver()}
	disableHeight={isserver()}
	defaultWidth={client_hints.width}
	defaultHeight={client_hints.height}

Not sure if that is the expected behaviour

Okay I see what you are saying about disableWidth/disableHeight, if these are enabled, then the {({ width, height }) => properties dont get set, not what we want.
That still leaves me the issue where by the AutoSizer SSR html comes down from the server with fixed 0x0 dimensions.
So for the time between FirstPaint and FirstInteractive (ie scripts parsing), the dimensions of the autosizer div are restricted and the layout of child components is not the same as when in client rendering mode.
This div
https://github.com/bvaughn/react-virtualized/blob/master/source/AutoSizer/AutoSizer.js#L119
Is output as

Looking at a code change, possibly add special logic for when in SSR mode.

I would need to perserve the logic for https://github.com/bvaughn/react-virtualized/pull/84/files, however it looks like that is a client-side only issue, instead disable that logic when in SSR mode
I see that there is a prop this._autoSizer, seems could leverage this rather than an extra window === undefined test

How do you think about something like this.
      if (!disableHeight) {
          if (this._autoSizer) {
              outerStyle.height = 0;
          }
          childParams.height = height;
      }

      if (!disableWidth) {
          if (this._autoSizer) {
              outerStyle.width = 0;
          }
          childParams.width = width;
      }

This code patch does solve my original issue.
If this looks okay, let me know and I can wrap this up into a PR.
Do you have an SSR test case that could be forked?

Think this one is related https://github.com/bvaughn/react-virtualized/issues/851
From @mrasoahaingo's content, there are actually two places 0x0 is output

9.12.0 fixes the 2nd occurance (passing props to the GRID child component of the autosizer)
hopefully the patch above fixes the 1st occurance (the wrapper DIV inside the autosizer)

This div /source/AutoSizer/AutoSizer.js@master#L119
Is output as

This is intentional. You'll see on the react-virtualized demo page that the elements wrapped with AutoSizer also have this wrapping style. That style prevents AutoSizer from influencing or changing the size of its container. The overflow: "visible" lets the child render outside of the 0 width/height AutoSizer bounds. This is how the component works. What's important are the width and height parameters passed to the child function, which in the case of SSR, should be the defaultHeight and defaultWidth values.
I still feel like this issue is a big misunderstanding.

Think this one is related #851

Related in that #851 was what prompted me to add the defaultHeight and defaultWidth props to AutoSizer in the first place.

I found a work around, need to remember which one it was :)

Hmm, I've built a cut down SSR text case, and it works as you said.
https://github.com/djeeg/demo-autosizer
Must be some other thing within my page breaking the layout.
Sorry to raise this frivolous issue. Hope you get a chance to have a break soon.

No worries! I'm happy to hear that this is working correctly for the library. I hope you're able to track down the other issue!


Kivy VideoPlayer not working: Error loading Texture

I am trying to play a video.But i keep getting this error in the terminal.I have already installed gstreamer btw.Can someone help me solve this?
 Please ensure you have the appropriate permissions.
[ERROR  ] [Image       ] Error loading texture record_000034.avi
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [WindowSDL   ] exiting mainloop and closing.
[INFO   ] [Base        ] Leaving application in progress...

Try to install pillow and ffpyplayer first

Thank you so much it worked !!

Try to install pillow and ffpyplayer first

Thanks! It works on mine.
My error was:
[ERROR  ] [Image       ] Error loading <Resources/Videos/video2.mp4>


Add a "Edit on Github" Button below each sample heading

Inspired by the polymer docs: https://www.polymer-project.org/1.0/docs/devguide/local-dom
@kul3r4 wdyt?

would this remove "view source" on the top right of each sample?

View source got replaced by the playground. Also: edit sends a different message: (hopefully) makes it more obvious that everyone can submit samples.

ok, the position sounds good. An alternative to "edit on github" would be "source code".
What about also adding fork me on github ribbon on the main page?Maybe is it possible to add it just using pure css.


Audio issue with streaming while doing a video call.

Hi. First of all Thank you for this awesome library. I am using it for the streaming feature in my app.
Now I have to build a feature where a person can get over a video call with another person and stream the screen as well as the video call at the same time.
For video calling I am using Agora's video calling service. After integration the issue that I faced was with the Audio i.e I could here my sound in the stream but my sound was not going in the video call and also the other person's sound from video call was not received at my end and also did not go in the stream.
Can you please suggest something over here that could solve the problem?
Thanks in advance!!

You can't open microphone two times. Same with camera.
The first library that handle microphone will block it until it is released.
One solution could be use same microphone instance for both libraries, but I don't know if you can extract audio buffers from Agora or send buffers to Agora


Issue with StreamingDataset when not using all GPUs on host.

🐛 Bug
When initializing a StreamingDataset object, _DistributedEnv.detect() is called (code) and in the detect() function there a world_size check (code). This check fails for my use case when I am not using all GPUs on a host, such that world_size is set to 6 but torch.cuda.device_count() will return 8. 6 % 8 != 0, thus raising the error.
Perhaps this check failure is the intended behavior, but I do not know enough about the litdata repository to understand why the code should raise an error when world_size % device_count != 0. I would imagine that torch would run various checks when setting up a torch distributed environment, such that this check would not be needed unless it provides a particular purpose to StreamingDataset() or another object. If there is any insight here on (1) if this check is needed and (2) why it is needed, that would be great!
To Reproduce
This issue came up when experimenting with LitGPT. I don't think this section or the following sections are necessary and I will leave the blank for now. Please let me know if any of these sections would help and I can add more description.
Code sample
Not needed at the moment.
Expected behavior
Not needed at the moment.
Environment
Not needed at the moment.
Additional context

Hey gkroiz, do you want to submit a fix for it ?

I realized that when using _DistributedEnv.detect() in a multi-node environment where you are not using all available GPUs, it is not possible (at least with torch), to determine number of nodes. I will create a PR that mentions this.

@gkroiz Lot of great comments. Maybe we could have the following behaviour to unblock you.
By default, we are breaking as we don't have enough information. However, if the user provides extra environement variables: https://github.com/Lightning-AI/pytorch-lightning/tree/master/src/lightning/fabric/plugins/environments, we could accept the execution.

Yes, I can put together a PR with one of the solutions when I get the time.


cuda_error_out_of_memory when trying to run tensorflow/tensorflow/examples/tutorials/layers/cnn_mnist.py

When I run tensorflow/tensorflow/examples/tutorials/layers/cnn_mnist.py on GPU I get the cuda_error_out_of_memory.
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:906] DMA: 0
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:916] 0:   Y
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 970M, pci bus id: 0000:01:00.0)
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_driver.cc:1002] failed to allocate 3.00G<PHONE_NUMBER> bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_driver.cc:1002] failed to allocate 2.70G<PHONE_NUMBER> bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:397] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:404] error retrieving driver version: Permission denied: could not open driver version path for reading: /proc/driver/nvidia/version
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:364] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM
F c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\kernels\conv_ops.cc:605] Check failed: stream->parent()->GetConvolveAlgorithms(&algorithms)
To circumvent it, I thought of using config.gpu_options.per_process_gpu_memory_fraction or config.gpu_options.allow_growth, but I don't know where to set the session configuration as I don't see any sessions in the code. Also, is there any way I can set session configuration globally for one file?

What version of cuda and cudnn?
What version of TensorFlow? From Source?
@mrry, any ideas? It looks like the version reading code is linux/macos specific (reading proc).

The most likely explanation is that there isn't enough memory. There is usually a log message that includes the amount of free memory on the device, which I believe is printed before the log messages that appear in the issue report. (The failure to read the version is benign, since we just use it to print a more descriptive error on Linux and Mac OS X.)

Cuda - v8.0.60
cudnn - 5.1 for cuda 8.0
TensorFow - 1.0.1
Installed TensorFlow using pip
OS - Windows 10, 64 bit
Can you suggest me some workaround for now.

Please re-open if you can reproduce on a GPU with enough memory.


Error while running Test-VsanHealth on PowerShell Core

Code of Conduct

[X] I have read and agree to the Code of Conduct.
[X] Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
[X] Do not leave "+1" or other comments that do not add relevant information or questions.
[X] If you are interested in working on this issue or have submitted a pull request, please leave a comment.

VMware Cloud Foundation
v4.5
PowerShell Version
PS core 7.3.4
PowerCLI Version
v12.7.0
Module Version
v.1.1.0
PowerVCF Version
2.3.0
Guest Operating System
Windows Server 2019
Environment Details
No response
Description
See error details -
Error or Debug Output
Error details -
PS C:\Users\Administrator> Test-VsanHealth -cluster sfo-m01-cl01 -server sfo-vcf01.sfo.rainpole.io -user<EMAIL_ADDRESS>-pass VMw@re123!
 [06-12-2023_09:28:44] INFO Starting the call to the Test-VsanHealth cmdlet.
 [06-12-2023_09:28:44] INFO Connecting to 'sfo-vcf01.sfo.rainpole.io'...
Connect-VIServer: 6/12/2023 9:28:45 AM Connect-VIServer  Could not connect using the requested protocol. Additional Information: The
content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml;
charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The
first 1024 bytes of the response were: '   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> <html class="base-app-style"> <!--[if lte IE 8]> <link rel="stylesheet"
type="text/css" href="../../resources/css/loginIE8-7.css"/> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--> <!--<link
href="../../resources/css/login.css" rel="stylesheet"> --> <!--<![endif]--> <head>    <meta http-equiv="Content-Type"
content="text/html; charset=UTF-8">    <meta http-equiv="X-UA-Compatible" content="IE=5, IE=8, IE=10">
<title>Login</title>     <script type="text/javascript">       // copying JSP variables to JS       var protocol =
"websso";       var responseMode = "";       var tenant_brandname = "";       var tenant_logonbanner_title = 'vCenter
Server Managed by SDDC Manager'.trim();       var tenant_logonbanner_content = '"This vCenter Server is managed by
SDDC Manager (sfo-vcf01.sfo.rainpole.io).\nMaking modifications directly in vCenter Server may break SDDC Manager
workflows.\nPlease consult the product documentation'.
 [06-12-2023_09:28:45] ERROR Cannot connect to server 'sfo-vcf01.sfo.rainpole.io'. Check your environment and try again. [06-12-2023_09:28:45]   ERROR at Script Line 1042
 [06-12-2023_09:28:45]   Relevant Command: Write-PowerManagementLogMessage -Type ERROR -Message "Cannot connect to server '$server'. Check your environment and try again." -Colour Red
 [06-12-2023_09:28:45]   ERROR Message: Cannot connect to server 'sfo-vcf01.sfo.rainpole.io'. Check your environment and try again.
 [06-12-2023_09:28:45] INFO Completed the call to the Test-VsanHealth cmdlet.
Debug-CatchWriterForPowerManagement: Cannot connect to server 'sfo-vcf01.sfo.rainpole.io'. Check your environment and try again.

Expected Behavior
NA
Actual Behavior
NA
Steps to Reproduce
Run the cmdlet.
Log Fragments and Files
No response
Screenshots
No response
References
No response

Hi Bhumitra,
Here I see the usage of the cmdlet going wrong. Please see the example for Test-VsanHealth cmdlet below. The expected value for -server parameter is a the name of the Virtual Center Server and not SDDC Manager. Hence was the issue, after giving right information, we are able to see Test-VsanHealth is working fine as shown in the attached snapshot.

PS C:\Program Files\PowerShell\7> get-help Test-VsanHealth -examples

NAME
    Test-VsanHealth

SYNOPSIS
    Check the vSAN cluster health

    -------------------------- EXAMPLE 1 --------------------------

    PS > Test-VsanHealth -cluster sfo-m01-cl01 -server sfo-m01-vc01 -user<EMAIL_ADDRESS>-pass VMw@re1!
    This example connects to a vCenter Server and checks the state of the vSAN cluster health

Regards,
Sowjanya.V


Cannot connect to local posgres

Hi,
First, thank you a lot for this template. I'm new to the API world and trying to deploy my own one on GCP. But first I'm developing locally. But I'm struggling using the local db.
I first run postgres on a container locally with docker run --rm   --name pg-docker -e POSTGRES_DB=postgres_test_db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data  postgres:12.3-alpine
Then if I run PYTHONPATH=. alembic revision --autogenerate -m "initial setup", I have the following error message:
...
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

In config.py I have url = 'postgresql+psycopg2://postgres:postgres@localhost/postgres_test_db'.
Is there any documentation that could help me?
I'm running everything on Ubuntu (20.04), use vscode and poetry. If I run psql -U postgres -h localhost it connects to the database as expected.

I could solve it. Actually the command PYTHONPATH=. alembic revision --autogenerate -m "initial setup" was using the url in  schemas/secrets_config.py. So after modified this one according to my own settings, it worked fine.


Use correct notation of abbreviations in German translation

Current Implementation
I've seen German texts in the app that contains occurrences of "z.B." written. I.e. without a blank between "z." and "B.".
(Example of where I found it)
Suggested Enhancement
In German the correct notation is "z. B.". I.e. with a blank between "z." and "B.".
My suggestion is to replace all occurrences of "z.B." or "Z.B." by their correct notations "z. B." or "Z. B.".
Also, other abbreviations like "u.a." (correct: "u. a.") might as well be written incorrectly, although I've not discovered them yet.
See also DIN 5008, Abkürzungen on Wikipedia. They suggest to add a Geschütztes Leerzeichen instead of a normal blank.
Expected Benefits
The app looks more professional if correct writing and spelling is being used.

Internal Tracking ID: EXPOSUREAPP-8210

I think z.B. got a nbsp in between (in all html stuff) and I would further suggest to use a narrow no-break space instead.

@jucktnich @UweKeim Thanks for proposal.

Internal Tracking ID: EXPOSUREAPP8210-
Corona-Warn-App Open Source Team

@dsarkar
Please cross check the implementation under Android and move to documentation repo if necessary.
Thanks!

@Ein-Tim if we would decide to use narrow non breakingspaces it does also affect iOS

@jucktnich
But it affects both, iOS & Android, doesn't it?
Issues that affect both apps, iOS and Android, are moved to the documentation repo.

Oh yeah sorry, didn't read it correct, sorry. My English teacher would be embarrassed 😂


Error related to rocm-dkms installation

I'm trying to use HIP. I need to install rocm on linux. I followed this instruction but when I do this command:
sudo apt install rocm-dkms
I get this error:   CC [M]  /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_ib.o   CC [M]  /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_pll.o   CC [M]  /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_ucode.o /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_bios.c: In function ‘amdgpu_read_platform_bios’: /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_bios.c:200:9: error: implicit declaration of function ‘pci_platform_rom’ [-Werror=implicit-function-declaration]   200 |  bios = pci_platform_rom(adev->pdev, &size);       |         ^~~~~~~~~~~~~~~~ /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_bios.c:200:7: warning: assignment to ‘uint8_t *’ {aka ‘unsigned char *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]   200 |  bios = pci_platform_rom(adev->pdev, &size);       |       ^   CC [M]  /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_bo_list.o   CC [M]  /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_ctx.o   CC [M]  /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_sync.o   CC [M]  /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_gtt_mgr.o cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:275: /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu/amdgpu_bios.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.build:522: /var/lib/dkms/amdgpu/3.10-27/build/amd/amdgpu] Error 2 make: *** [Makefile:1757: /var/lib/dkms/amdgpu/3.10-27/build] Error 2 make: Leaving directory '/usr/src/linux-headers-5.4.0-56-generic'
My CPU is an old NVIDIA 1060 that support CUDA, but I guess it is not an issue :(

Which distro and Linux kernel are you using?

@labidus, Please try latest ROCm 6.0.2 (HIP 6.0.32831) to see if your issue still exists? If resolved, please close the ticket. Thanks.


Basic tests for the StatsD client API

There are some forthcoming additions to the StatsD client API I'd like to submit, but before that I want to make sure there is adequate test coverage for the existing functionality to ensure my changes don't break anything.
In this PR:

Added dev dependencies on should (expectations) and mocha (test runner).
Implemented a set of tests for the main StatsD methods (timing, increment, decrement, gauge, histogram, set).

test works great! Thanks for this PR!


Clarify that event handling does not affect Input

Closes #76871
Seen this pop up in at least two issues now, and while the documentation makes it clear what it does affect it wasn't obvious what it didn't, so thought it'd be good to point out
Might be good to add some notes on this in the online documentation about input handling as well

I am not sure, if this is the best location for explaining this behavior.
In the linked issue, they use Input.is_action_pressed, but not Control.accept_event or Viewport.set_input_as_handled.
Maybe instead Input.is_action_pressed should be extended by a clarification like "This reflects the global input state and is not influenced by Control.accept_event or Viewport.set_input_as_handled".

Sure I'll add it there too

Thanks!

Thank you!

Cherry-picked for 4.0.3.


Long line multi-var statement produces weird indentation

Hi!
Thanks for the project, it is awesome 💛
I've been running it in some of our code bases and I found this multiline var that results in different indentation for the body of the assignment. I thought it may be a thing to improve, although I'm not sure.
Input
function test () {
  var hiddenPropertyName = pageVisibility.getDocumentHiddenPropertyName( document ),
    visibilityChangeEventName = pageVisibility.getDocumentVisibilitychangeEventName( document );
}

Output
function test() {
  var hiddenPropertyName = pageVisibility.getDocumentHiddenPropertyName(
    document
  ),
    visibilityChangeEventName = pageVisibility.getDocumentVisibilitychangeEventName(
      document
    );
}

Expected output (maybe?)
function test() {
  var hiddenPropertyName = pageVisibility.getDocumentHiddenPropertyName(
      document
    ),
    visibilityChangeEventName = pageVisibility.getDocumentVisibilitychangeEventName(
      document
    );
}

https://jlongster.github.io/prettier/#{"content"%3A"function test () {\n  var hiddenPropertyName %3D pageVisibility.getDocumentHiddenPropertyName( document )%2C\n    visibilityChangeEventName %3D pageVisibility.getDocumentVisibilitychangeEventName( document )%3B\n}"%2C"options"%3A{"printWidth"%3A80%2C"tabWidth"%3A2%2C"singleQuote"%3Afalse%2C"trailingComma"%3Afalse%2C"bracketSpacing"%3Atrue%2C"doc"%3Afalse}}

This is expected. If you just had a single variable, you wouldn't want to output:
  var hiddenPropertyName = pageVisibility.getDocumentHiddenPropertyName(
      document
    );

If you want it to be aligned the same way, I recommend putting var before each variable

Yeah I imagined. I personally don't like multi variable var statements and would put a var per variable but there are style guides that enforce a single var per scope (like wikimedia's) so that's why that code is like that.
Another option would be declaring with var and initializing in separate assignment statements, more noisy though.
I'm closing this up, thanks for the reply! 🍪

there are style guides that enforce a single var per scope (like wikimedia's) so that's why that code is like that.

Woha, are you serious? I've never heard of that and that seems very non-standard. It would be very hard for us to handle every single edge case of formatting like that, and it's best if it stays as consistent as possible.

Yep, I understand.
I think the single var thing is to avoid people doing confusing things with
the var hoisting, but yeah, it happens. It is a pretty peculiar style.
Some links if you're curious:

https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript
https://github.com/wikimedia/eslint-config-wikimedia

On Thu, Feb 2, 2017 at 8:03 PM, James Long<EMAIL_ADDRESS>wrote:

there are style guides that enforce a single var per scope (like
wikimedia's) so that's why that code is like that.
Woha, are you serious? I've never heard of that and that seems very
non-standard. It would be very hard for us to handle every single edge case
of formatting like that, and it's best if it stays as consistent as
possible.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/jlongster/prettier/issues/569#issuecomment-277050465,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoJr9UqaOPSjQOJ7iRaVmy1SgR4ReL1ks5rYiiagaJpZM4L1Cbs
.


[WIP] Fix #1767 Custom VNET support for RS3 Windows

What this PR does / why we need it:
Fix #1767 Custom VNET support for RS3 Windows

@JiangtianLi Could you add a deployment for vnet/kubernetesvnet-windows.json to the deployments array in test/acse-conf/acse-regression.json? This way we can continue to verify this cluster deployment pattern in periodic E2E regression tests.

@jackfrancis Sure thing. Will update. Note, custom vnet for windows doesn't work fully yet due to issue with windows container network config. So this is still WIP.

@jackfrancis @JiangtianLi  @tamilmani1989 We know that azure cni integration for windows is not finished. We will take up windows/azure-cni once we sort out any remaining issues with Linux.

@sharmasushant Thanks. The issue I referred to is without azure network policy and cni, but the config in windows cni.

@JiangtianLi rebase should be relatively easy, it's due to this reorganization of the parts/ directory:
https://github.com/Azure/acs-engine/commit/30ce15e3096db424cb4ac4617347d8e74b9eb90d

@jackfrancis Thanks! Will rebase after fix the Windows subnet issue.

Will rebase after fix the Windows subnet issue.

@JiangtianLi Do you explain the problem in details?

@JiangtianLi can you update us on the estimated time to get the checks completed? appears to be on hold currently

@feiskyer The root cause is that Windows container network subnet configured only supports */24 CIDR and custom vnet usually configures master and agent subnet in range that doesn't work with Windows container network limitation.
@jay-stillman This is a Windows platform issue and I am working with Windows networking team to address it. There is no estimate yet but I will update asap.

@JiangtianLi with regards to the windows container network only supporting a /24 subnet, then surely this shouldnt be an issue based on the fact that when creating an agent pool with custom vnet we define each agent pool subnet? So if we have the windows agent pool configured to a /34 this will work? or is this a larger issue based on the master networking to nodes?

@jay-stillman To clarify, in order for Windows node to communicate with master node or agent node, all the nodes need to be in the /24 subnet. For example, if the Windows node has IP address <IP_ADDRESS>, the master node has IP address <IP_ADDRESS> and the other agent node has <IP_ADDRESS>, the master node can't talk to Windows node while the agent node can. You need to configure master and agent vnet to be in the same 24 range.

@JiangtianLi this is not correct..... the vnet cidr can be somethign such as <IP_ADDRESS>/16 while the master subnet can be something like <IP_ADDRESS>/24 and the linux pool can be something like <IP_ADDRESS>/21 if running 5 agent nodes (each node requires its own /24 subnet) this config works with custom subnet... even with multiple agent pools.
So I am guessing you are actually referring to something else, ie related to windows networking.... however if all the subnets are in the vnet and the agent pool subnets are bound to the route table, then they can still route.....
Can you provide some clearer detail on this, as the above works and is how we for one run our various acs environments

@jay-stillman Sorry for the confusion. There is no limitation to configure vnet cidr in custom vnet on Azure. The limitation is in Windows container networking on Windows node, and that limits the connection/routing to Windows POD from another subnet, i.e, master's node. Linux agent has no such issue. It is Windows container networking only.

@JiangtianLi I've tested this PR with an hybrid cluster and a custom Vnet and I've been able to create a cluster. I'm using this template:
{
    "apiVersion": "vlabs",
    "properties": {
      "orchestratorProfile": {
        "orchestratorType": "Kubernetes",
        "orchestratorRelease": "1.8",
        "kubernetesConfig": {
          "networkPolicy": "none",
          "enableRbac": true
        }
      },
      "masterProfile": {
        "count": 2,
        "dnsPrefix": "DNSPREFIX",
        "vmSize": "Standard_D2_v2",
        "vnetSubnetId": "/subscriptions/SUBSCRIPTION/resourceGroups/RESOURCEGROUP/providers/Microsoft.Network/virtualNetworks/VNETNAME/subnets/SUBNETNAME",
        "firstConsecutiveStaticIP": "<IP_ADDRESS>",
        "OSDiskSizeGB": 50
      },
      "agentPoolProfiles": [
        {
          "name": "linuxpool",
          "count": 2,
          "vmSize": "Standard_D2_v2",
          "availabilityProfile": "AvailabilitySet",
          "OSDiskSizeGB": 50,
          "distro": "ubuntu",
          "vnetSubnetId": "/subscriptions/SUBSCRIPTION/resourceGroups/RESOURCEGROUP/providers/Microsoft.Network/virtualNetworks/VNETNAME/subnets/SUBNETNAME"
        },
        {
          "name": "windowspool",
          "count": 2,
          "vmSize": "Standard_D2_v3",
          "availabilityProfile": "AvailabilitySet",
          "osType": "Windows",
          "OSDiskSizeGB": 100,
          "vnetSubnetId": "/subscriptions/SUBSCRIPTION/resourceGroups/RESOURCEGROUP/providers/Microsoft.Network/virtualNetworks/VNETNAME/subnets/SUBNETNAME"
        }
      ],
      "windowsProfile": {
        "adminUsername": "ADMINUSERWINDOWS",
        "adminPassword": "WINDOWSPASSWORD"
      },
      "linuxProfile": {
        "adminUsername": "ADMINUSERLINUX",
        "ssh": {
          "publicKeys": [
            {
              "keyData": "LINUXPUBLICKEY"
            }
          ]
        }
      },
      "servicePrincipalProfile": {
        "clientId": "SPNAME",
        "secret": "SPPASSWORD"
      }
    }
  }

After the cluster creation I've updated the vnet subnets to add the k8s cluster route table.
Few points:

The most recent k8s version that I've been able to deploy was the 1.8.3
I've issue with the deployment of image on the windows node but seems related to the RS3 issue because I'm able to deploy microsoft/windowsservercore:1709 image.
I cannot see the Windows node resource consumption(seems fixed with the k8s 1.9.3)
The Windows node description show:  "Container Runtime Version: docker://Unknown "    (???) but I'm able to deploy container(ex: microsoft/windowsservercore:1709) on this node.

@JiangtianLi Any update about this issue?

@mboret acs-engine has switched to use Azure CNI as default for Windows cluster and custom VNET is supported with Azure CNI. With kubenet, custom VNET is still under investigation.

For sure. Created: https://github.com/Azure/acs-engine/issues/2612


Copy SSH Key with copy rather than template module

Doing so adds support for copying encrypted keys files directly.
This was added to ansible in 2.1 to the copy command but seemingly not to template.
I tried a workaround with a before-setup script but in order to update git by ssh key a source file is required to be defined. When doing so, it overwrites the valid SSH key that was placed via custom task with the encrypted file.

Hi
The idea behind using template at https://github.com/ansistrano/deploy/commit/fcbc5d42694d1f8c062be5efdab45780dc32ef01 was to allow these keys to be stored in ansible vault safely.
Also, I am a bit confused with this, there is no mention of anything new added in Ansible 2.1 at http://docs.ansible.com/ansible/copy_module.html. What is the problem with template? Is it because if the key is encrypted it appears as a binary file and then the template module gets confused?

Hi,
I was finding that my encrypted key file was being copied over to the server as-is without being decrypted. Was I perhaps doing something wrong if this was meant to work.
ansistrano_git_identity_key_path: ansible-includes/ssh.key.encrypted

The change to copy isn't well documented but was in the release notes of 2.1 (https://github.com/ansible/ansible/issues/7298#issuecomment-222700139)

well, the key is copied "as-is", used in git and we use shred after that
if you use ansible-vault to encrypt it, that should work as well (haven't used it TBH, we deploy the keys to a known location with some other process and use the files), provided you supply the vault password to your playbook

How do you move the files in place with another process and still do a key based checkout? At the moment this is based on declaring the ansistrano_git_identity_key_path but if I wish to put this in place myself with a before task to manage it myself then it either gets overwritten if I declare the path, or uses non-key-based checkout if it's not declared.
As it's not working for me, what do you suggest?
An alternative contribution would be to add another flag variable that indicates whether to use SSH key based git checkout or not rather than deciding this based on whether you're copying a key into place or not.

Well, we have a "control / deployment" machine and we copy the keys there when we build the AMI
Then, our playbooks use that key that has been installed in the image baking

For users that don't use that kind of setup, what can I do? As the PR and my previous comments suggest, I'm happy to contribute code so that it does work.
What's the advantage of template over copy?

Well, unless I am missing something the machine that deploys needs to have a valid git ssh key in plain text, right? I still don´t understand why you need to upload a crypted key, why is that?
Anyway, the idea behind using template was to be able to add these keys in the git repo, crypted with ansible-vault and then you also push your keys in a crypted format

I have a separate repository that handles the deployments via git for projects. It contains exclusively a playbook written with ansistrano and so needs to contain deployment keys that are encrypted and are able to clone my other repository containing my project.
My problem is I have vault encrypted an entire SSH key file. My SSH key is not in a variable. Can we find a way to support ssh keys in variables and files?

Ah I understand now! Maybe the feature is actually broken, we are not testing it as I am using plain text keys
Will have to investigate a bit though, thanks for the explanations!

Sorry about the delay here @bobbyshaw
This seems a much better way to use vault encrypted keys and I am not even sure adding template was useful in the first place
Merging and tagging!


Add cpln config

Deployment is live at https://rails-8t7fhx09hf0j0.cpln.app
Closes #12

Is this finalized? @Judahmeek

@justin808 Let's fix this issue in a separate PR.


ModuleNotFoundError: No module named 'sphinx_markdown_parser'

as per readme.md  i installed sphinx_markdown_parser and sphinx-markdown-builder both, but still facing error
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sphinx/config.py", line 361, in eval_config_file
    execfile_(filename, namespace)
  File "/usr/local/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 86, in execfile_
    exec(code, _globals)
  File "/Users/roambee1/workspace/jsdoc-example/conf.py", line 18, in <module>
    from sphinx_markdown_parser.parser import MarkdownParser
ModuleNotFoundError: No module named 'sphinx_markdown_parser'

Although I'm still able to navigate to MarkdownParser function from
from sphinx_markdown_parser.parser import MarkdownParser

update
Tried with code example but still facing same issue
I'm a newbie in python, help me, please

@shivshankar3578 could you send me a link to your project setup?

This should be fixed now


Converting custom MIB to .py

Hello!
I am sorry if this has been asked before. I haven't had any success compiling and converting my custom mib to a .py format.
I am using the mibdump and running the following...I have also put the SNMPV2SMI that my custom mib uses within the source folder
C:\Users\Scripts>python
bdump.py --mib-source=file:///usr/share/snmp --mib-source http://mibs.snmplabs
om/asn1/@mib@ --destination-directory=file:///usr/share/snmp/dstn --destinatio
format=pysnmp SSCO-QMM-1440302-001
Source MIB repositories: file:///usr/share/snmp, http://mibs.snmplabs.com/asn1
mib@
Borrow missing/failed MIBs from: http://mibs.snmplabs.com/pysnmp/notexts/@mib@
Existing/compiled MIB locations: pysnmp.smi.mibs, pysnmp_mibs
Compiled MIBs destination directory: file:///usr/share/snmp/dstn
MIBs excluded from code generation: INET-ADDRESS-MIB, PYSNMP-USM-MIB, RFC-1212
RFC-1215, RFC1065-SMI, RFC1155-SMI, RFC1158-MIB, RFC1213-MIB, SNMP-FRAMEWORK-M
, SNMP-TARGET-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, TRANSPORT-AD
ESS-MIB
MIBs to compile: SSCO-QMM-1440302-001
Destination format: pysnmp
Parser grammar cache directory: not used
Also compile all relevant MIBs: yes
Rebuild MIBs regardless of age: no
Dry run mode: no
Create/update MIBs: yes
Byte-compile Python modules: yes (optimization level no)
Ignore compilation errors: no
Generate OID->MIB index: no
Generate texts in MIBs: no
Keep original texts layout: no
Try various file names while searching for MIB module: yes
Created/updated MIBs:
Pre-compiled MIBs borrowed:
Up to date MIBs:
Missing source MIBs: SSCO-QMM-1440302-001
Ignored MIBs:
Failed MIBs:

You cannot provide just the module name, because mibdump expects absolute or relative file paths.


Flutter Web Support

Core Library
MSAL.js v2 (@azure/msal-browser)
Wrapper Library
Not Applicable
Public or Confidential Client?
Public
Description
As flutter web is now much more stable after flutter 3.3 and ready for release in production
I am trying to integrate msal into my flutter website
I am using this flutter package to implement it
But as this library is outdated and not uses the latest msal.js library. I am facing many issues in integrating msal
So is there any plan for official support flutter web platform via a wrapper library for flutter web just like msal wrapper library for react and angular?
Source
External (Customer)

@Nikhil1999 Unfortunately at this point, we do not have immediate plans to support a wrapper layer for flutter. cc @EmLauber to mark this in the customer asks to evaluate eventually.

Core Library
MSAL.js v2 (@azure/msal-browser)
Wrapper Library
Not Applicable
Public or Confidential Client?
Public
Description
As flutter web is now much more stable after flutter 3.3 and ready for release in production I am trying to integrate msal into my flutter website
I am using this flutter package to implement it But as this library is outdated and not uses the latest msal.js library. I am facing many issues in integrating msal
So is there any plan for official support flutter web platform via a wrapper library for flutter web just like msal wrapper library for react and angular?
Source
External (Customer)

Afaik this package supports Flutter Web https://pub.dev/packages/aad_oauth

We don't have an official MSAL for flutter wrapper. I have the ask tracked though. I can't speak to the linked package, but the Azure AD endpoints are OIDC compliant so other OIDC authentication libraries should work. The other libraries may not have the Azure AD optimizations that the MSAL libraries do.


Add test for properties named $ref

The JSON Reference spec states:

A JSON Reference is a JSON object, which contains a member named
"$ref", which has a JSON string value.  Example:

{ "$ref": "http://example.com/example.json#/foo/bar" }

If a JSON value does not have these characteristics, then it SHOULD
NOT be interpreted as a JSON Reference.

The swagger schema declares a property named $ref that is not actually a reference, like this:
"properties": {
        "$ref": {
          "type": "string"
        }
      }

Since the value is not a string, it's not considered a reference and should not be dereferenced.
This test ensures that a validator will not attempt to dereference a property named $ref when the value is not a string.

Might belong a bit more in the properties tests than the ref tests, can't really decide, but thanks!

This test ensures that a validator will not attempt to dereference a property named $ref when the value is not a string.

"when the value is not a string" is the unnecessary qualifier here, the validators simply should not assign any special meaning to properties of properties keyword, everything is just a property name, and unless its value is an object the schema is invalid (e.g. if $ref is a string here).

To be clear, the intention of the test is to to ensure that the validator will not attempt to dereference any property named $ref when the value is not a string.  I was just explaining what this specific test is doing.  This test places the $ref under properties but it could be anywhere in the schema.


Color on confirmation windows

To me this modal needs more color:

Red is fine.

fixed by https://github.com/samtecspg/articulate/commit/89a0089b975ac50a3f511eae69bd5f02f20ff3f2


[d3d8] Use D3DPOOL_SCRATCH in CreateImageSurface

Fixes #89, fixes #182 and fixes points (1.) and (2.) from #205.
Some games expect us to successfully create image surfaces for them even when they supply unsupported formats like P8 or R8G8B8. This only works with D3DPOOL_SCRATCH according to spec, and it's also what dxvk validates inside of CreateOffscreenPlainSurfaceEx().
We don't actually need to fully support them in order for the above games to work properly at least.
The only problem is we don't currently handle D3DPOOL_SCRATCH at all in CopyRects(), so this has the potential to explode and break more than it fixes. We should merge this change only after sorting out that bit ideally.

I've sweetened it a bit by using D3DPOOL_SCRATCH only in case of unsupported surface formats (when CreateImageSurface would topically fail without this PR). We should still consider handling D3DPOOL_SCRATCH in CopyRects, but it's far less likely anything will blow up now.


keyword problem

Type: Feature Request
acyaully when i press the semicolon key it was unable to print and shifting to next line my keys were perfect but unable to find the bug
VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:41:02.734Z)
OS version: Windows_NT x64 10.0.22631
Modes:

thank you for the help


Click on "_id" has no result - deal with it :)

sometimes it looks like an ID but is not...

Anything alphanumeric with 17 characters is considered to be an _id.  Is there a better way to do this?

yes, here is the current matcher https://github.com/DrMongo/DrMongo/blob/372c2c46070e254d2baa09aac4e12cd63a35dc52/lib/helpers.js#L101
do you have any suggestion how to improve this matching?

Yes, I looked up that function (because it provides half the magic I love -- the other half being in the findCollectionForDocumentId method).
"Is there a better way to do this?" was more of a semi-rhetorical question to the poster of the issue.
I think what you have is a pretty sensible approach for the moment.