Support named joins

Tasks

[x] Allow multiple options to be given to join/5
[x] Support the :as construct in queries
[x] Include :as on inspected queries
[x] Update the documentation
[x] Add support for :as in from too

The problem
A commonly asked feature about Ecto is to support named joins. The idea is that, if you need to compose a query by parts, you may want to refer to previous joins. The only way to do so in Ecto today is via positional bindings:
  query = Post

  # Filter by the join
  query = from p in query,
            join: c in Comment, where: c.post_id == p.id

  # Extend the query
  query = from [p, c] in query,
            select: {p.title, c.body}

There is also the ... identifier that helps select the last bindings:
  # Extend the query
  query = from [p, ..., c] in query,
            select: {p.title, c.body}

However, those approaches are still restrictive, as they require you to track when a given join was added.
For those reasons, having a mechanism that refers to a previously established join would be very useful.
Solution
There were previous attempts to address this issue but all of them attempted to conflate the positional binding with the named join. This approach can be very error prone because in Ecto the name of the binding has no effect on the generated query. So if bindings suddenly had to be unique, many queries would fail.
Another approach would be to identify the joins by their schema but that is also limited as you would be unable to join the same schema/table more than once, which may be desired from time to time.
So it is clear that the only approach to solve this is by introducing an explicit naming mechanism. We propose to do so via the :as option in queries:
  query = Post

  # Filter by the join
  query = from p in query,
            join: c in Comment, as: :comments, where: c.post_id == p.id

  # Extend the query
  query = from [p, comments: c] in query,
            select: {p.title, c.body}

If the :as key is present, Ecto will do the following:

Has another join be specified with the :as key? If so, we raise
Otherwise we store it for further lookups

We could even leverage this solution to include the :as names in the resulting SQL query, as it may be handy in certain situations.
Feedback
Your turn. :)

Can the name be dynamic / interpolated?
query =
  from [p, ^som_dyamic_name: c] in query,
  select: {p.title, c.body}

This is a great step towards making join queries more composable, and fixes one of my biggest gripes with Ecto!
However, the proposed solution still doesn't fix the issue completely. I still can't write a single function that can accept a joined or non-joined query. Also, it still makes dealing with multiple joins of the same table difficult because the alias has to be hardcoded in the function (unless it can be interpolated like @mbuhot suggested).
For example, this function is not reusable:
def active(query) do
  from [accounts: a] in query,
    where: a.active_until > datetime_add(fragment("NOW()"), -5, "day")
end

# this would work
query = from t in Thing, join: a in assoc(t, :account), as: :accounts
Account.active(query)

# but this (as far as I understand) would not
query = from a in Account
Account.active(query)

# neither would this
query =
  from t in Thing,
    join: a in assoc(t, :account), as: :accounts,
    join: a2 in assoc(t, :account), as: :accounts2
Account.active(query) # i want to filter on :accounts2

You can declare the same join twice as long as it has the same name and it
will be added only once, this allows operations to be idempotent.
We can support dynamic aliases too but our policy regarding those is to
always start with the strict one and added the interpolation when necessary.
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

You can declare the same join twice as long as it has the same name and it
will be added only once, this allows operations to be idempotent.

Hmm, how will that handle conflicting on: ... options?  'and' them together or first-only or last-only or so?
I'm not big on dynamic aliases personally, though having a function to detect what names already exist on the query so we could branch would be very nice.  :-)

I think the current plan is to raise when the on clauses are conflicting.

It would be handy to have also additional join-like function that would work similarly to select_merge, it would check if given named join is present and adds one only if it isn't already present, otherwise it will add it. This would help with composing queries.

@hauleth that's exactly what we are discussing above. :) If the as option is given more than once, it is idempotent as long as you have the same :on.

Oh, yeah, I was mislead by @michalmuskala comment, sorry for the fuss.

Will there be some official way to introspect what join 'names' have already been added to the query, or will we need to manually introspect the internals of the query to figure it out?  Basically a function like [:some_name, :another_name] = get_join_names(some_query) (and maybe also a helper like is_joined?(some_query, :some_name) or so)?  Although perhaps returning a set (map with true values, or maybe something useful in the values?) would make matching in a case a lot easier.  :-)

@hauleth no problem.
Let's get the feature in its basic form in, then we can discuss all possible additions and their use cases.

I was experimenting with adding support for idempotent named joins but hit some issues along the way. Most chief among them is how to reliably determine whether two join expressions are equal. The query expressions in on seem to be non-trivial to compare when the expressions inside contain positional references to bindings. Comparison, at least regarding my current knowledge of Ecto internals and Elixir metaprogramming, would either require expanding those expressions or some other way of altering them - which may carry certain computational cost. If I'm missing some well known way of making such comparison, please let me know.
Another problem I've started to consider is whether the behavior (joins being idempotent) doesn't bring an unwanted element of surprise to the user of the library. Perhaps that's not as big of an issue as I imagine it to be, but in situation where somebody adds a (named) join for the second time and, for some reason, tries to refer to it by its absolute position, may be caught by surprise that the binding was not added. Again, whether that's a big issue that join behaves somewhat differently in that particular case, I don't know.
For reference, I have a WIP branch with some groundwork done for comparing joins (although mind you, as it currently stands, it's a non-working, messy draft): https://github.com/zoldar/ecto/commit/f532d6ecf74b6195ec7c65cf1f07deb3febf8122
If nothing changes, I will try to come up with a way to make the comparison at least work in the coming days - reliably, if possible. If anyone has any ideas or opinions on the problems/questions I've raised here, I'd be happy to hear them.

@zoldar if you have the exact same join, with the exact same on and as, then odds are that you want them to be the same anyway.
Regarding the check, the bindings have to be the same, otherwise they are separate joins, no? I would try implement this by traversing the on_expr (i.e. %JoinExpr{}.on.expr) at compile time and by setting the metadata node in the AST to an empty list, effectively removing contextual or line/file information. You should be able to do this by using Macro.prewalk/2. The key you are going to use to check if the join is the same will be {join_source, :erlang.phash2(prewalked_join_on_expr)}.
Thoughts?

@josevalim
Ok, so, given a following basic example:
"posts"
|> join(:inner, [], b1 in "blogs", on: b1.valid, as: :blogs)
|> join(:inner, [], b2 in "blogs", on: b2.valid, as: :blogs)

I'm getting following on expressions:
{{:., [line: 264], [{:b2, [line: 264], nil}, :valid]}, [line: 264], []}

{{:., [line: 263], [{:b1, [line: 263], nil}, :valid]}, [line: 263], []}

which later become:
{{:., [], [{:&, [], [1]}, :valid]}, [], []}

{{:., [], [{:&, [], [2]}, :valid]}, [], []}

dropping metadata from AST alone seems to no be enough. However, it probably could indeed be possible to traverse the expression and "unify" all occurrences of positional arguments referring to the joined association. I'll look into that in the coming days.

@zoldar You are right. We could use the escaped on but that complicates the code too. I think it is probably best to give up on implementing this feature implicitly. Maybe we would need to find a way to override those as more explicitly or, as @OvermindDL1 said, find a way to check if an as already exists or not. I will remove this item from the todo list. Just documentation and supporting :as in from left. Thank you for exploring those alternatives!

/me is very of the thought that a name should only exist once, if it is attempted to be used again then it should raise an exception saying as much while showing the existing and the attempted join informations...
Honestly all I'd want is just named joins (if the name is attempted to be used again then hard error), and a function or documented field on the query to get the list of used names (to save me from having to carry them around manually, which I would inevitably have to do in every case that I use named queries).  :-)

@josevalim Just wanted to make sure, for avoidance of any doubt:

Add support for :as in from too

is that about supporting :as in bindings list, as in:
from [p, comments: c] in posts_with_comments, ...

(which is already supported - Ecto.Query.Builder.From.build/2 runs bindings through Builder.escape_binding/3; it's just a matter of adding tests and documenting that)?
or is it about aliasing the source of the query, like:
from p in Posts, as: :posts, ...

?
The second form would probably be useful in the context of generating the query by adapter and using the provided aliases instead of generated ones.

@zoldar the second one!
Note that today we keep from in the AST as a simple tuple but I think we need to introduce a FromExpr so we can also store :as inside of it.
Given this in itself is a big task, I would recommend to first send a PR that introduces FromExpr and start to consistently use it. It will require changes to the builder, planner and the adapters.

@zoldar another use case is for naming from is because when composing queries you may not want to know if :comments is a from or join. :)

@zoldar ping! Let me know if you have any questions or if you need any help. :)

@josevalim Hey. I'll probably be pushing a PR with my attempt at from expression refactor some time this week(end), along with questions.

@zoldar with your PR, we can now support :as in from. After we do it and add documentation, this should be fully complete. I am excited!

I have the as in from support ready to push for review. I'll do that
later today.
sob., 7.04.2018, 13:43 użytkownik José Valim<EMAIL_ADDRESS>napisał:

@zoldar https://github.com/zoldar with your PR, we can now support :as
in from. After we do it and add documentation, this should be fully
complete. I am excited!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/elixir-ecto/ecto/issues/2389#issuecomment-379463479,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAj6P2YpWWiVFoWs1-wtXVBtl0R81AuVks5tmKZWgaJpZM4Rnuo9
.

@zoldar :heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart:

@zoldar I think that is definitely an important piece to have, since we don't want them relying on an internal of the query. I could write this utility myself, but one thing I know I'll need for my API query builder is also "give me an unused alias".

Sounds good to me! Although I would wait until we have a concrete use case
and move forward. :)
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

@zoldar that's exactly what happens when you add the join with same source and on and same alias multiple times - it will be added just once. I'm not sure I see what would be an advantage of checking it manually.

