feat: ExplicitElement containClass&defineClass

Codecov Report

Merging #132 (d7f6a52) into master (4a81299) will increase coverage by 1.574%.
The diff coverage is 72.500%.

@@               Coverage Diff               @@
##              master      #132       +/-   ##
===============================================
+ Coverage     30.909%   32.483%   +1.574%
- Complexity       847       895       +48
===============================================
  Files            192       192
  Lines           9117      9137       +20
  Branches        2268      2273        +5
===============================================
+ Hits            2818      2968      +150
+ Misses          5688      5515      -173
- Partials         611       654       +43

Flag
Coverage Δ

unittests
32.483% <72.500%> (+1.574%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...ramework/ContextLightCodeInsightFixtureTestCase.kt
50.000% <50.000%> (-9.615%)
:arrow_down:

...otlin/com/itangcent/intellij/jvm/DuckTypeHelper.kt
49.378% <50.000%> (+42.495%)
:arrow_up:

...om/itangcent/intellij/jvm/element/ExplicitField.kt
45.000% <50.000%> (+9.706%)
:arrow_up:

...om/itangcent/intellij/jvm/element/ExplicitClass.kt
42.157% <55.556%> (+22.365%)
:arrow_up:

.../itangcent/intellij/jvm/element/ExplicitElement.kt
70.833% <88.889%> (+44.167%)
:arrow_up:

...m/itangcent/intellij/jvm/element/ExplicitMethod.kt
92.308% <100.000%> (+63.141%)
:arrow_up:

...tangcent/intellij/jvm/element/ExplicitParameter.kt
90.909% <100.000%> (+65.909%)
:arrow_up:

...ngcent/testFramework/TestCachedResourceResolver.kt
10.526% <0.000%> (-57.895%)
:arrow_down:

.../itangcent/intellij/config/resource/URLResource.kt
0.000% <0.000%> (-47.059%)
:arrow_down:

...gcent/intellij/file/AbstractLocalFileRepository.kt
8.696% <0.000%> (-43.478%)
:arrow_down:

... and 14 more

Continue to review full report at Codecov.

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


Bash/Sh Confused Syntax Highlighting reading .bashrc file

Steps to reproduce

Compile and install latest master from git (as of this bug report).
Open .bashrc file (vim ~/.bashrc)

Expected behaviour
The latest version of runtime/sh.vim (https://github.com/vim/vim/commit/be4e01637e71c8d5095c33b9861fd70b41476732) breaks syntax highlighting, particularly with recognizing quoted text. It seems to be confused when quotes begin and end, and ends up treating code as quotes in some portions of the file. The previous version of runtime/sh.vim (https://github.com/vim/vim/commit/86b4816766d976a7ecd4403eca1f8bf6b4105800) works fine as far as I can tell.
I've mainly tested it on a .bashrc file, but it has similar issues in some other bash files.
Edit: Just to be sure, I've tested it in a few different terminal environments with the same result.
Version of Vim
Master (v 9.0 with patches 1-1303)
Environment
Linux debian-dell 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
Logs and stack traces
No response

Hmm, perhaps you could rectify some things, too. Please provide a (preferably short) example of the issue, don't send an image -- send text so I can test with it and not have to spend a lot of time re-typing it, and be clear about where the problem is. Thanks!

Hmm, perhaps you could rectify some things, too. Please provide a (preferably short) example of the issue, don't send an image -- send text so I can test with it and not have to spend a lot of time re-typing it, and be clear about where the problem is. Thanks!

I can also confirm that there was some kind of syntax highlighting bug after updating vim today.

I also ran into a similar issue with the last vim update: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Feb 11 2023 11:15:25)

This is how it looked with a previous VIM version: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jan 12 2023 18:55:27)

And the example code:
#!/usr/bin/env bash
# args: since (e.g: 2 months)

set -euo pipefail

worktree=$(git rev-parse --show-toplevel --show-prefix | paste -sd/ -)
cd "$worktree"

git log --format= --name-only --since "${*:-1970}" --relative \
| sort \
| uniq -cd \
| sort -nk1 \
| tail -n 50

Hmm, perhaps you could rectify some things, too. Please provide a (preferably short) example of the issue, don't send an image -- send text so I can test with it and not have to spend a lot of time re-typing it, and be clear about where the problem is. Thanks!

Sure. The file starts out with comments in blue as usual, then when the code starts, almost everything is colored violet regardless of syntax purpose (except for a couple of small bits like punctuation), even through another set of comments, which should have gone back to being blue. But aside from comments later being colored blue in some places, it looks like it mostly disregards syntax rules and colors vast swaths of things violet.
Below I've pasted a portion of the text of the .bashrc file followed by a marked up version showing where colors start and stop using XML style color /color tags.
---------------------------------------------
.bashrc snippet:

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

-----------------------------

.bashrc snippet with <color> </color> tags:

<blue># ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything</blue>
<violet>case $- in
    *i*) <yellow>;;</yellow>
      *) <yellow>return;;</yellow>
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE<yellow>=</yellow><red>1000</red>
HISTFILESIZE<yellow>=</yellow><red>2000</red></violet>

<blue># check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.</blue>
<violet>shopt -s checkwinsize</violet>

Here's another example:
#!/bin/bash

set -e -f -u -o pipefail

update_one_dir() {
  if [[ ! -f ".pre-commit-config.yaml" ]]; then
    return
  fi
  pre-commit autoupdate
  if ! git check-local-copy-is-clean; then
    pre-commit run --all-files
    git commit -a -m 'Update hooks version.'
    git push
  fi
}

check-git-repos --pull_and_push "$(pwd)"
update_one_dir

Everything from line 9 (pre-commit autoupdate) through to line 17 (update_one_dir) is violet.  The syntax of each line is shCmdSubRegion, whereas in an earlier version it was shFunctionOne or empty.  In https://github.com/vim/vim/commit/be4e01637e71c8d5095c33b9861fd70b41476732#diff-650e28e4ad6a5c9241345580a7136ff18b5629f3b4910a5b5a455828bca5e517R338 I see this diff at line 336/338:
 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]"  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList
 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]\|$"  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList

Reverting that line returns highlighting to normal.

Here's another example:
#!/bin/bash

set -e -f -u -o pipefail

update_one_dir() {
  if [[ ! -f ".pre-commit-config.yaml" ]]; then
    return
  fi
  pre-commit autoupdate
  if ! git check-local-copy-is-clean; then
    pre-commit run --all-files
    git commit -a -m 'Update hooks version.'
    git push
  fi
}

check-git-repos --pull_and_push "$(pwd)"
update_one_dir

Everything from line 9 (pre-commit autoupdate) through to line 17 (update_one_dir) is violet. The syntax of each line is shCmdSubRegion, whereas in an earlier version it was shFunctionOne or empty. In be4e016#diff-650e28e4ad6a5c9241345580a7136ff18b5629f3b4910a5b5a455828bca5e517R338 I see this diff at line 336/338:
 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]"  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList
 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]\|$"  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList

Reverting that line returns highlighting to normal.

Good find. I meant to try reverting some of the changes, but I got sidetracked with some vimscript tutorials.

Have you tried sh.vim version 207 from @cecamp's website?

Have you tried sh.vim version 207 from @cecamp's website?

I haven't tried it. But just putting the previous version of sh.vim into your home directory's .vim/syntax directory fixes the problem. Even doing that with the version of sh.vim that comes with Debian's vim works.

A simple script also fails to highlight properly.
#!/usr/bin/env sh

var="${1}";

if [ -z "${var}" ]; then
    echo 'empty var';
fi

@pellea72 please answer the question that @k-takata asked, we want to know if version 207 fixes this problem.
It's unlikely we would use a previous version if a newer version exists.

In be4e016#diff-650e28e4ad6a5c9241345580a7136ff18b5629f3b4910a5b5a455828bca5e517R338 I see this diff at line 336/338:
 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]"  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList
 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]\|$"  skip='\\\\\|\\.' end=")"  contains=@shCommandSubList

Reverting that line returns highlighting to normal.

Changing the start="\$(\ze[^(]\|$" to start="\$(\ze[^(]\?" fixes this issue as well, perhaps better than simply reverting the line.

With current syntax*
With line reverted
With my change

*  as of cfce5cf542db20c7beba5b4211c0ae3305a64a43
Perhaps @cecamp would take this simple change instead of a revert.
Aside: Adding hi def link shCmdSubRegion Error helped me nail this down.
Here's the text of the script in the image
#!/bin/sh

case $- in
    *i*) ;;
    *) return;;
esac

# Comment

VAR=$(subshell)
VAR=$(
    multi-line
)
$(
    multi-line
)
$(( arith ))
$((
    arith
))

Today's update to runtime/sh.vim fixed it. Thanks for your efforts.


AzureCLICredential: exec: "C:\WINDOWS\cmd.exe": file does not exist

Windows 10 21H2
PowerShell 7.2.6
Installed Azure\kubelogin by exec az aks install-cli. It's currently version 0.0.20.
PS C:\> $env:PATH.split(";") | Sort-Object
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin
C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\Azure Data Studio\bin
C:\Program Files\Docker\Docker\resources\bin
C:\Program Files\dotnet\
C:\Program Files\Git\cmd
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\Intel(R) Memory and Storage Tool\
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
C:\Program Files\Microsoft SQL Server\150\Tools\Binn\
C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\
C:\Program Files\nodejs
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\Program Files\OpenSSL\bin
C:\Program Files\PowerShell\7
C:\Program Files\PowerShell\7\
C:\Program Files\Solidigm\Solidigm(TM) Storage Tool\
C:\ProgramData\chocolatey\bin
C:\ProgramData\DockerDesktop\version-bin
C:\Python310\
C:\Python310\Scripts\
C:\Python39\
C:\Python39\Scripts\
C:\Users\kdaley\.azure-kubelogin
C:\Users\kdaley\.dotnet\tools
C:\Users\kdaley\AppData\Local\GitHubDesktop\bin
C:\Users\kdaley\AppData\Local\Microsoft\WindowsApps
C:\Users\kdaley\AppData\Local\Programs\Fiddler
C:\Users\kdaley\AppData\Local\Programs\Microsoft VS Code\bin
C:\Users\kdaley\AppData\Roaming\nvm
C:\WINDOWS
C:\WINDOWS\system32
C:\WINDOWS\System32\OpenSSH\
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\

