Transfer widget amount inputfield should have a placeholder instead of real value

Yes please. But this goes for all input fields?
Also a "Buy Max" - button (considering gas price as well) would be real nice. I spend too much time changing/rejecting, etc.

@systemaddict thank you for your feedback. Regarding the "Buy Max"- button, this is something which will definitely come in the next weeks/months. If you have anything else in mind, please share it with an issue.

Fixed in https://github.com/OasisDEX/oasis/pull/260


Add a local filesystem registry type

For the purpose of packaging Rust applications, Debian (and likely other distros) wants to also package all of the application's dependencies. They have tried doing this be rewriting registry dependencies into path dependencies and found it burdensome. What we want them to be able to do is construct a directory tree on the local filesystem that cargo understands as a new type of registry, and override cargo to use it instead of crates.io
The layout of this directory structure needs to be easily reproduced through scripting.

This might be covered by https://github.com/alexcrichton/cargo-vendor ?

I've found myself wanting a way to use cargo offline (on a plane): telling it to skip the registry-update step and just use the cached index+tarballs that it fetched last time. A filesystem registry type might be an elegant way to accomplish that, if the filesystem and "normal" registries share the same format (and even the same disk location), but the filesystem type doesn't do an update each time you run cargo. Then I could switch between online and offline modes by just editing the prefix of the [registry] index= field in .cargo/config.

Isn't this already supported (poorly)? You can set registry.index to the filesystem by using file://. The only niggle is that you have to do a git commit in the filesystem registry.

@marcbowes sorta, yeah, but it's pretty painful and not exactly intended for that purpose :)

