Nokogiri LGPL-2.1?

In closing issue #1417, you have added the pkg-config gem which is LGPL-2.1.
Certainly this should be an optional gem for those who cannot have the LGPL license in their projects.

This is something of a big deal for anyone who cares about software licensing.  Which should be everyone.
Anyone on Team Nokogiri care to comment, please?

I just discovered this today and find it problematic as well.

Sorry for not responding more quickly. Apologies for putting people in a position where this is affecting your license constraints.
The unfortunate fact here is that, because pkg-config is used at gem installation time, unless it's declared as a dependency, there's no way to guarantee that it's already been installed. That is, if it's made optional, then it may get installed after Nokogiri, and in that case wouldn't actually be used.
I think the only alternatives are:

remove the gem entirely,
or convince the upstream maintainer to change the license.

Neither is great. I beg a bit more of your time to determine whether we can remove the gem without breaking some platforms' installation.

Could we please have a progress update for this issue, and ideally an ETA?  Version 1.6.7 suffers from CVE-2015-8806, and this version suffers from the LGPL license issue.  Neither Scylla nor Charybdis appeals to any of the stakeholders I've discussed this with.

@flavorjones I opened PR #1498 as a third alternative - what do you think about it?

@flavorjones Would you be able to provide an update on this issue? We're starting a new project where nokogiri would be perfect, except for the restrictive license.

@flavorjones Bump.

@flavorjones Bump.

I need to understand #1498 better. But if that doesn't work, honestly, ripping it out is probably fine, it was only introduced to handle an edge case on freebsd anyway.

@flavorjones How's this coming, Mike?

@flavorjones Any updates, Mike?

We'll make the package optional and cut 1.6.9 soon. Thanks for your patience -- it's hard to find time to work on OSS these days.

Cutting <IP_ADDRESS> now ... (version corrected from above comment)

FYI: There are many people who don't know about LGPL. If Nokogiri uses LGPL software as a library, we doesn't need to change Nokogiri's license. It means that Nokogiri uses MIT license and libraries used by Nokogiri use LGPL are no problem. For example, libxslt can use libgcrypt that uses LGPL but libxslt with libgcrypt can use MIT license not LGPL.
If Nokogiri embeds a LGPL licensed library into Nokogiri itself, Nokogiri must use LGPL, GPL or AGPL. But Nokogiri just uses LGPL licensed software as a library. So there are no problem that Nokogiri uses LGPL licensed software as a library.

@kou this issue is closed, pkg-config is no longer a hard dependency.