This is how I prepared everything.
PS C:\> az login
PS C:\> az account set -s={SUB_ID}
PS C:\> az aks get-credentials -g cluster-resources -n my-aks-cluster
A different object named clusterUser_cluster-resources_my-aks-cluster already exists in your kubeconfig file.
Overwrite? (y/n): y
Merged "my-aks-cluster" as current context in C:\Users\kdaley\.kube\config
PS C:\> kubelogin convert-kubeconfig -l azurecli

Finally, I just want kubectl to get me a version number.
PS C:\> kubectl version
Error: failed to get token: expected an empty error but received: AzureCLICredential: exec: "C:\\WINDOWS\\cmd.exe": file does not exist
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:44:59Z", GoVersion:"go1.19", Compiler:"gc", Platform:"windows/amd64"}
Kustomize Version: v4.5.7
Unable to connect to the server: getting credentials: exec: executable kubelogin failed with exit code 1

Not sure why it's looking for cmd.exe in the root of Windows?
(Omitted some for brevity, such as C:\Windows\servicing\LCU\Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1826.1.8 and C:\Windows\WinSxS\amd64_microsoft-windows-commandprompt_31bf3856ad364e35_10.0.19041.746_none_...)
PS C:\Windows\System32> Get-ChildItem -Path C:\Windows -Filter cmd.exe -Recurse -ErrorAction SilentlyContinue -Force
    Directory: C:\Windows\System32

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            4/9/2021  8:48 AM         289792 cmd.exe

    Directory: C:\Windows\SysWOW64

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            4/9/2021  8:49 AM         236544 cmd.exe

I copied cmd.exe to my WINDOWS directory and it worked... but I'm only going to keep it there temporarily.

@DaleyKD from this code it's using the cmd.exe to invoke the az cli. I'm guessing for some reason cmd.exe isn't available in your search path? does typing cmd.exe work?

@weinong : That code also shows that it's getting the %SYSTEMROOT% directory. That resolves to C:\WINDOWS on all of my machines. That is NOT where cmd.exe lives. I would think it should be %WINDIR%\system32 or %COMSPEC% (which is the full path to cmd.exe).
But to answer your question, yes, cmd.exe was in my search path (%PATH%). It is in C:\windows\system32 which is in my %PATH% environment variable. And when I type cmd.exe, it opens right up.


feat(router): provide access to all route params via router service. resolves #39

Problem:
Expose route params from the router component back to router service to have it available for all components.
The tricky part:
Since routes are not configured in central configuration (like in @angular/router) but rather loaded and parsed asynchronously from components, the routeParams will change until parsing has been fully finished.
Unrelated bug fixed separately (found in router component and service):
distinctUntilChanged does value referential comparison. It works nicely for strings, but for objects (such as Params) a custom comparison function must be provided e.g.:
const paramsCompare = (x,y) = x === y || JSON.stringify(x) === JSON.stringify(y)

@brandonroberts please verify if you agree with this functionality

How does this handle naming collisions? I want to keep the route params relatively straightforward, and lean more on using the components to pass data around then trying to collect them all in the router service.

Currently, the child param has priority over the parent param:
// root params -> child params -> child params => pathRoutes
{ owner: 'Joe' } -> { car: 'Mustang' } -> { owner: 'Jane' } => { owner: 'Jane', car: 'Mustang' }

My rationale was to provide as many features as possible from the official @angular/router to motivate devs to migrate. Two of those features missing are:

route guards (taken in separate issue)
full path params

With the original router, we can access easily all path params (should a component need it). The current solution with angular-routing is to depend on parent components to pass it down to the child component. This leads to a rigid structure and complications when the component is moved around through DOM.
Back to name handling, we could return Params[] instead of Params. That would avoid naming collision and perhaps also provide more sense of hierarchy of params.
What do you think?

We discussed tabling this feature for now, but will revisit


fix(as-2883): submitted appeals have status set to 'Appeal Received'

fix(as-2883): submitted appeals have status set to 'Appeal Received'

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

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

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

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

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

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


Move IFDEF's to specialized units

In this unit we have the code below:
uses
  Classes, SysUtils,
  {$IFDEF FPC}
    md5,
  {$ELSE}
    IdGlobal, IdHash, IdHashMessageDigest,
  {$ENDIF}

Let's move all $IFDEF from units that is part of API to another specialized units, ie, each unit that can be used by final developers should not have $IFDEF.
I'm thinking of something like that:

In interface session there are no IFDEF's
In implementation session could be includes files (*.inc) to each compiler or 3rd libraries

implementation

uses
  Classes, SysUtils,
  {$IFDEF lazarus}
    {$include james.fpc.md5.inc}
  {$ELSE}
    {$include james.delphi.md5.inc}
  {$ENDIF}

So, each implementation could be isolated.

@nunopicado what do you think?

Unfortunately, with IFDEF's, we tend to need them in several moments inside a single unit, sometimes even inside a single method we need to use them more than once.
For instance, in the example shown, conditional directives are needed in the uses clause and in the method body.
Using an inc file like you propose will require one or two inc files for every time a conditional directive is needed (one if there is no ELSE, two if there is an ELSE). In that unit, as is, it would mean 5 inc files, just for that method alone to compile.
I agree conditional directive affect negatively the readability of the code, but I'm not quite sure those inc files would be a solution, rather a bigger problem in the maintainability of the code.
I once had the same problem, and my solution was to have a proxy unit (meaning only one additional file per unit) where the conditional directives would be centralized as functions the main unit would consume without conditional directives. I'm not sure this approach would fit this project concept, though...

In that unit, as is, it would mean 5 inc files, just for that method alone to compile.

Sorry but I didn't understand why that.
I'm proposing to have just 3 files (1 unit and 2 inc) to each problem that involves IFDEF's.

hmm maybe it was I who didn't understand your idea at first.
To clarify, you propose that whenever a conditional directive is required, all the implementation is moved to a specialized inc file for the platform it represents, is that so?
That would indeed only require 3 files, but wouldn't that also mean duplicated code (for all the code which has the same implementation in both FPC and Delphi) for every unit that requires conditional compilation no matter how small the change is?

That would indeed only require 3 files, but wouldn't that also mean duplicated code (for all the code which has the same implementation in both FPC and Delphi) for every unit that requires conditional compilation no matter how small the change is?

Yes and no. It will depend of the implementation, for example, if a classe has so many methods the code will be duplicated to each plataform. But then this code is "wrong", we should decompose it in little parts to minimaze the duplication — only the signature will be duplicate, not the implementation in these cases.
Here an example. Look this unit here and tell me what do you think about this idea.

I actually don't like that unit very much. I can't tell why, but I think clauses should be grouped by kind, and the idea of having multiple const clauses throughout the same section of the unit feels a little strange.
That being said, I don't think it is a problem with the number of methods.
In the example given, there's only one method. And for that one method we needed two groups of conditional compilation directives, one for the uses section and one for the method itself.
If you put that into one inc file, you would need to put in both the implementation uses clause and the full class implementation, do you agree?
Now, imagine the following. You have a class with 3 methods and 2 constructors. Still well within reasonable limits, right?
One of those methods requires conditional compilation. What would happen then?
Duplicate code from both constructors and the other two methods in order to have one method conditional compiled?
Remember, 3 methods that belong together in the same class. We can't just break the class and split its implementation, because they do belong together. The only problem has to do with the syntax used for the compiler to understand, not the cohesion of the class or the conceptualization of the object.
What would we do then?
Of course we could put the other methods bellow the {$include} directive, so they wouldn't be in the inc file, thus would not be duplicated. But that feels like spaghetti code. Having a class implemented partially on a file and the rest on another feels itchy.
Besides, if the uses clause sits inside the inc file, we'll have another problem, also with duplicated code.
You have units that are common two both platforms, but will be duplicated in the inc file, so when one has to me refactored, the other might have to be as well.
To avoid this you could keep the common units in the interface section uses clause, and keep the specific ones in the implementation section, inside the inc file. But I don't think the interface section uses clause should be abused, for the sake of minimizing dependencies.

You're right... but I didn't think to code this way.
Let's restart and get the code from the first example. Now, after your refactoring, it looks like this:
uses
  Classes, SysUtils,
  {$IFDEF FPC}
    md5,
  {$ELSE}
    hash,
  {$ENDIF}

Then, we have more conditionals:
function TMD5Stream.GetStream: IDataStream;
begin
  Result := TDataStream.New(
    {$IFDEF FPC}
      MD5Print(
        MD5String(
          FOrigin.AsString
        )
      )
    {$ELSE}
      THashMD5.GetHashString(
        FOrigin.AsString
      )
    {$ENDIF}
  );
end;

At a first place, should not exist functions to calculate MD5 inside this object.
We can reuse this algorithm in other place, right?
But this algorithm or better, this MD5 object, has different implementations depending at the compiler.
What I'm proposing is that:

We may have two inc files [1]: james.crypto.md5.fpc.inc and james.crypto.md5.delphi.inc
Both files will implement the same class, ie, TMD5Hash (for example)
Same class name, but different implementations

So, in the main james.crypto.md5.clss unit, into implementation section, we will code:
  {$IFDEF fpc}
    {$include james.crypto.md5.fpc.inc}
  {$ELSE}
    {$include james.crypto.md5.delphi.inc}
  {$ENDIF}

Então, podemos usar a classe TMD5Hash em toda a unidade sem IFDEF.
What do you think?

[1] I improved the namespaces

The use of ".inc" instead ".pas" is just to users don't use these files directly... but maybe is better write a real unit and allow users make their choices.
My main point here is: If you have different implementation to the same concept, we should create others classes, instead of using IFDEF's in just one class.

So in the main unit (james.crypto.md5) we would call the object THashMD5, that would sit inside the inc file. Looks better then, but...
I guess my problem with this resides in the use of inc files.
This would force you to have an uses clause inside the inc file, and that's something I'm not confortable with.
What if THashMD5, being an object on it's own, would sit not on an inc file, but rather on a full blown unit? Say, james.crypto.md5.delphi.pas and james.crypto.md5.fpc.pas.
james.crypto.md5 would have only one compiler directive, in its uses clause, and nothing else. It would call the required functions from the respective unit, when needed.
Being in a unit would also mean that the compiler wouldn't have to constantly recompile the object every time james.crypto.md5 is changed.
What do you think? Any advantage of using inc files instead that I'm not seeing?
Actually, this is more or less what I was referring to when I told you up in this thread about the proxy functions.

