[python]Getting started with python plug-ins for GIMP

Proposed title of the article
Getting started with python plug-ins for GIMP
Proposed article introduction
GIMP is an open-source picture control program that many individuals use as a feasible option in contrast to a portion of the business contributions. GIMP handles convoluted components like layers and ways. GIMP upholds various diverse picture organizations and accompanies generally complex channels. GIMP has solid local area backing and inclusion, so it is generally simple to track down data concerning how to utilize or expand GIMP.
This article will turn out how to utilize GIMP-Python, which is an assortment of Python modules that permit you to program in Python to computerize errands in the GNU Image Manipulation Program (GIMP). These Python modules are basically coverings for the libgimp library. GIMP-Python isn't as old as Script-Fu expansions. To run scripts in Script-Fu, a module is utilized. The Python script becomes the dominant focal point in GIMP-Python and behaviors the work. You might run the GIMP-Python scripts straightforwardly from GIMP, or you can utilize GIMP's clump mode to begin it from the order line.
Key takeaways

Enrolling your content
Scripting the resize
Running the resize module script
Prearranging the picture change
Running the refreshed module script
Running both on a folder

Article quality
In this article, you will figure out how to foster Python code to computerize two unique cycles in GIMP: picture resizing and document saving. It will likewise help the student on the best way to use GIMP-python.
References
N/A

There are several grammatical errors. Topic approved. However, make sure PR is error free


Default values do not initialize with masks

After typing the mask is applied, however, the value initially loaded through the state does not have the mask applied.
This problem did not occur before.

Hi @alessandrosales could you provide a code sample?

Fixed in 1.12.3.
Thanks for reporting bro o/

Thanks


How to give box as a input prompt to SAM

I am using the demo provided by segment-anything and they have given example of points prompts only My requirement is to give box coordinates and get all the shapes lai inside that box

in the screenshot, they have provided clicks info and I want to provide box coordinates instead of clicks.
any help will be really appreciated

I am using the demo provided by segment-anything and they have given example of points prompts only My requirement is to give box coordinates and get all the shapes lai inside that box
 in the screenshot, they have provided clicks info and I want to provide box coordinates instead of clicks.
any help will be really appreciated

Maybe using inference code from SAM codebase instead of demo API will help you.

I am using the demo provided by segment-anything and they have given example of points prompts only My requirement is to give box coordinates and get all the shapes lai inside that box
 in the screenshot, they have provided clicks info and I want to provide box coordinates instead of clicks.
any help will be really appreciated

Maybe using inference code from SAM codebase instead of demo API will help you.

I tried but didn't got solution need some specific solution


GetAcceptor1FeatVects in FeatDirUtilsRD reverses conditional cases (e.g. for carbonyls and fluorines)

