Initial implementation of OSC 7

Summary of the Pull Request
This is a very early implementation of OSC 7 in WIndows Terminal

References

PR Checklist

[X] Closes #3158
[X] CLA signed. If not, go over here and sign the CLA
[ ] Tests added/passed
[ ] Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
[ ] Schema updated.
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

I'll add the explanation here to make the PR description clean.
So I've went over basically every comments in #3158 . As a daily terminal users and former contributor of this repo, I understand most of the struggles from both the terminal users' side and WT developers' side. I decided to come up with a minimal, reliable and working approach, by adding the following constraints:

Terminal does not probe the shell process running inside, like ever.
OSC 7 handling is strictly isolated between different profiles.
Terminal does not probe the type of the profile being used. I know that "source" being Windows.Terminal.Wsl is a strong sign that indicates the profile is a WSL one. But no. Don't do this.
Terminal does not probe the type of the actual URI passed in by OSC 7. I know there's way to determine whether a URI is likely to be a Windows one or Linux one. But no. Don't do this.

With this constraints, I managed to make this PR. It's very simple. See for yourself. The diff contains merely 100 lines. To be honest I don't think it will be a very large PR even after polished, assuming that this approach is approved by the Console team and the community in the end.
I really hope that this particular PR itself can fully fixes #3158. However, with the terminal doing only the very basic stuff, the burden moves to the shells. I've managed to make both PowerShell and Bash/Zsh on WSL working. But I'm out of luck with CMD and Git Bash because I could not find a way to produce the correct sequences. I've searched many things before I could made a working script. Due to possible licensing issue, I'll link my scripts below and assume that it will not be included in this repo:

PowerShell OSC 7 Gist
Bash/Zsh on WSL OSC 7 Gist

There's several issues remaining to be discussed/solved:

CMD/Git Bash/etc not working. Some of them may not be possible
Shells other than Bash/Zsh not tested.
Tab with multi-pane is not handled. I'm not a multi-pane user so I'm not sure what the expected behaviour is.
When there are more than one tab (same profile) calling OSC 7, which URI should be used? And when should the URI be cleared?

Aside from the known issues and other possible caveats, I'm having a blast with this. Duplicate Tab does exactly what you think it should do. The working directory is being successfully transferred between old tabs and new tabs. When using WSL in WT, it just reminds you of a normal Linux terminal. No hassle. No pain. Nothing.
Thanks everyone's participation in #3158 . Now let's see where this will take us.

Pure SSH profile does not work. It straight up ignores the current directory setting.

I think it's kinda important to get this one working. If I have a tab open where I have used ssh to connect to a host and I want to duplicate that session on another tab, we need to get this working. It should allow for a password prompt (because of ssh.exe)  if you don't have an ssh key or you configured a password on your ssh key but if you do have a password-less ssh key (the most common scenario), this should be a seamless experience.

cmd OSC7

I feel that it may require some modification in the OpenSSH-Win32 itself

If that is the case, I hope you could provide them with the needed info to get it working and/or provide them a PR to address the issue.

Pure SSH profile does not work. It straight up ignores the current directory setting. (@skyline75489)

I think it's kinda important to get this one working. (@WSLUser)

I'm not exaggerating when I say this. Do not interpret this as a joke or as hyperbole.
This is impossible in the general case.
Unless you wish for Windows Terminal to take a dependency on the exact remote shell in use (you do not), you cannot propagate the working directory over ssh. There is no protocol feature in ssh--specifically, the part that handles remoting ptys and launching shells--that supports transmitting a working directory.

I think @zadjii-msft's approach of using the current control's working directory would allow removing the strict profile isolation. This would be nice, because as well as "duplicate tab", the other use-case I have for this functionality would be start a "git bash" session in the same directory my current PowerShell session is in. I'd be fine if this was a non-default behaviour for 'New tab for Profile X' (Ctrl-Shift-Alt-3 would still be faster than Ctrl-Shift-3, beat, cd /d/project/repos/whateverIhappenedToBeWorkingOn as I do often enough now).

Git bash does not recognize VT control sequences in WT the same way as it does in its own mintty. I don’t have a clue why. Theoretically it should work just fine if the control sequences can be generated.

Git bash does not recognize VT control sequences

Cygwin versions < 3.1 (and therefore msys versions based on them) did not support ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows 10+, even though it's been out for 5 years.
They implemented their own VT parser.

After my experiments so far, there’s only one thing stopping me from lifting the same profile constraint - CMD can not recognize UNC path (\wsl$) generated by WSL CMD will fall back to c:\somewhere I don’t remember. Aside from this, I’m OK with cross profile OSC 7 handling. As i mentioned in other comment, as long as the URI is strictly Windows-specific, all shells that respond to CWD setting should work (again not sure if Git bash works).

Git for Windows 2.27 upgraded to a Cygwin 3.1-based MSYS2.

This release comes with a Git Bash that optionally uses Windows-native pseudo consoles.

It's off by default, but unless running the installer in silent mode, it should prompt to enable it during install/upgrade.
I thought I had told Git for Windows to notify me of updates, but I was still using 2.24.0, and hadn't thought to go check for an update manually until now.

CMD wouldn't work with any UNC patch, without using pushd to get a temporary drive letter for it. So I don't think that's a problem for Windows Terminal here, and more than it would be a WT problem if one of the user's shells is configured to ignore the working directory and immediately cd somewhere else. Or... was a remote shell that couldn't rationally honour the working directory.

Now that I've had a chance to see how this is working, I'm afraid I wouldn't consider it an acceptable solution. It may solve the problem of opening a new tab in the current directory, but it's not a standard OSC 7 implementation (at least as I understand it).
If a Linux shell has built-in support for OSC 7, and my current directory is /home/james, then the uri it's going to set will be something like file://localhost/home/james, and definitely not file://\\\\wsl$\Ubuntu/home/james. If we only understand the latter, and not the former, then we don't support OSC 7.
Similarly, if I have manually setup my shell to use a uri of the form \\wsl$\Ubuntu\... to get it to work in Windows Terminal, then that likely means it will no longer work in other terminals that actually support the standard path syntax. We've essentially taken over an existing sequence and repurposed it in a way that breaks other software - that's not good.
Bottom line: if we can't support OSC 7 in a standard way, then I think we shouldn't be using it, and should just come up with our own proprietary sequence.

I thought about the difference between my current implementation and the standard. Here's my two cents.
First when OSC 7 was first seen on Terminal.app, it's more like a proprietary escape code that for macOS exclusively. When terminal-wg decided to finalize a standard, they chose to use the Freedesktop file URI spec
. This is a deviation from the Terminal.app one, even though in practice the difference should not really matter. The thing is, people would naturally expect things to work exactly the same between local macOS/Linux machine and remote Linux machines. That's of course because they're all *nix after all. So everything is good.
But here with WIndows Terminal that's not the case. Windows and *nix are fundamentally and historically different in so many ways. I don't think people would actually expect things to work exactly the same way between a local Windows machine and remote Linux machines. So I thinks it's perfectly OK to "have manually setup my shell to use a uri of the form \wsl$\Ubuntu... to get it to work in Windows Terminal, then that likely means it will no longer work in other terminals that actually support the standard path syntax". Because WSL is not and never will be a "real" Linux environment. Same for PowerShell/Git Bash/CMD/etc. The Windows Terminal & related shell environment are born different from the outside *nix world. I don't like it, but it's the world we live in.
Point is, the OSC 7 in WT and related shell environments are destined to be exclusively working on Windows OS only. And I don't think people would be frustrated about it. The beauty of OSC 7 is, I think, that the methodology itself is platform-independent. That does not necessarily mean the actual implementation should be platform-independent. At least on Windows I don't see that's possible.

Because WSL is not and never will be a "real" Linux environment.

I don't think that's an accurate statement. Support for GUI Linux apps running on WSL is definitely on the roadmap. Once that's the case, you could be running Gnome Terminal and Windows Terminal side by side accessing the same WSL subsystem.
But even ignoring that, there are already third party terminals (like Mintty) that can connect to WSL, and that support the standard OSC 7 sequence. If we encourage people to ignore that standard and use a proprietary WT syntax instead, that will end up breaking the functionality in other terminals. This is exactly what Microsoft did with Internet Explorer back when it was the dominant browser, and that did not go down well.
If you don't want to follow the standard, that's fine - just invent your own sequence instead. There is absolutely no reason to use OSC 7 in an incompatible way unless you're deliberately trying to break other software.

Honestly I can’t say that being compatible with current OSC 7 standard is technically not possible. Move the path handling logic from the zshrc to WT, find a way to detect WSL profile, put them together and it should work the same. It’s just I don’t really want this kind of “dirty” logic inside WT, just from my point of view.
I don’t make the call here. And I’m willing to hear from everyone. So yeah. Not following the standard outside is not ideal, I admit.

I feel that "detect that it was WSL, identify which instance, and turn that WSL instance-internal /path into //wsl$/<instanceName>/path" is going to be only marginally less-awful than "Just scan the various possible CWD internal objects in the process control block", and hence not a reasonable result.
I agree that we should support a standard OSC 7, not introduce a new variant.
That said, I'd be curious to know how mintty running on Windows would handle OSC 7 from WSL, whether it expects OSC 7 file://hostname/home/myaccount/, or if it would expect OSC 7 file://wsl$/Ubuntu/home/myaccount.
If it's the latter, we already need OSC 7 to report Windows-resolvable file:// URLs. If it's the former, it can't possibly use that URL, since it isn't itself running in the WSL environment.
In the way OSC 7 has been described and implemented in Terminal.app and terminal-wg, at least, it assumes the file:// URL is sensible for where the shell is running, and the shell doesn't know where the terminal is running, so it can't be expected to adjust the file:// URL to suit it, e.g. it won't contain wsl$ as the hostname or have the WSL distribution name prepended as the first path segment, which is what would be needed for a 'windows-local' file:// URL.
Which means that OSC 7 for WSL is only slightly more rational than OSC 7 for ssh: Useful for showing in a titlebar, for example, but you can't carry it between sessions without much more intrusive logic to transform the 'remote' URL into a 'local' URL, and apply it. The only difference is that WSL has a feasible 'apply it', but the 'transform it' step is still going to be a sticking point.

