Debug builds contain incorrect relative paths

I'm not sure if this is an issue with numpy's meson-python usage or an issue that meson-python can fix for all projects, so please feel free to close if we should fix this in numpy's meson configuation.
When I build numpy with debug symbols, the resulting numpy installation contains paths to source files that are correct for the build directory but incorrect for the installed distribution.
Installing numpy's main branch with:
$ python -m pip install . -v --no-build-isolation -Csetup-args="-Dbuildtype=debug"

Will successfully build and install numpy. However, if you try to run numpy under a debugger, it won't be able to find the source code unless the search path is fixed manually:
○  gdb --args $(pyenv which python) -c "import numpy as np; np.array([1, 2, 3])"
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/nathan/.pyenv/versions/3.10.9-debug/bin/python...
(gdb) break PyArray_FromAny
Function "PyArray_FromAny" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (PyArray_FromAny) pending.
(gdb) r
Starting program: /home/nathan/.pyenv/versions/3.10.9-debug/bin/python -c import\ numpy\ as\ np\;\ np.array\(\[1,\ 2,\ 3\]\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, PyArray_FromAny (op=<float at remote 0x7ffff6b8f1f0>, newtype=0x0, min_depth=0, max_depth=0, flags=0, context=0x0) at ../../numpy/core/src/multiarray/ctors.c:1509
1509	../../numpy/core/src/multiarray/ctors.c: No such file or directory.
(gdb) set substitute-path ../../numpy /home/nathan/Documents/numpy/numpy
(gdb) n
1510	    npy_dtype_info dt_info = {NULL, NULL};

Thanks for the report @ngoldbaum. I suspect that this is a Meson issue, rather than a meson-python one. I don't think we do anything nonstandard in the NumPy build to cause this. I quickly searched the Meson issue tracker, but came up empty. Perhaps this report triggers a memory for someone; if not I can do some more digging later.

This shouldn't have anything to do with meson either -- the debug section of the resulting compiled binary object should have two fields:

DW_AT_name, containing the input filename as passed to the compiler (meson writes out build rules containing relative paths, hence ../../numpy/core/ )
DW_AT_comp_dir, containing the working directory of the compiler, which the input filename in the event of a relative path is considered relative to

If I had to hazard a wild guess as to the cause, the original compilation working directory is invalid and gdb cannot figure out the relationship between it and working source code. This may be because pip created a temporary copy of the entire source tree (some versions did that) or it may be because the builddir was deleted and gdb is not sure that it isn't a symlink or something. I was able to reproduce the issue locally with a test project by deleting the build directory on its own.

Thanks for the hint about the build directory getting deleted, that's the problem. I see in the meson-python docs that if I set builddir explicitly when I build numpy, the build directory should get left behind. And indeed, it does, and that fixes the issue.
I'll make sure this gets discussed in the numpy developer guide.
Ideally we'd be able to use editable builds for this but in practice that doesn't work for me because I need to build other projects against the numpy editable build and getting that to work will require some changes to the numpy. For now we need to make it clear to contributors that a smooth debugging experience requires a persisted build directory.

I've also run into this issue. The behaviour seems to be quite different, depending on whether -Cbuilddir is used. Without it, the name of the (ephemeral) build directory gets baked into the DWARF Directory Table e.g. it will have entries like ../../.mesonpy-quscxr6p/build/../../src. When I specify builddir=build, it doesn't seem to go up and down the tree any more, and the corresponding entry is just ../src, which should then be usable with gdb for any build directory that's at the same nesting level.


Cannot access viewer from local machine

First of all, thanks for your amazing work!
I cannot open the viser viewer on my local machine. The script runs and prints the links but when clicking it, I receive an "Unable to connect page".
Thanks in advance

I have the same problem, is there any solution?

I was running LERF in a docker. The problem was related to that.


Translate cluster-administration/logging.md in Korean

This fixes #20269 .
This PR contains the following files:

[x] content/ko/docs/concepts/cluster-administration/logging.md
[x] content/ko/examples/admin/logging/fluentd-sidecar-config.yaml
[x] content/ko/examples/admin/logging/two-files-counter-pod-agent-sidecar.yaml
[x] content/ko/examples/admin/logging/two-files-counter-pod-streaming-sidecar.yaml
[x] content/ko/examples/admin/logging/two-files-counter-pod.yaml
[x] content/ko/examples/debug/counter-pod.yaml

/language ko

Preview: https://deploy-preview-20288--k8s-dev-ko.netlify.com/ko/docs/concepts/cluster-administration/logging/

This document contains link to Elasticseach document that I've just translated. So, I updated this link and now this document depends on #20300 .

#20258 comment 의견에 따라 띄어쓰기 수정했습니다.

PR #20409 를 새로 올렸습니다. 본 PR은 close 하겠습니다.


Modified "Diff can diff with a null tree" test.

Number of patches returned is 84 or 85 depending on something unknown at this time.  Hopefully we can eventually resolve the root cause of the difference.

Something is clearly polluting the test environment as you run tests since this specific test can pass/fail if other tests are run or skipped. We should track this down but for right now we can use this as a work-around.


Ardougne cape does not count as a teleport item in Menu Entry Swapper

Curious if this is intended.
After selecting "teleport item" under menu entry swapper, the crafting cape becomes left-click to teleport. But Ardougne cape does not.

This is intended--that swap specifically only swaps "Teleport" and "Rub" options for teleportation items and jewellery. You can use the customizable shift-click options of the plugin to get shift+left-click teleports with your Ardougne cloak.

Just to piggyback before this is lost to the ether, Menu Swapper Extended on the plugin hub has the ability to change the left click option for the Ardougne Cloak.

@Nightfirecat then why does it swap the options for the crafting cape?

Because the crafting cape has a "Teleport" option.


[CONSOLIDATED]  Swag Update

[ ] https://github.com/eclipse/microprofile-marketing/issues/625

[x] https://github.com/eclipse/microprofile-marketing/issues/605

[ ] https://github.com/eclipse/microprofile-marketing/issues/594

[ ] https://github.com/eclipse/microprofile-marketing/issues/595

[x] https://github.com/eclipse/microprofile-marketing/issues/596

[x] https://github.com/eclipse/microprofile-marketing/issues/598

[x] https://github.com/eclipse/microprofile-marketing/issues/599

completed.
@caitmm43 :)


Create lint-and-test job for Github Workflow

Lint and test github workflows are currently up and running. Closing this.


JOSS review: Build vignettes when installing package

When installing the package, the vignettes dont build automatically. This should be a relatively simple fix. All that is required is changing the README from-
devtools::install_github('NeotomaDB/neotoma2')
to
devtools::install_github('NeotomaDB/neotoma2', build_vignettes=TRUE)
UPDATE: I confirmed that the build_vignettes passes when indtalling. So, this can easily be updated in the README.
https://github.com/openjournals/joss-reviews/issues/5561

I have added the new line to the README as requested. Thanks!


[FLINK-17301] Set BIND_HOST to localhost in TaskManagerRunnerStartupTest

What is the purpose of the change
This PR sets the BIND_HOST to localhost in TaskManagerRunnerStartupTest in order to make the test fail again when instantiating the NettyShuffleEnvironment. Moreover, it changes the test to use a proper AkkaRpcService instead of a mock in order to not hide the true failure cause under some NPE.
This PR is based on #11865 a revert for FLINK-14499, which is simply wrong and needs to be reverted.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

Thanks for the review @GJL. Merging this PR now.


i belive this document is total wrong !!

[Enter feedback here]

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

ID: aac07d83-45c1-324d-d292-b79e04939cdc
Version Independent ID: 76985863-66fa-1583-7632-27949149d90c
Content: Upgrading AppSource Apps in Production - Business Central
Content Source: dev-itpro/developer/devenv-upgrade-appsource-app-in-prod.md
Service: dynamics365-business-central
GitHub Login: @SusanneWindfeldPedersen
Microsoft Alias: freddyk

upgrade should always be done via the admin and never via uninstalling .
if there is some kind of error on the upgrade then you will not be able to roll back

Hi,
Thanks for your feedback. We will update the change in the next publish version.
Best regards,

Hi @Markstewartpedersen ,
Thank you so much for your suggestion.  I checked with developers but currently we only support such way to upgrade. What you worried is right. Could you go to this website https://experience.dynamics.com/ideas/ to share your idea?  Then we can schedule it. Here is the repo for doc only. 😸
Best regards,


Configurable Certificate Expiry and Cert Renewal

With an old enough environment, DX's certs can expire when using cert-manager managed certificates. cert-manager automatically renews the cert but there's then a few challenges:

Having DX pod be aware of the renewed cert and restarting
Using the appropriate FF APIs to have the new DX cert be broadcasted out to everyone in the network

First step, is we could let the expiry time of the cert be configurable in case folks want their certs to last longer than the default 3 months. And then, we'll need to figure out what combination of sidecars, annotations, and Jobs need to be put in place to solve the above.

Worth mentioning a few additional caveats related to this issue:

For better or worse, if the Secret containing the TLS certs is updated by cert-manager or some other entity, Kubernetes does not automatically update the certs in the DX pod's volume mount due to our intentional use of subPath: https://github.com/kubernetes/kubernetes/issues/50345. This is "good" because even if the cert is renewed / updated, DX won't start using it until the operator of the chart somehow restarts the pod and then can focused on re-registering the DX certs.
If a Certificate is deleted due to a helm uninstall or other reasons, cert-manager keeps the underlying TLS Secret around to prevent accidental deletion of certificates issued by issuers which might rate-limit cert requests i.e. LetsEncrypt. While that is nice in the accidental deletion case, for us its important to then treat TLS Secrets like DX's PVCs - they are stateful and if you are intentionally deleting your Helm release to reset a FireFly network it is important it is deleted as well.
Another factor to consider is the expiry of the CA issuer's Certificate. If using the CA issuer setup from this repo, the Certificate is currently not setting duration and therefore results in expiring every 90 days. So even if your certs are being renewed or your FireFly networks are being frequently reset, theres the case to consider where the DX certs themselves are still "valid" but the CA expires and that itself has to be renewed, then the DX certs, and then that has to be broadcasted to members in the network.
DX currently has no functionality for reloading its own certificates from disk. Currently it will refresh the CA certs for the other peers periodically and with certain API calls: https://github.com/hyperledger/firefly-dataexchange-https/blob/10b23db379753b83c40da210fb86ceea4226cb42/src/app.ts#L45-L48. And although the TLS context is re-made, the init function for reading the certificates from disk is never called. An API endpoint (similar to Prometheus) for refreshing its certs (and possibly telling FireFly to broadcast the updated certs) would be ideal in this case.