@michalmuskala Hmm, as far as the implementation for named bindings goes, it will explicitly crash, unless I misunderstood? ( https://github.com/elixir-ecto/ecto/blob/ce87525ab0d88746a231bb2a06019b585c8be00a/test/ecto/query_test.exs#L244 ).

It will raise if you try to join two different things using the same alias. If you join the same thing twice with the same alias, the join will be deduplicated for you - that's the major feature of named joins.

When we developed the feature we agreed that we wouldn’t allow the same
binding twice even for the same source because it is not really practical.
In most cases to reconstruct the binding you need previous associations or
on clauses.
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

I would say for now the best we can do is to have people try this out and
give feedback on what they are trying to build. Then we will figure which
new APIs to add and what to make more flexible.
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

@zoldar so in my API, you can provide filters on joined values, and you can also include related entities. The current implementation has to do some very hacky things to accomplish this, so lets not dive into that too much. But what I'd need is something equivalent of "give me an alias that is not in use in this query already", so that I can tie it to a specific reference to an association in our request.
Like I said though, it wouldn't bother me if no one wants this, because its easy enough to generate aliases until I get one that is not in use, but I would rather use the function you talked about to check if an alias is in use. so like
...building query

# encounter a filter/include request on an association
alias = Ecto.Query.new_alias(query)
association = util_to_figure_out_assoc # my own thing
filter = util_to_figure_out_dynamic_filter # my own thing

new_query =
  from row in query,
    join: associated in assoc(row, ^association),
    as: ^alias,
    on: ^filter

or something along those lines.

@josevalim is right - it's best to wait until people start trying that out in practice. I actually had a real life use case on my mind but I'll hold off with proposing anything until/if I actually try to use that feature on an actual living code.
Sorry for stirring the pond in a closed issue on Sunday 🙈

@zoldar as soon as I feel like I have the tools to replace my existing code w/ named bindings (there are a few things I need, and this is one of them) then I will be trying it out in practice.

But we can totally discuss this in a different format later this week :D I'll just see if I can try the refactor that I have in mind w/ ecto master and see what things I run into, and then report back.

The names fully work At compile time, so we can’t return a dynamic name to
use (yet). If we approach the problem as “we need dynamic names”, then the
only solution we will find is “dynamic names”. But if we ask “how to best
compose this query”, we may find more answers.
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

@josevalim that is very true :D My use case is that I'm accepting a (very graphql-ish) query from user input, something like
%{
  upvotes: %{greater_than: 1},
  any_of: [
    %{comments: %{author_id: 1}},
    %{comments: %{upvotes: %{less_than: 1}}}
  ]
}

We already support a significant set of filters and boolean combinators like that, but its done w/ quite a bit of metaprogramming that I'd like to make unnecessary. I am already tying specific association joins that I require to binding indices externally to the query, and then building query expressions manually. I was hoping to replace that with named bindings, but that would require me to be able to specify a binding at runtime while constructing a query.

@zachdaniel in this case I would try to pre-process the data and move the any_of inside each association.
The other idea is to have something like has_named_binding? that @zoldar mentioned and make sure the bindings is introduced at some point. So you would have functions like:
def ensure_comments(query) do
  if has_named_binding?(query, :comments) do
    query
  else
    join(query, [p], c in assoc(p, :comments))
  end
end

We have something like 60 resources most of which have upwards of 10 relationships (and some many more) so having to have a handwritten (or even compile time generated) list of functions that can join + name that association isn't really feasible. I'll write something up that explains our use case more in depth later, since we're looking to open source it in the next 6 months to a year as time allows to clean it up and extract the parts that are specific to us.

I guess I'm a bit confused on how this was intended to be used.  I'm not very experienced with ecto, so I'm not sure how it used to be done and what has changed to make this type of query possible.  I tried to piece together some code the way the library looks like it should accept, but I'm beginning to think that I was expecting there to be more to this than there is at this moment.  What would the following code look like idiomatically?
    users = from u in User, as: :user
    me = users |> where([user: u], u.uid == 123) |> limit(1)
    my_name = me |> select([user: u], u.first_name)

    companies = users |> join(:left, [user: u], c in Company, on: u.cid == c.cid, as: :companies)
    active_companies = companies |> where([company: c], c.active == 1)
    my_company = active_companies |> where([user: u], u.uid == 123)
    my_company_name = my_company |> select([company: c], c.company_name)

Folks, this issue is closed and the basic feature is in. If you feel you need more functionality, please provide a complete proposal. You can use this topic as an example. Please provide a snippet with how the code looks today, the problems the old code has, and then describe the solution, with advantages, disadvantages and the updated code samples. Thank you.

@josevalim if I understand @OvermindDL1 correctly (and if so, I completely agree) is that we want to reduce functionality proposed there, not add to it. The part we are afraid of is:

If you join the same thing twice with the same alias, the join will be deduplicated for you

So if I understand correctly if I now do this:
query1 = from foo in Foo, join: bar in Bar, on: bar.foo_id == foo.id
query2 = from foo in query1, join: bar in Bar, on: bar.foo_id == foo.id

it will silently pass. However I (and I think @OvermindDL1 also) think that this is dangerous behaviour and it should fail the same as when used like:
query1 = from foo in Foo, join: bar in Bar, on: bar.foo_id == foo.id
query2 = from foo in query1, join: bar in Bar, on: bar.foo_id2 == foo.id

It should provide much less confusion IMHO and also allow us to add such behaviour later if we find it usable. Other way around it would be infeasible to do so (I mean to remove such feature).

The behavior you mention was discarded along the way and it has not been
implemented. :)

Btw the goal was never to ignore it implicitly, only when named. But it was
not implemented either way.
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

Is this feature available now in latest release? (coz I dont see in docs of version 2.2.10 which was releast on Apr 8)

Sure. Thanks for the quick response.

@AndrewDryga if I read your request correctly it is the same as there
https://github.com/elixir-ecto/ecto/issues/2389#issuecomment-379582851

@hauleth yeah, did not saw that one. This is exactly what we ended up doing.

@AndrewDryga we would appreciate a PR that adds has_named_binding?(query, key). :)


Fixed small typo in local port forwarding

The echo command returned the wrong port (22565 instead of 25565)

Ok, done! No problem. It just jumped out at me after I did the first deploy.


possibility to run as service

Would be nice to run this as a service, so that its beeing started automaticly after a reboot.

i managed to run it as a service by creating the following service file:
[Unit]
Description="Narrow Casting"
[Service]
ExecStart=/usr/bin/npm run dev
WorkingDirectory=/srv/narrowcasting
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=NarrowCasting
[Install]
WantedBy=multi-user.target
===============
Hopefully it will be of use for someone else 👍


Forest flow (TorchCFM 1.0.5)

What does this PR do?
This PR adds a notebook on the Forest-Flow method to TorchCFM. Forest-Flow's purpose is to generate tabular data with Flow Matching methods! We have added a notebook showing how to use XGBoost to train the vector field of I-CFM and generate tabular data. This has required the addition of a parameter 't' within the 'sample_location_and_conditional_flow' function within each class. As we have modified classes, we have also added our first test function.
Before submitting

[x] Did you make sure title is self-explanatory and the description concisely explains the PR?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[x] Did you list all the breaking changes introduced by this pull request?
[x] Did you test your PR locally with pytest command?
[x] Did you run pre-commit hooks with pre-commit run -a command?

Did you have fun?
Make sure you had fun coding 🙃

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

Comparison is base (21cd0c8) 34.23% compared to head (703dbb6) 34.23%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #69   +/-   ##
=======================================
  Coverage   34.23%   34.23%
=======================================
  Files          55       55
  Lines        6268     6268
=======================================
  Hits         2146     2146
  Misses       4122     4122

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

@atong01 it seems that only the tests in runner are run and not the new one. Can you check that, please? Thank you


Any way to get leaflet-search to work with vue2leaflet?

ive tried several ways to get leaflet-search to work. And I cant figure it out, or even if its possible. I supposed I could create my own search functionality, but I wanted to try this first.

I think the main issue is being unable to give the search option for the layer as it requires a LayerGroup object, not the name of it.

@X1machinemaker1X can you share a piece of code where this is implemented ?

I just ended up making my own search thing. it was simpler. sorry


UNDERTOW-939 Add a new attribute for a reason phrase of http response in access logging

Windows Build 1907 outcome was FAILURE using a merge of eefe3288c2d317ebe807205e6b7dee9d47fe656a
Summary: Tests failed: 1, passed: 2721, ignored: 556 Build time: 00:27:42
Failed tests
io.undertow.server.handlers.ReceiverTestCase.testAsyncReceivePartialBytes: java.lang.RuntimeException: test failed with i equal to 6
	at io.undertow.server.handlers.ReceiverTestCase.doTest(ReceiverTestCase.java:233)
	at io.undertow.server.handlers.ReceiverTestCase.testAsyncReceivePartialBytes(ReceiverTestCase.java:200)
Caused by: java.net.SocketTimeoutException: Read timed out
	at io.undertow.server.handlers.ReceiverTestCase.runTest(ReceiverTestCase.java:246)
	at io.undertow.server.handlers.ReceiverTestCase.doTest(ReceiverTestCase.java:231)
	at io.undertow.server.handlers.ReceiverTestCase.testAsyncReceivePartialBytes(ReceiverTestCase.java:200)

I have cherry picked all these, thanks


[BUG] --AttributeError while trying to run train_regr example code

Describe the bug
A clear and concise description of what the bug is.
So, I have tried to run the example code for train_regr (Example 2) on a GPU enabled computer and my laptop, but whenever I run it, it produces the error:

To Reproduce
I have not edited any of the code and am running the code on Jupyter Lab. The same error appeared when I tried running the code on Jupyter Notebook as well. I downloaded the MS-D Net line and I believe I installed the correct cuda-toolkit version.
To get this error, I ran generatedata, and then ran train_regr. The error popped up after running train_regr.
Desktop:

OS: Windows 10

I have tried tracing the error back to the train functions but there does not seem to be anything wrong with them. Again, I have not made any edits to the code yet, so I am not sure why it is not running.

Thanks for creating this issue! Can you try the following file: https://raw.githubusercontent.com/dmpelt/msdnet/master/examples/train_regr.py ? Some syntax has changed and maybe I didn't update all the examples correctly... In any case the error message has to be fixed so I'll try to do that soon!

This worked! Thank you so much!


covid_hosp_state_timeseries doesn't return any data

I can't get pub_covid_hosp_state_timeseries (via epidatr) to return data. I've tried different states, different state name formats, different narrow and broad date ranges.

do you know what request URIs are being generated?  here is a functioning one (once you delete the ".remove" substring in the hostname) : https://api.delphi.cmu.edu.remove/epidata/covid_hosp_state_timeseries/?states=pa&dates=20231101

Seems like I wasn't requesting recent enough date ranges. This is working for me now!


Newly created react app with typescript template crashing when running tests with coverage flag enabled