Agreed on the painful (this is what I'm doing at work). I just wanted to point out that you can work around this without rewriting Cargo.toml files.

@warner I encountered the same problem on a plane.  I made a minor tweak to my Cargo.toml file, and cargo then refused to proceed without updating, which it couldn't do offline.  I'd like to download an offline snapshot of a pile of Cargo dependencies, so that I can always build.

I believe the main request in this issue is addressed by https://github.com/alexcrichton/cargo-vendor and https://github.com/alexcrichton/cargo-local-registry, and the offline issues are covered by https://github.com/rust-lang/cargo/issues/1882 and https://github.com/rust-lang/cargo/issues/3479.


Merge subset of 4.9.0 back into main branch

Wellspring for the v4.9.0 release.  A subset of the changes made in preparation of the release will be merged back upstream into main.   This PR will capture and test those changes, mostly related to release versions and dates and any last-minute, platform-specific changes.

Next: netCDF-Fortran v4.6.0

Need to reopen due to other PRS.


Path text substitution support

The json path support provided by the library is very useful for accessing nested values with json without having to create separate classes.
It would be very useful to expose a mechanism which allows text substitution within the 'path' notation which could allow a developer to reuse a model and make substitutions from an extending class.
For example, given the following class:
public class SubstitutionBase {
    @SerializedName("{SUB_1}.")
    public int value;
}

A class could extend this and replace the {SUB_1} string similar to the example below:
@AutoGsonAdapter(substitutions = {
        @PathSubstitution(original = "SUB_1", replacement = "example")
})
public class SubstitutionImpl extends SubstitutionBase {
}

The feature has been implemented


grid.columns.aggregator - reset not getting called

Looks like the reset function of aggregators is not getting properly called, at least in some cases.
Try this behaviour on the example aggregator grid here: http://dobyjs.com/#grid-options-columns-aggregators

toggle from Total aggregator to Average
now toggle back to Total
total will double for each switch

Oddly enough, the Average aggregator does not seem to suffer from this (though thats likely because the total and count are doubled, so the overall aggregate value will remain the same)

I'm unable to reproduce the issue using the original instructions (ie. the aggregator example in the source code). Do you have some other steps I can try?

Can you please try the latest build from master?


Migrate view_image.jsx to be follow the guidline

Summary
Migrate view_image.jsx to be follow the guidline.
Ticket Link
https://github.com/mattermost/mattermost-server/issues/7684
Checklist

[x] Added or updated unit tests
[x] Has UI changes

Thank you @saturninoabril @jwilander for your review!
I will take a look for it soon :smile:

@CometKim You have failing test, at least in make check-style:

I don't know why modal component of react-bootstrap makes errors on enzyme rendering...

@CometKim I'll take a look at this today.

@CometKim I have pushed one this commit, adding/fixing tests.

Amazing!! Thank you @saturninoabril
I'm not used to writing tests with enzyme yet. So much learned from your code. 😍
(BTW, I want to see how tests work, but the github is too slow to my internet now)

Nice work on this @CometKim! I'll merge after the 4.4 release branch gets cut


Update rookie_teams.rst

Removed the redundant links to programming, building resources that existed as an artifact of the homepage in the initial layout.

I think you accidentally deleted the TOC (Table of Contents) and thereby orphaned the FAQ and Awards page. That is why the link-check failed. If you did intentionally remove those pages from the TOC you just have to delete \docs\source\stubs\Awards.rst and \docs\source\stubs\faqs.rst.

Updated with texasdiaz pull


I am experiencing frame loss when adding subtitles to gif

I am experiencing frame loss when adding subtitles to gif. When I run it for the first time, it is ok, but the problem occurs when I execute it many times.
Version information

fluent-ffmpeg version:^2.1.2
ffmpeg version: 4.1.4
OS: macOS 10.14.6

Code to reproduce
    ffmpeg('source.gif')
      .outputOptions([
          `-vf subtitles=${strPath}:force_style='Fontsize=44,PrimaryColour=&Hffffff`,
          '-s 340x340'
        ]
      )
      .on('end', function() {
        console.log('Finished processing');
      })
      .on('error', function(err) {
        console.log('Error: ' + err.message);
      })
      .save('result.gif');

Expected results
source gif

Observed results
result gif

Sorry, it is my fault. The problem I caused when downloading gif resources.Similar to this question
https://stackoverflow.com/questions/55374755/node-js-axios-download-file-stream-and-writefile

Sorry, it is my fault. The problem I caused when downloading gif resources.Similar to this question
https://stackoverflow.com/questions/55374755/node-js-axios-download-file-stream-and-writefile


[github_actions] Publish Fedora Copr packages for Fedora 39

After Fedora 39 has its stable release in October. Packages will be built for both Fedora 38 and 39.

I have already enabled Fedora 39 package builds a couple of months ago. Closing.


AppleClang used instead of intended Clang from brew

During the build I get
-- The C compiler identification is AppleClang <IP_ADDRESS>00026
-- The CXX compiler identification is AppleClang <IP_ADDRESS>00026

which causes build issues later on.

The script uses Apple clang from the Xcode command line tools, so this isn’t a valid issue.
If you are getting errors later, post the terminal output here and I’ll have a look (in a .txt file)

Oh, I just assumed we should be using the brew llvm as it's something we're pulling in. I'll close this issue if it's working as intended.
I'll replicate the issue I'm having when I have a chance. I looked at the main repo and found the issue was caused by an old version of llvm and I assumed it was also due to using Apple Clang here.


Update README.md

Changed link from gitter to discord

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

change badge as well

@ColinSchwarz here https://github.com/ChainSafe/lodestar/pull/341/files#diff-04c6e90faac2675aa89e2176d2eec7d8R14


[23.11] Backport and converge release notes editorial updates

Description of changes
Backports https://github.com/NixOS/nixpkgs/pull/270967 manually due to diverging branches.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Priorities
Add a :+1: reaction to pull requests you find important.

This PR was painful but with the 9 people in the release meeting we finally got it right (we think!)!


Added reverse memory game

🛠 Fixes Issue #1797
👨💻 Changes proposed and Brief Description
The Reverse Memory Game is a fun and challenging memory game where you must recall a sequence of colors in reverse order. With each successful recall, the sequence length increases, making the game progressively harder.
✅ Check List (Check all the applicable boxes)

[x] My code doesn't break any part of the project
[x] This PR does not contain plagiarized content.
[x] My Addition/Changes works properly and matches the overall repo pattern.
[x] The title of my pull request is a short description of the requested changes.

📷 Screenshots

@swapnilsparsh could you please tell me what the problem is in the game ? I have checked it.

https://github.com/swapnilsparsh/30DaysOfJavaScript/assets/156044894/19cf28de-4986-4433-8547-422cc0482ce6

@tanyagupta01 Thank you for contributing to this repo. Looking forward for more 🚀


Fix Python 3 compatibility

Fixes issue #56.

Any chance of getting this merged?

Apologies for the super long delay. I've been out of github...

Will you publish a new version to pypi?

@sindrig oops, there was an issue with pypi and the CI system didn't notify me. It is up now.

I'm a bit late with this but thank you @dlapiduz


Problem with plugin/eigen/Eigen.upp case

Should be plugin/eigen/eigen.upp, otherwise it does not compile in Linux.

Thank Mirek. I think it was fixed.

As it has been a long time since this problem has been solved and there are no further comments, this issue will be closed.


[BUG] VideoSourceError

I can't upload video, igtv, clip. it gives VideoSourceError.
i downloaded an instagram page's video from source and tried to upload my page but it gives VideoSourceError.
Also i can upload same file with instagram app

Debugging I saw the error occurs in video_configure method :
return self.private_request(
"media/configure/?video=1", self.with_default_data(data)
)
This request return the error.

Read this https://github.com/adw0rd/instagrapi/issues?q=VideoSourceError
VideoSourceError - this means the Instagram server does not understand your video format, you need to prepare the video before uploading it

I'm facing the same problem. Can you tell me how to prepare it? Video 5-20 seconds, through the web version of Instagram loads without problems, but does not want to through the api.


feat: ui plugin support (similar to Obsidian Charts)

Is your feature request related to a problem? Please describe.
Is not a  problem, is a really powerful feature
Describe the solution you'd like
I was testing Obsidian with Ollama and i installed plugin charts. https://github.com/phibr0/obsidian-charts. I found what is the markdown code you can write in your node to create a chart and i created a prompt for my ollama model this time llama3; As a data analyst extract relevant numbers from the selected text and create charts This is an example code of how to create a chart:
type: bar
labels: [Monday, Tuesday]
series:
  - title: Test
    data: [1,2]
tension: 0.2
width: 80%
labelColors: false
fill: false
beginAtZero: false
bestFit: false
bestFitTitle: undefined
bestFitNumber: 0

And llama3 was capable to extract numbers from my selected text create a markdown table with the values and then create a beautiful chart with chartjs.
Describe alternatives you've considered
As there is possibility to upload documents on the open webui which is amazing it would be nice to have such features. It is adding huge capabilities to the UI and gain more audience.
Additional context
Add any other context or screenshots about the feature request here.

How to setup for open-webui?


CALC not recognizing numbers and math

Input:
DEF MAX_INT CALC(2^31 - 1)
summon AreaEffectCloud ~ ~ ~ {Duration:MAX_INT}

Output:
ERROR: The first number in '2^31 - 1' in line 'summon AreaEffectCloud ~ ~ ~ {Duration:CALC(2^31 - 1)}' must be a number

CALC, and all other math-related stuff should have spaces in between all numbers and operators (for now at least). In this case, it should read
DEF MAX_INT CALC(2 ^ 31 - 1)
summon AreaEffectCloud ~ ~ ~ {Duration:MAX_INT}

(oh btw there's a DEF $Duration$ in the library General/utils.ccu for that assuming I did things correctly)

What does GLOBAL do?
I'm assuming it allows things to be seen when another ccu file imports it.
But those DEFs in the libraries don't have GLOBAL.

It's for visibility purposes. When a DEF / ARRAY / FUNC is placed anywhere after one tab space, only that tab space region can actually see the variable unless 'GLOBAL' is attached to it (where the entire document can see it including imported documents)


enable/disable keyboard events

Add features to enable/disable keyboard events to be propagated or not.
Now, iohook.stop() will enable mouse-click/keyboard event propagation. It is more user-friendly.

Description

iohook.enableKeyboardPropagation() enables keyboard events to be propagated.
iohook.disableKeyboardPropagation() disables keyboard events to be propagted.
iohook.stop() will enable keyboard/mouse-click events to be propagated.

Motivation and Context

Refer to issue #34 and PR #75.
How Has This Been Tested?

MacOSX
Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

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

This PR is for the reference. I need someone who will test this to other OS like linux and windows.
 So I will clear the logs if I finished the test on all the OS.

MacOS - tested
Win10+ - tested but code changes are needed
after testing on linux i will make up the codes and repost the PR.

WSL (windows subsystem for linux) Bash - failed. In fact, iohook does not work.
Thus, someone who are windows user should use cmd, msys, cygwin or something to run iohook apps.

package-lock.json has some problems.
Linux X11 - libuiohook does not support propagation settings. Refer to https://github.com/kwhat/libuiohook/issues/57.

Hi there! Thanks for your work !!
To ensure compat with Linux, could you juste check the platform and make the functions no-op, and documenting it ?

Win10+ - tested but code changes are needed

@wurikiji , It's working for Win10 as for now? If not, how I need to change code?

@fidelics you can download working version on my fork

@wurikiji Thank you! It's awesome

Close this PR until I finish the test and code cleanup.

Hi there,
Thanks for your work !

has this been abandoned?

@introvertuous You can refer to my fork. It is not in progress, because I am working on other project.

@wurikiji were you able to get this working on all platforms? linux is my particular concern.

@wurikiji id love to see this work come to life

https://stackoverflow.com/questions/26715227/app-window-restore-on-keypress/26734577#26734577


HHH-13058 Criteria API correlated subquery with LEFT JOIN generates incorrect SQL

https://hibernate.atlassian.net/browse/HHH-13058
The current correlated subquery ignores the first left join and ends up with 'inner join' instead invariably. So suppose for the below entities:
@Entity(name = "Task")
public class Task {
    @Id
    Long id;

    @ManyToOne
    Patient patient;
}

@Entity(name = "Patient")
public class Patient {
    @Id
    Long id;

    @ManyToOne
    Site site;
}

@Entity(name = "Site")
public class Site {
    @Id
    Long id;
}

Note that @ManyToOne's optional is true by default.
the following Criteria would skip the Task without Patient:
final Subquery<Task> subquery = outerQuery.subquery( Task.class );
final Root<Task> subtask = subquery.correlate( outerTask );
final From<Task, Patient> patient = subtask.join( Task_.patient, JoinType.LEFT );
final From<Patient, Site> site = patient.join( Patient_.site, JoinType.LEFT );
outerQuery.where(
    builder.exists(
        subquery.select( subtask )
            .where(
                builder.or(
                    patient.isNull(),
                    site.in( validSites )
                )
        )
    )
);

because internally the jpasql generated is:
select generatedAlias0 from Task as generatedAlias0
where exists (
    select generatedAlias0
    from generatedAlias0.patient as generatedAlias1
        left join generatedAlias1.site as generatedAlias2
    where ( generatedAlias1 is null ) or ( generatedAlias2 in (:param0, :param1)
))

Note that generatedAlias1 is null can never be true for its left join with Site; but given that Task's Patient is optional we should reserve the left join from Task to Patient.
The fix in this PR is to create the following jpasql instead:
select generatedAlias0 from Task as generatedAlias0
where exists (
    select generatedAlias0
    from Task as generatedAlias1
        left join generatedAlias1.patient as generatedAlias1
        left join generatedAlias1.site as generatedAlias2
    where
        generatedAlias1 = generatedAlias0 and (( generatedAlias1 is null ) or ( generatedAlias2 in (:param0, :param1))
))

The basic idea is to generate new alias for correlated root and add newAlias = oldAlias to the WHERE jpasql clause, thus reserving the LEFT JOIN semantic of the correlated root in subquery.

will open when it is finalized

Note for v6 porting. The code changes might not be applicable to v6 and nontrivial v6 specific tweaking might be needed, but the testing case is invaluable.


New FilterItem component needed

Overview
As a user I should be able to filter organizations and events using predefined filter properties.
A good first step toward achieving this is to create a new element that can be used inside the directory filter dropdown.
Proposal
Attached is an image of this design in the Figma document. This should appear as a checkbox with a label, which can be toggled on and off. For this proposal, only the single element is needed, and it can be later wired up to the filtering data.
Supplementary Information
Snapshot from design doc:

This may have since been resolved

Should be fixed by #123


Unable to highlight text areas / other fields in inline editing mode

When you expand an element in inline editing mode, and try to highlight text inside the field, it causes the element to re-render:

and you cannot highlight the text.
The react-dnd library needs to disable drag-and-drop when an element is expanded.

This is a bug with react-dnd, and can be tracked here for progress: https://github.com/react-dnd/react-dnd/issues/438

That being said, we could probably fix this by making the ElementHeader the draggable part, rather than the entire Element which also incudes the ElementContent component. This would only change functionality when the element is expanded, and would mean you can't drag from anywhere inside the form itself, only the heading. I think this would be fine myself, especially since we show a drag handle which should tell users to drag from that area anyway.
I had a quick go but ran into an issue with the drop target detection being slightly out and a GraphQL error with a missing argument. I don't have enough context to fix this quickly so probably better for @ScopeyNZ or @NightJar.

Fixed with #610, nice one @ScopeyNZ.
If anybody has extended the Header React component in their own code and overloaded it with Injector, be aware that it now has a couple of new required props. We think it's justified to merge this change into 4.0.x right now to fix this bug, and see it as a reasonably low likelihood that anyone has actually done this.


Issue #sh-932 fix: Course: Course Completion message is displayed with You will be notified about the course certificate on your registered contact details within 7 days when course is attached to Certificate without Description

created new PR


Implement User Interface for login, reimplement authentication function

Using dj-rest-auth which is rest api for google oauth for backend and vue3-google-login for frontend.
Have a simple UI button to login from UI interface

I can login successfully. I added SITE_ID to be configuration because each person uses different SITE_ID.


Image plugin with stacks

[x] IPFS Plugin with UX to upload file
[x] Upload file to IPFS
[ ] Save file to space and add to stack

RE: https://github.com/dxos/dxos/pull/3858

This use case motivates a more general requirement for cross-plugin coordination.
In this implementation, the Stack main component contains a Surface with the "drop" role.
The IPFS plugin provides a component that allows files to be dropped.
This uploads the file to IPFS, obtains the CID, and creates an ECHO object of the appropriate type.
However, neither the Stack component nor the IPFS component has a reference to the current Space and so is unable to construct the appropriate SpaceAction.ADD_OBJECT intent.


The order of definitions of column offset selectors is wrong

There is an issue with v0.97.3 \bower_components\materialize\dist\css\materialize.css where the .row .col.offset-l1 {...} .row .col.offset-l2 {...} are defined intermingled with definitions of .row .col.l1 {} row .col.l2 {} etc such that some of the offset definitions come before l definitions in the css. In versions before v0.97.3 these offset definitions always came after column width (l) definitions, which is correct.
The current issue causes the row .col.offset- definitions to be not effective in situations like below example

Here is a an what happens shown in chrome dev tool window

Instead of margin-left: 25%  being effective, the margin-left: 0 has taken precedence.

duplicate of https://github.com/Dogfalo/materialize/issues/2328 and already fixed with next release

duplicate.

Sorry about the duplicate folks. I am new to the github way of life. Will try to better in searching for existing issue before posting my next on. Keep up the good work. Thanks

No problem! I appreciated the effort and detail in your issue


Feature Request: Configuration option to silence release notes display

I would appreciate a configuraton option to silence the release notes when updating the plugin. Every major plugin provides this, and you could easily link to release notes from the settings.
For example, this is the first option in Excalidraw:

Thanks for your consideration.

Hey, @zeitchef, please update and re-check.

Thanks @ivan-lednev - I'm able to toggle the setting just fine. The code looks fine so I expect it will work, but the real test will come when I update again ;-) Thanks!


No mention of /analyze:projectdirectory parameter

There is no description of the /analyze:projectdirectory that can be observed in the VS build output along side the other /analyze commands. It is also not mentioned in cl.exe help (cl /?)

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

ID: 09296a0d-dea6-bcf6-7370-5ec2cf061835
Version Independent ID: b6de3061-2d20-4508-6a76-663a2d61d098
Content: /analyze (Code Analysis)
Content Source: docs/build/reference/analyze-code-analysis.md
Product: visual-cpp
Technology: cpp-tools
GitHub Login: @corob-msft
Microsoft Alias: corob

@adamgoon
/analyze:projectdirectory is an internal option invoked by MSBuild. It effectively prepends a project directory to the ruleset directories search path. That means your project's custom ruleset, if you have one, is found first, before the compiler looks in the common ruleset directories. It's shorthand, because you can achieve the same effect by using the /analyze:ruleset option with a relative or absolute path one or more times at the command line.


Submit New Training Materials website outlook

it should as
Title
author
URL
Description
Licenses
Tags
Types
Number of Downloads: Delete
Publication Date

submit_date to submition_date:

An optional description is given at the end of fields that are not mandatory.


#1419 Added load of notebooks on startup from github (as done for k8s)

Notebooks are now automatically populated in the Jupyter UI from github for the docker-compose implementation. This matches the approach taken in the helm lab chart
Signed-off-by: Nigel Jones<EMAIL_ADDRESS>

Note - container will run as root (and then will sudo to 'jovyan') - this is needed to allow apt-get to work. The alternative would be to build a new image based on this one, which includes git. However for a local lab environment I think this approach is fine.


Move 'dependencies.gradle' to buildSrc as 'libraries.kt'

convert from groovy to kotlin-dsl
move to buildSrc so that we have statically typed values

There is some discussion around if we want to do it like this and if this is the way that we would recommend to others: https://github.com/gradle/dotorg-docs/issues/192
I would be interested in your thoughts @eskatos @bamboo @bigdaz @melix @ljacomet.
If we think we need to do something else, but this is a step in the right direction, we can merge this PR and continue to refine it afterwards.

The big downside to doing this is that any change in dependencies will cause all tasks defined in buildSrc to be invalidated/rerun.

Despite my scepticism to this solution, I started to convert more subproject scripts to kotlin and fix the dependency declarations in these scripts in the process (api/implementation separation). I did this based on this PR (I can change it if we do not want to merge this one) - #4498.
One thing to fix here is that libraries (gson, asm, ...) should be imported direct by the projects that need them. Since they do not provide types to the API. They just happen to be used in multiple projects. But not in all projects in the hierarchy. So only selected projects should have an implementation dependency on them.
Then you have this situation, where you import the same library several times in different places. And here it is really very convenient to define them in one place and then have the IDE support to refer them wherever you need them. I could also imagine a nice convenient plugin that contains constants for all widely-used dependencies on jcenter...

What feels weird to me here is that we end up having a custom type to declare the dependencies to use, that then gets converted in the right type by usage.
If we go for a type safe definition, cannot we use something that Gradle will be able to natively interpret, so that having the following definition (using the syntax / types from this PR) lib("junit:junit", "4.12", "not yet ready for JUnit 5") and using it as implementation Libraries.junit is equivalent to having:
implementation "junit:junit:4.12" {
    because "not yet ready for JUnit 5"
}

In short, if I have a rich type containing group, name, version and because, why should I decompose it again?

Can we inject a DependencyHandler and use Dependencys directly (instead of referring to the coordinates explicitly)?

I for one don't like the precedent that this creates. buildSrc is for build logic. Not configuration. The libraries we use are configuration, and therefore should be declared in a libraries.gradle(.kts) or libraries.properties or libraries.json file in the build itself. The fact that accidentally this enables IDE support is wrong reasoning to me. It's convenient, but we should find a way to have completion, or nice support, without migrating everything to buildSrc. Let's not add confusion around what buildSrc is for.

buildSrc is for build logic. Not configuration.

buildSrc is for sharing definitions across all build scripts in a build. What roles those definitions play is at the discretion of the user.
I think it's more useful to think in terms of expected rate of change. Things that change often are usually better managed outside buildSrc because of the overhead imposed by the changes to the classpath.
Back to the issue at hand, a good compromise here could be to declare a Gradle project extension, say, Libraries defined in buildSrc which gets populated from one build script and consumed from the rest.
Here's a sketch:
// buildSrc/**/Libraries.kt
class Libraries {
  lateinit var junit: Library
  ...
}

// buildSrc/**/LibrariesPlugin.kt
    project.extensions.create<Libraries>("libraries")

// main build script
plugins {
...
  id("libraries")
...
}
...
libraries {
  junit = Library("....")
  ...
}

// consumer build script
dependencies {
   implementation(libraries.junit)
}

The sketch suggested by @bamboo above could also be enhanced following @ljacomet suggestion, by using Dependency subtypes directly. Gradle extensions can get to DependencyHandler.

I mean no offense here, but I think this is all cock-eyed. It's not because we have a static language that we need everything static with everything referencing everything everywhere. Where is the simplicity? Can we seriously propose to a new user to create a file in buildSrc/ that pre-declares a variable name, then initialize it in a build script? I cannot imagine a second having to explain that to beginners, or even existing Gradle users. I don't want Gradle to become Sbt. I want to keep the simplicity of build scripts, and the simplicity is that I want to declare a dependency like this:
dependencies {
    implementation 'com.foo:bar:1.0'
}

Do Maven users want completion like this? No, but what they do have, instead, and which is IMO far more interesting for 90% of our users, is completion of the group id, artifact id and version of dependencies as they type it. This is the kind of content assist most users are looking for. So while we could declare dependencies like this, half split in Libraries.kt, half in a build script, and worse, think that we can start putting configuration in buildSrc is turning Gradle into a different build tool, which, I'm afraid, is not the one I want.
If we go that route, the idiomatic build we're going to show will be:
buildSrc/..../lots of fancy Kotlin scripts
build.gradle.kts: apply { plugin 'configure-my-build' }
This isn't right to me. That's not because the only way to get content assist today is working with buildSrc that we have to endorse it. There MUST be a clear separation of contents, and build scripts must remain readable, especially when read on GitHub or in diffs. So the goal should be, IMO:
dependencies {
    implementation 'com.foo:<CTLR+SPACE> // <-- show me some nice completions
}

and for the advanced use case like us, where you want to define the libraries you use separately for reusability, it must be something like this:
apply {
   best-practice-dependencies-plugin
}

dependencies {
    implementation libraries.foo<CTLR+SPACE> // <-- autocompletes and maybe replaces it with libraries['com.foo']
}

And if it means having a convention that if you apply the "best practice plugin" then you must have a file named libraries.json with "library definitions", or a Kotlin file, or a Groovy one, ... then the IDE can support it, that's what IDEs do, they support external tools and support their features.
I think that searching for type safety for the sake of type safety is insane. We must aim for usability. What most people want is completion and our sole principle should be to avoid imaginative complex solutions when there are nice existing ones that do not necessitate special IDE support.
That's precisely why I said previously that I didn't want to come with a pattern, or best practice at the moment for the dependency management side of things, because we're introducing lots of new features, and that we may create a "best practices plugin" out of it. But we must really think about most of our user base, when they would read this:
To add a dependency on junit, do this:

open buildSrc/Libraries.kt and add an entry lateinit val junit: Library
open your build script and add, if it's not there, the libraries extension in scope (project.extensions.create("libraries", Libraries::class.java)
add a library for junit in the libraries section junit = Library("....")
and now you can use it as a dependency in your dependencies block (implementation (libraries.junit))

And we're not even talking about adding constraints, version preferences or causes for dependencies!
No, I really think what most people want is just a file which lists all the libraries they use with their version, and they want that to be autocompleted. Or they want the entry to be added automatically if they declare a dependency on something which is not yet there in the dependencies block. Especially on this topic, there are tons of folks that just don't understand that we cannot have a single flat list of "dependencies" (not even talking about scopes/configurations). Let's just not forget about them.

Can we seriously propose to a new user to create a file in buildSrc/ that pre-declares a variable name, then initialize it in a build script?

I understood we were talking about how to re-organize our existing build logic to take advantage of the goodness static typing can bring.

Note that I'm saying this because I'm also sometimes tempted, when playing with Kotlin, to introduce an inline function here, an extension there, because oh look how nice it is then, but realize that what I'm doing is no longer trying to build my app, like 99% of our users would do, I'm just taking pleasure learning a new language.

I could also imagine a nice convenient plugin that contains constants for all widely-used dependencies on jcenter...

We spiked something like that for the Plugin Portal some time ago: https://github.com/gradle/kotlin-dsl/issues/185#issuecomment-265726472

I think it is very important that we agree on what our own build should demonstrate and provide to our engineers. I think our build should demonstrate how a complex build can be in a well-modeled end state, is straightforward to understand and is easy to use by developers. It should be a reference project for complex enterprise builds. That is where we need to provide more guidance. We want to provide helpful patterns for people dealing with complex build problems. People who write their first hello world Gradle build are much better served with our extensive samples and introductory documentation.
The Gradle build serves first and foremost the needs of its users. So when you say It is super nice to show that you can autocomplete dependencies and have completion. I would agree. But much more important is that it is super nice to have completion of our dependencies.
I can not see much difference in terms of comprehensibility between putting configuration into scripts in the gradle/gradle directory or at a certain location in buildSrc. The big difference is that in one case it requires a complete recompile of the buildSrc code base, which is a cost we don't want to incur for things that frequently change.
I don't have a strong opinion on how we want to model our default dependencies except that we definitely want to have code completion support for them.

One solution I discussed with @ljacomet two weeks ago is to only define the library coordinates in buildSrc. Then it's like a convenient collection of names you use for auto-complete.
But the versions and reasons are defined in the build scripts (probably distributions-dependencies.gradle.kts).
Can we agree on this as a compromise for the next step (does not need to be the final solution)?
I can do that, but I will only do it if we also gonna merge it. So much files were replaced and moved by now, that I basically have to start this over.

@jjohannes the native team should be taking up some of the build improvements this week.  I would hold off and we can come up with the next step.


Fix indent checking script on Travis

Closes #73

I'm thoroughly confused.
I followed the instructions for running a Travis Docker instance locally and this does work there.
Additionally, this did work before (see https://travis-ci.org/exercism/xc/builds/157757693). Comparing the previous failure and a recent non-failure there appear to be no differences between the Travis image or the worker.
So... any ideas?

Wow, that's odd. When I switched the check to git diff-index --quiet HEAD it worked fine every time (without the repeated call to git diff).
As for why it doesn't work, I don't really know. It's not a race condition (using sleep instead of the extra git diff doesn't help, and it will fail even if the tree is dirty before verify-indent is run). It's not specific to those particular files either. And most confusingly the original version works sometimes but not all the time. Just call bin/verify-indent several times repeatedly and it'll work randomly.
So yea, I have no idea either.

@patricksjackson I tried your simpler solution, but it identifies a failure even when there are no changed files. Although I hate the current hacky solution, I'm not sure how to proceed toward a simpler solution, particularly when I don't know of a way to consistently reproduce the issue locally.

@patricksjackson @palisaide are you guys okay with this change?

Well, I don't really like it, but it seems to work.
I say add a short comment in the script to explain why they're both there just in case some future contributor forgets to look at the history. After that I'm ok to merge it.

@patricksjackson I added a comment

LGTM

Updated with latest master


[SPARK-50069][SQL] Integrate _LEGACY_ERROR_TEMP_0028 into UNSUPPORTED_FROM_TO_EXPRESSION

What changes were proposed in this pull request?

This PR proposes to Integrate _LEGACY_ERROR_TEMP_0028 into UNSUPPORTED_FROM_TO_EXPRESSION
Why are the changes needed?

To improve the error message by assigning proper error condition and SQLSTATE
Does this PR introduce any user-facing change?

No, only user-facing error message improved
How was this patch tested?

Updated the existing tests
Was this patch authored or co-authored using generative AI tooling?

No

+1, LGTM. Merging to master.
Thank you, @itholic.

Thanks @MaxGekk for the review


feat(bluetooth_monitor): run bluetooth monitor with new parameter

Signed-off-by: ito-san<EMAIL_ADDRESS>Description
Run bluetooth monitor with new parameters given without restarting l2ping daemon.
Related links
https://github.com/autowarefoundation/autoware.universe/issues/1110
Tests performed

Run l2ping_service and bluetooth_monitor.
./build/bluetooth_monitor/l2ping_service
ros2 launch bluetooth_monitor bluetooth_monitor.launch.xml

Change parameter such as rtt_warning from 0.00 to 30.00(ms).
bluetooth_monitor.param.yaml

/**:
  ros__parameters:
    port: 7640
    timeout: 5
    rtt_warn: 30.00
    addresses: ["82:82:AB:56:32:98"]

Observe RTT warning is reported.

Notes for reviewers

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.
[ ] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@ito-san Could you fix build-and-test-differential failure on humble?

@ito-san Could you fix build-and-test-differential failure on humble?

@h-ohta Fixed in https://github.com/autowarefoundation/autoware.universe/pull/1111/commits/86080e512264d179443be5f90a8c67149fc0188f.


Added new chapter on cryptographic testing

I wrote a new chapter about cryptographic testing and tool that showcase how to detect common mistakes.

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

Thank you! ❤


fix(config):env string split

replace strings.Split with strings.SplitN in config.SplitEnvVar, to keep html.
Environment Variable with html could be cut by '=' in original config.SplitEnvVar.
thanks.
fix issure #8589

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


Link in help command is not linked to the correct User Guide

The link brought up by the help command goes to the AB3 User Guide rather than our user guide

Same issue as #191. I will close this

Duplicate of #191


Does this software return anything back to the server?

Hi,
I can see there is clientId in data.py line 315 identifying the client. I was wondering if this software sending anything back to the server. For example, if I have two accounts with the same website (server). Is there any way the website (server) knows that both accounts are using the same TOTP app? I guess the answer is no, because I couldn't see an URI anywhere returning data to a server. I just wanted to confirm. Thank you very much!

This software does not communicate with any server. The clientID is the name that you give to a TOTP/HOTP code generator. It is just a user-friendly name that you make up.
The website will have know way of knowing what software or computer is generating the passcodes at all, much less whether the same software instance is generating codes for two accounts authenticated by that website.
I have many Google accounts; each has their own one-time password secret key, each designated by a sufficiently unique client Id that I use to distinguish them. Google doesn't know if I'm using this Authenticator package on my laptop or Google Authenticator on my phone.
So I think you won't get caught this way. :-)

Thank you, @JeNeSuisPasDave ! I appreciate it.


ChainInfo to include minimum recommended MasterCopy version

In order to provide information for the clients whether a safe is "Up to date" we need to know which is the version of the master copy that, as a minimum, is recommended.
This information can change from chain to chain, therefore we would like to have a field that specifies the version in the ChainInfo object.
ChainInfo {
  "minMasterCopyVersion" : "<semver-str>"
}

Maybe minImplementationVersion would be more appropriate? Doesn't matter to much, as this isn't exposed to the clients anyway.
We should probably implement this first: https://github.com/gnosis/safe-client-gateway/issues/451 in the CGW, so that we can hide the version an expose just the enum.

@jpalvarezl So this field would represent the minimum recommended version right?
If we have two recommended versions we only set the lowest on this field. This is just to consider the field name (if it could be recommendedMasterCopyVersion)


Use every method instead of some

https://github.com/LauraBeatris/use-selected-items-hook/blob/e666f2309b4d8d19f90ff99a79e008fb9279e766/src/index.ts#L69

[x] Use every method to ensure that every item has a valid item identifier

dc4ba4cde1deb0015b23d33b5b5b6db9b4ce0f21


Unconditional max_methods=1

@ChrisRackauckas no fear
max_methods=1 can't hurt you if you're pure of heart type stable.

Well, it doesn't seem to help either.
PR:
julia> @time @eval function AmulB!(C,A,B)
           @turbo for n ∈ indices((C,B),2), m ∈ indices((C,A),1)
               Cmn = zero(eltype(C))
               for k ∈ indices((A,B),(2,1))
                   Cmn += A[m,k] * B[k,n]
               end
               C[m,n] = Cmn
           end
       end
  0.023787 seconds (4.70 k allocations: 271.455 KiB, 76.64% compilation time)
AmulB! (generic function with 1 method)

julia> M = K = N = 71; A = rand(M,K); B = rand(K,N); C1 = A*B; C0 = zero(C1);

julia> @time @eval AmulB!(C0, A, B);
  2.113024 seconds (4.32 M allocations: 261.378 MiB, 3.93% gc time, 99.99% compilation time)

Latest release:
julia> @time @eval function AmulB!(C,A,B)
           @turbo for n ∈ indices((C,B),2), m ∈ indices((C,A),1)
               Cmn = zero(eltype(C))
               for k ∈ indices((A,B),(2,1))
                   Cmn += A[m,k] * B[k,n]
               end
               C[m,n] = Cmn
           end
       end
  0.024604 seconds (4.70 k allocations: 271.307 KiB, 76.93% compilation time)
AmulB! (generic function with 1 method)

julia> M = K = N = 71; A = rand(M,K); B = rand(K,N); C1 = A*B; C0 = zero(C1);

julia> @time @eval AmulB!(C0, A, B);
  2.093600 seconds (4.30 M allocations: 260.192 MiB, 4.07% gc time, 99.99% compilation time)

Of course, there is a ton of type unstable code in LV to process expressions.
Maybe I should merge this anyway as a symbolic gesture.

I was wondering if it could effect compilation downstream though when it's being hit behind a function barrier (due to the autoswitch solvers). That's really tedious to test though.

Of course, there is a ton of type unstable code in LV to process expressions.

Which is why I was thinking this may help.

I was wondering if it could effect compilation downstream though when it's being hit behind a function barrier (due to the autoswitch solvers). That's really tedious to test though.

I'm going to @descend through the calls in OrdinaryDiffEq's precompile statements and see if I run into instabilities.

I'm going to @descend through the calls in OrdinaryDiffEq's precompile statements and see if I run into instabilities.

I run into type instabilities immediately.

There should be some due to the auto-switch, which does manual branching in order to get around the way it would dispatch, but I'm not sure it gives good precompilation.

Even without autoswitch


The Markdown front matter field "id" in the index.md file under the category is ignored

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[X] I have tried the npm run clear or yarn clear command.
[X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[X] I have tried creating a repro with https://new.docusaurus.io.
[x] I have read the console error message carefully (if applicable).

Description
I have the following directory:
docs
  file1.md         -> id: file1         -> /docs/file1
  文件2.md          -> id: file2         -> /docs/file2
  dir1             -> id: dir1          -> /docs/dir1
    file11.md      -> id: file11        -> /docs/dir1/file11
    文件12.md       -> id: file12        -> /docs/dir1/file12
  目录2             -> id: dir2          -> /docs/目录2
    file21.md      -> id: file21        -> /docs/目录2/file21
    文件22.md       -> id: file22        -> /docs/目录2/file22

How should I specify the url pathname of "目录2"?
Reproducible demo
ttps://codesandbox.io/p/devbox/friendly-bash-c7hrzn
Steps to reproduce
In any directory, create an index.md file and use id to set the pathname:
---
id: dir2
---

Expected behavior
The generated pathname is the id field value in the index.md file.
Actual behavior
The generated path pathname is the directory name.
Your environment

Public source code:
Public site URL:
Docusaurus version used: 3.3.2
Environment name and version (e.g. Chrome 89, Node.js 16.4):
Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

[ ] I'd be willing to fix this bug myself.

use id to set the pathname

This is not how you customize the pathname of a doc. We have the slug front matter for that
https://docusaurus.io/docs/next/create-doc#doc-urls

Expected: The generated pathname is the id field value in the index.md file.

This is not the expected behavior

Actual: The generated path pathname is the directory name.

This is the expected behavior

The problem with slug is that it needs to be configured as an absolute path pattern in every *.md file under 目录2 (the relative path pattern cannot specify the url path name of 目录2).
When there are many *.md files under 目录2, this solution is unmaintainable. For example:
docs/目录2/index.md
---
slug: /dir2
---

docs/目录2/file21.md
---
slug: /dir2/file21
---

docs/目录2/file22.md
---
slug: /dir2/file22
---

How can I make every *.md file under 目录2 automatically add the dir2 prefix?

You could use the Markdown parseFrontMatter hook to dynamically generate the slug front matter based on file path. This enables you to create your own conventions


New BatchSchema class to generate patch selectors and combine into batch selectors

Description of proposed changes
This PR is a major overhaul of xbatcher’s internals. Users should not notice any external changes, apart from bug fixes and some performance differences.
New BatchSchema class
In v0.2.0, information about the batch_selectors was stored as a dict in the ._batch_selectors attribute of the BatchGenerator class. This PR introduces BatchSchema which contains all necessary information about the batch selectors. BatchGenerator now creates an instance of  BatchSchema, which handles the creation of selectors object. The purpose of BatchGenerator is to create batches (xarray Datasets/DataArrays) from those selector objects. This opens up possibilities including serializing/deserializing the BatchSchema (e.g., BatchSchema.to_json() and BatchSchema.from_json()), caching BatchSchema objects separate from caching batches, and relatedly applying one BatchSchema instance to multiple xarray datasets.
The representation of the batch selectors (BatchSchema.selectors) is the same regardless of whether concat_input_dimsis True or False(in contrast to v0.2.0 where the type varied based on that parameter). The selectors object is still a dict with keys representing the batch index and values representing the batch selector. The batch selector is a list of dicts, where the keys are the dimensions included in batch_dims and/or input_dims and the values are slices used to index the xarray dataset/dataarray. It’s simplest to refer to the subset of data created by each of these dictionaries as a patch. If concat_input_dims is False, each list has length 1 (i.e., 1 patch per batch). If concat_input_dims is True, the lists can contain multiple patches, which will be concatenated to form a batch by the generator.
Bug fixes
Handling batch_dims (#131, #121)
As explained https://github.com/xarray-contrib/xbatcher/issues/121#issuecomment-1301331750, this issue stemmed from information about the batch_dims indices not being stored in the selectors object. After this PR, each patch contains information about all dims that are indexed on (i.e., any dim included in input_dims or batch_dims). Those patches are then combined into batches based on the number of items in the list for each batch selector.
Handling of overlapping samples
In v.2.0, the batch_dims  were sliced first and subsequently index_dims were sliced. This had the consequence of missing away any patch that overlapped two batches. Now, the smallest patches created by the combination of batch_dims and input_dims are defined first and these are then combined into batches based on the starting index (see simple example below).

Performance changes
Running the benchmarks from https://github.com/xarray-contrib/xbatcher/pull/140 on main, 4d8e2c84a2d405e237f60f1df5286dd766e06ff0, and this PR revealed a mix of performance increases and decreases. Based on a quick investigation, I think that the regressions mostly relate to loading each batch individually, whereas before this PR if a dimension was included in batch_dims and input_dims, the data associated with the slice from batch_dims would be loaded even if concat_input_dims was False and that slice shouldn’t matter. Since loading more data improves performance, those benchmarks are now slower. Also, the handling of overlapping samples means there are more patches which will impact performance. In contrast, the benchmarks affected by #121 are now much faster.
$ asv continuous main batch-dims-bug
before           after         ratio
     [c0dd0029]       [9d0fcb05]
     <main>           <batch-dims-bug>
+     2.59±0.05ms       21.9±0.2ms     8.47  benchmarks.Generator.time_batch_preload(True)
+      82.9±0.4μs        112±0.5μs     1.35  benchmarks.TorchLoader.time_iterable_dataset
+      85.8±0.4μs        114±0.4μs     1.33  benchmarks.TorchLoader.time_map_dataset
+     16.6±0.05ms       19.3±0.2ms     1.16  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {}, {'x': 2})
+     10.4±0.08ms      12.0±0.07ms     1.16  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {}, {})
+        5.77±0ms      6.65±0.04ms     1.15  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {}, {'x': 1})
+      63.9±0.7ms      73.4±0.08ms     1.15  benchmarks.Accessor.time_accessor_input_dim({'x': 2, 'y': 2})
+      32.1±0.1ms      36.9±0.07ms     1.15  benchmarks.Accessor.time_accessor_input_dim({'x': 4, 'y': 2})
+     6.36±0.05ms      7.29±0.07ms     1.15  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {}, {'x': 2})
+     5.25±0.01ms      6.01±0.01ms     1.14  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {}, {})
+     10.4±0.07ms      11.9±0.07ms     1.14  benchmarks.Generator.time_batch_concat({'x': 5, 'y': 5}, False)
+     12.6±0.06ms       14.3±0.1ms     1.14  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {}, {'x': 1})
-     18.8±0.08ms      7.32±0.02ms     0.39  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {'x': 30}, {'x': 2})
-      49.9±0.3ms      19.1±0.06ms     0.38  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {'x': 30}, {'x': 2})
-     31.4±0.09ms      12.1±0.09ms     0.38  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {'x': 30}, {})
-     15.8±0.04ms       6.05±0.1ms     0.38  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {'x': 30}, {})
-     17.3±0.07ms      6.58±0.04ms     0.38  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {'x': 30}, {'x': 1})
-      37.7±0.1ms       14.4±0.1ms     0.38  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {'x': 30}, {'x': 1})
-      32.9±0.2ms      11.3±0.04ms     0.34  benchmarks.Generator.time_batch_input({'x': 5}, {'x': 30}, {'x': 1})
-      43.9±0.2ms      15.1±0.02ms     0.34  benchmarks.Generator.time_batch_input({'x': 5}, {'x': 30}, {'x': 2})
-     27.4±0.03ms      9.38±0.03ms     0.34  benchmarks.Generator.time_batch_input({'x': 5}, {'x': 30}, {})
-     13.8±0.04ms      4.70±0.03ms     0.34  benchmarks.Generator.time_batch_input({'x': 10}, {'x': 30}, {})
-     15.2±0.04ms      5.19±0.02ms     0.34  benchmarks.Generator.time_batch_input({'x': 10}, {'x': 30}, {'x': 1})
-     16.6±0.07ms      5.67±0.02ms     0.34  benchmarks.Generator.time_batch_input({'x': 10}, {'x': 30}, {'x': 2})
-     26.1±0.07ms      6.14±0.04ms     0.23  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {'x': 20}, {})
-      31.5±0.4ms      7.32±0.06ms     0.23  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {'x': 20}, {'x': 2})
-      62.6±0.2ms      14.5±0.07ms     0.23  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {'x': 20}, {'x': 1})
-     28.8±0.04ms      6.66±0.03ms     0.23  benchmarks.Generator.time_batch_input({'x': 10, 'y': 5}, {'x': 20}, {'x': 1})
-      83.6±0.3ms       19.2±0.1ms     0.23  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {'x': 20}, {'x': 2})
-      52.4±0.3ms       12.0±0.1ms     0.23  benchmarks.Generator.time_batch_input({'x': 5, 'y': 5}, {'x': 20}, {})
-      25.2±0.4ms      5.25±0.03ms     0.21  benchmarks.Generator.time_batch_input({'x': 10}, {'x': 20}, {'x': 1})
-      72.6±0.6ms       15.1±0.1ms     0.21  benchmarks.Generator.time_batch_input({'x': 5}, {'x': 20}, {'x': 2})
-      27.7±0.1ms      5.69±0.03ms     0.21  benchmarks.Generator.time_batch_input({'x': 10}, {'x': 20}, {'x': 2})
-      45.7±0.5ms      9.37±0.08ms     0.20  benchmarks.Generator.time_batch_input({'x': 5}, {'x': 20}, {})
-      55.2±0.2ms      11.3±0.03ms     0.20  benchmarks.Generator.time_batch_input({'x': 5}, {'x': 20}, {'x': 1})
-     23.2±0.04ms      4.69±0.02ms     0.20  benchmarks.Generator.time_batch_input({'x': 10}, {'x': 20}, {})
-         676±3ms        130±0.5ms     0.19  benchmarks.Generator.time_batch_concat_4d({'x': 5}, {'x': 10, 'y': 10}, True)
-       135±0.5ms      25.9±0.09ms     0.19  benchmarks.Generator.time_batch_concat_4d({'x': 5}, {'x': 10}, True)
-         1.50±0s        166±0.3ms     0.11  benchmarks.Generator.time_batch_concat_4d({'x': 5, 'y': 5}, {'x': 10}, True)
-       120±0.6ms       12.5±0.1ms     0.10  benchmarks.Generator.time_batch_concat_4d({'x': 5}, {'x': 10}, False)
-         1.02±0s        105±0.4ms     0.10  benchmarks.Generator.time_batch_concat_4d({'x': 5, 'y': 5}, {'x': 10}, False)
-         598±4ms       61.0±0.1ms     0.10  benchmarks.Generator.time_batch_concat_4d({'x': 5}, {'x': 10, 'y': 10}, False)
-      7.57±0.03s        224±0.4ms     0.03  benchmarks.Generator.time_batch_concat_4d({'x': 5, 'y': 5}, {'x': 10, 'y': 10}, True)
-      5.07±0.02s        104±0.5ms     0.02  benchmarks.Generator.time_batch_concat_4d({'x': 5, 'y': 5}, {'x': 10, 'y': 10}, False)

SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.

PERFORMANCE DECREASED.

To-Do:

[x] Cherry pick commits not exclusively related to bug into one or more seperate PRs (https://github.com/xarray-contrib/xbatcher/pull/133)
[x] Fix MyPy errors
[x] Improve concat_input_dims implementation
[x] Support dims being included in both batch_dims and input_dims
[x] Resolve test that fails due to preload_batch being ignored
[x] Examine benchmarks

Note - One test fails (marked with xfail) due to https://github.com/xarray-contrib/xbatcher/issues/126 which will be addressed separately

Fixes #131
Fixes #121
Fixes #30

Codecov Report

Merging #132 (3b33988) into main (c0dd002) will decrease coverage by 1.56%.
The diff coverage is 92.06%.

@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
- Coverage   98.37%   96.80%   -1.57%
==========================================
  Files           6        6
  Lines         246      282      +36
  Branches       49       58       +9
==========================================
+ Hits          242      273      +31
- Misses          4        6       +2
- Partials        0        3       +3

Impacted Files
Coverage Δ

xbatcher/generators.py
95.90% <92.06%> (-4.10%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jhamman this xbatcher refactor that we discussed over many meetings is now complete. It would be fantastic to hear any thoughts on the PR, but I also recognize that you are busy and on your own time now. Thanks for your brainstorming on these issues!

@maxrjones, this looks great overall! i really like the graphics in https://github.com/xarray-contrib/xbatcher/pull/132#issue-1473258637. Having some of these graphics included in the docs would be awesome!


[App]: Images not showing on panels with more than one image

Current Behavior
I log image to wandb. By default there is a panel created for every unique image name. This works fine and I can see all images that I've logged.
The issue arises when I want to visualize them in a single panel side-by-side. Suddenly I get a message as if there were no images logged under a given name.
But if I remove the other image names from the panel and leave only a single one, then it appears again.
Expected Behavior
I want to be able to add more images in a single panel.
Steps To Reproduce
No response
Screenshots
No issue when only a single image is in the panel:

When adding another image, suddenly it appears as if the original image weren't there:

Environment
OS: Ubuntu
Browsers: Chrome
Version:
Additional Context
No response

Hey @janpisl - could you provide a sample code snippet for how you are logging these images?

Sure, here is my entire pl.LightningModule + how I use it in a pl.Trainer. The logging happens in on_train_epoch_end()
`class CoffeeSegmenter(pl.LightningModule):
def init(self, model, ignore_index=-1):
super().init()
    self.model = model
    self.ignore_index = ignore_index

    self.IoU = BinaryJaccardIndex(ignore_index=self.ignore_index)

    #This is following the pl API.
    self.images_to_log = {
        'image' : {
            'train' : None,
            'val' : None
        },
        'target' : {
            'train' : None,
            'val' : None
        },
        'prediction' : {
            'train' : None,
            'val' : None
        }
    }

def training_step(self, batch, batch_idx):
    x, y = batch

    y_hat = self.model(x)
    loss = masked_BCE(y_hat, y, self.ignore_index)
    preds = torch.sigmoid(y_hat)

    self.log("train_loss", loss)
    wandb.log({"train_loss": loss})

    self.images_to_log['image']['train'] = get_normalized_image(x[0, 1:4].cpu().numpy().transpose(1,2,0))
    self.images_to_log['target']['train'] = y[0]
    self.images_to_log['prediction']['train'] = preds[0]

    log_dict = {"train_loss": loss}

    return {"loss": loss, "log": log_dict}

def _shared_eval_step(self, batch, batch_idx, dataset_name):
    x, y = batch
    y_hat = self.model(x)

    loss = masked_BCE(y_hat, y, self.ignore_index)
    preds = torch.sigmoid(y_hat)

    idx_img_to_log = random.randint(0,y.shape[0]-1) #Randomly pick one sample from the batch
    if len(np.unique(y[idx_img_to_log].cpu().numpy())) == 3: #Ensure it's positive because at the end of the batch i have a lot of negative examples and that's not informative
        self.images_to_log['image'][dataset_name] = get_normalized_image(x[idx_img_to_log, 1:4].cpu().numpy().transpose(1,2,0))
        self.images_to_log['target'][dataset_name] = y[idx_img_to_log]
        self.images_to_log['prediction'][dataset_name] = preds[idx_img_to_log]

    iou = self.IoU(preds, y.int())

    self.log(f"{dataset_name}_loss", loss)
    self.log(f"{dataset_name}_iou", iou)

    return loss, iou

def validation_step(self, batch, batch_idx):

    loss, iou = self._shared_eval_step(batch, batch_idx, 'val')

    log_dict = {'val_loss' : loss}
    return {"val_loss": loss, "log": log_dict, "val_iou": iou}

def on_train_epoch_end(self):

    # After each epoch, log val and train triplets of image-target-prediction
    # This should be called after validation according to:
    #https://lightning.ai/docs/pytorch/stable/common/lightning_module.html#hooks

    for key, value in self.images_to_log['image'].items():
        wandb.log({
        f"{key}_image" :
            wandb.Image(
                value,
                mode='RGB'
                )}),

        self.images_to_log['image'][key] = None #Set to None to make sure i don't log the same again

    for _key in ['target', 'prediction']:

        for key, value in self.images_to_log[_key].items():
            wandb.log({
            f"{key}_{_key}":
                wandb.Image(
                    value,
                    mode='L'
                    )}),
            self.images_to_log[_key][key] = None

wandb_logger = WandbLogger(project="Deforestino_v2")
pl.seed_everything(420)
deeplab = smp.DeepLabV3Plus(
#encoder_name="resnet34",
encoder_weights="imagenet",
in_channels=13,
classes=1,
)
coffee_segmenter = CoffeeSegmenter(deeplab)
datamodule = DeforestinoDataModule(
config=config
)
trainer = pl.Trainer(max_epochs=5,
logger=wandb_logger,
fast_dev_run=False,
#log_every_n_steps=5
)
trainer.fit(model=coffee_segmenter, datamodule=datamodule)
wandb.finish()
`

hey @janpisl - given the script you sent over, this behavior is expected. we only support viewing side-by-side images if you log these images at the same time (and in your script, you are doing so in different places). an example of 'logging these images at the same time' would be something like the following:
wandb.log({"taco": wandb.Image('taco.jpeg'), 'tree': wandb.Image('tree.jpeg')})
here's a run that shows the above example of side-by-side images

Hi @janpisl, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!


Use voluptuous for Netatmo cameras

Description:
Migration of the configuration check to voluptuous.
Related issue (if applicable): fixes 127528299
Example entry for configuration.yaml (if applicable):
camera:
  - platform: netatmo
    home: home_name
    cameras:
      - camera_name1
      - camera_name2
  - platform: bloomsky

Did you intend to add voluptuous to the bloomsky cameras? Cause it's not.

The Bloomsky platform only contains a couple of minor changes.


Not possible to disable IPv6 VXLAN

Expected Behavior
When upgrading from Calico 3.22 to 3.23 (7dbb81af0c4292db09abf8a416f597e6487fb1b8), ipv6 vxlan should not be enabled by default, or if it is, there should be a way to disable it.
Current Behavior
On upgrading to Calico 3.23 and above, Calico fails to setup IPv6 VXLAN with the following messages:
2022-09-06 17:17:54.882 [INFO][43] felix/route_table.go 1159: Failed to access interface because it doesn't exist. error=Link not found ifaceName="vxlan-v6.calico" ifaceRegex="^vxlan-v6.calico$" ipVersion=0x6 tableIndex=0
2022-09-06 17:17:54.882 [INFO][43] felix/route_table.go 1227: Failed to get interface; it's down/gone. error=Link not found ifaceName="vxlan-v6.calico" ifaceRegex="^vxlan-v6.calico$" ipVersion=0x6 tableIndex=0
2022-09-06 17:17:54.882 [ERROR][43] felix/route_table.go 994: Failed to get link attributes error=interface not present ifaceRegex="^vxlan-v6.calico$" ipVersion=0x6 tableIndex=0
2022-09-06 17:17:54.882 [INFO][43] felix/route_table.go 587: Interface missing, will retry if it appears. ifaceName="vxlan-v6.calico" ifaceRegex="^vxlan-v6.calico$" ipVersion=0x6 tableIndex=0

However, no IPv6 pools were configured with IPv6 VXLAN encapsulation. Furthermore it is not possible to disable IPv6 encapsulation, as removing vxlanEnabled from the default FelixConfiguration, leads to IPv4 VXLAN encapsulation being broken. This is contrary to the documentation which states this about vxlanEnabled:
Optional, you shouldn’t need to change this setting as Felix calculates if VXLAN should be enabled based on the existing IP Pools. When set, this overrides whether Felix should create the VXLAN tunnel device for VXLAN networking.

Possible Solutions

Decouple vxlanEnabled from vxlan6Enabled
Only have vxlanEnabled be a field to override the ippools to Enabled. Setting it to Never would have no effect if the ippols have vxlanMode enabled. (#6671 explores this idea)
Instead focus on fixing why vxlan-v6.calico interface is having issues

Steps to Reproduce (for bugs)
Configure calico with one ipv4 pool with vxlan encapsulation, and an ipv6 ippool without.

Interesting. The intended behavior here was that you could eventually delete the vxlanEnabled field from FelixConfiguration because Felix would detect this from the v4 pools instead.
Removing the field from the deafault felixconfig shouldn't break v4 VXLAN, so I'm currently thinking that is the primary bug here.
I thought we also agreed vxlanEnabled would be v4 only and shouldn't impact v6 enablement at all... but maybe I'm misremembering. @coutinhop do you recall?

@muff1nman what do your IP pools look like? I just wanted to better understand the issue you're having, as in my understanding, this should work:

removing vxlanEnabled from FelixConfig entirely
have vxlanMode set to 'Always' or 'CrossSubnet' in at least one v4 IP pool
have vxlanMode set to 'Never' on any and every v6 IP pool

When you say IIPv4 VXLAN is broken if you remove 'vxlanEnabled' from FelixConfig, what exactly is happening?

@caseydavenport Yes I remember we did talk about decoupling the 'vxlanEnabled' FelixConfig from IPv6 (with the reasoning being that it does not need any kind of override or backwards compatibility). I'm sorry I got side tracked and ended up not doing that yet. I'll try to make sure with @muff1nman that doing that would solve this issue.

Here is the working 3.22.x resources with a couple redactions:
apiVersion: v1
items:
- apiVersion: crd.projectcalico.org/v1
  kind: FelixConfiguration
  metadata:
    generation: 4
    name: default
  spec:
    bpfLogLevel: ""
    logSeverityScreen: Info
    reportingInterval: 0s
    vxlanEnabled: true
- apiVersion: crd.projectcalico.org/v1
  kind: IPPool
  metadata:
    name: k8s-ipv6
  spec:
    blockSize: 122
    cidr: foo:bar::/64
    disabled: false
    ipipMode: Never
    natOutgoing: false
    nodeSelector: all()
- apiVersion: crd.projectcalico.org/v1
  kind: IPPool
  metadata:
    generation: 1
    name: k8s-shared-ipv4
  spec:
    blockSize: 26
    cidr: <IP_ADDRESS>/16
    disabled: false
    natOutgoing: true
    nodeSelector: all()
    vxlanMode: Always
kind: List
metadata:
  resourceVersion: ""

The following was done to attempt to turn off ipv6 vxlan (i.e. deleted the vxlanEnabled field):
kubectl edit felixconfiguration default --output-patch
Patch: {"spec":{"vxlanEnabled":null}}
felixconfiguration.crd.projectcalico.org/default edited

This resulted in all of the ipv4 vxlan being disabled (interfaces removed).

Actually I'm realizing an additional complication. The change for the felixconfiguration was done when calico-node was still 3.22.x. Because I wasn't able to upgrade calico-node to 3.23.x due to vxlan-v6 causing problems, the idea was to drop that field first with calico 3.22.x and then upgrade. That might not be possible with a lot of the recent changes in this area missing on the 3.22 branch? So potentially I might need to try backporting some of these changes to 3.22?

Yes I remember we did talk about decoupling the 'vxlanEnabled' FelixConfig from IPv6 (with the reasoning being that it does not need any kind of override or backwards compatibility

I think that would be awesome.

@muff1nman the changes that make Felix use IP pools to determine encapsulation and add IPv6 VXLAN support went into calico v3.23. Prior to that, enabling say VXLAN in an IP pool would add 'vxlanEnabled' to the default FelixConfig (but disabling it wouldn't remove it).
So I think the best way to proceed with a v3.22 -> v3.23 upgrade is to have VXLAN enabled in the IP pool, then upgrade, then remove it from FelixConfig... Could you try that and let me know if it works?

a v3.22 -> v3.23 upgrade is to have VXLAN enabled in the IP pool, then upgrade

@coutinhop  That was the initial attempt, but the new calico-node was not coming up correctly with the errors mentioned in the description


Added config, wordlist and documentation for spelling

This patch sets up automatic spelling checking for django CMS's documentation.
Usage is explained in the included documentation.
Travis will now also check spelling on pull requests!

Coverage remained the same at 29.137% when pulling e19d3c15ee0e272539213ad69be7ff68dedaccc2 on evildmp:docs-spelling into eba79b8ed418098e51a10d8ec02fcd5bf80d66e7 on divio:develop.

Coverage remained the same at 29.137% when pulling 6a5aa116690acd5db4c7683c25154d16a9ff6bc6 on evildmp:docs-spelling into eba79b8ed418098e51a10d8ec02fcd5bf80d66e7 on divio:develop.

Coverage remained the same at 29.137% when pulling 6a5aa116690acd5db4c7683c25154d16a9ff6bc6 on evildmp:docs-spelling into eba79b8ed418098e51a10d8ec02fcd5bf80d66e7 on divio:develop.

Coverage remained the same at 29.137% when pulling e19d3c15ee0e272539213ad69be7ff68dedaccc2 on evildmp:docs-spelling into eba79b8ed418098e51a10d8ec02fcd5bf80d66e7 on divio:develop.

Coverage remained the same at 29.137% when pulling 6a5aa116690acd5db4c7683c25154d16a9ff6bc6 on evildmp:docs-spelling into eba79b8ed418098e51a10d8ec02fcd5bf80d66e7 on divio:develop.


line break is not being maintained

If the text contains some kind of line break (\n,  or other block-level element), it is not being maintained, and we are ending up with a text in only one line.

Correct, those are currently not handled.
I will let you know when I have progressed on that, might be this weekend.

Landed and available in v2.
Please note that for consistency only
 tags trigger newlines and you might need to map your plain text source from \n to
.


Calling method in constructor in current class gives runtime error (is not a function)

Bug: when calling a method in the constructor, Typescript won't complain but gives it gives runtime error
TypeScript Version:  2.1, current playground (dunno which version)
Code
class MyArray<T> extends Array<T> {
    constructor(items: T[]) {
        super();
        // runtime error
        this.addRange(items);
    }

    public addRange(items: T[]) {
        if (items && items.length) {
            for (const item of items) {
                this.push(item);
            }
        }
    }
}

var items: string[] = [];
items.push("a");
items.push("b");
var myArray = new MyArray(items)

Expected behavior:
works at runtime OR compile error
Actual behavior:
runtime error:
Uncaught TypeError: _this.addRange is not a function
    at new MyArray (<anonymous>:16:15)
    at <anonymous>:32:15
    at HTMLButtonElement.excuteButton.onclick (https://www.typescriptlang.org/play/playground.js:242)

See playground

Same issue as #15202. This is a limitation of the way that built-ins like Array, Error, etc. function. If your environment supports Object.setPrototypeOf, you can get around this with the following:
class MyArray<T> extends Array<T> {
    constructor(items: T[]) {
        super();
        Object.setPrototypeOf(this, new.target.prototype);

        // Works!
        this.addRange(items);
    }

    public addRange(items: T[]) {
        if (items && items.length) {
            for (const item of items) {
                this.push(item);
            }
        }
    }
}

See https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work for more details.

thanks, I need typescript 2.3 for it? Is the rule (if no support for Object.setPrototypeOf) - never extends build-in types?
PS:
can confirm it works in the playground
thanks!


⚠ Bofrost.at has degraded performance

In bad3560, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1360 ms

Resolved: Bofrost.at performance has improved in bc36a6a after 6 minutes.


Filter engagement listing for team member

Issue #:
https://github.com/bcgov/met-public/issues/1139
Description of changes:

Filter out draft engagements that user is not team member on

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

Codecov Report

Merging #1272 (0ee4693) into main (b0cd9f1) will decrease coverage by 0.03%.
The diff coverage is 68.75%.

@@            Coverage Diff             @@
##             main    #1272      +/-   ##
==========================================
- Coverage   72.41%   72.39%   -0.03%
==========================================
  Files         302      302
  Lines        8400     8429      +29
  Branches      593      593
==========================================
+ Hits         6083     6102      +19
- Misses       2227     2237      +10
  Partials       90       90

Flag
Coverage Δ

metapi
78.51% <68.75%> (-0.10%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

met-api/src/met_api/services/membership_service.py
40.42% <40.00%> (-0.06%)
:arrow_down:

met-api/src/met_api/models/membership.py
80.00% <50.00%> (-4.62%)
:arrow_down:

met-api/src/met_api/models/engagement.py
68.45% <57.14%> (-0.78%)
:arrow_down:

met-api/src/met_api/services/engagement_service.py
69.06% <85.71%> (+1.34%)
:arrow_up:

met-api/src/met_api/resources/engagement.py
68.62% <100.00%> (+0.31%)
:arrow_up:

met-api/src/met_api/utils/roles.py
100.00% <100.00%> (ø)


Allow unnamed modules to access java.util non-opened packages

@bjorncs please review.

@gjoranv Do we want to open more packages for reflection?

Why are we doing this?


fpgabist fails to pass the proper device enumeration for fpgadiag

When running

fpgabist  /opt/intelrtestack/a10_gx_pac_ias_1_2_pv/hw/samples/nlb_mode_3/bin/nlb_mode_3.gbs

fpgadiag will fail read/write/trput tests with

Error: device enumeration failed.

This is because of an improperly formatted command line for fpgadiag.  The current mode is trying to run with '-B 86', but fpgadiag requires '-B 0x86'.
Example:
fpgabist generated command:
fpgadiag -B 86 --mode=read --read-vc=vh0 --write-vc=vh0 --multi-cl=4 --begin=1024, --end=1024 --timeout-sec=5 --cont
Proper command:
fpgadiag -B 0x86 --mode=read --read-vc=vh0 --write-vc=vh0 --multi-cl=4 --begin=1024, --end=1024 --timeout-sec=5 --cont

Closed as fixed.


Additional method for create of Merge Request with squash parameter

Added additional method parameter squash, as in our company we have a case, in which squash = 1, and we do not want to send a second request to update MR

@eutkin
This has been merged and released in 4.8.30.
Thanks again for your contributions.


Patches for Release 1.6

@caisq we notice that gradients_test.py is failing for testWarnings on multiple PRs. Mind cherrypicking a fix to the r1.6 branch?

No objections :)

https://github.com/tensorflow/tensorflow/pull/19189 I think this might do the trick.


SH - Updated CONTRIBUTE guidance

Description

❓What: Updated the CONTRIBUTE guidance
🧠Why?: It was a bit old, and not entirely correct
👨💻How?: Made it reference codespaces, and venvs rather than conda.
Checklist:
Have checked for the following:

[ ] The website still builds correctly, and you can view it using mkdocs serve.
[ ] There are no new "warnings" from mkdocs
[ ] Does your page follow the page template (or here in Markdown)?
[ ] Spelling errors
[ ] Consistent capitalization
[ ] Consistent numbers
[ ] Material features incorrectly implemented: search for code blocks and markers (e.g. !!!).
[ ] Code snippets don't work
[ ] Images not working
[ ] Links not working

Where it was tested

Github Codespaces - 2-core, 4GB RAM, 32GB hard drive
devcontainer.json describes further settings

I didn't do any of the usual checks, but then I haven't edited any of the main files of the website.


Use css position:fixed as dragging method

Currently if drag from a div with overflow:hidden or scroll or auto, the element to be dragged will be trapped inside the div. Using position:fixed for all dragging action will solves the problem.
Not 100% sure if there will be any drawbacks, but at least the examples works and it works fine when I am using the code in my own project.

if you set data-allow-transform="false" dragging will be done with fixed positioning
https://github.com/fatlinesofcode/ngDraggable/blob/master/ngDraggable.js#L240

True, but is there any reason to keep the other way of dragging if fixed:position solves the problem?


style: enforce strict style rules with editorconfig

use editorconfig for describe project format and style rules
check these rules on build using gradle plugin, build fail on violations

Any reason why this is not merged?


release new version for #82

follow up for #83 with right commit message to trigger a breaking version release

In which Charlotte learns a valuable lessen about mergin + semantic release 😎


Represent vectors as binaries

Hey @ankane thank you for this! I just set something up with pgvector and it was seamless!
I have one question:
From the Elixir side can we represent vectors as binaries? It seems the underlying vector type in Postgres is already a binary and so the list conversion is an extra step. Additionally, when using Nx we can avoid the additional overhead of converting a tensor to a list. Tensors internally are represented as binaries.
There are a few drawbacks:

Migration for users who already use the list representation
Consumers of external embedding APIs. Most APIs will return the vector as a list because of the JSON response

If you're open to this, I'm willing to contribute the change

Hi @seanmor5, curious to see what this would look like (if it wouldn't take too long to put together).
Also, just added conversion from Nx tensors in 91e048f2af6787324afbcfaefafcaa9791bb2e47 for Ecto to make things more user-friendly.

Oh, nice discussion!
My suggestion would be for the extension to work only with binaries. That's because binaries are the cheapest representation of vectors in Elixir (they are contiguously allocated compared to lists which are linked lists) and most times we will be able to do zero copy operations with them (since they are ref counted). In a nutshell, encoding would be roughly this:
[<<byte_size(binary)+2::int32, div(byte_size(binary), 4)::uint16, 0::uint16>> | data]

And decoding is:
<<_len::int32, dim::uint16, 0::uint16, bin::binary-size(dim)-unit(32)>> ->
  bin

At this point, zero copying has happened on both writes and reads (actually, it will depend on the value of decode_binary, and it defaults to copy to avoid references to large messages, but it is customizable for those with alrge vectors). And if later we plug them into a tensor, there is also zero copying!
This way, you shouldn't need an Ecto.Type in this extension either, as folks can use binary directly in Ecto today. But if you want better integration with Nx, you could have an EctoNx type (perhaps a parameterized type), where you specify the tensor type like this:
field :foo, EctoNx, type: :f32

And that will:

Load and cast the binary into a tensor with the given type
Dump to a binary

But I think the Nx tensor bits could be build as a separate library, since it is not pgvector specific, in case you don't want to worry!
PS: if you default to binaries, you may have a concern with backwards compatibility. One option is to use init to customize how you want to encode/decode, but perhaps it may be more sensible to ship v0.2 with the new defaults. I would also be very glad to submit PRs here. <3

Thanks @josevalim. As a first step of prototyping this, I ran into an issue with endianness when trying to update this method.
def encode_vector(t) when is_struct(t, Nx.Tensor) do
  dim = Nx.size(t)
  bin = Nx.to_binary(Nx.as_type(t, :f32))
  [<<dim::uint16>>, <<0::uint16>> | bin]
end

Is there a way to serialize and deserialize tensors in big-endian byte order?

Tensors are always in native order (you can find it as System.endianness). So you could do this:
defp f32_to_big(binary) do
  if System.endianness() == :big do
    binary
  else
    for <<n::f32-little <- binary>>, do: <<n::f32-big>>
  end
end

If f32 is not available (those shortcuts are Postgrex conveniences), you can write it as float-32.

Thanks @josevalim, working great!
To all: Added one possible approach to the struct branch. It returns a Vector struct that stores the binary representation internally, and there are to_list and to_tensor methods to convert to either type. Let me know if you have any thoughts or feedback.

@ankane looks great! Some nitpicks:

In theory, you could define Pgvector itself as a struct and skip the additional module

Nitpick on my own code: f32_to_big should probably have been called f32_native_to_big

Nitpick on my own code: we should do for <<n::float-32-little <- bin>>, into: "", do: <<n::float-32-big>>. This makes the output a binary and avoids allocating a linked list. The compiler is also smart enough to know that you are converting to a binary of the same size and do a single and efficient preallocation

For inspect, the convention in Elixir would be Pgvector.new([1, 2, 3, 4]), so inspection is executable (at least whenever possible). So I wonder if we should instead rename vector to new and make it also accept binaries?

So I am now thinking about the benefits of using a custom struct vs binary. A custom struct is easier to identity and allow us to provide further functionality in the future, compared to only using binaries. But it requires an Ecto extension (it should be super simple extension though). The binary is lower level and does not require an Ecto extension. Probably better to go with the struct. :)

Great, all that makes sense to me. Just pushed an update to the struct2 branch and it feels cleaner. Let me know if you have any more thoughts (also, nitpick away - as someone learning Elixir, I'd like to make both the public API and internal code as intuitive / standard as possible).

Looks great! The last final minor nits are:

In the encode function, I think you should expect it to always be a Pgvector and not call Pgvector.new. I believe most (if not all) Postgrex types avoid doing type casting on encoding time. This means your Ecto Type will change too: load/dump are no-ops (they receive and return Pgvectors) and cast can call Pgvector.new (i.e. we typically aim to know which data structures we are passing around and explicit conversions happens on cast and similar)

The binary pattern matching feature in Erlang/Elixir holds references to the original binary. So when you do <<x, y, z::binary>>, the z::binary is a reference to the binary. The benefit is less memory usage, the downside is that the larger binary will only be GCed when all of its parts are GCed. That's why on init we have this:
def init(opts), do: Keyword.get(opts, :decode_binary, :copy)

So on decode - which receives the value from init as argument - you want to do this:
  def decode(:copy) do
    quote do
      <<len::int32(), bin::binary-size(len)>> ->
        bin |> :binary.copy() |> Pgvector.new()
    end
  end

  def decode(_) do
    quote do
      <<len::int32(), bin::binary-size(len)>> ->
        bin |> Pgvector.new()
    end
  end

The default is :copy and I am not sure at the moment how good or bad that it is for vectors. I guess it depends on the size of vectors. If you want to allow that to be customized for pgvector exclusively, you can always add a new option on init:
  def init(opts), do: Keyword.get(opts, :decode_vectors, Keyword.get(opts, :decode_binary, :copy))

And that would allow folks to customize it when defining their own types module. Then I would wrap it up by adding @moduledoc and @doc to the public APIs and run mix format. :)
I will be super glad to answer any other questions.

Hey @josevalim, thanks again (and sorry for the delay)! Pushed another round of updates to the struct3 branch. It should have everything besides the docs and init option. Also, changed the field type from Pgvector.Ecto.Vector to Pgvector for simplicity. Let me know if you have any more thoughts (if you have the time) and will try to get this merged soon.
Also, fwiw, I'm not exactly sure how cast is used (none of the test cases seem affected by it).

@ankane beautiful!
FWIW, I would keep the Ecto module as a separate one (Pgvector.Ecto.Vector was fine IMO) to keep the APIs separate, but I am glad to file it as "bikeshedding" if you prefer to go the route in your PR.
dump is used when going from Schema -> DB. load is DB -> Schema. cast is External -> Schema. If you do from p in Post, where: p.vector == ^something, something will be cast to the type of p.vector. For example, for an integer type, load and dump should be no-op (you get and return integers from the database), but you may want to try to cast a string received as an external parameter (from an HTTP form, for example) to an integer.

Thank you! I have checked it and it looks glorious! :shipit:

Awesome, 0.2.0 is out!

And thanks for the initial suggestion @seanmor5!

This is awesome, thanks @ankane and @josevalim!


Further refinement

Dockerfile.almalinux
Dockerfile.opensuse
Dockerfile.ubuntu

build-selfhosted.sh will pass SDK number
Create symlinks for SDK 7 builds

Dockerfile.opensuse

Add zypper dup

README.md

Remove --squash-all for docker build example

build-files/convert-rpm.sh

Use SDK rather than ARCH

build-selfhosted.sh

Pass ARCH and SDK as arguments

build-files/build-image.sh

Use SDK v ARCH for picking RPMS
Create symlinks for SDK 7

Yes, will fix.
From: Anup Kodlekere @.>
Date: Tuesday, February 6, 2024 at 16:38
To: anup-kodlekere/gaplib @.>
Cc: Neale Ferguson @.>, Author @.>
Subject: Re: [anup-kodlekere/gaplib] Further refinement (PR #7)
@anup-kodlekere commented on this pull request.

In build-files/build-image.shhttps://github.com/anup-kodlekere/gaplib/pull/7#discussion_r1479284137:

@@ -53,13 +53,22 @@ setup_dotnet_sdk() {

 done

 echo "Installing dotnet"

sudo DEBIAN_FRONTEND=noninteractive dpkg --install /tmp/dotnet-*.deb

sudo DEBIAN_FRONTEND=noninteractive dpkg --install /tmp/*.deb
if [ $? -ne 0 ]; then
return 3

fi
sudo rm -f /tmp/dotnet-*.deb

Perhaps this should be sudo rm -f /tmp/*.deb as well?
—
Reply to this email directly, view it on GitHubhttps://github.com/anup-kodlekere/gaplib/pull/7#pullrequestreview-1864377776, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AACLN6VMXNMAHVOUSRTHKFDYSHFUXAVCNFSM6AAAAABC3FQFD6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNRUGM3TONZXGY.
You are receiving this because you authored the thread.Message ID: @.***>


Bump openapi-generator to v7.0.1

I would like to use the generated ToMap function of models (in go) which has been added after v6.2.0
go
openapi-generator:7.0.x introduces breaking changes in the go code.

required go version is bumped from 1.17 to 1.18
I needed to make these adjustments in the oCIS code base:

diff --git a/services/proxy/pkg/user/backend/cs3.go b/services/proxy/pkg/user/backend/cs3.go
index 70cb9cb8a4..aea2d4cebf 100644
--- a/services/proxy/pkg/user/backend/cs3.go
+++ b/services/proxy/pkg/user/backend/cs3.go
@@ -175,7 +175,7 @@ func (c *cs3backend) CreateUserFromClaims(ctx context.Context, claims map[string
                return nil, fmt.Errorf("Error creating user from claims: %w", err)
        }

-       req := lgClient.UsersApi.CreateUser(newctx).User(newUser)
+       req := lgClient.UsersAPI.CreateUser(newctx).User(newUser)

        created, resp, err := req.Execute()
        defer resp.Body.Close()
@@ -202,7 +202,7 @@ func (c *cs3backend) CreateUserFromClaims(ctx context.Context, claims map[string
        // User has been created meanwhile, re-read it to get the user id
        if reread {
                c.logger.Debug().Msg("User already exist, re-reading via libregraph")
-               gureq := lgClient.UserApi.GetUser(newctx, newUser.GetOnPremisesSamAccountName())
+               gureq := lgClient.UserAPI.GetUser(newctx, newUser.GetOnPremisesSamAccountName())
                created, resp, err = gureq.Execute()
                defer resp.Body.Close()
                if err != nil {

That's why I've bumped the openapi-generator-image only to v6.6.0 for go, which already contains the ToMap function I want to use, but doesn't contain the Api -> API renames. The go version is still bumped to 1.18 - do you think that's acceptable?
typescript-axios
I don't think the API changes are breaking (just fancier ways to express types), at least no changes in oC Web are needed.
PHP
Is using 7.0 already and there are no changes except for the version number.
C++/Qt
As we are using our own templates, no changes

That's why I've bumped the openapi-generator-image only to v6.6.0 for go, which already contains the ToMap function I want to use, but doesn't contain the Api -> API renames.

Sure about that? The current state in https://github.com/owncloud/libre-graph-api-go clearly contains those changes.
In general I'd be ok to have those renames. For the benefit of using the latest generator image. It would just require a major version bump for the go module I guess.
@micbar

The problem is that the go module and the spec itself are in lock step :-\


refactor(utilities): Use relative timestamps

I think a much more user-friendly option is to use relative timestamps, it makes more sense to say you can use the command in 5 seconds, or in 6 hours, instead of telling the user that you can use it at 6:42 PM.
On the other hand I'm not sure if this change is to be merged as is, it's meant to start a discussion:

Does the noun until still make any sense here after the change?
Maybe we could add another substitution like {time} or {duration} and keep {until} as is, this will preserve backward compatibility with existing code while giving an option to use this relative notation for those who desires it.
If we go with that, I'd still choose the relative notation to be the default option as it makes more sense.
I would also choose to refactor the default reply message as it kind of feels unprofessional to me.

Off topic but I would also propose for making the ephemeral option be true by default, it's one of the best features of slash commands and as slash commands are meant to reduce user mistakes it also makes sense to spit out rate limit errors and similar in an ephemeral reply rather than contributing to useless bot command spam, at least that's my opinion that all errors and embarrassing mistakes remain an ephemeral reply only sending the actual results to the world. Obviously I can just wrap the guard into a custom function and set it to true as the default for my own bot but I'd like to hear the possibility of it being the default here?

@ravener can you send example of how it look before vs now. I just want to see, how it's look for end user. Thank you

Also run npm run fix:prettier

@ravener can you send example of how it look before vs now. I just want to see, how it's look for end user. Thank you

oh sorry, I just woke up and came from reading email title only. Just get the prettier done. Awesome change btw.

@ravener yeah, making errors and similar ephemeral true is good idea, I say go with it in another PR.

Also run npm run fix:prettier

done, my bad I quickly used the github editor but moving forward i should stick to the tooling

Relative is good, but we cannot control it.

Relative is good, but we cannot control it.

yeah I figured it'd look a bit weird when the time expires (it starts showing 'ago') but thought that'd be a minor inconvenience and the benefits would still outweigh it.

@ravener I am going to save your time, I will take over this PR (hope you don't mind).
I am implementing a new useful utility called TimeFormat. I will use that in this PR. One of its function is TimeFormat.StaticRelativeTime, so we can make that as a default time format. Or let me know, what do you think.

@ravener I am going to save your time, I will take over this PR (hope you don't mind).
I am implementing a new useful utility called TimeFormat. I will use that in this PR. One of its function is TimeFormat.StaticRelativeTime, so we can make that as a default time format. Or let me know, what do you think.

Sounds good to me 👍, looking forward to it.


✨  first step towards enabling kubeflex in example1

Summary
This PR contains various changes needed for enabling kubeflex support in example1 and quickstart.
Related issue(s)
Fixes #

/lgtm
/approve


remove redundant mount/unmount calls on commit

daemon.Diff already implements mounting for nativegraphdriver and
aufs which does diffing on its owns does not need the container to be mounted.
So new filesystem driver should mount filesystems on their own if it is needed
to implement Diff(). This issue was reported by @kvasdopil while working on a
freebsd port, because freebsd does not allow mount an already mounted
filesystem. Also it saves some cycles for other operating systems as well.
Signed-off-by: Jörg Thalheim<EMAIL_ADDRESS>

LGTM

LGTM

ping @tiborvass though

LGTM


EventGrid: The attempt to validate the provided endpoint failed

I'm trying to create EventGridSubscription for Azure Function that uses EventGridTrigger. When running New-AzureRmEventGridSubscription cmdlet i see the following error:

Url validation: The attempt to validate the provided endpoint https://BlobCreatedHandler.azurewebsites.net/admin/EventGridExtensionConfig failed.

Here is my azure function code:

[FunctionName("BlobCreatedHandler")]
public static async Task Run([EventGridTrigger]JObject blobEvent,
[Queue("blob-created-queue", Connection = Strings.StorageAccountConnection)] CloudQueue blobCreatedQueue,
[Inject(typeof(IBlobCreatedHandler))] IBlobCreatedHandler blobCreatedHandler)
{
await blobCreatedHandler.Handle(blobEvent, blobCreatedQueue);
}

I tried different versions of AzureRM.EventGrid module. Interesting thing that on versions lower than 0.3.0 it works fine. But all recent versions starting from 0.3.1 are failing with this error

@markheath and @sergey1209 . Can you please confirm if this issue is resolved for you by now? thanks

I can work around it with the escaping I mentioned above

@Sergey1209, would you please confirm if your issue is different and requires further attention?
@markheath, good to hear that. Thanks.

I was able to workaround it either