Text layer position changes after scaling the component

hi,I have a problem.
In the<EMAIL_ADDRESS>version,The pdf file display becomes blurry, this does not occur in the<EMAIL_ADDRESS>version, I tried to use the scale parameter to deal with this, although the pdf file becomes clear, but when using the text selection, I find that the position of the text layer has changed, what should I do with it.
<EMAIL_ADDRESS>version:
<template>
    <vue-pdf-embed :source="doc" :page="1" :scale="3" text-layer="true"></vue-pdf-embed>
</template>

<script setup>
import {reactive} from 'vue';
import VuePdfEmbed, { useVuePdfEmbed } from "vue-pdf-embed";

// essential styles
import 'vue-pdf-embed/dist/style/index.css'

// optional styles
import 'vue-pdf-embed/dist/style/annotationLayer.css'
import 'vue-pdf-embed/dist/style/textLayer.css'

const pdfState = reactive({
    pdfSource: {
        url: "https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf",
        cMapUrl<EMAIL_ADDRESS>        cMapPacked: true,
    },
})

const { doc } = useVuePdfEmbed({
    source: pdfState.pdfSource,
});

</script>

<EMAIL_ADDRESS>version:
<template>
    <vue-pdf-embed :source="pdfState.pdfSource" :page="1" text-layer="true"></vue-pdf-embed>
</template>

<script setup>
import {reactive} from 'vue';
import VuePdfEmbed from "vue-pdf-embed";

const pdfState = reactive({
    pdfSource: {
        url: "https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf",
        cMapUrl<EMAIL_ADDRESS>        cMapPacked: true,
    },
})
</script>

I'm also facing this. The problem seems to lie in the following line:
https://github.com/hrynko/vue-pdf-embed/blob/f36296e1eb225f3cebd1c64d7b1985cc6895268a/src/VuePdfEmbed.vue#L262
which messes up the scaling of the text and annotation layers when the scale prop is set, causing the shift.
If the goal of the scale prop is to control the sharpness of the pdf, we can change the call to the renderPage function to include the scale instead, which seems to work fine:
await renderPage(page, viewport.clone({ scale: props.scale }), canvas)

I'm down to create the PR that implements this, but I guess it'll technically be a breaking change. @hrynko what do you think?

Ok, I see the problem, but I haven't had time to look into it yet. Maybe this problem can be solved by using different scaling factors, but @markusgeert's PR is also welcome.

I'll create a PR.
On a side-note, it seems that Firefox uses a scaling factor of 2 when rendering PDF's. That might also be a worthwhile change to make?

it seems that Firefox uses a scaling factor of 2 when rendering PDF's

Do you mean Firefox's internal viewer?

Closing, as fixed in #186
Thank you, @markusgeert


Auth isn't passing through the redirect_uri or response_type to the success callback

Within the AuthHandler, the success callback provides three things:

an object that holds the session function for creating a new token and redirecting back with the token in the hash,
The input that holds the provider, the tokenset and the oauth client
the raw request

The session function is doing too many things for my usecase. In a Next.js application, I have an API route that acts as my final callback to the front end. This API route is server side and does not expose the hash on the Request object. The flow is like this:
SST Auth lambda redirects to www.frontend.com/callback#access_token=abcd1234 ----> Next API Route picks up the request and loses the access_token because the hash is never sent to the server. I believe that is just part of the HTML spec.
If we can also expose the redirect_uri and response_type here, I can do the redirect in my app without using the session function. I'd be able to append the access_token as a query parameter which does persist between across to the server.
The alternative to this is changing how the session function works and instead of appending the access token and state to the hash, we append it as a query parameter.
I have got a PR open (#436) to resolve this

The proper way to do this, as Dax pointed out, is to use response_type=code which gives back a code which can be swapped for a token using the /token endpoint on your auth domain. Closing as this solves my issue.


Ignore deprecated traits for shapes in the prelude

This change is to make some minor adjustments in preparation for the 2.0 release. In particular, there were some @deprecated traits added to the prelude that we will ignore for now. Also made some changes to be able to use 1.22 were some braking changes were made about the @sensitive trait that now needs to be applied to shapes instead of to individual members of them.
Issue #

Description of changes

Scope

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I will create a new PR after the changes from Ganesh get merged.


Change default start hour in DayView

Is it possible to change the default start hour in DayView from 1am to something like 8am? I looked into the TimeLineMark, but am not what I should update it to.

Any chance to have this much needed feature soon?

PR seems to be merged but then reverted I think, is it done? If so, how to set start hour?

Yes, it's not there in the latest version. Please check.

I also need this feature, any news about it ?


Newer release

Since the latest tag / github release  - the signatures of NewV1 / V2/ V4 has changed to return an error.
Can we have a github release so it is easier to integrate in dep that way ?

https://github.com/satori/go.uuid/issues/80

i make a fork fix #73  and release a new version here https://github.com/felipeweb/uuid


Make font build deterministic

Running fontmake multiple times on the same input always results in different SHA256 sums for the resulting binaries. It probably encodes the date or something in there. I'd like to get deterministic results instead.

Try setting SOURCE_DATE_EPOCH, fontTools should pick it up
https://github.com/fonttools/fonttools/blob/2e4b1d05df2d720bc1f4ba03b6dacb9171116ee1/Tests/misc/timeTools_test.py#L15

font builds are now deterministic if you set the SOURCE_DATE_EPOCH environment variable. ufo2ft takes care of it.
https://reproducible-builds.org/specs/source-date-epoch/

@madig This is how we approached this issue as of the fontmake v1.5 release through shell scripting and our fontTools-based post-compile Python scripts.


Integrate structlog.nvm as optional dep

https://github.com/Tastyep/structlog.nvim

https://github.com/Tastyep/structlog.nvim/issues/2


Learn More button on Cookie Consent partial doesn't work

Customer reports that the button doesn't work. We should investigate and resolve.

Fixed by #790.


feat: add bob exercise

@IsaacG I don't intend to apply any changes to the nascent CONTRIBUTING file. This document needs a deeper rewriting. It's currently just the notes I took, thinking we might want an exercise-generator tool.
If the team thinks it's largely OK to leave it as a walk-through of the manual steps to create Bob, then I'll tidy it up in a separate PR.


Query parameters are not being proxies

It looks like they're being stripped out. I'm using this through gulp-webserver.

I believe this might have something to do with it: https://github.com/andrewrk/connect-proxy/blob/master/index.js#L29
Can you debug and add an PR?

+1

hey guys, any possibility to fix this ? need to proxy sensitive data which are part of the query and is killing me. any other alternatives also welcome. thanks :-).

@hkailantzis I ended up using this package instead: https://www.npmjs.com/package/connect-modrewrite. Hope this helps.

Thanks for the quick response @nmehta6. will give it a shot.

@nmehta6 , ended up using this instead: https://www.npmjs.com/package/express-request-proxy,
as I need also to proxy sensitive authorization headers :/. Hope it helps anyone who has to meet these kind of requirements.


Add --rsyncable for gzip compression

This adds the option GZ_RSYNCABLE for gzip compression. Rsync and Duplicati transfers/backupss of large archives are much faster when this option is used.

Thanks this is a great addition!


Missing file "best_configs"

I notice that the file "best_configs" which should be in "results" is missing. Could you add it ? Otherwise it is not possible to run "scripts/best.py".
Thank you

I notice that the file "best_configs" which should be in "results" is missing. Could you add it ? Otherwise it is not possible to run "scripts/best.py".
Thank you

"best_configs" is not a file, but a function inside scripts/results.py


[WIP] Update rbvmomi to current version