Hadn't read your last comment...
That's it, .pas looks to me like a better option, even if it means users can use it directly.

Ok. Let's try this way.
I will do the first refactoring in that unit as soon as possible.

@nunopicado please, take a look at these commits above. Try to run into Delphi and tell me what do you think about.
If everything is working and you're satisfied with this solution, please close the issue for me. Thanks.

Yes, I think is a much better option than the previous inc file based solution.
Just one question, though:
type
  TMD5Hash =
    {$IFDEF fpc}
      James.Crypto.MD5.FPC.TMD5Hash;
    {$ELSE}
      James.Crypto.MD5.Delphi.TMD5Hash;
    {$ENDIF}

This isn't required for a successful compilation. Since the idea was avoid proliferation of compiler directives, could you please explain the choice to include this? Is this for readability or some other reason I'm not quite following?

This isn't required for a successful compilation.

Why not? The TMD5Hash class is an alias for another one. We need to use IFDEF to tell compiler which class it should get.
Maybe we can take both directives (on the uses and declaration type) and put in a new inc file to include just once in MD5 unit.

Not necessary, I don't have anything against the alias.
I just asked because in this particular case (and that was the intention), both the Delphi and FPC classes have the same name, so there's no need for an alias. So if you just take out the alias, since any of the compilers will see only the unit meant to be seen, it will work just the same.

...both the Delphi and FPC classes have the same name, so there's no need for an alias.

Just to organize and make the developer's life easier — me too.
If this class will be only used in james.crypto.md5.clss I agree with you, is not necessary an alias.
But if I would like to use this class in another place? Should I think about IFDEF's in that place? No, I shouldn't.
So, the goal when I created this alias is to maintain all MD5 classes together in one place for developers do not need to think about compilers and IFDEF's.
Do you see now?

So it was about readability... 👍
I thought so, but wanted to be sure.

Not only about readability, but about encapsulation: We are encapsulating the cross compiler problem into the classes.
I do not want that Delphi developers need to search what units is for Delphi or not.

But they wouldn't even without the alias.
When any developer uses james.crypto.md5.clss.pas, they will use the TMD5Stream without concerns on what unit is doing what inside that object. It doensn't matter if it's a Delphi or FPC developer, they will use the same unit.
It will only be helpful you want those users to access directly TMD5Hash (without thinking about what unit really holds that class. Is that your idea?
If so, it makes sense, I didn't think you wanted TMD5Hash available outside TMD5Stream.

It will only be helpful if you want those users to access directly TMD5Hash (without thinking about what unit really holds that class. Is that your idea?
If so, it makes sense, I didn't think you wanted TMD5Hash available outside TMD5Stream.

Exactly that.
We need to use TMD5Stream outside. In fact, we already do that in MD5 Tests, take a look here.

I did. I didn't get the idea before, but it's all clear now.
I like the solution, way better than the previous one with inc files.


Improve the localization concern, moving to around_action #133

Closes #127
What happened
Insight
Switch the locale by using before_action isn't safe, the locale doesn't set return correctly on some request randomly (I faced with that issue on a project).
Here is a similar issue: https://github.com/ruby-i18n/i18n/issues/381
And the official Rails guide also prefer to using around_action to switch the locale  https://guides.rubyonrails.org/i18n.html#managing-the-locale-across-requests (https://github.com/rails/rails/pull/34356)
I also add the configuration for the I18n as since from Rails I18n 1.1.0, the config config.i18n.fallbacks = true (was generated by Rails) isn't correct anymore https://github.com/ruby-i18n/i18n/releases/tag/v1.1.0
Proof Of Work

@byhbt Fixed your comment by adding the comment and change the split from ,  to just , for less confusing


Upgrade dependencies in respect of vulnerabilities

Should resolve feedback from #42

Codecov Report

Merging #43 (7b665d8) into main (2013046) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 7b665d8 differs from pull request most recent head 811cbe2. Consider uploading reports for the commit 811cbe2 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff            @@
##               main      #43   +/-   ##
=========================================
  Coverage     97.50%   97.50%
  Complexity      481      481
=========================================
  Files            64       64
  Lines           840      840
  Branches         63       63
=========================================
  Hits            819      819
  Misses           12       12
  Partials          9        9

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


[2] Automatically assign restricted PSA to customer namespaces

Is your feature request related to a problem? Please describe.
Part of PSP to PSA.
We need to have a way of automatically assigning the restricted PSA policy to all namespaces that customers create.
Describe the solution you'd like
I see two options

Gatekeeper mutating webhook for adding the labels for all non-labeled namesapces.
Configure managed labels via HNC

use-managed-labels

I prefer option 2.
Be careful and determine if there could be any breaking side-effects by using managed labels, also if it might break any existing setup.
** Additional Context **
It might be worth to keep in mind to see what we can do if we ever end up in the situation where another but the restricted PSA needs to be assigned to a customer namespace.
Definition of done:

[ ] Customer created namespaces are automatically assigned the restricted PSA labels.

[ ] Check that customers cannot change which PSA that applies to their namespaces.


Looks like glob needs to be upgraded to at least 3.2.4

Graceful was removed as of glob 3.2.4:
https://github.com/isaacs/node-glob/commit/49122ad716730a7d56a03edb6a5c15225eebe3f1
Installing latest mocha<EMAIL_ADDRESS>) yields:
npm WARN deprecated<EMAIL_ADDRESS>graceful-fs version 3 and before will fail on newer node releases. Please update to<EMAIL_ADDRESS>as soon as possible.

Install log / dep tree:
├─┬<EMAIL_ADDRESS>│ ├──<EMAIL_ADDRESS>│ ├──<EMAIL_ADDRESS>│ ├──<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ │ ├──<EMAIL_ADDRESS>

Thanks for the issue! This is something we're currently aware of:  #2117 #2113 #2111 #2058
From https://github.com/mochajs/mocha/issues/2058#issuecomment-186923581

It's less about node compatibility, and more about npm. Releases [of glob] newer than our current use a caret range (^) in version matching, which isn't supported in older versions of npm.

I'll leave this open for tracking and to prevent additional issues being opened up.

Can anyone show where this breaks in the wild?

/tmp/a$ npm install --save mocha
npm WARN deprecated<EMAIL_ADDRESS>graceful-fs version 3 and before will fail on newer node releases. Please update to<EMAIL_ADDRESS>as soon as possible.
<EMAIL_ADDRESS>node_modules/mocha
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>└──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
Note that the latest version of glob is 7.0.3.

@aldeed Regarding https://github.com/mochajs/mocha/pull/2123#issuecomment-193811872

This outdated dep also causes issues with the upcoming new release of Meteor, requiring a bunch of workarounds to test Meteor apps.

How so? The warning that's presented in node 5.x only occurs during installation. In my tests, cocha still runs, as do the test suites.

@danielstjules It actually breaks Meteor for a different reason, namely, because old glob depends on old minimatch which does a weird closure thing that newer minimatch doesn't do. BUT it appears that the Meteor folks have figured out a fix for it, so this is no longer a concern. BUT it would still be good to get this updated eventually. :)

@danielstjules I'm not sure why you wouldn't update and outdated dependency other than API breakage. Correct me if I'm wrong, but there isn't any breakage here.

npm WARN deprecated<EMAIL_ADDRESS>graceful-fs version 3 and before will fail on newer node releases. Please update to<EMAIL_ADDRESS>as soon as possible.

I don't know about you but a message like the one above would bother me even if it were just on install. NPM complaining about outdated deps should be reason enough.

@aldeed I agree :) Should be able to break backwards compatibility in the next major.
And for reference, here's why can't bump the version right now. Note that it breaks compatibility with npm 1.2.30  and all versions without tilde support.
With glob 3.2.3
$ cat package.json | grep mocha
    "mocha": "~2.4.5"
danielstjules:~/git/testing
$ node --version
v0.10.11
danielstjules:~/git/testing
$ npm --version
1.2.30
danielstjules:~/git/testing
$ npm install
...
<EMAIL_ADDRESS>node_modules/mocha
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>└──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
With glob 7.0.0
$ cat package.json | grep mocha
    "mocha": "dmsakamoto/mocha#update-node-glob"
danielstjules:~/git/testing
$ npm install
...
npm ERR! Error: No compatible version found<EMAIL_ADDRESS>npm ERR! Valid install targets:
npm ERR! ["1.1.1","1.2.0","1.3.0","1.3.1","1.3.2","1.3.3"]
npm ERR!     at installTargetsError

@danielstjules Interesting... That sucks... lol

Shoot, looks like something else already potentially broke backwards compatibility depending on how things resolve. I had to npm cache clean to get things working when I tried it again.

Why should support 0.10.11 that is not the latest version of 0.10.x.

Neither npm 1.2 nor 1.4 are supported by upstream and they have stability & security issues that'll never get fixed. The same applies to Node 0.10.11. Supporting those versions that no one in their right mind should be running at the cost of issues with newer, still supported versions is a weird strategy.

@mgol Agreed. But if they really want, one can throw in a PR to the glob project to handle different versions of Node.JS differently.
Reminds me of funtimes with C/C++ and version-checking macros!

https://github.com/mochajs/mocha/pulls?utf8=✓&q=glob

Why not just releasing next major version leaving meteor folks and whoever uses old node with @2 and others with @3?

Any news?

presenting: npm install<EMAIL_ADDRESS>

Sorry for the lack of news. We are in a state where we aren't highly eager about merging/releasing changes until browser tests are added back to CI: #2079 – some undetected breaking changes were introduced in the browser and we had to revert, republish, etc. We'd like to avoid something similar from happening again, and browser tests in CI would allow us to move fast with way higher confidence that we aren't breaking people again.
We are looking into getting that going, sorry for the hassle.

The update to<EMAIL_ADDRESS>was fine.

Neither npm 1.2 nor 1.4 are supported by upstream and they have known stability & security issues that'll never get fixed. The same applies to Node 0.10.11. Supporting those versions that no one in their right mind should be running at the cost of issues with newer, still supported versions is a weird strategy.

