Duplicate test names cause errors

So I started creating 1 test executable per class that I test. This became unwieldy after many classes came under test, as now I had hundreds of projects in my visual studio solution (CMake generated these for me).
I have now condensed my tests down to 1 project per module (multiple classes under test in 1 project, 1 translation unit per test for each class). This yields bigger tests that run more test cases and run for longer, however now I have some naming conflicts. It's common for me to have a test case like so:
TEST_CASE("Test Construction", "[class1]")

And in another translation unit, for a different class:
TEST_CASE("Test Construction", "[class2]")

However my test executable fails saying that two test cases with the same name were found. Why does it matter if the names are duplicated? The names, as far as I understood, were for documentation purposes. Do you not scope tests based on tags and/or translation unit? What is the proper structure here? How do I solve this problem?

This issue is likely related to issue #59.
Why not (also) use a proposition such as class1 constructs properly for the name of the test case?
I've created a gist before that I should probably adapt to show two source files and to use https://gist.github.com/martinmoene/c4240791bfd076c87e45

Wouldn't it be preferable to optionally have the testing framework append some configurable prefix to test names?
I have my Catch tests segregated to a unique test file per class under test, and in some instances I have the same testCase name for two different classes.  Since I'm using different cpp files for each class, I would have expected that to be enough to prevent conflicts.
However, since this is not the case, I'm resorting to the following:
#define TEST_PREFIX "MyTestClass::"

TEST_CASE(TEST_PREFIX "testCaseName") {
    // ...
}

@Sarev0k I do the same thing for the tags (so that I can run all tests for a given class via a single tag).
At the moment it doesn't make sense to redundantly manage a prefix for the test case name either. I think Catch should utilize some scoping or name mangling mechanisms to generate unique names as it requires. This is an implementation detail that I shouldn't have to care about.
Maybe I'm missing some fundamental design concepts here, but that's just my observation so far.
I'm happy to contribute a code change if I can get some guidance from the author on what the problem is (if any) and a good way to fix it.