Describe the bug
Running on a greenfield project created with create-react-app and typescript template the tests with the coverage flag doesn't work. Running the test without coverage flag works fine.
Environment
Environment Info:

  current version of create-react-app: 3.4.1
  running from /Users/pperezdiez/.config/yarn/global/node_modules/create-react-app

  System:
    OS: macOS 10.15.5
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
  Binaries:
    Node: 12.16.3 - ~/.nvm/versions/node/v12.16.3/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.16.3/bin/npm
  Browsers:
    Chrome: 85.0.4183.83
    Firefox: 79.0
    Safari: 13.1.1
  npmPackages:
    react: ^16.13.1 => 16.13.1
    react-dom: ^16.13.1 => 16.13.1
    react-scripts: 3.4.3 => 3.4.3
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

yarn create react-app my-first-app --template typescript
Add to package.json a script to run tests with coverage: "test:coverage": "react-scripts test -- --coverage --runInBand --watchAll=false",
Run the coverage: yarn test:coverage

Same can be done without yarn. I am adding yarn as it is how I created it so it is consistent with the info above.
Expected behavior
The tests are run properly when the coverage flag is enabled
Actual behavior
It crashes like if it wasn't aware that it has to transpile typescript to run the tests.

Could it be related to https://github.com/facebook/create-react-app/issues/9515 ?

I have a similar issue, but without typescript template.
Add coverage flag, and the first test just fails, nothing changed, fresh CRA project

This is stale as there is no official answer but this is still happening.

Same for me

I have detected that with react-scripts 4 this issue is solved, so if someone is still facing this I suggest to update. At least creating a project from scratch no longer fails when running tests with coverage flag.


Customize in https://firmware-selector.openwrt.org/ fail please fix.

Customize in https://firmware-selector.openwrt.org/ fail please fix.

page breaks on selecting "REQUEST BUILD" button

I am also having this issue. Upon pressing "Request Build", no links are generated and json console generates error code:

This is the wrong project. The problem is with the backend: https://github.com/openwrt/asu

https://github.com/openwrt/asu/issues/961


Red "report a problem" bug button is missing from mobile site

The desktop site still has the red button for reporting bugs, but for some reason it is missing from the mobile site:

The bug reporting button should be added back since most users use our mobile site.

Hey @AllhandsNoFeet can I take this up ?

Hey @AllhandsNoFeet  will this work ?
Do I need to keep just the bug button ?

Thanks @nishit-g ! I'll let @lucaslcode respond as he is the frontend lead.

That looks right, both should be there


feat: add apple pay accept guide

Description
Add Apple Pay guide

Testing required outside of automated testing?

[x] Not Applicable

Screenshots (if appropriate):

[x] Not Applicable

Rollback / Rollforward Procedure

[x] Roll Forward
[ ] Roll Back

Reviewer Checklist

[ ] Description of Change
[ ] Description of outside testing if applicable.
[ ] Description of Roll Forward / Backward Procedure
[ ] Documentation updated for Change

:tada: This PR is included in version 1.141.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Shell Integration (path completion and command history)

Greetings,
Congratulations on this project. I am working on something similar and I am struggling with shell integration between xterm.js and node-pty. Does your project support path completion (via tab) and command history (via upArrow)?

Yes, it supports it just like any terminal.


[dht] Use SpeedMonitor to calculate DHT data rates

Record total bytes sent/received, as well as the estimated transfer rate in bytes/second.

@YegorStepanov
This should give you the DHT stats you needed. Let me know what you think!


Run as Administrator shows UAC prompt "unknown program"

Hi,
I like the new terminal and use it often. One thing which doesn't look very nice is when I start the Terminal with "run as administrator" then I see the UAC prompt with the message "Unknown program". Can this be fixed to have "Windows Terminal" there?
Thanks!
best,
Oliver

/dup #2289


Add rollup() and cube() for use in group by clause

The following SQL syntax is useful in reporting:
 select avg(price), store, item, cust from sales group by rollup(store, item, cust)

This syntax is supported on at least DB2, Oracle, SQL Server, and Postgres. It's not supported on MySQL.
Note that the ANSI SQL standard syntax for this is, apparently, the following:
 select avg(price), store, item, cust from sales group by store, item, cust with rollup

However, I don't find this to be better. MySQL has partial support for this syntax.
This patch adds support for rollup() and cube() to HQL.
Note that this is just a proposal and has not been tested, since the query parser does not yet support group by.

Syntax wise I'm not sure the benefit of the parens aside from defining the grouping terms as a tuple.  Meaning I'm not sure that syntax is any better than
select avg(price), store, item, cust from sales group by rollup store, item, cust

not the SQL variant.
Just a quick take.  I'll look at the PR more in depth today/tomorrow

@sebersole well it seems to me that the advantage of the parens is that:

you can have additional grouped columns that aren't in the cube() or rollup(), which seems very useful to me, and
it seems to be more easily extensible to the grouping sets syntax which is also supported by Postgres, DB2, and SQL Server (though I don't plan to add support for that at this stage)

Ah, I did not realize only part of the grouping could be rolled-up.  So then that part makes sense.  But...
Although, then I am not sure what the syntax for that particular part looks like for either syntax you mentioned.
select avg(price), store, item, cust, non_rolled_value from sales group by rollup(store, item, cust), non_rolled_value

Especially wrt the SQL /  MySQL syntax

@sebersole I checked that this works on Postgres:
select avg(price), store, item, cust from sales group by cube(store, item), cust

I don't know how to do that on MySQ, and I strongly suspect it's impossible.

By the way, let me leave some references here:
https://www.postgresql.org/docs/12/queries-table-expressions.html#QUERIES-GROUPING-SETS
https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0059215.html
https://docs.microsoft.com/en-us/sql/t-sql/queries/select-group-by-transact-sql?view=sql-server-ver15
https://docs.oracle.com/cd/F49540_01/DOC/server.815/a68003/rollup_c.htm#31838
https://dev.mysql.com/doc/refman/5.7/en/group-by-modifiers.html

BTW, I wanted to point out Gavin since you are contributing a lot of new types of SQM nodes.  Because SQM is also the impl for our JPA Criteria tree, adding support for these should be as simple as adding methods for them on our Hibernate-specific CriteriaBuilder contract : org.hibernate.query.criteria.HibernateCriteriaBuilder / org.hibernate.query.sqm.NodeBuilder.  Of course users could just implement them directly and add them to the Criteria tree, but having the builder methods would be nice

@sebersole OK, good point, I guess I was being a bit careful about adding new application-visible APIs without careful thought about what they should look like but if you like I can go and do some of that careful thinking.
Do you have any thoughts on which of these new things are higher/lower priority?

I was actually planning to do that already for the existing ones we've done
already.  More I just meant moving forward.  I need to keep it in mind also
when reviewing these.
On Wed, Apr 29, 2020, 6:09 AM Gavin King<EMAIL_ADDRESS>wrote:

@sebersole https://github.com/sebersole OK, good point, I guess I was
being a bit careful about adding new application-visible APIs without
careful thought about what they should look like but if you like I can go
and do some of that careful thinking.
Do you have any thoughts on which of these new things are higher/lower
priority?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hibernate/hibernate-orm/pull/3364#issuecomment-621133296,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABZIE6Z6VWPU7WPGOW5KZLRPADHNANCNFSM4MOFCCYQ
.

OK.


User data list UI

Description

Sample User List UI

Evidence
Screencast from 25-01-2024 09:11:09.webm
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] My changes do not affect other functions
[x] Any dependent changes have been merged and published in downstream modules

looks ok enough


feat(Data/Nat/Factorial): add descFactorial_le and descFactorial_mul_descFactorial

Add two basic theorems involving falling factorials. Note that descFactorial_mul_descFactorial collapses to Nat.factorial_mul_descFactorial when m = n.