Mocha isn't your run-of-the-mill library.  As a test framework, Mocha 2.x is in the unique position of needing to support older versions of node and npm.  A portion of our users are locked into old versions; they do not have a choice of what version of node or npm to use.
Continuing to support these users--and not releasing a breaking change before a major--is higher priority for this project than suppressing a warning message.

FWIW, that warning is now suppressed, but they renamed Jade to "Pug"...

Maybe relate to #2215

You can just upgrade to 3.2.4
that's optional https://github.com/isaacs/node-glob/commit/49122ad716730a7d56a03edb6a5c15225eebe3f1


Update sys-dm-pdw-exec-requests-transact-sql.md

change column type to decimal.

Microsoft authors of articles need to make updates through the private repository so the updates can be staged and validated by the current validation rules. After you review staging and fix all validation issues, you can add the sign-off comment to let the PR reviewers know the updates are ready to be merged.It's easy to access the private repo version of your articles in GitHub. Just add -pr to the URL, as follows:
Public repo URL: https://github.com/Microsoft/azure-docs/blob/master/articles/azure-portal-overview.md
Private repo URL: https://github.com/Microsoft/azure-docs-pr/blob/master/articles/azure-portal-overview.md
We have closed this pull request. Please resubmit the updates through the private repo. If you need perms to the private repo, see the contributor guide instructions


Does the target.txt has to be in the same order as .fam file or pheno file?

Given that target.txt doesn't use any IID, in which order should it be given? Exactly the same as .fam file or as pheno file?

Hi,
That's correct. Apology for this unclear part. We will revise the documentation.


Jofinn/fix session id crash

Move the fetching of sessionId to disrupt a race condition where we get intermittent failures (exceptions) trying to access Core scripts.
Wrap the fetch in try/catch so that even if it fails it will still execute tests, it just won't report sessionId. If we see a lot of reports of test results with no session Id's we can revisit to look for a better solution/placement of the code.

Move the fetching of sessionId to disrupt a race condition where we get intermittent failures (exceptions) trying to access Core scripts.
Wrap the fetch in try/catch so that even if it fails it will still execute tests, it just won't report sessionId. If we see a lot of reports of test results with no session Id's we can revisit to look for a better solution/placement of the code.

DOC modernization may eventually make this method of fetching sessionId invalid. We should consider adding SessionId to the test results in the future so we don't need to query for it separately.


Flatpak .desktop not detected despite $XDG_DATA_DIRS

This is not a dupe of #81 or #115. I am using tofi-drun and have deleted ~/.cache/tofi-drun multiple times. While doing so helped some previously missing programs show up, flatpak applications still do not show up.
echo $XDG_DATA_DIRS
>>> /home/jh/.local/share/flatpak/exports/share /var/lib/flatpak/exports/share /nix/store/pwmiaglhbyaiyfhc0fmg4jdjblxvmbys-desktops/share /home/jh/.nix-profile/share /nix/profile/share /home/jh/.local/state/nix/profile/share /etc/profiles/per-user/jh/share /nix/var/nix/profiles/default/share /run/current-system/sw/share

ls -l /var/lib/flatpak/exports/share/applications/
>>> total 12
lrwxrwxrwx 1 root root 113 May  1 15:48 com.atlauncher.ATLauncher.desktop -> ../../../app/com.atlauncher.ATLauncher/current/active/export/share/applications/com.atlauncher.ATLauncher.desktop
lrwxrwxrwx 1 root root 115 May  1 16:00 com.github.tchx84.Flatseal.desktop -> ../../../app/com.github.tchx84.Flatseal/current/active/export/share/applications/com.github.tchx84.Flatseal.desktop
-rw-r--r-- 1 root root  13 May  1 16:00 mimeinfo.cache

Any help would be appreciated. Thanks!

...a reboot and deleting tofi-drun one more time seems to have solved this. Weird.

I'm having this issue, anyone else?
/yang/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share my XDG_DATA_DIRS looks fine..

For some reason, cache doesn't get updated, you'll have to go to .cache and delete them, I have no idea why. It's bugging me

Same  issue except it's for nixpkgs if I use another launcher it works but not for tofi, I also deleted .cache file and still didn't work


Update cover image on docs site

Updates the cover image from a generic Moov graphic to Fed-branded one.

Updated the social image on the repository settings.


fixed helm repo add command in docs

What changes were proposed in this pull request?
fixed "helm repo add" command to use "confluentinc" as namespace
How was this patch tested?
manually tested command

@confluentinc It looks like @coughman just signed our Contributor License Agreement. :+1:
Always at your service,
clabot


Filter TimeOut

On page-hashtag and page-hashtag-list, before a filter gets toggled there is a TimeOut set. This should be replaced with delay.

Xardas will changes this using $$


Review Buildship support for Kotlin build scripts

Related cards on the gradle/buildship board:

Buildship Kotlin Support Epic
Buildship Kotlin Support prototype

The fundamental difference between IDEA and Eclipse is that in Eclipse you have to support multiple project root with individual setting.


python3Packages.sagemaker: 2.29.1 -> 2.29.2

Motivation for this change
Update
Things done

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

[ ] NixOS
[ ] macOS
[x] other Linux distributions

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

Result of nixpkgs-review pr 116427 at ec20f9f7 run on aarch64-linux 1

2 packages built successfully:

python38Packages.sagemaker
python39Packages.sagemaker


"Shipping No." and "Receiving No." in T5740 Transfer Header

Hi,
we need "Shipping No." and "Receiving No." fields in "Transfer Header" to preassign posted document nos. similary to "Sales/Purchase Header" behaviour.
This need a refactor of tables and CU, not only a new event:

Thank you
S.

New event OnBeforeGenNextNo in CU 5704 and 5705 fixes this issue, but now there is a bug #2210


Add support for rustsym 0.3.0 which enables searching for macros

Adds support for rustsym 0.3.0 which enables searching for macros via Go To Symbol.

Thank you for your contribution 👍


fix: release controller oomkill on start up

this commit fixes the OOMKill happening during controller start up by increase the memory resources for the pod.
Signed-off-by: Leandro Mendes<EMAIL_ADDRESS>

/lgtm

/test appstudio-upgrade-tests


Controller API to manage and trigger ZCL scenes

Problem
Need Controller API to

Create a scene
Delete a scene
Enumerate existing scenes
Store scenes in persistent storage
Trigger a scene, by constructing ZCL command and sending it to the devices

Proposed Solution
It's possible to do 1, 2, 3, and 4 in the controller application. Need more analysis to determine if there is any benefit in providing this as part of CHIP Controller API.

@woody-apple - implementing scenes seems like significant feature work that is not in the "late" list of acl/ota/im/group.
This does not look like v1.

This is mostly complete.


Matrix and Table dataviews do not support Conditional Formatting. But I see that standard Matrix visual has option to set CF for  Cell Values.  Could you clarify or provide  code sample.

[Enter feedback here]

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

ID: b3300d18-dfe1-a0a0-597e-2f5760924ca1
Version Independent ID: 29fd380a-48fa-a99c-0e3a-4e3b314f99dd
Content: Conditional formatting in Power BI embedded analytics - Power BI
Content Source: powerbi-docs/developer/visuals/conditional-format.md
Service: powerbi
Sub-service: powerbi-custom-visuals
GitHub Login: @mberdugo
Microsoft Alias: monaberdugo

Thanks for your comment, @ConstructionProject. This issue has been assigned to the doc author for review.

Hi, @ConstructionProject. Thanks for your question, and sorry for the delayed response. I sent your question to the developers, and they said that matrix based custom visuals don’t support conditional formatting and we didn’t do anything explicit to support CF for cell values (though it might just be enabled by default).
I hope this clarifies things.


Show Smart Interstitial Ad

Hello, Sir you are doing really great work.
Please add feature show smart interstitial  ad and native ads functionality.
Thank you.

@codeslack  what is smart interstitial? and native ads feature is already planned.


refactor!: update module to v3

BREAKING CHANGE: import paths will need to change to v3
Signed-off-by: Elizabeth J Lee<EMAIL_ADDRESS>

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-messaging/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:

[ ] I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
[x] I am not introducing a new dependency (add notes below if you are)
[ ] I have added unit tests for the new feature or bug fix (if not, why?) - NA
[ ] I have fully tested (add details below) this the new feature or bug fix (if not, why?) - NA
[ ] I have opened a PR for the related docs change (if not, why?) - NA

Testing Instructions

New Dependency Instructions (If applicable)

Codecov Report

Merging #201 (79a0e04) into main (90e04ff) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 79a0e04 differs from pull request most recent head 189c2d2. Consider uploading reports for the commit 189c2d2 to get more accurate results

@@           Coverage Diff           @@
##             main     #201   +/-   ##
=======================================
  Coverage   75.38%   75.38%
=======================================
  Files          20       20
  Lines         914      914
=======================================
  Hits          689      689
  Misses        173      173
  Partials       52       52

Impacted Files
Coverage Δ

clients/command.go
47.70% <ø> (ø)

internal/pkg/mqtt/client.go
92.59% <ø> (ø)

internal/pkg/mqtt/client_options.go
86.48% <ø> (ø)

internal/pkg/nats/client.go
73.77% <ø> (ø)

internal/pkg/nats/jetstream/client.go
53.48% <ø> (ø)

internal/pkg/nats/jetstream/connection.go
0.00% <ø> (ø)

internal/pkg/nats/jetstream/stream.go
100.00% <ø> (ø)

internal/pkg/nats/marshaller.go
91.83% <ø> (ø)

internal/pkg/nats/options.go
87.30% <ø> (ø)

internal/pkg/redis/client.go
89.34% <ø> (ø)

... and 5 more

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


No support for Expression.Default

I have a class with complex expression tree building method which utilizes Expression.Default under the hood.
public Expression<Func<TEntity, bool>> Build<TEntity, TValue>(
    ExtractionModel<TValue> extractionModel,
    Expression<Func<TEntity, TValue?>> propertySelector)
    where TEntity : class, IAuditedEntity
    where TValue : struct
{
    var expression = PredicateBuilder.New<TEntity>(true);

    if (extractionModel?.Include?.Any() is not true && extractionModel?.Exclude?.Any() is not true)
    {
        return expression;
    }

    if (extractionModel.Include?.Any() is true)
    {
        var filterExpression = BuildInternal(extractionModel.Include, propertySelector, true);
        expression = expression.And(filterExpression);
    }

    if (extractionModel.Exclude?.Any() is true)
    {
        var filterExpression = BuildInternal(extractionModel.Exclude, propertySelector, false);
        expression = expression.And(filterExpression);
    }

    return expression;
}