Ok let me sort this out. First, if we are going to support OSC 7 strictly by standard, there has to be some kind of transformation applied to the URI to make it Window-local friendly, so that WT can use it without too much hassle. Second, using wsl$\ubuntu instead of localhost will damage other terminals who assume they’ll receive “localhost”.
Honestly I’m OK with tweaking the zshrc to check if there’s WT_SESSION and change the HOSTNAME accordingly. It’s a WSL specific thing but with the check it will not break other software. If we insist to make it working “out of the box”, that is without changing anything to WSL specific, we are back to the dilemma discussed before.

there has to be some kind of transformation applied to the URI to make it Window-local friendly

Just to be clear, this transformation has to happen in the terminal itself, and not in the shell. Remember that some shells and applications will have the OSC 7 functionality built in, so Windows Terminal needs to understand whatever syntax they send to us - we're not necessarily going to have any control of the format.

using wsl$\ubuntu instead of localhost

Note that the wsl$\ubuntu portion of a WSL URI is not the host name - it's the start of a UNC path. A correctly formatted URI with a UNC path would be something like file://localhost/\\wsl$\Ubuntu\home. With the backslashes replaced, it would be file://localhost///wsl$/Ubuntu/home or file://///wsl$/Ubuntu/home without the hostname. You can get away with dropping some slashes, but that's the canonical format as far as I'm aware.
That said, this shouldn't be a concern to us when parsing a standard WSL path, but it could be something we need to handle in a cmd or powershell profile. Ideally we'd be using a URI library for the parsing, though, so it's probably best handled in the dispatch class (which would have access to the Foundation libraries) rather than the state machine.

I've updated the PR and related gists accordingly. The spec is now following file://hostname/path. But the hostname is filtered out before being passed to workingDirectory. This way we are not breaking compatibility with other OSC implementations.
Thanks to @LuanVSO, CMD OSC 7 now works. Thanks to @TBBle , Git bash with VT enabled also works. Remaining things that do not work:

UNC paths are not recognized by CMD and will fallback to C:\Windows.
Pure MSYS paths are not recognized by other shells.

Thanks @j4james for the profound insights.

A correctly formatted URI with a UNC path would be something like file://localhost/\\wsl$\Ubuntu\home.

That's not what I'm getting from Wikipedia (which references back to an MSDN blog post from 2006), nor from testing in Chrome, they both agree a correctly-formatted file:// URL for a UNC path looks like file://wsl$/Ubuntu/home.
Wikipedia lists file:////wsl$/Ubuntu/home as a possible legacy format, but the blog post source for that is gone, although it's presumably still on the Wayback machine if that matters. Chrome accepted that, but not file://localhost//wsl$/Ubuntu/home.

The native Windows file:// URI does not work for CWD setting, making it kinda useless in this situation. So my approach is using only the path in the terminal-wg spec. Like I said in other comments,  I failed to find a good use for HOSTNAME in the Windows environment. I feel like I’m stealing the Freedesktop URI format and use it in a Windows-specific way. But I’m following the spec faithfully, at least on the interface side.

That's not what I'm getting from Wikipedia (which references back to an MSDN blog post from 2006), nor from testing in Chrome, they both agree a correctly-formatted ("healthy") file:// URL for a UNC path looks like file://wsl$/Ubuntu/home.

Chrome is kind of the odd one out on this. IE, Edge (the original), Firefox, cmd.exe (using start), and Windows Explorer all accept the formats I mentioned. Chrome does actually support the last of the three, though, and that's what Firefox considers canonical (i.e. it reformats the others to that). What I was trying to show with the file://localhost/\\wsl$\Ubuntu\home syntax was where the 5 slashes come from, and where the hostname would fit if you needed to include it.
It's interesting that the MSDN blog post is claiming 2 slashes as the correct format, though. It makes sense for a network share, but not so much for any other UNC path. And there's no way to use that format to indicate that you're referring to a UNC path (that isn't a network share) on a different machine.
But ignoring UNC paths for the moment, in a WSL shell the requirements are simple. We need to support whatever format the other Linux and macOS terminals support, and the format that existing shells generate, and that's essentially file://$HOSTNAME$PWD (with appropriate escaping). When it comes to Windows shells, we've probably got more leeway to decide the format ourselves, but it makes sense to follow the same pattern. So in a cmd shell I'd expect something like file://%USERDOMAIN%/$p (using prompt syntax).
In both those cases UNC paths shouldn't really be an issue (they're not going to show up in a Linux $PWD and can't be used as the current directory in a cmd shell). So the only place we'd really need to worry about them is in powershell, and even then that's probably an edge case we can ignore if it's problematic.

I failed to find a good use for HOSTNAME in the Windows environment.

The point of the host name is to distinguish between a path on a remote machine (which should be ignored) and a local one (which should be useable as the start path for the new tab). I don't think it's essential that we perform that validation - I'm not certain whether other terminals bother - but that's what the hostname is there for.
I'm not sure why you think it wouldn't be applicable in Windows, but I assumed we'd just look for a match between the given hostname and one or more of the GetComputerNameEx names.

Firefox canonicalises to a different format that IE and Explorer canonicalise to. Deliberately so, according to that Firefox bug I linked, because the Firefox developers didn't like the way that Windows defined the file:// URL. In a UNC path, the first thing after \\ is the hostname, so \\hostname\... => file://hostname/... is the most obvious transform.
It just so happens that non-Windows platforms can't usually do anything with that hostname, except filter the request, while Windows has a default mechanism for accessing remote machines through local (UNC) paths, and uses it for file:// URLs.
As noted, the underlying Windows handler (urlmon, I think?) can also deal with a file:// URL of file://localhost///hostname/..., but that seems a weird choice to canonicalise to, because now we're packing a hostname into the path, and just hard-coding "localhost" into the hostname. And from my brief testing, this "legacy" format only works with literal file://localhost/ or literal file:///, which matches this clause from the RFC:

As a special case,  can be the string "localhost" or the empty string; this is interpreted as `the machine from which the URL is being interpreted'.

Windows Explorer (at least) implements this rule as: file://localhost/... or file:///... turns into ... as a DOS-type path, while any other file://somehost/... turns into a UNC path //somehost/....
If that DOS-type path turns out to be a UNC path, it gets treated as a UNC path. I'm not sure if this is the URL handler, or the thing that the DOS-type path was passed to.
Anyway, this is why file:///C: and file://localhost/C: work, but file://<myhostname>/C: does not.
A shell sending OSC 7 per the terminal-wg spec, which specifies the Freedesktop file URL spec, will not generate file://localhost/..., because the Freedesktop file URL spec specifies the hostname in the file:// URL should be either empty, or gethostname(). Unless of course gethostbyname() returns localhost, but that's hopefully very rare, and this isn't the only issue you'd see with that.
As mentioned, both Terminal.app and terminal-wg specify the file:/// is intended for identifying remote sessions, so I would have expected (but have not checked) that shell implementations that generate OSC 7 commands would have been using gethostbyname() more often than not.
Anyway, how to generate the URL is not the main issue for Windows Terminal, it's how to parse it. Ideally, we want to receive URLs that are already in the right format to just pass through urlmon or similar, and get back a UNC or filesystem path.
To get everything interoperating well, we need to handle (off hand):

Paths from CMD, which are going to need to be file://localhost/$CWD, because CMD only knows DOS paths.
Paths from cygwin-based systems, e.g., Git Bash or MSYS2), which I believe can only see DOS paths, and can convert from cygwin paths using cygpath --windows ${PWD}, and then it looks just like CMD, above.
Paths from PowerShell, which could be DOS path or UNC path. PowerShell can tell these apart, because $executionContext.SessionState.Path.CurrentLocation knows if it's on a 'Drive' or not, so this can easily do different things for either type of path.
Paths from WSL, which from within the WSL session are Unix paths, and have two major mappings:
** /mnt/X/... where X is a drive-letter should map through to a DOS path for that Drive.
** Otherwise, it needs to to a UNC path //wsl$/${WSL_DISTRO_NAME}/${CWD}.
Paths from an SSH session, which we ideally want to ignore early. However, these may look identical to a UNC path's file:// URL. That might actually be desirable, if I am SSH'd to a machine on my LAN, and then launch a PowerShell tab and it does actually go into the same directory, via UNC. However, that'd be an unusual CIFs layout (NFS 3 worked that way though...) so I can't see this as being a common use-case.

Happily, it seems ${WSL_DISTRO_NAME} exists, and I assume it's inserted by the wsl shell launcher, so it is possible to generate the full correct file:// URL in one's PS1 env-var. This even means you can key off the presence of ${WSL_DISTRO_NAME} (or ${WSL_INTEROP} perhaps) to share the same OSC 7 generation code with out-of-WSL environments.
One possible approach to the above: is that if everyone generating OSC 7 commands for Windows paths agrees to only generate a modified-'legacy file:// URL' format, i.e. file://<gethostbyname()>///<UNC hostname>/<UNC path> or file://<gethostbyname()>/<DOS Path>, then WT could recognise when <gethostbyname()> matches the current $COMPUTERNAME, and replace it with localhost (making it a correct "legacy" file:// URL) before passing it through to the URL handler to get the actual working directory.
Then any other hostname, except 'localhost' and 'empty string', could be treated as 'remote' and ignored. For 'localhost' and 'empty string' hosts, we'll just trust the user isn't generating those from a remote host. There's nothing else we can do there.
This seems the closest in-spirit to the Freedesktop file:// URL specification, and means that URLs generated for OSC 7 on Windows will be semantically-similar to URLs generated for OSC 7 on UNIX-type systems, and can be parsed the same way.

Paths from CMD, which are going to need to be file://localhost/$CWD, because CMD only knows DOS paths.

Ideally this should also have some form of hostname in place of localhost - I mentioned this in CMD gist.

Paths from WSL, which from within the WSL session are Unix paths, and have two major mappings:

/mnt/X/... where X is a drive-letter should map through to a DOS path for that Drive.
Otherwise, it needs to to a UNC path //wsl$/${WSL_DISTRO_NAME}/${CWD}.

I'm not sure if I'm just misunderstanding you, but it sounds like you're saying the shell should be generating the path in one of those two formats, and that is just not an option. I've said this before, but I want to make sure this is understood. In any WSL shell we have to assume the URI will be in the form file://$HOSTNAME$PWD. If the user is in a mnt/X directory, then the URI will be file://hostname/mnt/X. If the user is in /usr/bin, the URI will be file://hostname/usr/bin - it's up to the Terminal to map that to the appropriate distro path for the session.
As for the UNC path format, I'm not sure why we're still arguing about that. Whatever you're producing in the PowerShell gist looks fine to me. I haven't looked at the git bash stuff because I know nothing about that - I'm going to assume that's fine too.

The point of the host name is to distinguish between a path on a remote machine (which should be ignored) and a local one (which should be useable as the start path for the new tab).

In my initial implementation I was in the belief that based on the PathFileExists we can reliably filter local path and remote paths. And host name can not do more than that. So I chose to completely remove that part. Now after several days of discussion, I've been convinced that all things considered (including edge cases like PowerShell Remoting), host name does play a vital part in the whole OSC 7 implementation.

Just to be clear, this transformation has to happen in the terminal itself, and not in the shell.

Originally I dislike the idea of putting /mnt/c and wsl$ related code inside WT, because they are super implementation-detailed. Putting them in WT harms the decoupling of WT and WSL and other shells. But it's also very tempting to make /mnt/c just work out of the box. So I'm stuck in the middle of nowhere.

@j4james: The problem is if the WSL session isn't generating paths in a Windows path layout, then we must have special-case code in WT to detect a WSL session and mangle its URLs into the Windows path layout.
The only other option is we treat WSL as "remote", and just ignore its CWD.
I would be fine with that (WSL is not a use-case for me here), but the same logic applies to git bash, and I would definitely have my OSC 7 PS1 generate a Windows-pathed file:// URL using cygpath --windows in that case. I'd have to check, but wouldn't a vim build in git-bash be using Windows-based paths anyway, i.e. mingw but not msys? It's only actual shells that are likely to both manipulate the CWD and generate OSC 7, and be working in the cygwin path view.
There's no way outside of cygwin for WT to turn the cygwin /bin path into a Windows filesystem path, because that knowledge is local to the cygwin environment.
WSL is the same, except it's a mostly-fixed mapping, so we can emulate it from the outside in WT. Like @skyline75489, I don't like that approach, but at least it's an MS product, so we could have a reasonably-fixed heuristic to recognise a WSL path, magically determine the WSL distribution from nothing, and then build the correct Windows-relative path.

If the user is in a mnt/X directory, then the URI will be file://hostname/mnt/X. If the user is in /usr/bin, the URI will be file://hostname/usr/bin - it's up to the Terminal to map that to the appropriate distro path for the session.

I disagree about that. I don't think it's the terminal's responsibility to transform a path in a random filesystem-mapping wrapper into a Windows filesystem path. If the OSC 7-generating process in question cannot produce a Windows filesystem path, the correct option is to ignore it. WT should not be expected to guess if file://hostname/mnt/X is a Cygwin drive mount of X:, a WSL drive mount of X:, or some random mount I happened to create inside WSL unrelated to a system drive.

I updated the PR and added hostname validation. I've tested more cases and it surprised me how well most shells behaves when accepting a Windows directory as starting directory. For example I can cd into /etc in WSL and Git Bash will happily accept it and change its current directory to //wsl$/Ubuntu/etc. It also works the other way around.
I think I'm close to the proper solution for this. Even if we are going to do the transformation for WSL, that would be a special case for WSL and for WSL only. Knowing the current behaviour of CMD, PowerShell and Git Bash makes me more convinced that all the other shells should be sending OSC 7 with a valid Windows path.

If the OSC 7-generating process in question cannot produce a Windows filesystem path, the correct option is to ignore it.

I second this. I think this is the correct thing to do.

I did write "correct option", but I meant "strictly correct". I don't think it's "incorrect" to have support for specific known sources of non-Windows-filesystem paths, but I would consider any such support separately to getting the OSC 7 feature working with file:// URLs that do reference the Windows filesystem path.

(Still working my way through the backlog...)
@TBBle

Edit: I kind-of wish WSL has something like cygpath now, to hide all the above

It does! WSL patches in a wslpath binary that does bidirectional path translation and takes into account mtab.
duhowett@dhowett-sl:~$ wslpath 'C:\Users'
/mnt/c/Users
duhowett@dhowett-sl:~$ wslpath '\\wsl$\Debian\home'
/home
duhowett@dhowett-sl:~$ wslpath -w /etc
\\wsl$\Debian\etc
duhowett@dhowett-sl:~$ wslpath -w /mnt/c
C:\

we must have special-case code in WT to detect a WSL session and mangle its URLs into the Windows path layout.

This is, unfortunately, a feature request that comes up from time to time. People want the following things to "just work":

Setting your startingDirectory to a WSL path
Pasting a path off the clipboard (assuming we can even tell it's a path; do people think that this happens for free? :P)
Dropping a file on the terminal window
OSC 8 hyperlinks emitted by e.g. coreutils (see similar discussion in #7526)

But they can't just work in the most general case. wslpath runs inside a specific distribution and looks into the mount table before responding.
I'd hate to go down the rabbit hole of attempting to determine if WSL happened to be running when a path was generated or a file was dropped or something. I just.. I don't have a good solution to this, in any form.  This means we won’t need to “go down the rabbit hole of attempting to determine WSL is running”. We can still have a very smooth experience with the help of various shell confs in my gists above.

I agree, cygpath and wslpath remove the need to do any guessing, on the basis that the code inside the environment can use those to get Windows-environment paths, so WSL can just consume the 'path' component of the file:// URL without further mangling to account for the source environment.

Another interesting observation from me: wslpath is doing a fantastic job converting UNC paths. For a valid Linux path my \folder, the default tool vte-urlencode-cwd will convert it to my%5Cfolder, using the standard URL escape. However, wslpath will convert it to myfolder. The reason is obvious. The character \ is not valid character for Windows paths. There must  be some kind of internal mapping inside WSL that handles this. And wslpath is fully aware of that.

This is a great example showing that we actually can not use the path that a"normal" Linux would provide. If we want everything to work, the path conversion for WSL has to be handled inside the distro environment.

I was really hoping the substitute for \ (0x5c) was going to be ⧵, but it turns out it's  (0xf05c), a private-use character. I like the alignment of the low-byte being the same.
It's a shame Windows Explorer doesn't appear to know how to render that character. I'm not sure how it could but even so.
What happens if you use the character  in a filename inside WSL? ^_^

Unfortunately, this component must work on Windows 7. Anything “TerminalCore” and below (in the folders named conhost and shared in the SLN file) is Windows 7-clean, and anything in the rest of src/cascadia is Windows 10 1903.
TerminalCore builds into a component for Visual Studio. :)

The best thing to do would be to defer URI handling to TerminalControl or even higher.

@DHowett on the scale of 1-10, how much do you feel that I'm heading to the "correct" direction in this PR? I mean it may not be technically vital in the WT infrastructure but it's a popular request from the community.  I think we all want it to happen.

I unsubscribed from this PR because it just makes me angry, but for the last time now, I'm begging you, if you can't implement this in a way that's compatible with the format used by existing shells and terminals, then please just invent another sequence for it. It's not going to make any difference to us if it's OSC 7 or OSC 4321 (or whatever), but we're just making problems for everyone else if we repurpose the existing sequence in an incompatible way.

Although @j4james has unsubscribed and won't see this, I want to say that as I have understood the discussion, the intention is to implement OSC 7 as specified and used by existing terminals and shells: Shells (or others) send a file:// URL, and if the Terminal can resolve it as local, then it is consider the CWD of that session, for whatever purposes the Terminal wants a CWD; in the WT case, for opening new tabs or sessions in the same CWD.
It would not be compatible with other implementations for a WSL session to send file://myhostname/usr/bin and have Windows Terminal resolve that magically into the equivalent of file://wsl$/MyWSLSession/usr/bin or file://localhost/wsl$/MyWSLSession/usr/bin, in the same way that it would unexpected for a Linux desktop stack to resolve file://myhostname/workspace from inside a container into file://myhosthome/var/lib/docker/volumes/SomeUUID/workspace.
I specifically call out a container here because, like WSL and Cygwin, applications inside a container are running inside a mount namespace that is not visible or reasonably resolvable to things outside it. In theory, VTE could poke at the running processes, identify a container by interrogating the container runtime, parsing its volumes, and determining what the volume mapping was, if the CWD turns out to be a local filesystem mount.
WSL and Cygwin have the advantage that they provide a utility that can produce a system-resolvable, file:// path within their environment. That's up to the thing generating the OSC 7 sequence to use, not the Terminal to try and parse it.
If the thing generating the OSC 7 sequence cannot produce a file:// URL that works for the Terminal, it's not the Terminal's OSC 7 implementation that's faulty.

Alright, I've re-read this thread and others, and I think I have an opinion on the matter.
Obviously, this is a super contentious sequence, which is why I hadn't already implemented it 😜. It's also an issue that's now intertwined with a couple other scenarios, so for the completeness of discussion, let's also refer to

[#8166] OSC 9;9 - the ConEmu sequence for setting the working directory
[#7526] Support for the file:// URI when emitted as part of OSC 8 hyperlinks
[#331] Users wanting to be able to drag/drop a file onto the Terminal running WSL, and have the pasted path be in WSL format, not Windows
[#592] Less importantly, but users also want to be able to set a
startingDirectory as a WSL path, not just as a Windows path.

Basically, we've got two simultaneously incompatible issues. Either we:

Support this sequence with no "smart" path translation. We'll need to literally use whatever directory they emit (assuming the hostname matches)

Users who are currently using OSC 7 in their *nix scripts and emitting file://$hostname/$PWD in WSL, cygwin, will get unexpected behavior. We'll try and treat $PWD as a path to a Windows directory - which might be a path that exists. When they try to open a new tab with that same directory, it'll open not in the distro the sequence originated in, but in the Windows filesystem. Not great!

Find some way to magically translate paths provided by OSC7 into the correct Windows path. WSL clients won't need to change any of the scripts they were already using for this to "just work".

There's no heuristic way of doing this, without the client application providing some extra information to us. We can't inspect the process tree to figure out if the process that's emitting this sequence is a WSL process or a docker process or an ssh, and even if we could, then we wouldn't be able to correlate wsl.exe to the distro within WSL that's being used. Similarly, we can't use the profile to do this, because the user might be using WSL w/in their "Command Prompt" profile (for example).
We could introduce some other sequence for additional metadata to be provided. Something like "I know I'm a WSL, and I'm <distroName>, when I emit paths, handle them specially". If we did introduce such a new custom sequence, then we're not really faithfully implementing OSC7 now are we? For clients to work as they did before, they'd still need to add emitting this custom sequence

I think at the end of the day, I agree with @j4james. If we implement OSC7 as requiring a Windows-style path, then that'll necessitate that client applications will need to be modified to work right on Windows, and I hate that idea.
OSC9;9 - the ConEmu solution
This one doesn't seem that bad. Since it's a windows-first sequence, it doesn't need to know anything else about who's emitting the path. We can always assume it has been emitted as a Windows path. On the surface, this seems to work great, save for one scenario - ssh. This sequence doesn't accept any sort of hostname, it only takes the path. So if you were ssh'd into another machine, and that one emitted a OSC9;9, then there's no way of determining that sequence wasn't intended for the current machine.
I think I'm okay with us implementing this as-is for the time being though. It's not a perfect sequence, but it's good enough, and doesn't come with the compat baggage that OSC7 does. It can certainly be supported with the caveat "This won't work in an ssh session, or in any scenario where it's emitted by a remote connection. It will always be treated as a path on the local machine".
Other notes
I want this to just work. I want there to be one sequence that everyone can emit reliably, and have it just work, and I don't think that OSC9;9 is that either. I'm gonna be filing a thread later today with the body of this post and a proposal for more discussion. This is a great feature that I think we all want, but we do need to make it work for both Windows and Linux terminals. The only thing I'm confident about in this whole discussion is that we (the terminal emulator ecosystem) don't have a perfect solution yet.

Closed in favor of #8330


Further wtf-ness with NaN being type number

I thought you could expand on the NaN being a number type a little.
Type of NaN is a 'number':
typeof NaN; // -> 'number'
+ isNaN(NaN); // -> true

this is almost seemingly contradicting itself because it tells you that NaN is type number, but that NaN is indeed not a number. i understand it makes sense but at first glance i think it makes you think "wtf?"
also, NaN === NaN or NaN == NaN is false both times but may not be as applicable to this section

IEEE 754 standard, a standard for floating point arithmetic, defines arithmetic formats comprising of finite numbers, infinities and NaN(a special value).
In simple words, NaN is a result of operations that yield values that cannot be represented or defined as floating point numbers.  It is still a number, but we don't have a proper representation for it. Take an example of square root of a negative number, it is imaginary, therefore we represent it using NaN.

yes like i said i understand it makes sense but thought it still was appropriate for this repo.

Feel free to open a PR where we can discuss this further.


topic/clean

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.01%) to 62.676%

Totals

Change from base Build<PHONE_NUMBER>:
0.01%

Covered Lines:
4220

Relevant Lines:
6733

💛  - Coveralls


interpreting NIS plot

In the NIS plot, what does the colour range of the boxplot represent? P-value?
Also what is the range of the NIS? In the RNA-seq paper (Radley et al. 2017) in figure 5a the range is much larger than in 5b, does that mean that the dysregulation in 5a is stronger than in 5b?
Thank you for your help.

Step 11-B in Radley et al 2017 has a call to plot_nis. This colors each box by NIS according to a multicolor gradient scaled from purple (low), white (zero), to orange (high). It is auto-scaled based on the input range so the depth of purple-ness, for example, is not comparable across plots.
I have not defined the NIS range. The range will vary between GRNs because we did not adjust for network size (we should think about including this as an adjusted NIS output). However, I do agree with your statement "...dysregulation for Pou5f1 in 5a is much stronger than MYT1L in 5b". This is because 5A is calculated on fibroblast as a query/starting cell type, which is transcriptionally very distinct from the intended target of ESCs/PSCs. On the other hand, 5B is calculated based on iPSC-neuron as a starting cell type, which is transcriptionally closer to the intended target of a neuron.

Thank you for your helpful reply.


Fix issue when resizing hidden terminals

Whilst using the 'fit' addon, if you run Terminal.fit() whilst the terminal is hidden (with display: none for example), then the terminal will become unusable.
The solution I'm proposing is to exit the Terminal.resize() function if either the x or y parameter is a NaN value.

Thanks @LucianBuzzo

This change broke IE, which does not support Number.isNaN. For alternatives, please see http://stackoverflow.com/questions/26962341/number-isnan-doesnt-exists-in-ie


[FFDC] Close SSH/Telnnet connection post FFDC

We hit the SSH paramiko related issue each run as report by DVT.
No handlers could be found for logger "paramiko.transport"
#(CST) 2017/02/24 12:06:16.985204 - 2948.112677 - Executing: obmc_boot::exit_function "EXIT" "1"
#(CST) 2017/02/24 12:06:17.010056 -    0.024852 - Issuing: kill_autoend autoend_pid

On debugging we found that the SSH/Telnet sessions were not getting cleanup and increasing per FFDC call. Since the DVT auto boot calls FFDC every test cycle, it end up opening many connections and leaving stale sessions forcing parmaiko to error out now and then.
A simple fix was made in FFDC code to do the cleanup by calling Close All Connections
Call FFDC Methods
    [Documentation]   Calls into FFDC Keyword index list

    @{entries}=     Get ffdc method index
    :FOR  ${index}  IN   @{entries}
    \     Method Call Keyword List   ${index}
    Close All Connections

Code under review.  https://gerrit.openbmc-project.xyz/#/c/2690/
and DVT reported with this patch they are able to run as many as 22 test without SSHException. So we are looking good there..

The changes is small but spent good time debugging and running test to recreate


Add extra container and init container values

When using the Helm charts to demo or test something, it's sometimes useful to be able to inject sidecar containers, or extra init containers. Some operators (e.g. linkerd) do this for you through annotations, others require you to do this yourself (e.g. Jaeger - they support annotations as well, but only on deployments for whatever reason).
AT:

add extraAnnotations value to allow specifying annotations for pods
add extraContainers value to allow specifying sidecar containers for pods
add extraInitContainers value to allow specifying additional init containers for pods (e.g. testing migration script, for example)
add extraVolumes and extraVolumeMounts to allow injecting/overwriting files during deployment

At the moment I really only care to scope all of these for Zeebe, not sure if it makes sense to have these for other services; some of them might even have partial support already.
NOTE: see some examples here and here, and some discussion here

I assume this is still the case @npepinpe

I think it's a common use case, but nothing urgent.


Allow users to create a quick-and-dirty preview grid

Similarly to the notebook, to preview the effect of content/style strength, we'll want to create a grid for different values of content strength and style strength

For that, first step is a bit of refactoring to clean things up into their own functions.


Feat/add import export data

Description
Allow users to backup and import their Takenote data. The data is exported as JSON and imported likewise.
Edge cases handled when importing:

If duplicate categories are found then they are overwritten and won't be added again. This is to avoid key collisions.
Duplicate notes are added with new Ids.
Scratchpad is overwritten (Don't know if it would be better to merge with the current user's content).

Closes #411
Browser checklist
This PR has been tested in the following browsers:

[x] Chrome
[ ] Firefox
[ ] Safari

Testing checklist

[x] End-to-end tests have been created if necessary

Awesome PR! Thanks a lot! Sorry, another one went in that made a slight conflict, so just made a few notes, then it's good to go. Also, I think it should run a sync right after the upload since it's left in a pending state.

Awesome PR! Thanks a lot! Sorry, another one went in that made a slight conflict, so just made a few notes, then it's good to go. Also, I think it should run a sync right after the upload since it's left in a pending state.

Great! Thanks for the review, I have made the changes accordingly.


json-schema official test suite

Hi,
I have not found in the docs any reference to the Json-Schema official test suite. In order to be considered a full-fledged alternative to Json.Net schema this seems an unavoidable requirement.
Is it in your roadmap or this project is frozen now?
Best regards, and congrats for your work.

I don't know that it's a requirement for JSON Schema.  The project ReadMe opens with,

This repository contains a set of JSON objects that implementors of JSON Schema validation libraries can use to test their validators.

Even so, I see your point as far as implementing it to solidify this library as an alternative for Json.Net. I'll take this as a suggestion and work to implement this in the tests.

No, this project is not frozen.  While I feel that it is fairly mature, I haven't stopped supporting it.  Every now and then bugs arise from my own use as well as others.  New development has slowed, however, as I find ideas lacking.  (I usually have to conceive of them myself.)

Yes, requirement was used with a conditional. It is not an official requirement. But I guess it would make easier to add your library to the official implementation tools list.
A first approach to implementation can be quite straightforward with data-driven tests, only one method to load the tests and another one to check the validation.

Just downloaded.   I think you found me some work. :smile:
I'll leave this open until the suite passes.

Great. Let me know if I can help in some way (comfortable in c# and json-schema).

For now, I'm just trying to get the tests set up.  I can see some potential difficulties around some of the more advanced remote ref scenarios.
But, alas... I need sleep.

Already found a couple time issues (#25 & #26) as well as a host of others I haven't investigated yet.
Thanks for this.

@jruizaranguren need your opinion.  One of the test sets uses the schema
{
    "items": [{}],
    "additionalItems": {"type": "integer"}
}

Does this test imply that it's describing an array?

It doesn't.
The target can be an object. In that case, items and additionalItems are ignored and it should be validated.

I get it.  They only apply in the case that the value is an array.
Also, I noticed that there's not actually a format property defined in the schema.  Does this seem odd?

I'm not sure what is the use of format your are thinking on, but there exists a format keyword in jsonschema

Right, the keyword exists, but it's not listed as a property in draft-04.  It's used as one several times, though.

@jruizaranguren, I have it to the point where I'm only failing 6 tests, 3 of which are reference path escape tests.  But I can't find anything about reference escaping in the spec.
Given the examples, I understand the need for the slash and tilde escape, but I don't get the percent escape.

JSON Schema uses JSON Reference as a mechanism for schema addressing.

How did you find that?!

Everything is in the docs :smile:

All tests passing.  Will be posting v5.0.0 soon to include these changes.


How to pass parameters to codeceptjs tests in Jenkins for all tests

What are you trying to achieve?
I try to run all codeceptjs tests in Jenkins. The CLI command is npx codeceptjs run, but I want to pass secret parameter and I write: npx codeceptjs run $secret.
What do you get instead?
The framework considers this parameter as test file name and no tests are run.
I tried use this command because it was suggested in this issue but it doesn't work:
testcase=1 npm run codeceptjs -- run --steps
adding $ to parameter also did not solve the problem.
How can I pass the parameter in codeceptjs command so that it doesn't ignore all tests?
testcase=1 npm run codeceptjs -- run --steps
testcase=1 : The term 'testcase=1' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ testcase=1 npm run codeceptjs -- run --steps
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (testcase=1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

$testcase=1 npm run codeceptjs -- run --steps
At line:1 char:13
+ $testcase=1 npm run codeceptjs -- run --steps
+             ~~~
Unexpected token 'npm' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

To pass parameters in jenkins with codeceptjs and run ALL tests:
npx codeceptjs run --plugins $secret
Secret file of text passed in $secret parameters and then can be parsed using process.argv array in your code.
To run only one test in jenkins with codeceptjs:
npx codeceptjs run nameOfTest_test.js $secret


Bot not updating badge contributor count

Describe the bug
Not sure if this is a bug or intended functionality. When I add a new contributor with the bot, it opens a PR with everything correct except for the badge count.
I have this in my config file: "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)",
To Reproduce
Here is an example:
https://github.com/node-gh/gh/pull/669/files
Expected behavior
Update the badge with incremented number of contributors

see https://github.com/node-gh/gh/issues/676
Using a version inconsistent cli will cause the badge to not be updated. We need to upgrade the cli dependency to solve this problem.


DateValidator -> timestamp generation

I had a DatePicker without time in UI. I had to save timestamp of the beginning of the selected day. So I supposed to get that timestamp in dependence of my timezone. But DateValidator generates the timestamp of the days beginning in UTC.
So I had to make a workaround: I added a FilterValidator before, that adds to the selected date " 00:00:00", and  define another format for DateValidator with time-params.
I offer to change DateValidator in line 308 from
$date = DateTime::createFromFormat($format, $value, new \DateTimeZone($hasTimeInfo ? $this->timeZone : 'UTC'));

to
$date = DateTime::createFromFormat($format, $value, new \DateTimeZone($this->timeZone));

What do you mean?

you're suggestion removes logic. I guess its put in there by @cebe https://github.com/yiisoft/yii2/commit/d60445c066003cab78fb16458e7234fae5db4765 for a reason

Well, if I let user choose any date (without time), I suggest to get timestamp for beginning of this day in the timezone, where my app is running. Why does it remove logic?
Actually this is possible only if I explicit set any time parameter (one of 'HhGgis' from php date-format) in DateValidator::format and in the value of attribute, for which I use DateValidator.

Well, if I let user choose any date (without time), I suggest to get timestamp for beginning of this day in the timezone

A pure date is an inaccurate time information, it describes a time range from 00:00 to 23:59 on that day. This information has different interpretation depended on the time zone so we avoid confusion by not trying to convert dates to timestamps as the result will be wrong in 99% of the cases.

I added a FilterValidator before, that adds to the selected date " 00:00:00", and define another format for DateValidator with time-params.

if you add the time information, then $hasTimeInfo should be true and it should add the time in your timezone. There must be something you are doing wrong here.

A pure date is an inaccurate time information, it describes a time range from 00:00 to 23:59 on that day.

Ah... that's the point... Now I got it. Thank you!


Issues with newly created internet-draft

@opoudjis I've run into some problems with this new ID: https://github.com/riboseinc/rfc-crypto-sm3

Author name cannot take a prefix, e.g., "Dr. X Y Z " will get the email mangled.
"forename_initials" unable to set to more then one initial, such as "A. B."
"category" has to be set to v2 name such as "info" to pass v2 validation.
I had a problem where the invalid XML generated gets damaged by the RELAXNG validator (because puts will cause it to actually write the error to the XML... strange, I've changed it to $stderr.puts and it works).
The "definition list" could be better formatted, such as by putting the value on the next line with the same indenting?
When the "definition list" keyword is a code word (e.g., wrapped by backticks), it shows this in txt: <spanx style="verb">SS1</spanx>.
How did you make XML references work? 😉

It really took me a while to get this running properly...

The generated TXT can be found here: https://github.com/riboseinc/rfc-crypto-sm3/releases/download/pre-02/draft-oscca-cfrg-sm3-02.txt

I've just found out how to use the XML references, but the normative/informative citation thing isn't working yet.
The other annoyance is to have to manually download RFC XML references. Perhaps we could generate those using the RFC XML syntax of this for now?
<?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"?>

I'll get to this tonight.
The definitive RFC XML solution is supposed to be asciidoctor-bibliography; I can allow the passthrough of bibliography to pass through entity references, but I would then need to scan ahead and insert the entity references into the output, as you suggest. Is it worth doing that, or should the solution wait for  asciidoctor-bibliography?

<spanx style="verb">SS1</spanx> is how RFC XML v2 renders monospace ("verb" is for "verbatim"), so that bit is correct. v3 of course renders it as <tt>.

@opoudjis the spanx output is somehow also passed through to the TXT though...

Fixing in order to regenerate locally: there was a repeated reference for WXY, and the reference for ISO.IEC.10118-3 was missing.

... Please give me permission to riboseinc/rfc-crypto-sm3.git ?

Author name not taking prefix is an Asciidoc API issue, which we can't fix; so I will put a warning in the README that, if you want to use anything other than given + middle + last name, you should not use the inline authors, but only the explicit author attributes.

Am mapping canonical v3 status names down to v2 categories:

        category = node.attr("status")
        category = "info" if category == "informational"
        category = "std" if category == "standard"
        category = "exp" if category == "experimental"

Added to README.

Very surprised, since the puts were not getting into my xml output, but ok.

#69

The definition text under v2 is an attribute; for that reason, it is not allowed to have any formatting at all. This constraint is lifted in v3 for
:

`Term`:: Definition

RFC XML v2:
<t hangText="Term">Definition</t>

RFC XML 3

<tt>Term</tt>

Definition

I will strip out formatting from the v2 list term, as I'm already doing for cref.

Fixes done for the draft. I will push modifications to the .adoc once you grant me permission to.

Thank you @opoudjis , you have access 👍

Re 4. indeed I was surprised too, and I did double-check that the error messages were actually being written in the source file, causing it to be more invalid than it already was...

Thank you also re. 7, that's a very subtle point!


Encode/decode DataEntity URLs and paths.

Fixes #5. I started by adding a utility class to explore the possibilities to encode things and detect encoding using different solutions.

I figured that UrlValidator.isValid() is not a good solution as it

requires the domain to (still) exist, which might be helpful for warnings, but may cause crates to break over time.
requires an internet connection to do so
therefore, does not always have the semantic of "this is not a URL", but sometimes just "this domain does not exist (anymore)".

There are Java data structures which do this implicitly.

Status

[x] add isUrl, isPath, asUrl, asPath, and basic tests for them
[x] add a first prototype of an encoding which considers the not too consistent hint in the specs: https://www.researchobject.org/ro-crate/1.1/data-entities.html#encoding-file-paths
[x] (uses the junit dependencies now as in the official documentation, as it confused vscodes java language server at some point)
[ ] add decoding
[ ] test that decoding reverses encoding properly
[ ] test that we do only encode/decode if required
[ ] more negative tests

Pull Request Test Coverage Report for Build #86

22 of 35 (62.86%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.6%) to 89.032%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/main/java/edu/kit/datamanager/ro_crate/special/UriUtil.java
22
35
62.86%

Totals

Change from base Build #85:
-0.6%

Covered Lines:
1315

Relevant Lines:
1477

💛  - Coveralls


Adds darkmode logo

I'm waiting for this one to be fixed: https://github.com/facebook/docusaurus/issues/3989

I'm waiting for this one to be fixed: https://github.com/facebook/docusaurus/issues/3989

I prefer to get the #37 merged first.


RaspBerry Pi4 with EP-0136 won't boot

I installed the EP-0136 in my pi 4 and it won't boot if the usb c (on the pi board) isn't connected. Even if I connect it in the usb c in ups board it won't boot. The ACT light still blinking and only stops when the power cable is connected in the pi usb c port.
OAT update done
Batteries fully charged
All GPIO connections are made
Thanks in advance

and try click on Yellow button on UPS?

What does >sudo i2cdetect -y 1   display?
I have spent a week playing around with these boards. Definitely UPDATE, (had lots of issues till i did) and >sudo i2cset -y 1 0x17  25 1 (to set auto start on AC inserted function)

I have the same issue. But the when i power the pi via the ups the green light on the pi flashes 2 times. Indicating it cant read the sd card. But at the moment i boot the pi via its own usb C it starts just up.

try full charge batterys first

I have the same problem, the raspberry will not start. I tried 2 Different sets of battery brands and the problem doesn't disappear. I put the batteries in the ups and measured the voltage at pin 1 and pin 6. The value is 5.02 V. For me it says that the batteries are fine. They do not collapse under 5 V, what could be to low for functionallty.
In the end the rpi wont start with this ups, doesn't matter if the batteries are fully loaded and and the ups is swited to a power supply.


Can't run with source.

Finaly i found this awesome project.
I need elasticsearch  sql proxy, and i had a trial with you binary file and it's nearly perfect. But have some issue when query es-style table name.
Our elasticsearch index like "logstash-nginxlog-2017.10", it's not working on dataux query sql.
mysql> select ip from logstash-nginxlog-2017.10;
ERROR 1105 (HY000): QLBridge.plan:  No datasource found

I think this may caused by the special dot, so i want to fix this. But i can't run with source. I'm very sure i had run go get first already.
Please give a hint.  You need run this shell first.
sh updatepackages.sh


ci: use matrix and cache to speed up the build

Signed-off-by: Jason Liu<EMAIL_ADDRESS>Ⅰ. Describe what this PR does
save some time from building docker images.
Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews

/lgtm
/approve

Before optimization:

After:


Filter profiles + annotation of the primary group for accounting

Summary
Filter profiles and annotate a primary group. The code is separated between authentication (picking groups) and the spawner (performing profile filtering and annotating the primary group).
Filter out profiles
Filter out profiles depending on the VO membership of the user.
Those profiles where vo_claims is defined (List of strings), they will only be shown as options if the user has any of those exact claims in their entitlements.
Example:
profileList:
  - display_name: 'Only for access VO'
    vo_claims:
    - urn:mace:egi.eu:group:vo.access.egi.eu:role=member#aai.egi.eu
    kubespawner_override:
      image: 'eginotebooks/single-user-d4science:sha-8ce52e1'
      cpu_limit: 1
      mem_limit: 1G

Select primary group and annotate
The primary group is selected from the user claims - the first occurrence in the Authenticator.allowed_groups - and annotatation egi.eu/primary_group is added to the jupyter pod. This can be used for accounting.
Related issue :

Yes, development was with valtri/egi-notebooks-hub in testing environment. Switched to eginotebooks/hub:sha-83533a8 now. Both profile filtering and primary group annotation works. :-)


New linting options for 3.3.0

Any plans on adding unused:all and value-discard for Scala 3.3.0?

https://github.com/typelevel/sbt-tpolecat/pull/147


Wip

Just sharing early on the direction I've been taking... currently working on the transforms for the new functionality.

thanks! Btw I sent you an invite to add you as a collaborator to this repo so you don't have to fork it (unless you want to)


Test Cases for Learner Credential Wallet

Please list step by step procedure that is used to test the LCW. Helpful information for each test case includes:

test procedure
actual and expected results
test data

See: LCW Acceptance Testing Script

Updated label to documentation

Needs to be added to LCW docs folder

Closing this and opening this: https://github.com/digitalcredentials/learner-credential-wallet/issues/579


get region from new api

The API for getting the region cannot be accessible because the request has verification. We are currently offering another API available: https://ipinfo.io/

use : http://ip-api.com/json/  without ip to get the ip and metadata in  the same request


Add / Install with development is complex / multistep.

[x] I have searched the issues of this repo and believe that this is not a duplicate.
[x] I have searched the documentation and believe that my question is not covered.

The guide for path constraints says that to install in "development mode" you should

edit the pyproject.toml file and add your dependency, then

[tool.poetry]
name = "mypkg.rpc"
version = "0.1.0"

[tool.poetry.dependencies]
python = "*"
"mypkg.core" = {path = "../mypkg.core"}

[tool.poetry.dev-dependencies]
pytest = "^3.0"
ipython = "^6.5"

you should install with the --develop option: poetry install --develop mykpg.core.

Naturally, I decided that rather than manually editing the pyproject.toml file, I'd use the add command. But alas, add does not take a --path option, and poetry add --path ../mypkg.core mypkg.core will go ahead and install it not in development mode forcing a second step anyway (as well as additional wasted time due to i/o).
So I think it'd make sense to add develop to add and (perhaps) add "development = True" to the TOML dependency config.

After a few more days of working with poetry, I'm chalking this up as my user error early on.


feature request: allow to pass Vec to rarray

I have set of primary keys prepared for SQL request:
let mut ids: Vec<i64> = ...;
ids.sort_unstable();
ids.dedup();

it would be nice if I can pass Vec<i64> directly to Statement::query_and_then:
let mut stmt = conn.prepare(&format!("SELECT {all_sql_fields} FROM {tbl_name} WHERE id_key IN rarray(?)"))?;
 stmt.query_and_then([ids], ...)?;

for now I have to make two allocation and copy ids to Vec<Value> to pass ids to  Statement::query_and_then:
    let ids = Rc::new(ids.into_iter().map(Value::from).collect::<Vec<Value>>());

But for example carray allow to pass array of i64 directly without any reallocation.

Safe implementation / PR welcomed !


Request payment error

Create an account with RON currency, and one with EUR currency.
Request 100 RON from the account, and try sending/paying it with the EUR account.
Even if you have enough money, and everything should be ok we have an error.

Same happens for HUF or DKK.
EUR USD GBP work.

Is it still open @Tymmmy if yes I can resolve this issue

@AvinashReddy19 you can see there is a branch attached to it, with a PR, and that already solves the issue. It needs approve and merging. This is not part of the #hacktober ticket list.

Label of this issue is still open and also branch didn't yet merged so that's why I commented


[tool_crash] FileSystemException: Cannot copy file to 'C:\Users\paulodhiambo\Desktop\flutter-apps\covid\android\app\src\main\res\mipmap-hdpi\ic_launcher.png', OS Error: Access is denied., errno = 5

Command
flutter create --ios-language swift --android-language kotlin .

Steps to Reproduce

...
...
...

Logs
FileSystemException: Cannot copy file to 'C:\Users\paulodhiambo\Desktop\flutter-apps\covid\android\app\src\main\res\mipmap-hdpi\ic_launcher.png', OS Error: Access is denied.
, errno = 5
#0      _File.throwIfError (dart:io/file_impl.dart:635:7)
#1      _File.copySync (dart:io/file_impl.dart:340:5)
#2      ForwardingFile.copySync (package:file/src/forwarding/forwarding_file.dart:30:50)
#3      ForwardingFile.copySync (package:file/src/forwarding/forwarding_file.dart:30:50)
#4      Template.render.<anonymous closure> (package:flutter_tools/src/template.dart:256:18)
#5      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
#6      Template.render (package:flutter_tools/src/template.dart:182:24)
#7      CreateCommand._renderTemplate (package:flutter_tools/src/commands/create.dart:781:21)
#8      _rootRunUnary (dart:async/zone.dart:1198:47)
#9      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#13     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#14     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#15     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#16     Template.fromName (package:flutter_tools/src/template.dart)
#17     _rootRunUnary (dart:async/zone.dart:1198:47)
#18     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#19     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#20     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#21     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#22     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#23     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#24     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)

[✓] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.19041.508], locale en-KE)
    • Flutter version 1.20.4 at C:\src\flutter
    • Framework revision fba99f6cf9 (5 weeks ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\paulodhiambo\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.50.0)
    • VS Code at C:\Users\paulodhiambo\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.15.0

[✓] Connected device (1 available)
    • TECNO CC7 (mobile) • 05199339BO000938 • android-arm64 • Android 9 (API 28)

! Doctor found issues in 1 category.

Flutter Application Metadata
No pubspec in working directory.

Duplicate of #50880
Hey @paulodhiambo , I found an issue addressing this problem. Please refer to that
Thank you

Hi @paulodhiambo
See these comments for reference:
https://github.com/flutter/flutter/issues/67093#issuecomment-702452026
https://github.com/flutter/flutter/issues/67093#issuecomment-702452096
I'm closing this as a duplicate of https://github.com/flutter/flutter/issues/67141.


Event update

@fgregg - this pull request address issue #154. It includes a couple tests, using pytest. (N.B. I had some simple tests for manual agenda upload, written with django unittest. So, I had to make some large deletes to get pytests up-and-running.)

@fgregg - changes made to the template tag. Let me know how it looks!


Update Step #4 to use hyphens instead of en dash.

The command under step #4 gives an error when you attempt to copy & paste it: "az: error: unrecognized arguments: –g MyResourceGroup –n MyVM -–run-on-repair".  This is because the dashes these are "en dashes" rather than "hyphens".  Changing them to hyphens.

@robertspears : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@robertspears : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Looks good to me. Thanks @robertspears


ActiveQuery::joinWith() still executes multiple sqls

joinWith() doesn't execute less sqls compare to with()
$orders = Order::find()->joinWith('customer')->all();

execute following sqls:
SELECT `order`.* FROM `order` LEFT JOIN `customer` ON {{order}}.[[customer_id]] = {{customer}}.[[id]]

SELECT * FROM `customer` WHERE 0=1

and
$orders = Order::find()->with('customer')->all();

execute following sqls:
SELECT * FROM `order`

SELECT * FROM `customer` WHERE 0=1

obviousely, the first  sql of joinWith() is more complicate.
it's also exists in more complicate scenes.

sorry for misunderstanding the joinWith popurse

Duplicates #10016

http://www.yiiframework.com/doc-2.0/guide-db-active-record.html#lazy-eager-loading


WIP: chore(deps): update mysql docker tag to v8

This is an attempt to apply the changes in this renovate PR: #1406 along with some necessary changes:

also update the image tag in test-utils and package.json that reference the old version

As described in details in this StackOverflow post:

MySQL 8 has supports pluggable authentication methods. By default, one of them named caching_sha2_password is used rather than our good old mysql_native_password

Our tests uses native passwords, so obviously they couldn't connect. I found that mysql8 can be run with mysql_native_password by using the following flag when running docker: --default-authentication-plugin=mysql_native_password.
This PR is for applying relevant fixes to the renovate PR to use the new image tag.
The current image 5.7 has no docker image for Apple M2 chip on mac, therefore I am not even able to run current tests on my Mac.

the service in github actions is defined like so:
      mysql:
        image: mysql:8.0
        env:
          MYSQL_USER: otel
          MYSQL_PASSWORD: secret
          MYSQL_DATABASE: otel_mysql_database
          MYSQL_ROOT_PASSWORD: rootpw
        ports:
        - 3306:3306
        options: >-
          --health-cmd="mysqladmin ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

And I need a way to pass the --default-authentication-plugin=mysql_native_password flag to the container. Looking at gh docs, I don't see a way to do that.
Another option is to mount a MySQL config file, as suggested here under "Using a custom MySQL configuration file":
-v /my/custom:/etc/mysql/conf.d

This will require us to add a config file next to github workflows which isn't great.


Does the CPU/GPU need to support Vulkan to be able to run Walnut Applications?

Question

walnut is coded for vulkan, but you could recode it for any GFX driver I imagine, however I suspect it's so intertwined that wouldn't be worth it for most people. In reality if you were to do that it'd only serve as a confusing encoded design concept, walnut is basically just a 2d gfx engine without any game elements.. it's a software design suite for vulkan.. it won't serve you well to use other GFX engines but it technically could be changed to do so.

as my Laptop doesn't support Vulkan, and i would really like to make Desktop Applications with that

as my Laptop doesn't support Vulkan, and i would really like to make Desktop Applications with that

that is unfortunate but enlightening, I didn't make walnut but I was attempting to make a plugin framework, which is notoriously difficult with c++, I failed at that but as I was reading the source I noticed it derives from the imgui examples, as most libraries do, in there you will find a direct X example, and if your laptop doesn't support that then it doesn't support hardware accelerated gfx, which is what this does, it's essentially it's own image framework engine, normally you would use windows to do this, or some software graphics driver. more than likely in your case that is so outdated of a concept that it wouldn't even do you any good, as even with the SDL example "simple dynamic layer" microsoft software driver, it'll be replaced probably even before your laptop stops working.


Use a string for the X-Inertia header value

Diactoros give you a hard time when supplying header values that are not strings or numbers for security reasons. This PR changes true to 'true'.
The error message we got:
Fatal error: Uncaught Zend\Diactoros\Exception\InvalidArgumentException: Invalid header value type; must be a string or numeric; received boolean in /var/task/vendor/zendframework/zend-diactoros/src/HeaderSecurity.php:139

For now, we're using a custom middleware, but it's not an ideal solution.
class TemporaryInertiaHeaderOverride
{
    public function handle($request, Closure $next)
    {
        $response = $next($request);

        if ($response->headers->has('X-Inertia')) {
            $response->headers->set('X-Inertia', 'true', true);
        }

        return $response;
    }
}

Good catch. Curious, why are you using Diactoros?


Question of F2-score

The new metric F2-score is released. However, I am confused of it.
According to the code,  we need to have the 'confusion_matrix' to get 'fp, tp and fn'. If the input of 'prediction and ground_truth' is of 5 channels, how to define the label of each channel? If the labels the 5 classes are defined as 255 while the backgrounds are 0, the 'confusion_matrix' is not right because only the bins of 0 and 1 have values.
As as result, I guess the confusion_matrix should be based on a single channel and the 'nr_labels' should be 2.
Thanks for your attention!

Hi,
thank you for your observation. We have checked it and fixed the bug.
We have uploaded the method and its available to be used for leaderboard scoring.
Best,


[NPU] Add NPU to support hybrid engine

Add NPU to support the hybrid engine, we tested it with the example on DeepSpeedExample and the results, average reward scores, were aligned with the GPU.
For works about NPU, see https://github.com/microsoft/DeepSpeed/issues/4567

@mrwyattii hi, Could you please help to retrigger the workflow and review this PR ？

@tjruwase @mrwyattii hi, would you please help to review this PR and add to merge queue? CI has passed.

@CurryRice233, thanks for this PR. Apologies for the delay. Most of the team are just returning from the holidays. We will review asap.

@tjruwase The CI failed. It seems that there is a problem with the CI server. Can you check it?

@tjruwase @loadams CI passed again, can you help to review this PR and add to merge queue?

@tjruwase @loadams CI passed again, can you help to review this PR and add to merge queue?

@CurryRice233, we will review this asap!

@mrwyattii  Hi, can you add this PR to merge queue, thank you !


Ctrl-K and Up have same scancode on Mac

Which operating system does the issue occur on?
Mac 1.14.3
Background: I'm considering switching over from iTerm2 to Alacritty. One of the key plugins though for my current workflow uses the Vim Tmux Navigator plugin across Vim and Tmux. With these tools, I use the following keys:
Ctrl-J -> move down one pane
Ctrl-K -> move up one pane
Up      -> go up one command in my history
Down -> Nothing right now
Setup: Now, when I try to set this up in Alacrity, it seems like Alacritty can't distinguish beween Ctrl-J and Down and Ctrl-K and Up. As a result, the above key combinations don't work with the plugin, and pressing either Ctrl-K or Up both just go up one command (default behavior of Up key as described above)
When I run alacrity with --print-events, both the Ctrl-J combination and the Down key result in the same value.
[INFO] glutin event: WindowEvent { window_id: WindowId(Id(140343609730912)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 125, state: Released, virtual_keycode: Some(Down), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }

And similar output is shown with both Ctrl-K and Up yielding 126 as the scancode.
I first tried this binding:
  - { key: K,  mods: Control, chars: "\x0b"  }

but I could never trigger this event.
I then tried the following binding. After using xxsd, I managed to get the chars seen by iTerm and tried the following mapping:
  - { key: Up,  chars: "\x0b"  }

This then sends the correct command to Tmux (move up a pane) but it also goes up one command in the same pane, indicating both are still present.
Question: How can I distinguish (and make work) the Ctrl-K, Ctrl-J, Up, and Down keys for my setup?

When I run alacrity with --print-events, both the Ctrl-J combination and the Down key result in the same value.

That sounds extremely odd, I was initially thinking your issue is with your shell and you've got a keyboard shortcut setup there, but it sounds like you've actually got some weird system setup going on.
Do you have anything like a custom keyboard shortcut program running or an unusual keyboard layout?

Oh you're totally right. I'm using khd, a modal key hot daemon, and I totally forgot about this section.
# vi-mode for non-terminal applications
# remap left-control h/j/k/l -> arrow keys
lctrl - h         ![HyperTerm,Terminal,iTerm2]      :   khd -p "- left"
lctrl - j         ![HyperTerm,Terminal,iTerm2]      :   khd -p "- down"
lctrl - k         ![HyperTerm,Terminal,iTerm2]      :   khd -p "- up"
lctrl - l         ![HyperTerm,Terminal,iTerm2]      :   khd -p "- right"

Added Alacritty above and it works great. Thanks so much for the help!


manual transfer and evolve

Short Description:
manual transfer and evolve through UI
Changes:

add new actions from UI

@OpenPoGo/maintainers

I don't think we should be evolving and releasing inside a socket plugin, it should all be done by the evolver and transfer_pokemon plugins.
I've been working on #117 to do this already. Once that's finished (this evening sometime) the socket plugin can just fire a single event.

I'm not sure @andythorne.
For example, If I prefer transfering pokemon manually, I'll disable the transfer plugin, so it does not make much sense to call it from there.
But I agree that ideally we should have a center "evolve" and "transfer" method that all plugin should call.

But surely if you disable the transfer_pokemon plugin, you don't want to do transfers? I can foresee it causing confusion if people turn off the transfer_pokemon plugin, but they can still be transferred through the UI?

Well, if you don't want automated transfers, it makes sense to disable the transfer_pokemon plugin.

Maybe the module names should be changed to make it more obvious what it does. I really think we need a central place for actions tho. calling bot.api_wrapper.release_pokemon(...).call() whenever is going to create problems, for example with in consistent sleep times post-action.

agree with you @andythorne but not in this PR :)

👍

:+1: LGTM


tanium_nlp.py errors

I'm trying to run Tanium queries from Splunk using the tanium_nlp.py script.  I've tried running it using the python embedded in Splunk, and I get the following errors:
/opt/splunk/bin/splunk cmd python /opt/splunk/etc/apps/tanium/bin/tanium_nlp.py --tanium "<IP_ADDRESS>" --user "Tanium" --password "Tanium" --question "Get Computer Name and Running Processes from all machines" --timeout "10"
Traceback (most recent call last):
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 373, in
main()
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 335, in main
xml_response = my_tanium.ask_tanium_a_question(question,timeout)
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 255, in ask_tanium_a_question
self.last_id = self.send_request_to_tanium (sensors)
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 248, in send_request_to_tanium
id_num = id_num.group(2)
I get the same error using the "script" command in the Splunk GUI.
If I run the same command just using the python version in OEL, I get the following:
Traceback (most recent call last):
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 373, in
main()
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 335, in main
xml_response = my_tanium.ask_tanium_a_question(question,timeout)
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 255, in ask_tanium_a_question
self.last_id = self.send_request_to_tanium (sensors)
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 231, in send_request_to_tanium
guess_xml = self.make_soap_connection (soap_message)
File "/opt/splunk/etc/apps/tanium/bin/tanium_nlp.py", line 73, in make_soap_connection
webservice.endheaders()
File "/usr/lib64/python2.7/httplib.py", line 1013, in endheaders
self._send_output(message_body)
File "/usr/lib64/python2.7/httplib.py", line 864, in _send_output
self.send(msg)
File "/usr/lib64/python2.7/httplib.py", line 826, in send
self.connect()
File "/usr/lib64/python2.7/httplib.py", line 1236, in connect
server_hostname=sni_hostname)
File "/usr/lib64/python2.7/ssl.py", line 350, in wrap_socket
_context=self)
File "/usr/lib64/python2.7/ssl.py", line 611, in init
self.do_handshake()
File "/usr/lib64/python2.7/ssl.py", line 833, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)
All of the other scripts work from both the command line and Splunk search pipeline.

The code needs to be updated to deal with the ssl/tls certs. Since using the nlp search via Splunk feature is has been removed, Ill close this.


Automated Cloud Backup

I chose own password, did not skip backup. Still the wallet didn't backup onto cloud.

Verified this issue on dev app v2.0.70(431)


C++ Poisson might not be a poisson (under load)

In c++, generating calls with poisson load works like this:
while(true) {
  waitForExpDistributedTime()
  unaryCall()
}

Technically, this won't result it poisson distribution if unaryCall latencies will start representing significant portion of the time compared to the amount of time spent waiting (if we start simulating "heavy load").
A more rigorous approach might be to:
lastEvent = get_now()
while(true) {
  unaryCall()
  deadline = generateNextExpDistributedTime(lastEvent);
  waitUntil(deadline);
  lastEvent = deadline;
}

Alternatively, deadline = generateNextExpDistributedTime(get_now()); is also an option.
But actually, what we are doing now might be what's intended, just wanted to point this out.

This isn't how the timers work; we always wait for the next time but the next time is calculated based on the last value of next time plus the exp offset, not after the unary call.

Thanks for the explanation!


Any Plugins for Calico with Rancher

Any plan to bring the future to bind Calico Network with Rancher

Any updates on this? We are looking hard at k8s and calico, I would love to still use rancher.

+1


Loading model with keras

Hi.
Could you please show me how to load the pre-trained model using keras.models.load_model()?

same here @xuebinqin


Can I use python 3.5 ?

Can I use python 3.5 ?

I think you can, I have run it with Python 3.6.5.

To use python 3.5 you need to change the code to make it python3.5 compatible. Recently, I have converted it into python3.x compatible.
https://github.com/surajitsaikia27/PY3-Faster-RCNN-TF


Ensure .git/info exists before accessing it

Initialising a Git repository doesn't always create the info directory.

Yeah, this code wasn't written by me and I didn't really check it thoroughly. Thank you!


Docs: Link to the PDF of the handbook is broken

Page URL: https://www.typescriptlang.org/docs/handbook/
Issue: The pdf link goes to: https://www.typescriptlang.org/assets/typescript-handbook-beta.pdf
Displayed in the browser is: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Recommended Fix: I noticed this commit  added the PDF to the .gitIgnore, I imagine that is related(?)
Browser: Chrome version 83.0.4103.61

Interesting! Looks like it's a part of the production build process - for now http://www.staging-typescript.org/assets/typescript-handbook-beta.pdf works!

This should be fixed next time it's deployed (Saturday)


AcceleratorBuffer: Use exp-val-z extra info for getExpectationValueZ() if present

I guess this is a question in the form of a PR. Why does this condition exist (see diff)? I encountered it when working on a VQE benchmark.
For context, I currently don't have a way to pass number of shots to the control software (IGOR) simulator. So it writes a result file with some simulated measurements (for a hardcoded number of "runs") along with the actual state vector. The backend takes the simulated measurement counts and calls appendMeasurement() for those, and then calculates the expectation value of Z directly from the state vector and addExtraInfo("exp-val-z")s that. But originally, the control software just returned the simulated measurements, and I was seeing that the variational optimizer was having trouble converging when using the expectation value calculated by AcceleratorBuffer from those measurements, so then I added the addExtraInfo("exp-val-z") stuff. But I realized that wasn't being used, which I tracked down to this condition.
Is what I'm doing just too weird? I realize the Quantum++ backend decides whether to appendMeasurement() or  addExtraInfo("exp-val-z") based off the presence of the shots param, but the current implementation of the GTRI Accelerator doesn't have a shots parameter or any logic like that.
Testing
Ran ctest. Also added a test for this admittedly strange situation

I think I'm ok with this change. But would you mind updating the else block (the loop over the bit string map) with a check to make sure that the bitStringToCounts map is not empty, and if it is, call xacc::error(). I want to be able to warn devs / users that they are trying to get an expectation value without exp-val-z and without any measured bit strings.

Thanks @amccaskey, hopefully that looks better


Modified compression benchmark to use mongodb.

Tested locally with docker-compose.

Can you try docker compose instead of docker-compose ? Maybe it fixed the test.
Appart of that it looks all good


AOT scanner does absolutely nothing

Hello
I've been fighting with AOT generation for several hours now and now it just feels like the AOT scanner is just broken.
I have a simple struct that I want to serialize. The struct itself also contains a few other structs. Nothing super advanced. It's all just ints, strings, etc.
I have to add every single struct I want to serialize manually when generating an AOT dll. Is this really how it's supposed to be? I even had to add UnityEngine.Vector3Int!
This is my code for generating the dll file.
public void OnPreprocessBuild(BuildReport report)
{
    if (AOTSupportUtilities.ScanProjectForSerializedTypes(out List<Type> supportedTypes))
    {
        supportedTypes.Add(typeof(SaveData));
        supportedTypes.Add(typeof(ObjectData));
        supportedTypes.Add(typeof(ObjectData[]));
        supportedTypes.Add(typeof(ComponentData));
        supportedTypes.Add(typeof(ComponentData[]));
        supportedTypes.Add(typeof(PropertyData));
        supportedTypes.Add(typeof(PropertyData[]));
        supportedTypes.Add(typeof(Vector2Int));
        supportedTypes.Add(typeof(Vector3Int));

        AOTSupportUtilities.GenerateDLL(Application.dataPath + "/Plugins/", "GeneratedAOT", supportedTypes);
    }
}

Am I missing something here or is this by design?
I'm also sorry if this comes up as aggressive, I'm just really tired after working with this for several hours. I'm loving the rest though when it actually works in the editor and I don't want to give up on it just yet!
EDIT: I forgot to mention, checking the generated dll in an IL inspector shows that it's pretty much empty unless I manually add all this stuff.

What the scanner can catch very much depends on how it is saved in the project. The scanner does not scan assemblies or serialization code for usage, it does no code analysis (this would be immensely complicated to implement), it can only scan ScriptableObject assets, and Components on Prefab assets and in scenes - furthermore, it only scans things that it can prove are being included in the build, and which implement the ISerializationCallbackReceiver interface (IE, have custom serialization). It gets the scenes that are included in the build, scans those, and then uses the AssetDatabase to builds a dependency graph. It also scans the Resources and Asset Bundles, and various other things that can be proved to be included in the build.
As you might surmise, this means that the scan comes with a lot of asterisks and caveats attached - it will work fine for you in common usage where you merely derive from SerializedScriptableObject, SerializedMonoBehaviour, and so on. Anything where you invoke the serialization APIs yourself or do anything custom will not (cannot) be scanned by default, and you will have to instruct the scan to catch all those types by yourself, either by being clever and automating the location of your own required types (somehow), or by manually adding them all as you're currently doing.

Tor you mention in your reply that it scans "Components on Prefab assets and in scenes" however it doesn't seem to be scanning components on Prefabs that are not already in the scene and are added later using Instatiate. Or am I missing something? It just goes over assets and checks if they directly implement ISerializationCallbackReceiver which they don't but one of their children has components that do. Which gets ignored by the scan.
So basically a prefab asset is scanned using just this:
public void ScanObject(UnityEngine.Object obj)         {             if (obj is ISerializationCallbackReceiver)             { ...             }         }
Which immediately discards it as the prefab itself doesn't implement the ISerializationCallbackReceiver only his children do.

Prefabs are scanned via ScanAsset, which calls AssetDatabase.LoadAllAssetsAtPath(assetPath) and then scans all of the instances which are returned by Unity as being contained in that asset - which should include all components.


libsigcxx30: 3.0.6 -> 3.0.7

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for libsigcxx30 is: "A typesafe callback system for standard C++"
meta.homepage for libsigcxx30 is: "https://libsigcplusplus.github.io/libsigcplusplus/"
meta.changelog for libsigcxx30 is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 3.0.7 with grep in /nix/store/lhpr80h01c25p2wcahdi2cf0ymb73nfr-libsigc++-3.0.7

found 3.0.7 in filename of file in /nix/store/lhpr80h01c25p2wcahdi2cf0ymb73nfr-libsigc++-3.0.7

directory tree listing: https://gist.github.com/61b20295c8629733d8fdc733e17a78d0

du listing: https://gist.github.com/93a5d735e0123fa0569ae19a26470931

Rebuild report (if merged into master) (click to expand)

23 total rebuild path(s)

6 package rebuild(s)

6 x86_64-linux rebuild(s)
6 i686-linux rebuild(s)
5 x86_64-darwin rebuild(s)
6 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
cairomm_1_16
easyeffects
glibmm_2_68
gtkmm4
libsigcxx30
pangomm_2_48

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/lhpr80h01c25p2wcahdi2cf0ymb73nfr-libsigc++-3.0.7 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A libsigcxx30 https://github.com/r-ryantm/nixpkgs/archive/0fc38b1eb2aa6e3c5d2d60135e280e4d3f6d87ca.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/lhpr80h01c25p2wcahdi2cf0ymb73nfr-libsigc++-3.0.7
ls -la /nix/store/lhpr80h01c25p2wcahdi2cf0ymb73nfr-libsigc++-3.0.7/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

6 packages built:

cairomm_1_16
easyeffects
glibmm_2_68
gtkmm4
libsigcxx30
pangomm_2_48

Maintainer pings
cc @hedning @jtojnar @dasj19 @maxeaubrey for testing.

Changes look okay: https://github.com/libsigcplusplus/libsigcplusplus/commit/657b1b163da89176be90fac1b71bbb7831a823e1