See also issue #209, pull request #210.
I expect another workaround is to put all test cases in one big outer (anonymous) namespace block in each .cpp file (can't try it at the moment though).

Notification: edited previous comment at 26-Jul-2015, 21:34 GMT

Even if it's not done automatically based on cpp filename.
I think It would still be helpful if Catch provided a Macro I could override that would prefix all my test cases in a file with a specific string.
This would allow me to do the following:
#define TEST_NAME_PREFIX "MyTestFilePrefix"

TEST_CASE("testFoo") {
    // ...
}

Which would provide a test with the name of MyTestFilePrefix::testFoo.  With the added benefit that I don't have to manually prefix TEST_CASE names with TEST_NAME_PREFIX or redefine the TEST_CASE macro to do this for me.
I also believe that by expanding this concept to also include tagging these tests by default would also allow @rcdailey to run only tests of a specific file, without needing to manually tag them all.

@philsquared Has this been addressed yet? I'm having to do some obscure workarounds:
#define MAIN_TAG "[MyClass]"

//....

TEST_CASE(MAIN_TAG " This is my test case", MAIN_TAG)
{
    ......
}

Just wanted to ping this issue and see if there are any resolutions to this? Has this been addressed in a prior release?

It looks like this may have been resolved in version 1.4.0 which incorporated philsquared/Catch/pull/351.

I believe it was 1.5.0, incorporating #608 (thanks again, @rcdailey) - but, yes, I didn't report back here (or, in #608).

I did test this again with the COUNTER change but I still see the problem (hence why #608 was still active). Happy to help diagnose why counter still wasn't working, I didn't dig too deep on it.
Let me create a sample project that reproduces the problem.

Here is a sample I created:
https://gist.github.com/rcdailey/9c757053bc49409a0458c90617d00122
I used Visual Studio 2015 as my CMake generator to create this project. Enable exception breakpoints for C++ and you will get a throw due to duplicate test case names. So either the __COUNTER__ solution didn't work, or I'm confused about what it was supposed to really fix.
Let me know if you're able to reproduce the issue.

I've been catching up on my unread emails, as well as GitHub issues, and have recently chatted with @rcdailey over email about this.
The issue is with the test name (the string) rather than the generated test function name - so the __COUNTER__ won't help.
My first suggestion, which fits with @martinmoene's original comments in this thread, was to just make the names unique - but incorporating the name of the class under test (in the example) into the test name - which I think is more informative anyway.
I did also make another suggestion, which was to revert to the original approach for test naming in Catch: use the name field as a uniquely identifiable string, possibly hierarchical - and not necessarily descriptive (could be a guid if you like) - then use the second field as a free form description - which doesn't have to be unique. This still works because only content in square brackets is considered tags in the second field.

Since there has been no follow-up in two months, I am going to close this issue.


Feature request: Autofix for none-not-at-end-of-union (RUF036)

I tried out RUF036 (in preview) today in typeshed and it found 140 errors. That would take a long time to fix manually, and I imagine an autofix for this rule should be doable.
As usual, marking it "unsafe" when comments are in the way is fine.
Ruff 0.8.4
Command: ruff check --fix --preview --isolated --select=RUF036

can I work on this?


Introduce Travis config for Linux builds

Tested on my own SC2 bot which uses s2client-api as a submodule:
https://github.com/alkurbatov/suvorov-bot
Please pay attention that Travis integration should be enabled manually for this repo.

Sorry for the delayed response to this. We definitely want to get Travis up and running I think we are just having permissions issues on what Blizzard account will own the Travis instance.
I'll get back to you either today or tomorrow with more info.

I'm working on setting this up under our StarCraft II Automation account now


check if onRequest not called for PDP

possible that it was just in an old version

Tried to reproduce it but it worked fine: components implementing RequestStartedHook are being executed. Must have been an old version.


HDFS-15912. Allow ProtobufRpcEngine to be extensible

NOTICE
Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
For more details, please see https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 53s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

-1 :x:
test4tests
0m  0s

The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.

_ trunk Compile Tests _

+0 :ok:
mvndep
14m  4s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
23m 29s

trunk passed

+1 :green_heart:
compile
22m 38s

trunk passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
compile
18m 58s

trunk passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
checkstyle
4m  0s

trunk passed

+1 :green_heart:
mvnsite
2m 13s

trunk passed

+1 :green_heart:
javadoc
1m 43s

trunk passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javadoc
2m 31s

trunk passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
spotbugs
3m 40s

trunk passed

+1 :green_heart:
shadedclient
16m 55s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 20s

Maven dependency ordering for patch

-1 :x:
mvninstall
0m 28s
/patch-mvninstall-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
compile
0m 54s
/patch-compile-root-jdkUbuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.txt
root in the patch failed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.

-1 :x:
javac
0m 54s
/patch-compile-root-jdkUbuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.txt
root in the patch failed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.

-1 :x:
compile
0m 48s
/patch-compile-root-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.txt
root in the patch failed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.

-1 :x:
javac
0m 48s
/patch-compile-root-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.txt
root in the patch failed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
3m 41s
/results-checkstyle-root.txt
root: The patch generated 36 new + 21 unchanged - 3 fixed = 57 total (was 24)

-1 :x:
mvnsite
0m 33s
/patch-mvnsite-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
javadoc
0m 23s
/patch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.txt
hadoop-common in the patch failed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.

-1 :x:
javadoc
1m 18s
/results-javadoc-javadoc-hadoop-common-project_hadoop-common-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.txt
hadoop-common-project_hadoop-common-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)

-1 :x:
spotbugs
0m 28s
/patch-spotbugs-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
shadedclient
1m 56s

patch has errors when building and testing our client artifacts.

_ Other Tests _

-1 :x:
unit
0m 30s
/patch-unit-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
unit
23m 17s
/patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt
hadoop-hdfs-rbf in the patch passed.

+1 :green_heart:
asflicense
0m 25s

The patch does not generate ASF License warnings.

150m 59s

Reason
Tests

Failed junit tests
hadoop.hdfs.server.federation.router.TestRouterFederationRename

hadoop.hdfs.server.federation.router.TestRouterRpcMultiDestination

hadoop.hdfs.server.federation.router.TestRouterRpc

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2901/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/2901

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux e050caca393c 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 9663b7f1f313f872213e426db0684a21c8f2c7db

Default Java
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2901/2/testReport/

Max. process+thread count
2164 (vs. ulimit of 5500)

modules
C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs-rbf U: .

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2901/2/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 42s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

-1 :x:
test4tests
0m  0s

The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.

_ trunk Compile Tests _

+0 :ok:
mvndep
15m 50s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
20m 31s

trunk passed

+1 :green_heart:
compile
21m 12s

trunk passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
compile
18m  5s

trunk passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
checkstyle
4m  0s

trunk passed

+1 :green_heart:
mvnsite
2m 21s

trunk passed

+1 :green_heart:
javadoc
1m 58s

trunk passed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javadoc
3m  4s

trunk passed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

+1 :green_heart:
spotbugs
4m 15s

trunk passed

+1 :green_heart:
shadedclient
17m 47s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 25s

Maven dependency ordering for patch

-1 :x:
mvninstall
0m 32s
/patch-mvninstall-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
compile
1m  2s
/patch-compile-root-jdkUbuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.txt
root in the patch failed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.

-1 :x:
javac
1m  2s
/patch-compile-root-jdkUbuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.txt
root in the patch failed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.

-1 :x:
compile
0m 56s
/patch-compile-root-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.txt
root in the patch failed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.

-1 :x:
javac
0m 56s
/patch-compile-root-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.txt
root in the patch failed with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

-0 :warning:
checkstyle
3m 53s
/results-checkstyle-root.txt
root: The patch generated 36 new + 21 unchanged - 3 fixed = 57 total (was 24)

-1 :x:
mvnsite
0m 37s
/patch-mvnsite-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
javadoc
0m 28s
/patch-javadoc-hadoop-common-project_hadoop-common-jdkUbuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.txt
hadoop-common in the patch failed with JDK Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04.

-1 :x:
javadoc
1m 21s
/results-javadoc-javadoc-hadoop-common-project_hadoop-common-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08.txt
hadoop-common-project_hadoop-common-jdkPrivateBuild-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 with JDK Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08 generated 3 new + 0 unchanged - 0 fixed = 3 total (was 0)

-1 :x:
spotbugs
0m 34s
/patch-spotbugs-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
shadedclient
2m 15s

patch has errors when building and testing our client artifacts.

_ Other Tests _

-1 :x:
unit
0m 34s
/patch-unit-hadoop-common-project_hadoop-common.txt
hadoop-common in the patch failed.

-1 :x:
unit
64m 44s
/patch-unit-hadoop-hdfs-project_hadoop-hdfs-rbf.txt
hadoop-hdfs-rbf in the patch passed.

-1 :x:
asflicense
0m 29s
/results-asflicense.txt
The patch generated 7 ASF License warnings.

192m 56s

Reason
Tests

Failed junit tests
hadoop.hdfs.server.federation.fairness.TestRouterHandlersFairness

hadoop.hdfs.server.federation.router.TestRouterMountTable

hadoop.hdfs.server.federation.router.TestRouterQuota

hadoop.hdfs.server.federation.router.TestDisableNameservices

hadoop.hdfs.server.federation.router.TestRouterWithSecureStartup

hadoop.hdfs.server.federation.router.TestRouterFederationRename

hadoop.fs.contract.router.web.TestRouterWebHDFSContractOpen

hadoop.hdfs.server.federation.router.TestRouterRpcMultiDestination

hadoop.fs.contract.router.web.TestRouterWebHDFSContractConcat

hadoop.hdfs.server.federation.router.TestRouterRPCClientRetries

hadoop.hdfs.server.federation.router.TestRouterMountTableCacheRefresh

hadoop.hdfs.server.federation.router.TestRouterAllResolver

hadoop.hdfs.server.federation.router.TestRouterMultiRack

hadoop.hdfs.server.federation.router.TestRouterFaultTolerant

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2901/4/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/2901

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux 35e2bbc9fc6b 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / fd82e8038e3fc48f720aca2aea9bd8b3d8270116

Default Java
Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.10+9-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_282-8u282-b08-0ubuntu1~20.04-b08

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2901/4/testReport/

Max. process+thread count
1237 (vs. ulimit of 5500)

modules
C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs-rbf U: .

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2901/4/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.


WIP: Setting up repository for insert

@jezzsantos this is no where near ready but give an idea of the direction I am heading

Hey @simondevries I leave this here until you are a little further through.
A couple of comments for now.

Hopefully you don't need to take a dependency on a ORM like Dapper. isn't that big time YAGNI?
I would have though most of the implementation would just use SqlClient, and built in methods like: Retrieve, Update, Delete, etc? Only the Query method would need actual building of SQL statements?


How to change subtitles for UTF 8 for brazilian portuguese?

I just LOVED streama, the only problem is with subtitles. I can't see the correct symbols.
The other problem is:
I have on HDD in mnt and other in /media
is there a way to add one more directory?
Thank you very much for all developers...

Tenho a solução pra ti. Abre a legenda num bloco de notas e salva como. Se eu nao me engano mostra ANSI, salva UTF-8 e depois renomeio a extensao pra srt. Joga lá que vai funcionar.


Negative numbers for pmean

Problem description
I would like to use the new pmean implementation to calculate the generalized mean for word embeddings to create sentence embeddings. The idea is taken from the paper Concatenated Power Mean Word Embeddings as Universal Cross-Lingual Sentence Representations. Currently, I'm using my own implementation:
def generalized_mean(vals: np.array, p: int = 1) -> np.real:
    """Calculate the general mean (see: https://en.wikipedia.org/wiki/Generalized_mean).

    Notes
    -----
    p = -1: harmonic mean
    p = 0: geometric mean
    p = 1: arithmetic mean

    Code taken and adapted from:
    https://github.com/UKPLab/arxiv2018-xling-sentence-embeddings/blob/master/model/sentence_embeddings.py

    Parameters
    ----------
    vals : np.array
        Array with values.
    p : int, optional
        Parameter to represent different means, by default 1.

    Returns
    -------
    np.real
        Generalized mean as a real number.
    """
    return np.power(np.mean(np.power(np.array(vals, dtype=np.complex128), p), axis=0), 1 / p).real

This implementation currently doesn't work with values like p=0 or p=-1, so my plan was to switch to the scipy implementation of the generalized mean. The main problem here is, that it isn't defined for negative numbers, see code. But word embeddings typically have negative numbers, e.g. one embedding could loook like this:
embedding = [
    [0.10901299864053726, 0.15312300622463226, -0.24146799743175507, 0.2262050062417984, 0.11391100287437439, ...],
    ...
]

Question
Are there any plans to integrate an implementation of pmean for negative numbers? Or are there alternative solutions to my problem?

Hi @realjanpaulus, thank you for reporting. The issue is that to generalize with any exponent we would need to involve complex values. By definition, these means also need to have positive values. I don't think we would want to go around that.


allow a library with fewer fixtures to be used with a test that has more fixtures

When I create a Library<T> using only my universal (e2e + component test) fixtures UniversalFixtures
And I try to assign it in new GherkinWrapper.forPlaywright(test, library) where test has UniversalFixtures & E2eFixtures
Then I get an error like
Type 'Library<PlaywrightTestArgs & PlaywrightTestOptions & PlaywrightWorkerArgs & PlaywrightWorkerOptions>' is not assignable to type 'Library<PlaywrightTestArgs & PlaywrightTestOptions & CommonE2eFixtures & PlaywrightWorkerArgs & PlaywrightWorkerOptions>'.
  Types of property 'given' are incompatible.
    Type '(spec: string | RegExp, test: TestFunction<PlaywrightTestArgs & PlaywrightTestOptions & PlaywrightWorkerArgs & PlaywrightWorkerOptions>) => void' is not assignable to type '(spec: string | RegExp, test: TestFunction<PlaywrightTestArgs & PlaywrightTestOptions & CommonE2eFixtures & PlaywrightWorkerArgs & PlaywrightWorkerOptions>) => void'.
      Types of parameters 'test' and 'test' are incompatible.
        Types of parameters 'frameworkArgs' and 'frameworkArgs' are incompatible.
          Type 'PlaywrightTestArgs & PlaywrightTestOptions & PlaywrightWorkerArgs & PlaywrightWorkerOptions' is not assignable to type 'PlaywrightTestArgs & PlaywrightTestOptions & CommonE2eFixtures & PlaywrightWorkerArgs & PlaywrightWorkerOptions'.ts(2322)
createBddWrapper.ts(41, 5): The expected type comes from property 'library' which is declared here on type '{ test: OnlyFunction<TestType<PlaywrightTestArgs & PlaywrightTestOptions & CommonE2eFixtures, PlaywrightWorkerArgs & PlaywrightWorkerOptions>>; describe: OnlyFunction<SuiteFunction & { only: SuiteFunction; skip: SuiteFunction; fixme: SuiteFunction; serial: SuiteFunction & { only: SuiteFunction; }; parallel: SuiteFunction & { only: SuiteFunction; }; configure: (options: { mode?: "parallel" | "serial" | undefined; retries?: number | undefined; timeout?: number | undefined; }) => void; }>; library?: Library<PlaywrightTestArgs & PlaywrightTestOptions & CommonE2eFixtures & PlaywrightWorkerArgs & PlaywrightWorkerOptions> | undefined; }'

In the PR I suggest to hint to TS that libraries with fewer fixtures should be allowed to be used in test functions with more fixtures.

@cassus please see #13
I tried your suggestion but it did not work. I tried something else. Let me know if it is what you where aiming for


Safer and more consistent aromaticity handling

(Continuing from #206)
Describe the problem
Problem 1:
Our current data structures and functions handle aromaticity in an unsafe way. There are three places where we store aromaticity information, but don't rigorously enforce that they are consistent (largely my fault [1]) or have mechanisms to flag/resolve inconsistencies. These three places are:

In a Molecule's Atom or Bond's is_aromatic attribute.
In a Topology's aromaticity_model attribute
In a ForceField's aromaticity_model attribute

Problem 2:
A Molecule currently does not know its own aromaticity model, just whether its atoms and bonds ARE aromatic. Currently we have different degrees of enforcement, usually assuming the molecule conforms to DEFAULT_AROMATICITY_MODEL, but not all Molecule-creation pathways enforce this, and the public API allows invalidating this assumption. This means that the information in the Atom/Bond.is_aromatic attributes is missing essential context and can't safely be used for most purposes.
Problem 3:
Currently, molecule equality comparisons don't check that all molecules involved have equivalent aromaticity models. It's possible that two molecules are identical with one particular aromaticity model, but not with another, since the aromaticity model is the bridge between a single molecule's multiple possible kekule structures. These molecule equality comparisons are core to our functionality, since they are how Topology.add_molecule knows whether a newly-added molecule is unique or not.
Problem 4:
It's taken me almost two years to understand the subtlety of the aromaticity issue, and where in the codebase we are or aren't making assumptions about the use of identical aromaticity models. This will spell organizational trouble as the volume of contributors and PRs increases, so I think we need at least approachable documentation of this, and at best a change to our object model that doesn't allow implementation of dangerous behavior.
So far this hasn't been an issue because we currently only support OEAroModel_MDL and its RDKit equivalent. But users constructing molecules atom-by-atom using the API [2] may have been unknowingly circumventing our "safe pathways" and getting weird results.
@davidlmobley points out that aspects of this problem that affect parameterization will be resolved by WBO interpolation of parameters. This is good news, but resolving this still won't help the problems with our Molecule and Topology classes.
Solution specification
Important requirements:

The Molecule class either

MAY store atom/bond.is_aromatic flags, but if so, it MUST know its own aromaticity model, or
MUST NOT store is_aromatic flags, but methods that depend on aromaticity perception MUST include an optional argument for which aromaticity model to use

Less important requirements:

If a user queries atom/bond.is_aromatic before a molecule is added to a Topology, then the equivalent atom/bond after addition to the Topology MUST return the same result.
The public API MUST NOT offer a way to leave a Molecule in a seemingly-valid, but really-invalid state. So, if a user manually switches the is_aromatic value of an atom, any Molecule-wide aromaticity model should be invalidated.

Bad outcomes, which I'd like to avoid if possible.

Topology.add_molecule MAY reject a Molecule, if the Molecule's existing aromaticity model may have irreparably changed its graph such that it would be misinterpreted by the Topology's aromaticity model.
ForceField.create_openmm_system MAY reject a Topology if it was constructed with a different aromaticity model, since the other aromaticity model could have irreparably changed the molecular graphs.
Topology.add_molecule is not able to trust if a Molecule says it has a particular aromaticity model, and must re-percieve its aromaticity.
ForceField.create_openmm_system is not able to trust a Topology that says it has a particular aromaticity model, and must re-percieve each molecule's aromaticity.

Proposed solutions
I'd like to push for a change to the object model/API, with the goal of making dangerous/ambiguous behavior hard or impossible to implement.
I see a few options on this front:

Separate classes If we allow the aromaticity model to affect the core properties of the molecular graph (like, switch around double bonds, assign bond order 1.5, or move formal charges), we could have distinct classes for "graph molecules" and "graph molecules that have had an aromaticity model applied". The latter class would be a "view" of a graph molecule with additional aromaticity data fields.
Forbid in-place modification If we keep aromaticity as a core property of a molecular graph, we could make all public methods that (re)assign aromaticity labels return a modified COPY of the molecule. That way we make it clear via the API that applying a new aromaticity model could change the graph of the molecule. The public API would never allow in-place modification of is_aromatic flags or aromaticity_model values.
Demote aromaticity from core properties We could remove the is_aromatic attributes of Atoms and Bonds altogether, and make aromaticity get computed on-the-fly when needed.

The advantage of the Separate classes option is that it's "safe". The disadvantage is that we'll have to implement a complex "allowlist" to determine when instances of the two classes can safely interact, and we'll be frustratingly restrictive by default. It'll also be very user-unfriendly.
The advantage of the Forbid in-place modification option is that the risks of modifying the aromaticity model are inherently communicated by making the same molecule with different aromaticity models literally be different objects. We escape the obligation of policing when a molecule's "meaning" really changes. The downside is that we don't "automagically" handle anything -- All of the burden is shifted on to the user.
The advantage of the  Demote option is that we could fully treat is_aromatic as computed-on-the-fly property (caching when appropriate). Each method requiring aromaticity info would have an optional kwarg for the aromaticity model to use. A disadvantage is that the == operator would either become very strict (matching only precisely the same kekule structure, even if many are trivially possible) or it would have to quietly apply the DEFAULT_AROMATICITY_MODEL. Use of anything other than the default model will require explicit calls to the is_isomorphic method.
I'm in favor of Demote at the moment, but would be interested to hear other approaches.
Unresolved questions

Should we add the requirement the guarantee that A molecule's interpretation at any point in its lifecycle must be a "state function" of its original data source? This would be a very clear guiding principle for developers. Unpacking this statement, it means "If I load a molecule using aromaticity model A, then during parameterization, a FF reinterprets it using aromaticity model B, then the toolkit MUST provide the same result as if the molecule were initially loaded using model B (This would directly solve [3]). Of course, if the user manually modifies the molecule after loading it, then we do not need to uphold this guarantee.
Should the aromaticity model EVER be allowed to change the other core properties (like formal charge or bond orders) on a molecule?
Should we ever let a graph molecule have a bond order of 1.5? Or is that already assuming an aromaticity model? (thanks @cbayly13 for this question -- he also points out that the 5-membered ring in an indole is a great challenge case for aromaticity models)
How do we resolve issues where loading a file REQUIRES an aromaticity model (for example to figure out the number of implicit hydrogens)? What do we store as the "original molecule" in that case? (see recent discussion on #511)
Does the perception of stereochemistry (a current "core property") rely on an aromaticity model? Might an erroneous stereocenter be added if two identical substituents of a central group are kekulized into different resonance states?

[1] at least I hadn't wrapped my head around this problem until recently, so my development since the 0.1.0 release may have removed the carefully-considered checks that were there. But storing this information in multiple places is bad, because they could fall out of sync. For example, atom/bond.is_aromatic has a public setter But also, in some contexts (like a Topology), the molecule containing those atoms and bonds is part of a larger Topology, which has its own aromaticity_model. Since the aromaticity of an atom or bond is a deterministic result of applying an aromaticity model to a chemical graph, what would it mean to set the is_aromatic flag of an atom to a different value? Which value should the ForceField trust when processing that Topology?
[2] We're even finding that SMILES representations of graph molecules that don't specify their aromaticity model can be troublesome in corner cases -- #511
[3] For a current example: the individual molecules in the Topology are checked for uniqueness in Topology.add_molecule and grouped if found to be redundant. If two molecules are found to be equivalent under one aromaticity model, they may still be found to be separate under another. But the ForceField only knows what the Topology knows, so if a Topology was populated using one aromaticity model, a FF with a different aromaticity model can not safely interpret that Topology.

First, some potentially silly questions  that would help my understanding

Is there a reason why Molecule does not currently know its aromaticity model at its level? I can't wrap by head around why objects at higher (Topology) and lower (Atom/Bond) have this information but it doesn't. My reading  of your proposals is that each would require a molecule object knowing its aromaticity model in order to apply it on-the-fly to its own graph.

What is the relationship between aromaticity models and partial charges? (It's usually indirect or unrelated, I would think, but there are a lot of partial charge models out there.)

How important it is to us that users be able to build up molecules from scratch using the Molecule API and/or modify existing molecules, as compared to reading from file/object and taking only what is there?

I think the first question that should be resolved is your "Important requirement" (paraphrasing):

The Molecule class either

Knows its components' aromaticity by knowing its own aromaticity model or
Does not know its aromaticity model, its constituents don't know their aromaticity model, and if anything requires aromaticity, that method

I am strongly in favor of 1, mostly on the basis that aromaticity seems to be important for a lot of infrastructure and science and I think that forbidding that from being stored in the object is going to limit us in significant ways. Downstream use cases can do whatever they want with that data (overwrite, ignore, etc.) but I think storing it in the molecule is much more natural than carrying it along the path of a workflow. Say in the case of serialization, storing the model alongside the molecule seems to offer no benefits compared to storing it in the molecule at a high level and also makes it easier to write out a molecule to file without a model, which we'd want to avoid.
My first impressions of the ideas you sketched out:

Separate classes

I'm not a fan of this idea; if we want one objects to be a particular "interpretation" of another, more stable object, I'd rather handle that by doing that "interpretation," basically the Demote idea. I'd also worry about how easily these classes can be come de-synced and the work done to force a state of agreement while enabling the user to fiddle with molecules.

Forbid in-place modification

I'm iffy on if, fundamentally, "[identical graph molecules] with different aromaticity models would literally be different objects," should be the target. We definitely want to avoid ambiguity about how different models with describe the same graph provide different views/interpretations, but this will lead to large amounts of duplication that I worry is unnecessary. Here is a case in which my lack of expertise on aromaticity models shows; in my head, if two models agree precisely on which rings/moieties in a molecule are aromatic, those molecules (the "real" molecules with models applied, not their simplified graph representation) can be treated identically (in every way except keeping track of the model used to generate it!).

Demote

This is also my preferred of these options. This seems to be the best fit for what I understand aromaticity models' purpose to be and also seems the most tractable to implement. A feature (unclear to me if good or bad) is that a user can't come in an insist some bond/atom is aromatic when it disagrees with the model - but is that something we even want to allow? More generally, should users be able to decide aromaticity for themselves in explicit disagreement with the behavior of known models? A similar feature (again, not clearly good or bad) is that this limits what the user can do to what aromaticity models are currently supported by the toolkit. I'd suggest that's a good thing in the sense that it respects the boundary of what is and isn't supported and abstracts that friction away to the toolkit wrappers, where it should be. But maybe somebody wants to be able to forcefully specify aromaticity, or store the results of a model that they know but the toolkit doesn't support. I'm not sure if that's a significant limitation or not.
The other questions you laid out:

Should we add the requirement the guarantee that A molecule's interpretation at any point in its lifecycle must be a "state function" of its original data source?

This would seem nice, I'm not sure if critical. Right now, molecule readers/views and force fields disagreeing on aromaticity models is going to be a potential landmine, but that's mostly because of the big-picture issues you're raising here, and I'd expect them to be less of a headache if any of these proposals are implemented (and satisfy the wishlist you have). Say we run with something close to the Demote proposal - is this not something we get for free?

Should we ever let a graph molecule have a bond order of 1.5?

Seems to be clearly "no," either because graph molecules don't store their bond orders in 2/3 of your options (Separate classes/Demote) or because bringing a bond order to the table without a corresponding aromaticity model (** Forbid in-place modification**) invalidates said data. Is this a gotcha related to what aromaticity models output?

How do we resolve issues where loading a file REQUIRES an aromaticity model?

I guess if the model is specified in the file, just do that. But I figure that's extremely rare and we're more often going to run into things like  the SMILES issues highlighted in the linked thread. So then the issue is deciding what to do when a format requires (or really badly wants) an aromaticity model during a conversion, ideally without exploding in complexity with the different combinations of toolkits, models, and flavors of file formats. Passing aromaticity_model to to_file (to_{rdkit|openeye} already has this) would be the first step, and also exposes the problem - if the  Molecule object in memory (with a known aromaticity model) can be trusted to  round-trip to a format, it really becomes a question for the conversions between the wrapped toolkits.


x86/nvidia initial stages are different from groq, causing issues when generating the report

GroqFlow checks whether all operations are supported before converting models to FP16. As a result, the same model might convert to FP16 when the device is x86/nvidia, but will not convert to FP16 when the device is groq when not all ops are supported by GroqFlow.
This behavior will be flagged as a warning when running benchit cache report.
The ability to export/optimize/convert to fp16 for the retinanet_resnet50_fpn model is shown below to illustrate this issue.

Export
Optimize
Convert to FP16

groq
✓
✓
×

x86
✓
✓
✓

for vis @jeremyfowers

Proposed solution: manually set the build Sequence for groqit() to:

Export to PyTorch
Optimize
Convert to fp16
Check ops
Compile
Assemble

I don't see any reason why this wouldnt function correctly.

I agree that the proposed solution is reasonable.


Heroku deploy button is not working

Describe the bug
When the "Deploy to Heroku" button is clicked the Heroku page that opens displays the message "A valid GitHub directory could not be found. The given URL (https://github.com/) is not a valid GitHub repository."
To Reproduce
Steps to reproduce the behavior:

Go to the "Setting Up:" section of the readme
Click on 'Deploy to Heroku'
See error

Expected behavior
The Heroku page shown in step 4 of the read me is what I am expecting to see.
Screenshots

Desktop (please complete the following information):
MacOS Catalina version 10.15.6
Chrome browser Version 85.0.4183.102

Sorry I didn't test this before opening the issue, this seems to happen in chrome, but it does work find in Fire Fox.

Mine don't work in firefox too.

I tried to click the deploy button in the repo directly in firefox and worked! If you copy the link and paste it in firefox doesn't work.

Same issue here, in Chrome (Brave), but not Firefox.
OSX Catalina 10.15.7
Brave: Version 1.16.68 Chromium: 86.0.4240.111 (Official Build) (x86_64)
Firefox: 74.0


somesy init command (discovery)

Discover data from existing files such as pyproject.toml, CITATION.cff
create .somesy.toml file from this data
.somesyrc support (in the home directory)

As discussed yesterday, might be worth taking a look at https://project.software-metadata.pub/# and see if their "harvesting" part would be of use to scrape the metadata together for somesy init.

@mustafasoylu
I did not check how it currently looks like in the feature branch, but I don't like the way init command works on the main branch right now. What I think it should be doing:

Somesy input location

Check which supported input files exist
Ask where to put the somesy config and metadata (somesy.toml or pyproject.toml or whatever is supported)

Ask if the user wants to import project metadata (from pyproject.toml)

if yes, extract a ProjectMetadata object (could use pyproject_parser that codemetapy also uses),
otherwise create "dummy project metadata" (at least mandatory, possibly also optional dummy data to show what somesy supports)

Check existing files of supported output targets (what to sync)

enable sync for existing files by default (and tell user, e.g. "somesy discovered you have X and will sync to it. you can change this in your configuration if you do not want this")
for non-existing files (e.g. CITATION.cff or codemeta.json) ask if somesy should create those ("would you like somesy to create and sync X file?")

Dump extracted or dummy metadata and config to chosen target
Tell the user to check the generated config and fine-tune to their needs

I would not ask about stuff like loglevel. Most won't care, and those who do will figure out the flag when they need it.


Add Unishox2 Python bindings to projects list

Hope this helps some people - it's certainly helping my personal projects keep costs down!

Hey, thanks a lot for your interest in Unishox!!  Hope it is useful for many more people.
I ported it to Javascript here: https://github.com/siara-cc/Unishox_JS and then almost ported it to Python, but not getting the time to test it and release it.
I hope to complete it soon.


A way to select/deselect selected asset programmatically

Hi,
My use case is I have another page to preview/manage the selected assets after picked by TLPhotoPickerViewController.  (I extend TLPhotoPickerViewController to not dismiss itself automatically).  User may decide to remove some asset from the selected set so I want to deselect the selection when user goes back to TLPhotoPickerViewController.
Is there a way to do it? Do you have any suggestion?
Currently I see no way to do it. I tried to extend TLPhotoPickerViewController but most required properties (such as focusedCollection) are private.
I'm happy to contribute a pull request if necessary.
BTW, Thanks for the nice work.

ok. I just found a way to do it without modifying TLPhotoPickerViewController. Maybe not the best way as reloadCollectionView() is private but it works for my case.
Put it here in case somebody looks for it as well
extension TLPhotosPickerViewController {

    public func deselect(_ asset: PHAsset) {
        var updated = [TLPHAsset]()
        var order = 0
        for var selected in selectedAssets {
            if let phAsset = selected.phAsset, phAsset.localIdentifier == asset.localIdentifier {
                continue
            }
            order += 1
            selected.selectedOrder = order
            updated.append(selected)
        }
        selectedAssets = updated
        collectionView.reloadData()
    }

}


Beforetext with indentOutdent doesn't indent

Testing #114948
My current onEnterRules:
"onEnterRules": [
		{
			"beforeText": "^\\s*(?:def|class|for|if|else|while|try|with|finally|except|async).*?:\\s*$",
			"action": { "indent": "indent" }
		},
		{
			"beforeText": ".*",
			"afterText": "foo",
			"action": {
				"indent": "indentOutdent",
				"appendText": "bar"
			}
		},
	]

Before text:
def main():
    if True:
        foo

After text:
def main():
    if True:

        bar
        foo

Expected:
def main():
    if True:

            bar
        foo

I had to revert this due to https://github.com/microsoft/vscode/issues/115304
It turns out we cannot support indentOutdent and appendText to do indentation due to the current usages of these rules. i.e. we would break existing extensions.

I had to revert this due to https://github.com/microsoft/vscode/issues/115304
It turns out we cannot support indentOutdent and appendText to do indentation due to the current usages of these rules. i.e. we would break existing extensions.


no 'name' attribute?

it would be nice if there was a name attribute for each field

You can add any additional keys to the schema.fields object.
Then in your custom component reference it with this.schema.myKey
What is your use case?

Thanks for the quick response. I'd like to submit the form traditionally without AJAX. Could you provide an example of this technique?

To anybody else interested, here's the solution I've come up with. It's definitely not ideal but it's a cute little jQuery fix:
updated: function () {             $('input').each(function(i, obj) {                 var inputid = $(this).attr('id');                 $('input').attr('name', inputid);             });         }

This issue https://github.com/icebob/vue-form-generator/issues/78 seems to suggest that input field should come with a name attribute already. However, that's not the case in my testing.

You can set name attr with inputName prop in schema
https://github.com/icebob/vue-form-generator/blob/master/examples/post-form/main.js#L49


Kafka Scaler e2e tests

Use-Case
Implement Kafka Scaler e2e tests the same way there are tests for the other scalers:
https://github.com/kedacore/keda/tree/master/tests
Use Strimzi.io to deploy Kafka on k8s cluster

Hi @zroubalik . Question on this - are there particular reasons to use Strimzi.io's Kafka Operator for this instead of a trimmed down deployment of Kafka (Kafka and Zookeeper)?

Hi @tbickford no, I just thought that Strimzi could simplify the deployment (it's just a matter of applying a bunch of CRs and Kafka + Kafka topic is up and ready) and would be nice to consume another CNCF project. Do you have any major concerns or objections?

Strimzi looks super cool. One of the concerns I have is an added layer of complexity in debugging the tests or the setup for the tests. If the CRD's are cleaned up in tests, is there a possibility of running into issues with the finalizer? Another concern was that state/PV's were necessary but I see that it supports ephemeral setups which is good. I guess a larger question somewhat related to this would be if the e2e tests should use an ephemeral cluster (correct me if I am wrong but I don't believe the "test" cluster is created and destroyed on each workflow run)?

I think that we don't have to be afraid of issues with finalizer, if we do the clean up properly (and in the correct order). For me the idea is, that Kafka is going to be installed and uninstalled before/after each test run. And Strimzi is just an Operator, so the added complexity is not that big.
Ephemeral clusters would be awesome from my POV, but as you said - currently we have a long instance. Though I haven't seen any major stability problems or flaky tests so far 🤞
In case there are going to be this kind of problems, we will have to deal with it for sure!


[PR] 3 put if you send a request of apiclientid with an inexistent id you receive a 200 ok

Nice code dude!


Code branching to support server 2.0. Closes #300

@ches @ChrisCoffey @jvican Hey guys, it is just a WIP PR to have some early feedback from you as I'm not a Python dev and I have my OOP skills a bit rusty.
Is something like this what you had in mind for code branching?
If you ask me, I'd prefer to implement it just with curried and composed functions :-) but dunno if you wanna depend on PyMonad :-P

I think this is great. We all are functional programmers, but let's try to keep our functional pride and the amount of dependencies as small as possible :wink:. This is idiomatic python, so great! Now, we just need a more principled way to do this for the rest of the features. I would move the client to an independent file client.py, leaving only the class Ensime and then create a new file client2.py that holds all the new code for server 2.0. This will help modularity and maintainability in the long run.

Sure! I was thinking the same.This file is getting huge, great we agree on that, I feel more confident about doing such a big change now.
I will do the file split, also the proper launcher changes and will push for another round of feedback.
Thanks for the comments.

I would move the client to an independent file client.py, leaving only the class Ensime in ensime.py and then create a new file client2.py that holds all the new code for server 2.0. This will help modularity and maintainability in the long run.

I think @ktonga has started with the simplest and least invasive change to start discussion, but what I was thinking before when I mentioned mixins on #300 is a base EnsimeClient class that still holds all code that can most likely be shared between versions, i.e. the message queue management, logging setup, etc.—likely almost everything except for specific handlers that end up differing. Move existing handlers into a mixin for v1 and start a new one for v2.

I've reverted my initial commit, rebased on master and implemented what we disused.
It seems I will need to introduce the first plugin setting for server v2 flag. Any advice?

This is looking good so far! I haven't run it yet, I'll try soon.

It seems I will need to introduce the first plugin setting for server v2 flag. Any advice?

I would think it can just use plain VimL in plugin/ensime.vim and with the setup that's in place already it should work without special/duplicated handling for Neovim, e.g.
if !exists("g:ensime_server_v2")
  let g:ensime_server_v2 = 0
endif

This isn't a WIP anymore, I think it's getting closer to be ready if you don't have any more comments on my last commits.
Also I think we should leave this setting undocumented for a while until we're sure it doesn't cause any trouble. Do you agree?

[Side note: let's please not squash-merge this branch, when there are multiple authors it destroys record of that and ruins git blame for finding out who might be the best person to ask about a particular change].

Also I think we should leave this setting undocumented for a while until we're sure it doesn't cause any trouble. Do you agree?

Sounds good to me, especially because of the issue you noted in Gitter: an already-existing bootstrap project for the Scala version will be detected so the launcher won't know to replace it with a v2 install.

👍
Finally got a chance to try running it today, sorry for delay. I have a few little ideas for enhancement but I think they can all wait for later:

(Keyboard misfire, sorry. Previous comment updated).

Actually since we already support overriding with an assembly jar, we might not need any fancy futzing around in the plugin code to support more convenient development on different versions. Just the g:ensime_server_v2 Boolean flag to switch which protocol handlers are loaded could be enough to carry us a long way.
Anyway, this kind of discussion can come on a new follow-up issue.

@jvican @ChrisCoffey Any concerns here? I've tested this but I haven't run it consistently because I've been working on other branches.
I know some features are broken when using server v2, that's expected, fixing them is out of scope for this PR.

LGTM!

That was a relief. This PR was starting to burn.
@ches I have been using it while hacking on ensime/ensime-server#1471 and I've just opened a ticket (#313)  for the only problem I found, which is only visible when you turn v2 on.

Next time let's wait for @ChrisCoffey's feedback, I know sometimes we're slow in reviewing but it's good if we all are aware of the new changes in the repo :smile:.

Ok, will do, sorry. I thought that two LGTMs were enough.

Yes, usually. But we haven't talked about merge policy yet and @ches got push rights recently. I guess it's time for you to decide :+1:


Params get replaced by "service-worker.js"

Qwik Version
0.9.0
Operating System (or Browser)
Chrome
Node Version (if applicable)
No response
Which component is affected?
Qwik City
Expected Behaviour
When I try to get the params from a URL, I expect it to return the pages params correctly and for those params to not suddenly change.
Eg: if I am on /page and try to get the params to work out what the pages params are, I expect it to always return page
Actual Behaviour
When trying to get the params, it returns correctly but is then replaced with service-worker.js a second later.
A code example:
export const onGet: RequestHandler = async ({ params }) => {
    const loc = params.url;
    console.log("Params URL: " + loc);
}

returns in the console (when going to /page):
Params URL: page
Params URL: service-worker.js
Params URL: service-worker.js

Additional Information
No response

Should be fixed!


Does this work on AMD GPUs?

Hello. I am here to ask if there is a way to get this project working on AMD GPUs. I have tried it via https://github.com/sdbds/audiocraft-webui but ran into an error with my gpu. I have the Radeon RX 6700S.

now it use NVIDIA CUDA for default, i dont have AMD GPU so i cant ensure ROCm can be used.
or you can use as MAC M1 with CPU

I think the main issue is that this project relies on xformers, so that breaks ROCm compatibility.

yes, it works if you install the torch version released by AMD.
example:
python3 -m pip install torch==2.3.0.dev20240301+rocm5.7  --index-url https://download.pytorch.org/whl/nightly/rocm5.7
and so on..


Visualization with esm2_t33_650M

Hello.
I am trying to embed and visualize ~750,000 sequences using various models.
Everything works perfectly with esm2_t6_8M,esm2_t12_35M and esm2_t30_150M. But, for esm2_t33_650M, the embeddings are generated without any error. However, when I try to visualize the embeddings, I get an error
TRILL) 2024-08-09 09:07:37 | INFO | RNG seed set to 123
/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/trill/utils/visualize.py:23: DtypeWarning: Columns (991) have mixed types. Specify dtype option on import or set low_memory=False.
  data = pd.read_csv(data)
Traceback (most recent call last):
  File "/home/amin/mambaforge/envs/TRILL/bin/trill", line 8, in <module>
    sys.exit(cli())
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/trill/trill_main.py", line 145, in cli
    main(args)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/trill/trill_main.py", line 136, in main
    commands[args.command].run(args)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/trill/commands/visualize.py", line 33, in run
    reduced_df, incsv = reduce_dims(args.name, args.embeddings, args.method)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/trill/utils/visualize.py", line 28, in reduce_dims
    reduced = reducer.fit_transform(data.values)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/sklearn/utils/_set_output.py", line 313, in wrapped
    data_to_wrap = f(self, X, *args, **kwargs)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/sklearn/base.py", line 1473, in wrapper
    return fit_method(estimator, *args, **kwargs)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/sklearn/decomposition/_pca.py", line 474, in fit_transform
    U, S, _, X, x_is_centered, xp = self._fit(X)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/sklearn/decomposition/_pca.py", line 511, in _fit
    X = self._validate_data(
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/sklearn/base.py", line 633, in _validate_data
    out = check_array(X, input_name="X", **check_params)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/sklearn/utils/validation.py", line 1012, in check_array
    array = _asarray_with_order(array, order=order, dtype=dtype, xp=xp)
  File "/home/amin/mambaforge/envs/TRILL/lib/python3.10/site-packages/sklearn/utils/_array_api.py", line 751, in _asarray_with_order
    array = numpy.asarray(array, order=order, dtype=dtype)
ValueError: could not convert string to float: 'CD28_23529'

The size of the embeddings csv is around 8.5 gb, if that's relevant to this issue.
I would really appreciate any suggestions.
Best,
Amin.

The size of the embeddings might be an issue, but first could to tell me how many columns your input embeddings have? I'm specifically wondering if the label CD28_23529 somehow got added into the wrong column. Do you know if the label "CD28_23529" shows up in any column that isn't the last one?

@martinez-zacharya
The number of columns in the input embeddings is 591206.
The label CD28_23529 seems to be in the correct column in esm2_t6_8M_AVG.csv
data[data['Label']=='CD28_23529']
Out[5]:
             0         1         2        3         4         5  ...       315       316       317       318       319       Label
23528  0.09981 -0.237862  0.235109  0.25334 -0.126776 -0.112223  ...  0.092458 -0.044168 -0.106449  0.272472 -0.123391  CD28_23529

However, that's not true for esm2_t33_650M_AVG.csv
data[data['Label']=='CD28_23529']
Out[7]:
Empty DataFrame
Columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, ...]
Index: []

The sequence before this is correct
data[data['Label']=='CD28_23528']
Out[8]:
              0         1         2        3         4         5  ...      1275      1276      1277      1278      1279       Label
23527  0.024856  0.038516  0.038219  0.08652  0.021871  0.094267  ...  0.220025  0.031089 -0.078596 -0.048704 -0.022735  CD28_23528

[1 rows x 1281 columns]

If I look for CD38_23529 in any of the columns, I get
In [9]: data[data.isin(['CD28_23529']).any(axis=1)]
Out[9]:
        0         1         2         3         4         5         6         7  ...  1273  1274  1275  1276  1277  1278  1279  Label
23528 NaN -0.039891  0.075853 -0.075367  0.042707 -0.042354  0.080859 -0.190716  ...   NaN   NaN   NaN   NaN   NaN   NaN   NaN    NaN

[1 rows x 1281 columns]

It seems there is something wrong with the file for esm2_t33_650M model.
Best,
Amin.

Hm, this is perplexing. The number of columns in the esm2_t33_650M based embeddings should be 1,281, definitely not 591,206. Are you able to visualize the embeddings if you remove the faulty line in the output .csv?
Can you also post the sequence for CD28_23529?

Sorry, it seems like this originated from a calculation that was interrupted in some manner or something mysterious went wrong. I re-ran the calculations and the issue disappeared.
Best,
Amin.


Security issues report is documented on the README page.
Can you explain a bit more what is being documented and why?


test: tsan failure in IdleTimeoutIntegrationTest

Description:

While running CI on an unrelated PR, I caught this TSAN flake, which looks like a real issue -- at least a real test issue, in Protocols/IdleTimeoutIntegrationTest.PerStreamIdleTimeoutAfterBidiData/IPv4_HttpDownstream_HttpUpstream. Attaching detailed TSAN log.

use-after-free.txt
@auni53 @htuch

See also this comment:
https://github.com/envoyproxy/envoy/blob/6e9a8df7148c93198c1cd1139690a065d00bfa37/test/integration/idle_timeout_integration_test.cc#L71

@jmarantz yeah, trying increasing RequestTimeoutMs and see if fixes. This could probably benefit from some reworking to use simulated time as a long term solution, but for a quick fix the scaling looks legit. The backtrace reflects a premature timeout, not a real bug.

I couldn't get a local repro (tsan, --runs_per_test=1000); so my inclination is to try a switch to sim-time, as I would not really know if I was picking better time-constants for real-time.


chore: Migrate to newer imap-types

Fixes a breaking change in imap-types. The type AuthenticateData has now a lifetime parameter.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

-2 of 2 (0.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 48.776%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/client.rs
0
1
0.0%

src/send_command.rs
0
1
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
518

Relevant Lines:
1062

💛  - Coveralls


feat: add Ant Design X

@ant-design/x is an advanced AI component library focusing on the React ecosystem, aiming to simplify the development process of integrating artificial intelligence. Our library includes highly customized AI components, allowing developers to easily integrate conversational AI into their applications. In addition to rich UI components, @ant-design/x also provides a package of API solutions, supporting developers to directly access existing AI services through token authentication, seamlessly connecting with AI conversations and interactions. Whether you are building intelligent chat applications, enhancing user interaction experience, or accelerating the integration of AI capabilities, @ant-design/x is the ideal partner for React developers to enter the AI world.

GitHub: https://github.com/ant-design/x
HomePage: https://x.ant.design

Hey @afc163 thanks for the PR. I have checked the web but had difficulty learning more about the company behind it. We have restrictions on accepting products from VC-backed companies as explained in the readme and contributing. If you can clear this up.

AntGroup is the company behind this project: https://www.antgroup.com/


issue with pod.beta.kubernetes.io/init-containers annotation

Hi when I am creating spring example application in  the Openshift using the template yaml its not able to save the pod.beta.kubernetes.io/init-containers annotations contents in the spring application deployment configuration in Openshift. Can you please help me if I need to do a Openshift cluster administration setting so that it will be able to save pod.beta.kubernetes.io/init-containers in deployment config

I consider the approach described in this repo to be deprecated (I should probably advertise it better).
The two valid approaches are described here:
for vault-aware apps: https://blog.openshift.com/vault-integration-using-kubernetes-authentication-method/
for vault-unaware (legacy) apps: https://blog.openshift.com/integrating-vault-with-legacy-applications/

Thanks for replying and letting me know the current repository and approach. Please let me know if there are any specific advantages of using Kubernetes as Vault backend for auth as compared to previous Vault controller approach?
In the vault controller approach i also found below issue as well

Vault root token was exposed in openshift Secret in the Vault controller project.

The new approach with Kubernetes backend for auth looks much simpler as well.
Thanks,
Ashutosh
On Wed, 3/6/19, raffaelespazzoli<EMAIL_ADDRESS>wrote:
Subject: Re: [raffaelespazzoli/credscontroller] issue with pod.beta.kubernetes.io/init-containers annotation (#9)
To: "raffaelespazzoli/credscontroller"<EMAIL_ADDRESS>Cc: "ashukube"<EMAIL_ADDRESS>"Author"<EMAIL_ADDRESS>Date: Wednesday, March 6, 2019, 5:47 PM
I consider the approach described
in this repo to be deprecated (I should probably advertise
it better).
The two valid approaches are described here:
for vault-aware apps: https://blog.openshift.com/vault-integration-using-kubernetes-authentication-method/
for vault-unaware (legacy) apps: https://blog.openshift.com/integrating-vault-with-legacy-applications/
—
You are receiving this because you authored the thread.
Reply to this email directly, view
it on GitHub, or mute
the thread.


Store bin width in FitDiagnostics --overall

This is the fixed version of #666

@adewit my bad, I screwed up the initialization before. This version compiles standalone on lxplus for me.


DUPLO-10189: v3 api s3

User description
Overview
DUPLO-10189: v3 api s3
Summary of changes
This PR does the following:

v3 api s3
fallback support to older api

Testing performed

[ ] Using unit tests
[X] Manually, on my local system
[X] Manually, on a remote test system

Describe any breaking changes

None

Type
enhancement, bug_fix

Description

Added support for specifying the region of an S3 bucket in Terraform resource.
Implemented V3 API support for S3 bucket operations, including create, read, update, and delete, with fallback to older API if V3 is not available.
Extended SDK to support new V3 API endpoints for S3 bucket operations.
Updated documentation to include the new region attribute for the S3 bucket resource.

Changes walkthrough
Relevant filesEnhancement

resource_duplo_s3_bucket.goAdd Region Support and Implement V3 API for S3 Buckets with Fallback

duplocloud/resource_duplo_s3_bucket.go
Added support for specifying the region of an S3 bucket.  Implemented V3 API support for S3 bucket operations with fallback to older API.  Enhanced error handling and diagnostics throughout S3 bucket operations.  Refactored S3 bucket creation, update, and deletion functions for clarity and maintainability.

+218/-46

tenant_aws_cloud_resources.goExtend SDK with V3 API Support for S3 Bucket Operations

duplosdk/tenant_aws_cloud_resources.go
Introduced new structs for V3 API S3 bucket requests and responses.  Added functions for creating, updating, deleting, and retrieving S3 buckets using the V3 API.  Enhanced S3 bucket struct with region information.

+67/-3

Documentation

s3_bucket.mdDocument New `region` Attribute for S3 Bucket Resource

docs/resources/s3_bucket.md
Updated S3 bucket resource documentation to include the new region attribute.

+2/-0

✨ PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

Task linked: DUPLO-10189 TF: V3 APIs for S3

/review

/update_changelog --pr_update_changelog.push_changelog_changes=true

/describe


Evaluate Ideone API

Evaluate the Ideone API as a backend code execution solution.

API access is requested but doesn't seem to work - I have a hunch they need to manually confirm it.


changes for checking queuesize cronjob

I am not convinced about running a new process in the same container. Why don't we try to scrape the exim log files (which are configurable too) from a sidecar container using an exporter such as mtail?

I am not convinced about running a new process in the same container. Why don't we try to scrape the exim log files (which are configurable too) from a sidecar container using an exporter such as mtail?

As per our discussion on slack addressed your comments and updated the PR accordingly.


Fix reference to a dead link

Thank you for your contribution!
https://google.github.io/snappy/ seems to work for me.


[Event Change Request] Codeunit 80 - "Sales-Post - OnBeforeCalcInvoice

Dear ALAppExtensions team,
through this issue we would like to request a change in the signature of the OnBeforeValidateShortcutDimCode event by adding var to the variable TempSalesLineGlobal.
old signature
local procedure OnBeforeCalcInvoice(SalesHeader: Record "Sales Header"; TempSalesLineGlobal: Record "Sales Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean)

new signature
local procedure OnBeforeCalcInvoice(SalesHeader: Record "Sales Header"; var TempSalesLineGlobal: Record "Sales Line" temporary; var NewInvoice: Boolean; var IsHandled: Boolean)

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 11007.


feat: Implement known retros in main page

It depends on #10 to merge, so we rebase this and merge too


Error on pxt serve

Hi,
Thanks for such a great example.
I have cloned this project, and followed the instructions, but I get this error message:
Using target PXT/holidays with build engine none
Target dir:   D:\Projects\pxt-holidays
PXT Core dir: D:\Projects\pxt-holidays\node_modules\pxt-core
log strings: 48 files; 0 strings -> sim-strings.json
error TS6053: File 'D:/Projects/pxt-holidays/node_modules/pxt-core/built/lib.dom.d.ts' not found.
error TS6053: File 'D:/Projects/pxt-holidays/node_modules/pxt-core/built/lib.dom.iterable.d.ts' not found.
error TS6053: File 'D:/Projects/pxt-holidays/node_modules/pxt-core/built/lib.es2015.d.ts' not found.
error TS6053: File 'D:/Projects/pxt-holidays/node_modules/pxt-core/built/lib.scripthost.d.ts' not found.
error TS2318: Cannot find global type 'Array'.
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'Function'.
error TS2318: Cannot find global type 'IArguments'.
error TS2318: Cannot find global type 'Number'.
error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.
building sim...
[run] cd sim; node ../node_modules/typescript/bin/tsc
building target.json in D:\Projects\pxt-holidays...
building docs in libs/core
Package built; written to binary.hex; size: 0
generated _locales\core-strings.json; size=2293
generated _locales\core-jsdoc-strings.json; size=8945
building libs/core
skip native build of non-project
building libs\blocksprj
target.json built.
building cmds...
[run] cd cmds; node ../node_modules/typescript/bin/tsc
../node_modules/pxt-core/built/pxtlib.d.ts(5,23): error TS2688: Cannot find type definition file for 'marked'.
../node_modules/pxt-core/built/pxtlib.d.ts(424,37): error TS2304: Cannot find name 'marked'.

*** Build failed: target build failed: Exit code: 2 from cd cmds; node ../node_modules/typescript/bin/tsc
Error: Exit code: 2 from cd cmds; node ../node_modules/typescript/bin/tsc
at ChildProcess. (D:\Projects\pxt-holidays\node_modules\pxt-core\built\nodeutil.js:86:24)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:957:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)

watching D:\Projects\pxt-holidays\node_modules\pxt-core, libs/core, theme, theme\site\globals, editor, sim, sim\public, cmds...
Starting server in D:\Projects\pxt-holidays
With pxt core at D:\Projects\pxt-holidays\node_modules\pxt-core
starting local ws server at 3233...
Could you please help me.
Thanks.

I have the identical error.

no worries, I will take a look into this error tonight. it’s most likely a dependency that needs to be added or upgraded.

I’ve fixed up this sample and updated it to the latest pxt-core. Please pull and let me know if you’re still running into any issues

This is fixed, closing.


Disabled conditional module error when outputs referenced

Bicep version
Bicep CLI version 0.4.613 (d826ce8411)
Describe the bug
Disabled modules cause deployment to fail if outputs from other disabled modules are referenced. I would expect these references to be ignored.
To Reproduce
param deployAppservice bool = false
module appserviceplan 'appserviceplanDeploy1.bicep' = if (deployAppservice){
name: 'appserviceplan-${nameDeployment}'
scope: rg
params: {
location: rg.location
name: 'plan-${nameSubject}-${nameEnv}-${nameRegion}-${nameInstance}'
}
}
module appservice 'appserviceDeploy1.bicep' = if (deployAppservice){
name: 'appservice-${nameDeployment}'
scope: rg
params: {
location: rg.location
name: 'app-${nameSubject}-${nameEnv}-${nameRegion}-${nameInstance}'
serverfarmid: appserviceplan.outputs.appserviceplanid
}
dependsOn: [
appserviceplan
]
}
Additional context
New-AzDeployment : 10:11:33 AM - The deployment 'rgDeploy1' failed with error(s). Showing 1 out of 1 error(s).
Status Message: Deployment 'appserviceplan-bicep-20211017-100925' could not be found. (Code:DeploymentNotFound)

Here are the docs for this particular item.
https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/conditional-resource-deployment#runtime-functions
In your case it compiles to a json reference:
"serverfarmid": {
            "value": "[reference(resourceId('Microsoft.Resources/deployments', format('appserviceplan-{0}', parameters('nameDeployment'))), '2020-06-01').outputs.appserviceplanid.value]"
          }

In this scenario, you can implement your own conditional check on that parameter value with a Conditional expression
https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/operators-logical#conditional-expression--
in your case this will be the example:
serverfarmid: deployAppservice ? appserviceplan.outputs.appserviceplanid : ''

this will compile to the following json
"serverfarmid": {
            "value": "[if(parameters('deployAppservice'), reference(resourceId('Microsoft.Resources/deployments', format('appserviceplan-{0}', parameters('nameDeployment'))), '2020-06-01').outputs.appserviceplanid.value, '')]"
          }

I will leave the Triage tag on this to confirm there are no current plans to provide any fix for this, however in the short term above should be the approach.

Related to or duplicate of https://github.com/Azure/bicep/issues/3750.

I had this issue too, and this fixed it for me, will this be fixed in a future release?


Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2171

Running ../../pythonizer -M -v0 -s ./PyModules/Date/Manip/Date.pm for use Date::Manip::Date
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2171,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2286,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2305,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2307,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2309,  line 568.
Use of uninitialized value $class in string ne at ../../Pythonizer.pm line 2311,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2313,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2327,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2386,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2401,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2401,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2404,  line 568.
Use of uninitialized value $class in string eq at ../../Pythonizer.pm line 2406,  line 568.
my($y,$m,$d,$h,$mn,$s,
  $mon_name,$mon_abb,$dow_name,$dow_abb,$dow_char,$dow_num,
  $doy,$nth,$ampm,$epochs,$epocho,
  $tzstring,$off,$abb,$zone,
  $g,$w,$l,$u) =
    @+{qw(y m d h mn s
          mon_name mon_abb dow_name dow_abb dow_char dow_num doy
          nth ampm epochs epocho tzstring off abb zone g w l u)};

Issue is caused by @+ and @- not being recognized as special variables.

Fixed in v1.030


Remove unnecessary .trimMargin() in tests

Removes the '|' at the start of each quoted line.
Removes .trimMargin() where no report messages are checked
Succeeding #1850

Without the margins the line is detected as pure whitespace and results in failing checks on CodeFactor.

I think this whitespace bug on codefactor is not that important to create an additional config just for codfactor.


SQLRETURN SQLDriverConnectW(SQLHDBC,SQLHWND,SQLWCHAR *,SQLSMALLINT,SQLWCHAR *,SQLSMALLINT,SQLSMALLINT *,SQLUSMALLINT)': cannot convert argument 3 from 'SQLCHAR *' to 'SQLWCHAR *

I copied and pasted the code from here https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqldriverconnect-function?view=sql-server-ver15 to Visual Studio 2017. When compile I got the error:
“SQLRETURN SQLDriverConnectW(SQLHDBC,SQLHWND,SQLWCHAR *,SQLSMALLINT,SQLWCHAR *,SQLSMALLINT,SQLSMALLINT *,SQLUSMALLINT)': cannot convert argument 3 from 'SQLCHAR *' to 'SQLWCHAR * “
Any one faces the same issue?

@chanmmn -- thank you for your feedback.  Please consider these resources, and let me know if you find an answer:

SQL Server on Microsoft Q&A
DBA Stack Exchange
Stack Overflow

@chanmmn -- thank you for your feedback.  Please consider these resources, and let me know if you find an answer:

SQL Server on Microsoft Q&A
DBA Stack Exchange
Stack Overflow

Unfortunately, there is nothing relevant at the MS Q&A, DB Stack Exchange and Stack Overflow on this.

Unfortunately, there is nothing relevant at the MS Q&A, DB Stack Exchange and Stack Overflow on this.

@chanmmn -- thank you for your update.
@David-Engel -- please look into this potential documentation issue.

@chanmmn -- thank you for your update.
@David-Engel -- please look into this potential documentation issue.

@v-makouz - Can you validate the code sample on this page? Thanks!

@v-makouz - Can you validate the code sample on this page? Thanks!

The code compiles and runs correctly, the above mentioned error is usually caused by the project settings. In older Visual Studio 17 it is in Project Properties -> General -> Project Defaults -> Character Set, if that property is set to "Unicode" one would get that error.

The code compiles and runs correctly, the above mentioned error is usually caused by the project settings. In older Visual Studio 17 it is in Project Properties -> General -> Project Defaults -> Character Set, if that property is set to "Unicode" one would get that error.

@chanmmn I'm going to close the issue now since this doesn't appear to be a doc issue. If the above doesn't work for you, feel free to @ me or v-makouz on here.
#please-close

@chanmmn I'm going to close the issue now since this doesn't appear to be a doc issue. If the above doesn't work for you, feel free to @ me or v-makouz on here.
#please-close


question about load model state_dict in multi-gpus

The code is as below.
def load_checkpoint(file,
                    model: torch.nn.Module,
                    strict: bool = True,
                    preprocess_fn: Optional[Callable[[dict], dict]] = None,
                    **kwargs):
    """Loads training states from a checkpoint file.

    Args:
        file: a file-like object (has to implement read(), readline(), tell(), and seek()), or a string or os.PathLike
            object containing a file name.
        model (:class:`torch.nn.Module`): Model to load saved weights and buffers.
        optimizer (Union[:class:`torch.optim.Optimizer`, :class:`colossalai.nn.optimizer`]): Optimizer to recuperate.
        lr_scheduler (:class:`torch.optim.lr_scheduler._LRScheduler`, optional):
            lr_scheduler to recuperate, defaults to None.
        strict (bool, optional): Whether to strictly enforce that the keys in :attr:`state_dict`
            of the checkpoint match the names of parameters and buffers in model, defaults to True.

    Returns:
        int: The saved epoch number.

    Raises:
        RuntimeError: Raise error if the model/optimizer cannot successfully be recuperated
    """
    start = time()
    if gpc.get_local_rank(ParallelMode.MODEL) == 0:
        model_state = load_state_dict(file)
        if preprocess_fn:
            model_state = preprocess_fn(model_state)
    else:
        model_state = dict()
    dist.barrier()
    print(f'Load file time: {time()-start:.3f} s')
    # pipeline
    if is_using_pp():
        model_state = partition_pipeline_parallel_state_dict(model, model_state, **kwargs)
    if "prefix" in kwargs.keys():
        if kwargs['prefix'] != '':
            model_state = remove_prefix(model_state, kwargs["prefix"])

    model.load_state_dict(model_state, strict=strict)
    broadcast_model(model)

When we using  the tp=4 parallel, I wonder why here just load_state_dict only 'get_local_rank(ParallelMode.MODEL) == 0'？
If so, the rest process will load empty model_state, right?

When using tensor parallel models, parameters are sharded while the weights in the state dict are not. Thus, we load the complete weights at only rank 0 and scatter the corresponding shards to each tensor parallel rank.

Got it~
Thanks a lot


IA-3280: Completeness stats: period filter is broken

Explain what problem this PR is resolving

Completeness stats: period filter is broken
This PR is about to display a message which indicates that the selected form has no period type
Related JIRA tickets : IA-3280

Self proofreading checklist

[x] Did I use eslint and black formatters
[ ] Is my code clear enough and well documented
[ ] Are my typescript files well typed
[x] New translations have been added or updated if new strings have been introduced in the frontend
[ ] My migrations file are included
[ ] Are there enough tests
[ ] Documentation has been included (for new feature)

Doc

Tell us where the doc can be found (docs folder, wiki, in the code...)

Changes

Display in the periodPicker a different message when the selected form has no period type vs when there is no form selected

How to test

Create or use existing form which has no period as period type
Go to completeness stats and select a form with no period type and select another one with a period type
Check at each test the period picker behavior

Print screen / video
Screencast from 2024-08-08 14-52-40.webm
Notes
Things that the reviewers should know: known bugs that are out of the scope of the PR, other trade-offs that were made.
If the PR depends on a PR in bluesquare-components, or merges into another PR (i.o. main), it should also be mentioned here

@cypress

@cypress


or-join UNION ends up with extra parentheses

honeysql is rendering something like
(SELECT datoms2.e AS page FROM fulltext_values fulltext_values1,
 datoms datoms2
 WHERE (fulltext_values1.fulltext_values MATCH '*foo*' AND
 datoms2.v = fulltext_values1.rowid AND
 (datoms2.a = 65545 OR datoms2.a = 65546)))
 UNION
 (SELECT datoms5.v AS page,
 …

which is invalid. There must be no () around each branch of the UNION.

Fix is in b1451199fe67757e332611ca9cad44dc68f239ef.


Update to JSONAPI 1.0

JSONAPI has been updated to version 1.0. This gem seems to be updated to RC2, seeing #119 is still open. How can I help?

It's updated to 1.0. We just need to close that issue.

@mrcasals It is worth noting that there has not been a new release cut w/ the JSON API 1.0 support yet. I would suggest using a recent master commit from GitHub in your Gemfile. :smile:

Then maybe the code is not released in a new version of the gem? Just installed the gem, and I'm seeing linkage keys.

@brettchalupa is right. Use the master branch for now, but it's updated to 1.0 and being actively worked on.

We are working a few issues to complete compliance with 1.0. Once those are finished a new version of the gem will be released. For now use the master branch in your Gemfile and you will get a version that's 95%*  compatible with the 1.0 spec.
* not an accurate statistic

Awesome, just tried it. Thanks, and sorry for not checking it in advance.
I'll close this issue.


[PE-D][Tester E] List command specified in UG does not work

The US says "Some example commands you can try:
list : Lists all contacts." (Page 1)

But the list command does not actually work. The actual usage shows an error

Labels: severity.VeryLow type.DocumentationBug
original: pradyuprasad/ped#1

Remove outdated list command within UG


[1.10.2][MO 1.7] Light and chunk overlay incompatible with F1 (Hide hud)

Turn on light overlays (default F7), or chunk boundaries (default F9), then turn off hud display (default F1) and the screen becomes intensely dark.
https://i.imgur.com/HSTyUbS.png
This is noon on a sunny day:
https://i.imgur.com/Q7VefMG.png

Like #12 . I don't know why this destroys the lightning. I can'r reproduce it. It is either incompatibility with another Mod or depending on the System or the GPU.

If you still see this, try disabling the FBO in the minecraft settings file via 'fboEnable', set it to false.
it appears that the FBO triangles are getting modified somehow, possibly a legacy lighting call or alpha settings...

On my client the sky darkens when HUD is off and either of the overlays are enabled, everything else is fine. I have the FBO off already, I bet without looking at the overlay code it's a GL light call.

From my tests it works in vanilla without anything installes except Forge, JEI and MoreOverlays.
So I guess even if MoreOverlays makes the sky dark, some other mod has to do some wierd renering stuff and break the rendering system. I guess OptiFine but I'm not sure.  But I have to turn off light (I guess) because without this call. The overlays will be effected by light.

try removing the enableLighting and enableAlpha lines, they shouldn't be needed as neither the sky nor framebuffer stages use them. Technically you shouldn't need to disable them at the start either as I'm pretty sure they're already disabled in the last world render event...


Nested routes using NuxtPage or NuxtChild don't get generated

Describe the bug
I have a directory structure
pages
   /blog.vue
   /blog
      /categories.vue
      /tags.vue
      /index.vue

pages/blog.vue has a <NuxtPage /> which allows it serve as a root to the categories and tags.
But, the sitemap plugin doesn't scan through the child pages.
in code, it generates
{                                                                                17:45:23
  name: 'blog',
  path: '/blog',
  file: '[path-to-app]/pages/blog.vue',
  children: [
    {
      name: 'blog-categories',
      path: '/blog/categories',
      file: '[path-to-app]/pages/blog/categories.vue',
      children: []
    },
    {
      name: 'blog-tags',
      path: '/blog/tags',
      file: '[path-to-app]/pages/blog/tags.vue',
      children: []
    },
    {
      name: 'blog',
      path: '/blog/',
      file: '[path-to-app]/pages/blog/index.vue',
      children: []
    }
  ]
}

the children never gets generated.
Reproduction
https://stackblitz.com/edit/nuxt-starter-sxgico?file=app.vue
System / Nuxt Info
------------------------------
- Operating System: `Linux`
- Node Version:     `v16.14.2`
- Nuxt Version:     `3.3.2`
- Nitro Version:    `2.3.2`
- Package Manager<EMAIL_ADDRESS>- Builder:          `vite`
- User Config:      `modules`, `sitemap`
- Runtime Modules<EMAIL_ADDRESS>- Build Modules:    `-`
------------------------------

Thanks for the issue @tewshi
I've pushed up a fix for this in v2.3.1, let me know if you have any further issues with it :)

Thanks for the issue @tewshi
I've pushed up a fix for this in v2.3.1, let me know if you have any further issues with it :)

Great, thanks for the fix, I'll test again, if I find anything I'll file an issue. Well done

@harlan-zw thanks for the update. I've got a new problem.
If I have a multi-level directory structure, deeper directories cannot be generated.
pages
   /blog.vue                     --> generated
   /blog
      /categories.vue            --> generated
      /tags.vue                  --> generated
      /tags
         /new.vue                --> not generated
         /edit.vue               --> not generated

"nuxt-simple-sitemap": "^2.4.18"

Thanks @Jeeying, looks like it wasn't scanning the children recurisvely, should be fixed in 2.4.19.

Thanks @Jeeying, looks like it wasn't scanning the children recursively, should be fixed in 2.4.19.

yes, it's working!🎉🎉 thank you so much! that's very useful


Typo in MDC-103 Android: Material Theming with Color, Elevation and Type (Kotlin)

https://codelabs.developers.google.com/codelabs/mdc-103-kotlin/index.html?index=..%2F..%2Findex#5

We'll also need to make a small change to our product_grid_fragment.xml to remove the paddings from our NestedScrollView, as follows:

product_grid_fragment.xml should be shr_product_grid_fragment.xml

Thanks for filing this issue. We fixed the typo.


rbd: use internal as default error code in getGRPCError()

Describe what this PR does
This commit replaces codes.Unknown with codes.Internal as the default error code in getGRPCError()
since it much better suited.
Checklist:

[ ] Commit Message Formatting: Commit titles and messages follow
guidelines in the developer
guide.
[ ] Reviewed the developer guide on Submitting a Pull
Request
[ ] Pending release
notes
updated with breaking and/or notable changes for the next major release.
[ ] Documentation has been updated, if necessary.
[ ] Unit tests have been added, if necessary.
[ ] Integration tests have been added, if necessary.

Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

/retest ci/centos/<job-name>: retest the <job-name> after unrelated
failure (please report the failure too!)

Hi @Rakshith-R,
Can you explain why Internal is much better suited than Unknown for an unrecognized error?
Does this influence the behavior of CSI callers on these errors?

Hi @Rakshith-R,
Can you explain why Internal is much better suited than Unknown for an unrecognized error? Does this influence the behavior of CSI callers on these errors?

Unknown and Internal both will get retries from the callers.
We don't use Unknown anywhere else.
Most command execution failures are treated as internal and not unknown elsewhere in cephcsi.
We should default to that instead of Unknown.

Hi @Rakshith-R,
Can you explain why Internal is much better suited than Unknown for an unrecognized error? Does this influence the behavior of CSI callers on these errors?

Unknown and Internal both will get retries from the callers.
We don't use Unknown anywhere else. Most command execution failures are treated as internal and not unknown elsewhere in cephcsi. We should default to that instead of Unknown.

https://github.com/ceph/ceph-csi/commit/cdaa9264eb4ee1698efa99ab48224049e7f7c64f
This commit introduced unknown grpc error code.
Without using internal as default, we would need to export each error message and add it to the list every time a new code block it added.

Hi @Rakshith-R,
Can you explain why Internal is much better suited than Unknown for an unrecognized error? Does this influence the behavior of CSI callers on these errors?

Unknown and Internal both will get retries from the callers.
We don't use Unknown anywhere else. Most command execution failures are treated as internal and not unknown elsewhere in cephcsi. We should default to that instead of Unknown.

cdaa926
This commit introduced unknown grpc error code. Without using internal as default, we would need to export each error message and add it to the list every time a new code block it added.

Except that it is easy to forget to add a new error code (we should have unit tests for that), considering a matching gRPC error code is probably better than always returning Internal?
This change is not bad, but I am not sure how it improves things. In order to prevent the Unknown error from being returned, maybe log a warning marked as bug with call-stack so that it needs to be addressed?


Issue #171 - Removed warning Unused namespace - removed namespaces fr…

…om within the xml where it is already present at the top of the xml.
Context: The layout xml file already had the namespaces at the root xml node, and thus does not need them within the xml file.

Codecov Report

Merging #1123 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #1123   +/-   ##
======================================
  Coverage    3.98%   3.98%
======================================
  Files         123     123
  Lines        5569    5569
  Branches      536     536
======================================
  Hits          222     222
  Misses       5332    5332
  Partials       15      15

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 bbb8f2d...8e61be4. Read the comment docs.

@abhinavmanchanda thanks:)


[BUG] Panic on replacing left broken placeholder.

Hey!
Do you have an idea why it panics on this document?
author_order.docx
It seems to happen in fixBrokenPlaceholders function. Error: index out of slice's range.

Thanks in advance.

hi! Did you use new version 1.2.2 ?
Before current version there was bug you mention. It (kinda) fixed in https://github.com/bobiverse/docxplate/pull/22 :)
Can you recheck your current version (maybe you forked before version 1.2.2 release?)

then this is bug. I will look into it.
What you can do now is go through your document placeholders and:
1. Select placeholder

2. Clear formatting

Because sometimes xml breaks into smaller nodes and splits placeholder like {{ + Name}} or similar.

Hi @bobiverse.
Sorry, it completely slipped my mind. Totally forgot to tell you that we're not longer getting that panic and I'm not even sure what helped. My assume is that editing docx documents via LibreOffice is not the best idea.
With google docx template it works perfectly fine tho.
Thanks for the library. The best in this domain so far.
I'm gonna close this issue, but before that wanna ask to review a PR => https://github.com/bobiverse/docxplate/pull/24.
We're really missing this feature.
Best regards.

Hi, @KorsakVlad! Thanks for follow up.
I was bit off from docxplate and really want to tackle all issues and PR.
I'll look into PR #24 ASAP and try figure out confilcts if any.
:bow:


Changing the detached SCT to the correct format

Description

See https://github.com/trailofbits/sigstore-python/pull/24 - There was an issue around unmarshalling because the detached SCT is in an unexpected format.
Given that Fulcio 0.4 will break the Cosign client already, I'd like to just go ahead and fix the header. We'll need to hold off on Fulcio 0.4 and release Cosign 1.8 (with a change to expect a different struct for the detached SCT from Fulcio) first.
@dlorenc @cpanato FYI - Does this seem reasonable?

Another option - When we switch the production instance to return embedded SCTs, any integrators need to support those, instead of detached SCTs. We can then fix detached SCTs later.

Given that we're in the middle of releasing Fulcio 0.4 and Cosign 1.8, and given that the SCT format will change anyways once we roll out the new config changes for the production instance of Fulcio, let's not make any additional changes right now.
Once the production changes are rolled out, I'll update the detached SCT to be the right format (since at that point, no one will be impacted).

I'm not sure the current format is "wrong", it's just misleading to call it a signature. RFC 5246, section 4.7 calls this a 'digitally-signed element', and I think it could be useful to have additional means to verify the signature algorithm and hash algorithm.
Given that we're currently writing clients against this API, and since I'm guessing this wouldn't result in a version bump of the API, this would have the effect of breaking SCT verification for all existing clients, no?

I'm not sure the current format is "wrong", it's just misleading to call it a signature. RFC 5246, section 4.7 calls this a 'digitally-signed element', and I think it could be useful to have additional means to verify the signature algorithm and hash algorithm.

This is my thinking as well (although I'm admittedly less familiar with the ecosystem here). If I understand correctly, we do need some of the metadata in the DigitallySigned payload if Fulcio ever begins to do/support signatures that aren't ECDSA + SHA256.

I'm referring to the subtle differences between the structs:
For the detached SCT, it's marshalled into a AddChainResponse:
type AddChainResponse struct {
	SCTVersion Version `json:"sct_version"` // SCT structure version
	ID         []byte  `json:"id"`          // Log ID
	Timestamp  uint64  `json:"timestamp"`   // Timestamp of issuance
	Extensions string  `json:"extensions"`  // Holder for any CT extensions
	Signature  []byte  `json:"signature"`   // Log signature for this SCT
}

Whereas the SignedCertificateTimestamp, what will be embedded in the certificate, contains the digitally signed type:
type SignedCertificateTimestamp struct {
	SCTVersion Version `tls:"maxval:255"`
	LogID      LogID
	Timestamp  uint64
	Extensions CTExtensions    `tls:"minlen:0,maxlen:65535"`
	Signature  DigitallySigned // Signature over TLS-encoded CertificateTimestamp
}

I think a client should be able to assume that the same struct is present in the embedded certificate and the header. I don't want to force clients to switch between these types, like what we currently do in cosign.

Given that we're currently writing clients against this API, and since I'm guessing this wouldn't result in a version bump of the API, this would have the effect of breaking SCT verification for all existing clients, no?

We're already going to be breaking clients when we switch to embedded SCTs, we're not going to send the header too. A warning is being added to the new release of Cosign, and we'll give the Python and Java clients a heads up before we switch (hopefully this week?).

Is this still an issue? We did the switch to embedded already.

To make sure I understand, it's still a "bug" if you run with detached SCTs, but we don't run with those in production anymore so that doesn't affect us, but it might affect someone else running with detached SCTs?

That is correct.
If we do nothing, then existing clients will still work, it's just a quirk in the response format that we'd need to document for new clients. If we make this change, then we will need to update all clients.

Can we just deprecate/delete that response? I'm not sure anyone is using it or still cares.

It's still needed for GCP CA Service unfortunately, since that doesn't support precertificates/embedded SCTs.

Ah, when we use that directly?
Then I think I vote for just not touching this and documenting the issue/quirk.

https://github.com/sigstore/fulcio/pull/718