private static Expression<Func<TEntity, bool>> BuildInternal<TEntity, TValue>(
    HashSet<TValue> extractionCollection,
    Expression<Func<TEntity, TValue?>> propertySelector,
    bool positiveCheck)
    where TEntity : IAuditedEntity
    where TValue : struct
{
    var propertyType = typeof(TValue?);

    var valueProperty = propertyType.GetProperty(nameof(Nullable<TValue>.Value))!;
    var valueExpression = Expression.Property(propertySelector.Body, valueProperty);

    // var valueExistsExpression = Expression.NotEqual(propertySelector.Body, Expression.Default(propertyType));
    var valueExistsExpression = Expression.NotEqual(propertySelector.Body, Expression.Constant(default(TValue?)));

    var closure = new { Value = extractionCollection };
    var closureExpression = Expression.Property(Expression.Constant(closure), nameof(closure.Value));

    var containsExpression = Expression.Call(closureExpression, "Contains", Type.EmptyTypes, valueExpression);

    var andExpression = positiveCheck
        ? Expression.AndAlso(valueExistsExpression, containsExpression)
        : Expression.AndAlso(valueExistsExpression, Expression.Not(containsExpression));

    return Expression.Lambda<Func<TEntity, bool>>(andExpression, propertySelector.Parameters.First());
}

After this method invocation ExpressionVisitor throws an exception stating: Unhandled expression type: 'Default'
The most interesting part of it is that the first method call and combining the expressions works perfectly fine, but on the second call it throws exception mentioned before.

Is it possible for you to try the code in #182? I guess it should work for you

Closing this one because this issue is addressed by #182


vendoring: split sync and update make targets

The sync target previously regenerated the poetry.lock for vendored
packages, causing larger than necessary change set for patches. This
change introduces the update target to specifically handle lock file
updates, lock target to regenerate the lock file and repurpose the sync
target to only sync as expected.

I modified vendors/pyproject.toml as following:
$ git diff vendors/pyproject.toml
diff --git a/vendors/pyproject.toml b/vendors/pyproject.toml
index 69ccbd0..75d101c 100644
--- a/vendors/pyproject.toml
+++ b/vendors/pyproject.toml
@@ -22,6 +22,6 @@ classifiers = [
 python = "^3.6"

 jsonschema = "^3.2.0"
-lark-parser = "^0.9.0"
+lark-parser = { git = "https://github.com/MegaIng/lark.git", branch = "custom_import_sources" }
 packaging = "^20.1"
 tomlkit = ">=0.7.0,<1.0.0"

Then I ran make vendor/sync:
$ make SHELL=bash vendor/sync
# regenerate vendor.txt file (exported from lockfile)
~/workspace/poetry-core/vendors ~/workspace/poetry-core
# vendor packages
Load configuration... Done!
Clean existing libraries... Done!
Add vendored libraries...
  Running pip install -t poetry/core/_vendor -r poetry/core/_vendor/vendor.txt --no-compile --no-deps
    ERROR: Invalid requirement: 'Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.' (from line 9 of poetry/core/_vendor/vendor.txt)
  Command exited with non-zero exit code: 1
# strip out *.pyi stubs

Indeed the following has been generated in poetry/core/_vendor/vendor.txt
$ git diff poetry/core/_vendor/vendor.txt
diff --git a/poetry/core/_vendor/vendor.txt b/poetry/core/_vendor/vendor.txt
index a1c24ba..b6a594b 100644
--- a/poetry/core/_vendor/vendor.txt
+++ b/poetry/core/_vendor/vendor.txt
@@ -1,8 +1,9 @@
 attrs==19.3.0
 jsonschema==3.2.0
-lark-parser==0.9.0
+lark-parser @ git+https://github.com/MegaIng/lark.git@custom_import_sources
 packaging==20.4
 pyparsing==2.4.7
 pyrsistent==0.16.0
 six==1.15.0
 tomlkit==0.7.0
+Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.


Converts all try! macros to ? syntax.

Fixes #46

Thanks for working on this. If you cargo install rustfmt locally, you can check your formatting before pushing.

@stoklund Yep, thanks. I realized I had forgotten to run cargo fmt on the project. Also had fun trying to get the format-all.sh running, as I'm on Windows lol. Manually cargo fmt'd them and fixed the couple of errors that were because currently the ? operator doesn't propagate Result<()> from functions that don't return a value.


manifest.webapp + manifest.json

Node_modules must be installed before the webapp can be hosted on Firefox. 128x128 image icon must be named "icon-128.png" and be placed in the /assets/img directory.

This is on the issue https://github.com/fossasia/open-event-webapp/issues/80

added manifest.json on the same issue

One small change needed (sorry for the nitpick), please put a random icon (even a block of white color would do, we just need a placeholder), at icon/icon.128.png and change the icon paths accordingly.

Hi, I've changed the icon file to lowres.ico in icons instead.

I don't think .ico files works on the chrome webapp, so I added a .png for that. I have confirmed that both updated versions works

Hi, I've added the address below the map. It's actually my first time working with AngularJS so I might be making a mistake here. However, I've tested it and everything works fine

Please fix your commits, there are many commits coming from a merge. there should only be 1 commit per change (PR)

So I'll need to close this request and start and new one and then commit all my work at once?

you can force push to the branch where you did your work and it will appear here. See https://yangsu.github.io/pull-request-tutorial/

I think I am doing something wrong here, I will close this and open up a new one

Really sorry for the mess I made here, I missed a step in the tutorial. I have another pull request set up.


Sync latest datadog release

Updates our buildpack the the latest releases, while preserving our custom changes.

who should review this? all it was was taking in the latest commits from the datadog repo into ours

@marcusmolchany Talked with @jshanman a bit this morning.
Looks like our custom config changes are no longer necessary. Payments uses the mainline build pack already. Justin will swap this out for the mainline version on baron-dev and baron-prod and add the required env vars.

@venku122 we can close this PR right? (trying to close out my github notifications)

Yes


Add note about Cross-Origin-Opener-Policy to MS docs

When testing Wagtail 4.2 compatibility, I came across an issue where the OneDrive file picker was not loading in the popup window after authentication. This appears to be caused by the response having a Cross-Origin-Opener-Policy value of same-origin, the default value set by django.middleware.security.SecurityMiddleware, as of Django 4. This is resolved by setting Cross-Origin-Opener-Policy: unsafe-none.
This PR adds a note to the MS setup docs about configuring this header.

Merged in ec5501dd095509369efa360aef8d7b5693812949


Update readme to fix a few typos

Hey @chrisbjr
I've fixed a few minor typos in the README. E.g. toBroacast to toBroadcast etc. Have a look if you think this should be merged in.
Cheers,
Peter

Thanks @spekulatius!


Clone of #859 on a fork - WIP

Closing since this verifies that #859 makes CI work both in the main repo and a fork.


Reuse {get,set}_position() from list widgets.

This again abstracts from STFL in a few more places.

Coverage increased (+0.07%) to 57.053% when pulling b8966acce0b0c625590283f91eb88de8ad41fdd7 on dennisschagt:feature/further-abstract-from-stfl into 69979cd2b51c4a400d013f80bbee8d1c34692883 on newsboat:master.

Looks good overall, though you missed many opportunities to use const and std::vector::empty(). Can you please amend those?

Of course, done.
Thanks for the review.


Add CLI utility to manipulate planned maintenance through Zino API

We should add a command line utility to aid in manipulation of planned maintenances through the Zino API.  This can make automated PM manipulation easier to implement from any language.
This was an internal suggestion from Sikt's research network team, but needs to be specified more to be realized.

This may be somewhat related to #264 , in that the scripts should have similar mechanisms for retrieving the necessary API credentials.


Colors not displaying properly

Changing the colors in Xresources works for some elements, but not for anything that I type. The vim editor as well as the entering of commands has colors not defined in Xresources. Also, I have to renew dwm for the colors to take effect in the first place. Is there a way to default to Xresources colors?

Accidentally opened this a second time


[sdl2] doesn't control its "optional" deps correctly ....

and feature flags are controlling the wrong variables. Somebody needs to take a closer look at options sdl2 has an how it interacts with the checks in sdlchecks.cmake. A lot of them seem to behave optionally and are not enforced!

I'm afraid there are not enough somebodys around...
For convenience, a port sdl2 issue collection:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+sdl2+in%3Atitle


is there any example on running a cluster

https://github.com/deviantony/docker-elk/wiki/Elasticsearch-cluster
is there any example docker-compose.yml on running a cluster
i had follow this docs,but still can not runing
how to set cluster.initial_master_nodes
discovery.seed_hosts
node.name
by using Compose mode
version: '3.2'

services:
  elasticsearch:
    build:
      context: elasticsearch/
      args:
        ELK_VERSION: $ELK_VERSION
    volumes:
      - type: bind
        source: ./elasticsearch/config/elasticsearch.yml
        target: /usr/share/elasticsearch/config/elasticsearch.yml
        read_only: true
      - type: volume
        source: elasticsearch
        target: /usr/share/elasticsearch/data
    ports:
      - "9200"
      - "9300"
    environment:
      ES_JAVA_OPTS: "-Xmx256m -Xms256m"
      ELASTIC_PASSWORD: "123456"
      # Use single node discovery in order to disable production mode and avoid bootstrap checks.
      # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
      # discovery.type: single-node
      node.max_local_storage_nodes: '3'
    networks:
      - elk

  logstash:
    build:
      context: logstash/
      args:
        ELK_VERSION: $ELK_VERSION
    volumes:
      - type: bind
        source: ./logstash/config/logstash.yml
        target: /usr/share/logstash/config/logstash.yml
        read_only: true
      - type: bind
        source: ./logstash/pipeline
        target: /usr/share/logstash/pipeline
        read_only: true
    ports:
      - "5044:5044"
      - "5000:5000/tcp"
      - "5000:5000/udp"
      - "9600:9600"
    environment:
      LS_JAVA_OPTS: "-Xmx256m -Xms256m"
    networks:
      - elk
    depends_on:
      - elasticsearch

  kibana:
    build:
      context: kibana/
      args:
        ELK_VERSION: $ELK_VERSION
    volumes:
      - type: bind
        source: ./kibana/config/kibana.yml
        target: /usr/share/kibana/config/kibana.yml
        read_only: true
    ports:
      - "5601:5601"
    networks:
      - elk
    depends_on:
      - elasticsearch

networks:
  elk:
    driver: bridge

volumes:
  elasticsearch:

docker-compose up -d --scale elasticsearch=3

Not with Compose no, you need to enable the Swarm mode for this.
After enabling that mode, you will be able to deploy the stack using docker-stack.yml, and follow the instructions at the page you mentioned.

Closing due to inactivity, feel free to reopen in case something else needs to be answered!

Hello, according to docker swarm, how to make data persist? Because after reboot all data on 3 node configuration (one machine), are lose.

hello, Can you give me a complete yaml file that works with the docker swarm version, and an example of an executable command?
I am trying to run the existing docker-compose.yml file with the docker swarm version command like "docker stack deploy es" by looking at the url below, but it is not easy to transform the compose file to be compatible with swarm;
https://github.com/deviantony/docker-elk/wiki/Elasticsearch-cluster
With docker swarm enabled,
Is it possible to run the docker-compose up -d --scale elasticsearch=3 command even now?
{{.Task.Slot}} These commands are not for docker compose, but for docker swarm-only variables.
The contents of the docker-stack file I am trying are as follows.
# docker-compose-stack.yml

version: "3.9"
services:

  # The 'setup' service runs a one-off script which initializes the
  # 'logstash_internal' and 'kibana_system' users inside Elasticsearch with the
  # values of the passwords defined in the '.env' file.
  #
  # This task is only performed during the *initial* startup of the stack. On all
  # subsequent runs, the service simply returns immediately, without performing
  # any modification to existing users.
  setup:
    build:
      context: setup/
      args:
        ELASTIC_VERSION: ${ELASTIC_VERSION}
    init: true
    volumes:
      - setup:/state:Z
      # (!) CA certificate. Generate using instructions from tls/README.md
      - ./tls/kibana/elasticsearch-ca.pem:/elasticsearch-ca.pem:ro,z
    environment:
      ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
      LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-}
      KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-}
      KIBANA_SERVER_PUBLICBASEURL: ${KIBANA_SERVER_PUBLICBASEURL:?err}
    networks:
      - elk
    depends_on:
      - elasticsearch
    container_name: "elk-setup-${ELASTIC_VERSION:-}-${ELASTIC_ENV:-}"

  elasticsearch:
    build:
      context: elasticsearch/
      args:
        ELASTIC_VERSION: ${ELASTIC_VERSION}
    volumes:
      - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,z
      - elasticsearch:/usr/share/elasticsearch/data:z
      # (!) TLS certificates. Generate using instructions from tls/README.md.
      - ./tls/elasticsearch/elasticsearch.p12:/usr/share/elasticsearch/config/elasticsearch.p12:ro,z
      - ./tls/elasticsearch/http.p12:/usr/share/elasticsearch/config/http.p12:ro,z
    ports:
    #- mode: host
    - mode: ingress
      target: 9200
      published: 9200
      protocol: tcp
    - mode: ingress
      target: 9300
      published: 9300
      protocol: tcp
    #- "9200:9200"
    #- "9300:9300"
    #- '9200'
    #- '9300'
    environment:
      # ES_JAVA_OPTS: -Xms512m -Xmx512m
      ES_JAVA_OPTS: -Xms2g -Xmx2g
      # Bootstrap password.
      # Used to initialize the keystore during the initial startup of
      # Elasticsearch. Ignored on subsequent runs.
      ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
      ELASTIC_VERSION: ${ELASTIC_VERSION:-}
      ELASTIC_ENV: ${ELASTIC_ENV:-}
      # Use single node discovery in order to disable production mode and avoid bootstrap checks.
      # see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
      #discovery.type: single-node

      # Force publishing on the 'elk' overlay.
      network.publish_host: _eth0_
      # Set a predictable node name.
      node.name: elk_elasticsearch.{{.Task.Slot}}
      # Disable single-node discovery.
      #discovery.type: 'single-node'
      # Use internal Docker round-robin DNS for unicast discovery.
      discovery.seed_hosts: tasks.elasticsearch
      # Define initial masters, assuming a cluster size of at least 3.
      cluster.initial_master_nodes: elk_elasticsearch.1,elk_elasticsearch.2,elk_elasticsearch.3
      #node.max_local_storage_nodes: '3'   # elasticsearch v8부터 옵션 사라졌다고 함

    networks:
      - elk
    restart: always
    #container_name: "elk-elasticsearch-${ELASTIC_VERSION:-}-${ELASTIC_ENV:-}"

  logstash:
    build:
      context: logstash/
      args:
        ELASTIC_VERSION: ${ELASTIC_VERSION}
    volumes:
      - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,Z
      - ./logstash/pipeline:/usr/share/logstash/pipeline:ro,Z
      # (!) CA certificate. Generate using instructions from tls/README.md
      - ./tls/kibana/elasticsearch-ca.pem:/usr/share/logstash/config/elasticsearch-ca.pem:ro,z
    ports:
      #- "5044:5044"
      # - "5000:5000/tcp"
      #- "${LOGSTASH_PORT_INPUT}:5000/tcp"
      # - "5000:5000/udp"
      #- "${LOGSTASH_PORT_INPUT}:5000/udp"
      #- "9600:9600"
      - mode: ingress
        target: 5044
        published: 5044
        protocol: tcp
      - mode: ingress
        target: 5000
        published: ${LOGSTASH_PORT_INPUT}
        protocol: tcp
      - mode: ingress
        target: 5000
        published: ${LOGSTASH_PORT_INPUT}
        protocol: udp
      - mode: ingress
        target: 9600
        published: 9600
        protocol: tcp
    environment:
      LS_JAVA_OPTS: -Xms256m -Xmx256m
      LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-}
    networks:
      - elk
    restart: always
    depends_on:
      - elasticsearch
    container_name: "elk-logstash-${ELASTIC_VERSION:-}-${ELASTIC_ENV:-}"

  kibana:
    build:
      context: kibana/
      args:
        ELASTIC_VERSION: ${ELASTIC_VERSION}
    volumes:
      - ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z
      # (!) TLS certificates. Generate using instructions from tls/README.md.
      - ./tls/kibana/elasticsearch-ca.pem:/usr/share/kibana/config/elasticsearch-ca.pem:ro,z
      - ./tls/kibana/instance.crt:/usr/share/kibana/config/instance.crt:ro,z
      - ./tls/kibana/instance.key:/usr/share/kibana/config/instance.key:ro,z
    ports:
    - mode: ingress
      target: 5601
      published: 5601
      protocol: tcp
      #- "5601:5601"
    environment:
      KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-}
      KIBANA_SERVER_PUBLICBASEURL: ${KIBANA_SERVER_PUBLICBASEURL:?err}
    networks:
      - elk
    restart: always
    depends_on:
      - elasticsearch
    container_name: "elk-kibana-${ELASTIC_VERSION:-}-${ELASTIC_ENV:-}"