Thank you, @ScottCarnahan, for the extremely quick reply! I was expecting that the proof could be improved but I didn't know how.
Your proof clearly looks much cleaner, and I really appreciate that you're taking time to explain all of this to me.
I've accepted all your suggestions (with extremely minor changes just to avoid lint-style and build errors). Also, I've replaced exact Nat.le_of_ble_eq_true rfl by rfl. (In hindsight, Lean's exact? made a correct but unnecessarily complicated suggestion here.)
If anything further is required on my side before this PR can be merged, just let me know!

bors merge

One of the runners ran out of space. Re-running
bors r+


Only use guesses in the split_candidates.

Closes #75. Does not seem to have any impact on performance.


ZIO module pattern 2.0

https://zio.dev/docs/datatypes/contextual/#module-pattern-20

@einnocent @devansc Are you guys working on this?


Fix Broken Link

This change is

Coverage remained the same at 44.544% when pulling 23aaecddcad868b8f464b3b65354ab4570a171ef on asifdxtreme:patch-5 into d28ea365fbde15830cf1383eed08c8686218c51c on kubernetes:master.

/lgtm

@asifdxtreme thanks!


Reset the fallback listener on StatusLogger#reset()

The issue was initially caused by #2249. This fix also addresses the CI failures on Windows.

This looks good to me: it solves the immediate problem, although I would probably prefer for StatusConsoleListeners to be replaced instead of reconfigured.

I explained why this is not possible in this conversation.

logger contexts should call StatusLogger.reset() at shutdown

StatusLogger is [statically] shared between all LoggerContexts. Hence, are you sure resetting the StatusLogger singleton when a LoggerContext shuts down is the right thing to do?

After a video call with @ppkarwasz, we decided to proceed with this PR as it is. A good step forward would be to remove StatusConfiguration in main.


terminal-plus not showing prompt.  only flashing cursor

terminal-plus not showing prompt.  only flashing cursor
Latest terminal-plus as of 9/21/2016
Atom 1.10.2
CENTOS 7

Same for me:
Latest terminal-plus version
Mac OS Sierra Version 10.12
Atom 1.10.2
Everything was working since the new Mac OS Update today.

Same issue on Sierra

same for me.

Confirming the issue on Sierra

same.

same

I was using Atom 1.6 and it was working fine. Today I updated to Atom 1.10.2 it's no longer working. Only flashing cursor is appearing.

So it appears to be an issue with the latest Atom Version. Is anyone having a solution? Because I really like this plugin..

Those using Linux systems should try my package out, terminal-fusion. Those on macOS / Windows NT should use the platformio-ide-terminal package instead. As always, please star the packages (and/or their GitHub repository) you like!

Thanks @fusion809. The terminal-fusion is working very well with Atom 1.10.2


add file decorations to editor titles (tab and no tab)

This PR adds file decorations to editor titles.
tabs

no tabs

https://github.com/microsoft/vscode/blob/a53d75097a16628ee02dbee6e517cd52d959c805/src%2Fvs%2Fworkbench%2Fbrowser%2Fparts%2Feditor%2FnoTabsTitleControl.ts#L300
@bpasero ⬆ that's problematic since it overwrites the colour assigned by decorations. The tabs title control is better at this, tho might not be using special colours at all? Do you have ideas?

The tabs title control also sets this color here but on the parent of the label. If that helps, we can do the same for no tabs?
https://github.com/microsoft/vscode/blob/f9f2637f794fb728b32d39c25e9eb8a5763afe1d/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts#L1168-L1168

@bpasero Please review. I would like to go ahead with this and tackle follow up work as bugs. The settings story is that there is settings for the tabs (as introduced with this PR) and the existing setting will apply to the explorer (as today), custom trees and breadcrumbs pickers


[SPARK-47894][CORE][FOLLOWUP] Add a trailing slash to MasterPage's Environment page link

What changes were proposed in this pull request?
This is a follow-up of #46111 to prevent redundant redirection by adding trailing slashes like #46157 .
Why are the changes needed?

To remove redundant redirection.

$ curl -v http://localhost:8080/environment
* Host localhost:8080 was resolved.
* IPv6: ::1
* IPv4: <IP_ADDRESS>
*   Trying [::1]:8080...
* connect to ::1 port 8080 from ::1 port 50081 failed: Connection refused
*   Trying <IP_ADDRESS>:8080...
* Connected to localhost (<IP_ADDRESS>) port 8080
> GET /environment HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 302 Found
< Date: Sat, 03 Aug 2024 02:39:02 GMT
< Location: http://localhost:8080/environment/
< Content-Length: 0
<
* Connection #0 to host localhost left intact

Some browser doesn't preserve all HTTP header information of the original PRs when it redirects.

Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the CIs and do the manual test.
$ sbin/start-master.sh

Was this patch authored or co-authored using generative AI tooling?
No.

Thank you, @yaooqinn !
Merged to master.


[feature request]support partialobjectmetadata watch request

What would you like to be added:
In this pull request, partialobjectmetadata get/list requests are supported in yurthub, but partialobjectmetadata watch request is not supported currently.
As we known, list/watch requests are used as a pair requests, so it is necessary to support partialobjectmetadata watch request in yurthub.
others
/kind feature

/assign @rambohe-ch


Solving with cuOSQP

I am trying to implement a controller that needs to run at 100Hz but after a lot of tuning I can only get solutions in ~55ms. There is this version of OSQP that is CUDA accelerated (cuOSQP) and apparently it can speed up execution by up to two orders of magnitude for some problems.
I thought this looked pretty promising so I tried to quickly glue it into your library by replacing the OSQPData struct with a custom struct that is compatible with what libmpc and cuOSQP expect. cuOSQP expects the data struct in the picture below which is internally generated from the csc* and c_float*  that are in use on the normal OSQP.

So I just added the struct below to LOptimizer.hpp and replaced data with this new type.

I think that should make all of libmpc keep its current behaviour and the code actually compiles and runs but the solver always returns NaN for some reason and the objective function is 0 on the first evaluation.

I don't think this is an issue for libmpc but I thought I'd post here and ask if you have any ideas as to what might be causing it. It would certainly be awesome if this library could be even better and faster by using cuOSQP.

Hi @nicolapiccinelli, thank you for getting back to me. Yeah, I tried it with the example in the test folder and it also happened. However, I just discovered that this is all due to a casting issue. In the standard version of OSQP c_float is defined as double but the CUDA solver in cuOSQP requires disabling doubles and c_float evaluates to float. When I started modifying libmpc I just changed these lines in LOptimizer.run():
data->q = mpcProblem.q.data();
data->l = mpcProblem.l.data();
data->u = mpcProblem.u.data();

For these lines:
data->q = (float*) mpcProblem.q.data();
data->l = (float*) mpcProblem.l.data();
data->u = (float*) mpcProblem.u.data();

I didn't give it a second thought at the time, but today I discovered that some numbers cast to NaN so the l and u vectors always end up with NaN entries. I'm not sure why it doesn't happen with q though.
I've changed the whole library to work with floats and the example in the test folder works. Now I need to change my application to work with floats and I'm optimistic that will do. Not the best solution but I haven't found any other way of casting safely. I'll let you know if cuOSQP does result in faster solutions. If it does I could make a branch designed to work with it.

If cuOSQP will be a valuable solution for real-time control we can work on including it in the library for sure. Which kind of problem are you working on?

I'm working on a real-time implementation of an MPC-based Motion Cueing Algorithm.
Unfortunately, cuOSQP doesn't seem so promising. It returns completely different solutions from OSQP for the same problem and the solution takes many more iterations. I haven't given up on it yet but I'm not so sure that it will be a suitable replacement anymore.

I reached the end of the road with cuOSQP, it turns out there is a hard bottleneck in setting up the problem in the GPU. In my case this takes ~40ms no matter what I try, so the 100 Hz goal was always a dream.
I ended up splitting my problem and going back to OSQP. I'm working with MSVC and in Release mode optimised for speed I managed to find a subset of problems that solve in ~15 ms. While trying to reduce this I found something interesting in libmpc.
In LOptimizer.hpp this line takes ~6 ms to run but when I time the get method inside ProblemBuilder.hpp it takes <0.1 ms. Looks like despite returning a reference a copy is being made so I modified the ProblemBuilder class and made mpcProblem public so that it can be accessed via builder->mpcProblem in LOptimizer. I also made get a void method. This brought down the solution time from ~15 ms to ~9 ms. Seems like a worthy improvement for the library, what do you think?
There is one more thing that I'm looking into atm which might shave another ms or two from the solution time. Instead of calling osqp_setup on every iteration, one could use the update functions in the osqp c api to modify the l, q and u vectors. This is what they do in embedded mode and it also works here because P and A need only be set up once. I'll see how this goes.

@camilogonzalez97 I've investigated what you reported and I've found a solution without lettingmpcProblem public, the overhead of the get function is almost zero. I'm going to push this fix on master soon, thanks to pointed out it. Regarding the solution of calling osqp_setup could work only for standard mpc problem. In case of adaptive of time-varying mpc, the matrices P and A varies over time, anyway the overhead of recreating the osqp problem seems not that big.


Update the package

Move File Handler from jupyter-js-filebrowser, and add codemirror loading helpers.
The current implementation moves to jupyter-js-notebook.

@jasongrout, I'll let you merge this one.

I'll push the old code into jupyter-js-notebook before merging this, probably tomorrow.

I copied the current version into jupyter-js-notebook in https://github.com/jupyter/jupyter-js-notebook/pull/16


hydrate-cluster and bootstrap systemd vault policy format drift

Since commit https://github.com/input-output-hk/bitte/commit/81a576eab9ae0653a5b9ee706f6ba36a10c00932, anytime the bootstrap core node is deployed with a change and then a TF hydrate-cluster plan is performed afterwards there will be at least a minimal no-op TF plan diff due to bootstrap script declaring vault policies in hcl format and hydrate-cluster declaring vault policies in json.  Bringing the syntax to the same format for both methods should resolve -- likely the preference is to bring the bootstrap scripts to use json.

Are you already working on this? If not then I can pick it up. Shouldn't be too hard.


Out of range error

When does out_of_range and Assertion m_edge_timestamps.size() + 1 == m_edge_destination.size() occur?

@Nithanaroy this is for temporal graphs - it should never happen, if you have a specific error it is likely a data issue where there is not a timestamp for every single node/edge but its hard to say without real example.


Regenerated doc with new design

Hi, I've just generated new documentation. The design is now same as other modern libraries. One more question, do you plan new release of this library? The last release has been three years ago. Thank you.

Hi @Reddriver . Thanks for this PR. I am planning a small release in the following days and I will include this PR also.
Did you have the time to check PR #2 ? Could it solve your issue reported in Issue #1 ?

Hi, @rticau, thank you for merge of my PR and also thanks for adding a new KW Close Connection. I've just tested and it works great. Without keyword 1 GB of RAM and with Close Connection just 80 MBs. I used datadriver.


feat: allow specifying SET in createFunction

This PR introduces a change to the createFunction function.
It will allow specifiying SET statements to change configuration parameters as stated in the official specification.

I encountered this while using Supabase: https://supabase.com/docs/guides/database/database-advisors?queryGroups=lint&lint=0011_function_search_path_mutable#how-to-resolve

Please also add a integration test in test/migrations. Maybe you can find the createFunction there somewhere and add just a case to it.

I will potentially have a look tomorrow and see if I can merge and release this (together with Renovate updates)


Update networking setup

This will remove unnecessary AutoConnect and Favorite options as well as setup PreferredTechnologies to prefer ethernet over wifi if both are present.

@zimme I would like to include this in the next release but I am unclear as the the use-case these tweaks address.

connman has no default in what connection is preferred when multiple connections are active. So the preferred connection chosen is I believe by the first one established.
This will change k3os default to prefer ethernet over wifi as that's usually the more reliable and faster connection.
It's not really something that will come up for a lot of people but i ran into this after configuring my rpi over wifi then connected it to ethernet later and it sometimes preferred the wifi connection as on thos specific boots the wifi was established before ethernet for some reason.
The other change is just about removing some unnecessary config options that have no effect and was added by me in a previous PR.


ci: run CodeQL analysis

📦 Published PR as canary version: 7.3.12-canary.156.1241.0

:sparkles: Test out this PR locally via:
npm install<EMAIL_ADDRESS># or
yarn add<EMAIL_ADDRESS>

:rocket: PR was released in v7.3.12 :rocket:


Update machine-learning-apps-text-analytics.md

Updated review date. The service has not changed so kept documentation the same.

Hi @LuisCabrer, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (luisca). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;


AlertToast.AlertType.loading results in a crash on macOS Monterey

Describe the bug
When presenting a .toast with AlertToast.AlertType.loading on macOS Monterey, an app crashes
To Reproduce
Steps to reproduce the behavior:

Apply the .toast modifier to a few
Set it's type property to AlertToast.AlertType.loading and title to a string of choice
Try to present the toast, for example with a button

Expected behavior
I expected the above steps to produce a toast that shows a loading indicator, like on iOS and iPadOS
Screenshots

Desktop (please complete the following information):

OS: macOS 12.0 (Monterey) and up

+1


[feature] V3 How can I obtain the WalletConnect QR code?

What problem does this new feature solve?
V3 How can I obtain the WalletConnect QR code?
Describe the solution you'd like
Obtain the WalletConnect QR code to customize the UI

This is not a feature of web3modal, but you can achieve it on your own (it is hard).
Web3modal is built on top of @web3modal/ui package which contains all of these web-components (including qrcode) https://gallery.web3modal.com/?path=/docs/composites-wui-qr-code--docs
You can use this component and generate qrcode data using wagmi, here is how we generate it (you grab WalletConnect connector and listen for uri event)
https://github.com/WalletConnect/web3modal/blob/V3/packages/wagmi/src/client.ts#L137-L152
Closing this issue, as this is out of scope for web3modal i.e. it's meant to be used as a drop in sdk with customization availabre through options, for something more custom, you'd likely need to build out your own solution, that said we will be extending customization options over time.


Visualization is always interactive

Visualization requires the user to be interactive and does e.g. not allow writing the figures to images. If you run the optimization script on some server e.g. in the background, this could be useful.
It might be worth discussion extending the APIs by e.g. introducing new functions, parameters to save the figures or expose the plotly data structures to the user in order to allow controlling the results.

A write_image method provided by Plotly might be enough for this issue.
https://plot.ly/python/static-image-export/

Resolved by https://github.com/optuna/optuna/issues/601.

A nitpick and you're absolutely right that this issue is fixed but maybe you meant by https://github.com/optuna/optuna/pull/704 ? #601 is another issue that I noticed you just commented on. Thanks! 🙂

Oops! Updated the comment. Thank you!


Save-Script should allow .PS1 extension

From @jpsnover on September 2, 2016 18:12
PS> save-script -name get-uptime.ps1 -path .
PackageManagement\Save-Package : No match was found for the specified search criteria and script name 'get-uptime.ps1'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\<IP_ADDRESS>\PSModule.psm1:2486 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

PS> save-script -name get-uptime -path .

PS> $PSVERSIONTABLE
Name                           Value
----                           -----
PSVersion                      5.0.10586.494
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.494
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

Copied from original issue: PowerShell/PowerShell#2170

From @bjtucker on September 5, 2016 5:24
As a naive user, I would expect save-script to accept a filename with extension for the name and do the right thing.
If the downside is things getting confused when someone (wrongly!) publishes a package with a .ps1 at the end, maybe the right thing is to ignore it unless the user specifies they really want that with the switch. (And perhaps prevent doing that accidentally in as many package managers as reasonable).
I'd make them use a more pejorative sounding switch name than "Accurate" if they really want to load a package with .ps1 tacked onto the end of the name, but I'm cranky.

From @GeeLaw on September 2, 2016 19:13
The Name parameter is the name of the package, not the file in the package.
See get-uptime package on PowerShell Gallery -- its name is get-uptime, not get-uptime.ps1. Meanwhile, this package on PowerShell Gallery is named Azure.Storage. Therefore it is valid to have a package name with a dot ..
The first thing to consider is that, what happens if I upload two packages called Use-Ps1 and Use-Ps1.ps1? I am not sure whether I cannot do this and I would not like to do that just to test a rare case out (practically no one does this, making a package name end in .ps1 or .psm1, I think) and pollute the repository. Please do let me know if one cannot have Use-Ps1.ps1 as the package name.
Speaking from the perspective of "packages", I think one shouldn't use Use-Ps1.ps1 to refer to a package called Use-Ps1. After all, the Use-Ps1 package can include several script files and it sounds strange to save Use-Ps1.ps1, but getting more than one file.
Suppose the worst possible implementation is used in the next version of PowerShell: When you Save-Script -Name '<Abc>.ps1', the cmdlet first searches for a package exactly named <Abc>.ps1 (if it does not do this, some packages can never be downloaded), if it fails, it falls back to <Abc>. Then you are risking leading a new fashion of breaking dependencies -- when people find Saving-Script an <Abc>.ps1 sounds good since it calls the fact of saving a script out, people start Saving-Script get-uptime.ps1 for this fashionable reason, and all of a sudden, someone uploads get-uptime.ps1 package and everyone gets screwed up.
Moral: be accurate.
Though this will not be a breaking change, as nobody ever named their package <Abc>.ps1 (or is there?!), and we can add Accurate switch to this command, allowing one to download a script package with its name appended with .ps1 is stilled not recommended.

From @GeeLaw on September 5, 2016 5:27
Hmmm... Got a solution that both keeps backward compatibility and teaches the users.
Rename the parameter Name to PackageName, and add an alias (of course it's Name) for PackageName. New users will see PackageName in help or when tabbing thru the param list, and will surely understand what the parameter should be.

From @GeeLaw on September 5, 2016 16:52
I agree that we should NEVER use Use-Ps1.ps1 as the same package name. But again, we should not confuse users with the name of a file in a package and the package itself.
There are many subtle things if you make Save-Script look for Abc given package name Abc.ps1.

Should we make Save-Module look for Abc given the package name Abc.psm1?
Should we make Save-Script look for Abc given the package name Abc.ps1.ps1, since a recursive elimination should be applied?

Now PSGallery keeps package names Case-Preserving/Case-Insensitive, that's good.
Another analogy is that, everyone who uses PowerShell should know that, we should Invoke-Item .\a.txt, not Invoke-Item .\a with extension hidden. And the user should be clear that he is saving a script package, not a script file, though the package could contain just one file.
Yet another analogy is that, say you have a git repo that has abc.ps1 in it, nobody will git clone remote://abc.ps1, because they know they are cloning a repo, not a file.
And you can't deal with the case, when the package name is Get-TaskmgrMeasures and there are two files, Get-UpTime.ps1 and Get-MemoryUsage.ps1. The changed behaviour becomes unintuitive again.
My point is that, this change may seem helpful and forgiving for newbies, but causes subtle trouble when looked into further. Therefore, what should be done, I think, is to guide and educate the user more effectively, by renaming the name of Name to PackageName.
On the cross-platform scripting, I think the idea of shebanging the script is great.

From @jpsnover on September 5, 2016 15:43
As a general rule - PowerShell attempts to more like an AK47 than an M16 - loose and reliable vs tight and finicky.  My Issue was making the case that we don't want to be too precise here and that we know what the user is doing one way or the other so let them be sloppy and we'll figure it out.  If they give us NAME, we look for the file NAME.ps1, why not exact the NAME if they specify Name.ps1?
So the question is, for scripts, what is the relationship between the "name" and the "filename"?
On Windows, you could assert that schema is that the FILENAME is of the form NAME.ps1.
But on Linux, a script can have a FILENAME in the form NAME.  (We don't need .ps1 on Linux because you can put #!/path/powershell as the first line of the script instead).
So the first question to answer is whether we would allow BOTH  FOO and FOO.PS1 to be published to the gallery?
In order to answer that Q, I would ask another question, would we allow FOO, FOo, Foo, foo to be published as different scripts?  Unix is case sensitive, so these could be completely different scripts on Linux.
My initial reaction is to say NO - that for the gallery, we should use the Case-Preserving/Case-Insensitive rule.  I've never heard a compelling argument for why the increase in usable namespace warranted the corresponding increase in errorspace.  Of course I'm biased in this regard because I make lots of mistakes and I want a system that is forgiving.
When we pull on this thread long enough, I think it leads us to the question of community interaction - do we expect both the Unix and Windows scripts to be shared in the same repository.  If the repository supports case sensitivity for the Unix community, it would support different scripts being named FOO and foo and you could write those scripts so that FOO required foo to run.  Of course, this would break completely on a Windows system.
Thoughts:

The gallery exists and is used by the Windows community.
I think it is beneficial for both Unix and Windows community to share a common repository.
Adopting a case-preserving/case-insensitive rule for the repository is good tradeoff to accomplish that.
Ergo = adopting a sloppy model where we accept NAME.PS1 or NAME is desirable.  If you give us either, it will be easy for us to find the NAME and the FILENAME so we should just be nice and do the work for the user.

We are left with the remaining hard problem:

Since Unix allows scripts with just a NAME and not a .ps1 extension - do we allow those scripts to be published in the gallery or do we require them to have a .ps1 extension?

I'm inclined to trying and make that work but then encouraging people to adopt the best practice of always using a .PS1 extension AND putting #! in the first line.
I would love thoughts on that topic.

From @MaximoTrinidad on September 5, 2016 16:10
Well said Jeffrey Snover!
This could one strong topic to discuss in the next MVP Summit. Scripts collaboration between Windows and Linus will be a challenge . I wouldn't be good that a FOO, foO, or fOo.Ps1 would overwrite a foo.PS1 script in the gallery. So, again, the adoption of best practices for Linux will be critical.
This a good discussion!

From @GeeLaw on September 6, 2016 3:34
@jpsnover You forgot dependencies. See this package on PowerShell Gallery. When you Save-Script -Name Update-Windows -Path ., you get PSWindowsUpdate folder (the module the script depends on) as well as Update-Windows.ps1 -- it's not saving a file, therefore this might cause confusion.
There is .EXTERNALSCRIPTDEPENDENCIES in script info created by New-ScriptFileInfo. Though a script package can contain only one script file, it can implicitly contain more files by adding dependencies.
I have to apologise for my example since you cannot Save-Script -Name Get-TaskmgrMeasures without getting a Get-TaskmgrMeasures.ps1. And at the same time, Unix users shouldn't be allowed to publish a script without extension name as we see all script packages in PowerShell Gallery contains (by itself) exactly one script file (named <PackageName>.ps1) and one manifest file (named <PackageName.nuspec> -- new practices shouldn't break this. But still, it's great practice to add shebang line in scripts published for cross-platform usage.
One more thing, for a new user (who might run into this problem without knowing how to fix this immediately), he could visit the repository (e.g. PowerShell gallery) and copy the line of saving/installing the package from the website. Therefore most users shouldn't have problem saving/installing a package with correct name.

From @iSazonov on October 6, 2016 13:5

We are left with the remaining hard problem:
•Since Unix allows scripts with just a NAME and not a .ps1 extension - do we allow those scripts to be published in the gallery or do we require them to have a .ps1 extension?
I'm inclined to trying and make that work but then encouraging people to adopt the best practice of  always using a .PS1 extension AND putting #! in the first line.

If we require #! for the Windows world  it is logical to require  .PS1 for Unix world. Reciprocal convergence.

From @jpsnover on September 5, 2016 17:56
@GeeLaw I might have confused the discussion.
What I'm saying is that for FOO.PS1 - the NAME is always FOO and the FILENAME is always FOO.PS1.  Full Stop.
From there, I'm saying that a user should be able to specify either the name or the filename for publishing, saving, updating etc and that we should be able to figure out the rest.  We can do this because there is a 1 to 1 correspondence between a script package and a script file and because the cmdlet name itself is telling us that it is working with a SCRIPT and therefore can allow this shortcut.
This is not case with modules or git repos so I don't think we have the problem that you are worried about.  Double check my thinking on that and if I got it wrong - give me an step-by-step where it breaks down because I'm not seeing it right now.
Thanks for the engagement @GeeLaw !

From @iSazonov on October 7, 2016 7:24
Extensions in Windows is allowed
Extensions in Linux   is allowed
Extensions in Windows is a base.
Extensions in Linux   is optional.
Windows use extensions to detect file type. High level API based on extensions to launch appropriated application.
Linux   don't use extensions to detect file type. Linux always open a file and analyze a file mark to launch appropriated application.
Windows use external file type mark. Optimized for GUI.
Linux use internal file type mark. Don't optimized for GUI.
So our way is single and it is reciprocal convergence.
Interestingly, Windows can create multiple files of the same name but different types in one folder because there is a different extensions. Linux can not do like that.
@JKeithB

I'd welcome compelling arguments for being case-insensitive.

Case-insensitive is user-friendly. Linux use this too - for URL in browsers, ex. 😊

From @KirkMunro on October 6, 2016 13:49
I agree with this sentiment:

If we require #! for the Windows world it is logical to require .PS1 for Unix world. Reciprocal convergence.

Not only that, what if there is support for a .ps2 extension in future builds of PowerShell? To maintain consistency with all of PowerShell I think requiring both the shebang and the file extension is the way to go, and PSScriptAnalyzer can help make this easier for folks to learn/accept.

From @JKeithB on October 6, 2016 16:35
This is a great discussion focused on what the gallery & PowerShellGet cmdlets support.
The only hard stake in the ground that I'll put is that PowerShellGallery is the place we are establishing where users should look for stable scripts regardless of platform. That's our mission.
It seems we have consensus around avoiding user confusion that could arise around case sensitivity. I'd welcome compelling arguments for being case-insensitive.
For the file names, though, doesn't this impact what a file name can be generally in our platform across all environments? We make lots of assumptions about files based on file extension that go beyond naming a script for separate use.
For example, when Pester runs, are we going to look for and attempt to load any file in the tests folder, whether or not it's a .PS1? Script Analyzer makes a bunch of assumptions today about files based on file extension as well. It's just a script file, so shouldn't module contents follow the same rules as standalone scripts?  If not, what would be a good rule set?

From @GeeLaw on October 7, 2016 7:41
Another perspective on being case-kept and case-insensitive: though most modern file system are case-sensitive, a lot of high-level API set, e.g. Win32, adopts case-kept and case-insensitive. AFAIK, the default setting on Mac doesn't allow two files whose names differ only by case.
Summary till now:

A script package named <abc> will contain (by itself) only one script named <abc>.ps1, till now;
It is possible to publish <abc>.ps1.ps1 to the repo, but no one has done that yet;
A script package can have external dependency, therefore Save-Script might give several script files, and this is a current practice;
The only cross-platform-compatible way is to use both extensions and shebang line, and being case-insensitive.

Because of point 3, I am against allowing the user to save Get-UpTime package by invoking Save-Script -Name Get-UpTime.ps1. This could cause confusion because you are not only saving one script file.
Point 4 arises from a broader topic on cross-platform PSGallery.

Based on the discussion above, I feel like this raises more issues than it resolves. Resolving to indicate that we don't plan to act on this


DatePicker styles in list view (list_editable) not working

What version of Unfold are you using?
django-unfold==0.35.0
What version of Django are you using?
5.0.6
What browser are you using?
Version 127.0.6533.119 (Official Build) (64-bit)
Did you checked changelog/commit history, if the bug is not already fixed?
For example: Yes or No
Did you searched other issues, if the bug is not already fixed?
Yes
Describe ISSUE
When making "list_editable" in the list view, the datepicker style doesnt work properly.  (It does work well in the change_view.)
The problem is with the widget and when you open the calendar modal. The classes of the fields seem correct (see screenshots).
I have tried to use the formfield_overrides (see admin.py code) and without it, but same problem.
(I also tried to user UnfoldAdminDateWidget and AdminDateWidget and the result is incorrect as well but different and not as expected.)
(I am not that experience yet, so I am sorry if there is something I am not doing properly and shouldn't be creating an issue for this.)
Thanks in advance for any help.
LIST VIEW (not working properly)

CHANGE VIEW (working properly)

fragment of admin.py
@register(Enquiry, site=new_admin_site)
class EnquiryAdmin(ModelAdmin):

    compressed_fields = True

    formfield_overrides = {
        models.DateField: {
            "widget": UnfoldAdminSingleDateWidget,
        },
    }

    list_display = ['student', 'rating','follow_up_date', 'email', 'nationality', 'phone', 'program', 'branch', 'employee', 'created_at']
    list_filter = ['rating', 'program', 'branch', 'employee', 'created_at', 'follow_up_date']
    search_fields = ['name', 'surname', 'email', 'nationality']
    list_per_page = 20
    list_editable = ['branch','employee', 'rating', 'follow_up_date']

    fieldsets = (
        ('Personal Information', {
            'fields': ('name','surname', 'student', 'dob', 'nationality', 'email', 'phone')
        }),
        ('Course Information', {
            'fields': ('program', 'course', 'date_start', 'course_weekly_price', 'course_qty_weeks', 'enrollment_fee',
                       )
        }),
        ('Accommodation', {
            'fields': ('accommodation', 'accommodation_qty_weeks')
        }),
        ('Total', {
            'fields': ('total',)
        }),
        ('Assigment', {
            'fields': ('branch', 'employee')
        }),
        ('Follow Up', {
            'fields': ('rating', 'follow_up_date',)
        }),
        ('Timestamps', {
            'fields': ('created_at',)
        }),
    )

    readonly_fields = (
        'name', 'dob', 'nationality', 'email', 'phone',
        'program', 'course', 'date_start', 'course_weekly_price', 'course_qty_weeks', 'enrollment_fee',
        'accommodation', 'accommodation_qty_weeks', 'total', 'created_at',
    )

Thansk for report. Fixed in #715

Thansk for report. Fixed in #715

Thanks to you for such a great admin.


Avoid top-level with ...; in several packages in pkgs/tools/

Description of changes
Using with at a top-level scope is an anti-pattern. The tracking issue is #208242. This is a pure refactor: there is no functional change contained in this PR.
I really wish to use callPackage style dependency injection for the two Python packages here, rather than the style I've used in this PR. I don't know how to do that refactor, however.
I used the refactor strategy that looks for the uses of names coming from lib, pkgs, python3Packages, and more.
Following advice, I also preferred to inherit names from lib instead of builtins where there was a choice. I also preferred to inherit from lib in one place, rather than to have a mixture of with lib;, lib.thing and inherit (lib) thing. I can drop those changes if reviewers desire.
There are no rebuilds when I run nixpkgs-review rev HEAD, so I've targeted master with this PR.
Things done

[x] Tested compilation of all packages that depend on this change using nixpkgs-review rev HEAD.
[x] Fits CONTRIBUTING.md.

Ugh. This is why I don't like doing ad-hoc, non-tool-assisted refactors -- applying CR feedback ends up causing regressions.

@fricklerhandwerk, I will note this message from the PR headmatter:

I really wish to use callPackage style dependency injection for the two Python packages here, rather than the style I've used in this PR. I don't know how to do that refactor, however.

If you do know how to pull that off, that's the better PR.

If you do know how to pull that off, that's the better PR.

Check how it's done here:

Using callPackageWith with on python3.pkgs
Sample package recipe with Python inputs

Thanks! Those are great references. I'm going to pull https://github.com/NixOS/nixpkgs/pull/299022 into draft and keep it on the slow burner to see if I can make use of those patterns in nixpkgs.


Bump pySigma version?

Hi all,
first of all - great project!
I would like to open a PR to add our converter pySigma-backend-uberAgent to sigconverter.io.
However, as we have just implemented that backend we have started using a current version of pySigma and I can't add our backend as dependency.
Will you guys update pySigma to a newer version or will that requirement for pysigma = "0.9.11" stay a while? If yes, I would check if I can backport our backend to the old version.

Hey @svnscha thanks for opening this.
We're currently in the process of studying the ability to offer 2 pySigma versions (at least) the latest version and a previous one for the exact reason you mentioned. The current setup of pysigma requires you to specify version and if the people maintaining it do not upgrade it, it'll fail.
So for now it'll stay like this but we want to upgrade it as soon as we can and support as many backend as possible. Also specifically to be able to offer the templating feature from the web.
I'll keep you posted :)

Hey @nasbench - super quick response. Thanks! I have some additional information that might be helpful. I have locally tested to update all the packages.
My updated version looks like this:
[tool.poetry.dependencies]
python = "^3.10"
flask = "3.0.0"
pysigma = "^0.10.9"
sigma-cli = "^0.7.10"
pysigma-backend-loki = "^0.10.3"
pysigma-backend-carbonblack = "^0.1.5"
pysigma-backend-cortexxdr = "^0.1.2"
pysigma-backend-elasticsearch = "^1.0.9"
pysigma-backend-opensearch = "^1.0.1"
pysigma-backend-qradar-aql = "^0.2.5"
pysigma-backend-sentinelone = "^0.1.3"
pysigma-backend-splunk = "^1.0.3"
pysigma-backend-insightidr = "^0.2.2"
pysigma-pipeline-crowdstrike = "^1.0.1"
pysigma-pipeline-sysmon = "^1.0.3"
pysigma-pipeline-windows = "^1.1.1"
pysigma-backend-uberagent = "^0.3.61"

As you see most backends support a newer version.
Unfortunately, a couple of backends don't.
pysigma-backend-azure = {git = "https://github.com/sifex/pySigma-backend-azure.git", rev = "9c35b78cd4d4891e1b46ccf21ed555ffb10b96e6"}
pysigma-backend-microsoft365defender = {git = "https://github.com/AttackIQ/pySigma-backend-microsoft365defender.git", rev = "731db4b6c7cbab8898973b4350d93268e135c495"}
pysigma-backend-stix = {git = "https://github.com/barvhaim/pySigma-backend-stix", rev = "0d7c05e187249c26f5abb99f63bf839c78705d1e"}
pysigma-backend-qradar = "0.3.3"
pysigma-backend-sentinelone-pq = "0.1.1"

Instead of downgrading our backend I would rather contribute helping to support multiple pySigma versions. Is there something I can help with?

Hey thanks for the test, i didn't notice that most of them are compatible with the latest version. From my pov i'm fine with loosing these 5 for now. I'll ask the rest of the team for their opinion.
As far as additional help. I don't know if the incompatible backends only require a version update in the pysigma plugin or something will break.
From our side we're trying to host 2 versions of pysigma under 2 different subdomains to make it easier as this will always be a problem to get everyone to an acceptable state.
I'm checking with the team on this task to see if there's an update from their side :)

This is now resolved. You can check out https://beta.sigconverter.io/ for the version of the website using the latest pySigma version.
Here is an example of the UberAgent conversion
Thanks :)


fix np.vstack error concatance

there some error on new python so i change the code to make it work again

there some error on new python so i change the code to make it work again

i use it on latest pytorch version :)


A0-3112: Update python framework with RPC port changes

Description
We forgot to update python framework with recent changes that removed WS_PORT. Hence, the long session nightly test failed.
Type of change
Please delete options that are not relevant.

Bug fix (non-breaking change which fixes an issue)

We seem to have a couple mechanisms like this for starting a network - is this the preferred one?

True, at some point we should invest in only one. Can't say whether it is the preferred one, for tinkering I use bash and this framework only for CI tests.


Support relative paths when launching VS Code from Bash on WIndows

Forked from https://github.com/Microsoft/vscode/issues/13138 as this is going into January in commit https://github.com/Microsoft/vscode/commit/9c298b09782e3dddc473bf6368521b81a122d6f4
To verifier:
Please test launching VS Code using various args on Bash on Windows, you will need to be on a recent Windows Insiders.

Things like this should be possible:
code .
code ./some-file

But not:
code /mnt/c/foo.txt
code --help


Git commands return error (UtilConnectUnix:510).

Version
10.0.22621.819
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>
Distro Version
Debian 11
Other Software
Git 2.30.2
Visual Studio Code Terminal
Repro Steps
Open Visual Studio Code from command line
Try to push current changes 👇
git push origin master // <-- error occurs

Expected Behavior
Push without errors.
Actual Behavior
abdelrhman@Abdelrhman:~/projects/buy-or-bye$ git push origin reports
<3>WSL (1493) ERROR: UtilConnectUnix:510: connect failed 2
<3>WSL (1520) ERROR: UtilConnectUnix:510: connect failed 2
Everything up-to-date

Diagnostic Logs
No response

any solution to this, getting the same error when running docker compose up
<3>WSL (8307) ERROR: UtilConnectUnix:510: connect failed 2

Using:
WSL2
Ubuntu 20.04
Kernal: <IP_ADDRESS>-microsoft-standard-WSL2
Docker: Docker version 20.10.21, build baeda1f
Docker Compose: Docker Compose version v2.12.2
Adding sudo to the start of my command fixes this but I don't think I should need sudo to run docker compose up

From the WSL2 bash shell, I have the same issue , by trying to launch a windows exe from bash :
sudo update-binfmts --disable cli
and :
/mnt/c/Users/my_name/wsl-notify-send.exe "test1"
<3>WSL (5828) ERROR: UtilConnectUnix:510: connect failed

I don't know if it helps but that is how I fixed it.
I had set up WSL git authentication via Git Credential Manager
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-wincred.exe"

it worked but then one day I got this error.
I solved by restarting WSL
$ wsl --shutdown
$ wsl


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/43732

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/44092

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/52136


coreos-postinst: add torcx-profile-populate logic

This relies on https://github.com/coreos/torcx/pull/109 flowing through the overlay first.

This is now unblocked, so it may benefit from a review @ajeddeloh @dm0-. I'd expect a couple of polishing iterations though.
I know that my shell-style is very poor, so feel free to nit-pick and suggest how you'd prefer this to look like.

I did a further shellcheck pass on this, fixing a couple of minor things and silencing the sourcing warnings (few pre-existing warnings are still there). I think we could land this together with https://github.com/coreos/bootengine/pull/145 in this alpha cycle.

I dropped the spurious newlines. Everything else is left untouched, I'll retain the LGTM and merge this later today if no other comments show up, followed by a 0.4.9 PR.


fix: disable closing dropdown on space

Description
Fixes #9597
Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

Test coverage results :test_tube:
:green_circle: Total coverage has increased
// Code coverage diff between base branch:release and head branch: fix/dropdown-filter

Status
File
% Stmts
% Branch
% Funcs
% Lines

:green_circle:
total
54.99 (0.01)
36.33 (0.02)
34.68 (0)
55.38 (0.01)

:green_circle:
app/client/src/components/ads/Dropdown.tsx
82.21 (0.58)
61.85 (0.34)
69.44 (0)
81.03 (0.5)

:green_circle:
app/client/src/utils/WorkerUtil.ts
89.76 (0.78)
70.59 (0)
100 (0)
93.33 (0.95)

:green_circle:
app/client/src/utils/autocomplete/TernServer.ts
52.94 (0.23)
41.67 (0.84)
36.21 (0)
56.99 (0.25)

Tested the PR and it is working fine

/ok-to-test sha=db1700e

/ok-to-test sha=203fcf7


awadb and azure-ai-vision Version issue

System Info
Upon the poetry install -E all  command, I'm unable to install awadb version or azure-ai-vision specified in pyproject.toml
awadb = {version = "^0.3.2", optional = true}
azure-ai-vision = {version = "^0.11.1b1", optional = true}
Package operations: 1 install, 1 update, 0 removals

  • Updating awadb (0.3.1 -> 0.3.2): Failed

  RuntimeError

  Unable to find installation candidates for awadb (0.3.2)

  at ~/opt/anaconda3/envs/langchain/lib/python3.9/site-packages/poetry/installation/chooser.py:76 in choose_for
       72│
       73│             links.append(link)
       74│
       75│         if not links:
    →  76│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       77│
       78│         # Get the best link
       79│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       80│

  • Installing azure-ai-vision (0.11.1b1): Failed

  RuntimeError

  Unable to find installation candidates for azure-ai-vision (0.11.1b1)

  at ~/opt/anaconda3/envs/langchain/lib/python3.9/site-packages/poetry/installation/chooser.py:76 in choose_for
       72│
       73│             links.append(link)
       74│
       75│         if not links:
    →  76│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       77│
       78│         # Get the best link
       79│         chosen = max(links, key=lambda link: self._sort_key(package, link))

However I was able to install the  awadb 0.3.1 version.
Who can help?
No response
Information

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

Related Components

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

Reproduction

Freshly install poetry via: curl -sSL https://install.python-poetry.org | python3 -. In Conda venv.
After it's installation, Poetry (version 1.5.1), attemped poetry install -E all  command
Received errors

Expected behavior
After I installed Poetry, I tried to run poetry install -E all within the langchain directory, however I receive dependencies errors.

I'm getting the same, did you end up finding a solution? I've tried a few different versions of poetry, all the same error.

No, I haven't found any solution unfortunate :/

I encounter the same issue on macOS, but not reproing on Windows WSL.

It seems azure-ai-vision does not support macOS, as mentioned [here].(https://github.com/hwchase17/langchain/blob/560c4dfc98287da1bc0cfc1caebbe86d1e66a94d/docs/extras/modules/agents/toolkits/azure_cognitive_services.ipynb#L12)


Vested Linear Lockups in LockedBalanceEntry

Current dependencies on/for this PR:

feature/proof-of-stake

PR #902   👈

PR #905

This stack of pull requests is managed by Graphite.


Fleet as a package

make fleet as a package so that users can do batch training or online training very easily

Need a README file to show how to use it!

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

 All committers have signed the CLA.


Invalid step task reference AzureContainerApps@V0

Required Information
Question, Bug, or Feature?
Type: Question
Enter Task Name: AzureContainerApps@V0
Environment

Server - Azure Pipelines (account name/team name can be supplied in private)
Agent - Hosted

Issue Description
When trying to use the new task  AzureContainerApps@V0 released last month, I get the following error when validating or trying to run a Azure Pipelines yaml:

Invalid step task reference AzureContainerApps@V0

This specific task is also not available in the tasks assistant in the Azure Pipelines yaml web editor, nor is it recognized by the VS Code extension (though that may be out of scope for this issue).
Do I need to wait for an (undocumented?) scheduled release cycle? Are there some manual actions required to get the newest tasks available to use? We are not self hosting anything in this situation. Looking forward to hearing from you.
Thank you for your time!

@Basssiiie Hey there, apologies for the delayed response -- the AzureContainerApps@1 task is now generally available and shouldn't give you any issues when referencing it in the Azure Pipelines YAML web editor.
You can find relevant documentation outlining how to use the generally available stable version of this Azure Pipelines task here.
Please feel free to let me know if you have any additional questions or comments! I'm going to close this issue since I don't believe there are any actionable items required from our side, but please feel free to let me know otherwise and I'll be happy to re-open this issue.


Add a Windows test environment

Via AppVeyor as in clean-css?

Nope, GitHub Actions is fine :)

Closing as 'won't fix' as clean-css-cli is going into maintenance mode. If anyone wants to bring it back up, please submit a PR.


ImportError: No module named db when installing

When installing st2_deploy.sh latest, it fails with message:
...
==> chatops: Cloning into 'st2mistral'...
==> chatops: running develop
==> chatops: running egg_info
==> chatops: creating st2mistral.egg-info
==> chatops: writing pbr to st2mistral.egg-info/pbr.json
==> chatops: writing dependency_links to st2mistral.egg-info/dependency_links.txt
==> chatops: writing st2mistral.egg-info/PKG-INFO
==> chatops: writing top-level names to st2mistral.egg-info/top_level.txt
==> chatops: writing entry points to st2mistral.egg-info/entry_points.txt
==> chatops: [pbr] Processing SOURCES.txt
==> chatops: writing manifest file 'st2mistral.egg-info/SOURCES.txt'
==> chatops: [pbr] In git context, generating filelist from git
==> chatops: warning: no files found matching 'AUTHORS'
==> chatops: warning: no files found matching 'ChangeLog'
==> chatops: warning: no previously-included files found matching '.gitreview'
==> chatops: warning: no previously-included files matching '*.pyc' found anywhere in distribution
==> chatops: writing manifest file 'st2mistral.egg-info/SOURCES.txt'
==> chatops: running build_ext
==> chatops: Creating /opt/openstack/mistral/.venv/lib/python2.7/site-packages/st2mistral.egg-link (link to .)
==> chatops: Adding st2mistral 0.0.1.dev17 to easy-install.pth file
==> chatops:
==> chatops: Installed /etc/mistral/actions/st2mistral
==> chatops: Processing dependencies for st2mistral==0.0.1.dev17
==> chatops: Finished processing dependencies for st2mistral==0.0.1.dev17
==> chatops: Writing Mistral configuration file to /etc/mistral/mistral.conf...
==> chatops: Writing Mistral log configuration file to /etc/mistral/wf_trace_logging.conf...
==> chatops: Changing max connections for PostgreSQL...
==> chatops:  * Restarting PostgreSQL 9.3 database server
==> chatops:    ...done.
==> chatops: Setting up Mistral DB in PostgreSQL...
==> chatops: NOTICE:  database "mistral" does not exist, skipping
==> chatops: DROP DATABASE
==> chatops: NOTICE:  role "mistral" does not exist, skipping
==> chatops: DROP ROLE
==> chatops: CREATE ROLE
==> chatops: CREATE DATABASE
==> chatops: Creating and populating DB tables for Mistral...
==> chatops: Traceback (most recent call last):
==> chatops:   File "./tools/sync_db.py", line 17, in <module>
==> chatops:
==> chatops: from mistral.db.v2 import api as db_api
==> chatops:   File "/opt/openstack/mistral/mistral/db/v2/api.py", line 18, in <module>
==> chatops:
==> chatops: from oslo.db import api as db_api
==> chatops: ImportError
==> chatops: :
==> chatops: No module named db
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Fixed by awesome @m4dcoder here: https://github.com/StackStorm/mistral/commit/44b223b98b8c1bcbbd1efb2d54ade993aacf5066

Yeah, this seems related to the oslo library namespace changes - https://github.com/StackStorm/st2/issues/1658
We need to make sure all of our dependencies are pinned and / or update all the code to use the latest version and replace "oslo." namespace with "oslo_".


Create Sighting of Observed Data Example

Now up on the website here

Producer and consumer python code have now been added to this example.


replace python-Levenshtein with rapidfuzz

Currently python-Levenshtein is the only GPL licensed dependency of counterfit. This pr replaces it with rapidfuzz, which is MIT licensed and faster.

Thanks. This is a good PR, let us test.

In the latest version of rapidfuzz this should be implemented in the following form:
from rapidfuzz.distance import Levenshtein
...
distances = [Levenshtein.distance(iif, ii0) for iif, ii0 in zip(i_f, i_0)]

@moohax since this has not received any attention in the last half year I will close this pr. Feel free to apply these changes yourself.


Add RAM to memory_map of STM32F303VCTx

Hi,
This PR adds a second ram section to memory_map of STM32F303VCTx. This is to fix https://github.com/knurling-rs/defmt/issues/713.
The memory.x generated by stm32fxx-hal (link to function which generates it) looks like following:
MEMORY {
    FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 256K
    CCMRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 8K
    RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 40K
}

The memory_map so far only specified the CCMRAM and not the RAM. This PR fixes this and also fixes https://github.com/knurling-rs/defmt/issues/713.
Likely a few other chips stm32f3 chips also miss the second ram. If you generally agree with this PR I can also add those.

@noppej That is amazing! It generates the same memory map for the chip I am interested and, therefore also fixes the bug. I will just run target-gen then.


Update the default tag for LUIS Runtime

Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[x] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[x] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[x] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

Automation for azure-sdk-for-ruby

Automation for azure-sdk-for-python

Automation for azure-sdk-for-js

Automation for azure-sdk-for-java

Automation for azure-sdk-for-go

Can one of the admins verify this patch?

Automation for azure-sdk-for-net
A PR has been created for you:
https://github.com/azure/azure-sdk-for-net/pull/5996
.NET SDK Commits:
https://github.com/adxsdknet/azure-sdk-for-net/pull/5996/commits/41a53012f4312b02d97d2e0a7261bcfd1f9a65b2


build: added an option to provide path to the discovery doc

I modified the setup of the lambda by making it possible to pass the path to the discovery document. The path is in the same 1Password secret as OKTA Runbooks app creds (Runbooks Okta Client Secret).

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Remove Grooveshark

Grooveshark was shut down on April 30, 2015
http://grooveshark.com/

Well spotted. Thanks.


Package Rename and Registry

Rename package to something clearer and try to add it to Julia's Registry. Suggestions as comments to be voted.

FacilityLocation.jl

CapacitatedFacilityLocation.jl

CFLP.jl

CapFacilityLocation.jl

FacilityLocationSets.jl


Stream not playing

Hello,
I sent an email about this issue before seeing your request to post issues on your github page. Sorry about that. I am having an issue playing a particular stream. I believe the issue is with the Android playback engine although I am not sure. Other streams play fine.
The stream in question is from moskva.fm:
http://extstreamer.moskva.fm/stream/4015/1419966684
moskva.fm provides a radio time machine for Moscow-based radio stations. The last part of the url<PHONE_NUMBER>) is actually a unix timestamp. On linux I can listen to a near real-time stream using the command:
mplayer http://extstreamer.moskva.fm/stream/4015/$(($(date +%s) + 10680))