This is wrong. It makes users explicitly depend on pkg-config even when the two gems are license compatible. :(

@unleashed It's already been fixed in the most recent version of nokogiri. As noted above. Several times.


Feature request: Offer prebuilt packages

Not anyone has a Rust compiler installed.
Consider offering prebuilt packages for Linux/Windows/MacOS ?

Prebuilt binaries are available here and on the website. In the future I'd also like to create integrate it with package managers for different Linux distros, when I have time.


[AMBARI-24430] Orchestration: Display Names are not being resolved

What changes were proposed in this pull request?
Previous code that changed signatures caused issue with orchestration
How was this patch tested?
Manual testing only.  No broken unit tests.
[ERROR] Tests run: 4911, Failures: 0, Errors: 0, Skipped: 104
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35:08 min
[INFO] Finished at: 2018-08-08T10:35:44-04:00
[INFO] Final Memory: 78M/1952M
[INFO] ------------------------------------------------------------------------

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/3506/
Test FAILed.
Test FAILured.


Robust integration testing

Should probably stop testing with just ls | awk...
Need to write commands that can be run as tests across mac and linux.

doctest has been integrated in the project.


ENH:consolidate shapely.ops.transform (+speedup) with shapely.transform

Closes https://github.com/shapely/shapely/issues/1668

all tests pass both with shapely.ops.transform and shapely.ops.transform2.
I couldn't find a better name for shapely.ops.transform2 (or shapely.transform2_coords`) and I'm sure if there is a point of keeping it anyway, as I think it's only advantage is that is a bit faster on some cases I tested with transformation functions that accepted only scalars (see https://github.com/shapely/shapely/issues/1668)
Maybe keep it so users can try both and find out if there are actually any other advantages to it?
Also - I do think that the situation that shapely.ops.transform == shapely.ops.transform_coords != shapely.transform could be misleading, but otherwise we would break backwards compatibility (maybe rename shapely.transform as this is a new for shapely users? but then it's not new for pygeos users...), not sure what's better here.

hmm.. it seems that Point(0, 1, np.nan) in GEOS main now returns Point(0, 1, nan), and before it returned Point(0, 1).

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

33 of 53 (62.26%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 86.573%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

shapely/coordinates.py
30
50
60.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
2405

Relevant Lines:
2778

💛  - Coveralls

Hi,
This PR ready for review.
I'll squash and cleanup commit history when it's approved.
Thanks!

@jorisvandenbossche Thanks again for your review! I've fixed the issues as per your comments.
Please consider reviewing my solutions for https://github.com/shapely/shapely/issues/1693 and https://github.com/shapely/shapely/issues/1680 before I will split this PR into smaller chunks a you suggested.
Thanks!

Hi @jorisvandenbossche,
I was going to split this commit, but then realized that I would have to rewrite all the tests if I remove the consolidated function.
In the end I ended up with the following:

I reverted the name change of shapely.transform so that would be still be the fastest option for whoever needed this option. so no changes to that function.
I named the consolidated function shapely.transform_extra as it has some extra parameters (but same default values as shapely.transform)
I added some documentation to all the functions, and I am not sure if we rather hide or expose them. I'm included to expose them as they each stand out by themselves, but I won't object to prefix them with _ or removing them from __all__.
I was looking for what would be a name for the the functions that handle interleave=False and I ended up with planar as per https://stackoverflow.com/questions/66596023/name-for-the-opposite-of-interleaved-data-layout but if you have a better name I'll be happy to rename.
no further changes in this squash rebase besides renaming stuff and documentations.

If you still would want me to split this PR then please advise how do you want to test the remaining parts (as I think that the current tests would need to be heavily refactored if we are not going for the consolidated approach.
@brendan-ward I'd be happy for your input as well.

Hi @caspervdw,
Thanks again for looking into this and for your thorough review!
I see your points.
I'm on a long holiday and don't have an access to a dev computer for the following month. I'd be happy to fix these points and continue the conversation when I'm back. 🙏

Hi @caspervdw,
I think I've addressed all the issues, please review.
I've added the _ prefix and hid the auxiliary functions, as the performance difference between direct use of the auxiliary function was negligible.

Is anyone available to review this PR? Thanks!

I do think having a consistent namespace is a good thing; we could just document the difference between the two like so:
def transform(...):
    """...

    For transformations that change the number of coordinates in a geometry,
    use transform_scalar.

def transform_scalar(...):
    """...

    Note: if the transformation accepts numpy arrays and does not change the
    number of coordinates, transform() is the more performant option.

I do think having a consistent namespace is a good thing; we could just document the difference

Ok, I'll rebase and continue when #1849 is merged.

instead implement a user-facing transform_scalar(geometry: Geometry, transformation: Callable, include_z: Optional[bool], interleaved: True)

How would transform_scalar and transform differ when passed a scalar Geometry? If the only difference is that transform_scalar, when passed an array of geometries, calls the transform on each individual geometry, then another option is to document how to do this manually to achieve the same result (either with a list comprehension, or like np.vectorize(shapely.transform)(geometries))

instead implement a user-facing transform_scalar(geometry: Geometry, transformation: Callable, include_z: Optional[bool], interleaved: True)

How would transform_scalar and transform differ when passed a scalar Geometry? If the only difference is that transform_scalar, when passed an array of geometries, calls the transform on each individual geometry, then another option is to document how to do this manually to achieve the same result (either with a list comprehension, or like np.vectorize(shapely.transform)(geometries))

I think that what @caspervdw suggested is to name name the rebuild transform transform_scalar as it only operates on single geometries. That instead of adding another kwarg rebuild that also vectorizes rebuilding a geometry array, as I suggested in this PR.

Ah, yes, I forgot about the rebuild aspect that re-creates the resulting geometry differently, allowing a change in size/dimension. Now, if that's the main difference in behaviour, "transform_scalar" might be not be the most clarifying name?

Work is partially done in #1849 and pending in #1902 . Closing this one to avoid confusion. Thanks @idanmiara for you explorative work on this.


Error: No such image when pulling template from GitHub Package Registry

Hello.
I have created my own devcontainers template repository (https://github.com/brpaz/devcontainer-templates) using the template-starter, but I when I try to use my template as a base image in another project, I got the following error:
[2650 ms] Start: Run: docker pull ghcr.io/brpaz/devcontainer-templates/nix-devenv:latest
latest: Pulling from brpaz/devcontainer-templates/nix-devenv
unsupported media type application/vnd.devcontainers
[3888 ms] []
[3888 ms] Error: No such image: ghcr.io/brpaz/devcontainer-templates/nix-devenv:latest

The image exists in the repository.  Probably something very dumb, but I can´t see what I am missing.
Any help is appreciated.

Hi @brpaz,
I wanted to bring to your attention the following error: Error fetching image details: No manifest found for ghcr.io/brpaz/devcontainer-templates/nix-devenv:latest
It seems that the image hasn't been published correctly. Could you please check this?
I’ll try to look into it if I get some spare time.
Thank you!

@gvatsal60 the image is here: and was created with the devcontainers-cli, following the tempalte-starter repository.
I think I had a typo on repository I was using.
But running  docker pull ghcr.io/brpaz/devcontainers-templates/nix-devenv:latest, I get
unsupported media type application/vnd.devcontainers

It works fine, If I build the image locally.


Use custom setImmediate to avoid conflict with Node.js immediate loop

Co-authored-by: Matteo Collina<EMAIL_ADDRESS>Fixes: https://github.com/addaleax/synchronous-worker/issues/8
Fixes: https://github.com/addaleax/synchronous-worker/pull/9

Wow, I didn't see this!


Newline in patches/LICENSE

ShellCheck tells me to use echo -e or printf.
https://github.com/koalaman/shellcheck/wiki/SC2028
A nitpick really, as I've manually updated the patches/LICENSE file after uploading to fix the newline.
https://github.com/ZOSOpenTools/meta/blob/2af96633af7e034dc5d42a47aebaee45ae134d6a/bin/lib/zopen-generate#L87

@IgorTodorovskiIBM is this fixed with the move to use shellcheck?

It's still here -
https://github.com/ZOSOpenTools/meta/blob/b42f9ce2c8cc13eef4cee75b8547d090e92dc672/bin/zopen-generate#L113

Sorry i was a little 'aggressive'. Did you want to fix it or should we leave it unassigned?

Aggressive? Good thing I didn't notice it :stuck_out_tongue:

From what I've seen, shellcheck is only capable of fixing certain kinds of issues. The rest need to be manually fixed up. It also categorizes issues with varying severities, I think info/warnings still returns 0 but I'd need to double check.
If we include coreutils or bash as a dependency, then we can probably use echo -e, but the /bin/echo -e doesn't process -e so /bin/sh users who prefer /bin/echo would be affected.

I think Printf is generally viewed better than echo because echo has different behaviour across shells


Update policyinsights to 0.4.0 package

Update policyinsights python package to 0.4.0:

Introduces a new "az policy metadata" resource type
Adds a new --resource-discovery-mode parameter to "az policy remediation create"
Increments the api-version used for "az policy event" and "az policy state"
Updated and re-recorded tests

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

[x] I adhere to the Command Guidelines.

@Juliehzl, @zhoxing-ms, please help review it, thanks.


Support checking provider instance health.

Coverage decreased (-0.8%) to 61.248% when pulling 23b6151c8ddc0fa8df46b9d6864faa8ccc4632c1 on little-cui:master into 7271ad0ed26d060f65fddec9d0312ed35eae0064 on ServiceComb:master.


"Loading..." Animation Issue

I've created an animation in PS and am trying to bring it into my project frame-by-frame.  I'm pretty confident I'm doing it right and it's not acting like the code is broken, but when I click on the index.html the page just says "Loading..."
I took this part out of the rest of the code for simplicity's sake, this should definitely be right as far as I can tell.. The idea is that if I direct to the first and last frames it should fill the in-between.  If anyone has any idea why it's just Loading that would be amazing!
var sun;
function preload() {
sun = loadAnimation('Gross_A13_gifanimation0000.jpg, Gross_A13_gifanimation0020.jpg');
}
function setup() {
createCanvas(800, 800);
}
function draw() {
background(255);
animation(sun, 100, 100);
}

This might not be your problem, but I know certain browsers won't load files directly from the desktop. It might work if you open it in another browser or commit it to GitHub. If you open the code in the browser (in Google Chrome you left click and click inspect) and there's this error:
Access to image at 'where ever your image is located' from origin 'null' has been blocked by CORS policy: The response is invalid.
The browser's your problem.


Why do we see a Crossref record XML logged as Sciety Labs decoding failure?

This is how the library generates keys to store cached responses:
https://axios-cache-interceptor.js.org/guide/request-id#custom-generator

This is the defaultKeyGenerator:
https://github.com/arthurfiorette/axios-cache-interceptor/blob/ad69e6d6e491cfa5fe2cb542bc90fd205fc823e3/src/util/key-generator.ts#L48
but it returns an object, not an integer.

The hashing of a request object to an integer seems to happen here:
https://github.com/arthurfiorette/axios-cache-interceptor/blob/ad69e6d6e491cfa5fe2cb542bc90fd205fc823e3/src/util/key-generator.ts#L44

The custom hashing library returns signed integers, which matches our finding of the keys we see in our Redis instance:
https://www.npmjs.com/package/object-code#getting-started

We found where the storage is invoked:
https://github.com/arthurfiorette/axios-cache-interceptor/blob/ad69e6d6e491cfa5fe2cb542bc90fd205fc823e3/src/interceptors/request.ts#L83C29-L83C36
and it uses config.id, which we know comes from the generateKey call which delegates to the hash library.


Feature Suggestion

Add /setblock command that would set certain coordinates to a specific block.

How can that be usefull?

In case of a certain event, for example a builder wants something to change about a build on a certain action, like on use of TapToDo plugin. So then when a player taps the block the /setblock commands will run changing the build, since the builder might not be able to set something like that using code.

//wand and //set can be used instead of this

The following work when the //pos has already been set, and this would be used for an automatic function of changing the block on specified event, aka when the builder isnt online.

I left a review on the pmmp page aswell, but i'd like to suggest it here aswell.
Would it be possible to change //wand to 1 specific item as a wooden axe as it would be time saving and much more efficient.
Very good job so far though, keep it up!

As for rotation i think i'd be better and more efficient aswell if it were like this:
//rotate 90 0 0 to rotate it 90 degrees on Y around the //copy spot
//rotate 0 90  0 to rotate it 90 degrees on x around the //copy spot
//rotate 0 0  90 to rotate it 90 degrees on z around the //copy spot
and for flip i'd suggest it gets mirrored the way you look at. For instance you copy your build than look up it and it will flip upside down. If you'd look right and //flip it would mirror to the right side (including mirroring your current //copy position.
These are recommendations by the build community of McBe as this is what we're used to in java edition.

I left a review on the pmmp page aswell, but i'd like to suggest it here aswell.
Would it be possible to change //wand to 1 specific item as a wooden axe as it would be time saving and much more efficient.
Very good job so far though, keep it up!

branch 1.2.0

I left a review on the pmmp page aswell, but i'd like to suggest it here aswell.
Would it be possible to change //wand to 1 specific item as a wooden axe as it would be time saving and much more efficient.
Very good job so far though, keep it up!

branch 1.2.0

Could this be also possible for commands like //blockinfo?


Normalize unary operator in error message

See included test.
Compiling an expression containing a stray plus symbol used to throw an error message that said "Expected operand after unary operator L+". Calling normalize_op when building this message results in the much friendlier "Expected operand after unary operator +" (without the L).

Oh, I see that I accidentally included these changes in PR #102, which has already been reviewed. So once you merge that, we can just close this one.

Nice, just merged the other one too.


Added Roll the dice app for bounty

Added Role the dice app for bounty . Which is compatible with the XMTP

Congratulations on your PR being merged! This means that you are now eligible for the Bounty. If you did not submit through ETH Global, kindly share your Converse address with us so that we can send you your USDC.
Please note that we are still in the process of finalizing the reviews, so please bear with us. Open Frames was a huge success with over 100 frames integrated, and we wanted to thank you for your valuable contributions.

Ethereum address  : 0x601A3f4cEd83190957Dcd1D068Ba830b0d6277cD
Kindly let me know if somewhere i need to send my address
Kindly note that I have already mailed you the changes you requested
earlier.
with regards
Leo Franklin
On Tue, Mar 26, 2024 at 7:35 PM Fabri @.***> wrote:

Congratulations on your PR being merged! This means that you are now
eligible for the Bounty. If you did not submit through ETH Global, kindly
share your Converse address with us so that we can send you your USDC.
Please note that we are still in the process of finalizing the reviews, so
please bear with us. Open Frames was a huge success with over 100 frames
integrated, and we wanted to thank you for your valuable contributions.
—
Reply to this email directly, view it on GitHub
https://github.com/open-frames/awesome-open-frames/pull/18#issuecomment-2020519760,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AWROE24EU4LLHYTY7TLZA3LY2F6BBAVCNFSM6AAAAABFEYQRX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRQGUYTSNZWGA
.
You are receiving this because you authored the thread.Message ID:
@.***>


Error obtaining render for panel -  500 Internal Server Error

I am constantly facing a problem with rendering the panels. I trigger daily reports using the grafana report, but usually after a week I run into 500 Internal Server Error on all panels. Has anyone been through something similar?

afaik: you cannot use grafana-clock-panel

I do have the Same issue

I do have the Same issue

Thank you @JanKraljic ! is functional! In fact it does not work with elements such as clockwork or others other than the native basics of graphane


[TPCDS][TEST] Add query output schema check for TPCDS 2.7

Why are the changes needed?

Add query output schema check for TPCDS 2.7
How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

Seems we need to make kyuubi-spark-sql-engine test log4j.properties loglevel to INFO.
Current log length is to large.
The job exceeded the maximum log length, and has been terminated.

thanks, have adjusted log level

Now GA is slow, close it temporarily.

we can tag this test and test it in a separate GA job or even workflow

yes, I also considered using g a tag to include tpcds tests only. will add tpcds2.7 test after it is ready.


Added missing custom attributes in Validation php

Edited the validation file to add custom attributes for the Greek-language and moved the validation to the correct folder, as I had previously left it in the root.

Thank you


Create event specific HookRecord types

Originated from: #3130
As a result of #3130 we have quite a few event types each with their own event field, all contained under a single struct (HookRecord).
We want to examine the possibility to created event specific hook records to increase readability and improve code organization.

Duplicate


Fix image path and typo

Proposed change

Fix image path for overlays
Fix typo in Amazon sensor

Type of change

[ ] Dependency upgrade
[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (which adds functionality)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests

Additional information

This PR is related to issue: n/a

Codecov Report

Merging #287 (34c6ff4) into 0.3.0 (0b50236) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            0.3.0     #287      +/-   ##
==========================================
- Coverage   96.11%   96.07%   -0.04%
==========================================
  Files           3        3
  Lines         926      917       -9
==========================================
- Hits          890      881       -9
  Misses         36       36

Impacted Files
Coverage Δ

custom_components/mail_and_packages/helpers.py
94.49% <100.00%> (ø)

custom_components/mail_and_packages/sensor.py
96.82% <0.00%> (-0.36%)
:arrow_down:

custom_components/mail_and_packages/config_flow.py
100.00% <0.00%> (ø)


Update DQM definition

Closes https://github.com/dwavesystems/dwave-ocean-sdk/issues/114

On balance I think it would be better to gradually move to a simpler definition; although I appreciate inertia may be a sufficient argument against. My thinking is here:
https://confluence.dwavesys.com/pages/viewpage.action?pageId=89505592

On balance I think it would be better to gradually move to a simpler definition; although I appreciate inertia may be a sufficient argument against. My thinking is here:
https://confluence.dwavesys.com/pages/viewpage.action?pageId=89505592

With indexing corrections committed, I gather, @jackraymond, you're fine with merging this?
@hsadeghidw, where do you stand on this? Not sure how to read your comments above.


Add config for SQL capture.

Users should be able to control wether collect SQL data through agents, additionally we could define here what kind of information should be able to toggle on/off.

Shall we make it more generic and have a config per database? E.g. I want to disable only mongodb and still receive redis or SQL.


Properly paginate runner lists call.

Use the octokit paginate to properly paginate the list call. This fixes #46.

@machulav I don't see any tests here. Let me know what kind of tests I should figure out as part of this PR.

@jaredmdobson any idea what it would take to merge this in? I'm very eager to use this in our builds!

@davinchia, many thanks for your contribution and sorry for the late reply. I've merged your PR to master so that you can use it from the master branch for now. A bit later, I will make a new version with this fix.

Thanks @machulav ! What action version do I specify to use the version at master?

@davinchia For now, you can use machulav/ec2-github-runner@master as a value of uses. It will take the sources from the master branch.

thank you @machulav  - please let me know when you do a new release!

@davinchia I've added a new version v2.2.1 that contains your fix. In addition, I've added a version v2 which tracks the latest v2.x.x release. So you can use now machulav/ec2-github-runner@v2 and you will receive all the latest backward-compatible updates.
Than you again for the contribution! 🙏


compose : Fixed empty space below compose box on expanding it

Task one of   https://github.com/zulip/zulip/issues/19353

The empty space below the compose box used to reduce on expanding it , due to the increased size of the compose box the contents and spaces allotted around them were altered , the height of compose box on expand was set to 100% and i have set it to 97.8% where it works perfect and space around or below is unaffected after the changes.
Tested on my Ubuntu development environment, by expanding the compose box on all streams,
the space below the compose box remained unaffected.

Screenshot
unexpanded :

on expanding

I think instead of reducing the size of #compose-container by a few %, the correct solution here is to add the CSS property box-sizing: border-box to #compose-content, because the actual problem here is that when we set the #compose-content as 100%, due to the lack of box-sizing property in #compose-content, the padding below it is not considered in 100% and hence it flows out of the parent container.
Plus, hard-coding CSS properties to random non-standard values is never a good idea.
Also, please make sure that your commit messages follow these guidelines: https://zulip.readthedocs.io/en/latest/contributing/version-control.html#commit-messages
Basically, what you've put in the PR description should also be present in the commit message. Just the PR title needs to be changed while being used as the commit's first line - you should mention what the commit is doing in brief in the first line and not what the problem was.

@garg3133

As you suggested hard coded css should not have been used i have made the box-sizing of the #compose-component  to border-box so that margin and padding do not flow out of the parent container.
Tested on my Ubuntu development environment, by expanding the compose box on all streams,
the space below the compose box remained unaffected.

Thank you for the review , please check now and notify me if any other changes are required

Also, it seems like you missed the commit guidelines I put a link of above.
A better commit message might be: compose: Fix reduced space below compose-box after expanding it..

This is great, thanks @optimm and @garg3133!
I fixed the linter error and merged this after adding a bit more of a commit message with the explanations from the discussion above.

This was merged as d7ee69373c25cade5cb0f9f6bd6b63856ad3212e; due to a Git error it didn't get marked properly.


zero-length delimited identifier at or near """"

Hi! Just wanted to try switching from my redis setup to this (neat!), but getting this when I try broadcasting on a page:
09:46:07 web.1  | Started GET "/cable" [WebSocket] for ::1 at 2024-08-04 09:46:07 -0700
09:46:07 web.1  | Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
09:46:07 web.1  | Turbo::StreamsChannel is transmitting the subscription confirmation
09:46:07 web.1  | Turbo::StreamsChannel is streaming from hotwire-livereload
09:46:07 web.1  | #<Thread:0x000000012d31fe38 /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:83 run> terminated with exception (report_on_exception is true):
09:46:07 web.1  | /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:98:in `exec': ERROR:  zero-length delimited identifier at or near """" (PG::SyntaxError)
09:46:07 web.1  | LINE 1: LISTEN ""
09:46:07 web.1  |                ^
09:46:07 web.1  |
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:98:in `block (3 levels) in listen'
09:46:07 web.1  | 	from <internal:kernel>:187:in `loop'
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:92:in `block (2 levels) in listen'
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:91:in `catch'
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:91:in `block in listen'
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:47:in `with_subscriptions_connection'
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/gems/actioncable-enhanced-postgresql-adapter-1.0.1/lib/action_cable/subscription_adapter/enhanced_postgresql.rb:83:in `with_subscriptions_connection'
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:90:in `listen'
09:46:07 web.1  | 	from /Users/holman/.rbenv/versions/3.3.2/lib/ruby/gems/3.3.0/bundler/gems/rails-59064f88d8ab/actioncable/lib/action_cable/subscription_adapter/postgresql.rb:85:in `block in initialize'

Any thoughts?

@holman this is likely not caused by this adapter specifically and will blow up for the vanilla postgresql actioncable adapter too.
If the name identifying a subscription evaluates to an empty string, it'll be passed through to postgresql's LISTEN and throw the above.
You can reproduce this with turbo streams by throwing a <%= turbo_stream_from "" %> into a view somewhere.
Best to checkout if any of your turbo_stream_from calls eval to an empty string.

Oh, duh, yeah that makes total sense. (Think I was just thrown for a loop to see a process termination instead of just a thrown exception!) Thanks for the sanity check- all is good now. :metal:


Update the Address Book

I updated the address book to keep it up to date with Bitcoin. Everything should remain the same.

Shit. I didn't mean to pull it to the master. I meant for the dev. ugh

Ignore this please. I will re-pull to the correct branch.
I'm sorry.


[ REQUEST FOR FEATURE ] Add Support for restart on web

It would be very useful if this feature is available for flutter web

Version 1.1.0 was just released with web support.


[WFSSL-31] Add the ability to make use of the 'jboss.modules.os-name' property when building on RHEL platforms

This PR adds two new custom profiles for Linux x86_64 and i386 architectures that build the ${jboss.modules.os-name}-{x86_64|i386} module. When building on different RHEL platforms, the following commands can now be used:

RHEL 6: mvn clean install -Djboss.modules.os-name=el6
RHEL 7: mvn clean install -Djboss.modules.os-name=el7
RHEL 8: mvn clean install -Djboss.modules.os-name=el8

As an example, for the x86_64 architecture, running mvn clean install -Djboss.modules.os-name=el7 will result in a wildfly-openssl-el7-x86_64 artifact in the el7-x86_64 directory.
The same jboss.modules.os-name property would also need to be specified at runtime on RHEL platforms to make sure the right natives get loaded.
For the rest of the platforms, the build process is unchanged.
For more details on this PR, see the description in WFSSL-31.

@darranl Whenever you get a chance, this could use a review and merge. The productization team has confirmed that they are ok with this change.


README recommends unoptimized build

Currently, the instructions in README recommend cargo run, which will build and run an unoptimized build (including unoptimized dependencies).
You may want to either recommend cargo run -r for an optimized release build, or modify Cargo.toml such that the default profile (used for cargo run) builds the crate and its dependencies with optimizations.
To do the latter, you could add the following to Cargo.toml:
[profile.dev]
opt-level = 3
debug = "line-tables-only"
debug-assertions = false
overflow-checks = false

See https://doc.rust-lang.org/cargo/reference/profiles.html for more information and other flags you may wish to change (for either dev or release profiles).

Thanks for the suggestion! I chose the debug build because building the whole application will already take a while.
We build release profiles for nightly releases. I guess we can add more configurations for Cargo.toml in the future.


Add width property

react truncate has a new property width, patch to allow props to pass through to react-truncate, also updated react-truncate

also in response to issue #21


[WIP]: Add support for Codecov in Travis

Current coverage is 76.44% (diff: 100%)

No coverage report found for master at b2d1106.

Powered by Codecov. Last update b2d1106...5f643bd


Device Not Compatible

Android 14 BETA QPR 1.
Upon installing, I am told that the app is not compatible with my version of Android.

+1 for the issue

+1 as well

+1 Seeing this as well.
Is there a newer version?

This is worked around in version 1.2. Unfortunately, it means you need to use a special process to install, which is outlined in the new README.

This is worked around in version 1.2. Unfortunately, it means you need to use a special process to install, which is outlined in the new README.

Thank you @zacharee!


Added Sieve of Eratosthenes

Add the problem statement at the top of the program using comment.

Okay.

@sr6033 I added the problem statement.


ModuleNotFoundError: No module named 'triton.ops.matmul_perf_model'

Hi , is there a resolution on this?

The problelm is caused by the low-version triton. triton.ops.matmul_perf_model only support the trition>=v1.1.1.
Upgrading it by pip install -U triton could fix it.


Cannot load such file (Load Error)

Hello i tried to use the CLI but i have got Cannot load such file error
i'm working on it

can you put the logs of the error here with the system specifications ? (like ruby version, how you installed it) ?

here u are
$ uname -a
Linux muhammednagy 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
i am using rvm
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
i installed it using terminal
gem install EGP_Rates_CLI
trying egp :
$ egp
/usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- egp_rates_cli (LoadError) 	from /usr/local/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/local/lib/ruby/gems/2.3.0/gems/EGP_Rates_CLI-1.0.0/bin/egp:4:in <top (required)>' 	from /usr/local/bin/egp:23:in load'
from /usr/local/bin/egp:23:in `'
i tried my edits on 2 different machines and it worked !!

try gem uninstall EGP_Rates_CLI and then install again and see if it works?
I really don't know why it failed because I'm using it and I know some people are using it (and they didn't have this problem)

I merged the changes and updated the gem... just use gem update EGP_Rates_CLI and it should update to the latest version (1.0.1)

thanks
o tried to uninstall it and reinstall it multiple times before you merged my pull request and it didn't work


Add parameter to constrain view to safe area bottom

@MarioIannotta - this PR allows the view to extend all the way to the bottom of the screen.

While I understand the purpose of the PR I can't imagine the real use case.
For example in the Apple Maps, the panel is extended until the bottom of the screen.
I have no problem merging the PR if there's a real use case but otherwise I would like to keep the APIs as simple as possible.

For iPhone X on it is necessary

@andrebng If you look into the Maps app on iPhone X, the sliding view's bottom is attached to the parent superview's bottom whilst the content view's bottom is attached to the parent safe area bottom. Therefore I would like to keep the experience as similar as possible to the "native" solution with clean APIs.


thread factory of version2 not works as expected

hi, I'm reading your book about the "muduo". And seems found some issue,the version 2 of the thread factory haven't put the newly created stock into the map,the reason is that the pStock will be deconstructed when it leaves "get" function.Here is your code:
I wrote a test and this test will output twice "hello NOT EXIST"
#include <string>
#include <memory>
#include <iostream>

class Stock {
public:
    Stock(const std::string &) {}
};

//if pStock defined as a global variable,it will be ok.
class StockFactory// : std::noncopyable
{
public:
    std::shared_ptr<Stock> get(const std::string& key)
    {
        std::shared_ptr<Stock> pStock;
        std::weak_ptr<Stock>& wkStock = stocks_[key];
        pStock = wkStock.lock();
        if (!pStock)
        {
            std::cout << key << " NOT EXIST" << std::endl;
            pStock.reset(new Stock(key));
            wkStock = pStock;
        } else {
            std::cout << key << " EXIST" << std::endl;
        }
        return pStock;
    }

private:
    std::map<std::string, std::weak_ptr<Stock> > stocks_;
};

int main() {

    StockFactory f;
    f.get("hello");
    f.get("hello");
}

Because you didn't save the return value of get() to a shared_ptr.
This is the exact purpose of version 2: if no one use the value, the factory won't keep it.


Add count to spacelift_policy.trigger_administrative

what

Add count to spacelift_policy.trigger_administrative

why

If we disable administrative_trigger_policy_enabled, it will still create the spacelift_policy but won't attach it. This change will make sure it won't create the policy either.

references
N/A

/test all


Dynamically register ops to Tensor

This saves lines. And reduces redundant repetition.

Tests fail because of missing master!

+20 lines ! :D

Finally, a refactor of this I can merge! I'd consider moving the sys inspect stuff out to tensor.py, that way you only need it once.

@geohot say nno more checkout #233


Exit routes

Compare page.exit

This is important for unsubscribe events.

Sounds awesome!

I lightly suggest doing await exit()
async (ctx, next, exit) => {
  const unsubscribe = subscribe(render(mountNode)) // redux
  doAction()
  await next()
  doAnotherAction()
  await exit()
  unsubscribe()
}

implemented in 0.2.0


Merge node-module (node-cmake + standalone support)

Changes Unknown when pulling 5f0ba25168cb30baa07aa25e1c390eddb979a1cf on node-module into ** on development**.

Changes Unknown when pulling c18fe99e0bd8dd47cba41e326a42c9c92288d1ae on node-module into ** on development**.


savePaymentMethod on non-buckaroo payment methods.

Hi,
When combining Buckaroo with another payment provider, Buckaroo calls an ajax request on the non-Buckaroo payment provider. This unwanted call provides additional traffic and may have unwanted side effects, depending on the order of methods called.
The init function attaches a click handler for non-buckaroo payment methods.
https://github.com/buckaroo-it/Magento2/blob/master/view/frontend/web/js/view/payment/save-payment.js#L29
You should only apply the event for 'Buckaroo' payment methods, since all Buckaroo payment options have an id attribute or value starting with 'buckaroo_' that might be sufficient enough to filter out your own methods.
Cheers, Eric

Hi @ericclaeren , Good input, we'll add this to the backlog and notify when we'll release the updated version.

Good morning @ericclaeren !
Thanks a lot for your request !
We've made a fix to prevent click handler firing on methods other than Buckaroo's ones.
And it will go to upcoming public release soon.

Thank you @vladislav-padalka-hys
I have patched our module and can confirm this issue is no longer present.

Great @ericclaeren !
Thanks again for your help!

Released in 1.37


[WIP] Persist temporary identity cert

Issue: #257

[ ] Tick here to confirm that you have run RunCodeFormatter.ps1

Description:
Persist the generated temporary identity certificate to disk and re-use it if it exists on startup.
Whilst this doesn't enable specifying custom certificates for production, this change should make identity a little more stable as the same certificate will be used across instances of Nether.Web
Test:
1.Start Nether.Web
2. Load SwaggerUI and authorise
3. Make a call via SwaggerUI and keep the browser tab open
4. Restart Nether.Web
5. Make another call in the same SwaggerUI tab and verify that it succeeds (without requiring re-authorisation)

@stuartleeks,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@stuartleeks I'm doing clean up of PRs to better handle new incoming PRs. Is this PR still WiP? Should it be closed or merged eventually?


Use docs.sensu.io subdomain

The new Sensu documentation site will use docs.sensu.io.
We intend to keep the doc site on Heroku. Create the DNS record with the DNSimple account.

I've set up docs-preview.sensuapp.com and docs-preview.sensuapp.org, but the latter can't be added to the heroku configuration:
$ heroku domains:add -a sensu-docs-site docs-preview.sensuapp.org
Adding docs-preview.sensuapp.org to ⬢ sensu-docs-site... !
 ▸    docs-preview.sensuapp.org conflicts with a wildcard cert on app sensuapp, owned by<EMAIL_ADDRESS>Please ask the owner to add this domain.

Trying to make some sense of this. Heroku docs indicate that we might be having trouble here because sensu-docs-site and sensuapp apps are not owned by the same account.
Currently:

sensu-docs-site is owned by<EMAIL_ADDRESS>sensuapp is owned by<EMAIL_ADDRESS>

@portertech will you please log in to herokuapp.com and do the following?

Add<EMAIL_ADDRESS>as a collaborator on the sensu-docs-site app
Transfer ownership of sensu-docs-site app to<EMAIL_ADDRESS>
There's probably a step in between these two where I will need to accept the collaboration invitation, which email I will keep an eye out for.

@cwjohnston done!

This is done! https://docs-preview.sensuapp.com and https://docs-preview.sensuapp.org now point to the heroku app.


etcd-runner: move string generation to pkg/stringutil

/cc @heyitsanthony @sinsharat

not really convinced this needs to be a full fledged pkg but lgtm

@heyitsanthony

not really convinced this needs to

There are other key generation funcs in other pkgs. for example:
https://github.com/coreos/etcd/blob/master/tools/benchmark/cmd/util.go#L78
i want to move them to a one pkg. this is the first step.

LGTM.


How should I use the merge-stream if the second stream has a dependence with the first one?

My requirement is that I want to replace some strings with texts which I will read them from some files, but before doing this, I need to do some changes to the files which will be read and inject into other files. So I want to merge the two streams together and the second one has to wait for the finish of the first one.
What shall I do?

Same as https://github.com/grncdr/merge-stream/issues/28?

I've tried to use several packages for ordering streams, but none worked for me. I've tried to modify merge-stream but failed. The problem is that some streams participate in multiple merged streams (e.g. the same stream is used for creating a file and passing that file into concatenation stream).
const PassThrough = require('readable-stream/passthrough');
const merge = function (/*streams...*/) {
  var sources = []
  var output  = new PassThrough({objectMode: true})

  output.setMaxListeners(0)

  output.add = add
  output.isEmpty = isEmpty

  output.on('unpipe', end)

  Array.prototype.slice.call(arguments).forEach(add)

  output.pause()
  next()

  return output

  function next () {
    if (isEmpty()) {
      end()
      return
    }

    var source = sources.shift()
    source.once('end', next.bind(null))
    source.once('error', output.emit.bind(output, 'error'))
    source.pipe(output, {end: false})
    source.resume()
  }

  function add (source) {
    if (Array.isArray(source)) {
      source.forEach(add)
      return this
    }

    source.pause()
    sources.push(source)
    return this
  }

  function isEmpty () {
    return sources.length == 0;
  }

  function end (source) {
    sources.splice(0)
    if (output.readable) { output.end() }
  }
}

@NextSeason This may work in your case. If nobody see an error in my code, I will have to follow the Grunt way, create files with one task and after that concatenate them with another task.

Still waiting for @NextSeason to respond. Comment and we can reopen this.


Issue 182: Prevent nil accumulator results from propagating and avoid…

… propagation from accumulators when the Rete operation does not change the final result
Some notes here:

If the retracted or reduced value from an accumulator is nil, this assumes that the converted return
value is also nil.  Currently, because a nil initial value does not propagate and we don't propagate nils that come from retractions (as opposed to propagation) an accumulator that has a nil initial value and takes on a non-nil value for any actual data can have a convert-return-fn that is not nil safe.  Making such a non-passive change to support a pattern that is probably not that common anyway (taking a nil value and converting it to something truthy) didn't seem worth the complication/risk.  Furthermore, such convert-return functions would be unsafe anyway now since any retraction, even one that didn't change the final value, would cause retraction of the relevant tokens. [1, 2] This could be revisited in [3, 4, 5].  Does this approach seem correct to you?
Since a nil value will be ineligible for propagation, I don't think we need to special-case ::no-accum-result in do-accumulate anymore. [6] We can just return nil there and the output will be suppressed.
I don't think [7] or [8] needs

{result-binding initial-value}

since the result-binding will be added (and overridden) anyway by [9].  Furthermore, this binding is invalid because it is the initial-value, not the initial value after application of the convert-return-fn.  I removed this bindings map and replaced it with an empty map.
Let me know if you can think of additional test cases that you'd like to have and I'd be happy to add them.  The various pieces of accumulator logic can interact in a lot of different ways, which makes figuring out which sorts of test cases will provide the best benefit versus cost a difficult calculation.  This is particularly true for tests that are targeted at a particular implementation detail, even if they don't depend on that implementation detail to pass (they might just lose value if that implementation detail changed).  Overall, I think generative tests for accumulators, even if the generated part was just data and/or insert/retract patterns, rather than the actual rules or accumulators themselves, are a idea worth exploring to help cope with the large set of possible interactions.  However, that also seems out of scope here, and such tests would probably fail right now anyway due to [4, 5].
@mrrodriguez will probably want to take a look at this as well before merging.  I think there is enough complication and edge cases here to merit more than one pair of eyes over it.

https://github.com/rbrush/clara-rules/blob/0.11.1/src/main/clojure/clara/rules/engine.cljc#L821
https://github.com/rbrush/clara-rules/blob/0.11.1/src/main/clojure/clara/rules/engine.cljc#L1004
https://github.com/rbrush/clara-rules/issues/190
https://github.com/rbrush/clara-rules/issues/189
https://github.com/rbrush/clara-rules/issues/188
https://github.com/rbrush/clara-rules/blob/0.11.1/src/main/clojure/clara/rules/engine.cljc#L837
https://github.com/rbrush/clara-rules/blob/0.11.1/src/main/clojure/clara/rules/engine.cljc#L772
https://github.com/rbrush/clara-rules/blob/0.11.1/src/main/clojure/clara/rules/engine.cljc#L946
https://github.com/rbrush/clara-rules/blob/0.11.1/src/main/clojure/clara/rules/engine.cljc#L659

I've finished looking through this. +1 from my perspective. It looks good to me.

Other than the comment on the nil vs. falsey accumulator checks, I'm +1 on this as well.

I tried to update this, but GitHub automatically closed the PR on me when I deleted the branch and pushed a replacement.  I have a new PR at https://github.com/rbrush/clara-rules/pull/193 with the changes to propagate boolean false.


Gem install error with importmap

Describe the bug
When running install generator of the gem on the newest rails with importmap I've got an exception
After debugging I found that importmap calling api.jspm.io/generate and the site returns Error: No provider named "jspm" has been defined.
I don't know much about js generation, is it temporary error or we need to fix something?
Reproduction steps
create new app rails new example-app
add gem rails_admin and run bundle install
run bin/rails g rails_admin:install
Expected behavior
should install without errors
Additional context

rails version: <IP_ADDRESS>
rails_admin version: 3.1.1
rails_admin npm package version: 3.1.1
full stack trace (if there's an exception)

/usr/local/bundle/gems/rails_admin-3.1.1/lib/generators/rails_admin/importmap_formatter.rb:17:in `format': undefined method `[]' for nil:NilClass (NoMethodError)

      imports['@popperjs/core'].gsub!('lib/index.js', 'dist/esm/popper.js')
             ^^^^^^^^^^^^^^^^^^
	from /usr/local/bundle/gems/rails_admin-3.1.1/lib/generators/rails_admin/install_generator.rb:88:in `configure_for_importmap'
	from /usr/local/bundle/gems/rails_admin-3.1.1/lib/generators/rails_admin/install_generator.rb:33:in `install'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `block in invoke_all'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `each'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `map'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in `invoke_all'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/group.rb:232:in `dispatch'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
	from /usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/generators.rb:263:in `invoke'
	from /usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/commands/generate/generate_command.rb:26:in `perform'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
	from /usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/command/base.rb:87:in `perform'
	from /usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/command.rb:48:in `invoke'
	from /usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/commands.rb:18:in `<main>'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
	from bin/rails:6:in `<main>'

The cause was a change on the jspm side.
https://github.com/jspm/generator/pull/235
Though the fix is being in place on their side, I thought it's good to place a workaround on our side since it's a tiny change. Now fixed in the master.
Thank you for reporting! 👍


Update create_mind to Use New DataSourceConfig

This PR adds a more flexible approach to connecting data sources to a mind.
Minds will be able to access files (local, Cloud, URL), databases, and webpages, so they should be configured as such.
Related to ML-95

Daniel Usvyat
MindsDB
@.***  | www.mindsdb.com
[image: facebook] https://www.facebook.com/MindsDB/
[image: linkedin] https://www.linkedin.com›company›mindsdb
[image: twitter] https://twitter.com/MindsDB
[image: github] https://github.com/mindsdb/mindsdb
[image: youtube] https://www.youtube.com/mindsdb
[image: tpx]
On Mon, 22 Jul 2024 at 19:28, Ty @.***> wrote:

Merged #132 https://github.com/mindsdb/mindsdb_python_sdk/pull/132 into
staging.
—
Reply to this email directly, view it on GitHub
https://github.com/mindsdb/mindsdb_python_sdk/pull/132#event-13603915274,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADIHHQ44JVRKYKR3AFMC5XDZNUXMNAVCNFSM6AAAAABLBBES36VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGYYDGOJRGUZDONA
.
You are receiving this because your review was requested.Message ID:
@.***>


Allow set of prometheus collector addr as env var

Looking to allow setting of the prometheus collector address string as an environment variable. This is useful in certain contexts where configuration is more environment variable driven than command and argument driven.

@agershman
I've release 1.1.0 of celery-prometheus at the moment.
I've added a commit to get it working with celery 5. https://github.com/Gandi/celery-prometheus/commit/5f7f2336282ca0d4dec658176f62a78ac9d801ed
I guess click already handle env vars for that but I've never use click elsewhere and did not read its docs.


[5.3][CodeCompletion] Suggest 'Self' inside struct, enum and classe

Cherry-pick of #32053 into release/5.3
rdar://problem/61307680

@swift-ci Please test

@swift-ci Please nominate


Updates for Kotlin 1.9.10 and Java 17, newer gradle and lint warnings

A few updates that I made (locally) for my own use that I thought you might find useful -

Kotlin 1.9.10

meant adding @OptIn(ExperimentalForeignApi::class) to a few places

Java 17
Gradle 8.3
Cleaned up a few lint warnings for unused imports and the like

Note: the root project name change fixes an error importing "java.lang.IllegalStateException: Module entity with name: Kotlin-Multiplatform-AppDirs.mingwX64Main should be available" - case seems to be important!

Thanks! I am thinking of keeping it Java 8 for now since its a library, the other other changes look good so I can merge once it's switched back.


Sharing to snapchat on iOS through CreativeKit

Overview

Well, sharing to Snapchat was a key necessity for my app, so I decided I'd try my luck. Sadly, we have to depend on SnapSDK's CreativeKit. This also requires that production apps need to be reviewed.
I realised my iOS development skills were a bit rusty, and that Snap's documentation is not ideal during the process. Nonetheless, I got this hacky version working for sharing videos, images, stickers and text content to Snapchat from iOS. The code is not very clean yet, and we could definitely improve it. Especially the "sleep" could use improvement, but I couldn't find a clean way of preventing the _scSdkSnapApi to be released before the share was complete during my late night struggle. All suggestions/edits are very welcome.
Test Plan

Create a developer account for Snapchat here https://kit.snapchat.com/portal/, and create a new app there.
Select Creative kit as a kit you will use in your app
Add (or modify) the following keys to your project's Info.plist SCSDKClientId (I put in the value for my app's "CLIENT ID FOR NON-CONFIDENTIAL OAUTH2 FLOW"), LSApplicationQueriesSchemes where you add 'snapchat' in the array just like with whatsapp or facebook. Optional: SCSDKRedirectUrl, some redirect URL, like: my-app://. If you add this, CFBundleURLSchemes must also contain your redirect URL’s scheme. More info here: https://docs.snapchat.com/docs/creative-kit
add pod 'SnapSDK', :subspecs => ['SCSDKCreativeKit'] to your project's PodFile. @ maintainers, could this be optionally included inside the react-native-share project?

Example code:

I'm using the "title" options property as the Snap's text component
I'm using the "attachmentUrl" for attaching a url to the snap.

import Share, {ShareSheet}  from 'react-native-share';
import RNFetchBlob from 'rn-fetch-blob'

shareToSnapchat = async (
    mediaUrl = "https://sample-videos.com/video123/mp4/480/big_buck_bunny_480p_1mb.mp4",
  ) => {
    try {
      RNFetchBlob.config({
        fileCache : true,
        appendExt : 'mp4'
      }).fetch('GET', mediaUrl, {})
      .then((res) => {
        let shareOptions = {
          title: "SNAP TEXT CONTENT",
          url: 'file://' + res.path(),
          type: 'video/mp4', // change type here accordingly
          attachmentUrl: 'https://snapchat.com',
          social: "snapchat",
        }
        Share.shareSingle(shareOptions)
          .then((res) => {
            // undefined for now.
            console.log('res:', res)
          })
          .catch((err) => console.log('err', err))
        });
    } catch(e) {
      console.warn(e)
    }
  };

Demo Video of the code above:

Some potential improvements (that are not necessary per se):

[ ] I Did not test base64
[ ] SnapSDK dependency
[ ] Stickers on Image and Video content, and Standalone
[ ] Cleaner Objective-C code
[ ] Clever way of releasing / initialising SnapSDK

Hey @jgcmarins! I was under the impression that snapchat sharing was already functional on Android no? I haven't got a chance to see for myself. Otherwise, how would you recommend I'd get started? All android packages seem to be non-native.

We're good to go with Android existing implementation.
Can we add more info to README about iOS?
And also add an example for both Android and iOS?

I'll try to push the example tomorrow and include a section in the readme for iOS. Do you know of any way how we might make this an optional thing instead of a mandatory dependency?

I'll try to push the example tomorrow and include a section in the readme for iOS.

Nice!

Do you know of any way how we might make this an optional thing instead of a mandatory dependency?

Didn't figure out. Maybe we gonna have to release a major bump.

After building an app with this branch - I got an error
dyld: Library not loaded: @rpath/PINCache.framework/PINCache   Referenced from: /Users/andrew.mikhatskiy/Library/Developer/CoreSimulator/Devices/A67AEA68-7434-4B77-B259-CEF24F8D2F04/data/Containers/Bundle/Application/B09D6537-A239-4252-8EEE-05B8949C4FC0/WeAreFriends.app/Frameworks/SCSDKBitmojiKit.framework/SCSDKBitmojiKit   Reason: image not found
Do you know the reason why this happends?

@Andrfas thanks!
So it's ok on iOS?

@VincentRoest you can update your branch with the last changes on master?

For a personal project I've also added IG stories, but these can be removed if we want to move with merging this pull request!

Hi, I have a problem in creating a new app for snapchat.
I do not know what is the Redirect URLs. It seems useless but i can not skip it.

@VincentRoest Did anything ever come of this? Like did you consider making a library for this bc I am trying to do something like YOLO in react native and would love some pointers

@bingchao-mai the url is just a bundle url, see this link for a bit more clarity: https://github.com/Snap-Kit/bitmoji-sample/issues/3
@thehappydinoa I haven’t really pursued this further as this was sufficient for my use case. What specific questions do you have? Maybe I can help you out?

@VincentRoest I was hoping to set up some type of react-native library to integrate Login Kit and Creative Kit from Snapchat, I have been looking all over and have found some old ones, but I really like what you did here

@VincentRoest I was hoping to set up some type of react-native library to integrate Login Kit and Creative Kit from Snapchat, I have been looking all over and have found some old ones, but I really like what you did here

We can follow with that, we just need to ensure that this is currently working fine with our latest changes. I would be glad to help releasing this. :)

Looks like RNFetchBlob is having a problem that I didn't really fancy fixing (https://github.com/joltup/rn-fetch-blob/issues/183) so I used a local file in the ios Bundle for testing (needs to be less than 10 secs), but it still works! Don't forget to add the SCSDKClientId to test.
Covering the LoginKit and CreativeKit should be fairly similar!

Great work man, does this support transparent images for overlay?

According to the Snap Kit docs they support any image as sticker (SCSDKSnapSticker at https://docs.snapchat.com/docs/api/ios/), so yeah. I haven’t made the sticker option available but could be done with a simple “if sticker” statement!

@VincentRoest can we merge this?

can we merge this?

Unfortunately, this still broken on Android at the CI. @VincentRoest do you still interest in that?

@VincentRoest - It looks like you accidentally added a reference to your personal fork of react-native-share in example/package.json (using ssh protocol). Can you please undo this (including the 15,000 changed lines in yarn.lock). Thanks!

@MateusAndrade I think you should not have asked @VincentRoest to add the example of this change before merging the change as the example is unlikely to work without the change.


Bump version to 1.21.0-pre1

Bump version to 1.21.0-pre1

Version bump only.
Known issues :
MacOS failures : #18968
Android : Infrastructure failure
ASAN/TSAN C++ failure : #18511
Interop Tests : Failed to build build_docker_nodepurejs, build_docker_javaokhttp


Grid Connected sensor not available for 3-Phase-Inverter

Inverter
SunSynk 3 Phase Hybrid Inverter
Modell: SUNSYNK-8K-SG04LP3
Firmware: COMM: 1001-EO37 MCU: 1140-2005-1807
Issue
The grid_connected sensor is not available even though it is specified here: https://github.com/kellerza/sunsynk/blob/main/src/sunsynk/definitions3ph.py#L159
Config
Some values are replaced with stars
DRIVER: pymodbus
INVERTERS:
  - SERIAL_NR: "***"
    HA_PREFIX: SS
    MODBUS_ID: 1
    DONGLE_SERIAL_NUMBER: "0"
    PORT: ***
SENSOR_DEFINITIONS: three-phase
SENSORS:
  - energy_management
  - power_flow_card
  - pv2_power
  - pv2_current
  - pv2_voltage
  - inverter_voltage
  - inverter_frequency
  - load_power
SENSORS_FIRST_INVERTER:
  - settings
MANUFACTURER: Sunsynk
READ_ALLOW_GAP: 2
READ_SENSORS_BATCH_SIZE: 20
SCHEDULES:
  - KEY: W
    READ_EVERY: 5
    REPORT_EVERY: 60
    CHANGE_ANY: false
    CHANGE_BY: 80
    CHANGE_PERCENT: 0
NUMBER_ENTITY_MODE: auto
MQTT_HOST: core-mosquitto
MQTT_PORT: 1883
MQTT_USERNAME: ***
MQTT_PASSWORD: ***
DEBUG: 0
DEBUG_DEVICE: ***

Logs
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun sunsynk (no readiness notification)
s6-rc: info: service legacy-services successfully started
20:35:00 INFO    Loading configuration: /data/options.json
20:35:00 INFO    sunsynk library version: 0.6.4
20:35:00 INFO    Schedules:
+-----------+-----+------+--------+-----------+----------+------------+
|    Key    | src | Read | Report | Change by | Change % | Change any |
+-----------+-----+------+--------+-----------+----------+------------+
| date_time |     |  60  |   60   |           |          |    True    |
|     rw    |     |  5   |  300   |           |          |    True    |
|     w     |  *  |  5   |   60   |     80    |          |            |
|    kwh    |     | 300  |  300   |           |          |            |
|  any_unit |     |  15  |  300   |           |          |            |
|  no_unit  |     |  15  |  300   |           |          |    True    |
+-----------+-----+------+--------+-----------+----------+------------+
20:35:00 INFO    Using three phase sensor definitions.
20:35:00 ERROR   Unknown sensor specified: aux_power
20:35:00 ERROR   Unknown sensor specified: essential_power
20:35:00 ERROR   Unknown sensor specified: grid_connected
20:35:00 ERROR   Unknown sensor specified: inverter_current
20:35:00 ERROR   Unknown sensor specified: load_frequency
20:35:00 ERROR   Unknown sensor specified: non_essential_power
20:35:00 INFO    Added hidden sensors as other sensors depend on it: Rated power, Serial

Does work on dev version of the plugin.


Update mockups, add order

[x] Dashboard-1.5-responsive and dashboard-1.6 to be unified and updated to the latest production version.
[x] Public-map-dataset-2.3 check headers
[x] Create-map-1-7. Check headers, Get the map-in-cartodb scenarios to another file since it's not part of this app (should be in 04-Map-on-cartodb). Order the pages.
[x] Configuration. That should be part of the multiuser settings mockups.
[x] Multiuser. Update with the latest version that is on production.
[x] Merge tables. Should be part of the map editor mockups as a modal.
[x] Upselling. Should be unified to the different mockups (dashboard, editor,... ) where there are these usecases.
[x] Unified headers and footers. Merged to the other mockups.
[x] New editor -> Take margins on layers widget within the Layer Design artboard to the others.
[x] Update email templates with current states
[x] Update headers

Dashboard-1.5-responsive & dashboard-1.6unified. Created dashboard-1.7 instead and renamed folder to 02-current-dashboard
Could you please review it?
Alse, what should we do with the rest of folders inside 01-Dashboard?

Just cleaned up email templates sketch and folder. I was wondering if there's any list with the mails that are already in production (to replicate it in the sketch file). Also, are we going to use this kind of buttons on the emails?

/cc @matallo

there isn't but I can provide you one:
cartodb:

map liked
new_organization_user
share_table
share_visualization
share_visualization
unshare_visualization
data_import_finished
geocoding_finished

cartodb-central: (to be migrated to new templates)
users

map_views_warning (deprecated)
geocodings_warning
over_geocodings
over_map_views (deprecated)
over_twitter_imports
twitter_warning

actually I'm creting an issue to remove mapviews limitation
system

account_change_notification
alert_notification
api_failure
notification
organization_overquota_notification
overquota_notification

then we have tech metrics and business metrics reports
the rounded corners don't work on mobile because when action is too long it breaks in two rows (see attached

Thanks @matallo!! Already updated with some things that were missed.
@saleiva which mails should we recreate?

Okay, updated some of the emails @ethervoid sent to me. There are a few that he couldn't reproduce (warnings).
Also, I'm still revising the upselling file, but just need a review to ensure.


[SPARK-35049][CORE] Remove unused MapOutputTracker in BlockStoreShuffleReader

What changes were proposed in this pull request?
Remove unused MapOutputTracker in BlockStoreShuffleReader
Why are the changes needed?
Remove unused MapOutputTracker in BlockStoreShuffleReader
Does this PR introduce any user-facing change?
No
How was this patch tested?
Not need

ping @dongjoon-hyun @maropu

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41868/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41868/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41868/

Test build #137288 has finished for PR 32148 at commit b13fd83.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/137288/

Thx @AngersZhuuuu


envoy: Use patched image

Signed-off-by: Jarno Rajahalme<EMAIL_ADDRESS>Envoy is updated to version 1.11.1

This change is

test-me-please

never-tell-me-the-odds

test-me-please

never-tell-me-the-odds

"upgrade and downgrade" test failed due to health check failing on v1.5, so not related to this PR, retesting.

test-me-please

test-missed-k8s

test-upstream-k8s

test-upstream-k8s

test-upstream-k8s

Upstream K8s tests failed: https://jenkins.cilium.io/job/Cilium-PR-Kubernetes-Upstream/1454/
GitHub checkout problem.

test-upstream-k8s


Add prototype decompiler GUI

Pull Request Test Coverage Report for Build 324955841

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

Totals

Change from base Build 314162787:
0.0%

Covered Lines:
15079

Relevant Lines:
18425

💛  - Coveralls


chore: allow devs to switch environment during onboarding

Description
Allow devs to switch environment during onboarding
iOS
https://user-images.githubusercontent.com/11945712/220356423-51b7d6b6-495c-4dc9-9b3a-64d3f6f49fbd.mov
Android
https://user-images.githubusercontent.com/11945712/220356438-ada5866b-15bb-46a3-ba77-3207d679b72c.mov

PR Checklist

[x] I have tested my changes on iOS and Android.
[x] I hid my changes behind a feature flag, or they don't need one.
[x] I have included screenshots or videos, or I have not changed the UI.
[x] I have added tests, or my changes don't require any.
[x] I added an app state migration, or my changes do not require one.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

allow devs to switch environment during onboarding - mounir

Need help with something? Have a look at our docs, or get in touch with us.

I totally agree - it's really confusing in its current state


Add RegExp.setLastIndex

This PR add frequently used setLastIndex in javascript to RegExp

@hackwaly great stuff! Mind adding a changelog too?

done.

Thanks!


Update probe-rs

Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝

[x] I have updated existing examples or added new ones (if applicable).
[x] I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
[x] My changes were added to the CHANGELOG.md in the proper section.
[x] My changes are in accordance to the esp-rs API guidelines

Extra:

[x] I have read the CONTRIBUTING.md guide and followed its instructions.

Pull Request Details 📖
Description
This PR updates mentions of probe-rs to the latest main (9bde591). The changes include implementing system reset for Xtensa MCUs, which I hope will help with transient test runner failures.
Testing
~YOLO~
https://github.com/esp-rs/esp-hal/actions/runs/10370992061

Thanks for the approvals, unfortunately there's something fishy still 🙃 I'll investigate tomorrow

I'd appreciate a re-review. xtasks should now be pre-built, saving us a bit of time. Unfortunately probe-rs isn't in a workable state for us right now, but I'd like to land this change regardless.


Question about the LLVM emits vsetvl with tu, mu when compiling the vmacc_vv_i8m1 intrinsics

Hi all,
I have a question about that the LLVM compiler emits vsetvli with tu, mu  when compiling the vmacc_vv_i8m1 intrinsics (i.e. has dest parameter). Because from the RFC doc, it should emit ta, mu. And there should be a corresponding _tu intrinsic which should emit tu, mu. And from my experience about using intrinsic, it can reduce the number of the vsetvli instruction.
Here can recurrent.
C code:
#include <riscv_vector.h>

vint8m1_t vmacc_test(vint8m1_t dest, vint8m1_t op1, vint8m1_t op2, size_t vl)
{
    vint8m1_t t = vadd_vv_i8m1(op1, op2, vl);
    return vmacc_vv_i8m1(dest, t, op2, vl);
}

RVV Assembly:
vmacc_test:
        vsetvli zero, a0, e8, m1, ta, mu
        vadd.vv v9, v9, v10
        vsetvli zero, zero, e8, m1, tu, mu
        vmacc.vv        v8, v9, v10
        ret

Best regards,
Tin

upstream LLVM had reverted "_tu" and "_mt" intrinsics supported due to adding those new set of intrinsics increase clang binary size/clang compilation time.
https://reviews.llvm.org/D110684#3060191
so before LLVM support that, the default behavior for vamcc are still always tail undisturbed.
BTW, we want to propose this new design https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/120 for tail/mask policy and it's still under reviewing and developing on phabricator. (Ex.  https://reviews.llvm.org/D111617, D117681  and /D117989).

Are there any updates on the LLVM support for Policy Intrinsic Functions? I just tried to compile some code with both GCC and LLVM 14. GCC had no issues with _tu, but LLVM 14 dislikes them.

Current unmasked vmacc is tu. So I guess your issue is resolved?

@fabianpedd Patches for policy intrinsics have been landed into LLVM. You may compile them now with the trunk LLVM.


widget does not show up after install

even did a restart
This screen is the end of the install - pressing the "view instructions" button brings me to an apple page:

and no widget shows in menu :

App wasn't in the application folder. Thanks for that! I close the issue.


Filter for all resource types

We're tagging all of our resources we want to keep from nuking with a specific tag.
Is it possible to do something like this in the config:
presets:
  keep-tag:
    filters:
      *:
        - property: 'tag:nuke.keep'
          value: 'true'

I'm actually in the process of writing support for a global filter. Of course it only works if the resource has tags. https://github.com/ekristen/libnuke/pull/37 as soon as I have it completed and tested I'll be doing another beta release and will reference this issue so you can test!

I've merged it into libnuke, but I need to update this tool and write some documentation, I'll try and get to that as soon as I can, but it won't be today.

This is now on the beta.17 release -- https://github.com/ekristen/aws-nuke/pull/77
All feedback and testing would be appreciated. While I've taken great pains to not cause bugs or break things. Take care in testing.

Will give it a spin, thanks! This should probably reduce size of our config 10 times if not more.

I'm also looking into YAML anchors as anothe way to reduce config sizes and a subcommand to help test configs. Please remember this is beta and feedback is most welcome.

@YuriGal just following up on this. any chance to test?

Sorry, was diverted to other stuff, will test today!

No worries!

I can definitely add -c back that was an oversight. The assume role should definitely be there. Are you getting an error?
If you can let me know your exact usage with things sanitized I'll test and get back to you.

Basically this is our command
aws-nuke -c nuke-config.yml --quiet --force --force-sleep 3 --assume-role-arn arn:aws:iam::\<account-id>:role/<role-name> $FLAGS

$FLAGS is either --no-dry-run or unset. This works in the original nuke, in this one it throws
FATA[0000] flag provided but not defined: -assume-role-arn

for some reason with one dash.
I just realized - I probably need to use run command? Original nuke just accepts parameters.

Ok, I got past CLI huddles, the command is definitely works. But now I am getting
"failed get caller identity: InvalidParameter: 1 validation error(s) found.\n- minimum field size of 2, AssumeRoleInput.ExternalId.\n"

Ok, apparently external ID is needed now, I've added it. Assume role work, but I don't think filter did, unless I am doing this wrong. I have filter set as
    filters:
      __global__:
      - property: tag:Baseline"
        value: "true"

but in logs I see
global - IAMPolicy - arn:aws:iam::xxxxxxxxxxxxxxx:policy/DetectiveInvitationsPolicy - [ARN: "arn:aws:iam::xxxxxxxxxxxxxxxx:policy/XXXXXXXXXXXXXXXXXX", Name: "XXXXXXXXXXXXXXXXX", Path: "/", PolicyID: "XXXXXXXXXXXXXXXXXXX", tag:Baseline: "true"] - would remove

@YuriGal thanks for this, I'll test and get back to you ASAP. It should be optional but sounds like there's a logic issue. I have plans to overhaul the AWS in the future, I'm opening issues up and referencing them now.

@YuriGal it looks like your __global__ has a extra quote " on the end of the property based on what you pasted in.

Damn. Looks like you're right, sorry. I got too reliant on VS Code YAML syntax highlighter, usually it warns about these mismatches, but now it didn't. Will give this another go.

It works as designed! I will continue to play with this version, but it looks like it's working.

@YuriGal great! FYI - hyphen options for long form aren't supported with the CLI library I use, -- are for long form. - are for short form like -c that's why the -assume-role-arn triggered an error.  I've got https://github.com/ekristen/aws-nuke/pull/80 opened and will be merged soon to address the issues you brought up here.

Awesome thanks!
I think I might've discovered another potential problem, this one is about actual run, but I will open a separate issue.

:tada: This issue has been resolved in version 3.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

Woohoo! Thanks!


Home page image carousel

I added a 3-image carousel to the home page, as was originally drawn up. Check it out and let me know if you wanna keep it/change it/use different images/etc.

Oops, see issue 85. We can double check with Ash, but I believe the new goal is to only have one lead image.


Include self.members and members method definitions in RBS generated by Data.define

This change ensures that the RBS generated for classes defined via Data.define
includes type definitions for the self.members and members methods.
These methods return the list of attributes defined by Data.define,and their absence in the RBS was previously a missing feature.
irb(main):001> Foo = Data.define(:x, :y, :z)
=> Foo
irb(main):002> Foo.members
=> [:x, :y, :z]
irb(main):003> Foo.new(1,2,3).members
=> [:x, :y, :z]

Foo#members in fact inherits Data#members, so we don't need the method definition, when Array[Symbol] is acceptable.
We need the Foo.members definition, because we don't have Data.members.

@soutaro
Thank you for your review! I have fixed the points you pointed out.

Foo#members in fact inherits Data#members, so we don't need the method definition, when Array[Symbol] is acceptable.

That's right. However, I felt it would be more convenient to be able to see the specific type information in the editor.
This type information follows the official RBS document "Generate prototype for Data and Struct".
https://github.com/ruby/rbs/blob/master/docs/data_and_struct.md#generate-prototype-for-data-and-struct


[Question]: PrivateGPT only uses cosine similarity with PgVector even with HNSW index added

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
Description:
I am using HNSW vector indexing with pgvector in my database. Upon inspecting the SQL query logs, I noticed that by default, the <=> operator (cosine similarity) is being used for similarity searches. However, I would prefer to use the <-> operator (Euclidean distance) for similarity searching, as it reduces the query time significantly in our case where we have
Total records: 20,787,206 (private_gpt.data_embeddings)
Index size: > 69 GB
Table size: > 500GB
Ingested files: >108,000
Despite this, I have been unable to find any resources in the documentation regarding how to utilize HNSW indexing, as it doesn't seem to be used by default in my case.
Could you please advise on how to switch the default operator to Euclidean distance and ensure HNSW indexing is used for similarity searches using PgVector?

Hey @muzammilvd! 👋 I'm here to assist you with bug fixes, answer questions, and even guide you on how to become a contributor. Let's tackle this together!
To switch the default operator to Euclidean distance and ensure HNSW indexing is used for similarity searches using PgVector, you need to modify the hnsw_dist_method parameter when creating the HNSW index. Specifically, you should set hnsw_dist_method to "vector_l2_ops" instead of the default "vector_cosine_ops". Here's a code snippet that demonstrates how to create the index with the desired settings:
hnsw_dist_method = self.hnsw_kwargs.pop("hnsw_dist_method", "vector_l2_ops")

index_name = f"{self._table_class.__tablename__}_embedding_idx"

with self._session() as session, session.begin():
    statement = sqlalchemy.text(
        f"CREATE INDEX IF NOT EXISTS {index_name} ON {self.schema_name}.{self._table_class.__tablename__} USING hnsw (embedding {hnsw_dist_method}) WITH (m = {hnsw_m}, ef_construction = {hnsw_ef_construction})"
    )
    session.execute(statement)
    session.commit()

Make sure your hnsw_kwargs dictionary includes this setting when you create the index [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Hi, thanks for your response and I have a question that as I am using VectorIndexRetriever() to create my retriever so is there any option in VectorIndexRetriever() to use HNSW as by default it is using cosine.
here is the retriever
def get_retriever(         self,         index: VectorStoreIndex,         context_filter: ContextFilter | None = None,         similarity_top_k: int = 2,     ) -> VectorIndexRetriever:         # This way we support qdrant (using doc_ids) and the rest (using filters)         return VectorIndexRetriever(             index=index,             similarity_top_k=similarity_top_k,             doc_ids=context_filter.docs_ids if context_filter else None,             filters=(                 _doc_id_metadata_filter(context_filter)                 if self.settings.vectorstore.database != "qdrant"                 else None             ),         )

hnsw_vector_store

The VectorIndexRetriever class itself does not directly specify the use of HNSW indexing. Instead, HNSW indexing is typically configured at the level of the vector store you are using. For example, if you are using a vector store that supports HNSW, such as HnswlibVectorStore, you would configure the HNSW settings when you create the vector store instance.
Here's a general approach to using HNSW with a VectorIndexRetriever:

Create an HNSW Vector Store: Use a vector store that supports HNSW indexing, like HnswlibVectorStore or DocArrayHnswVectorStore. Configure it with the desired parameters for HNSW.
Initialize the VectorIndexRetriever: Pass the configured vector store to the VectorIndexRetriever.

Here's a simplified example:
from llama_index.vector_stores.hnswlib import HnswlibVectorStore
from llama_index.core import VectorStoreIndex

# Configure HNSW vector store
hnsw_vector_store = HnswlibVectorStore.from_params(
    space="ip",  # or "l2" for Euclidean distance
    dimension=1536,
    max_elements=1000,
)

# Create the index
index = VectorStoreIndex(vector_store=hnsw_vector_store)

# Initialize the retriever
retriever = VectorIndexRetriever(
    index=index,
    similarity_top_k=2,
    # other parameters as needed
)

Ensure that your vector store is set up to use the desired distance metric (e.g., Euclidean distance) by configuring it appropriately when you create the vector store instance.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

So you suggest that I need to change the vectore_store instance and use HnswlibVectorStore but I am using Pgvector database where i have data with states that I mentioned in my question.
Here is the current vector_store that using PGVectorStore
self.vector_store = typing.cast(
                    BasePydanticVectorStore,
                    PGVectorStore.from_params(
                        **settings.postgres.model_dump(exclude_none=True),
                        table_name="embeddings",
                        embed_dim=settings.embedding.embed_dim,
                    ),
                )

So what should I do and as my I understanding you are suggesting to change the db vector_store method so how it will use the pgvector db and its data?

To use HNSW indexing with Euclidean distance in your PGVectorStore setup, you can configure the hnsw_kwargs parameter when creating the PGVectorStore instance. Here's how you can adjust your current setup to use HNSW indexing with Euclidean distance:
from sqlalchemy import make_url

# Assuming you have a connection string and settings
url = make_url(settings.postgres.connection_string)

self.vector_store = PGVectorStore.from_params(
    database=settings.postgres.db_name,
    host=url.host,
    password=url.password,
    port=url.port,
    user=url.username,
    table_name="embeddings",
    embed_dim=settings.embedding.embed_dim,
    hnsw_kwargs={
        "hnsw_m": 16,
        "hnsw_ef_construction": 64,
        "hnsw_ef_search": 40,
        "hnsw_dist_method": "vector_l2_ops",  # Use Euclidean distance
    },
)

This configuration sets up the PGVectorStore to use HNSW indexing with Euclidean distance for similarity searches. Make sure that your settings object contains the necessary database connection details and embedding dimensions [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

I implemented above code that you shared and I testing but it still using cosine as I examined the DB logs where I found a query that is like
SELECT private_gpt.data_embeddings.id, private_gpt.data_embeddings.node_id, private_gpt.data_embeddings.text, private_gpt.data_embeddings.metadata_, private_gpt.data_embeddings.embedding <=> '[-0.46123987436294556,-0.6934341192245483,-3.45989727973938,-0.1854298710823059,0.6372467279434204,0.9199901819229126,0.4315108358860016,0.08280982077121735,0.428688645362854,...........] AS distance
	FROM private_gpt.data_embeddings ORDER BY distance asc
	 LIMIT 2

After analysing DB logs and I shared above some you can see  <=> operating which is use by cosine and <-> use by Euclidean. So the issue is till there.

To ensure that the PGVectorStore uses Euclidean distance instead of cosine similarity, you need to verify that the hnsw_dist_method is correctly set to "vector_l2_ops" in the hnsw_kwargs parameter. If the configuration is correct but the SQL logs still show the <=> operator (cosine similarity), it might indicate that the configuration is not being applied as expected.
Here are a few steps to troubleshoot and ensure the correct setup:

Double-check the Configuration: Ensure that the hnsw_kwargs dictionary is correctly passed to the PGVectorStore.from_params method with "hnsw_dist_method": "vector_l2_ops".
Inspect the Code: Verify that the _create_hnsw_index method in the PGVectorStore class is correctly using the hnsw_dist_method from the hnsw_kwargs. The method should apply this setting when creating the index.
Recreate the Index: If the index was created before the configuration change, you might need to drop and recreate the index to apply the new settings.
Check for Overrides: Ensure there are no other parts of the code that might override the hnsw_dist_method setting after the PGVectorStore is initialized.

If these steps do not resolve the issue, it might be necessary to review the implementation details of the PGVectorStore to ensure that the distance method is being correctly applied in the SQL query construction.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Here the updated  PGVectorStore class
self.vector_store = typing.cast(
                    BasePydanticVectorStore,
                    PGVectorStore.from_params(
                        **settings.postgres.model_dump(exclude_none=True),
                        table_name="embeddings",
                        embed_dim=settings.embedding.embed_dim,
                        hnsw_kwargs={
                            "hnsw_m": 16,
                            "hnsw_ef_construction": 64,
                            "hnsw_ef_search": 40,
                            "hnsw_dist_method": "vector_l2_ops",  # Use Euclidean distance
                        },
                    ),
                )

As I provided you my retriever and it responsible to run sql query to do similarity search in vector so my question is that can we run sql query manually by code like I want to run raw sql query where I will do query with <-> to use Euclidean. So is there any way to do it

Yes, you can manually run a raw SQL query using the <-> operator to perform a similarity search with Euclidean distance in the PGVectorStore setup. Here's an example of how you can execute such a query:
SELECT * FROM items ORDER BY embedding <-> '[query_vector]' LIMIT 5;

This query orders the results by their similarity to a given vector, represented by [query_vector], using the <-> operator on the embedding column [1]. You can execute this query using your database connection in Python, typically with a library like SQLAlchemy or psycopg2, depending on your setup.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Yes but my question was that can i run raw query by code and get expected object that PGVectorStore or VectorStoreIndex or my retriever. I want like all my process remain same just want to execute sql query by code for Euclidean and rest of the process should remain same and I provide you all code as well. Please provide me step by step guide and code for it.

This is below my retriever function
def get_retriever(
        self,
        index: VectorStoreIndex,
        context_filter: ContextFilter | None = None,
        similarity_top_k: int = 2,
    ) -> VectorIndexRetriever:
        # This way we support qdrant (using doc_ids) and the rest (using filters)
        return VectorIndexRetriever(
            index=index,
            similarity_top_k=similarity_top_k,
            doc_ids=context_filter.docs_ids if context_filter else None,
            filters=(
                _doc_id_metadata_filter(context_filter)
                if self.settings.vectorstore.database != "qdrant"
                else None
            ),
        )

I want to edit the sql query that is generate to do similarity search in my pgvector db. How can I do it?

PGVectorSQLParser

To edit the SQL query generated for similarity search in your pgvector database within the get_retriever function, you need to modify the PGVectorSQLParser class, specifically the parse_response_to_sql method. This method is responsible for parsing the response and generating the SQL query string. Here's the relevant part of the code:
class PGVectorSQLParser(BaseSQLParser):
    """PGVector SQL Parser."""

    def __init__(
        self,
        embed_model: BaseEmbedding,
    ) -> None:
        """Initialize params."""
        self._embed_model = embed_model

    def parse_response_to_sql(self, response: str, query_bundle: QueryBundle) -> str:
        """Parse response to SQL."""
        sql_query_start = response.find("SQLQuery:")
        if sql_query_start != -1:
            response = response[sql_query_start:]
            if response.startswith("SQLQuery:"):
                response = response[len("SQLQuery:") :]
        sql_result_start = response.find("SQLResult:")
        if sql_result_start != -1:
            response = response[:sql_result_start]

        # this gets you the sql string with [query_vector] placeholders
        raw_sql_str = response.strip().strip("```sql").strip("```").strip()
        query_embedding = self._embed_model.get_query_embedding(query_bundle.query_str)
        query_embedding_str = str(query_embedding)
        return raw_sql_str.replace("[query_vector]", query_embedding_str)

To customize the SQL query, you can modify the logic within this method to adjust how the SQL string is constructed or how the [query_vector] placeholder is replaced with the actual query embedding [1].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

I dont have any PGVectorSQLParser class or method. I share the retriever function who is responsible to do query in db and i would to edit the sql query that do similarity search in db so can you make change in my retriever function.
here is my retriever below
def get_retriever(
        self,
        index: VectorStoreIndex,
        context_filter: ContextFilter | None = None,
        similarity_top_k: int = 2,
    ) -> VectorIndexRetriever:
        # This way we support qdrant (using doc_ids) and the rest (using filters)
        return VectorIndexRetriever(
            index=index,
            similarity_top_k=similarity_top_k,
            doc_ids=context_filter.docs_ids if context_filter else None,
            filters=(
                _doc_id_metadata_filter(context_filter)
                if self.settings.vectorstore.database != "qdrant"
                else None
            ),
        )


Dataloader and models

I was wondering, if you could share your dataloaders and trained models so one can verify your results and also test your approach on a different dataset

same question here

@ZitongYu Same her for me. thanks