As a follow up to 2) from https://github.com/hyperledger/firefly-helm-charts/issues/37#issuecomment-1097262256, it appears cert-manager is configurable around how it handles Secret deletion: https://cert-manager.io/docs/usage/certificate/#cleaning-up-secrets-when-certificates-are-deleted
One can set --enable-certificate-owner-ref if they wish to ensure deleted Certificates delete Secrets as well.


4k display but only get 640*640 screenshot, the speed is very slow, around 40fps,mss acheves 60fps stabel

Try this https://github.com/AI-M-BOT/DXcam/releases/tag/1.0

thanks for reply, but I still get low performance [DXcam] FPS benchmark: 37.216590407205736

try using another main file that has better performance. the onnx ones are faster. also you can go into the code and change the first lines where it says "640, 640" to any resolution you want


Incompatible with Create (latest ver)

Description
Can't launch minecraft with ShoulderSurfing-Forge-1.20.1-4.2.0
Minecraft version
1.20.1
Incompatible mod name
Create
Incompatible mod version
0.5.1f
Game Logs
crash-2024-07-22_03.17.25-client.txt

The crashlog indicates that your game crashes because of Embeddium and shows no relation to Shoulder Surfing Reloaded or Create mod. Have you tried starting the game without Embeddium?

Why I would do that? Embeddium is more important for me that ShoulderSurfing. Also, previous version working just fine

Why I would do that?

This is useful for isolating the problem. Regardless, I was able to reproduce the issue and there was indeed a problem with the create mod compatibility. A fix will be available soon. Thanks for reporting.

Completed in 4cecbb4


Unnecessary form validation error message in extension welcome page.

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
On the Alby extension page -

chrome-extension://iokeahhehimjnekafflcihljlcjccdbe/welcome.html

clicking anywhere gives a form validation error message.
I have attached a video showing the error.
Screenshots [optional]
Video :
https://user-images.githubusercontent.com/66731461/227512643-0364017a-2c76-42f2-8535-c11ecc488437.mp4
Screenshot of the error message:
https://user-images.githubusercontent.com/66731461/227513236-80c142f4-36c6-484b-b74d-d55cde9e84cf.png
Steps To Reproduce

Download the Alby extension in the chrome web store.
Add the extension. You will get the welcome screen that looks like this -

https://user-images.githubusercontent.com/66731461/227518166-05983746-ef72-4810-888f-e72bc7dd3b3b.png

Click anywhere on the screen
You will see the unnecessary error message. Error screenshot and video are attached above.

Expected behavior
When the form is submitted with an empty password field, then only the error message should pop up.
Alby information
Alby - Bitcoin Lightning Wallet 1.28.1
Device information
-OS: Ubuntu
-Browser: Chrome
-Version 110.0.5481.177 (Official Build) (64-bit)
Additional context
No response
Are you working on this?
None

The fields are being validated onBlur ("leave the input") since this change.
@rolznz you remeber the reasoning behind this?

hey, I'm a summer of bitcoin 2023 student. Can I work on this issue? I don't know the SoB formalities. It would be lovely if you could guide me @escapedcat .

Let's wait for feedback from Roland first

sure

@escapedcat @ivin-3-69 I do not believe this check is unnecessary although could be improved. See below:
Without this check there will be no error message at all if the user tries to click next without filling out the form, since the "Next" button is disabled. This is especially confusing if the user fills out both fields, but accidentally enters a different password in one of them. The next button is disabled and there is no error message showing why.
It would be much better UX if the Next button is always enabled, but if you click it, then it shows an error message if validation fails. Then we don't need to check onBlur and get the weird behaviour mentioned in this issue.
This would happen by default if we used a proper form validation library rather than custom validation code. I created an issue here: https://github.com/getAlby/lightning-browser-extension/issues/1891
What do you guys think? I think fixing this in a way that can be used in the other places around the app would be great, rather than just putting in a custom fix here.

For me it would be irritating to have the button enabled if the fields are empty.

I think the most important case is when users cannot understand why they cannot submit the form. That's why I think there should always be a helpful error message. It seems obvious if one field is empty that you should fill it, but sometimes people miss it (especially in larger forms with many fields) and the error message can be a second prompt.


[core] Add bloom-filter for file index.

These classes are copied from hadoop, and modify them for specified reason
HadoopBloomFilter:

When my data type is number type, like long int double float etc, I don't want to use murmurhash to calculate. So I need to add one method boolean addHash(long hash64) for it.  For number type, hash function see http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm.
I want to know if the add function actually set some bits to true. So I change the return value of void add(Key key) to boolean add(Key key). This modification is mainly for HadoopDynamicBloomFilter. I don't want dynamic bloom filter grows up unexpectedly.