One cool way that this could be done on android is through your app and tasker. Unfortunately, I am unable to play even the basic stream above, let alone generate the correct timestamp in tasker and pass the resulting url to Intent Radio. Am I correct that the Android engine is choking on the stream for some reason?
I am able to play it with XiiaLive's android and ffmpeg engines.
(Moto X 2013 Android 4.4.2)
Thank you for your ingenious app. It's a very cool idea and one which I will be using daily.

A more conventional example of android's streaming engine choking on a "normal" aac stream. It buffers forever and then stops.
wget -S http://<IP_ADDRESS>:10050/753aac-fm-ehomsk

--2015-01-01 11:42:10--  http://<IP_ADDRESS>:10050/753aac-fm-ehomsk
Connecting to <IP_ADDRESS>:10050... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 200 OK
  Accept-Ranges: none
  Content-Type: audio/aac
  icy-br:32
  ice-audio-info: channels=2;samplerate=44100;bitrate=32
  icy-description:PCRadio.ru
  icy-genre:ehomsk_fm
  icy-name:ehomsk_fm
  icy-pub:1
  icy-url:pc-radio.ru
  Server: Icecast 2.3.3-kh11
  Cache-Control: no-cache, no-store
  Pragma: no-cache
  Access-Control-Allow-Origin: *
  Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
  Access-Control-Allow-Methods: GET, OPTIONS, HEAD
  Connection: close
  Expires: Mon, 26 Jul 1997 05:00:00 GMT