Now that SPBM is fixed on rbvmomi (https://github.com/vmware/rbvmomi/pull/95), we can update to rbvmomi v1.94.

@jameswnl can you help verify this is working correctly?

@agrare sure

@agrare looks good! I have it to provision a VM using a template that has Storge Profile. It completes successfully and the new VM has the right profile attached as well.

Thanks @jameswnl !
@blomquisg ready for review

@agrare how about darga and euwe flags?

I don't think this needs to come back to either, this is not specifically fixing anything just staying up to date.


There is a large space betwenn words

I had open kitkat zoom fix already but it didnt work.
How to solve it??

Go to Settings -> Reading Layout -> CSS Layout (on the bottom).
Set Force Justified = False.

oh thank you,  I done it already once but i  didnt restart the app so it didnt take effect. but now it is work. thank you


[BUG] /api_version Endpoint Returns Non-Standard JSON Format and Inconsistent Versioning

OS and Environment
MacOS, bare metal
GIT commit hash
96f84106
Minimum working example / Steps to reproduce
curl --location 'http://<IP_ADDRESS>:8080/api_version'

Actual result
The response is a plain string, not a JSON object, and the version is formatted as a single digit.
"1"

Expected result
The response should be a well-structured JSON object following semantic versioning. Example:
{
  "version": "1.0.0"
}

Who can help to reproduce?
@astrokov7

I don't think it is a bug nor a defect.
First of all, the version that is returned is the current version of WSV:
https://github.com/hyperledger/iroha/blob/96bf9973c24eb7789c5389fc66890fb2f277d563/torii/src/routing.rs#L283-L294
It doesn't follow semantic versioning and is made for future development of Iroha and compatibility in production environment. AFAIK, the version is going to be a plain incremental number.
Secondly, this is a valid JSON. Yes, it is not a JSON object - it is a JSON string.
Also, I've created a proposal some time ago to simplify this endpoint to just returning a number as plain text:

https://github.com/hyperledger/iroha/issues/4218

I don't think it is a bug nor a defect.
First of all, the version that is returned is the current version of WSV:
https://github.com/hyperledger/iroha/blob/96bf9973c24eb7789c5389fc66890fb2f277d563/torii/src/routing.rs#L283-L294
It doesn't follow semantic versioning and is made for future development of Iroha and compatibility in production environment. AFAIK, the version is going to be a plain incremental number.
Secondly, this is a valid JSON. Yes, it is not a JSON object - it is a JSON string.
Also, I've created a proposal some time ago to simplify this endpoint to just returning a number as plain text:

[suggestion] Remove JSON encoding for API Version and Health requests, use plain text #4218

Agree, I close issue.


How can i give margin bottom margin for the view pager indicators?

I have a 100dp height view pager in my layout bottom and I want to use the indicators with 10dp bottom margin, can help on it?

What does your setup look like?

Closing due to inactivity.


Can't compile because of missing crate moonshine-util

This dependency in the Cargo.toml causes the example to not compile because of missing dependency. It's referencing ../crates/moonshine-util but there is not such dir. I am guessing there was some breaking change at one point and this was forgotten to update? CI would be good for this.

My plan is to eventually merge this crate into moonshine-core.
That still wouldn't solve the dependency issue you're describing though, but it might make it easier because then at least if you grab Core, all the local dependencies should be self-contained.
I definitely need a CI workflow, but I haven't had the bandwidth to set it up. I'd take help from anyone offering!


it has some issues by update clients Redirect Uris

dtos have not values

oh i see must selected

@pigwing does it work for you?

Can you add screenshot or code snippet? From your description I don't understand where the issue is @pigwing.

yes it work,add completed and must click it ,it will be selected status

@pigwing I know, what you mean. I've recieved same type of the issue. I will consider creating maybe better UI design of the picker. I'll discuss it with @TomasHubelbauer.
Thanks for your report.

@skoruba THX

Any updates on this issue? If I seed the test data I won't see any redirect URIs for the skoruba_identity_admin client in the UI (but they are present in the database). If I try to add a redirect URI and save that, all redirect URIs for that client gets deleted in the db and I won't be able to use the admin UI anymore (invalid redirect uri).

@mjisaak - if you are trying to add new redirect uri - do you click on the uri in the search result? That was an issue, which @pigwing mentioned.
BTW: Any javascript error in console?
Thanks!

It seems that works correctly - if you have any issue about it - please feel free to reopen.


Make Testimonials Section Responsive on Landing Page in Next.js Frontend

Objective:
Enhance the responsiveness of the Testimonials section on the landing page of the Next.js frontend to ensure an optimal user experience across various devices and screen sizes.
Description:
The current implementation of the Testimonials section lacks responsiveness, potentially affecting user interaction on different devices. This issue addresses the need to make the Testimonials section responsive, aligning with best practices to provide a seamless and user-friendly experience across different viewports.
Figma Design:
Figma Design
Prerequisites:

Proficiency in Next.js for frontend development.
Familiarity with making components responsive in a Next.js project.

Acceptance Criteria:

The Testimonials section on the landing page is updated to be responsive.
The responsiveness is implemented to ensure a consistent and user-friendly experience across various devices and screen sizes.
Visual elements within the Testimonials section adapt appropriately to different viewports.
The design adjustments align with the specifications provided in the Figma link.

https://github.com/mehulkapoor020/IS601-EndTerm/pull/58


Update GDT dependencies for Crashlytics

GoogleDataTransport >= 5.1.1'
GoogleDataTransportCCTSupport >= 2.0.2

@paulb777 @ryanwilson Should we merge this PR into the (upcoming) release branch instead of master?

It should merge into master to get more testing sooner.
Now that the Firebase pod is open source, we no longer have restrictions about updating versions in master before cutting the release branch.


Reliable UDP

UDP is by nature is not reliable compared to TCP.
However, UDP have much better performance compared to TCP.  Changes to the cache must be communicated out as quick possible.
McCache need a reliable UDP message transfer.  It need the following:

The message need to be chunked up into smaller fragments that can fit into the IP frame along with  a control header.
The sender must management the acknowledgements.  Fragments that timed out must be re-transmitted.
The receiver must management the arrivals and assemble back the message.  Missing fragments must be re-requested.

Pending testing.


Opacity can't be set for the shadow

In react-native-shadow, there is props for opacity of the shadow. How can I set the opacity with this package, or is the feature missing altogether?

Hi, @rpulkka.
The opacity is set in the startColor and finalColor, in the alpha channel of the color.
A '#0001' color will be an almost transparent black, for example. You may also use 'rgba()', 'hsla()' etc.

Also, thanks for the Issue! I have added this question to the FAQ, as there was another Issue in the past that has asked the same.
I understand that as react-native-shadow had it, it is normal to expect this one to have it.

Thanks a lot! I had not thought that transparency could be added straight into the color notation. With hex color coding the pattern seems to be #rrggbbaa, it works for me. Keep up the good work.

Thanks for the encouragement ;)
Yes, this is one of the multiple patterns accepted! Those, except int, are also accepted: https://reactnative.dev/docs/colors. -- I didn't even know that int as color was a thing :open_mouth:
'hsl/a' is very useful! Take a look about it if you don't know it yet. I always recommend it when I can. It was a game changer for me :)


Collected data record: Broken functionality

We have some unresponsive links in the Collected Data form.

[ ] Import Evidence from Tola Tables link: Does not launch the expected pop-up.
[ ] Add a Disaggregation link (also broken in production): Right now, it takes you to the full-page version of the Summary tab. I think, though I'm not sure, it's supposed to show you the disaggregation options we currently display in the Performance tab. Let's ask Mahmood what the original behavior was.

The consensus is to remove the link for adding 'disaggregation' from the date collected modal window.

Link is gone!


v1.0 devGuide Wk7 Wyn's Component

Added Use Cases in devGuide for

Hide Contacts
Delete Multiple Contacts
Sort Contacts by Tag

Coverage remained the same at 92.174% when pulling f373e8e6dcd7528caeea049bbb786c2d678a8563 on wynkheng:devGuideWk7 into 868d9e22cefc4dd4168fb20a8cd6eabe4a9a95db on CS2103AUG2017-T15-B4:master.


val/var color

Is it possible to change the syntax highlighting of val & var to treat them as keywords?
This is what they effectively are, and this is how they would be colored in other languages (C#, Scala, Kotlin).

I think this is actually boiling down to how Lombok itself is declaring it as.
you might want to raise this with https://github.com/rzwitserloot/lombok as this plugin is only handling IntelliJ integration.

https://plugins.jetbrains.com/plugin/24327-val-highlight
Disclaimer: I am the author. There is no solution so far, so I got to work.


web devlopment button hover problem

https://github.com/user-attachments/assets/a2dfb744-5b63-4103-949b-159c51f647a2

hi @Amankr200 can you assign this issue to me

Kindly merge my pr under hacktober-fest tag as I have fixed the issue of the web development hover button by improving the css file


2.3.29 maintenance

add new field pathClassicCompatible for control singly the paths parameter of include or import whether classicCompatible.

Looks like a quite special need. Can you tell about the use case?

Looks like a quite special need. Can you tell about the use case?

for this, when use classic_compatible model, the #include in ftl file also can use relative path. I think this need maybe a normal need.

What I meant is that using classic_compatible in 2020 is already a quite special need (or I hope so), and then, using that, but not expecting exactly the classic behavior is even more so. So, why are you using classic_compatible?

@ddekany
for using freemarker simply but having exeception "The following has evaluated to null or missing".
And I have found that Using TemplateExceptionHandler can resolve my question.


dom-if memory leak

Description
dom-if with restamp causes memory to be leaked until the window is refreshed. This does not work well with SPAs.
Expected outcome
Memory to be cleaned up when the garbage collector runs after a page has been left.
Actual outcome
Memory is leaked until the page is refreshed
Steps to reproduce
Use the polymer-2 starter kit. Modify my-app.html by replacing the normal view code in iron-pages with
<template is="dom-if" if="[[isView1]]" restamp>
    <my-view1 name="view1"></my-view1>
</template>
<template is="dom-if" if="[[isView2]]" restamp>
    <my-view2 name="view2"></my-view2>
</template>
<template is="dom-if" if="[[isView3]]" restamp>
    <my-view3 name="view3"></my-view3>
</template>

Inside of _routePageChanged(page): add this code after this.page = page || 'view';
if (page === 'view1') {
    this.isView1 = true;
    this.isView2 = false;
    this.isView3 = false;
} else if (page === 'view2') {
    this.isView1 = false;
    this.isView2 = true;
    this.isView3 = false;
} else if (page === 'view3') {
    this.isView1 = false;
    this.isView2 = false;
    this.isView3 = true;
}

Adding this code to my-view2.html makes it easy to see the memory leak.
connectedCallback() {
    super.connectedCallback();
    this.hugeArray = [];
    for (var i = 0; i < 1000 * 100; i++) {
        this.hugeArray.push(Math.ceil(Math.random() * 100))
    }
}

This was taken after switching between the views and forcing a garbage collect after landing back on view1.

Browsers Affected

[x] Chrome
[ ] Edge
[ ] Firefox
[ ] IE 11
[ ] Safari 8
[ ] Safari 9

Versions

Polymer: v2.6, v3.0.2
webcomponents: v1.2

@madiganz Could you create a small JSBin that I can use to diagnose the issue?

https://jsbin.com/kumoxod/edit?html,console,output
This is my attempt to reproduce this in a jsbin, but it only seems to leak nodes and not any memory. The starter-kits that I used were pretty easy to reproduce the problem.

Not sure if this is as helpful, but I created a plunker to show the problem. https://plnkr.co/edit/fes5wfxP1ylWFDFH5kjz?p=preview
Hopefully this helps.

Thanks for reporting this @madiganz.
I believe we're seeing the same issue in our SPA.
It is still using 1.x, but I've been experimenting with 2.x and 3.x which seem to exhibit the same behavior.

@TimvdLippe  any news to this?
I've also problems in my app that controls with dom-if are keept in memory:

I've found out:
in flush.html enqueueDebouncer is called from dom-if, but flush or flushDebouncers is never called.
see:

I found this issue on Polymer 2 and it still exists on Polymer 3. Both dom-if and dom-repeat are registered their function to global debouncer.
__debounceRender(fn, delay = 0) {
    this.__renderDebouncer = Debouncer.debounce(
          this.__renderDebouncer
        , delay > 0 ? timeOut.after(delay) : microTask
        , fn.bind(this));
    enqueueDebouncer(this.__renderDebouncer);
  }

Items in this global debouncer list cannot be removed. It causes memory leak for any elements that use this elements in their template. We need to manually execute the following statement to prevent this memory leak.
Polymer.flush();

I added Polymer.flush() to  _routePageChanged(page) in my-app.html in the polymer 2 starter kit. This is my result from the same tests as before.

While it seems like with this change, it is no longer leaking memory, it is still leaking nodes.

I'm using Polymer 2.5. and just encountered the same problem. The memory consumption is growing and growing until the page is refreshed. With a failry large application it doesnt take long for the app to become very unresponsive.

I'm seeing the same. Is there any safe way to cleanup all those detached instances?

Confirmed this issue.  Fix will be in #5499 & #5500.  As a short-term workaround, periodically calling flush() from lib/utils/flush.js (Polymer.flush() in 2.x) will free the detached instances for gc.

@kevinpschaaf thanks! I'm wondering though if that truly fixes the mem-leak. I monkey-patched a similar fix into our app and while the memory consumption decreased after a forced gc I kept getting more and more detached nodes. Will test soon.

@davidsteinberger On a local test designed to stress this specific memory leak, I confirmed this results in a flat memory profile vs. the previous release.  If you can repro a leak (same or otherwise), please let us know.

@kevinpschaaf
When do you will release new version of Polymer 3 that includes this fix? Last version of Polymer 3 was released more than 5 months ago.

A new release of Polymer 2 would also be great.

@Soul-Master Yes, we'll get a new release of both 2.x and 3.x out, hopefully in the next couple of days.
@davidsteinberger There was an unintentional push to the 2.x branch there 🙄; the PR to the 2.x branch is in https://github.com/Polymer/polymer/pull/5500 and will be merged shortly pending some last internal testing.  We'll release both 2.x and 3.x together with this fix.

@kevinpschaaf  Thank you for working on this! I am sure we are all happy to have this fixed. Any updates on when this will be released for 2.x?

I'm using Polymer 2.5. and just encountered the same problem. The memory consumption is growing and growing until the page is refreshed. With a failry large application it doesnt take long for the app to become very unresponsive.

Does refresh clear the memory leak in 2.5 or ONLY with 3.0?

@nazarsa For Polymer 2, the fix for this is in 2.7.1.


close s3 reader after saving snapshot

After uploading the snapshot, the backup operator performs a get
to ensure that the snapshot was actually saved. The problem is that
the resulting get request body is not closed. This causes a leak
of http connections.
fixes #1965

Definitely need this, we're seeing memory leaks in backup operator

lgtm thanks!

@daniel-garcia one last thing, could you update the changelog with this fix https://github.com/coreos/etcd-operator/blob/master/CHANGELOG.md#fixed


DeepseekV2-w8a8 weight needed in HF

Hi,
I try to quant DeepseekV2 full model in 8*A800 but it took too much time, and when someone else use gpus at the same time, oom would occur, so I hope I could download DeepseekV2-w8a8 weight from HF, like: https://huggingface.co/nm-testing/DeepSeek-Coder-V2-Lite-Instruct-W8A8/tree/main .
Besides, are you going to adapt DeepseekV2-w8a8 to vllm? I think now vllm does not support compressed-tensor-w8a8.

maybe not someone use GPUS cause your OOM, i m using llmcomrepssor to quantize deepseek v2.5 with 8*A100 and watching nvidia-smi, while still get OOM, this confused me a lot.

Hi @Eviannn, we have models available now for Deepseek V2. Check them out here:

https://huggingface.co/neuralmagic/DeepSeek-Coder-V2-Lite-Instruct-FP8
https://huggingface.co/neuralmagic/DeepSeek-Coder-V2-Instruct-FP8


bitcoin-knots: 25.1.knots20231115 -> 26.1.knots20240325

Description of changes
ZHF: #309482
Bumps version to 26.1.
Combines #306043 and #308774, which were applied to the Bitcoin Core package to fix an issue on Darwin when running wallet tests. (upstream https://github.com/bitcoin/bitcoin/issues/29026).
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] 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
[x] 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.

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