HadoopDynamicBloomFilter (https://gsd.di.uminho.pt/members/cbm/ps/dbloom.pdf)
This class is made to make scalable bloom filter by making more and more ordinary bloom filters.  For example, if I set one bloom filter could add 10,000 numbers. After call 10,000 times add, it will new another bloom filter to contain. But it don't check whether the value exists in the bloom filter already.

So the first modification is:
change

    public void add(Key key) {
        if (key == null) {
            throw new NullPointerException("Key can not be null");
        }

        HadoopBloomFilter bf = getActiveStandardBF();

        // get or advance
        if (bf == null) {
            addRow();
            bf = matrix[matrix.length - 1];
            currentNbRecord = 0;
        }

        currentNbRecord++;
    }

to
    public boolean add(Key key) {
        if (key == null) {
            throw new NullPointerException("Key can not be null");
        }

        HadoopBloomFilter bf = getActiveStandardBF();

        // get or advance
        if (bf == null) {
            addRow();
            bf = matrix[matrix.length - 1];
            currentNbRecord = 0;
        }

        if (bf.add(key)) {
            currentNbRecord++;
            return true;
        }

        return false;
    }

I add check existence of key, and if so, I don't add currentNbRecord, which determines whether to create the next bloom filter.

The next modification:
add addHash for it

The third modification:
Originally, every bloom filter in dynamic bloom filter has the same parameters. Which means, if the first bloom filter could contain 1000 items, then the second, the third, all of them, are all the same. It is not reasonable. Because if I have a data file of 1000,000 items, but its number distinct value is 1001. Then sadly, I have to create 1000 bloom filters worst. 1000 bloom filters will make read and check slow like a tortoise.  So I make it grow up.

Origin code is
        HadoopBloomFilter[] tmp = new HadoopBloomFilter[matrix.length + 1];

        for (int i = 0; i < matrix.length; i++) {
            tmp[i] = matrix[i];
        }

        tmp[tmp.length - 1] = new HadoopBloomFilter(vectorSize, nbHash, hashType);

        matrix = tmp;

I convert it to
        HadoopBloomFilter[] tmp = new HadoopBloomFilter[matrix.length + 1];

        for (int i = 0; i < matrix.length; i++) {
            tmp[i] = matrix[i];
        }

        // grow up to contain more data
        vectorSize *= EXPANSION_FACTOR;
        nr *= EXPANSION_FACTOR;

        tmp[tmp.length - 1] = new HadoopBloomFilter(vectorSize, nbHash, hashType);

        matrix = tmp;

EXPANSION_FACTOR is 20.
The first bloom filter could contain 1000, then the next 20000, the third 400000.
HadoopFilter：
Added add modified some abstract method.

Ref: https://docs.databricks.com/en/sql/language-manual/delta-create-bloomfilter-index.html

We are implementing a simple bloomfilter now, we can support dynamic bloom filter in the future.


Do not pollute global namespaces

Hi.
While working on fixes I have noticed that global namespace is polluted by at lest following variables:

matches (I have fixed it, pull request coming soon)
GREEK_LETTERS (I have fixed it too, pull request coming soon)
Number.prototype.toTex
Array.prototype.toTex

Can you remove to later ones?

I'm not sure I understand. I'll wait for your pull request so I can see what you mean.

@nicolewhite when you add .toTex to Number.prototype and Array.prototype this adds those methods to all numbers and and arrays.  People tend to avoid this practice because it can lead to weird behaviors if two libraries define .toTex on those prototypes.  Whichever is defined last will win which ends up breaking the other library.

What's the convention for avoiding this?

I think the convention is to not expand standard types at all.
You could transform them to ordinary functions in the helper module instead:
//Array.prototype.toTex = function() {
function arrayToTex(arr) {
    return arr.map(function(e){return e.toTex();}).join();
};

Besides, I noticed that the two methods are never actually called by the library.
Number.toTex is only called once - in helper-spec to test the function.
It could be removed without affecting other code.
Array.toTex is called twice in equation-spec to compare test results, so changing the method to a helper function also will not cause any problems.

If I remove those methods, however, you won't be able to call .toTex on the array of answers. I want to be able to do both .toString and .toTex on arrays:
var n1 = algebra.parse("x + 5");
var n2 = algebra.parse("x - 3/4");

var quad = new Equation(n1.multiply(n2), 0);

console.log(quad.toString());

var answers = quad.solveFor("x");

console.log("x = " + answers.toString());
console.log("x = " + answers.toTex());

x^2 + 17/4x - 15/4 = 0
x = -5,3/4
x = -5,\frac{3}{4}

So the methods aren't needed internally but they're needed for the above.

Using algebra.js with myscript.js broke some functionality. I suspected it was some namespacing going on, and after finding this issue, I went and deleted the prototyping on Array and String, which solved my issue.
As @timrach says, you shouldn't overload these, but instead just have a helper function, to avoid namespace errors with other packages.

@nicolewhite
Suggestion 1
Maybe you could add a second helper module that is exported by the algebra.js module and contains numberToTex and arrayToTex, so the conversion to TeX could look like this:
...
console.log("x = " + algebra.helper.arrayToTex(answers));

That way only the two functions are exposed to users and the array and number namespaces are kept clean. However, it looks strange and will certainly lead to confusion as there would be two ways to convert to TeX.
Suggestion 2
A more consistent way would be to expose a toTex function in the algebra module (or a helper module) that accepts every type as input , so Expressions, Equations..., Arrays and Numbers are all converted in the same way:
var expr = new Expression("x");
algebra.toTex(expr) // ---> "x"

var frac = new Fraction(1,3)
algebra.toTex(frac) // ---> "\frac{1}{3}"

var n1 = algebra.parse("x + 5");
var n2 = algebra.parse("x - 3/4");

var quad = new Equation(n1.multiply(n2), 0);
var answers = quad.solveFor("x");

console.log("x = " + algebra.toTex(answers)); //---> x = -5,\frac{3}{4}

I definitely like the second approach. If no one objects I will make the changes. In the cases of matches and GREEK_LETTERS it's just because I forgot var. I wonder if the linter should be able to catch that?

The linter catches that if the keyword 'undef' is set to true in the linting options.

I plan on leaving the toTex method that's already available on Expressions and Equations so as not to introduce too many breaking changes. The downside is that it's kind of confusing that you can do both of:
var exp = new Expression("x");
exp.toTex()
algebra.toTex(exp);

Wdyt?

I think that's a reasonable solution.


Feature Request: Automatic Import of System Variables in Spyder

Dear Spyder Development Team,
I am writing to request a feature enhancement in Spyder that would improve the management of environment variables within the application, specifically targeting Linux users.
The requested feature is the automatic import of system variables when launching Spyder. Currently, Spyder does not automatically import system variables defined outside of the application's environment, such as those set in the .profile or .bashrc files (Linux). This can lead to inconsistencies between the system environment and the Spyder environment.
By implementing the automatic import of system variables, Spyder would ensure a seamless integration between the user's system environment and the Spyder runtime environment. This would eliminate the need for manual configuration or duplication of settings, providing a more consistent and convenient user experience.
Spyder has a tool for user environment variables management.
Under Spyder's "Tools" > "Current user environment variables" window, users can view the user environment variables. However, it appears that under the Linux environment, this window is not editable, preventing users from adding, modifying, or deleting user environment variables within the Spyder interface.
To work around this limitation, users currently have the option to utilize the "Console Startup" feature. By navigating to "Tools" > "Preferences" > "IPython Console" > "Startup" > "Run code (lines)," users can specify custom code snippets or scripts to execute during the console startup process. This provides a workaround to import necessary environment variables or execute any required code during the console initialization.
I kindly request your consideration of this feature. If you require any further information or clarification, please feel free to reach out to me. Thank you for your attention to this matter, and I appreciate your ongoing efforts to improve Spyder.
Sincerely, Oyibo
Versions

Spyder version: 5.4.3  (conda)
Python version: 3.9.16 64-bit
Qt version: 5.15.2
PyQt5 version: 5.15.7
Operating System: Linux 5.15.0-73-generic

Hey @OyiboRivers, thanks for reporting. This has been requested for a long time (see issue #3891), but unfortunately we haven't had time to implement it.
I'm going to close this issue as a duplicate of #3891 but I'll ping you there to better understand why you need this functionality.


Error validating schema with intersection arrow syntax

Description
Reported on Discord
Versions
zed 0.21.0
Repro
Add this to a file:
definition user {}

definition group {
    relation user: user

    permission view = user
}

definition thing {
    relation group: group

    permission view = group.all(view)
}

Run zed validate <schemafile>.
Expected
Valid schema
Observed
~ zed validate schema.zaml
6:02PM ERR terminated with errors error="BUG: *errors.errorString unexpected set operation type *corev1.SetOperation_Child_FunctionedTupleToUserset\n/Users/runner/go/pkg/mod/github.com/authzed/spicedb@v1.35.2-0.20240731085809-d52dfd0adbd0/pkg/spiceerrors/bug.go:33 (0x101609460)\n/Users/runner/go/pkg/mod/github.com/authzed/spicedb@v1.35.2-0.20240731085809-d52dfd0adbd0/pkg/development/warnings.go:221 (0x101ab1900)\n/Users/runner/go/pkg/mod/github.com/authzed/spicedb@v1.35.2-0.20240731085809-d52dfd0adbd0/pkg/development/warnings.go:157 (0x101ab1488)\n/Users/runner/go/pkg/mod/github.com/authzed/spicedb@v1.35.2-0.20240731085809-d52dfd0adbd0/pkg/development/warnings.go:96 (0x101ab1088)\n/Users/runner/go/pkg/mod/github.com/authzed/spicedb@v1.35.2-0.20240731085809-d52dfd0adbd0/pkg/development/warnings.go:56 (0x101ab0dcc)\ninternal/cmd/validate.go:136 (0x101aecb6c)\n/Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 (0x1017826b0)\n/Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 (0x101782e74)\n/Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041 (0x101ae6c94)\n/Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1034 (0x101ae6c8d)\ninternal/cmd/cmd.go:134 (0x101ae6c95)\ncmd/zed/main.go:6 (0x101aeef7c)\n$GOROOT/src/runtime/internal/atomic/types.go:194 (0x100e422ac)\n$GOROOT/src/runtime/asm_arm64.s:1222 (0x100e77644)\n"

(mostly opening this for documentation)


URLs that already contain the schema part get dual schemas

I'm using variables for each request and when we do the transformation to k6, the tool adds "http" protocol at the beginning of the URL, so I have  http://{{requestUrl}} and the variable have https://url.com and the the request in k6 it became http://https:url.com correction the request url is: http://https://url.com

TL;DR
https://google.com fetched from a variable should become just that, not http://https://google.com

Was solved in master, but not in the last docker image. Automated the publishing of new versions to solve this and tried it with the new version. Works from what I can tell.


'pino-noir' is a very clever name

that's it. ███ job.
node version ███
win10

😆
thank you. I also originated
I don't see this an issue however

also cc @emilyrose for credit in naming pino-noir


the equivalent of "/switch" in api and python lib doesn't exist

I sorry. I just want to switch to old conversations.

You should easily be able to do this by manipulating the self.conversation_id and self.parent_message_id properties.
But, a helper method would be a nice convenience, and I'd accept a PR for that.

thx


Simplify Implementation of associations: Use ONLY resolvers

When a Cenzontle server is asked to resolve an association currently it invokes an implementation in the model layer. Using our classical example of a Person that has many Books, the booksConnection in the Person data model is a resolver that invokes a function booksConnectionImpl in the data model layer. Something similar happens for to_one associations and also for write operations on associations. In all cases the resolver invokes implementations in the data model layer.
This is superfluos and without need bloats up the resulting Cenzontle code.
Remove all model layer implementations generated to administer (CRUD) associations. Replace it with resolver functions that in turn invoke the correct resolvers of the associated data models. Write helpers to extend / adjust arguments passed to the invoked resolvers. Make sure the existing functionality will remain unchanged.
Expected work time: 2 days

Note that this enables us to remove the "internal" types of associations the code generators currently use. Remove this part, too, and replace it only using to_one and to_many associations. Because the associations will become agnostic of the storage, we can make this simplification.


Intermediate Web Development with React.js

Title Of Blog Post : Intermediate Web Development with React.js
Short Description of what is expected: Explore intermediate-level web development concepts using React.js, including component composition, state management, and advanced features.
Category: Web Development
Tags: React.js, Web Development, Component Composition, State Management.

Hi @darkbits018... Pleas assign it to me .. I would be sending a pull request in the month of October, so that it would be counted in the hactoberfest


When choosing "change all occurrences" the keyboard layout defaults to another layout

SQL Operations Studio Version: sqlops 0.23.6 (8a3011756318a2ded1e6e84332230a2b2bf9c544, 2017-11-06T21:51:43.232Z)
OS Version: Windows_NT x64 10.0.15063

Steps to Reproduce:
1.Write a script with a few of the same values underneath each other
2.Choose "Change all occurrences"
3.Try to type special characters, the characters are different from the keyboard layout
4.Type of keyboard used: UK

Please reactive if this issue persists in current builds.


Fix missing brackets resulting in petablint error

Codecov Report

Merging #203 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #203   +/-   ##
========================================
  Coverage    68.42%   68.42%
========================================
  Files           18       18
  Lines         1273     1273
  Branches       289      289
========================================
  Hits           871      871
  Misses         354      354
  Partials        48       48

Impacted Files
Coverage Δ

petab/petablint.py
0% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 568132a...2a40e00. Read the comment docs.


Laravel 6 Support

yes please, also for me :-( no other package outside this one

Pull requests are welcome.

https://github.com/austinheap/laravel-database-encryption/pull/53


fix(pkg/git/git.go): fix blank image pull policy

Summary of Changes
This PR removes the environment variable declarations from the git pre-receive hook script. When any one of the environment variables is not set in the main process, it's sent into the pre-receive hook process as the empty string, and that was leading to configuration errors in the hook, which was failing builds.
For example, if SLUG_BUILDER_IMAGE_PULL_POLICY was empty in the main process, it would be sent to "" in the hook before this change. Then, the hook would try to convert "" to a valid pull policy, which would fail, and the entire build would fail.
Issue(s) that this PR Closes
Fixes #293
Associated End To End Test PR(s)
None
Associated Documentation PR(s)
None
Associated Design Document(s)
None
Testing Instructions

Start a builder with no SLUG_BUILDER_IMAGE_PULL_POLICY or DOCKER_BUILDER_IMAGE_PULL_POLICY image pull policy environment variables set
Do a git push with a buildpack app
Do a git push with a dockerfile app

The result of both steps 2 and 3 should be a successful build, and in both cases, the appropriate image (slugbuilder and dockerbuilder, respectively) should be pulled in all cases (i.e. with imagePullPolicy: Always)
Pull Request Hygiene TODOs
Please make sure the below checklist is complete.

[x] Your pull request is concise and to the point (make another PR for refactoring nearby code)
[x] Your commits are squashed into logical units of work
[x] Your commits follow the commit style guidelines

affects can be seen in this build https://ci.deis.io/job/workflow-test-pr/537/consoleFull

Thanks for fixing this--it's been making it very difficult to test a builder fix I'm working on.

I'd recommend setting a default instead of removing

@helgi defaults are set to Always here

Waiting for e2e tests to merge.

I have seen one more failure in the test might not be related to this PR but might require a restart

@smothiki agree that it may not be related, but restarted

The second test run has failed, and the failures look to be unrelated to this change (and this change has eliminated the failures that it intended to fix). Merging...


Repo cleanup

Common

Refactors directory structure: app is for app and api is for api
Improves Makefile's modularity so it could be used as a primary build tool
UI is no longer embedded into API exe package. Now exe accepts the path to UI assets
Cleans up obsolete references and build warnings, uncuding snoozing Sphinx's make html warnings that were overflowing travis's logs.
New / updated READMEs explaining build process

Build process
api -> (make install test exe) -> (api\dist\opentrons-api-server)-->*
                                                                    |
                                                                    V
app ------------------------------------------------------------> (make install build test package)

API

New pyinstaller
No packageing of UI assets, removing circular reference
use py.test
combine pylama and py.test for test run

App

Refactors app's structure to have shell (Electron's main) and ui — web UI that is rendered in Electron and can be potentially detached and ran in a browser in the future
Upgrades and cleans all app dependencies
Removes two package.json structure
Re-implements webpack configuration, introducing hierarchy for main and renderer in production and development
Fixes module references after webpack config change
Cleans up test setup and run files
Merges/fixes tests for shell and ui
Removes a few util and utils files
Cleans up shell/main.js
Introduces async/await into tests and main.js

Changes Unknown when pulling b529d3b262971f83f9c403907561582983301400 on repo-cleanup into ** on develop**.

Changes Unknown when pulling b529d3b262971f83f9c403907561582983301400 on repo-cleanup into ** on develop**.

Changes Unknown when pulling f14d1cfe097801ff14c83c37da1f7c66201484c5 on repo-cleanup into ** on develop**.

I had some issues following the README verbatim. I just re-ran the instructions again on a fresh repo clone to make sure they were reproducible:
On the frontend, I was able to make install w/o any issues. But I couldn't make build install or make test-e2e. I got an error saying cross-env wasn't installed.
sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE

So I ran npm i but I got an error concurrently wasn't installed. So I added concurrently manually and re-ran npm i but got a host of other errors,
$ npm i

><EMAIL_ADDRESS>postinstall /Users/ahmedabdalla/Code/opentrons/play/opentrons/app
> concurrently "npm run flow-typed" "npm run build" "npm run build-dll" "install-app-deps" "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"

[4] module.js:471
[4]     throw err;
[4]     ^
[4]
[4] Error: Cannot find module '/Users/ahmedabdalla/Code/opentrons/play/opentrons/app/node_modules/fbjs-scripts/node/check-dev-engines.js'
[4]     at Function.Module._resolveFilename (module.js:469:15)
[4]     at Function.Module._load (module.js:417:25)
[4]     at Module.runMain (module.js:604:10)
[4]     at run (bootstrap_node.js:394:7)
[4]     at startup (bootstrap_node.js:149:9)
[4]     at bootstrap_node.js:509:3
[3] nodenv: install-app-deps: command not found
[4] node node_modules/fbjs-scripts/node/check-dev-engines.js package.json exited with code 1
[3]
[3] The `install-app-deps' command exists in these Node versions:
[3]   6.9.2
[3]
[3] install-app-deps exited with code 127
[0]
[0] ><EMAIL_ADDRESS>flow-typed /Users/ahmedabdalla/Code/opentrons/play/opentrons/app
[0] > rimraf flow-typed/npm && flow-typed install --overwrite || true
[0]
[1]
[1] ><EMAIL_ADDRESS>build /Users/ahmedabdalla/Code/opentrons/play/opentrons/app
[1] > concurrently "npm run build-main" "npm run build-renderer"
[1]
[2]
[2] ><EMAIL_ADDRESS>build-dll /Users/ahmedabdalla/Code/opentrons/play/opentrons/app
[2] > cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --profile --colors
[2]
[0] sh: flow-typed: command not found
[0] npm run flow-typed exited with code 0
[2] module.js:471
[2]     throw err;
[2]     ^
[2]
[2] Error: Cannot find module 'babel-register'
[2]     at Function.Module._resolveFilename (module.js:469:15)
[2]     at Function.Module._load (module.js:417:25)
[2]     at Module.require (module.js:497:17)
[2]     at module.js:660:12
[2]     at Array.forEach (native)
[2]     at Function.Module._preloadModules (module.js:659:12)
[2]     at preloadModules (bootstrap_node.js:365:38)
[2]     at startup (bootstrap_node.js:148:9)
[2]     at bootstrap_node.js:509:3
[2] npm
[2]  ERR! code ELIFECYCLE
[2] npm ERR! errno 1
[2] npm ERR<EMAIL_ADDRESS>build-dll: `cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --profile --colors`
[2] npm ERR! Exit status 1
[2] npm ERR!
[2] npm ERR! Failed at the<EMAIL_ADDRESS>build-dll script.
[2] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[2]
[2] npm ERR!      /Users/ahmedabdalla/.npm/_logs/2017-07-03T16_08_41_813Z-debug.log
[2] npm run build-dll exited with code 1
[1] [1]
[1] [1] ><EMAIL_ADDRESS>build-renderer /Users/ahmedabdalla/Code/opentrons/play/opentrons/app
[1] [1] > cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --profile --colors
[1] [1]
[1] [0]
[1] [0] ><EMAIL_ADDRESS>build-main /Users/ahmedabdalla/Code/opentrons/play/opentrons/app
[1] [0] > cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --profile --colors
[1] [0]
[1] [1] module.js:471
[1] [1]     throw err;
[1] [1]     ^
[1] [1]
[1] [1] Error: Cannot find module 'babel-register'
[1] [1]     at Function.Module._resolveFilename (module.js:469:15)
[1] [1]     at Function.Module._load (module.js:417:25)
[1] [1]     at Module.require (module.js:497:17)
[1] [1]     at module.js:660:12
[1] [1]     at Array.forEach (native)
[1] [1]     at Function.Module._preloadModules (module.js:659:12)
[1] [1]     at preloadModules (bootstrap_node.js:365:38)
[1] [1]     at startup (bootstrap_node.js:148:9)
[1] [1]     at bootstrap_node.js:509:3
[1] [0] module.js:471
[1] [0]     throw err;
[1] [0]     ^
[1] [0]
[1] [0] Error: Cannot find module 'babel-register'
[1] [0]     at Function.Module._resolveFilename (module.js:469:15)
[1] [0]     at Function.Module._load (module.js:417:25)
[1] [0]     at Module.require (module.js:497:17)
[1] [0]     at module.js:660:12
[1] [0]     at Array.forEach (native)
[1] [0]     at Function.Module._preloadModules (module.js:659:12)
[1] [0]     at preloadModules (bootstrap_node.js:365:38)
[1] [0]     at startup (bootstrap_node.js:148:9)
[1] [0]     at bootstrap_node.js:509:3
[1] [1] npm
[1] [1]  ERR! code ELIFECYCLE
[1] [1] npm ERR! errno 1
[1] [1] npm ERR<EMAIL_ADDRESS>build-renderer: `cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --profile --colors`
[1] [1] npm ERR!
[1] [1]  Exit status 1
[1] [1] npm ERR!
[1] [1] npm ERR! Failed at the<EMAIL_ADDRESS>build-renderer script.
[1] [1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1] [1]
[1] [1] npm ERR! A complete log of this run can be found in:
[1] [1] npm ERR!     /Users/ahmedabdalla/.npm/_logs/2017-07-03T16_08_42_710Z-debug.log
[1] [0] npm ERR! code ELIFECYCLE
[1] [0] npm ERR! errno 1
[1] [0] npm ERR<EMAIL_ADDRESS>build-main: `cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --profile --colors`
[1] [0] npm ERR! Exit status 1
[1] [0] npm ERR!
[1] [0] npm ERR! Failed at the<EMAIL_ADDRESS>build-main script.
[1] [0] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1] [0]
[1] [0] npm ERR!       Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the<EMAIL_ADDRESS>build script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR!      Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      /Users/ahmedabdalla/.npm/_logs/2017-07-03T16_08_42_825Z-debug.log

I made sure to update my webpack to the latest (3.0.0) and using node 6.9.4. I also made a fresh clone of the repo in case anything in my existing repo was getting in the way but that still didn't resolve things.

And then today, on my fresh repo clone I couldn't get the backend exe to build with pyinstaller. I keep getting this error from make exe:
224 INFO: PyInstaller: 3.3.dev0+g7e81464
224 INFO: Python: 3.5.2
247 INFO: Platform: Darwin-15.6.0-x86_64-i386-64bit
255 INFO: UPX is not available.
Syntax error in  /Users/ahmedabdalla/.pyenv/versions/3.5.2/envs/repo-cleanup/lib/python3.5/site-packages/jinja2/asyncsupport.py
("'yield' inside async function", ('/Users/ahmedabdalla/.pyenv/versions/3.5.2/envs/repo-cleanup/lib/python3.5/site-packages/jinja2/asyncsupport.py', 35, 12, 'yield event\n'))

So I thought it had to do with my python being @ 3.5.2 but I switched to py 3.5.3 env and still get the same error,
86 INFO: PyInstaller: 3.3.dev0+g7e81464
87 INFO: Python: 3.5.3
103 INFO: Platform: Darwin-15.6.0-x86_64-i386-64bit
108 INFO: UPX is not available.
Syntax error in  /Users/ahmedabdalla/.pyenv/versions/3.5.3/envs/repo-cleanup2/lib/python3.5/site-packages/jinja2/asyncsupport.py
("'yield' inside async function", ('/Users/ahmedabdalla/.pyenv/versions/3.5.3/envs/repo-cleanup2/lib/python3.5/site-packages/jinja2/asyncsupport.py', 35, 12, '            yield event\n'))

This exe build error only happened in my fresh repo clone which i made because I couldn't get the frontend to build. It doesn't make sense because it seems the pyinstalle version is pinned to a commit. My pyinstaller version from pip list is PyInstaller (3.3.dev0+g7e81464)

I think if someone else can replicate README / build process with success than I can just work through my issues independently in case they're caused by my system only.

Also noticed requests seems to downgrade itself,
Installing collected packages: pyflakes, snowballstemmer, six, pydocstyle, mccabe, pycodestyle, pylama, py, pytest, coverage, pytest-cov, numpydoc, Pygments, MarkupSafe, Jinja2, docutils, alabaster, imagesize, pytz, babel, Sphinx, pkginfo, requests, requests-toolbelt, args, clint, twine, Werkzeug, itsdangerous, Flask, Flask-Cors, python-engineio, python-socketio, Flask-SocketIO, psutil, greenlet, gevent, PyInstaller
  Found existing installation: requests 2.14.2
    Uninstalling requests-2.14.2:
      Successfully uninstalled requests-2.14.2

  Running setup.py install for PyInstaller ... done
Successfully installed Flask-0.10.1 Flask-Cors-3.0.2 Flask-SocketIO-2.5 Jinja2-2.9.6 MarkupSafe-1.0 PyInstaller-3.3.dev0+g7e81464 Pygments-2.2.0 Sphinx-1.4.8 Werkzeug-0.12.2 alabaster-0.7.10 args-0.1.0 babel-2.4.0 clint-0.5.1 coverage-4.4.1 docutils-0.13.1 gevent-1.2.2 greenlet-0.4.12 imagesize-0.7.1 itsdangerous-0.24 mccabe-0.6.1 numpydoc-0.6.0 pkginfo-1.4.1 psutil-4.3.1 py-1.4.34 pycodestyle-2.3.1 pydocstyle-2.0.0 pyflakes-1.5.0 pylama-7.4.1 pytest-3.1.2 pytest-cov-2.5.1 python-engineio-1.7.0 python-socketio-1.7.6 pytz-2017.2 requests-2.9.1 requests-toolbelt-0.8.0 six-1.10.0 snowballstemmer-1.2.1 twine-1.8.1

It's not a big deal. Cross checked it with what's on develop and it seems we currently install requests 2.9 from flask but our setup.py calls for 2.14 but apparently setup.py has always been overwritten by the flask install. It's fine because we only need 2.14 because that's what anaconda needed.
Speaking of Anaconda, I think we should make a ticket to deprecate it since the only way we advertise to users to install the app is via pip and it just seems easier to maintain that...

I won't be able to address every change in this PR, I think we can adjust whatever small things here and there as we use it over the next weeks. I think others should follow the READMe on their machines. Otherwise LGTM

Changes Unknown when pulling dd4d414c144edbf6d7d7a897bb3d796e9de221e1 on repo-cleanup into ** on develop**.

Changes Unknown when pulling 9bc365bba5facf42cba8193f8e1f8c37bbd12506 on repo-cleanup into ** on develop**.


License file should be included when publishing to crates.io

The LICENSE file should always be included with the code, even when published on crates.io. It makes it easier to package the library for Linux distributions for example.

Done


rustfmt should avoid rightwards drifting big blocks of code

Currently rustfmt formats from
            let mut arms = variants.iter().enumerate().map(|(i, &(ident, v_span, ref summary))| {
                let i_expr = cx.expr_usize(v_span, i);
                let pat = cx.pat_lit(v_span, i_expr);

                let path = cx.path(v_span, vec![substr.type_ident, ident]);
                let thing = rand_thing(cx, v_span, path, summary, |cx, sp| rand_call(cx, sp));
                cx.arm(v_span, vec!( pat ), thing)
            }).collect::<Vec<ast::Arm> >();

to
            let mut arms = variants.iter()
                                   .enumerate()
                                   .map(|(i, &(ident, v_span, ref summary))| {
                                       let i_expr = cx.expr_usize(v_span, i);
                                       let pat = cx.pat_lit(v_span, i_expr);

                                       let path = cx.path(v_span, vec![substr.type_ident, ident]);
                                       let thing = rand_thing(cx,
                                                              v_span,
                                                              path,
                                                              summary,
                                                              |cx, sp| rand_call(cx, sp));
                                       cx.arm(v_span, vec!(pat), thing)
                                   })
                                   .collect::<Vec<ast::Arm>>();

which is much worse than the original.

I kind of like the new version - it still fits and I find aligning the methods in the chain more readable.
However, there should be an option for block indenting of methods of a chain (rather than visual indenting) which should avoid the huge chunk of whitespace. I also thought we could format like the first example because there is enough space and the argument to map is a closure - that is new work that just landed. @marcusklaas - do you know what is going on?

I think rustfmt would pick the former strategy if it wasn't for the collect call.

Ah, that's interesting. I wonder if we could we fix that (as an option, as I said I quite like the new version).

Note that the issue title mentions “big” blocks. I find current style better when the block of code is 1-to-3ish lines of code too, but it gets exponentially worse as the LOC of the block increases.

Hmm, good point. @arichto has also pointed out some formatting choices which make sense for small blocks but not large ones. I guess we're going to have to build in this concept some how, although the idea gives me the fear.

I guess it is just a cut-off at n lines, but it still seems scary some how.

how about moving to
            let mut arms = variants
                .iter()
                .enumerate()
                .map(|(i, &(ident, v_span, ref summary))| {
                    let i_expr = cx.expr_usize(v_span, i);
                    let pat = cx.pat_lit(v_span, i_expr);

                    let path = cx.path(v_span, vec![substr.type_ident, ident]);
                    let thing = rand_thing(cx,
                                           v_span,
                                           path,
                                           summary,
                                           |cx, sp| rand_call(cx, sp));
                    cx.arm(v_span, vec!(pat), thing)
                })
                .collect::<Vec<ast::Arm>>();

for large blocks?

In the second code block in the original post, there is indentation (the closure body) past an alignment (the . for the method calls). If the method call . isn't on a multiple-of-4 column, then hitting TAB in vim (and I think other editors) will insert less than 4 space to reach the next multiple-of-4 column.
For example, in that code sample, hitting tab on the line after let pat = cx.pat_lit(v_span, i_expr); inserts just 1 space. This can make editing in these blocks frustrating.
Plus, the alignment forced rand_thing(cx, v_span, path, summary, |cx, sp| rand_call(cx, sp)); far enough to the right that it had to go vertical. It seems like it's easier for an automated tool to keep from doing anything drastic like that if it sticks to a style more like @nagisa's original. Maybe that should be the default, and the rightwards alignment style should be an optional flag.

I've run across this many many times when working with rustfmt, and I agree with @nagisa's original post that the first block of code is much more readable. We've often had a problem with rightward-drift of code in Rust in the past and we have tried to tailor idioms (like RAII) around preventing that. I personally prefer to have style wherever possible that avoids rightward drift as much as possible.

This came up recently when I ran rustfmt on Miri: https://github.com/tsion/miri/pull/6#issuecomment-211007449

This right-drift behaviour has been a major annoyance of mine, when working with rustfmt.
I've found passing an in-place created PDS to functions to be a nice pattern for keeping function signatures clean and extensible and even allow for some kind of faux default arguments. It however clashes with rustfmt on every single use.
This one is fine and remains as it is when fed through rustfmt:
let input = Input {
    foo: 42,
    bar: 1234,
};
some_fn_with_struct_and_closure(input, |foo, bar| {
    println!("foo: {:?}", foo);
    println!("bar: {:?}", bar);
});

while this one (which I'd prefer to remain untouched):
some_fn_with_struct_and_closure(Input {
    foo: 42,
    bar: 1234,
}, |foo, bar| {
    println!("foo: {:?}", foo);
    println!("bar: {:?}", bar);
});

gets turned into this:
some_fn_with_struct_and_closure(Input {
                                        foo: 42,
                                        bar: 1234,
                                    },
                                    |foo, bar| {
                                        println!("foo: {:?}", foo);
                                        println!("bar: {:?}", bar);
                                    });

😢

I've been experimenting with this. It is relatively easy to get a naive fix:

    let mut arms = variants.iter()
                           .enumerate()
                           .map(|(i, &(ident, v_span, ref summary))| {
        let i_expr = cx.expr_usize(v_span, i);
        let pat = cx.pat_lit(v_span, i_expr);

        let path = cx.path(v_span, vec![substr.type_ident, ident]);
        let thing = rand_thing(cx, v_span, path, summary, |cx, sp| rand_call(cx, sp));
        cx.arm(v_span, vec![pat], thing)
    })
                           .collect::<Vec<ast::Arm>>();

The obvious problem here is the orphan method call (cc #566 and probably some other issues too). Not sure what a good solution to that is. One idea (that would fix #566 too) if to always block indent method/fields on new lines. I don't think this looks as good (I've learned to really like the aligned .s) but it does solve the floater problem.
    let mut arms = variants.iter()
        .enumerate()
        .map(|(i, &(ident, v_span, ref summary))| {
            let i_expr = cx.expr_usize(v_span, i);
            let pat = cx.pat_lit(v_span, i_expr);

            let path = cx.path(v_span, vec![substr.type_ident, ident]);
            let thing = rand_thing(cx, v_span, path, summary, |cx, sp| rand_call(cx, sp));
            cx.arm(v_span, vec![pat], thing)
        })
        .collect::<Vec<ast::Arm>>();

Anyone got any better ideas?

@nrc I think block indent (your second example) looks better, but more importantly, it also seems to cause fewer problems for rustfmt, fairly consistently. On top of that, it's an easier rule for a text editor to implement.
Aligned method calls should be an optional feature for those who are willing to risk more problematic formatting. I know this is against your personal preferences, but the defaults should be designed so rustfmt's results are acceptable in the highest number of cases

I'm strongly in favor of using block indenting by default. In my experience alignment indenting has always simply caused problems for very little gain. Block indenting already serves the purpose of making it easy to see where things continue onto the next line, while alignment indenting just makes editing more difficult, causes noisy diffs, and causes horrible rightward drift that can induce even more newlines needed leading to pathological situations.

In some cases, I really like the look of the aligned indenting… but in most cases it just feels wrong (too far right, creating empty space on the left over several lines, etc).
Thus, I too favor block indenting. @nrc's second code block looks pretty much like my preferred style (though I did move the variants.iter() into the block and combined some lines).

… but in most cases it just feels wrong (too far right, creating empty space on the left over several lines, etc)

The main issue I have with dot-aligned indenting (in addition to wasted space) is that it forces my line of sight to wander in curvy lined instead of just an almost straight line parallel to the left window edge.
The second version (@nrc's last comment) makes scanning a code file so much quicker.

Block indent is just less complicated, and less likely to go wrong. Therefore, I think we should be using block formatting.

One thing I do do, which is very different from the vast majority of rust code, is to use 2-space indents; it fights against the rightward drift of rust quite well.

is to use 2-space indents; it fights against the rightward drift of rust quite well.

rightwards drift is not in the number of spaces, but in the number of indentations.

[…] use 2-space indents; it fights against the rightward drift of rust quite well.

Use the shortest possible identifiers; it fights against the rightward drift of rust quite well. 😈 😇

2-space indent does reduce rightwards drift and doesn't obfuscate the code like shortening identifiers, but I can imagine it being unpopular in the Rust community. (It's arguable that 2-space is narrow enough to make it harder to scan.)

Use ultra-short identifiers; it fights against the rightward drift of rust quite well. :smiling_imp: :innocent:

Not really an option when I'm working with Windows API identifiers that take up an entire line on their own :stuck_out_tongue:

@tsion I thought it would be harder to scan, but it turns out it's actually not. shrug
@oli-obk it does fight rightward drift, with multiple matches. I keep myself to 80 columns, as well, so it's nice.

What I meant is that readability goes down with every extra indentation. If you just want to reduce horizontal space, you can reduce the font size. What we actually want is to reduce the size of jumps from one level to another, so we have a "feeling" for where we are in the code wrt nesting.

@oli-obk Kinda, but smaller indentation does allow for longer lines of real code.


Add position to EvalAltResult::SystemError

For error reporting, it would be nice to have Position for SystemErrors. I'm imagining a case where some rust function, that is called from a Rhai context, produces some error. I want to be able to locate the Rhai position that caused this error so that I can report it nicely. Is this something that would be possible?

It would be possible, but then it would be a breaking change...
Maybe you can use another error variant?

Closing this for now.  Feel free to reopen if there are further issues.


Combination function instead of &&&

I am using RxSwift in my current project and like how Observable.combineLatest reads, for example. Combining two Results works well with the &&& operator, but the resulting code isn't quite what I expected. So I figured a static function like Result.combine would work well.
public static func combine<L : ResultProtocol, R : ResultProtocol>
    (_ left: L, _ right: R, resultSelector: (L.Value, R.Value) -> T)
    -> Result<T, L.Error> where L.Error == R.Error {

        return left.flatMap { outer in
            right.map { inner in
                resultSelector(outer, inner)
            }
        }
}

Problem is: T cannot be inferred on the call side this way. I wonder if (1) this is something you'd be interested in merging anyway before I investigate, and (2) if you may have a clue why that causes trouble. Is it because Result is an enum? 🤔

but the resulting code isn't quite what I expected

What you wrote should be the same as (left &&& right).map(resultSelector). Why do yo need the alternative implementation?

if you may have a clue why that causes trouble. Is it because Result is an enum?

The T type variable is missing from the generic parameter list.

Ah yes, forgot to menthion that -- leaving it out or putting it in doesn't change a thing in regard do the "could not infer generic type T" message, though. (I have a pet theory why the compiler doesn't need it for static functions, but I don't have a real clue.)


White screen then crash.

[x] I have read the FAQ.
[x] I have searched in existing issues.

Environment

OS: Windows 10
scrcpy version: 1.12.1
installation method: [Windows release
device model: XiaoMi Mi 9 Lite
Android version: MIUI Global 11.0.1 / Android 10

Describe the bug
Open cmd prompt (both as non-admin and admin) and direct to where I extracted the contents to
Run scrcpy
It executes and a white window pops up, then it closes a second later or so
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
F:\scrcpy-win64-v1.12.1\scrcpy-server: 1 file pushed. 7.1 MB/s (26202 bytes in 0.004s)
java.io.FileNotFoundException: /data/system/theme_config/theme_compatibility.xml: open failed: ENOENT (No such file or directory)
        at libcore.io.IoBridge.open(IoBridge.java:496)
        at java.io.FileInputStream.<init>(FileInputStream.java:159)
        at java.io.FileInputStream.<init>(FileInputStream.java:115)
        at java.io.FileReader.<init>(FileReader.java:58)
        at miui.content.res.ThemeCompatibilityLoader.getVersion(ThemeCompatibilityLoader.java:108)
        at miui.content.res.ThemeCompatibilityLoader.getConfigDocumentTree(ThemeCompatibilityLoader.java:126)
        at miui.content.res.ThemeCompatibilityLoader.loadConfig(ThemeCompatibilityLoader.java:59)
        at miui.content.res.ThemeCompatibility.<clinit>(ThemeCompatibility.java:31)
        at miui.content.res.ThemeCompatibility.isThemeEnabled(ThemeCompatibility.java:111)
        at android.content.res.MiuiResourcesImpl.<clinit>(MiuiResourcesImpl.java:41)
        at android.content.res.Resources.<init>(Resources.java:283)
        at android.content.res.MiuiResources.<init>(MiuiResources.java:49)
        at android.content.res.Resources.getSystem(Resources.java:204)
        at android.app.LoadedApk.<init>(LoadedApk.java:235)
        at android.app.ContextImpl.createSystemContext(ContextImpl.java:2430)
        at android.app.ActivityThread.getSystemContext(ActivityThread.java:2427)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.genymobile.scrcpy.Workarounds.fillAppInfo(Workarounds.java:66)
        at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:56)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
        at com.genymobile.scrcpy.Server.main(Server.java:163)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:380)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
        at libcore.io.Linux.open(Native Method)
        at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
        at libcore.io.IoBridge.open(IoBridge.java:482)
        ... 22 more
INFO: Initial texture: 1080x2336

The exception is not a bug (see #994).

It executes and a white window pops up, then it closes a second later or so

Try with a lower definition:
scrcpy -m1024

If it still does not work, please provide the output of adb logcat.

adb logcat generates a 7 MB file. Do you have a preferred host for me to upload it to?

Could you do some more tests to find the cause.

Run adb logcat in a terminal, and start scrcpy in another. When scrcpy stops, does adb logcat also terminate?
Try to record without display (scrcpy --record file.mkv --no-display -m 800). Is the recorded file ok?
Try to record with adb shell screenrecord /sdcard/file.mp4 (then adb pull /sdcard/file.mp4). Is the recorded file ok?

adb logcat keep going even when scrcpy stops.
2/3. Recording is good.

Oh, might be a driver issue on the computer then. Could you test on another computer/system?

a white window pops up

Could you post a screenshot?

This is the window.
I'll test on another machine now.

while still showing that error

This is not an error (this is expected on some devices, the message will not be shown in future versions of scrcpy): #994

Yea I read that recently, but I'm still trying to figure out of how fix the "crashing" so I can use this on my main machine.

Out of curiousity, could you test v1.9? (it uses a different SDL version)

No error, but it still opens then closes.

I didn't know why I didn't try it before, but the 32-bit version of v1.12 works (I was using the 64-bit version before). It still shows that false error, but it works. If you want me to run some more tests, then just ask.
Thanks for all your time and effort.

OK good to know that this kind of problem can occur only on 32 or 64 bits :+1:


How to run without multi threading?

I am running into a lot of problems with my data where the tracking gets lost and I get errors from the meshing part, from the geometry getting too big or just ray casting throwing errors. I am fine with the errors, but because the treading locks the process, it wont stop on its own and then I need to baby sit the processes. Could you point to me where I could only set on thread so when it crashes it stops the process?

I think maybe you can try to kill the other processes if one process has an error. E.g. you can use "try-catch" in https://github.com/cvg/nice-slam/blob/7af15cc33729aa5a8ca052908d96f495e34ab34c/src/NICE_SLAM.py#L275, and when there is an error in mapping, in "catch" you can use shared memory to send a halt signal to other processes.


[Wiki] InvokeServerRpc(MyServerRpc, ...) changed to "MyServerRPC"

In InvokeServerRpc(MyServerRpc, Random.Range(-50, 50)); "Rpc" throws The name 'MyServerRpc' does not exist in the current context and should be changed to capital letters.

 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.


add flutter section

Description
add Flutter section
Upsearch for file pubspec.yaml or pubspec.yml and ensure it contains a flutter dependency.
It will also show the current channel by default.
Flutter uses the Dart language but it is a separate section

Variable
Default
Meaning

SPACESHIP_FLUTTER_SHOW
true
Show section

SPACESHIP_FLUTTER_ASYNC
true
Render section asynchronously

SPACESHIP_FLUTTER_PREFIX
$SPACESHIP_PROMPT_DEFAULT_PREFIX
Section's prefix

SPACESHIP_FLUTTER_SUFFIX
$SPACESHIP_PROMPT_DEFAULT_SUFFIX
Section's suffix

SPACESHIP_FLUTTER_SYMBOL
💙·
Symbol displayed before the section

SPACESHIP_FLUTTER_COLOR
blue
Section's color

SPACESHIP_FLUTTER_CHANNEL_SHOW
true
Show channel

SPACESHIP_FLUTTER_CHANNEL_PREFIX
``
Channel's prefix

SPACESHIP_FLUTTER_CHANNEL_SUFFIX
``
Channel's suffix

SPACESHIP_FLUTTER_CHANNEL_SYMBOL
.#
Symbol displayed before the channel

Screenshot

stable channel

beta channel

Hi @denysdovhan
you are absolutely right that it should be its own external section instead, I had completely missed it. I will get back to you when I have an external one ready. Should we close this PR and create a new repo instead?

I will generate a new repo from spaceship-section for flutter. You should have enough permissions to push to that new repo. Let me know if you need additional permissions.
I'm closing this in favorite of an external section.
Also, I'd welcome a PR adding a link to flutter section in Dart section documentation.

@merikan here you go: https://github.com/spaceship-prompt/spaceship-flutter


Create /var/log/app_engine directory #313

Create /var/log/app_engine directory #313

LGTM

What is the side effect on Compat, (or even flex) where I think this directory path is provided as a Docker volume? Someone has to check this PR on a real image for both pure openjdk and compat...

That's a good point. The issue was raised based on a local run of the image without mounting the logs volume, but if the volume is always mounted when the App Engine run the image, it may not be an actual issue. We just need to fix the README to instruct mounting of the logs volume.

no longer required


feat: Upload and Send Multiple Attachments

Pull Request Title
Send multiple attachments at a time https://github.com/stakwork/sphinx-mac/issues/418
Description
This pull request addresses the Sending of multiple attachments at a time in Issue https://github.com/stakwork/sphinx-mac/issues/418.
The following are the addressed issues:

All designs have been built already on tt/feature/attachments-preview branch. So they should be used
Implement the logic to allow sending multiple attachments together
Implement new + button menu logic with ability to select files from Finder

Changes Made

AttachmentsManager.swift

Updated the ** uploadAndSendAttachment** function

NewChatAttachmentListItem.swift

Updated the ** NewChatAttachmentListItem** object

ChatBottomView.swift

Updated the shouldScrollToBottom function

ChatMessageFieldView+FieldsExtension.swift

Updated the shouldSendMessage function

NewChatMessageFieldView+FieldsExtension.swift

Updated the shouldSendMessage function

NewChatMessageFieldView+MentionsMacrosExtension..swift

Updated the closePreview function
Added the clearPreview function
Added the updateChatBottomView function

AttachmentItem.swift

Updated the NewAttachmentItem Object

NewChatViewController+BottomTopBarsExtension.swift

Updated the shouldSendMessage function
Added getData function
Added MediaObjectInfo Object

NewChatViewController+CollectionViewExtension.swift

Updated the addAttachmentClicked function
Updated the showImagePreview function
Updated the showPDFPreview function
Updated the showGIFPreview function
Updated the showVideoPreview function
Updated the showFilePreview function
Updated the showGiphyPreview function
Updated the showPreview function

NewChatViewModel+AttachmentsExtension.swift

Updated the insertProvisionalAttachmentMessageAndUpload function

DraggingDestinationView.swift

Updated the ShowPreviewDelegate protocol
Updated the DraggingDestinationView UI
Added the openFileExplorer function
Added the attachItem function

NewChatAttachmentView.swift

Added the allMediaData: [MediaObjectInfo] property
Updated the attachmentButtonTapped function

Here is the link to the recording:

Link: https://www.loom.com/share/ec653937bb834df1bc1930194c54bde8?sid=1c68b6bc-556f-4863-9923-f965eeb85671

Link for the improvement send multiple attachments:
Sending message with attachments

https://www.loom.com/share/574e44c4df2544bcb96921cadfac735e?sid=c8ed0862-556d-43df-b120-ca4719d14eb6

Sending message without attachments

https://www.loom.com/share/ba5c5608c18741bda9e37958955430ab?sid=120d853c-3e41-4a3e-af8b-c9c0c8b2c80f

Note: The error was due to insufficient fund


ApiClient with Proxy

Hi, is there a way to enable proxy in ApiClient ? I don't see this is possible with the current implementation , please guide me if there is a way. If there is not then can we have this option to enable proxy?

Hi @kester68,
Did you try the configuration.proxy ?


[BUGFIX] Fail when included before wp functions

If you add this library to a project composer.json file and require the autoload before WordPress functions are loaded, it fails.

Before I merge this, could you provide an example of a situation where this library could be included before WordPress loads wp-includes/plugin.php? As far as I know, that file is loaded before all plugins and themes.

I guess this is a common problem with WordPress projects fully managed by composer,  like with the themosis.
Generally, in that kind of architectures, all dependencies (WordPress, themes, plugins) are managed at a project level and not at a plugin level and the autoload is generally called at the beginning of the wp-config.php, so before wp functions are registered.

I see. One thing to keep in mind is that this will prevent a couple of library features from working.  like delayed notices. Unfortunately, I don't see a way around that unless you can somehow force things to load in a specific order.

Yeah, of course. Indeed it should have a register function that bind the hooks instead of auto registering on include. That’s how libraries work usually.


blog-preview problem of windows

$ hugo server --theme=AllinOne --buildDrafts                                        Building sites … ERROR 2019/02/14 10:26:36 render of "taxonomyTerm" failed: "D:\    blog\themes\AllinOne\layouts\_default\terms.html:1:22": execute of template fail    ed: template: _default\terms.html:11:9: executing "header" at     der...>: error calling partial: "D:\blog\themes\AllinOne\layouts\partials\page-h    eader.html:1:22": execute of template failed: template: partials/page-header.htm    l:1:22: executing "partials/page-header.html" at : erro    r calling len: len of untyped nil                                                   ERROR 2019/02/14 10:26:36 render of "home" failed: execute of template failed: t    emplate: index.html:3:6: executing "header" at : error     calling partial: "D:\blog\themes\AllinOne\layouts\partials\homepage-header.html:    1:22": execute of template failed: template: partials/homepage-header.html:1:22:     executing "partials/homepage-header.html" at : error c    alling len: len of untyped nil                                                      Total in 835 ms                                                                     Error: Error building site: failed to render pages: render of "taxonomyTerm" fai    led: "D:\blog\themes\AllinOne\layouts\_default\terms.html:1:22": execute of temp    late failed: template: _default\terms.html:11:9: executing "header" at     "page-header...>: error calling partial: "D:\blog\themes\AllinOne\layouts\partia    ls\page-header.html:1:22": execute of template failed: template: partials/page-h    eader.html:1:22: executing "partials/page-header.html" at     ..>: error calling len: len of untyped nil

find solution in another issue


feat: Bergelson's Intersectivity Lemma

Prove a weak version of the Bergelson intersectivity lemma. The proof gives the strong version, but we need natural density to state it. This is a prerequisite to Tao and Ziegler's recent paper Infinite partial sumsets in the primes.

[x] depends on: #14421
[x] depends on: #14423

See https://github.com/leanprover-community/mathlib/pull/18732

@urkud, I will merge this when I next access my computer (tonight or tomorrow) unless you object

bors merge


Rep Leaderboard Command

Users should be able to do a command to make the rep leaderboard show in the discord chat.

Try toprep?

Yeah this is already possible using toprep. @fadedboiii pls close this.

I agree this would be very usefull

why did you close this I loved the idea

Because there is already a command to do this: -toprep

^
Read the comments before commenting yourself


Add support for updating dependencies in target files

The eclipse-pde target files (extension .target, content is xml) supports for a while to also mention maven dependencies.
This enhances the file fetcher to scan for target files in a repository and the file parser to parse any maven type location.
Fix https://github.com/dependabot/dependabot-core/issues/4682

I'm creating this as a draft as it is missing a test case, this is my first time using ruby, so any help / hints would be appreciated.

FYI, a draft PR does not notify maintainers for feedback as draft tends to mean "not ready for review" in most workflows
I'd suggest you to move it out of draft to start accepting feedback

Hi @laeubi, thanks for working on this. Regarding test cases, I recommend you inspire on existing test case. For example, you can change any of the existing selectors to something incorrect, and see which tests fail (hopefully, otherwise those selectors would be uncovered by tests... 😅). That should give you the relevant tests covering the implementation of those selectors that you can use as an inspiration.

Unfortunately Github doesn't have #likes so I just post this comment as token of appreciation

Unfortunately Github doesn't have #likes so I just post this comment as token of appreciation

You have reactions and that's pretty close

I rebased now on current main branch and set this to "Ready For Review", I have also tried to adapt one of the test-cases to target files, would be good to get a feedback from a maintainer if I'm on the right track.

@jurre first, feel free to ask any question about the format I can provide examples/insights if needed (I'm just a total newbie on ruby what makes it quite hard to adjust things).
There is some official documentation here:
https://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.pde.doc.user/concepts/target.htm
but it is all a bit generic as usually users use the UI and do not really fiddle around with the details of serialization format, but it is also quite simple:

File format is XML
Root element is <target> that contains among others an element <locations> that has 0..n elements named <location>, each location has a type attribute, where only the type Maven is relevant here, a quite complex example can be found here: https://github.com/eclipse-m2e/m2e-core/blob/master/target-platform/target-platform.target, while the PR contains one reduced to the bare minimum: https://github.com/dependabot/dependabot-core/blob/54918367133820e94fbae4a332ae51d335e874ac/maven/spec/fixtures/target-files/example.target
As one can see, a target file might contain other things (like pom.xml), but for this purpose one can completely ignore that, the only relevant part is what an XPath of dependencies > dependency would select

Thanks! I notice the Maven tests and the linter are failing, would you mind taking a look at those?

Thanks! I notice the Maven tests and the linter are failing, would you mind taking a look at those?

I'll try to look at it, but as said my ruby skills are quite limited so I first need to understand how all these works, if someone mor familiar with rubby could take a look and maybe give some hints it would be helpfull!

Thanks! I notice the Maven tests and the linter are failing, would you mind taking a look at those?

@jurre I now was able to fix the issue with the test and also other checks are all green now so I think it would be ready for review.

@jurre what would be the next steps for this to become merged?

@laeubi someone on my team will deploy the changes to production, monitor to ensure they don't introduce regressions and then merge the changes in

@laeubi someone on my team will deploy the changes to production, monitor to ensure they don't introduce regressions and then merge the changes in

Is there an update how it is working? :)

These changes have not been deployed yet, so no update available, hoping someone will get to it soon 👍

Are there any updates yet? :)

@jurre Can this be deployed now? Anything we can help with?

@tivervac , if you could help with resolving the conflicts, we can take a stab at getting it merged. Thanks.

@tivervac , if you could help with resolving the conflicts, we can take a stab at getting it merged. Thanks.

@laeubi is probably the right one to resolve the conflicts.


Unable to initialize the app using lockProvider

angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
TypeError: lockProvider.init is not a function
whille trying to incorporate this into my project.
Getting the above exception.
Using angular version : 1.5.8

Not an issue with this repo. Was something else in my code base causing this error. Apologies, please ignore.


Consider re-factoring drop_records in db_creator

Right now, DBCreator.drop_records drops records from all tables not specified in APPEND_TABLE_NAMES (also excluding yoyo-related tables) and it is only being used in course_inventory/inventory.py. However, if other jobs want to use drop_records, they will also have to drop tables related to 'inventory.py, and inventory.py will drop their records, and back and forth.
Perhaps drop_records should take an optional argument specifying the tables to be dropped.

I've been thinking about this more and the APPEND_TABLE_NAMES idea. I'm kind of wondering now if specifying append tables was the wrong approach; shouldn't the default behavior be NOT to drop records? Instead, maybe we should change drop_records to accept a list of table names to drop, which are then validated using DBCreator.get_table_names() before records are actually deleted? Then anyone who wants to use this can manage their own tables, specifying tables as part of their job rather than in a configuration file. In my experience, APPEND_TABLE_NAMES has proven error-prone and confusing. I guess there was a lack of foresight on my part : (

:shipit:


Add support for JTA integration

we should be able to do:
    @GET
    @Path("/sendtx")
    @Transactional
    public String hellotx(@QueryParam("name") @DefaultValue("JCA") String name) {
        try (JMSContext context = factory.createContext()) {
            Queue myQueue = context.createQueue("jms.queue.com.lodh.jee.ArteTest.Bank.jms.bankref1.QueueB");
            context.createProducer().send(myQueue, "Hello " + name);
            if ("rollback".equals(name)) {
                QuarkusTransaction.setRollbackOnly();
            }
            context.createProducer().send(myQueue, "Hello " + name + " bis");
        }
        return "Hello " + name;
    }

and get both messages to be sent atomically.
if we attempt to enlist another non XA resource manager, there should be an error raised.

JTA integration is working. The error messages may be cryptic but that's coming from Narayana, so I am not sure there is much I can do about it


Tensor size mismatch when training tensornet

Hello,
I am trying to do some tensornet training using the latest version of torchmd-net and a single H100 GPU. However, I encounter the following error:
/home/frankhu/torchmd-net/torchmdnet/module.py:168: UserWarning: Using a target size (torch.Size([98464, 1])) that is different to the input size (torch.Si  loss_y = loss_fn(y, batch.y)
Traceback (most recent call last):
  File "/home/frankhu/torchmd-net/scripts/train.py", line 233, in <module>
    main()
  File "/home/frankhu/torchmd-net/scripts/train.py", line 218, in main
    trainer.fit(model, data, ckpt_path=None if args.reset_trainer else args.load_model)
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/trainer/trainer.py", line 544, in fit
    call._call_and_handle_interrupt(
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/trainer/call.py", line 44, in _call_and_handle_interrupt      return trainer_fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/trainer/trainer.py", line 580, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/trainer/trainer.py", line 989, in _run
    results = self._run_stage()
              ^^^^^^^^^^^^^^^^^
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/trainer/trainer.py", line 1033, in _run_stage
    self._run_sanity_check()
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/trainer/trainer.py", line 1062, in _run_sanity_check
    val_loop.run()
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/loops/utilities.py", line 182, in _decorator
    return loop_run(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/loops/evaluation_loop.py", line 134, in run
    self._evaluation_step(batch, batch_idx, dataloader_idx, dataloader_iter)
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/loops/evaluation_loop.py", line 391, in _evaluation_step      output = call._call_strategy_hook(trainer, hook_name, *step_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/trainer/call.py", line 309, in _call_strategy_hook
    output = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/lightning/pytorch/strategies/strategy.py", line 403, in validation_step
    return self.lightning_module.validation_step(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/torchmd-net/torchmdnet/module.py", line 141, in validation_step
    return self.step(batch, **step_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/torchmd-net/torchmdnet/module.py", line 227, in step
    step_losses = self._compute_losses(y, neg_dy, batch, loss_fn, stage)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/torchmd-net/torchmdnet/module.py", line 168, in _compute_losses
    loss_y = loss_fn(y, batch.y)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/torch/nn/functional.py", line 3297, in l1_loss
    expanded_input, expanded_target = torch.broadcast_tensors(input, target)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frankhu/mambaforge/envs/torchmd-net/lib/python3.11/site-packages/torch/functional.py", line 73, in broadcast_tensors
    return _VF.broadcast_tensors(tensors)  # type: ignore[attr-defined]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The size of tensor a (16) must match the size of tensor b (98464) at non-singleton dimension 0

My generated hparams.yaml for this experiment is as follows:
activation: silu
aggr: add
atom_filter: -1
attn_activation: silu
batch_size: 16
box_vecs:
- - 12.42
  - 0
  - 0
- - 0
  - 12.42
  - 0
- - 0
  - 0
  - 12.42
charge: false
check_errors: true
conf: null
coord_files: null
cutoff_lower: 0.0
cutoff_upper: 5.0
dataset: HDF5
dataset_arg: null
dataset_preload_limit: 1024
dataset_root: W64_revPBE.h5
derivative: true
distance_influence: both
early_stopping_patience: 95
ema_alpha_neg_dy: 1.0
ema_alpha_y: 0.0
embed_files: null
embedding_dimension: 64
energy_files: null
equivariance_invariance_group: O(3)
force_files: null
gradient_clipping: 0.0
inference_batch_size: 16
load_model: null
log_dir: H2O_exp
lr: 0.001
lr_factor: 0.9
lr_metric: val_total_mse_loss
lr_min: 1.0e-07
lr_patience: 5
lr_warmup_steps: 0
max_num_neighbors: 256
max_z: 100
model: tensornet
neg_dy_weight: 1.0
neighbor_embedding: true
ngpus: -1
num_epochs: 1000
num_heads: 2
num_layers: 0
num_nodes: 1
num_rbf: 32
num_workers: 32
output_model: Scalar
precision: 64
prior_args: []
prior_model: null
rbf_type: expnorm
redirect: true
reduce_op: mean
remove_ref_energy: false
reset_trainer: false
save_interval: 1
seed: 42
spin: false
splits: h2o_splits.npz
standardize: false
static_shapes: false
tensorboard_use: true
test_interval: 10
test_size: 0.1
train_size: 0.8
trainable_rbf: true
val_size: 0.1
vector_cutoff: false
wandb_name: training
wandb_project: training_
wandb_resume_from_id: null
wandb_use: false
weight_decay: 0.0
y_weight: 0.0

My dataset is formatted using the HDF5 format, consisting of boxes of 64 water molecules. I have attached it as a zip file to this issue, along with a npz file of the splits I use for training. I am a little confused because I have successfully run trainings with tensornet in the past using this data and these settings,
Any help would be greatly appreciated. Thank you very much!
water_data.zip

We think this is a problem with the dataset.
The error is in computing the losses, so after the model is executed and the trainer is comparing the model outputs with the labels in your dataset.
Try to import the dataset manually and check the shapes of some sample.
from torchmdnet.datasets import HDF5
ds = HDF5("water_data.hdf")
sample = ds.get(0)
print(sample)

Yes, it does seem to be a problem with the dataset. When I run the suggested code snippet, I get the following output:
>>> from torchmdnet.datasets import HDF5
>>> ds = HDF5("W64_revPBE.h5")
Loading 1 HDF5 files (28.20 MB)
Preloading 1 HDF5 files (28.20 MB)
>>> sample = ds.get(0)
>>> print(sample)
Data(pos=[192, 3], z=[192], y=[6154], neg_dy=[192, 3])

The shape of y is wrong, since there should only be 1 energy per frame, although I do have 6154 frames in total. Each frame has 64 water molecules, so 192 atoms total, which is correct for the position, type embedding, and force.
Right now, my dataset is an h5 file with the following shapes for each of the keys:
energy: (6154,), i.e. (N_frames,)
forces: (6154, 192, 3), i.e. (N_frames, N_atoms, direction)
pos: (6154, 192, 3), i.e. (N_frames, N_atoms, direction)
types: (6154, 192), i.e. (N_frames, N_atoms)
Is the fix here simply to change the shape of the energies to add an extra dimension, i.e. (6154,) --> (6154, 1)?
Thank you!

I think so. Can you try it and let us know?
Btw, I realized that you are using a very small model (0L, 64 hidden channels). I am just curious: does it perform satisfactorily? Also, I saw that you are using mean as the aggregation scheme. Is this for any particular reason? I never tried that.
G

Hi @RaulPPelaez @guillemsimeon,
So sorry for the late response! Yes, reshaping the energies to be (N_frames, 1) resolved the issue. Intuitively this makes sense, but it might be helpful to add some documentation around the hdf5 dataset specifying what shapes everything should be.
Regarding the model size @guillemsimeon, I mostly use this model size because it is quick to train and it works quite well, at least for the bulk water dynamics I am working on right now. The mean aggregation scheme, along with the previous standardization feature, turned out to be the root cause of many of the issues I was having in the past, so using the addition aggregation for everything is definitely the way to go. I will let you know if this model size continues to work for some of the more challenging systems I intend to tackle next.
Thanks again for all your help!

Glad you got it working.
I was reading the code to add a comment about this and I believe your usecase should be supported. You found a bug!
This line here:
https://github.com/torchmd/torchmd-net/blob/8b472462f212aa58a36c03b26d75900acc09647c/torchmdnet/datasets/hdf.py#L92
Should be:
tmp = tmp.unsqueeze(-1)

You can confirm this is a bug in the cache preloading code by setting
dataset_preload_limit: 0

in your yaml, which skips this code.

Should be fixed by https://github.com/torchmd/torchmd-net/pull/313

Awesome, thanks for looking into this @RaulPPelaez! As far as the model performance goes, this doesn't affect the training or any other operations right?

Should not affect greatly. In principle preloading should be faster, but YMMV. Let me know your experience!

Please feel free to reopen if the issue resurfaces.


Add docs for public headers

Use Doxygen commands.
Public surface is in header files in:

sdk/rms_sdk/ModernAPI
sdk/rmsauth_sdk/rmsauth/rmsauth

I've added docs to ProtectedFileStream.h and IAuthenticationCallback.h which can serve as examples on formatting for more.
All doc comment commands can be found in the Commands section of the Doxygen manual.
@BrucePerlerMS @prvijay

Ok. Now that I'm back from vacation I can dig into these.
@joshgav @prvijay

This issue looks like it can be closed as its just a work item tracking issue for build the API ref, which is now complete.

Ok closing it,


Is there a way to add superuser to a user?

I'm trying to make one of my users superuser, I'd think there would be a way to specify that in the create user stanza:
postgresql_database_user node['app']['username'] do
connection postgresql_connection_info
password node['app']['password']
privileges [:superuser] <-- like this?
action [ :create, :grant]
end
However, that doesn't work.  Cant find in the documentation.  In the absence of that I'm trying this:
postgresql_database 'makeGooseSuperUser' do
connection postgresql_connection_info
sql        'alter role suRole with superuser;'
action     :query
end
Which doesn't seem to work either.  It's like chef doesn't see that stanza.

@bkett Thanks.

According to https://github.com/chef-cookbooks/database/blob/b76d55c9bbeeb6b7d684b88f89f5801a29486a47/test/fixtures/cookbooks/postgresql_database_test/recipes/default.rb#L63-L69, you must set superuser true on the postgresql_database_user LWRP.
https://github.com/chef-cookbooks/database/blob/b76d55c9bbeeb6b7d684b88f89f5801a29486a47/libraries/provider_database_postgresql_user.rb#L48


Add knob to toggle fullscreen noise or solid colour

Added a solid colour pixel shader that produces a fullscreen solid colour.
The colour of the fullscreen quad can be specified from a dropdown list: Noise/Red/Green/Blue/Black/White, with Noise being the original random noise shader.
Example commands:
./vk_graphics_pipeline.exe --fullscreen-quads-count 1 // One fullscreen noise quad rendered
./vk_graphics_pipeline.exe --fullscreen-quads-count 1 --fullscreen-quads-colour Blue // One fullscreen blue quad rendered

Other changes:

Renamed some variables from "noise quads" to "fullscreen quads"
Separated fullscreen quad pipeline creation into a separate function since they now need to be re-created

REVIEWER NOTE:
I'm casting a wide net with reviewers since I don't know everyone's availability. I am OOO beginning on Friday so if this isn't merged before then please feel free to cherry pick / edit as necessary. Thanks!

Made changes to the colour shader and knob (no longer random, select a colour from a dropdown list).
Some renaming for the knobs.

Rebased and made some fixes, ready for review again

@Keenuts Just a quick ping, does this PR need any changes or can it be merged now?


Update settings.py to pull SECRET_KEY from env

Purpose
Currently the settings.py hardcodes SECRET_KEY with a note to make sure to change it in production. A best practice is to get SECRET_KEY from the environment variables, and that makes it much easier to change in production without accidentally checking it in. This PR changes the line to get SECRET_KEY from environment variables while still defaulting to the insecure key value.
Does this introduce a breaking change?

[ ] Yes
[X] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[X] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test
If the server works, then the settings were loaded correctly:
python manage.py runserver

Other Information
I had to make this change in my fork of this sample which adds support for the Azure Developer CLI, as I needed to define a SECRET_KEY environment variable in the Bicep template. This change should generally make it easier for anyone who is deploying a Django app.

@vmagelo Could you review this change? Thank you!


Add table move entry to

Add option to move entry to another table asset.

Related to:

https://github.com/unity-game-framework/ugf-runtimetools/issues/89


Fixed output prints " Signal 'node_removed' is already connected "

Close #38012

Thanks!

Cherry-picked for 3.2.2.