networks:
  elk:
    driver: bridge

volumes:
  setup:
  elasticsearch:


Current build fails: cannot find rust static files

:tada: This issue has been resolved in version 1.3.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Level name font responsiveness

When right beneath 1000px screen width threshold, the level name above the board gets to its second size, way too little for, say 950px, feels like it was created with mobile in mind.
I suggest creating another threshold around around 700px and have the font-size somewhere in between the two values.
Right now the breakpoints are defined "raw", on a per component basis, which makes font management unsustainable. This might be a good time to consider a bit more holistic approach towards media queries throughout the app.

Closed as old, and most likely not up to do date with recent code changes.


feat(typescript_indexer): emit "overrides" edges for overriden methods

Fix a long-standing TODO. Emit overrides edges for methods that override
immediately extended class and implemented interfaces.

I'm not sure if we should also emit "overrides" edges for methods in parent classes beyond the immediately extended/implemented class/interface.

cc @evmar

@kythe could you review?


Investigate usage of job sets at agent job submission level for matchmaking of specific workflows with heterogeneous resources

Impact of the new feature
Job sets allows creating a group of jobs (with different cluster Ids) for a specific set name.
https://htcondor.readthedocs.io/en/latest/users-manual/job-sets.html
This issue is incomplete, but this feature was mentioned at some point during the USCMS AHM and it could be used for different things, so I'm just going to go ahead and describe the feature here. We can think about how we would use it later (e.g.: matchmaking of specific workflows with heterogeneous resources?).
Is your feature request related to a problem? Please describe.
When we submit jobs, we pull all available work from different workflows and submit them in 1 job cluster (this is also more efficient from the submission point of view). However, it's not easy to know what jobs belong to what workflow, unless you look directly into the job classads. Using the condor native job sets feature, would allow us to list all the condor jobs in a workflow and potentially edit, change priority of all jobs at once, etc.
For example, to list the status of all jobs within a set of jobs/workflow, you do:
htcondor jobset status MyJobSet

MyJobSet currently has 3 jobs idle, 5 jobs running, and 0 jobs completed.
MyJobSet contains:
    Job cluster 1234 with 4 total jobs
    Job cluster 1235 with 4 total jobs

Describe the solution you'd like
Implement job sets in the condor plugin.

@khurtado Kenyi, I see this ticket is marked as "In progress" but currently unassigned. Should you self-assign it or should it be moved back to ToDo status?

Let me move it back to Todo


Bump scim version with group id improvements

Bump scim version

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/1193322786

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/1193322786
Status: success


tweet = entry["content"]["item"]["content"]["tweet"]

Hey everybody and thank you for this great tool.
However, I'm facing a strange issue (tested on CentOS 7 as well as MacOS):
 nasty search --query "(from:realdonaldtrump)" --since 2020-10-06 --until 2020-10-07 --filter LATEST --max-tweets -1