Result of nixpkgs-review pr 311258 run on aarch64-darwin 1

1 package built:

bitcoind-knots


Support all-or-nothing multi operations

Hey @jonhoo! It's been a while! I happen to be in the market for a ZooKeeper client library in Rust, and yours seemed like the best available option. Time permitting, l I might be able to pick off some of the other outstanding issues. :)
Fix #12.

Excellent! I left some notes inline :)

Just FYI, it's better if you make changes in separate commits, as it makes the review process easier. Otherwise I sort have to read the entire diff again :) We can always squash when we merge!

@benesch looks like the test suite fails on stable?

Well that's rather baffling. I'm running rust 1.33 on macOS without problems. This is the error:
error: overflow representing the type `std::option::Option<std::result::Result<std::option::Option<types::Stat>, failure::Error>>`

Rebased to resolve conflicts. Maybe the stars will align and that will also fix the compiler error? ¯_(ツ)_/¯

...that actually worked. I'm not super sure what to make of this.

How weird! I guess let's keep an eye out for future test failures :/

Thanks! \o/
On Tue, Mar 12, 2019 at 3:39 PM Jon Gjengset<EMAIL_ADDRESS>wrote:

Merged #15 https://github.com/jonhoo/tokio-zookeeper/pull/15 into
master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jonhoo/tokio-zookeeper/pull/15#event-2198271873, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA15IEcOdisiRZjSpsaUiiQsU3knq-6Yks5vWAJxgaJpZM4bo1e1
.


runelite has stopped working

First time I open runelite everytime it crashes saying that it has stopped working

Any more info?

I think this can be closed; has been open 4 months without more info.


Expand in test explorer without Pester makes that test no longer able to expand

Trying to expand in test explorer and Pester is not available to the session makes that test no longer able to expand. When Pester is available (running build.ps1 in this case) clicking on another test it tries to expands.

Everything is a bit slow since I have the code on /mnt/c.

It would be nice it it could list the error thrown in the console "missing module Pester" as an error in the test explorer.

The missing module pester shows in the terminal window and happens out-of-band of my pester process so I don't plan to fix this directly today, however in the future I will be implementing a dedicated process for test discovery and handling, and that process will be able to detect for Pester and throw a warning before registering the test controller.


Network implementation causing unnecessary lag

Hi, would be nice if you could improve this part of your code, its causing unnecessary lag since its searching all entities and sends packets all the time :)
Related code:
https://github.com/LeoMinecraftModding/eternal-starlight/blob/fc59edcd26bd8d5aa302d58d78b62c1b22d93265/common/src/main/java/cn/leolezury/eternalstarlight/common/handler/CommonHandlers.java#L99
From looking at your code it seems that you're only attaching the spellcaster interface to the player, in which case you could be just listening to the Player Tick event instead, and check event.player instanceof Spellcaster.
If you need it for more entities than just players I'd recommend keeping a local list for the relevant entities, which gets filled by entity enter/leave world events (just on world enter check instanceof Spellcaster)
Also you normally should not be sending a packet each tick, instead only send it when necessary, aka when your data changed, which can be achieve by a boolean toggle e.g. in the spellData which indicates that it requires syncing.

ok I'll fix this soon, thanks for the detailed explanation :)


MERP CSS

Stylesheet to go with HTML.

Could you resubmit this sheet with the HTML and CSS in the same pull request? That makes it a little easier for me to review. Also, could you please include the sheet.json? Instructions can be found here, and it may be helpful to look at the sheet.json for another sheet to see an example.
If you could also include a preview image, that would be great. Once you make these changes, this sheet will be ready for me to merge. Please let me know if you need any help!


Run all relevant tests on release branches

Fixes https://github.com/Shopify/vitess-project/issues/613
This PR:

Adds two new scripts which are modified versions of the existing scripts that Vitess uses to get the next/previous release for upgrade/downgrade tests. I decided to add it as new scripts instead of modifying existing ones so that if the script gets modified upstream, we wouldn't need to do any conflict resolution. The script gets the previous release to compare by looking at the most recent -shopify release on the previous major release. Similarly, it gets the next release by also searching for the latest -shopify release on the next major release, falling back to main otherwise.
Updates the skip-workflow logic so that we don't skip tests in our release branches. I updated it so that these tests run anytime a PR is created with a branch with the name pattern vX.Y.Z-shopify-XX-candidate. The idea is that we create a candidate branch that is going to merge into a vX.Y.Z-shopify-XX branch.

Updates the skip-workflow logic

The github workflow files are generated from templates in test/templates, so we should be able to update the skip logic in those templates then run make generate_ci_workflows to regenerate the workflow files.

I updated it so that these tests run anytime a PR is created with a branch with the name pattern vX.Y.Z-shopify-XX-candidate. The idea is that we create a candidate branch that is going to merge into a vX.Y.Z-shopify-XX branch.

Does that mean we don't expect all the tests to be running on this branch since it's called fix-tests?

For the previous release logic:
It looks like this workflow produced release-16.7-shopify-1.0 as the previous release, which caused the "Run Upgrade Downgrade Test" part to fail.

Run previous_release_ref=$(./tools/get_previous_release_shopify.sh v16.0.7-shopify-1-candidate refs/pull/148/merge)
  previous_release_ref=$(./tools/get_previous_release_shopify.sh v16.0.7-shopify-1-candidate refs/pull/148/merge)
  echo $previous_release_ref
  echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT
  shell: /usr/bin/bash -e {0}
release-16.7-shopify-1.0

Would we expect that to be v15.0.3-shopify-10?
For the next release logic:
It looks like this workflow produced an empty string, which caused the "Run Upgrade Downgrade Test" part to be skipped because of this logic:
        if [[ "${{needs.get_next_release.outputs.next_release}}" == "" ]]; then
          skip='true'
        fi

Should that have been either release-17.0 (branch) or v17.0.5 (tag) since there is no -shopify-N patch release for v17 yet?

Should that have been either release-17.0 (branch) or v17.0.5 (tag) since there is no -shopify-N patch release for v17 yet?

I think that makes sense to fallback to an upstream release if a shopify release doesn't exist yet. I've updated the script to do that.

Would it make sense to never skip tests? It might be nice to have tests running on prototype branches and it would mean we wouldn't need to be careful about always opening PRs from -candidate- branches

Then we might need a different way of identifying which version a PR is going to merge to. Currently, the version specified in the branch name is used to figure out the versions for the upgrade/downgrade tests. If, for example, we have a fix-foo branch merging into a catch-all branch, we'll need some way of saying that we're merging into a v15 branch so run upgrade tests for v16 and downgrade tests for v14


Very slow startup on enterprise version

System information:

Operating system (distribution) and version:
Microsoft Windows 10 Enterprise  10.0.17763 N/A Build 17763
DBeaver version:
6.2.0

Describe the problem you're observing:
I have ~10s latency during startup where dBeaver is frozen. This doesn't happen on community version.
Include any warning/errors/backtraces from the logs
Freeze happens after first line and lasts ~13s:
2019-10-08 13:27:03.113 - > Start Equinox Provisioning UI Support [org.eclipse.equinox.p2.ui 2.5.500.v20190220-1158]
2019-10-08 13:27:15.098 - Error checking license DB-721MOZLM-ZPIQ status: No such host is known (dbeaver.com)

I am behind corporate proxy, which is set in properties. Tried different proxy with same results
This is lic screen:

his happens because DBeaver can't connect to the license server for license validation. We need to do this in background to avoid main process block.

Definitelly in the backgound. Not sure why it can't connect, other network functions (i.e. drivers) work OK.

verified


How can I force to use specific package version while running go mod download?

What version of Go are you using (go version)?

$ go version 1.13

What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOOS="darwin"
GOARCH="amd64"

What did you do?
go.mod file
go 1.13

require (
  ...
  gorm.io/gorm v1.20.5
)

when I just run go mod download then packages in my go.mod file upgrades automatically even after I specified a version.
What did you expect to see?
go 1.13

require (
  ...
  gorm.io/gorm v1.20.5
)

What did you see instead?
go 1.13