RDKit Version: '2020.03.3'
Operating system: MacOS, Linux
Are you using conda? yes
If you are using conda, which channel did you install the rdkit from? conda-forge
I wanted to quickly test out the pharmacophore features as shown in this blog post and noticed that the encoded feature directions don't seem to point in the right direction.
I tested this out on lorlatinib, which has both cases for it's aromatic fluorine and carbonyl. E.g. from the Chem.Features.FeatDirUtils.py:
def GetAcceptor1FeatVects(conf, featAtoms, scale=1.5) :
  """
  Get the direction vectors for Acceptor of type 1
  This is a acceptor with one heavy atom neighbor. There are two possibilities we will
  consider here
  1. The bond to the heavy atom is a single bond e.g. CO
     In this case we don't know the exact direction and we just use the inversion of this bond direction
     and mark this direction as a 'cone'
  2. The bond to the heavy atom is a double bond e.g. C=O
     In this case the we have two possible direction except in some special cases e.g. SO2
     where again we will use bond direction

As shown on the right, the aromatic fluorine gets tagged as case 2 instead of case 1 and the carbonyl vice versa (i.e. we want the fluorine to have the directional cone, and the carbonyl to have two possible directions for their lone pairs):

I believe the reversal is caused by line 380 of FeatDirUtilsRD.py, where '>' should be replaced with '==' to satisfy the condition on line 385:
singleBnd = mol.GetBondBetweenAtoms(aid,heavyAt.GetIdx()).GetBondType() > Chem.BondType.SINGLE

  # special scale - if the heavy atom is a sulfur (we should proabably check phosphorous as well)
  sulfur = heavyAt.GetAtomicNum()==16

  if singleBnd or sulfur:
    v1 = conf.GetAtomPosition(heavyAt.GetIdx())

Updating this line accordingly seems to fix this issue:
singleBnd = mol.GetBondBetweenAtoms(aid,heavyAt.GetIdx()).GetBondType() == Chem.BondType.SINGLE

Hi,
Looking at your diagram, I was also wondering if:

The NH2 should perhaps have two vectors in the directions of the H atoms?
Is the amide N an acceptor?

Hi,
Looking at your diagram, I was also wondering if:

The NH2 should perhaps have two vectors in the directions of the H atoms?
Is the amide N an acceptor?


pullapprove: Add documentation team for approval

Instead of listing the users from the documentation team, add the
github documentation team for documentation approval.
Fixes #785.
Signed-off-by: Salvador Fuentes<EMAIL_ADDRESS>

Before merging this PR, "documentation" team should have access to this repo.  @grahamwhaley can you help me adding it.
Thanks.

Docs team now have access to the tests repo @chavafg

lgtm

Thanks @grahamwhaley


Re-factor / re-package

This is to be able to push to PyPI and have the tool installable via pip.

use PDM for dependency management
re-structured the project into a src folder
added lifecycle support
added command line flag to separate out configurations into individual files.
support multi-line configurations introduced with the CML 2.7 release

also: using ruff to lint/format the code, thus quite a few lines with code changes like single vs. double quotes, indentation, tab/space... etc.
This should be ready to be merged:

added changes to the README
added a CHANGELOG
made some final cosmetic updates and installed latest dependencies (ruff did have a minor version bump)

I'd recommend to add an annotated tag to the main branch git tag -a v0.1.0 -m "initial release" && git push --tags before merging this into main.

Ah, one more things... the README has links to my repository especially for the code coverage piece. You'd need to register/login with coveralls to make that work and change the links so that the proper badge will be shown.  Something you need to do.  Otherwise things might look broken.
I can help with pushing to PyPI (need account there as well) and publishing a release etc.


⚠ Bofrost.lu has degraded performance

In 019d36a, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1576 ms

Resolved: Bofrost.lu performance has improved in 09cb93e after 20 minutes.


Bug(frontend): ballot input

Description
the ballot allocation list input is acting weird, also should prevent user from spending voice credits more than limitation in the project detail page.

close by #224


Project is not compensating for compiler padding.

`class fwEntity
{
public:
char pad_0000[32]; //0x0000
class CBaseModelInfo* m_model_info; //0x0020
int8_t m_invisible; //0x0028
char pad_0029[7]; //0x0029
class CNavigation* m_navigation; //0x0030
char pad_0038[1]; //0x0038
int8_t m_entity_type; //0x0039
char pad_003A[150]; //0x003A
class netObject* m_net_object; //0x00D0
char pad_00D8[176]; //0x00D8
uint32_t m_damage_bits; //0x0188
bool is_invincible() { return(m_damage_bits & (1 << 8)); }
void enable_invincible() { m_damage_bits |= (1 << 8); }
void disable_invincible() { m_damage_bits &= ~(1 << 8); }

}; //Size: 0x018C
class CPed : public fwEntity
{
public:
char pad_018C[2972]; //0x018C
class CVehicle* m_last_vehicle; //0x0D28
char pad_0D30[892]; //0x0D30
uint8_t m_decal_index; //0x10AC
uint8_t m_decal_info; //0x10AD
char pad_10AE[10]; //0x10AE
class CPlayerInfo* m_player_info; //0x10B8
char pad_10C0[1072]; //0x10C0
class CVehicle* m_last_vehicle2; //0x14F0
}; //Size: 0x14F8
`
m_last_vehicle and all subsequent members of CPed and anything that inherits from fwEntity are all going to be 8 bytes too far ahead because of compiler padding.
`; 43   : 				if (auto last_vehicle = ped->m_last_vehicle2)
mov	rbx, QWORD PTR [rbx+5368]`

#pragma pack should help.

#pragma pack should help.

Should that be put in to the auto generated C++ header? Also, #pragma once.

Should that be put in to the auto generated C++ header? Also, #pragma once.

pragma once is just at the top to stop the header being compiled multiple times.
#pragma pack(push, 4) class CPed : public fwEntity { public: char pad_018C[2972]; //0x018C class CVehicle* m_last_vehicle; //0x0D28 char pad_0D30[892]; //0x0D30 uint8_t m_decal_index; //0x10AC uint8_t m_decal_info; //0x10AD char pad_10AE[10]; //0x10AE class CPlayerInfo* m_player_info; //0x10B8 char pad_10C0[1072]; //0x10C0 class CVehicle* m_last_vehicle2; //0x14F0 }; //Size: 0x14F8 #pragma pack(pop)
something like this will only do it for ur class, adjust size for alignment tho

Maybe it must be 1 instead of 4. ReClass.NET could generate additional code with static_asserts to prevent this kind of error. I use that in the UnrealEngine SDK Generator too. Then you will get a compile time error if the alignment doesn't match.
// Created with ReClass.NET 1.2 by KN4CK3R

class N0000004E
{
public:
	char pad_0000[24]; //0x0000
	uint64_t var0; //0x0018
	char pad_0020[16]; //0x0020
	uint8_t var1; //0x0030
	char pad_0031[4]; //0x0031
	uint8_t var2; //0x0035
	char pad_0036[1]; //0x0036
	uint16_t var3; //0x0037
	char pad_0039[24]; //0x0039
	float var4; //0x0051
	char pad_0055[20]; //0x0055
	class N0000006B *var5; //0x0069
	char pad_0071[16]; //0x0071

	static_assert(offsetof(N0000004E, var0) == 0x0018);
	static_assert(offsetof(N0000004E, var1) == 0x0030);
	static_assert(offsetof(N0000004E, var2) == 0x0035);
	static_assert(offsetof(N0000004E, var3) == 0x0037);
	static_assert(offsetof(N0000004E, var4) == 0x0051);
	static_assert(offsetof(N0000004E, var5) == 0x0069);
}; //Size: 0x0081
static_assert(sizeof(N0000004E) == 0x0081);

class N0000006B
{
public:
	char pad_0000[136]; //0x0000
}; //Size: 0x0088
static_assert(sizeof(N0000006B) == 0x0088);

Patch:
diff --git "a/ReClass.NET/CodeGenerator/CppCodeGenerator.cs" "b/ReClass.NET/CodeGenerator/CppCodeGenerator.cs"
index ead4bc0..771b040 100644
--- "a/ReClass.NET/CodeGenerator/CppCodeGenerator.cs"
+++ "b/ReClass.NET/CodeGenerator/CppCodeGenerator.cs"
@@ -310,9 +310,16 @@ namespace ReClassNET.CodeGenerator

 			var nodes = @class.Nodes
 				.Skip(skipFirstMember ? 1 : 0)
-				.WhereNot(n => n is FunctionNode);
+				.WhereNot(n => n is FunctionNode)
+				.ToList();
 			WriteNodes(writer, nodes, logger);

+			writer.WriteLine();
+			foreach (var node in nodes.WhereNot(n => n is BaseHexNode))
+			{
+<EMAIL_ADDRESS>{node.Name}) == 0x{node.Offset:X04});");
+			}
+
 			var vTableNodes = @class.Nodes.OfType<VirtualMethodTableNode>().ToList();
 			if (vTableNodes.Any())
 			{
@@ -348,6 +355,8 @@ namespace ReClassNET.CodeGenerator
 			writer.Indent--;
 			writer.Write("}; //Size: 0x");
 			writer.WriteLine($"{@class.MemorySize:X04}");
+
+<EMAIL_ADDRESS>== 0x{@class.MemorySize:X04});");
 		}

 		/// <summary>

Opinions?

We shouldn’t flood the file with asserts. The size of the class should be good enough. I think that if the x64 not version is running it’s safe to assume that it will he compiled against 64-bit code and same for 32-bit. The project should just not let inherited classes that are sized wrong be inherited. But I also like the idea of the static asserts. I just don’t think there needs to be 6+ of them for each class. At most 3.

I have added class size checks (45864277)

^just to confirm it should be pragma pack 1. You want exact one byte alignment

I think the project should just add the closest compiler padding instead of expecting the user to copy 1:1 the entire generated header. That’s what I did.

I think ReClass should not add padding. If the user designs a class it should output exactly what the user wrote. The compiler is free to break the code if you do not tell him otherwise (with pragma).

i wouldn't attempt to match compiler padding. That's easy to have subtle differences in behavior. Just use pragma pack, that's what it's for.

The only compiler that really adds padding is MSVC for a target of Windows because of how windows handles memory and tries to be semi-RISC compliant trying to align everything to a 4 byte divisible address. I think there should be a configurable entry that’s off by default that states like “align all classes to X bytes for arrays” or something.

^ that would be a pragma pack option with X being the packing option. I agree with this


DubboService注解场景下version和group单独配置，且配置值一样，启动会报错

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 3.0.10/2.7.16
Operating System version: Windows 10
Java version: 1.8.0_221

Steps to reproduce this issue

使用dubbo-spring-boot-starter + @DubboService注解
单独配置version或group，并且version和group值一样
3.0.10启动报错，2.7.16 启动后只能注册一个dubbo url到zk（期望注册2个）

Pls. provide [GitHub address] to reproduce this issue.
Expected Behavior

期望启动不报错，并且正常注册两个接口的url到注册中心
Actual Behavior

3.0.10启动报错，2.7.16启动后只会注册一个url到zk
If there is an exception, please attach the exception trace:
报错如下：
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'ServiceBean:com.dubbo.demo.demo.HelloFacade:1.0.0' defined in null: Found duplicated BeanDefinition of service interface [com.dubbo.demo.demo.HelloFacade] with bean name [ServiceBean:com.dubbo.demo.demo.HelloFacade:1.0.0]

This is an extreme corner case that makes no meaning most of the time, same interface name, same version/group.
Dubbo3 does not allow the same service(interface, group, version all the same) to be declared more than once. Seems like it failed to distinguish the corner case of only the version or group is set, it wrongly treats them as the same.
We can consider to fix that but it's not a priority.

yes. this issue has been fixed.


Variable Length Args

Is something like this supported:
the program takes two or more strings
the program optionally takes -r or --reverse
I can figure out the -r / --reverse part but not the variable args (without a flag).

python app.py
please supply at least two arguments

python app.py -r
please supply at least two arguments

python app.py  a -r
please supply at least two arguments

valid:

python app.py  b a -r
...

Great project, btw, very cool - so easy to use!

Usage:
script.py [-r]  ...
running as: "script.py foo bar -r"
arguments = {
"-r": true,
"": [    "foo",     "bar"  ]
}


Support python3 in our various build and test scripts

We use Python for a bunch of our internal tools and automation. I believe many of them currently don't work under Python 3. That makes it harder for external users that don't have Python 2.7 installed to get up and running.
We should probably get those scripts working under both 2 and 3, deprecate them if they aren't needed anymore, or rewrite them in Dart where appropriate.

I thought python 2 and 3 were mutually exclusive?  There is a conversion tool, but I think once you've converted you can't go back. :)
https://wiki.python.org/moin/Python2orPython3

It's possible to write Python code that runs in both, but the TL;DR is that
it is annoying to do so.  This is a somewhat out of date guide but will
give you the general idea:
http://python-future.org/compatible_idioms.html
If we decide to do it, making our Python tooling work in both will be an
exercise in in using and/or finding compatible idioms along these lines.
Janice
On Thu, Feb 16, 2017 at 10:54 AM, Eric Seidel<EMAIL_ADDRESS>wrote:

I thought python 2 and 3 were mutually exclusive? There is a conversion
tool, but I think once you've converted you can't go back. :)
https://wiki.python.org/moin/Python2orPython3
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dart-lang/sdk/issues/28793#issuecomment-280423496,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANdn253QJDgSJFhcOzlY5MH0q4PHZ_W5ks5rdJtUgaJpZM4MDYZG
.

I don't know how much more effort (if any) it'd be to rewrite in Dart over making work in both Pythons, but that would not only eliminate another dependency but it's also good dog-fooding (or "putting your money where your mouth is"). Most people wanting to hack on Dart are going to have an SDK already whereas Python might not be available (for ex., most Windows users trying out Dart probably don't have either Python).

CC @athomas @whesse Python 2 is EOL in < 2 months, on Jan 1, 2020. https://pythonclock.org/

So just a ping from my side as I am packaging in openSUSE if I have time. If we get this Py3 I could try to build an openSUSE/Fedora/CentOS/... Specfile to make Dart available on these distributions if legal is fine with it. But since no Py2 packages are accepted to openSUSE Leap and Tumbleweed Dart will not be available there...

I made some changes in my dev setup and hit this again - python2 has not been maintained for over a year now and we shouldn't be asking authors to install it to contribute to the SDK.
Do we have a timeline for this?

So just a ping from my side as I am packaging in openSUSE if I have time. If we get this Py3 I could try to build an openSUSE/Fedora/CentOS/... Specfile to make Dart available on these distributions if legal is fine with it. But since no Py2 packages are accepted to openSUSE Leap and Tumbleweed Dart will not be available there...

Actually I wanted to do this > 1 year ago.
Today came here to check whether the scripts have already been ported to Python3 because I wanted to create a dart package again :-)
Would be interesting if someone is working on it right now and how many scripts are actually affected.

find . -name '*.py' | wc -l
140

So would a PR which converts all of these to Python3 be accepted?

@jubalh Yes, certainly. Feel free to tag me in the PR.
We could rewrite some things in Dart, because of the checked-in SDK, we always have a working Dart SDK available after a gclient sync but we should be careful not to slow down the build by doing that (some of the python scripts are tiny utilities used by the GN build files).

//cc @a-siva

There's a CL in review now. I don't expect it to land before April.
https://dart-review.googlesource.com/c/sdk/+/192182

To anyone who is related to the dart project on this issue: Is it of interest if I would create RPMs (and everything related to that) for Dart (and when done Flutter) from the stable releases? If noone is interested I would drop that effort (because it is huge to automate all everything or to manually keep track of everything).

It could be interesting. Currently we sign our packages with internal tooling, but if we land support to build the packages externally we might be able to integrate this with our internal tooling to actually produce the signed packages when we do releases. I can't speak for the Flutter side, I see the currently offer snap packages.
I'd prefer if we continue this discussion on a separate issue (feel free to mention me in the issue). If you could give me an outline of what you'd like to do we can see if we can reconcile that with our release process and avoid you doing work that will result in wasted efforts.

If noone is interested I would drop that effort (because it is huge to automate all everything or to manually keep track of everything).

I'm not sure why you think you are alone in this. As mentioned in https://github.com/dart-lang/sdk/issues/28793#issuecomment-790744625 I plan to do this since a long time.
Also I requested the creation of the devel project devel:languages:dart in OBS several months ago.

@athomas just a reminder that after all the python2 things are gone the build instructions in the wiki might need updating: https://github.com/dart-lang/sdk/wiki/Building


vulkaninfo: load user32.dll dynamically

Instead of depending on user32.dll, this library is
now loaded dynamically.
This change is needed to redistribute vulkaninfo.exe
as a part of "universal" windows driverm, by making
vulkaninfo pass the 'ApiValidator' test.
See more here https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/validating-universal-drivers
Author: Kamil Szypryt<EMAIL_ADDRESS>

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

@scyganINTEL can you sign the contributor license agreement?

I added a missing #ifdef _WIN32 that was causing issues for linux as well as formatted them to comply with the clang-format.


SSH Key support for SFTP Remotes

What is your rclone version (eg output from rclone -V)
rclone v1.36
Which OS you are using and how many bits (eg Windows 7, 64 bit)
macOS 10.12.5, Synology DSM 6.1.2-15132
Which cloud storage system are you using? (eg Google Drive)
SFTP to Debian-based colocation server
The command you were trying to run (eg rclone copy /tmp remote:tmp)
N/A
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
N/A

Splitting this off from #1218 ; please add SSH key support in addition to the current SSH password support and SSH Agent support. Password support requires storing sensitive credentials in the rclone.conf file, and password authentication is not always supported by SSH servers. Agent support is somewhat broken/difficult on macOS, and missing entirely from many embedded or NAS platforms (e.g. Synology). Agents also represent another piece of software that can be misconfigured, break, etc, despite their uses in certain contexts. Supporting a user-specified SSH key would allow a more secure connection than passwords, and an easier and more reliable setup than agents.
Please? :)

I just ran the Linux/AMD64 build on my Synology, and after updating the remote with a user name and keyfile, it connected with no problem and sync'ed perfectly. I'll test the same from macOS in a moment, but things look good so far!

Neat, thanks!

Confirmed, works great on macOS Sierra as well. No more need for their "improved" ssh-agent.

Excellent, thanks for testing :-)

Hey, I think this is related:
How to deal with encrypted PEM SSH private keys? I mean, besides my key, I need to enter a password to decrypt it in order to access the server. There are currently three options on rclone:
Password authentication: Discarded for me because my server doesn't allow password authentication, only pub key auth.
Agent Authentication: It is not working on my system (Linux) even with a properly configured ssh-agent process running, ex: I already logged on my server typing my password and it gets stored during all the session, but rclone can't detect the ssh-agent, printing this message:
Failed to create file system for "remote:path": couldn't connect to ssh-agent: Error connecting to SSH_AUTH_SOCK: dial unix /ssh-agent.socket: connect: no such file or directory

I think that the rclone environment variable "SSH_AUTH_SOCK" is pointing to the wrong place, since the process ssh-agent on my system is storing the file 'ssh-agent.socket' on:
/usr/bin/ssh-agent -a /run/user/1000/ssh-agent.socket

Private Key authentication: Doesn't work since it needs the password for decrypt my private key. This message is appearing:
Failed to create file system for "remote:path:": failed to parse private key file: ssh: cannot decode encrypted private keys

Any update on this? since i need support for this algorithm for key exchange

SFTP should work fine with an ssh-agent now on Linux and OSX.  What are you trying @salmanwaseem007 ?

Sorry i commented on wrong page


Add find property command

Closes #93
Refactor AddressBookParser to CobbParser
Refactor FindBuyerCommand
Add FindPropertyCommand

Codecov Report
Base: 64.80% // Head: 64.26% // Decreases project coverage by -0.53% :warning:

Coverage data is based on head (6671b14) compared to base (0addc9d).
Patch coverage: 32.14% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #136      +/-   ##
============================================
- Coverage     64.80%   64.26%   -0.54%
  Complexity      598      598
============================================
  Files           108      110       +2
  Lines          2026     2043      +17
  Branches        248      250       +2
============================================
  Hits           1313     1313
- Misses          653      670      +17
  Partials         60       60

Impacted Files
Coverage Δ

...du/address/logic/commands/FindPropertyCommand.java
0.00% <0.00%> (ø)

...ss/logic/parser/FilterPropertiesCommandParser.java
0.00% <0.00%> (ø)

...ddress/logic/parser/FindPropertyCommandParser.java
0.00% <0.00%> (ø)

...in/java/seedu/address/logic/parser/CobbParser.java
75.00% <50.00%> (ø)

...rc/main/java/seedu/address/logic/LogicManager.java
66.66% <100.00%> (ø)

...seedu/address/logic/commands/FindBuyerCommand.java
100.00% <100.00%> (ø)

...u/address/logic/parser/FindBuyerCommandParser.java
100.00% <100.00%> (ø)

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Fix proving key path

Oh wait, I think raw might actually have been correct for the files themselves; not sure what was failing earlier.

Oh wait, I think raw might actually have been correct for the files themselves; not sure what was failing earlier.

I committed your suggestion prematurely, it seems to be failing now. raw should be correct for accessing the direct, unprocessed contents of the file.


Wrap server streaming requests in context manager

This client API change wraps server streaming and bidirectional streaming request in context managers for two reasons:

Bidirectional streams need to be able to spawn a task group to keep sending messages from the client to the server while the client is processing one of the messages of the server. In order to prevent corruption of the task group stack (at least in trio), task groups cannot wrap yield statements in generators. This is fixed by creating the task group in a context manager and yielding the generator for the server message from that context manager.

When a client stops consuming a server to client stream for some reason, for example due to an exception, currently there's no way to notify the server that the client will no longer process messages. This will prevent the server from freeing resources associated with that request unless some timeout triggers. By requiring the client to enter a context manager before it is able to receive messages from a server stream, it is possible to add functionality in the future to let the server know that the client will never read messages from the stream again whenever it exits the context manager.

Fixes #36

Should be ready for merging now


Managing relative paths in the backend

There are instances in the Lumigator backend where we use relative paths to access external configuration files (e.g., #381). For example, in the /models API:
MODELS_PATH = Path(__file__).resolve().parent.parent.parent / "models.yaml"

We should consider a cleaner approach, such as defining these paths as variables in backend.settings.

Shall we start this issue after the demo?


Select the whole line on right click

When selecting a piece of text and right-clicking on it, the text after the selection get selected 'til the end of the line.
I tried turning off the plugin and this behavior disappeared, so I think it is the problem.
By the way, thanks for the awesome plugin.

THANK YOU for pointing that out! I noticed the same behavior, but hadn't connected it to my plugin! Aces!


Stage only integration test

Adapted the flow integration test for stage-only

I made the changes to the data as requested, but there's something funky happening with the unit test here. It's calculating EAD correctly, but something goes awry by the time difference is calculated. I don't think it's a big issue but didn't have time to play around with it to figure out

That’s great! Let’s troubleshoot together. If you’ve got some extra time in the morning, stop by my office. I’m in the back right set of offices, first door on the left.

On May 22, 2022, at 5:38 PM, rtle76 @.***> wrote:

I made the changes to the data as requested, but there's something funky happening with the unit test here. It's calculating EAD correctly, but something goes awry by the time difference is calculated. I don't think it's a big issue but didn't have time to play around with it to figure out
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because your review was requested.


Add a AOT serving image

See https://github.com/subfuzion/dart-docker-slim
Would be great to make this "official"
CC @athomas @mit-mit @subfuzion

What us a "compiling image"?

https://github.com/subfuzion/dart-docker-slim
An image that does the AOT compiling work.
Would be great if this was part of our official offering.
CC @subfuzion

I'm not sure we need a compiling image (for that you need the full SDK, this is the "fat image"). What we need is a slim "serving image" that has just enough to run an AOT-compiled snapshot in the VM.

I'm not sure we need a compiling image (for that you need the full SDK, this is the "fat image"). What we need is a slim "serving image" that has just enough to run an AOT-compiled snapshot in the VM.

renamed the issue

To help eliminate any confusion when referring to the images, let's call them the sdk and runtime images. Using runtime was recommended by the official images team (Tianon), vs slim and other choices.

I'm been brainstorming with Tianon over slack for the past couple of hours. We're thinking we might be able to optimize things in such a way that we can generate the final version of an image in one of two ways, both of which would eliminate the need to actually maintain a dedicated runtime image. Will circle back here with more details shortly.

let's call them the sdk and runtime images

SGTM

Re brainstorming, not sure if this makes any difference, but note that there is an alternative to compiling to a server.exe as the current slim image does, namely to compile to an AOT snapshot and then run this with the small dartaotruntime, where the latter is a fixed runtime that doesn't depend on the app being run.

Closing: we now have this supported in https://hub.docker.com/_/dart


Dijkstra's algorithm

should i change something?

@crabman448 checking it out now

Thank you for your comments! 👍
I will fix it as soon as possible :)

Will improve it in a couple days. Thank you again! : )

Changed readme)

Fixed things you have mentioned :)

I'm going to add part about code implementation with its description.

I have finished :) And hope it is ready for merge

Thanks a lot again) But I'm not agree with concept, that it would be better to use directed graph. Because, about 2 months ago I was looking for algorithm, that will be possible to use in not directed graph. And I thought, that Dijkstra won't satisfy my requirements, because explanations mostly used directed graphs, but I needed to go in both directions on every edge.
Maybe it would be better to add both directed and not directed graph explanations?

Interesting. Dijkstra's algorithm should be functionally identical for both undirected and directed graphs. I can't picture why you would want to go in both directions for every edge. You'd never want to travel back and forth since that only increases your total distance.
Could you explain why you needed to go in both directions using Dijkstra's?

In my app I have a graph, that is not directed at all. You can go in both directions on every edge. And when I was searching for suitable algorithm, I've seen some explanations with directed graph I was like: "That won't work in my case, because I have not directed weighted graph". But it would)

In the park, for example, people can go in both directions on the footpaths.

Let's take this step by step. If you want to find the shortest path between 2 vertexes in a graph, would you ever want to travel down a single undirected edge more than once?

I'm not sure, that i understood you right. Probably I won't. But I don't know whether i'll travel up or down an edge.

Can you elaborate on that? One of the most common ways to represent an undirected graph is to use a directed graph where every edge is paired with another edge going in the opposite direction.

But why? It is extra work, isn't it? :)

If I have not directed graph, why should I make it directed?

@crabman448 I took a look at your implementation, here's what I mean:
func setupConnections() {
  // ...
  let neighbor1 = (neighborVertex, randomWeight)
  let neighbor2 = (vertex, randomWeight)
  vertex.neighbors.append(neighbor1)
  neighborVertex.neighbors.append(neighbor2)
}

neighbor1 and neighbor2 are your directed edges. They represent the destination and the weight of the edge. Your undirected graph is built by using a pair of directed edges. Every connection you make is done by adding a pair of edges.
You're right about it being extra work - hence I suggest we base the explanation based on a directed graph.
To create a directed graph, all you need to do is remove one of the pairs:
func setupConnections() {
  // ...
  let neighbor1 = (neighborVertex, randomWeight)
  vertex.neighbors.append(neighbor1)
}

Now your graph is a directed graph, with exactly half as many edges than your previous undirected graph. I recommend reading our tutorial on adjacency lists for more info.

Hmm, got you) So, when all graph's vertices are connected in both directions, then it is directed graph? And there is no other way to achieve such behaviour?

Hmm, got you)
"In an undirected graph, you can treat it as a directed graph that goes both ways."
So, when all graph's edges are bidirectional, then it is directed graph? And there is no other way to achieve such behaviour?

Yes

An undirected graph is a directed graph where every edge has another edge going in the opposite direction

All undirected graphs can be viewed as a directed graph.
A directed graph is undirected if and only if every edge is paired with an edge going in the opposite direction

Things have become clearer)) Thank you again. I will mention this statement in the beginning of the readme.

I'm currently busy with my graduating project in the university. I'll fix description as soon as I will have enough time)

Awesome work. I can see both of you are diligently making progress over many days. Looking forward to see this completed.

I'm back now :)

I've added some general concepts about graphs, but I would like to use example with shops and choosing the closest one of them, because it correlates better with Dijkstra's algorithm: Shortest paths from source vertex to all others.

I've checked grammar etc and hope it is ready for merge now :)

Nice. I just did a quick read and it's shaping up very nicely. Great improvements!
I'll do a more thorough review in the next few days.

Woot, I had a chance to read over it. It's much nicer than before. This is ready for a merge.
I think there's still lots of room for improvement in areas like readability, so if you have time, consider spending more time improving the readme files. Thanks @crabman448!


Update RingSockets: Add socketsCleanup function

This function will terminates use of the Winsock, we have to document that to tell users call this function when they finish using the extension
Thanks

Thanks for the update


Unable to receive new messages after 150 matches.

There is something wrong with this api：

GET /matches/:cursor (located in /packages/api/src/index.ts)

Param cursor does not appear to have any effect.
Cannot get any new messages after 150 messages.

new messages or new matches?

new messages or new matches?
new matches

it looks like in the db you only have 127 matches, are you seeing more than that?

damn ur a shagger @Vincent0700

it looks like in the db you only have 127 matches, are you seeing more than that?

Cause i unmatch many people. I can't receive any new matches before.

I believe I have the same issue, the number of notifications are up but it shows no new messages or matches.

Marked as high priority since app is functionally unusable for some individuals.

I believe I have the same issue, the number of notifications are up but it shows no new messages or matches.

I build a cli tool that can cancel inactive matches which can solve the problem temporarily
https://github.com/Vincent0700/vsinder-cli
Usage:
$ npm i -g vsinder-cli
$ vsinder unmatches

I'm not getting messages from anyone all of a sudden. I tried the tool but its the same. Either something is wrong or I'm just sad :D In fact, @Vincent0700 we matched haha. Do you see my message in the app?

I'm not getting messages from anyone all of a sudden. I tried the tool but its the same. Either something is wrong or I'm just sad :D In fact, @Vincent0700 we matched haha. Do you see my message in the app?

nevermind, my messaging works. its just noone was answering (questions own existance). i'll go cry :D

nevermind, my messaging works. its just noone was answering (questions own existance). i'll go cry :D

I have the same issue: I get notifications for new matches and then they disappear when I join the app

I have the same issue: I get notifications for new matches and then they disappear when I join the app

If for nothing else could someone with dB perms purge my inactive matches manually? (Mobile user so I can’t use the script)

If for nothing else could someone with dB perms purge my inactive matches manually? (Mobile user so I can’t use the script)


ELF loader: ehdr.ph_entsz < sizeof(Elf64_phdr) out-of-bounds reads

(moved from original comment so we can keep track of this)
If an ELF file contains an Elf64_Ehdr with a ph_entsz < sizeof(Elf64_Phdr)` we end up reading out-of-bounds when accessing the members of the phdr struct: https://github.com/Solo5/solo5/blob/master/tenders/common/elf.c#L131-L154

I believe we should validate that ph_entsz >= sizeof(Elf64_Phdr) in ehdr_is_valid().

Here is a test vector:
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <elf.h>
int
main(){
  Elf64_Ehdr hdr;

  /* make ehdr_is_valid happy: */
  hdr.e_ident[EI_MAG0] = ELFMAG0;
  hdr.e_ident[EI_MAG1] = ELFMAG1;
  hdr.e_ident[EI_MAG2] = ELFMAG2;
  hdr.e_ident[EI_MAG3] = ELFMAG3;
  hdr.e_ident[EI_CLASS] = ELFCLASS64;
  hdr.e_type = ET_EXEC;
  hdr.e_machine = EM_X86_64;

  /* set ph params */
  hdr.e_phoff = 0;
  hdr.e_phentsize = 0;
  hdr.e_phnum = 0xffff; /* as many as possible to get a segfault */

  for(size_t i = 0; i < sizeof(Elf64_Ehdr); i++){
    printf("%c", ((char *)&hdr)[i]);
  }
};

And the result:
~/c/solo5 gcc trigger.c > /dev/shm/trigger.elf
~/c/solo5 ./tenders/hvt/solo5-hvt /dev/shm/trigger.elf
Segmentation fault
~/c/solo5 gdb --args ./tenders/hvt/solo5-hvt-debug /dev/shm/trigger.elf
GNU gdb (Debian 8.2.1-2) 8.2.1
This GDB was configured as "x86_64-linux-gnu".
Reading symbols from ./tenders/hvt/solo5-hvt-debug...done.
(gdb) run
Starting program: /home/user/c/solo5/tenders/hvt/solo5-hvt-debug /dev/shm/trigger.elf

Program received signal SIGSEGV, Segmentation fault.
elf_load_mft (file=0x7fffffffe3eb "/dev/shm/trigger.elf", mft=0x7fffffffdec0, mft_size=0x7fffffffdec8) at common/elf.c:269
269	        if (phdr[ph_i].p_type != PT_NOTE)
(gdb)

Note that the same problem is present in elf_load_mft(), which would also benefit from a check in ehdr_is_valid()


Question: Any chance of a separate library for models?

Any chance of a separate library for models, e.g., Confluent.Kafka.Models? One that does not depend on librdkafka.redist, and contains all interfaces and datamodels?
We have built a framework on top of Confluent.Kafka, which we are in the process of using in a quite large monolithic .Net Framework product consisting of 1000+ projects. We use the old csproj format, requiring that all transitive dependencies be unfolded when referencing a package, and we won’t be changing project format anytime soon. Besides the usual annoying side effects of the old project format in relation to nuget, we also have an issue with props-file in our many legacy tools, which requires some work on our part.
So in short, we would very much like to be able to control the librdkafka.redist reference in one library, while allowing all others to work with the types in Confluent.Kafka
Yes, I my motivation for such a packet is very specific, but perhaps others could also benefit from it?

thanks for the summary. an unfortunate consequence of the native dependency. it's unlikely we'll prioritize addressing this unless we see a critical mass of other people hitting the problem - this is the first time it's come up. maybe there is a solution whereby you load the library dynamically at run time or have a separate process for kafka communication and do IPC from your main apps. Neither ideal, but a couple of ideas for work-arounds.


Add open source license

Attaching an MIT license would be great so that this can be safely used by others.

I didn't really expect it to get so popular. Yes, that is a good idea.

I'm already beginning some changes so I can use it for a community that I'm part of so I'd love to see a permissive license added <3

This is a good idea.
Legal stuff: I believe legally you're supposed to get consent from all contributors when changing the license. So, since I've contributed, I hereby state that I consent to changing the license to any of the open licenses listed at opensources.org (Apache License 2.0, BSD 3, BSD 2, GNU GPL, GNU LGPL, MIT, Mozilla Public License 2.0, Common Development and Distribution License, Eclipse Publication License) as well as the Unlicense and the Creative Commons 0 license.

Ah, thanks, I'm not particularly great with legal stuff. The license has been changed to MIT.


Set fetch depth to 0 in checkout step of actions

This fetches all history for all branches and tags. Just a test. Trying to solve #42.

I think fetching all commit history solves the problem at least for the warnings:
/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/setuptools_scm/git.py:163: UserWarning: "/home/runner/work/iop4/iop4" is shallow and may cause errors
 warnings.warn(f'"{wd.path}" is shallow and may cause errors')

However, CI with python 3.11 is taking too long, I don't know if it's related.

I canceled and rerun the job. Should work normally. Actions CI tests randomly fail sometimes, I think because of connections problems or because of a bug in github.com/, or both, because I think a temporary connection problem should not cause an error. Related to #29.
Maybe #29 should be reopened. Either we fix / find the right version of github.com/ so that it does not randomly fail, or we have to setup a self-hosted runner. But that discussion should go to #29. The current setup is the best we have atm.


[BUG]  Cloudflare bypass does not work correctly.

Enter the address of the site where there is CloudFlare in "BF BYPASS"

Create the same GET request to the same address

We get such an answer.

or

user-agent is the same everywhere.
I tried simple GET requests to check the performance on many sites where there is CloudFlare .. everywhere the same ..

The CF bypass needs to be rewritten manually, the libraries always have issues apparently. I don't have time to do that so I don't know when this will happen.

cf already sent an update to web sites
now it is performing a POST request to redirect to main page after solving the js
so the actual lib is down 100%

Went here to ask the same question...

lib author said wont update it anymore

I reimplemented the old cloudflare on this branch https://github.com/openbullet/openbullet/tree/cloudflare but it doesn't work on multithreading so posted an issue here https://github.com/RyuzakiH/CloudflareSolverRe/issues/15 let's wait for his reply.

@openbullet will be still http only proxy after the issue been solved?

I did chat with leaf.xnet dev he wants 40$ for CF update and said will do it after 6th Jan so RIP

any update/news on the issue

@Paerot are you on 1.2.0? The cloudflare bypass should work in most cases, if it doesn't please post the website that's giving you trouble and i'll take a look at it.

any update/news on the issue

If you try using xevil for 2cap in CF bypass on 1.2.0 won't work. You need a real account until this issue is fixed

Actually XEvil and CapMonster are working correctly if you use CustomTwoCap and specify the ip and port correctly


TEI-XML tutorials

@FlavioZeska Have you already done these?
XML

[ ] https://www.w3schools.com/xml/default.asp (do "Home" through "Namespaces" pages of this tutorial)
[x] Optional: http://www.ultraslavonic.info/intro-to-xml/

TEI

[ ] https://books.openedition.org/oep/679 (Introduction) and https://books.openedition.org/oep/680 (The TEI and XML)
[x] Optional: https://tei-c.org/release/doc/tei-p5-doc/en/html/SG.html, sections v.1–v.3

@nathangibson Not all of them. I will complete the remaining ones

@nathangibson Not all of them. I will complete the remaining ones


Create AllDocs operation

What
Added support for the _all_docs endpoint.
How

Create ViewOperation protocol to provide a place to implement common function between _all_docs and views.
Added missing parameters to QueryViewOperation so it could conform to the ViewOperation protocol.
Changed limit and skip to UInt since there is no value in allowing negative integers for these parameters.
Moved Stale enum to outside of QueryViewOperation so it can be used with both _all_docs and _view endpoints.

Testing
New tests added in the AllDocsTests.swift.
Issues
Resolves #89

A few updates to match the behaviour of QueryViewOperation

LGTM +1


Clicking PR description in "Changes In PR" view will not focus an already opened PR description tab

Repro:

Check out a PR
Click the PR description (root node) in the "Changes in Pull Request" view
Click on a diff in Files
Click the PR description again, the tab will not be focused

Duplicate of https://github.com/Microsoft/vscode/issues/71463 .


direwolf 1.4 -> 1.5

Motivation for this change

Upgrade package
Move to radio category
Add build support for gpsd, hamlib PTT, CM108/CM119 PTT
Fix paths for symbols-new.txt and tocalls.txt
Fix .desktop file
Add self as maintainer since original maintainer was removed

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@markuskowa @MarcFontaine any interest in reviewing this? I tested most of the functionality and verified that the other features (gpsd, CM108/CM119 PTT) are activated based on the output of the build.

@GrahamcOfBorg build direwolf


GUI window is closed

I have an issue in that the GUI window is closed.
Can you solve it?

@hogyun2 - This might be because the datasets in this repo are stored with Git LFS and if you don't have Git LFS installed the sample images won't clone correctly. (Or at least this was the case for me).
Try:

Delete the cloned repository
Install Git LFS
Reclone this repository
Run stereodemo to view the default image, or eg stereodemo datasets/oak-d/cycles_* to show the results for a specific example image

For me, the viewer just shows the two raw images and then an estimated depth map from those images.

Thank you for the comments. I resolve this issue to set the dataset path!


[Error] imports[0] for react-transform-hmr does not look like React

Is this a bug report?
Yes
It is the same as #17112 but on an android device and since that was closed without a proper solution, creating another issue. On following the basic installation process and running native-react run-android I got this error on 3 different devices,
imports[0] for react-transform-hmr does not look like React

Tried it on two devices with latest android connected via usb and on an emulated android 6
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: Linux 4.4
Node: 7.4.0
Yarn: 0.27.5
npm: 5.5.1
Watchman: Not Found
Xcode: N/A
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0
Target Platform: Android (marshmallow)
Steps to Reproduce

(Write your steps here:)

Install react-native and android sdk as per official documents
create new project with react-native init TestProject
start android 6 on emulator or connect to device (ive tried both and got the same result)
run react-native run-android from the project directory

Expected Behavior
To see the bare project landing page
Actual Behavior

Reproducible Demo
Just follow the steps to reproduce without changing anything

Seeing the same thing for iOS on Mac, in the last hour.

Same here on iOS Simulator.

Same here on android.
react: 16.2.0
react-native: 0.53.0

How do you solve this problem? I'm using 0.55.3 and this is wrong.

@yinchuanjiang i have switched to using flutter which has far better docs and a more responsive community.


Add option to open a folder without remeber it in "recent projects"

When temporarily open a folder and edit the source file in it via Visual Studio Code, The path of this folder will be remembered in the "Recent Projects" section of Visual Studio Code.
It would be nice to add a flag in code cli options to not put the path inside the "Recent Projects".

@evan0greenup there is a undocumented --skip-add-to-recently-opened, does that work?

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Add Dexlab Token

[x] I will not ping the Discord about this pull request.

Please provide the following information for your token.
Please include change to the src/lib/.json and in the PR
At minimum each entry should have

Token Address: GsNzxJfFn6zQdJGeYsupJWzUAm57Ba7335mfhWvFiE9Z
Token Name: Dexlab
Token Symbol: DXL
Logo<EMAIL_ADDRESS>Link to the official homepage of token: https://www.dexlab.space/
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

https://github.com/solana-labs/token-list/pull/216


Arbitrary 'on*' handlers

Can we support any on* handlers on any element?

Use a namespaced attribute in html to know that it's lua? e.g. <button lua:onclick="foo()">
Use a mutation observer to watch for adding/removal of the :on* properties
Would mean that at load time we have to iterate every element to check for attributes: is that too expensive?

The query selector [attr^=val] is for the value starting with 'val', not attribute names starting with 'val'.

Why (applies to each point)?
Why do you want to see a events bound to HTML element from HTML markup itself? How this is beneficiary in contrast to its persumed cost (runnig through each HTML element can be tested by you on your browser)
Mutation observers are not supported in some browsers: https://caniuse.com/#feat=mutationobserver
Queries: would it be OK https://github.com/jquery/sizzle/wiki ?

Why do you want to see a events bound to HTML element from HTML markup itself? How this is beneficiary in contrast to its persumed cost (cost of runnig through each HTML element can be tested by you on your browser)

Because one of the goals of fengari is to make it possible to use Lua in the browser wherever you would write JS instead. As people write things like <button onclick="submit()"/>, I want to make that possible writing lua instead.

Mutation observers are not supported in some browsers: https://caniuse.com/#feat=mutationobserver

All modern browsers are in there: if this one feature doesn't work in IE10 then so-be-it. (or can fall back to some horrifically expensive alternate API where all events on all DOM objects are monitored)

Misc notes:

Do we need to watch sub-documents (like in iframes?)
Should we automatically start .observe on page load? or make it opt-in?

Perhaps have it opt-in to start with?

attributeFilter only takes an array of specific attributes. there's no way to e.g. specify a prefix natively

Example MutationObserver code:
const cb = function(mutationRecord) {
  const attributeName = mutationRecord.attributeName;
  const target = mutationRecord.target;
  // trim off `lua:` prefix
  const name = attributeName.substring(4);
  if (!(name in target)) {
    console.warn("Invalid field for target", mutationRecord);
    return;
  }
  const attr = mutationRecord.target.attributes[attributeName];
  if (attr === void 0) {
    // has been removed; should use `removeEventListener`
  } else {
    console.log("Setting on* handler", mutationRecord);
    const value = attr.nodeValue;
    const func = fengari.load(value);
    target[name] = func; // Should use `addEventListener` here
  }
};
const observer = new MutationObserver(function(mutationList, observer) {
  mutationList
    .filter((mutationRecord) => mutationRecord.attributeName.startsWith("lua:on"))
    .forEach(cb);
});
observer.observe(document, {
  subtree: true,
  attributes: true,
});


Doctest Python 3 compatibility

Just a few minor things to help with printing compatibility. In order to minimize the changes and avoid using __future__, I changed all the prints to only output a single item at a time.

OK, I removed the extra str since it wasn't necessary.
One other thing that you might want is to add the from __future__ import print_function to the doctest_global_setup option. That would make print work like a function for all the doctests, but it would make it "invisible" within the documentation.

I think it'd be nicer to keep the amount of "invisible" setup to a minimum, so someone can copy'n'paste the code snippets into a Python session/notebook and it just works. The single-argument print(...) syntax fits nicely with that. :+1:
On the same topic, I don't understand the need for the np.set_printoptions(precision=8) call. For example, the following code generates exactly the same output on Python 2.7 and Python 3.4:
>>> np.random.seed(0)
>>> np.random.random(6)
array([ 0.5488135 ,  0.71518937,  0.60276338,  0.54488318,  0.4236548 ,
        0.64589411])

Try with float32.

:confused:
import sys
print(sys.version)
import numpy as np
np.random.seed(0)
print(np.random.random(6).astype('f4'))

2.7.6 (default, Jan  3 2014, 16:42:21)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]
[ 0.54881352  0.71518934  0.60276335  0.54488319  0.42365479  0.64589411]

3.4.1 |Continuum Analytics, Inc.| (default, Sep 10 2014, 17:10:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
[ 0.54881352  0.71518934  0.60276335  0.54488319  0.42365479  0.64589411]

This is the one that actually fails on Python 3:
Document: iris/iris/unit
------------------------
**********************************************************************
File "iris/iris/unit.rst", line ?, in default
Failed example:
    print(c.convert(0, f))
Expected:
    32.0
Got:
    31.999999999999886
**********************************************************************
File "iris/iris/unit.rst", line ?, in default
Failed example:
    c.convert(a32, f)
Expected:
    array([ 32.        ,  33.79999924,  35.59999847,  37.40000153,
            39.20000076,  41.        ,  42.79999924,  44.59999847,
            46.40000153,  48.20000076], dtype=float32)
Got:
    array([ 32. ,  33.8,  35.6,  37.4,  39.2,  41. ,  42.8,  44.6,  46.4,  48.2], dtype=float32)
**********************************************************************

Maybe something else is going on somewhere...

Ah, I've figured it out. In docs/iris/src/whitepapers/um_files_loading.rst, there's a call to np.set_printoptions in the doctest setup. On Python 2, this doesn't seem to reset automatically, but on Python 3, it seems that the doctest machinery does fully reload NumPy.

I don't understand what's suddenly started failing, but at least the doctests passed ;)

Tests failing due to the new version of mock I believe. This needs looking into properly I think, and is out-of-scope for discussion here,

OK then, this appears to be working correctly besides the mock issue.

OK then, this appears to be working correctly besides the mock issue.

I re-started Travis and you now have a tick.

Great! So :ship:?

Great! So :ship:?

Since @ajdawson had been dealing with this most recently I wanted to give him time to respond.

Cheers @rhattersley. This one had slipped off my radar so just as well it was merged without waiting in this case.


Choose schema for postgres

Currently, the user can generate entities only from schema public in Postgres DB. It's good idea to enable generation from other schemes.

If you use idea ultimate, you can support all types of databases

Hi , this feature is very important !! PostgreSQL use schema and databases structures on production environment it is normal change the default names !! Thanks !

@samirissa00
Do you use idea ulitimate? If so, the plugin can generate code directly using the database plugin.

Hi , no i`m a free lancer i use the CE ( community ) ,  i think that this plugin is to use in CE or is it to Ultimate ?

This plugin supports idea CE and idea ultimate. If you use idea ultimate, my plugin will provide richer functions, such as supporting more database types.
But I'm fixing the problem you just said. Please wait a moment.

@samirissa00
Please download the EAP version first. If you have any other questions, please feedback in time.
Jpa Support-2.0.4-EAP.zip


Division by zero error

Cmd: maast end_to_end --in-dir fna/100 --out-dir maast/100 --threads 64
Error:

reference genome path: fna/100/GCF_000797085.1.fna
[building mash sketch]: start
b''
b"mash: Relink /global/u1/s/snayfach/.conda/envs/maast/bin/../lib/./libgfortran.so.5' with /lib64/librt.so.1' for IFUNC symbol clock_gettime'\nSketching fna/100/GCF_900145835.1.fna...\nSketching fna/100/GCF_003834195.1.fna...\nSketching fna/100/GCF_003974345.1.fna...\nSketching fna/100/GCF_013169255.1.fna...\nSketching fna/100/GCF_000795535.1.fna...\nSketching fna/100/GCF_000480555.1.fna...\nSketching fna/100/GCF_000481005.1.fna...\nSketching fna/100/GCF_002330005.1.fna...\nSketching fna/100/GCF_002135995.1.fna...\nSketching fna/100/GCF_000629445.1.fna...\nSketching fna/100/GCF_001836415.1.fna...\nSketching fna/100/GCF_001181325.1.fna...\nSketching fna/100/GCF_001035645.1.fna...\nSketching fna/100/GCF_003936385.1.fna...\nSketching fna/100/GCF_900147275.1.fna...\nSketching fna/100/GCF_003631075.1.fna...\nSketching fna/100/GCF_004373425.1.fna...\nSketching fna/100/GCF_004372645.1.fna...\nSketching fna/100/GCF_001373655.1.fna...\nSketching fna/100/GCF_001063435.1.fna...\nSketching fna/100/GCF_000506805.1.fna...\nSketching fna/100/GCF_003836165.1.fna...\nSketching fna/100/GCF_900455405.1.fna...\nSketching fna/100/GCF_000793365.1.fna...\nSketching fna/100/GCF_003834585.1.fna...\nSketching fna/100/GCF_001023775.1.fna...\nSketching fna/100/GCF_013169305.1.fna...\nSketching fna/100/GCF_900637045.1.fna...\nSketching fna/100/GCF_013625685.1.fna...\nSketching fna/100/GCF_001451125.1.fna...\nSketching fna/100/GCF_013178575.1.fna...\nSketching fna/100/GCF_002201295.1.fna...\nSketching fna/100/GCF_003412155.1.fna...\nSketching fna/100/GCF_003631845.1.fna...\nSketching fna/100/GCF_006704975.1.fna...\nSketching fna/100/GCF_000817865.1.fna...\nSketching fna/100/GCF_001414105.1.fna...\nSketching fna/100/GCF_006704475.1.fna...\nSketching fna/100/GCF_003835445.1.fna...\nSketching fna/100/GCF_001034855.1.fna...\nSketching fna/100/GCF_000795085.1.fna...\nSketching fna/100/GCF_000348745.1.fna...\nSketching fna/100/GCF_014204425.1.fna...\nSketching fna/100/GCF_000791705.1.fna...\nSketching fna/100/GCF_000796125.1.fna...\nSketching fna/100/GCA_009995625.1.fna...\nSketching fna/100/GCF_000481925.1.fna...\nSketching fna/100/GCF_900147865.1.fna...\nSketching fna/100/GCF_900144525.1.fna...\nSketching fna/100/GCF_003957095.1.fna...\nSketching fna/100/GCF_001037165.1.fna...\nSketching fna/100/GCF_001451255.1.fna...\nSketching fna/100/GCF_000795945.1.fna...\nSketching fna/100/GCF_000796365.1.fna...\nSketching fna/100/GCA_009996055.1.fna...\nSketching fna/100/GCF_003840555.1.fna...\nSketching fna/100/GCF_900147075.1.fna...\nSketching fna/100/GCF_003973815.1.fna...\nSketching fna/100/GCF_900144735.1.fna...\nSketching fna/100/GCF_000793045.1.fna...\nSketching fna/100/GCF_000790685.1.fna...\nSketching fna/100/GCF_900707695.1.fna...\nSketching fna/100/GCF_001554935.1.fna...\nSketching fna/100/GCF_001375475.1.fna...\nSketching fna/100/GCF_001451975.1.fna...\nSketching fna/100/GCF_002136005.1.fna...\nSketching fna/100/GCF_002135795.1.fna...\nSketching fna/100/GCF_001373875.1.fna...\nSketching fna/100/GCF_900707045.1.fna...\nSketching fna/100/GCF_003798145.1.fna...\nSketching fna/100/GCF_001837545.1.fna...\nSketching fna/100/GCF_002406265.1.fna...\nSketching fna/100/GCF_003833395.1.fna...\nSketching fna/100/GCF_000796505.1.fna...\nSketching fna/100/GCF_013620385.1.fna...\nSketching fna/100/GCF_004372905.1.fna...\nSketching fna/100/GCF_004371145.1.fna...\nSketching fna/100/GCF_001035945.1.fna...\nSketching fna/100/GCF_002285355.1.fna...\nSketching fna/100/GCF_009299585.1.fna...\nSketching fna/100/GCF_003973785.1.fna...\nSketching fna/100/GCF_002330595.1.fna...\nSketching fna/100/GCF_004370835.1.fna...\nSketching fna/100/GCF_003834885.1.fna...\nSketching fna/100/GCF_002330275.1.fna...\nSketching fna/100/GCF_000796825.1.fna...\nSketching fna/100/GCF_000791605.1.fna...\nSketching fna/100/GCF_001037055.1.fna...\nSketching fna/100/GCF_001554625.1.fna...\nSketching fna/100/GCF_003321505.1.fna...\nSketching fna/100/GCF_003975435.1.fna...\nSketching fna/100/GCF_003410695.2.fna...\nSketching fna/100/GCF_000797085.1.fna...\nSketching fna/100/GCF_004375535.1.fna...\nSketching fna/100/GCF_001181525.1.fna...\nSketching fna/100/GCF_008579445.1.fna...\nSketching fna/100/GCF_000520175.1.fna...\nSketching fna/100/GCF_003969635.1.fna...\nSketching fna/100/GCF_003835665.1.fna...\nSketching fna/100/GCF_003837285.1.fna...\nSketching fna/100/GCF_004351715.1.fna...\nWriting to maast/100/temp/mash/100/mash_sketch.msh...\n"[calculating mash distance]: start b'' b"mash: Relink /global/u1/s/snayfach/.conda/envs/maast/bin/../lib/./libgfortran.so.5' with /lib64/librt.so.1' for IFUNC symbol clock_gettime'\n"[cut mash distance: 0.05]: start
b''
b''[clustering] start
[clustering] done
[clustering] 96 genomes have been included in clusters
[Searching lower cap]
[clustering] start
[clustering] done
[clustering] 33 genomes have been included in clusters
0.002: 77 tag genomes
[clustering] start
[clustering] done
[clustering] 12 genomes have been included in clusters
0.0002: 93 tag genomes
[clustering] start
[clustering] done
[clustering] 2 genomes have been included in clusters
2e-05: 100 tag genomes
[End earching]
[Searching optimal d-cut]
[Searching optimal d-cut]
[clustering] start
[clustering] done
fna/100/GCF_001554935.1.fna
Running mummer4; start
reference genome path: fna/100/GCF_001554935.1.fna
[paired alignment]: start
[paired alignment]: done
GCF_001554935.1 - GCF_900145835.1
GCF_001554935.1 - GCF_003834195.1
GCF_001554935.1 - GCF_003974345.1
GCF_001554935.1 - GCF_013169255.1
GCF_001554935.1 - GCF_000795535.1
GCF_001554935.1 - GCF_000480555.1
GCF_001554935.1 - GCF_000481005.1
GCF_001554935.1 - GCF_002330005.1
GCF_001554935.1 - GCF_002135995.1
GCF_001554935.1 - GCF_000629445.1
GCF_001554935.1 - GCF_001836415.1
GCF_001554935.1 - GCF_001181325.1
GCF_001554935.1 - GCF_001035645.1
GCF_001554935.1 - GCF_003936385.1
GCF_001554935.1 - GCF_900147275.1
GCF_001554935.1 - GCF_003631075.1
GCF_001554935.1 - GCF_004373425.1
GCF_001554935.1 - GCF_004372645.1
GCF_001554935.1 - GCF_001373655.1
GCF_001554935.1 - GCF_001063435.1
GCF_001554935.1 - GCF_000506805.1
GCF_001554935.1 - GCF_003836165.1
GCF_001554935.1 - GCF_900455405.1
GCF_001554935.1 - GCF_000793365.1
GCF_001554935.1 - GCF_003834585.1
GCF_001554935.1 - GCF_001023775.1
GCF_001554935.1 - GCF_013169305.1
GCF_001554935.1 - GCF_900637045.1
GCF_001554935.1 - GCF_013625685.1
GCF_001554935.1 - GCF_001451125.1
GCF_001554935.1 - GCF_013178575.1
GCF_001554935.1 - GCF_002201295.1
GCF_001554935.1 - GCF_003412155.1
GCF_001554935.1 - GCF_003631845.1
GCF_001554935.1 - GCF_006704975.1
GCF_001554935.1 - GCF_000817865.1
GCF_001554935.1 - GCF_001414105.1
GCF_001554935.1 - GCF_006704475.1
GCF_001554935.1 - GCF_003835445.1
GCF_001554935.1 - GCF_001034855.1
GCF_001554935.1 - GCF_000795085.1
GCF_001554935.1 - GCF_000348745.1
GCF_001554935.1 - GCF_014204425.1
GCF_001554935.1 - GCF_000791705.1
GCF_001554935.1 - GCF_000796125.1
GCF_001554935.1 - GCA_009995625.1
GCF_001554935.1 - GCF_000481925.1
GCF_001554935.1 - GCF_900147865.1
GCF_001554935.1 - GCF_900144525.1
GCF_001554935.1 - GCF_003957095.1
GCF_001554935.1 - GCF_001037165.1
GCF_001554935.1 - GCF_001451255.1
GCF_001554935.1 - GCF_000795945.1
GCF_001554935.1 - GCF_000796365.1
GCF_001554935.1 - GCA_009996055.1
GCF_001554935.1 - GCF_003840555.1
GCF_001554935.1 - GCF_900147075.1
GCF_001554935.1 - GCF_003973815.1
GCF_001554935.1 - GCF_900144735.1
GCF_001554935.1 - GCF_000793045.1
GCF_001554935.1 - GCF_000790685.1
GCF_001554935.1 - GCF_900707695.1
GCF_001554935.1 - GCF_001554935.1
GCF_001554935.1 - GCF_001375475.1
GCF_001554935.1 - GCF_001451975.1
GCF_001554935.1 - GCF_002136005.1
GCF_001554935.1 - GCF_002135795.1
GCF_001554935.1 - GCF_001373875.1
GCF_001554935.1 - GCF_900707045.1
GCF_001554935.1 - GCF_003798145.1
GCF_001554935.1 - GCF_001837545.1
GCF_001554935.1 - GCF_002406265.1
GCF_001554935.1 - GCF_003833395.1
GCF_001554935.1 - GCF_000796505.1
GCF_001554935.1 - GCF_013620385.1
GCF_001554935.1 - GCF_004372905.1
GCF_001554935.1 - GCF_004371145.1
GCF_001554935.1 - GCF_001035945.1
GCF_001554935.1 - GCF_002285355.1
GCF_001554935.1 - GCF_009299585.1
GCF_001554935.1 - GCF_003973785.1
GCF_001554935.1 - GCF_002330595.1
GCF_001554935.1 - GCF_004370835.1
GCF_001554935.1 - GCF_003834885.1
GCF_001554935.1 - GCF_002330275.1
GCF_001554935.1 - GCF_000796825.1
GCF_001554935.1 - GCF_000791605.1
GCF_001554935.1 - GCF_001037055.1
GCF_001554935.1 - GCF_001554625.1
GCF_001554935.1 - GCF_003321505.1
GCF_001554935.1 - GCF_003975435.1
GCF_001554935.1 - GCF_003410695.2
GCF_001554935.1 - GCF_000797085.1
GCF_001554935.1 - GCF_004375535.1
GCF_001554935.1 - GCF_001181525.1
GCF_001554935.1 - GCF_008579445.1
GCF_001554935.1 - GCF_000520175.1
GCF_001554935.1 - GCF_003969635.1
GCF_001554935.1 - GCF_003835665.1
GCF_001554935.1 - GCF_003837285.1
GCF_001554935.1 - GCF_004351715.1
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/global/homes/s/snayfach/.conda/envs/maast/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 438, in run_mummer4_single
min_pid_by_delta = auto_min_pid_by_delta(coords_path, max_pid_delta)
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 397, in auto_min_pid_by_delta
avg_pid = sum(pids)/len(pids)
ZeroDivisionError: division by zero
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 1320, in
main()
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 1315, in main
end2end_main(args)
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 1282, in end2end_main
call_snps_main(args)
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 1151, in call_snps_main
run_mummer4(args)
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 487, in run_mummer4
parallel(run_mummer4_single, arg_list, args['threads'])
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 259, in parallel
return [r.get() for r in results]
File "/global/u1/s/snayfach/.conda/envs/maast/bin/bin/Maast.py", line 259, in
return [r.get() for r in results]
File "/global/homes/s/snayfach/.conda/envs/maast/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
ZeroDivisionError: division by zero

I suspect the issue is because Mummer4 is running into errors. Looking in the output maast/100/temp/mummer4/100/aln/ I see that the diff file is missing for 3 of my 101 genomes, but the log file doesn't contain anything useful.

Stephen, thanks for both reporting and tracing the problem! I pushed a fix to address this issue but without testing. Please reopen the issue if the problem still there.


Bump Kafka client version from 3.4.0 to 3.5.1

Why are the changes needed?

Bump Kafka client version from 3.4.0 to 3.5.1
Bump Docker image for Kafka 3 to 3.5.0 (equivalent to Confluent Platform 7.5.x)
https://docs.confluent.io/platform/current/installation/versions-interoperability.html#cp-and-apache-ak-compatibility

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

Was this patch authored or co-authored using generative AI tooling?

No.

I saw at least two times that Spark reverted Kafka upgrading (both are x.y.0, including 3.6.0), let's use a stable version x.y.z while (z >= 1)

Codecov Report

Merging #5486 (af84fe6) into master (03d6223) will not change coverage.
Report is 16 commits behind head on master.
The diff coverage is n/a.

:exclamation: Current head af84fe6 differs from pull request most recent head 017ea86. Consider uploading reports for the commit 017ea86 to get more accurate results

@@          Coverage Diff           @@
##           master   #5486   +/-   ##
======================================
  Coverage    0.00%   0.00%
======================================
  Files         588     588
  Lines       33480   33466   -14
  Branches     4405    4401    -4
======================================
+ Misses      33480   33466   -14

see 2 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

cc @pan3793

Merged to master/1.8


Stardust 0.3.0

[x] Make protocol hashing stable across compilations

Tests are failing due to https://github.com/ogxd/gxhash/issues/57
This must be fixed before releasing this version

Hi @Veritius , you shouldn't have any issue with gxhash 3.0.0. https://github.com/ogxd/gxhash/issues/57 only concerns version 3.1.0


When showUnselectedLabels is false, clicking on certain areas of BottomNavigationBar will give you an error

I encountered this error while debugging locally (debug with my android phone), and the interactive Playground in the official tutorial(web) can easily reproduce the problem.
Steps to Reproduce

To https://api.flutter.dev/flutter/material/BottomNavigationBar-class.html
Edit the first Interactive App.

   ......
      bottomNavigationBar: BottomNavigationBar(
        showUnselectedLabels: false, // Add this line
        items: const <BottomNavigationBarItem>[
   ......

Run it
Click tab item which is unselected, if the clicked area is directly below the icon, an error is reported.

Expected results:
Clicking on this area should jump normally without error.
Actual results:
Got an error and won't jump.

Logs

E/flutter (11663): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 900 pos 12: '!_needsLayout': is not true.

Run it

Hi @Jannchie Thanks for filing the issue, I ran the code sample on the flutter website as well as locally and did not see any issue.
https://user-images.githubusercontent.com/31410839/135258405-510694c1-898e-47b1-bc19-b11abd7040ca.mov

code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

/// This is the main application widget.
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: _title,
      home: MyStatefulWidget(),
    );
  }
}

/// This is the stateful widget that the main application instantiates.
class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({Key? key}) : super(key: key);

  @override
  State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}

/// This is the private State class that goes with MyStatefulWidget.
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  int _selectedIndex = 0;
  static const TextStyle optionStyle =
      TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
  static const List<Widget> _widgetOptions = <Widget>[
    Text(
      'Index 0: Favorites',
      style: optionStyle,
    ),
    Text(
      'Index 1: Music',
      style: optionStyle,
    ),
    Text(
      'Index 2: Places',
      style: optionStyle,
    ),
    Text(
      'Index 3: News',
      style: optionStyle,
    ),
  ];

  void _onItemTapped(int index) {
    setState(() {
      _selectedIndex = index;
    });
  }

  final backgroundColor = Color(0xFF6200EE);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('BottomNavigationBar Sample'),
          backgroundColor: backgroundColor,
        ),
        body: Center(
          child: _widgetOptions.elementAt(_selectedIndex),
        ),
        bottomNavigationBar: BottomNavigationBar(
          type: BottomNavigationBarType.fixed,
          showUnselectedLabels: false,
          backgroundColor: backgroundColor,
          selectedItemColor: Colors.white,
          unselectedItemColor: Colors.white.withOpacity(.60),
          selectedFontSize: 14,
          unselectedFontSize: 14,
          onTap: _onItemTapped,
          currentIndex: _selectedIndex,
          items: const [
            BottomNavigationBarItem(
              label: 'Favorites',
              icon: Icon(Icons.favorite),
            ),
            BottomNavigationBarItem(
              label: 'Music',
              icon: Icon(Icons.music_note),
            ),
            BottomNavigationBarItem(
              label: 'Places',
              icon: Icon(Icons.location_on),
            ),
            BottomNavigationBarItem(
              label: 'News',
              icon: Icon(Icons.library_books),
            ),
          ],
        ));
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.6 20G165 darwin-arm, locale en-GB)
    • Flutter version 2.5.1 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffb2ecea52 (12 days ago), 2021-09-17 15:26:33 -0400
    • Engine revision b3af521a05
    • Dart version 2.14.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 60.1.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.59.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.26.0

[✓] Connected device (3 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • macOS (desktop)           • macos         • darwin-arm64   • macOS 11.6 20G165 darwin-arm
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 94.0.4606.61

• No issues found!

Please share the output of flutter doctor -v along with the minimal and complete code sample to investigate further.

Hi @Jannchie Thanks for filing the issue, I ran the code sample on the flutter website as well as locally and did not see any issue.
Screen.Recording.2021-09-29.at.4.47.59.PM.mov
code sample
flutter doctor -v
Please share the output of flutter doctor -v along with the minimal and complete code sample to investigate further.

I'm not sure, but the click position does matter. Have you tried clicking directly below the icon?  Specifically, where the text appears.

Have you tried clicking right below the icon? Specifically, click where the text appears.

@Jannchie I tried seems to be working as expected.
https://user-images.githubusercontent.com/31410839/135390208-58e0a51d-eb3e-428b-9ebb-6d1bd40d8bd7.mov
Please share flutter doctor -v and on which platform / device are you experiencing the issue?

Logs
$ flutter doctor -v
[√] Flutter (Channel stable, 2.5.1, on Microsoft Windows [Version 10.0.22463.1000], locale zh-CN)
    • Flutter version 2.5.1 at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffb2ecea52 (12 days ago), 2021-09-17 15:26:33 -0400
    • Engine revision b3af521a05
    • Dart version 2.14.2

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\Jannchie\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version openjdk version "11.0.10" 2021-01-19

[√] VS Code (version 1.60.2)
    • VS Code at C:\Users\Jannchie\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.26.0

[√] Connected device (3 available)
    • PAFM00 (mobile) • 54caf093 • android-arm64  • Android 10 (API 29)
    • Chrome (web)    • chrome   • web-javascript • Google Chrome 94.0.4606.61
    • Edge (web)      • edge     • web-javascript • Microsoft Edge 94.0.992.31

! Doctor found issues in 1 category.

@maheshmnj Thanks for the quick reply!
I feel that this is not a problem with my local environment, as the online example can also be reproduced.
I also made a DartPad to reproduce this problem:
https://dartpad.dev/?id=dcf8d4f1d1e346bea4ce2b30b9264067&null_safety=true
It based on Flutter 2.5.1 Dart SDK 2.14.2
By the way, I'm using win11 insider priview..

Well, I cannot reproduce this problem on my Mac...

From the logs it looks like a duplicate of https://github.com/flutter/flutter/issues/85108

Thanks for the info @Jannchie, I can reproduce the issue on stable 2.5.1 and the master 2.6.0-12.0.pre.136 clicking on the unselected label the exception is thrown
https://user-images.githubusercontent.com/31410839/135418206-543c6ce9-0252-479c-af96-c4a1c5b5b4a0.mov

flutter doctor -v
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.6 20G165 darwin-arm, locale en-GB)
    • Flutter version 2.5.1 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffb2ecea52 (13 days ago), 2021-09-17 15:26:33 -0400
    • Engine revision b3af521a05
    • Dart version 2.14.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.0, Build version 13A233
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 60.1.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.59.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.26.0

[✓] Connected device (4 available)
    • sdk gphone arm64 (mobile) • emulator-5554                        • android-arm64  • Android 11 (API 30)
      (emulator)
    • iPhone X (mobile)         • B6C32C16-12A3-4613-9ADF-8C521ACD6302 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)
    • macOS (desktop)           • macos                                • darwin-arm64   • macOS 11.6 20G165
      darwin-arm
    • Chrome (web)              • chrome                               • web-javascript • Google Chrome
      94.0.4606.61

• No issues found!

[✓] Flutter (Channel master, 2.6.0-12.0.pre.136, on macOS 11.6 20G165 darwin-arm, locale en-GB)
    • Flutter version 2.6.0-12.0.pre.136 at /Users/mahesh/Documents/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision aaa14b8004 (22 hours ago), 2021-09-29 06:03:04 -0400
    • Engine revision bccb3a57eb
    • Dart version 2.15.0 (build 2.15.0-156.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 60.1.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.59.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.26.0

[✓] Connected device (4 available)
    • sdk gphone arm64 (mobile) • emulator-5554                        • android-arm64  • Android 11 (API 30)
      (emulator)
    • iPhone X (mobile)         • B6C32C16-12A3-4613-9ADF-8C521ACD6302 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)
    • macOS (desktop)           • macos                                • darwin-arm64   • macOS 11.6 20G165
      darwin-arm
    • Chrome (web)              • chrome                               • web-javascript • Google Chrome
      94.0.4606.61

• No issues found!

logs
Launching lib/main.dart on sdk gphone arm64 in debug mode...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.7.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.8.4+1/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-2.0.10/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-2.0.10/android/src/main/java/io/flutter/plugins/googlemaps/TileProviderController.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.5.3/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/mahesh/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-2.5.3/android/src/main/java/io/flutter/plugins/firebase/firestore/streamhandler/TransactionStreamHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
W/FlutterActivityAndFragmentDelegate(18053): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Connecting to VM Service at ws://<IP_ADDRESS>:65076/91DR2G352_I=/ws
E/flutter (18053): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter/src/painting/text_painter.dart': Failed assertion: line 900 pos 12: '!_needsLayout': is not true.


Avoid cancel when mic closed + update node to v10

It appears that AoG has changed how it behaves when given input outside
of the action. Previously it would ignore that input and leave the
conversation closed. Now it appears to open a new conversation which
confuses the tests.
Consequently, always saying "cancel" after every test will cause
problems when there are multiple tests in a single file.
This PR detects when the mic is closed and skips saying "cancel" if so.
Another change that appears to have happened to AoG is that the
debug_info content is no longer being returned. This means that much
of the content (including the previous flag for the microphone being
closed!) is no longer available.
This PR grabs the microphone_mode value from the dialog_state_out
which is still returned to discover if the mic has been closed.
Additional changes in this PR
Added a prepare lifecycle step to package.json so that the project
can be used as a dependency straight from a github branch.
Updated node to v10 and typescript output to ES2017 to match -- node 8
is now deprecated and node 10 is the minimum LTS. Completely understand
if you want to do the node update as a separate PR.

Can this be broken into two smaller commits?

Sure

https://github.com/actions-on-google/actions-on-google-testing-nodejs/pull/51
https://github.com/actions-on-google/actions-on-google-testing-nodejs/pull/52

I've left the package.json "prepare" lifecycle on both so I can still use the branches in my dependencies - hope that's ok!


feat(config): add smart-ret for corfu

Hi. This re-adds that change where RET will quit Corfu and pass-through if no candidate is selected. It's particularly ergonomic if you set a small corfu-auto-delay because then Corfu is popping up constantly as you type and you keep having to type RET twice.

Hi. Just before merging, does it make sense to gate this addition behind +tng? For the opposite case, it feels strange to do this, since it's the only way we can confirm, but +tng has TAB to just insert. Also, how would unbinding RET compare in ergonomics? Do you use it in addition to TAB or is it just a bother?

Hi. Just before merging, does it make sense to gate this addition behind +tng? For the opposite case, it feels strange to do this, since it's the only way we can confirm, but +tng has TAB to just insert. Also, how would unbinding RET compare in ergonomics? Do you use it in addition to TAB or is it just a bother?

Even if you use +tng, you need RET for some backends like yasnippet-capf. I think it's a good default because the completion popup should not affect your ordinary typing if you're not using. It can maybe go under a +corfu-want-smart-RET variable.

Made it optional and moved the orderless separator config outside of the (use-package! corfu ...) block.

I just realized this DWIM-style return option is in

First, sorry for the wait. College can be very consuming from time to time.
I really like 99% of the changes here, and thank you for putting this much effort in, but the smart-ret commit still feels slightly strange to me. To check if I understand the purpose: when typing, you are bothered by the fact that completion can popup anywhere and prevent you from (for instance) breaking a line. Now, there is something to note here: when you type RET and have this issue, does Corfu insert the completion or just quit? The variable corfu-preselect controls this indirectly. When set to prompt, it should just quit, and that's the behavior of +tng currently. I use non-+tng, so in this situation, the first candidate is preselected, therefore I get what I expect, a completion and no newline. If I had the prompt preselected, however, I'd expect the newline to be inserted. Does this check out with you? If yes, I believe it may be worth asking @minad if there's already a way to do this, or whether this could be implemented directly in Corfu. For reference, something like the following, maybe as an alternate insert function:
(defun corfu-insert (&optional prefix) ;; Either replace or implement as alternative
  "Insert current candidate.
Quit if no candidate is selected.

If no candidate is selected and PREFIX is non-nil, check the key vector that
caused this command to be called and look it up after the popup quits. If bound,
call that binding."
  (interactive "p")
  (if (>= corfu--index 0)
      (corfu--insert 'finished)
    (corfu-quit)
    (when-let ((prefix)
               (cmd (keymap-lookup nil (key-description (this-command-keys-vector)))))
      (call-interactively cmd))))

When bound to RET, for instance, this passes-through to the newline if prompt is selected (or quits the minibuffer without completing, if it is active). When a candidate is chosen via other bindings or via corfu-preselect, it only inserts the candidate.
I think this is general enough to implement directly in Corfu, and could facilitate its use in the minibuffer as well. It becomes unobtrusive when corfu-preselect is prompt, which maybe we should make the default for non-+tng as well. Thus, it would make the whole RET vs. C-RET vs. S-RET thing unnecessary. Also seems cleaner to me than the current menu-item approach.
For Daniel, I can PR such a change if you accept it.

@LuigiPiucco It is not clear what the ideal "smart" RET behavior looks like. I think it is even good to disable RET (except in shells) as I've documented in https://github.com/minad/corfu?tab=readme-ov-file#tab-only-completion. This is what I use right now.

@LuigiPiucco It is not clear what the ideal "smart" RET behavior looks like. I think it is even good to disable RET (except in shells) as I've documented in https://github.com/minad/corfu?tab=readme-ov-file#tab-only-completion. This is what I use right now.

I see. Just to make sure, you think implementing more alternatives in base Corfu (corfu-insert, corfu-insert-or-passthrough and leaving RET for the user to bind/unbind) doesn't bring value, also?
I'll wait for @LemonBreezes's opinion before proceeding. Did I at least understand correctly what is being fixed here? Maybe I'm overcomplicating things.

I see. Just to make sure, you think implementing more alternatives in base Corfu (corfu-insert, corfu-insert-or-passthrough and leaving RET for the user to bind/unbind) doesn't bring value, also?

Not right now. I don't want to increase the number of usage variants. There are already plenty of possibilities.
Also I think it would be good to focus on getting the PR merged instead of figuring out details such that Corfu becomes available to a wider user base. This way you may also get additional feedback.

First, sorry for the wait. College can be very consuming from time to time.
I really like 99% of the changes here, and thank you for putting this much effort in, but the smart-ret commit still feels slightly strange to me. To check if I understand the purpose: when typing, you are bothered by the fact that completion can popup anywhere and prevent you from (for instance) breaking a line. Now, there is something to note here: when you type RET and have this issue, does Corfu insert the completion or just quit? The variable corfu-preselect controls this indirectly. When set to prompt, it should just quit, and that's the behavior of +tng currently. I use non-+tng, so in this situation, the first candidate is preselected, therefore I get what I expect, a completion and no newline. If I had the prompt preselected, however, I'd expect the newline to be inserted. Does this check out with you? If yes, I believe it may be worth asking @minad if there's already a way to do this, or whether this could be implemented directly in Corfu. For reference, something like the following, maybe as an alternate insert function:
(defun corfu-insert (&optional prefix) ;; Either replace or implement as alternative
  "Insert current candidate.
Quit if no candidate is selected.

If no candidate is selected and PREFIX is non-nil, check the key vector that
caused this command to be called and look it up after the popup quits. If bound,
call that binding."
  (interactive "p")
  (if (>= corfu--index 0)
      (corfu--insert 'finished)
    (corfu-quit)
    (when-let ((prefix)
               (cmd (keymap-lookup nil (key-description (this-command-keys-vector)))))
      (call-interactively cmd))))

When bound to RET, for instance, this passes-through to the newline if prompt is selected (or quits the minibuffer without completing, if it is active). When a candidate is chosen via other bindings or via corfu-preselect, it only inserts the candidate.
I think this is general enough to implement directly in Corfu, and could facilitate its use in the minibuffer as well. It becomes unobtrusive when corfu-preselect is prompt, which maybe we should make the default for non-+tng as well. Thus, it would make the whole RET vs. C-RET vs. S-RET thing unnecessary. Also seems cleaner to me than the current menu-item approach.
For Daniel, I can PR such a change if you accept it.

Making a command like that which calls other commands with keymap-lookup is generally a bad idea. The reason is that it does not take into account overriding-terminal-local-map, key-translation-map, <return> commands falling back to RET, etc. To implement the full keymap lookup logic in Elisp would be extremely difficult. There are two currently suggested ways to do this (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66755):

Using the :filter menu-item.
Take this-single-command-raw-keys and push it back on unread-command-events.

Of these, 1. is the most robust and efficient. We can add a +corfu-want-smart-RET variable. I think that is okay. I might make another smaller PR this weekend.

Ok, I probably was overcomplicating things. I will use the menu-item based implementation of this. Also, I think it could be good to allow the user to enable features individually, rather than just +tng vs. not. I'll push a prototype later, that hopefully is ok for all of us. If not, it will be in the form of additional commits, so we can rebase them out.