leads to this error message:
Traceback (most recent call last):
File "/usr/local/bin/nasty", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/nasty/main.py", line 25, in main
NastyProgram.init(*args).run()
File "/usr/local/lib/python3.6/site-packages/nasty/_cli.py", line 113, in run
for tweet in request.request():
File "/usr/local/lib/python3.6/site-packages/nasty/_retriever/retriever.py", line 66, in next
if not self._update_callback():
File "/usr/local/lib/python3.6/site-packages/nasty/_retriever/retriever.py", line 209, in _update_tweet_stream
batch = self._fetch_batch()
File "/usr/local/lib/python3.6/site-packages/nasty/_retriever/retriever.py", line 352, in _fetch_batch
self._session_get(**self._batch_url()).json()
File "/usr/local/lib/python3.6/site-packages/nasty/_retriever/retriever.py", line 76, in init
self.tweets: Final = self._tweets()
File "/usr/local/lib/python3.6/site-packages/nasty/_retriever/retriever.py", line 90, in _tweets
for tweet_id in self._tweet_ids():
File "/usr/local/lib/python3.6/site-packages/nasty/_retriever/search_retriever.py", line 122, in _tweet_ids
tweet = entry["content"]["item"]["content"]["tweet"]
KeyError: 'tweet'
What makes me wonder is the fact, that other dates and accounts are working fine.
Is there any solution to this problem?
Thank you.

Thanks for reporting this!
It turns out there was only a single offending Tweet:<PHONE_NUMBER>413992961. In this case, Twitter decided to hide the Tweet content behind a "tombstone", but still keep it accessible.
This sould be fixed in the newly published version 0.2.7.


Ignores layer CRS

Hi, this looks quite useful, but it currently requires all layers to be in the same CRS - it really needs to reproject layers on the fly.

Hi @AlisterH,
Yes, we have identified the issue you mentioned and are currently working on an update for the plugin that will address this. The problem arises from using the extent of the main layer to apply to layers displayed in the grid. When the projections of these layers differ, their extent values become incompatible. Rest assured, I am actively working on resolving this issue and we expect to roll out the update soon.
Thank you for bringing this to our attention and for your patience as we enhance the plugin's functionality.
Best regards,
Tharles Andrade


Do not create a new Interface instance when updating

Original issue opened by @ajoaoff at https://github.com/kytos/of_core/issues/35.
When an event of port_change is received, do not create a new instance of Interface if one already exists, but update it.

I'll go ahead and close this issue.
As of now, we've been updating interfaces when handling port description or port status OFPPR_ADD:
https://github.com/kytos-ng/of_core/blob/master/v0x04/utils.py#L110
https://github.com/kytos-ng/of_core/blob/master/main.py#L591


CPU usage

Why does the percentage of CPU usage exceed 100%? I do not understand why the values written to the log file exceed 100.
thx for the help.

Same here, sometimes I get 6000% with a process that uses openmp, even if I divide the percentage by my number of CPUs (8), the resultant percentage does not make sense to me.
I would it be nice if someone can explain us why percentage exceed 100%.
Cheers

Same here, sometimes I get 6000% with a process that uses openmp, even if I divide the percentage by my number of CPUs (8), the resultant percentage does not make sense to me.
I would it be nice if someone can explain us why percentage exceed 100%.
Cheers

From what I have seen using other libraries, it seems the usage is of all threads. It can be that program is using only 6 threads. It's a theory tho. I can't say if it is true or not.

In some cases this can be due to multi-threading, but I sometimes see this for single-threaded processes, and it can usually be fixed by specifying the interval explicitly, e.g. --interval 0.1. If the interval is too short, there are some numerical issues with determining the CPU % I think.

just for the record, I observed the same behavior and as psrecord is using the function cpu_percent() from psutil I found an explanation on its documentation https://psutil.readthedocs.io/en/latest/#psutil.Process.cpu_percent:

the returned value can be > 100.0 in case of a process running multiple threads on different CPU cores.

Related question in psutil.

Related question in psutil.