require (
  ...
  gorm.io/gorm v1.20.7
)

How can I stop this upgrade while running go mod download?

Please see https://github.com/golang/go/wiki/Questions.


Exporting and updating fixes it until you relaunch the world or minecraft.

Do you have Optifine or Sodium?

No, it was doing it without shader's or sodium.

No, it was doing it without shader's or sodium. (made sure to test CPM on it's own. it took a client restart for it to register again, but did it again if you edit the model or open the menu, the glow layers disappeared, until client restarted, )

or if i exported again, to skin


ERROR: Could not resolve "path" when i run

I follow the allure reporter guide to use this package https://allurereport.org/docs/cypress-configuration/ with allure and i migrate to the new badeball@cypress-cucumber-preprocessor repository and this error appears

this is my cypress.config.js
import os from "os";
import { defineConfig } from "cypress";
import { allureCypress } from "allure-cypress/reporter";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import { createEsbuildPlugin } from "@badeball/cypress-cucumber-preprocessor/esbuild";
import cypressOnFix from "cypress-on-fix";

export default defineConfig({
  e2e: {
    setupNodeEvents: async (on, config) => {
      on = cypressOnFix(on);

      await addCucumberPreprocessorPlugin(on, config);

      on("file:preprocessor", createBundler({
        plugins: [createEsbuildPlugin(config)],
      }));

      allureCypress(on, config, {
        resultsDir: process.env.ALLURE_DIR+"allure-results",
        videoOnFailOnly: true,
        environmentInfo: {
          "Plataforma": os.platform(),
          "Release da Plataforma": os.release(),
          "Versão":  os.version(),
          "Versão do Node.js": process.version
        }
      });

      return config;
    },
    defaultCommandTimeout: 40000,
    screenshotOnRunFailure: true,
    video: true,
    retries: {
      runMode: 1,
      openMode: 0,
    },
    cacheAcrossSpecs: true,
    chromeWebSecurity: false,
    baseUrl: "https://censured",
    specPattern: "cypress/Scenarios/**/*.{js,jsx,ts,tsx,feature}",
    viewportWidth: 1920,
    viewportHeight: 1080,
    testIsolation: false,
  },
});

and this is my package.json
{
  "name": "testes-automatizados",
  "version": "1.0.0",
  "description": "Testes Automatizados",
  "main": "index.js",
  "scripts": {
    "cypress:open": "cypress open",
    "cypress:run:chrome": "cypress run --browser chrome --headless",
    "cypress:run:edge": "cypress run --browser edge --headless",
    "cypress:ci": "cypress run",
    "allure:generate": "allure generate %ALLURE_DIR%\\allure-results --clean -o %ALLURE_DIR%\\allure-report",
    "allure:generate-history": "xcopy /E /I /Y %ALLURE_DIR%\\allure-report\\history\\* %ALLURE_DIR%\\allure-results\\history\\",
    "allure:generate-all": "npm run allure:generate && npm run allure:generate-history"
  },
  "author": "Tester",
  "license": "ISC",
  "devDependencies": {
    "cypress": "^13.14.2",
    "cypress-on-fix": "1.0.3",
    "allure-cypress": "^3.0.6",
    "cypress-cucumber-preprocessor": "^4.3.1",
    "@bahmutov/cypress-esbuild-preprocessor": "2.2.4",
    "@badeball/cypress-cucumber-preprocessor": "21.0.3"
  },
  "cypress-cucumber-preprocessor": {
    "cucumberJson": {
      "generate": true,
      "outputFolder": "cypress/cucumber-json",
      "filePrefix": "",
      "fileSuffix": ".cucumber"
    },
    "nonGlobalStepDefinitions": false,
    "stepDefinitions": "cypress/**"
  },
  "type": "module"
}

i put in e2e.js import "allure-cypress" and change steps to @badeball/cypress-cucumber-preprocessor

I noted you use "cypress-cucumber-preprocessor": "^4.3.1",, please update to the package from this repository at least, I mean  "@badeball/cypress-cucumber-preprocessor": "latest",

**ameduza ** commented Dec 17, 2024 •

it's that, i make npm uninstall in "cypress-cucumber-preprocessor": "^4.3.1" and works


Draft issue-5173-everything-operation-doesnt-return-all-patients

Closing as issue fixed by: https://github.com/hapifhir/hapi-fhir/pull/5201


Downgrade Checkboxes

Is it possible to downgrade Checkboxes ?
I'm using Material Design in a project with Ractive.js and Checkboxes aren't working well when I'm updating my view.

Checkboxes have a downgrade method. What exactly isn't working?