Length: unspecified [audio/aac]
Saving to: `753aac-fm-ehomsk'

file -bi 753aac-fm-ehomsk
audio/x-hx-aac-adts; charset=binary

I always had problems with aac and XiiaLive's default Android engine too. If I remember correctly, it might be something with android and aac streams from Icecast servers . If memory serves, Shoutcast + aac worked. Thanks again and Happy New Year!

A more conventional example of android's streaming engine choking on a "normal" aac stream. It buffers forever and then stops.
wget -S http://<IP_ADDRESS>:10050/753aac-fm-ehomsk

--2015-01-01 11:42:10--  http://<IP_ADDRESS>:10050/753aac-fm-ehomsk
Connecting to <IP_ADDRESS>:10050... connected.
HTTP request sent, awaiting response...
  HTTP/1.0 200 OK
  Accept-Ranges: none
  Content-Type: audio/aac
  icy-br:32
  ice-audio-info: channels=2;samplerate=44100;bitrate=32
  icy-description:PCRadio.ru
  icy-genre:ehomsk_fm
  icy-name:ehomsk_fm
  icy-pub:1
  icy-url:pc-radio.ru
  Server: Icecast 2.3.3-kh11
  Cache-Control: no-cache, no-store
  Pragma: no-cache
  Access-Control-Allow-Origin: *
  Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
  Access-Control-Allow-Methods: GET, OPTIONS, HEAD
  Connection: close
  Expires: Mon, 26 Jul 1997 05:00:00 GMT
Length: unspecified [audio/aac]
Saving to: `753aac-fm-ehomsk'

file -bi 753aac-fm-ehomsk
audio/x-hx-aac-adts; charset=binary

I always had problems with aac and XiiaLive's default Android engine too. If I remember correctly, it might be something with android and aac streams from Icecast servers . If memory serves, Shoutcast + aac worked. Thanks again and Happy New Year!


add eject_model, get_loaded_models, get_cuda_info, get_cpu_info apis

Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes/features)
[ ] Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
features

What is the current behavior? (You can also link to an open issue here)
no model cache management features

What is the new behavior (if this is a feature change)?
we can now manage the model cache in marqo

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
no

Other information:
this PR is related to a PR in marqo. link

Please add a few simple tests for each endpoint

added

Can you make the unit tests slightly more detailed?
For example, testing for the structure of the response.

we can't verify the correctness of the response. so we just check if the keys are in the responded dictionary here.

the tests are added and passed.

the latest version can pass the test.


Prioritize local version of near-shell

Currently a global installation of near-shell will invoke its relative copy of near-cli:
https://github.com/nearprotocol/near-shell/blob/71489b495443be48005ec8cea5ea72423062fb2d/bin/near#L10
However, it would be better if it first tried to run a local installation.

I mean project level.  This way you ensure it's using the same version the project expects.