DOC: use latest numpydoc (#919)

Updated to use the latest numpydoc package (v0.6), removing our custom numpydoc distro and the .. shownumpydoc hack. Docs build much faster now: on my system, it takes 1 minute instead of 3 minutes.
Additional changes:

updated most of skbio.sequence and skbio.tree to use numpydoc's new Yields section (this is for documenting generators). If devs think it's important I can update the entire codebase, but since scikit-bio is undergoing rapid changes right now, it probably makes more sense to update the rest of the docstrings as we tackle specific subpackages.

updated our documentation system README with latest instructions

removed some unnecessary Attributes sections from classes that didn't need them

Fixes #919.

Tests are passing, this is ready for review @ebolyen or @anderspitman

Reviewed. Everything looks good to me.


Add documentation on pattern bindings

Another area that’s not super obvious. Add some documentation that hopefully sheds some light into why pattern bindings exist and what thye do.

@swift-ci Please test

@swift-ci Please test

@swift-ci Please test Windows


match "lf" line endings in .editorconfig for .gitattributes and rubocop

Working with an OS that is notoriously known for its CRLF line endings, I found myself in the following situation:

git checked out all files with CRLF
.editorconfig asked my IDE to safe all changed files with LF
rubocop complained about LF files, as it used the OS default

Therefore I suggest to align the settings of git and rubocop with the .editorconfig.

Working with an OS that is notoriously known for its CRLF line endings, I found myself in the following situation:

The one and only :facepalm:

Therefore I suggest to align the settings of git and rubocop with the .editorconfig.

LGTM, thanks :ok_hand:

Working with an OS that is notoriously known for its CRLF line endings, I found myself in the following situation:

The one and only :facepalm:

Therefore I suggest to align the settings of git and rubocop with the .editorconfig.

LGTM, thanks :ok_hand:


⚠ Quirk Club Argentina (API endpoint) has degraded performance

In 941ff6f, Quirk Club Argentina (API endpoint) (https://us-central1-quirkclub-dev.cloudfunctions.net/api/check/api) experienced degraded performance:

HTTP code: 200
Response time: 8261 ms

Resolved: Quirk Club Argentina (API endpoint) performance has improved in 05e10aa.


Composed UMAP missing _raw_data

Hey @lmcinnes! I'm loving the new model composition feature, thank you for including this in v0.5! I have been playing around with the 0.5dev branch recently and trying to develop a workflow with a multi-output classification problem. I thought I could compose 3 supervised UMAPs and then use semi-supervised learning on any new points with the composed UMAP object. However, after doing a model composition (either union or intersection), it looks like the resulting UMAP object is missing the attributes to do that:
Here, umap_intersection = umap1 * umap2 and I'm trying to transform a new point into that space. Calling umap_intersection.transform(X) gives me:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-55-2c06c39e2862> in <module>
----> 1 umap_intersection.transform(X)

~/anaconda3/envs/env/lib/python3.8/site-packages/umap/umap_.py in transform(self, X)
   2479         """
   2480         # If we fit just a single instance then error
-> 2481         if self._raw_data.shape[0] == 1:
   2482             raise ValueError(
   2483                 "Transform unavailable when model was fit with only a single data sample."

AttributeError: 'UMAP' object has no attribute '_raw_data'

I wasn't totally sure if this is intended behavior - to be honest, I couldn't exactly figure out through the docs whether this is something I should be able to do with a composed UMAP, or whether that composed mapping is essentially "frozen" and only for visualization.

The error could be clearer, but the short answer is that transform isn't supported for composite models yet. It may be in the future, but it will take a little work to figure out the best way to make it work, so is unavailable right now.

Got it! Thanks for the info.


Using camera resolution property with Builder causes 'NoneType' object has no attribute 'shape'

Software Versions

Python: 3.8.5
OS: Ubuntu 20.04 LTS
Kivy: 2.0.0
Kivy installation method: pip install

Describe the bug
Running the demo from  KIVY Camera Demo results in the error. AttributeError: 'NoneType' object has no attribute 'shape'
See: #7285 thanks to @ElliotGarbus for verifying on Windows.
Expected behavior
Demo app should open using default camera (normally /dev/video0 on linux).
To Reproduce
Paste demo code as-is and attempt to run.
Code and Logs and screenshots
'''
Camera Example
==============

This example demonstrates a simple use of the camera. It shows a window with
a buttoned labelled 'play' to turn the camera on and off. Note that
not finding a camera, perhaps because gstreamer is not installed, will
throw an exception during the kv language processing.

'''

# Uncomment these lines to see all the messages
# from kivy.logger import Logger
# import logging
# Logger.setLevel(logging.TRACE)

from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
import time
Builder.load_string('''
<CameraClick>:
    orientation: 'vertical'
    Camera:
        id: camera
        resolution: (640, 480)
        play: False
    ToggleButton:
        text: 'Play'
        on_press: camera.play = not camera.play
        size_hint_y: None
        height: '48dp'
    Button:
        text: 'Capture'
        size_hint_y: None
        height: '48dp'
        on_press: root.capture()
''')

class CameraClick(BoxLayout):
    def capture(self):
        '''
        Function to capture the images and give them the names
        according to their captured time and date.
        '''
        camera = self.ids['camera']
        timestr = time.strftime("%Y%m%d_%H%M%S")
        camera.export_to_png("IMG_{}.png".format(timestr))
        print("Captured")

class TestCamera(App):

    def build(self):
        return CameraClick()

TestCamera().run()

Additional context
Confirming similar behavior here on SO
I discovered by adding some debug prints that it appears multiple camera instances are being created... so I added a traceback dump in kivy.camera.camera_opencv.py
        elif self.opencvMajorVersion in (2, 3, 4):
            # create the device
            print('Dumping stack trace in elif of CameraOpenCV.init_camera ')
            traceback.print_stack()
            self._device = cv2.VideoCapture(self._index)

here is a dump of the output...
[INFO   ] [Logger      ] Record log in /home/user/.kivy/logs/kivy_21-03-03_76.txt
[INFO   ] [Kivy        ] v2.0.0
[INFO   ] [Kivy        ] Installed at "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0]
[INFO   ] [Python      ] Interpreter at "/home/user/dev/ssb/.venv/bin/python"
[INFO   ] [Factory     ] 186 symbols loaded
[INFO   ] [ImageLoaderFFPy] Using ffpyplayer 4.3.2
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_ffpyplayer
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'4.6.0 NVIDIA 450.102.04'>
[INFO   ] [GL          ] OpenGL vendor <b'NVIDIA Corporation'>
[INFO   ] [GL          ] OpenGL renderer <b'Quadro P600/PCIe/SSE2'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 6
[INFO   ] [GL          ] Shading version <b'4.60 NVIDIA'>
[INFO   ] [GL          ] Texture max size <32768>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Camera      ] Provider: opencv(['camera_picamera', 'camera_gi'] ignored)
Dumping stack trace in elif of CameraOpenCV.init_camera
   File "./patchpy.py", line 57, in <module>
     TestCamera().run()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/app.py", line 949, in run
     self._run_prepare()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/app.py", line 919, in _run_prepare
     root = self.build()
   File "./patchpy.py", line 54, in build
     return CameraClick()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/boxlayout.py", line 145, in __init__
     super(BoxLayout, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/widget.py", line 359, in __init__
     self.apply_class_lang_rules(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/widget.py", line 463, in apply_class_lang_rules
     Builder.apply(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 541, in apply
     self._apply_rule(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 659, in _apply_rule
     child = cls(__no_builder=True)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/camera.py", line 91, in __init__
     on_index()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/camera.py", line 101, in _on_index
     self._camera = CoreCamera(index=self.index, stopped=True)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 72, in __init__
     super(CameraOpenCV, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/__init__.py", line 70, in __init__
     self.init_camera()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 112, in init_camera
     traceback.print_stack()
[INFO   ] [Text        ] Provider: sdl2
Debugging widgets/rules in builder.py _apply_rule
print(widget_set,widget,key,value)
Debugging widgets/rules in builder.py _apply_rule
print(widget_set,widget,key,value)
Debugging widgets/rules in builder.py _apply_rule
print(widget_set,widget,key,value)
<__main__.CameraClick object at 0x7faf15849a50> <__main__.CameraClick object at 0x7faf15849a50> orientation vertical
Debugging widgets/rules in builder.py _apply_rule
print(widget_set,widget,key,value)
<kivy.uix.button.Button object at 0x7faee80382e0> <__main__.CameraClick object at 0x7faf15849a50> text Capture
<kivy.uix.button.Button object at 0x7faee80382e0> <__main__.CameraClick object at 0x7faf15849a50> height 48dp
Debugging widgets/rules in builder.py _apply_rule
print(widget_set,widget,key,value)
<kivy.uix.togglebutton.ToggleButton object at 0x7faee92ee120> <__main__.CameraClick object at 0x7faf15849a50> text Start Camera
<kivy.uix.togglebutton.ToggleButton object at 0x7faee92ee120> <__main__.CameraClick object at 0x7faf15849a50> height 48dp
Debugging widgets/rules in builder.py _apply_rule
print(widget_set,widget,key,value)
<kivy.uix.camera.Camera object at 0x7faee9371ba0> <__main__.CameraClick object at 0x7faf15849a50> resolution (640, 480)
Dumping stack trace in elif of CameraOpenCV.init_camera
   File "./patchpy.py", line 57, in <module>
     TestCamera().run()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/app.py", line 949, in run
     self._run_prepare()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/app.py", line 919, in _run_prepare
     root = self.build()
   File "./patchpy.py", line 54, in build
     return CameraClick()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/boxlayout.py", line 145, in __init__
     super(BoxLayout, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/widget.py", line 359, in __init__
     self.apply_class_lang_rules(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/widget.py", line 463, in apply_class_lang_rules
     Builder.apply(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 541, in apply
     self._apply_rule(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 707, in _apply_rule
     setattr(widget_set, key, value)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/camera.py", line 103, in _on_index
     self._camera = CoreCamera(index=self.index,
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 72, in __init__
     super(CameraOpenCV, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/__init__.py", line 70, in __init__
     self.init_camera()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 112, in init_camera
     traceback.print_stack()
[ WARN:0] global /tmp/pip-req-build-ms668fyv/opencv/modules/videoio/src/cap_v4l.cpp (893) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
 Traceback (most recent call last):
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 707, in _apply_rule
     setattr(widget_set, key, value)
   File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
   File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
   File "kivy/properties.pyx", line 840, in kivy.properties.ListProperty.set
   File "kivy/properties.pyx", line 545, in kivy.properties.Property.set
   File "kivy/properties.pyx", line 600, in kivy.properties.Property.dispatch
   File "kivy/_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
   File "kivy/_event.pyx", line 1154, in kivy._event.EventObservers._dispatch
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/camera.py", line 103, in _on_index
     self._camera = CoreCamera(index=self.index,
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 72, in __init__
     super(CameraOpenCV, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/__init__.py", line 70, in __init__
     self.init_camera()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 130, in init_camera
     self._resolution = (int(frame.shape[1]), int(frame.shape[0]))
 AttributeError: 'NoneType' object has no attribute 'shape'

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "./patchpy.py", line 57, in <module>
     TestCamera().run()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/app.py", line 949, in run
     self._run_prepare()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/app.py", line 919, in _run_prepare
     root = self.build()
   File "./patchpy.py", line 54, in build
     return CameraClick()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/boxlayout.py", line 145, in __init__
     super(BoxLayout, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/widget.py", line 359, in __init__
     self.apply_class_lang_rules(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/widget.py", line 463, in apply_class_lang_rules
     Builder.apply(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 541, in apply
     self._apply_rule(
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 712, in _apply_rule
     raise BuilderException(rule.ctx, rule.line,
 kivy.lang.builder.BuilderException: Parser: File "<inline>", line 7:
 ...
       5:        id: camera
       6:        #index: 0
 >>    7:        resolution: (640, 480)
       8:        play: False
       9:    ToggleButton:
 ...
 AttributeError: 'NoneType' object has no attribute 'shape'
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 707, in _apply_rule
     setattr(widget_set, key, value)
   File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
   File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
   File "kivy/properties.pyx", line 840, in kivy.properties.ListProperty.set
   File "kivy/properties.pyx", line 545, in kivy.properties.Property.set
   File "kivy/properties.pyx", line 600, in kivy.properties.Property.dispatch
   File "kivy/_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
   File "kivy/_event.pyx", line 1154, in kivy._event.EventObservers._dispatch
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/uix/camera.py", line 103, in _on_index
     self._camera = CoreCamera(index=self.index,
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 72, in __init__
     super(CameraOpenCV, self).__init__(**kwargs)
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/__init__.py", line 70, in __init__
     self.init_camera()
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/core/camera/camera_opencv.py", line 130, in init_camera
     self._resolution = (int(frame.shape[1]), int(frame.shape[0]))

Full Disclosure: I have no idea how to specifically interpret the code here, so this may not be quite right... but this is what I suspect.
The builder parser finds the Camera object and a camera gets created.  However, if index or resolution properties exists then the code also executes the generic setattr()
                        # if there's a rule
                        if (widget_set != widget or bound or
                                key not in ignored_consts):
                            setattr(widget_set, key, value)

This widget_set object does not seem to reference the same Camera object that gets created earlier.  Note the debug text "Dumping stack trace... " and the following trace lines.  It gets called twice which seems to cause the exact same affect as found in the above referenced SO example.
The camera behaviour indicates this is the case too since the LED turns on for milliseconds (I suspect during the first instantiation) and then turns off until the timeout and results in the above error log.
Notice rule error:
   File "/home/user/dev/ssb/.venv/lib/python3.8/site-packages/kivy/lang/builder.py", line 712, in _apply_rule
     raise BuilderException(rule.ctx, rule.line,
 kivy.lang.builder.BuilderException: Parser: File "<inline>", line 7:
 ...
       5:        id: camera
       6:        #index: 0
 >>    7:        resolution: (640, 480)
       8:        play: False
       9:    ToggleButton:

removing resolution property (or index) causes demo to run as expected.
Hope this helps...

I would suggest to try master because there has been some fixes to camera since 2.0.0.

@matham - I confirmed install from master 2.0.0dev0 works as expected

The Camera class inherits to image, and when the computer doesn't detect the Camera device, it reports the error 'NoneType' object has no 'shape', and I'm looking for a workaround


terraform init does not successfully finish

Executing Task: Terraform Init
The init command expects at most one argument.
Usage: terraform init [options] [DIR]
Initialize a new or existing Terraform working directory by creating
initial files, loading any remote state, downloading modules, etc.
This is the first command that should be run for any new or existing
Terraform configuration per machine. This sets up all the local data
necessary to run Terraform that is typically not committed to version
control.
This command is always safe to run multiple times. Though subsequent runs
may give errors, this command will never delete your configuration or
state. Even so, if you have important information, please back it up prior
to running this command, just in case.
If no arguments are given, the configuration in this working directory
is initialized.

fixed in commit: dea6173149c7e70bd0b11e82766c17c2f96db1c3 waiting for image to build for final testing


E2 Suggestion: Add option to setting menu to disable warnings.

Title

Should be a bit more fine-grained than just on/off

vurv on his way to saying "just fix your code"

For the hundredth time I've probably said this, the warnings aren't even pedantic, and the yellow line won't hurt you.
I am strongly against adding a way to disable them because of this (and since either I'd need to add some sort of indexing/localization for warnings in order to disable specific ones) and since disabling them entirely is just careless when they don't affect you at all.
If there's any unavoidable warnings (e.g. "Unused variable" in #include files that are meant to export variables), those should be fixed internally rather than having a toggle to remove warnings.

If it's really the hundredth time, this is probably not a well received addition to e2 at the moment. I know there are servers refusing to update wiremod because of it, and 'they don't affect you at all' seems like an equally valid reason to add a way to disable them.

Why can't you make warnings smaller like in vs code?

Not sure what you mean by that

@Vurv78

I never even knew that existed, which tells you everyone would ignore them if this was implemented
Either way, vscode does this because it underlines errors and warnings so you'd see them anyway, while the wire editor doesn't, so it needs the validation bar to show you any errors/warnings right now.

just add it


Added support for procedures with resultsets (prepared and direct)

This PR contains the necessary code to execute procedures that return a result set. This works for both prepared statements and direct execute statements.
A simple test case is also included.

Looks okay to me but could you please use pytest fixtures (https://pytest.org/latest/fixture.html) to create and drop the stored procedure in your new test?

Like that?

Perfect, thank you very much!