I have a localized page that is rendering multiples checkboxes according to the current language and there is a condition to check the values of the localized checkboxes which adds a checked attr or not.
{{#partial checkbox}}

{{label}}

{{/partial}}
Everything is working as intended on the first render, but the moment I am switching languages, the checked attributes changes but Material design doesn't reflect the changes and becomes buggy.
That's why I wanted to downgrade the components, to manually replicate to behaviour.
It's also doing the same with the radio buttons, fyi.

Would calling checkToggleState from the MaterialCheckbox property on the component solve the issue?
More dynamic web pages aren't something we fully support. Things like Polymer are more adept for those situations.
Radio doesn't currently have a downgrade method, a PR is open for that one.

I'll give it a try and give you a feedback.

It's returning 'undefined'

yep, $('.mdl-js-checkbox#'+menuitemId)[0].MaterialCheckbox.checkToggleState() always returns undefined regardless of actual state.
As a workaround I'll use $('.mdl-js-checkbox#'+menuitemId+' input').is(":checked")

FTR: checkToggleState is meant to not return anything. It does the check for you and updates the classes for the component as needed. If you need to check the actual check state to do something, just target the input and see. @KristerV showed a jQuery based solution, but here it is in raw JS...
var isChecked = document.querySelector('{YOUR SELECTOR}').checked;
Replace {YOUR SELECTOR} with whatever you need to directly target the node in question.
Sorry for not responding sooner btw, looks like I didn't get notified (or I marked all as red with this in a bunch of them.)
Seeing as how this is particular to using some 3rd party library or framework, I'm closing it out as non-actionable for us. I'm not seeing a clear path to resolve the problem at hand internally. StackOverflow is able to provide more general support.
If you want to replicate the JS behavior in some other language, just remove the -js- classes from the markup so our component handler system will not fire against the node, then do whatever you want for another system to register things.


add link to from_str method in ParseLevelError

Has no existing issue.
Just thought it might need a link like the other items.

So... @dtolnay, could you also check this PR?
I assume this didn't get noticed while #190 got merged is because it doesn't relate to any issue.


how can  I  add  supermap wmts

SuperMap's wmts  is  4490 , I add  it  ,but  it  offset

Hi @yankai12 - thanks for submitting a question. Please use our community forum for general help like this. We have many active users there and you'll be likelier to receive help.


Don't require double parens in javascript, return promises instead

In javascript, it's possible to always return a Promise, thus avoiding the need for calling the return value of the eel.exposed_python_function() call.

I can also do the same on the Python side, by using threading.Lock instances to lock execution until the websocket comes back with the return. However, it causes a freeze (a deadlock) if you call the function before starting eel.

@fabiosantoscode I like this, it is how I wanted the syntax to be originally, but I decided it was most important that the syntax was the same on both sides. I think it is worth pushing the breaking change for v1.0.0 if it can be made symmetrical.
I couldn't work any way to implement a eel.my_func().then() style syntax in Python though, because how do we know whether or not to wait and return an 'int' (for example) directly from my_func()? It could also be called just as x = eel.my_func()

If you use Threading.lock you can wait until a response. But it deadlocks if you lock before the connection is open, so you can't call functions before eel.start.

But how would you implement the async version?
x = eel.my_func(1, 2)
print(x)

eel.my_func(1, 2).then(print)   # <-- How would this work?
y = eel.my_func(1, 2)
y.then(print)             # <-- y is just an 'int' for example

Yes, I'm suggesting dropping the whole thing

Yeah ok, I think it would work as a parameter given to init(), this way it is not a breaking change, it's an explicit opt-in.
`eel.init('web', alway_sync=True)
Something like that...

:+1: For no breaking changes.

I'm going to reluctantly close this as I think it fractures the codebase too much to deliver it in a non-breaking way on the Python side. At the time it was proposed I would have considered a breaking change, now we have too many installs I think.
One of the benefits of Eel as a project (rather than just as a library) is that the codebase is small enough and easy enough to understand for people to contribute who haven't contributed to an open source project before. I think this aspect is almost as valuable as the library itself so I am keen to keep everything as newbie friendly as possible.


Send Request: File picker doesn't show up for a multipart/form-data request with a binary format field

Describe the bug
File picker doesn't show up for a multipart/form-data request with a binary format field.
To Reproduce
Setting the following requestBody does not render a file picker and doesn't show the custom header in the request sample.
requestBody:
    content:
        multipart/form-data:
            schema:
                type: object
                properties:
                    metadata:
                        type: string
                        description: Image metadata.
                    image:
                        type: string
                        format: binary
                        description: Binary format of media to be uploaded.
            encoding:
                image:
                    contentType: image/png, image/jpeg

Expected behavior
A file picker should be displayed instead of a text input.

The custom header should be shown in the request sample.

Am I missing something when defining the requestBody?
How would you go about defining a multipart/form-data requestBody with a binary format field?

Thanks for reporting! Looks like request samples are indeed not showing correctly in that case. Though I can't reproduce the file picker issue. Could you show how it looks on your side? Using your example I can see the file picker:

Which version of elements are you using? Could you share whole API document example?

Hey mallachari, thanks for replying.
Here's how it looks from my side

I'm using beta, what version should I use?
<script src="https://unpkg.com/<EMAIL_ADDRESS><link rel="stylesheet" href="https://unpkg.com/<EMAIL_ADDRESS>
Thanks!

There's the latest stable release of elements (7.0.5) that you could use. Let me know how if that makes it work. If not I'll try to reproduce it.

Still not showing the file picker.
Here's the specification
openapi: 3.0.0
info:
    title: Some API
    description: This is a description
    contact:
        email<EMAIL_ADDRESS>    version: 1.0.0
servers:
    - url: '/v1/api'
      description: Develop
tags:
    - name: media
paths:
    /media:
        post:
            operationId: create_media
            tags:
                - media
            summary: Create media
            security:
                - API Key: []
            requestBody:
                content:
                    multipart/form-data:
                        schema:
                            type: object
                            properties:
                                metadata:
                                    type: string
                                image:
                                    type: string
                                    format: binary
                        encoding:
                            image:
                                contentType: image/png, image/jpeg
            responses:
                '200':
                    description: |
                        Media created successfully.
                    content:
                        application/json:
                            schema:
                                type: string
components:
    securitySchemes:
        API Key:
            name: x-api-key
            type: apiKey
            in: header
security:
    - API Key: []

And here's the html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link type="image/ico" href="/favicon.ico" rel="icon">
    <title>Calibration API Spec</title>
    <script src="https://unpkg.com/<EMAIL_ADDRESS>    <link rel="stylesheet" href="https://unpkg.com/<EMAIL_ADDRESS>  </head>
  <body>

    <elements-api
      apiDescriptionUrl="/openapi/specification2.yaml"
      router="hash"
      layout="sidebar"
    />
  </body>
</html>

Thanks!


Speed-up the Job initialization phase: pre-deploy the ADO Tasks

Dear All,
We are building our Agents via IaC.
The Agent VMs are reverted from snapshot after the Jobs are completed, the solution is similar like on the Azure Pipelines (Hosted Agents).
All Jobs are getting a blank environment in this method due to security and compliance reasons.
The Job initialization phase is a bit longer than the "static" Agents due to the continuous Tasks deployments to the Agents.
We would like degrees this time as possible.
Is there any way for register the latest ADO Task collection manually to the Agent?
I think this is more than just a simple file copies.
Thanks a lot!
Regards,
Gabor

Hey @iambernics - we don't offer this since generally task download is pretty fast, most of our built in tasks are pretty small. If you'd like to suggest it as a feature, https://developercommunity.visualstudio.com/spaces/21/index.html is probably the best place for that so that it finds its way to the right eyes :)


Question regarding use of bf16: I notice that the mixed precision policy is set to None when training in purebf16

In the following code (finetuning.py), I notice that mixed_precision is passed as None when using pure_bf16.
 model = FSDP(             model,             auto_wrap_policy= my_auto_wrapping_policy if train_config.use_peft else wrapping_policy,             cpu_offload=CPUOffload(offload_params=True) if fsdp_config.fsdp_cpu_offload else None,             mixed_precision=mixed_precision_policy if not fsdp_config.pure_bf16 else None,             sharding_strategy=fsdp_config.sharding_strategy,             device_id=torch.cuda.current_device(),             limit_all_gathers=True,             sync_module_states=train_config.low_cpu_fsdp,             param_init_fn=lambda module: module.to_empty(device=torch.device("cuda"), recurse=False)             if train_config.low_cpu_fsdp and rank != 0 else None,         )
However, I wonder that when we are using bf16 should'nt we pass the mixed precision policy (instead of None) which is defined in policies/mixed_precision as follows:
bfSixteen = MixedPrecision(     param_dtype=torch.bfloat16,     # Gradient communication precision.     reduce_dtype=torch.bfloat16,     # Buffer precision.     buffer_dtype=torch.bfloat16,     cast_forward_inputs=True, )
Note: I am interested to do a full parameter finetuning/ continual pretraining, so is it correct to pass mixed_precision argument as None in FSDP wrapper?

Hi @PrateekMunjal
I think the difference between --pure_bf16 and --use_bf16 is that for --use_bf16 we keep a master copy of the model in fp32 while we do computations in bf16. For --pure_bf16 we convert the whole model into bfloat16 here and do not keep the fp32 master copy.
Hope that answers your question.
cc @HamidShojanazeri

Hi @mreso, thanks for your quick reply. Do you mind sharing where can I find this flag "--use_bf16"? I can only see the flag pure_bf16 used in the code almost everywhere.
Another question I wanted to ask is should we pass bfSixteen policy as mixed precision policy in FSDP when we want do full param finetuning in pure_bf16 setting?
bfSixteen = `MixedPrecision(`
    param_dtype=torch.bfloat16,
    # Gradient communication precision.
    reduce_dtype=torch.bfloat16,
    # Buffer precision.
    buffer_dtype=torch.bfloat16,
    cast_forward_inputs=True,
)

FSDP(
            model,
            ...,
            ....,
            mixed_precision=bfSixteen,
            ....
            )

I have this doubt because in currently in the code if we use pure_bf16 we do not pass any mixed precision policy.

Pardon me, I meant --mixed_precision. This will enable mixed precision training with fsdp. Enabling --pure_bf16 is not performing mixed precision as your model will be purely bfloat16. So for fsdp training there are three cases you can chose from:

--mixed_precision which will perform mixed precision with bfloat16
--mixed_precision + --fsdp_config.use_fp16 which will do mixed precision with float16
--fsdp_config.pure_bf16 which does not perform mixed precision but converts the model into bfloat16

For single gpu training there is also --use_fp16 which uses the torch.cuda.autocast context to do mixed precision without fsdp on a single gpu.


SetBreakIntervalsOfVehicle does not work when vehicle id is larger than zero or the method is used for multiple vehicles [cvrptw_break.py]

I tried executing a modified version of cvrptw_break.py, but the solver gets stuck when vehicle_id of SetBreakIntervalsOfVehicle is larger than zero or break intervals are set for multiple vehicles.
I fixed the cvptw_break.py code (just replaced xrange with range and removed from __future__ import print_function ) so that it will work on python 3.
My code is as follows:
#!/usr/bin/env python
# This Python file uses the following encoding: utf-8
# Copyright 2015 Tin Arm Engineering AB
# Copyright 2018 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Capacitated Vehicle Routing Problem with Time Windows (CVRPTW).
   This is a sample using the routing library python wrapper to solve a CVRPTW
   problem.
   A description of the problem can be found here:
   http://en.wikipedia.org/wiki/Vehicle_routing_problem.
   Distances are in meters and time in minutes.
"""

from functools import partial

from ortools.constraint_solver import pywrapcp
from ortools.constraint_solver import routing_enums_pb2

###########################
# Problem Data Definition #
###########################
def create_data_model():
    """Stores the data for the problem"""
    data = {}
    # Locations in block unit
    _locations = \
        [(4, 4),  # depot
         (2, 0), (8, 0),  # locations to visit
         (0, 1), (1, 1),
         (5, 2), (7, 2),
         (3, 3), (6, 3),
         (5, 5), (8, 5),
         (1, 6), (2, 6),
         (3, 7), (6, 7),
         (0, 8), (7, 8)]
    # Compute locations in meters using the block dimension defined as follow
    # Manhattan average block: 750ft x 264ft -> 228m x 80m
    # here we use: 114m x 80m city block
    # src: https://nyti.ms/2GDoRIe "NY Times: Know Your distance"
    data['locations'] = [(l[0] * 114, l[1] * 80) for l in _locations]
    data['num_locations'] = len(data['locations'])
    data['time_windows'] = \
        [(0, 0),
         (75, 85), (75, 85),  # 1, 2
         (60, 70), (45, 55),  # 3, 4
         (0, 8), (50, 60),  # 5, 6
         (0, 10), (10, 20),  # 7, 8
         (0, 10), (75, 85),  # 9, 10
         (85, 95), (5, 15),  # 11, 12
         (15, 25), (10, 20),  # 13, 14
         (45, 55), (30, 40)]  # 15, 16
    data['demands'] = \
        [0,  # depot
         1, 1,  # 1, 2
         2, 4,  # 3, 4
         2, 4,  # 5, 6
         8, 8,  # 7, 8
         1, 2,  # 9,10
         1, 2,  # 11,12
         4, 4,  # 13, 14
         8, 8]  # 15, 16
    data['time_per_demand_unit'] = 5  # 5 minutes/unit
    data['num_vehicles'] = 4
    data['breaks'] = [(2, False), (2, False), (2, False), (2, False)]
    data['vehicle_capacity'] = 15
    data['vehicle_speed'] = 83  # Travel speed: 5km/h converted in m/min
    data['depot'] = 0
    return data

#######################
# Problem Constraints #
#######################
def manhattan_distance(position_1, position_2):
    """Computes the Manhattan distance between two points"""
    return (
        abs(position_1[0] - position_2[0]) + abs(position_1[1] - position_2[1]))

def create_distance_evaluator(data):
    """Creates callback to return distance between points."""
    _distances = {}
    # precompute distance between location to have distance callback in O(1)
    for from_node in range(data['num_locations']):
        _distances[from_node] = {}
        for to_node in range(data['num_locations']):
            if from_node == to_node:
                _distances[from_node][to_node] = 0
            else:
                _distances[from_node][to_node] = (manhattan_distance(
                    data['locations'][from_node], data['locations'][to_node]))

    def distance_evaluator(manager, from_node, to_node):
        """Returns the manhattan distance between the two nodes"""
        return _distances[manager.IndexToNode(from_node)][manager.IndexToNode(
            to_node)]

    return distance_evaluator

def create_demand_evaluator(data):
    """Creates callback to get demands at each location."""
    _demands = data['demands']

    def demand_evaluator(manager, node):
        """Returns the demand of the current node"""
        return _demands[manager.IndexToNode(node)]

    return demand_evaluator

def add_capacity_constraints(routing, data, demand_evaluator_index):
    """Adds capacity constraint"""
    capacity = 'Capacity'
    routing.AddDimension(
        demand_evaluator_index,
        0,  # null capacity slack
        data['vehicle_capacity'],
        True,  # start cumul to zero
        capacity)

def create_time_evaluator(data):
    """Creates callback to get total times between locations."""

    def service_time(data, node):
        """Gets the service time for the specified location."""
        return data['demands'][node] * data['time_per_demand_unit']

    def travel_time(data, from_node, to_node):
        """Gets the travel times between two locations."""
        if from_node == to_node:
            travel_time = 0
        else:
            travel_time = manhattan_distance(data['locations'][from_node], data[
                'locations'][to_node]) / data['vehicle_speed']
        return travel_time

    _total_time = {}
    # precompute total time to have time callback in O(1)
    for from_node in range(data['num_locations']):
        _total_time[from_node] = {}
        for to_node in range(data['num_locations']):
            if from_node == to_node:
                _total_time[from_node][to_node] = 0
            else:
                _total_time[from_node][to_node] = int(
                    service_time(data, from_node) + travel_time(
                        data, from_node, to_node))

    def time_evaluator(manager, from_node, to_node):
        """Returns the total time between the two nodes"""
        return _total_time[manager.IndexToNode(from_node)][manager.IndexToNode(
            to_node)]

    return time_evaluator

def add_time_window_constraints(routing, manager, data, time_evaluator_index):
    """Add Global Span constraint"""
    time = 'Time'
    horizon = 120
    routing.AddDimension(
        time_evaluator_index,
        horizon,  # allow waiting time
        horizon,  # maximum time per vehicle
        False,  # don't force start cumul to zero since we are giving TW to start nodes
        time)
    time_dimension = routing.GetDimensionOrDie(time)
    # Add time window constraints for each location except depot
    # and 'copy' the slack var in the solution object (aka Assignment) to print it
    for location_idx, time_window in enumerate(data['time_windows']):
        if location_idx == 0:
            continue
        index = manager.NodeToIndex(location_idx)
        time_dimension.CumulVar(index).SetRange(time_window[0], time_window[1])
        routing.AddToAssignment(time_dimension.SlackVar(index))
    # Add time window constraints for each vehicle start node
    # and 'copy' the slack var in the solution object (aka Assignment) to print it
    for vehicle_id in range(data['num_vehicles']):
        index = routing.Start(vehicle_id)
        time_dimension.CumulVar(index).SetRange(data['time_windows'][0][0],
                                                data['time_windows'][0][1])
        routing.AddToAssignment(time_dimension.SlackVar(index))
        # Warning: Slack var is not defined for vehicle's end node
        # routing.AddToAssignment(time_dimension.SlackVar(self.routing.End(vehicle_id)))

###########
# Printer #
###########
def print_solution(data, manager, routing, assignment):  # pylint:disable=too-many-locals
    """Prints assignment on console"""
    print('Objective: {}'.format(assignment.ObjectiveValue()))

    print('Breaks:')
    intervals = assignment.IntervalVarContainer()
    for i in range(intervals.Size()):
        brk = intervals.Element(i)
        if brk.PerformedValue() == 1:
            print('{}: Start({}) Duration({})'.format(
                brk.Var().Name(),
                brk.StartValue(),
                brk.DurationValue()))
        else:
            print('{}: Unperformed'.format(brk.Var().Name()))

    total_distance = 0
    total_load = 0
    total_time = 0
    capacity_dimension = routing.GetDimensionOrDie('Capacity')
    time_dimension = routing.GetDimensionOrDie('Time')
    for vehicle_id in range(data['num_vehicles']):
        index = routing.Start(vehicle_id)
        plan_output = 'Route for vehicle {}:\n'.format(vehicle_id)
        distance = 0
        while not routing.IsEnd(index):
            load_var = capacity_dimension.CumulVar(index)
            time_var = time_dimension.CumulVar(index)
            slack_var = time_dimension.SlackVar(index)
            plan_output += ' {0} Load({1}) Time({2},{3}) Slack({4},{5}) ->'.format(
                manager.IndexToNode(index),
                assignment.Value(load_var),
                assignment.Min(time_var),
                assignment.Max(time_var),
                assignment.Min(slack_var), assignment.Max(slack_var))
            previous_index = index
            index = assignment.Value(routing.NextVar(index))
            distance += routing.GetArcCostForVehicle(previous_index, index,
                                                     vehicle_id)
        load_var = capacity_dimension.CumulVar(index)
        time_var = time_dimension.CumulVar(index)
        slack_var = time_dimension.SlackVar(index)
        plan_output += ' {0} Load({1}) Time({2},{3})\n'.format(
            manager.IndexToNode(index),
            assignment.Value(load_var),
            assignment.Min(time_var), assignment.Max(time_var))
        plan_output += 'Distance of the route: {0}m\n'.format(distance)
        plan_output += 'Load of the route: {}\n'.format(
            assignment.Value(load_var))
        plan_output += 'Time of the route: {}\n'.format(
            assignment.Value(time_var))
        print(plan_output)
        total_distance += distance
        total_load += assignment.Value(load_var)
        total_time += assignment.Value(time_var)
    print('Total Distance of all routes: {0}m'.format(total_distance))
    print('Total Load of all routes: {}'.format(total_load))
    print('Total Time of all routes: {0}min'.format(total_time))

########
# Main #
########
def main():
    """Entry point of the program"""
    # Instantiate the data problem.
    data = create_data_model()

    # Create the routing index manager
    manager = pywrapcp.RoutingIndexManager(data['num_locations'],
                                           data['num_vehicles'], data['depot'])

    # Create Routing Model
    routing = pywrapcp.RoutingModel(manager)

    # Define weight of each edge
    distance_evaluator_index = routing.RegisterTransitCallback(
        partial(create_distance_evaluator(data), manager))
    routing.SetArcCostEvaluatorOfAllVehicles(distance_evaluator_index)

    # Add Capacity constraint
    demand_evaluator_index = routing.RegisterUnaryTransitCallback(
        partial(create_demand_evaluator(data), manager))
    add_capacity_constraints(routing, data, demand_evaluator_index)

    # Add Time Window constraint
    time_evaluator_index = routing.RegisterTransitCallback(
        partial(create_time_evaluator(data), manager))
    add_time_window_constraints(routing, manager, data, time_evaluator_index)

    # Add breaks
    time_dimension = routing.GetDimensionOrDie("Time")
    node_visit_transit = {}
    for n in range(routing.Size()):
        if n >= data['num_locations']:
            node_visit_transit[n] = 0
        else:
            node_visit_transit[n] = int(
                data['demands'][n] * data['time_per_demand_unit'])

    break_intervals = {}

    # for v in range(data['num_vehicles']):
    for v in [0]:
        vehicle_break = data['breaks'][v]
        break_intervals[v] = [
            routing.solver().FixedDurationIntervalVar(
                15, 100, vehicle_break[0], vehicle_break[1], 'Break for vehicle {}'.format(v))
        ]
        time_dimension.SetBreakIntervalsOfVehicle(
            break_intervals[v], v, node_visit_transit)

    # Setting first solution heuristic (cheapest addition).
    search_parameters = pywrapcp.DefaultRoutingSearchParameters()
    search_parameters.first_solution_strategy = (
        routing_enums_pb2.FirstSolutionStrategy.PATH_CHEAPEST_ARC)  # pylint: disable=no-member
    # Solve the problem.
    assignment = routing.SolveWithParameters(search_parameters)
    print_solution(data, manager, routing, assignment)

if __name__ == '__main__':
    main()

In this code and cvptw_break.py, for v in range(data['num_vehicles']) is commented out. If I replace for v in [0]: with for v in range(data['num_vehicles']) (multiple vehicles) or for v in [1](any integer larger than zero), the solver gets stuck.
There seems to be similar issues posted on GitHub (#1243, #1257, #1652) so I suspect this is a bug.

It's also noted in https://github.com/google/or-tools/issues/1653

@gsittyz according to my tests, it is not about vehicle id, but the number of vehicles

Is there a timeline for when this will be fixed? We wrote our solution in C# and we are completely stuck now.

I would like to add +1 to upvote the need of fixing this issue. It seems the bug persists in C++ version as well, and the solver can't find the solution once the number of vehicles is larger than 1:
// Add vehicle breaks: 45 min between 9:00 and 11:00
ort::Solver* solver = routingModel.solver();
for (int vehicle = 0; vehicle < dmap.num_vehicles; ++vehicle) {
   std::stringstream ss;
   ss << "Break on vehicle " << vehicle;
   ort::IntervalVar* break_interval = solver->MakeFixedDurationIntervalVar(1*3600, 3*3600, 45*60, false, ss.str());
   timeDimension->SetBreakIntervalsOfVehicle({break_interval}, vehicle, dmap.service_times);
 }

I am using OR-Tools version 8.1.8487

I would like to add +1 to upvote the need of fixing this issue. It seems the bug persists in C++ version as well, and the solver can't find the solution once the number of vehicles is larger than 1:
// Add vehicle breaks: 45 min between 9:00 and 11:00
ort::Solver* solver = routingModel.solver();
for (int vehicle = 0; vehicle < dmap.num_vehicles; ++vehicle) {
   std::stringstream ss;
   ss << "Break on vehicle " << vehicle;
   ort::IntervalVar* break_interval = solver->MakeFixedDurationIntervalVar(1*3600, 3*3600, 45*60, false, ss.str());
   timeDimension->SetBreakIntervalsOfVehicle({break_interval}, vehicle, dmap.service_times);
 }

I am using OR-Tools version 8.1.8487

Hello,
Upvoting it too!
Using python or-tools 8.1.8487
Thanks!

Hello @Mizux
Any progress regarding this issue?


[Location] Allow service to be invoked at regular intervals

This is work in progress. The intention is to have the service run so that if a new location is available while in doze mode, it should be able to retrieve it, however the alarm could be used to perform other actions

Completed


Fix requeue message command

REQ command used to trigger the following error:
ERROR [tokio_nsq::connection] fatal protocol error = E_INVALID invalid command 90000

Because the REQ command was malformed (a spurious \n between the id and the timeout.

Rebased on master

Thanks!


new: Write a Get involved/Review & submit pull requests

Published file: https://athensresearch.gitbook.io/handbook/community/get-involved/learning-at-athens-academy-education/review-and-submit-pull-requests
Markdown file: https://github.com/athensresearch/handbook/blob/main/community/get-involved/learning-at-athens-academy-education/review-and-submit-pull-requests.md

Should probably be re-titled Submit & review pull requests, as submission is typically the first step to becoming a contributor with enough privileges to review PRs from others.
More information coming soon.

Fixed by 022143f


Change Map to a VectorMap implementation

Not 100% decided on this, here are the tradeoffs (and finally to remove confusion).
In javascript/ruby (and other mutable by default languages), the HashMap structure preserves ordering on insertion. In Scala, the immutable Map preserves insertion ordering on creation (via the usage of .newBuilder or by direct constructor) however if you use the various immutable copy with new value methods (i.e. +/-) then there is no guarantee of ordering. This means that in typical Scala use, we do maintain ordering because very few people in practise update + copy the immutable map in a way thats noticable in regards to JSON serialization.
Using immutable Map
Pros

Heavily tested
Good performance characteristics in all cases
Less memory usage
Key ordering issue not usually a problem due to how typical JSON serializers/deserializers work
Immutable

Cons

Not the same behaviour as expected in regards to preserving key ordering in all cases

Using VectorMap (see https://github.com/mdedetrich/scalajson/pull/19)
Pros

Adheres to the same behaviour in Javascript regarding insertion for all cases
Immutable
Decent performance characteristics for typical cases (insertion/lookup)

Cons

Not battle tested
Performance of certain operations (i.e. removal of key)
Memory usage (maintains two datastructures at once)

Using mutable LinkedHashMap
Pros

Good performance in all cases
Maintains key order in insertion cases
Battle tested
Low memory usage

Cons

Mutable

@Ichoran your thoughts?

I think it really depends how much slower VectorMap is than a normal immutable map.  In general you might have a lot of JSON objects, so anything that is too heavyweight should probably be rejected.  What does Circe do?

@Ichoran Circe uses a normal map according to @travisbrown. Argonaut, which is scalaz's version of Circe, uses this implementation (see https://github.com/argonaut-io/argonaut/blob/master/argonaut/shared/src/main/scala/argonaut/JsonObject.scala). I will add some benchmarks and do some more work to see what the tradeoffs are. With specialization of classes the slowdown in typical cases shouldn't be that high

For what it's worth I've been working on a branch in circe where I use java.util.LinkedHashMap by default and switch to the Map + IndexedSeq representation when someone uses add or remove, and it seems to speed things up significantly.

@travisbrown Mind linking the branch? Also how do you deal with concurrency/threading issues (or I assume you just hide it internally and its not exposed)

It's still a mess and I haven't pushed it yet. But yeah, the LinkedHashMap is never exposed—it's just used in the cases where you're building up a map from a bunch of key-value pairs all at once.

We use LinkedHashMap in play-json but only expose Map. Thus it is possible to use a more efficient Map implementation if you don't care about ordering.
If this library intends to be the API actually used by end-users, it would be nice if it provided that flexibility.

@gmethvin I think the goal is going to be that we will see how VectorMap works out. If its very competitive with Map then this implementation is whats going to be used, else we will do similar to what PlayJson does.

@Ichoran I have made a seperate repo for the vector map (now called LinkedMap) implementation at  https://github.com/mdedetrich/linked-map. With some very rudimentary benchmarks, it appears that LinkedMap is a fair bit slower than a standard Map (see https://github.com/mdedetrich/linked-map/issues/2 for some workarounds)


Update commands reference

I've updated a bit of this based on the User's Manual. I have a bad photocopy of it, LMK if you have questions. Don't seem to have an appropriate serial cable to try this out, though the 0.7mm pens work at least OK after 40 years (?!) using the control panel.
Someone at Apple did a write-up on this plotter... I want to say about 10 years ago.

This is fantastic! I was hoping someone would pop up with a copy of the manual. Thanks so much!


Turn on Existential Metatypes for Parameterized Existential Types

These were accidentally left off - turn them on subject to the
-enable-parameterized-existential-types flag.

@swift-ci smoke test

@swift-ci smoke test

@swift-ci smoke test

@swift-ci smoke test Linux platform


Understand the APIs

[ ] Understand how the API works
[ ] For the initial version of the app which APIs are going to be used and get a clear idea of it

Preference are variants in shopify
Options are variants in shopify
Tags are present below Read the science behind the program.
Descriptions is from shopify.
Every variant is having its own price as per shopify.

Things that are not clear:

Subscription menu


Documentation

readthedocs?

As this is a simple app, going to leave this to the GitHub README file.


Fails to load enums from tsconfig path since 24.1.0

Issue :
Since version 24.1.0 the loading of enums via tsconfig path mapping fails.
If I import a enum from a relative location ../foo.enum the test succeeds, but when using a tsconfig path @myorg/foo it throws with the following error:
TypeError: Cannot read property 'EnumValue' of undefined
It works until version 24.0.2

Hi @twittwer, for a simple use case you can use this module
example:
// jest.config.js

const tsconfig = require("./tsconfig.json")
const moduleNameMapper = require("tsconfig-paths-jest")(tsconfig)

module.exports = {
  // rest of config...
  moduleNameMapper,
}

actually, for most use cases this should be enough.

@twittwer totally agree that it may not be the right solution, but at least it working until we find the right one.

Hi, have you guys tried moduleNameMapper in jest config ? If you define path mapping in tsconfig, you also need to inform jest about that path mapping.

@ahnpnl that's exactly what this module "tsconfig-paths-jest" does.

yes, either you can use that internal function provided by ts-jest, or you can use normal regex.
@twittwer the issue isn't caused by ts-jest version. I hope the solution provided by @AhmedMKamal answered your question.

@ahnpnl why is it not caused by ts-jest, when the only change between a working and a broken state is the update of ts-jest from version 24.0.2 to 24.1.0

I checked the CHANGELOG and commits there isn't anything related to this issue. I suspect it might be caused by something else.

hi @twittwer , do you have a sample repo ?

@ahnpnl Not yet, but I can setup one next week


Release 2.1.108

Backlog:

[ ] The __pex__ import hook does not handle registering top level PEP-420 packages #1910
[ ] The --resolve-local-platforms option does not work with --complete-platforms #1899
[ ] Expose setuptools and wheel version flags for use with non-vendored Pips. #1895
[ ] Plumb --pip-version to Platform tag calculation. #1894
[ ] venv_dir calculation doesn't correctly handle PEX_PYTHON_PATH with symlinks. #1885

[ ] PEX_INHERIT_PATH+default shebangs don't interact well with virtualenvs #1344
[ ] Pex interpreter cache is not upgrade / downgrade safe. #1176
[ ] Provide a better resolve error message for a Platform DistributionTarget when --resolve-local-platforms. #1070
[ ] Remove PEX_PYTHON_PATH from build time interpreter selection. #1075

Broken off from "Release 2.1.107 https://github.com/pantsbuild/pex/issues/1921" to make way for a fix for handling git+ssh VCS urls with credentials in locks.


Missing Reference after building dlls

hello, I'm having 2 errors.
The type or namespace name 'GLTF' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Steps I've followed:

downloaded the project.
with gltfserialization.sln file I've built the dll and the dlls have appeared in the plugins folder

but I'm still getting these errors any fix.?
thanks

Should be fixed in the latest release!


Add to stackage?

I noticed you have a stack.yaml file, but you've not included it in any of your pull requests. Would it be a good idea to include this?

You could include one to make it easier for developers using stack. But it also ties you to a fixed LTS or nightly, which is not so good. This means you also have to update it from time to time.
stack.yaml:
packages:
- .
resolver: lts-7.13

In general, I would recommend stack.yaml for applications which have huge dependencies or if the dependencies are pulled from git or the filesystem. Especially if stack is the recommended build tool for the given application which is not necessarily the case here.
To add unlit to stackage, you just have to add two lines to https://github.com/fpco/stackage/blob/master/build-constraints.yaml and then it is automatically pulled in!

ping @pepijnkokke!
Any update on that? If you want I can also add it to stackage.

Sorry, I’m currently quite busy, but – sure, go ahead!

On 24 Dec 2016, at 15:45, Daniel Mendler<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
ping @pepijnkokke https://github.com/pepijnkokke!
Any update on that? If you want I can also add it to stackage.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/pepijnkokke/unlit/issues/3#issuecomment-269087157, or mute the thread https://github.com/notifications/unsubscribe-auth/ADzKZdR2DiCkzqun8Ian--wmZgcxeoG4ks5rLTAcgaJpZM4LO6dp.
https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png https://github.com/pepijnkokke/unlit https://github.com/pepijnkokke/unlit/issues/3#issuecomment-269087157

In this PR above I am listed as the stackage maintainer for the package, which is ok according to stackage rules. We can change that afterwards when you have more time or if you prefer to be listed yourself. Maintainer is just the one who is notified if something breaks or before the package is kicked out ;)


Added dog_shoot_stop procedure and custom_counter parameter

I've added two things:

a "custom_counter" parameter in the definition of the mobs to be used to count things maybe inside the do_custom function or the custom_attack function;
a new procedure called "dogshoot_stop":  the mobs which have dogshoot_stop = true in the definition now, after a certain amount of distance attacks (defined as dogshoot_stop_number, default = 5), they come catch you and after the same amount of melee attacks they can shoot to you again if you are not any more in their reach radius.
Don't worry this is probably my last PR to you (for now ;)..)

custom counters can be easily added to do_custom without changing the api, check out the rat definition in mobs_animal for an example...
dogshoot switching feature added but with changes, dogshoot_switch is added (start with 1 for shoot, 2 for dogfight) and dogshoot_count_max is number of seconds before switching between states.


Update: astral-sh.ruff version 0.3.1

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Hi @frazar,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 869.)

Automatic Validation ended with:

Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Packages\astral-sh.ruff__DefaultSource\ruff.exe returned exit code: 2
Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Links\ruff.exe returned exit code: 2
Installation failed with exit code -1978335187
2024-03-08 06:28:14.465 [FAIL] Installer failed security check. Url: https://github.com/astral-sh/ruff/releases/download/v0.3.1/ruff-0.3.1-i686-pc-windows-msvc.zip Result: 0x80004005

(Automated response - build 869.)

Hi @frazar,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 869.)

Automatic Validation ended with:

Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Packages\astral-sh.ruff__DefaultSource\ruff.exe returned exit code: 2
Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Links\ruff.exe returned exit code: 2
Installation failed with exit code -1978335187
2024-03-08 06:28:14.465 [FAIL] Installer failed security check. Url: https://github.com/astral-sh/ruff/releases/download/v0.3.1/ruff-0.3.1-i686-pc-windows-msvc.zip Result: 0x80004005

(Automated response - build 869.)

The installer package is just a zip file of the executable, ruff.exe.
No installation is required, but if you run ruff.exe without any argument, it will give exit code 2 (as intended) because some arguments must be supplied.
C:\Users\fzardi>ruff
Ruff: An extremely fast Python linter.

Usage: ruff [OPTIONS] <COMMAND>

Commands:
  check    Run Ruff on the given files or directories (default)
  rule     Explain a rule (or all rules)
  config   List or describe the available configuration options
  linter   List all supported upstream linters
  clean    Clear any caches in the current directory and any subdirectories
  format   Run the Ruff formatter on the given files or directories
  version  Display Ruff's version
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Log levels:
  -v, --verbose  Enable verbose logging
  -q, --quiet    Print diagnostics, but nothing else
  -s, --silent   Disable all logging (but still exit with status code "1" upon detecting diagnostics)

Global options:
      --config <CONFIG_OPTION>  Either a path to a TOML configuration file (`pyproject.toml` or `ruff.toml`), or a TOML
                                `<KEY> = <VALUE>` pair (such as you might find in a `ruff.toml` configuration file)
                                overriding a specific configuration option. Overrides of individual settings using this
                                option always take precedence over all configuration files, including configuration
                                files that were also specified using `--config`
      --isolated                Ignore all configuration files

For help with a specific command, see: `ruff help <command>`.

C:\Users\fzardi>echo %errorlevel%
2

However, it seems like the Windows Defender scan expects the exit code to be different from 2 and fails otherwise.
How can I fix this?

@wingetbot run

Hi @frazar,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 870.)

Automatic Validation ended with:

Installation failed with exit code -1978335187
2024-03-13 12:32:54.827 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(757)\WindowsPackageManager.dll!00007FF9F3CBC11F: (caller: 00007FF9F3A48D6F) LogHr(1) tid(d48) 8A15005E     Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!00007FF9F3BC2B08: (caller: 00007FF9F3C6BC20) Exception(1) tid(d48) 8A15005E ]
2024-03-13 12:32:54.827 [REPO] Failed to open available source: msstore
2024-03-13 12:32:56.825 [CLI ] Caught wil::ResultException: D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!00007FF9F3BC2B08: (caller: 00007FF9F3C6BC20) Exception(1) tid(d48) 8A15005E
2024-03-13 12:33:02.893 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(757)\WindowsPackageManager.dll!00007FF9D923C11F: (caller: 00007FF9D8FC8D6F) LogHr(1) tid(1118) 8A15005E     Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!00007FF9D9142B08: (caller: 00007FF9D91EBC20) Exception(1) tid(1118) 8A15005E ]
2024-03-13 12:33:02.893 [REPO] Failed to open available source: msstore
2024-03-13 12:33:18.795 [FAIL] Installer failed security check. Url: https://github.com/astral-sh/ruff/releases/download/v0.3.1/ruff-0.3.1-x86_64-pc-windows-msvc.zip Result: 0x80004005
2024-03-13 12:32:22.412 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(757)\WindowsPackageManager.dll!68F6535B: (caller: 68E61A80) LogHr(1) tid(1488) 8A15005E     Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!68FAB5DD: (caller: 690412BF) Exception(1) tid(1488) 8A15005E ]
2024-03-13 12:32:22.412 [REPO] Failed to open available source: msstore
2024-03-13 12:32:23.961 [CLI ] Caught wil::ResultException: D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!68FAB5DD: (caller: 690412BF) Exception(1) tid(1488) 8A15005E
2024-03-13 12:32:29.337 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(757)\WindowsPackageManager.dll!545A535B: (caller: 544A1A80) LogHr(1) tid(734) 8A15005E     Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!545EB5DD: (caller: 546812BF) Exception(1) tid(734) 8A15005E ]
2024-03-13 12:32:29.337 [REPO] Failed to open available source: msstore
2024-03-13 12:32:44.478 [FAIL] Installer failed security check. Url: https://github.com/astral-sh/ruff/releases/download/v0.3.1/ruff-0.3.1-i686-pc-windows-msvc.zip Result: 0x80004005

(Automated response - build 870.)

I guess this PR requires the manual approval of a moderator like its successor PR, #143774.

@wingetbot run


Make secondary ranges a list instead of map

This will help us to use deployment name as a prefix to differentiate across VPCs, subnets, cluster and node pools
This PR lets you do something like
secondary_ranges:
- subnetwork_name: $(vars.deployment_name)-sub-0
  ranges:
  - range_name: pods
    ip_cidr_range: <IP_ADDRESS>/14
  - range_name: services
    ip_cidr_range: <IP_ADDRESS>/20

which wasn't possible earlier, as $(vars.x) can't be used for a yaml key
This in turn will let you create a new identical cluster for GKE by changing a single variable. Currently, we need to change 4-8 different names based on the cluster type
Testing

Applied with current code, planned with this branch and validated there is no diff
Verified secondary CIDRs on pantheon
Ran all GKE integration tests- all pass

Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.

Fork your PR branch from the Toolkit "develop" branch (not main)
Test all changes with pre-commit in a local branch #
Confirm that "make tests" passes all tests
Add or modify unit tests to cover code changes
Ensure that unit test coverage remains above 80%
Update all applicable documentation
Follow Cluster Toolkit Contribution guidelines #

Question: You mentioned this would help us to use deployment name as a prefix to differentiate across VPCs, subnets, cluster and node pools. Could you share a code pointer where you are adding the deployment name prefix dynamically(as you explained in the example)?
Could you add examples/ screenshots to showcase the difference in the name/id of networks being created before and after this change?

Question: You mentioned this would help us to use deployment name as a prefix to differentiate across VPCs, subnets, cluster and node pools. Could you share a code pointer where you are adding the deployment name prefix dynamically(as you explained in the example)?
Could you add examples/ screenshots to showcase the difference in the name/id of networks being created before and after this change?

resolved offline


Add support for ignoring diacritics; Use  tags for highlighting

Sorry to introduce two changes in the same PR. I also fixed some deprecation warnings with React by moving to React.createElement style. If this is a real problem, feel free to either modify it yourself or ask me to do it in comments.
This PR adds two props: ignoreDiacritics and diacriticsBlacklist. The code uses unicode normalization to separate and combine diacritical marks from characters.
ignoreDiacritics
ignoreDiacritics allows ignoring diacritical marks when matching. For instance cafe will match café and á will match a. Currently both search and subject are simplified, so it is not possible to make á not match a, except when using diacriticsBlacklist.
diacriticsBlacklist
diacriticsBlacklist contains a list of characters excluded from diacritics removal. For example:
<Highlight
  search='Café Ääkkönen'
  ignoreDiacritics=true
  diacriticsBlacklist='ÄäÖö'
>

Will match Cafe Ääkkönen and café ääkkönen but not cafe aakkonen.

Changes Unknown when pulling b1e281fcd9a7aac976b4c8f48c5da61045141df3 on Dentosal:master into ** on helior:master**.

Changes Unknown when pulling ba937abb2b5922d1cc88dee82be4121a1217d747 on Dentosal:master into ** on helior:master**.

This is a rad feature @Dentosal, thanks for your contribution! I'll give this a review sometime during the long-weekend.

@helior Any problems with this? Feel free to ask if there are any issues.

@Dentosal no issue with these changes, other than the current merge conflicts; also, I haven't tested this locally. If you want to make the updates I'll merge when they're ready, otherwise I'll have to put some time aside to button this up and get it merged. A lot of people will appreciate this contribution, thanks again!

@helior I've rebased @Dentosal's changes on top of the current master (with some commit squashing/splitting), and tested the result with our app. I left normalize as is - if you need IE11 support, you can use a polyfill for that.

@helior Is there something you'd like to see changed before merging this?


Scaler for (N,T,C) and (N,C,T) tensors

fixed the scaler to work on time first and time last shaped tensors.
Issue #, if available:
#765
Description of changes:
The scaler now takes axis argument to specify the axis over which to calculate the scaling.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lostella if you can kindly merge, i'll send you the LSTNet fix next.

thanks @lostella


Fix: monitoring BPF maps

This pr Closes #1774 considering all its points and 1st part of https://github.com/cilium/tetragon/issues/1775
Let's break down the changes applied considering #1774 point wise

seems to be solved by removing eventcache as it was supposed to be on user side and the user side EventCacheCount seems sufficient

_gauge suffix removed

processLru migrated towards ProcessCacheTotal as separate metric and eventcache removed as said in 1)

map_errors_total text rewritted

map_drops_total removed and in its place ProcessCacheEvicted used

WIP !

Moved to draft since it seems to be WIP.

Moved to draft since it seems to be WIP.

yes thank you @kkourt

ready to review

@sadath-12 I see your PR has conflicts with the main branch, can you rebase?

Done @lambdanis

@sadath-12 It seems commits are still a bit off. You can check this in the checkpath action run (here.
There should be no merge commits, and ideally different tasks you implemented in this PR should be separate commits - they're quite independent of each other, so separate commits would make it easier to review the git history. I think it would be good to rewrite the git history here:
git reset HEAD~2
git add -p
# add only changes for a single task
git commit
# repeat git add, git commit for other tasks

@lambdanis  thank you . But I get 100's of files  in staged section when I run the reset command . Any efficient solution for this  please ?

Hi @lambdanis  in order to resolve the conflict . I pull this branch and do git merge --squash main and then git rebase -i HEAD~2 when i enter the first interactive terminal to squash the 2nd commit and then 2nd terminal to write my final commit I see all the merged commits information which is very hard to remove them one by 1 . there are 100's of them . Any solution

Please fix the merge commit to have a proper description. Also<EMAIL_ADDRESS>seems to be messing up our signed-off-by detection. Could you replace it with your email like you did for the other commit?

Needs formatting with goimports.

Hi I tried arranging the commits properly but it seems to be a mess . I tried various methods such as resetting to my original commit and then doing merge-squash . I also tried what @lambdanis  suggested , to reset and undo the merges I did that but when I push It does not sync with main branch and asks me to resolve conflicts

@sadath-12 Could you split the changes into logical commits? As there are five different fixes, it would make sense to have five separate commits for them in this case.

Hi @lambdanis  . If there are 5 commits and let's say there was a review on the 3rd commit and pushed the new changes by squashing would it reflect on the 3rd commit ? . Requesting you to accept this in 1 commit itself as they are very small changes and I have given explanation on description

Requesting you to accept this in 1 commit itself as they are very small changes and I have given explanation on description

Could you reflect this description in the commit message body? It's empty at the moment.

@sadath-12 also it should be relatively easy to split this into separate commits. Here's how you can do it:
0. Make a backup copy of your branch with git branch -c backup

git reset --soft HEAD~1 to remove the existing commit but keep the changes.
git add -p
Select the changes you want to include in commit 1 following the instructions on the screen.
When you're done, write the commit message.
Repeat step 2-4 until there are no changes left.
When you're happy with it, force push.

Ya I can separate the commits like 1,2,3,4 . if after review I get changed related to 2nd commit how I make a new change and squash it under 2 ?

Ya I can separate the commits like 1,2,3,4 . if after review I get changed related to 2nd commit how I make a new change and squash it under 2 ?

@sadath-12 Create a temporary commit, then use git rebase -i HEAD~4 (interactive mode which allows you to rewrite the git history - reorder, squash, amend previous commits).

g too l

ya reworded that . Tried to explain in description without making much sense (but enough) in the title of commit msg

@sadath-12 I see the CI is failing because of a commit message being too long: https://github.com/cilium/tetragon/actions/runs/8004683889/job/21862554217?pr=1950
Could you rephrase it to fit the characters limit?

ya reworded that . Tried to explain in description without making much sense (but enough) in the title of commit msg

@lambdanis @willfindlay could you take a look and merge if its ready to go? Thanks. CI failure there is something unrelated, I see this failure from time to time.

Thanks @sadath-12 for the updates. The code changes look good now. I rewrote the commit messages to describe exactly which metrics changed and split some commits to not mix up different changes. I dropped the _gauge suffix removal, as it's a breaking change that's hard to justify as a bug, so it shouldn't be mixed up in one PR with unrelated changes IMO. I also rewrote the PR description to include a release note.

The CI failure is a known issue: https://github.com/cilium/tetragon/issues/2010. I'm merging this PR.


Add images for papers (Fixes #98)

Images for papers are generated using https://github.com/Mini-Conf/image-extraction
Fixes #98
TODO: Add default image for ~50 papers for which no image was extracted by the tool.

Thanks Hao. I did not add a default image yet. If we can decide on what default image we can use, I will add them too.

@prabhat1081 Can we use ACL-logo as the default image? You can create a new PR for this. Thanks!

Ok thanks!!


2.1.0

Added npm script
Fixed bug css issue

#66 #69 #70

Thanks, looks like the PR I merged was similar to this one. If you have the time, it would be great if you could review what's in master and maybe PR the differences or any fixes.