More aggressive escaping

The spec compliant escaping is probably unrealistic and not safe enough.
Backtick for example and equal are not escaped. The apostrophe missing is especially bad and an accident.

EDIT if you are wondering how in the world someone could miss ' for escaping HTML... you are in good company.
The TL;DR is originally the escaping code was my own code for XML element content (yes that code is ancient but 10-15 years ago it was thought XHTML would win over HTML5 so XML escaping was preferred) as the plan was to somehow provide different escaping for attribute vs element as well as XML vs HTML.
The original Mustache spec only expected

"
&
<
>

But this is obviously not exhaustive for HTML as apostrophe is required unlike XML. I knew this and had planned on offering two escapers for JStachio as well as a lambda for attribute escaping.
I also knew apostrophe representation as an entity can be done in several ways and I had mentally thought about providing an option for that (eg ' vs ' vs the nasty ').
Fast forward many months with some refactoring / API redesign I somehow ended up with just the XML element content escaping with no single quote aka apostrophe escaping.

`
'
=

@casid luckily saw the issue and reported and now we have a potential CVE (or at least requested). They didn't say what it was initially (as you should not in a bug) but I eventually deduced as that was one of the greatest features of JStachio is by nature of compiling it is generally very secure from lots of other attack points. So it was either file path stuff (e.g. ../../) or escaping.
So yeah one of the bigger more embarrassing mistakes in my career/life as developer. I tried so hard to make sure 1.0.0 was solid did not have issues and here were are with basic XSS insecurity.
Going forward I will turn on as much checking as I can like adding Sonar, and CodeQL.
Thank you @casid for finding this.

No worries @agentgt!


allow setting logging levels via istioctl command line

(This is used to request new product features, please visit https://discuss.istio.io for questions on using Istio)
Describe the feature request
Currently istioctl just hard-codes the logging level for everything.
https://github.com/istio/istio/blob/9dbfdf49fb5e575fbf8de3f8c0f228a020797929/istioctl/cmd/root.go#L87-L102
This means we have to make a custom build of istioctl in order to get better debug logging when things aren't working.
istioctl should allow overriding these levels via command line flags.
Describe alternatives you've considered
We tried with --vklog=9 but this only emits not-so-helpful curl logs.
Affected product area (please put an X in all that apply)
[ ] Docs
[x] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[x] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Additional context

Does --log_output_level=all:debug not work? They SetOutputLevel overrides those?

We can try that. However, that flag is not mentioned in the output from istioctl help.

@howardjohn @rittneje the --log_output_level=all:debug does work, it will make istioctl show a lot of information.

Yes we were able to use it successfully. For this reason I've changed the request to instead document this flag.

@rittneje The flag is not shown because it prints several lines with many scopes. See https://github.com/istio/istio/issues/22061. There's a command istioctl options that can see all of these global flags. I think the point may become that users are not awaring of using this command. Maybe adding a more detailed command could be better?

@hanxiaop Personally, I don't understand why istioctl help arbitrarily prints some of the global flags (e.g., --context), and istioctl options prints the rest of them. Fundamentally, the documentation ought to be internally consistent, and put them all in a singular location.
In addition to that, istioctl help should definitely explicitly refer to istiotctl options. That is a fairly non-standard way to document flags (other than kubectl I don't know of any application that does that), so as it stands it is extremely unlikely that most developers will ever see that documentation. Also, to be frank, I don't understand what the motivation is for not simply including all flags under istioctl help, regardless of whether they are global.

fixed by https://github.com/istio/istio/pull/38236.


arm64: wsl --cd \wsl$\Distro\xxx failing

Version
22000.466
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>
Distro Version
No response
Other Software
No response
Repro Steps
From CMD on ARM64, @cinnamon-msft runs:
wsl --cd \\wsl$\Ubuntu\home\cinnamon

Expected Behavior
WSL starts in /home/cinnamon.
Actual Behavior
Microsoft Windows [Version 10.0.22000.466]
(c) Microsoft Corporation. All rights reserved.
C:\Users\cinnamon>wsl --cd \\wsl$\Ubuntu\home\cinnamon
The parameter is incorrect.
C:\Users\cinnamon>

> wsl --status
Default Distribution: Ubuntu
Default Version: 2
Windows Subsystem for Linux was last updated on 10/4/2021
WSL automatic updates are on.
Kernel version: <IP_ADDRESS>

Diagnostic Logs
No response

She further reports that \\wsl$\Ubuntu\home\cinnamon works properly in Explorer!

/logs

Linking: https://github.com/microsoft/terminal/issues/12195

MSFT:34471859 may be relevant

I have a repro of this, currently debugging.
With the --cd change, why are you passing a Windows path to get to the Linux file system?  You could also just pas /home/cinnamon? I verified that will work.

I've also verified this is only an issue for inbox WSL, this works for lifted.

With the --cd change, why are you passing a Windows path to get to the Linux file system?  You could also just pass --cd /home/cinnamon? I verified that works.

That's a fair question! Couple reasons:

When we decided on this, it was to bridge the gap for all terminal users s.t. we didn't have to treat some paths as "a directory for CreateProcess," and some as "a directory for the command line"
There was some issue about CreateProcess not working for \\wsl$ paths before WSL had started, so we believed that deferring resolution until after it had started would help.

I'm not sure I follow, either way you're passing cd on the command line?
For the second, if the path is a Windows Path, WSL calls SetCurrentDirectoryW on the Windows path, so it's no different than the behavior you're trying to avoid.

Right. For any WSL, we always promote the starting directory to --cd.
We can refine that logic for sure. We have to service a release v quickly for the broken localizations anyway :)

Cool, can you guys start adding our team to wsl-related terminal pull requests? We'd like to be in the loop to help spot things like this in the future.
I tracked down this bug to something we fixed in October in the OS (and around the same time for lifted).

Gladly!

I tracked down this bug to something we fixed in October in the OS

That might explain why we weren't seeing this on our machines on selfhost builds, but Kayla was seeing it on the a 22000.466 machine. This was in fact MSFT:34471859 which was fixed a while back, so you guys should feel free to close this one out. Thanks for taking the look!


Initial edit not saving

I am reposting this from the Google Group email list (original here):
Hey guys,
I was very happy to find Waliki. It looks like a really promising project with many of the features I'd like in a wiki. When setting up a basic site as per the README, I came across some interesting behavior. When I create a new page, the empty markdown file is created, but I am unable to save the file after an initial edit. Interestingly, when I went into the Waliki source code and made an edit to views.py, I was able to make things function fine. What I did was change the raw page value here (https://github.com/mgaitan/waliki/blob/master/waliki/views.py#L125) from an empty string to a single space (" "). This saved the file as such (a single space, rather than empty), and the form submission worked fine after. I'd of course prefer if the file was initially saved as empty.
Do you know why this might be happening?
Thanks,
Michael

Seem like there's JavaScript error, I get the following in debug console:
An invalid form control with name='raw' is not focusable.

As I can understand because of this bug new pages creation is completely broken at the moment.

Hi all,
trying ver 0.9.dev0, creating a new page using reStructuredText I get the error:
...
Django Version: 	2.0.2
Exception Type: 	AttributeError
Exception Value:'ReStructuredTextMarkup' object has no attribute 'get_document_body'
Exception Location: 	C:\Dati\Studio\Sviluppi\Unavox\venv\lib\site-packages\waliki\models.py in _get_part, line 135
...

Is this the same kind of error from Michael?
maybe something broken in _markups.py inheriting from MarkdownMarkupBase ?
thank you
ldfa

There seem to have been an issue in the way the body is fetched in models.py : currently, through the
Page._get_part(self, part)

which results in a
getattr(self.markup_, 'get_document_body')(self.raw)

when the get_document_body only exists as a result in Converted[MarkupName], so more something like that
 getattr(self.markup_.convert(self.raw), 'get_document_body')

There was also a missing parameter in the signal sent on page_saved, but I have to dig into that. I made a mess of a commit fixing a couple of things and readying it for python3, but the pdf generation still requires python2 (rst2pdf being how it is).


Serializer.load_payload overrides in subclasses have incompatible signatures

Mypy recently introduced stricter checks for function signature compatibility (https://github.com/python/mypy/pull/2521). Since itsdangerous is included in the typeshed library with typing stubs, it found an issue with the signatures of load_payload. Consider:
class Serializer:
  def load_payload(self, payload, serializer=None): ...

vs.
class JSONWebSignatureSerializer(Serializer):
  def load_payload(self, payload, return_header=False): ...

vs.
class URLSafeSerializerMixin(object):
  def load_payload(self, payload): ...

class URLSafeSerializer(URLSafeSerializerMixin, Serializer): ...
class TimedSerializer(Serializer): ...
class URLSafeTimedSerializer(URLSafeSerializerMixin, TimedSerializer): ...

Basically, it's invalid to replace load_payload() accepting an optional kwarg with an implementation that doesn't.

PyCharm has complained about it for a while too. If you have a fix in mind, a patch would be great, otherwise I'll investigate.

Alright, PR ready.


add expo-router and settings page demo

In order to use the function of expo-router, I modified the composition of the project so that everyone could continue to add new pages later. Meanwhile, in order to solve the problem of tailwind, I added style to the outermost layer of the component, so that the tailwind could render smoothly.
I also added tsconfig Settings.

LGTM


Add alibaba RpcContext getInvocation compact

What is the purpose of the change
Brief changelog
Verifying this change

Checklist

[x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[ ] Add some description to dubbo-website project if you are requesting to add a feature.
[ ] GitHub Actions works fine on your own branch.
[ ] If this contribution is large, please follow the Software Donation Guide.

Codecov Report

Merging #12416 (bce66d7) into 3.2 (c571186) will decrease coverage by 0.76%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #12416      +/-   ##
============================================
- Coverage     69.97%   69.22%   -0.76%
+ Complexity      114        2     -112
============================================
  Files          1830     1613     -217
  Lines         95669    66510   -29159
  Branches      17233     9755    -7478
============================================
- Hits          66946    46042   -20904
+ Misses        23295    16002    -7293
+ Partials       5428     4466     -962

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


enigma: Added JWT generator and validator.

Finally. As per discussion in #16 :+1:

That's all looking really good! There's unfortunately one issue. The major question is: How do we get state data into enigma.GenerateChallenge?
You solved this by making JWTEnigma stateful. This is a normal way of approaching such an issue. Unfortunately, JWTEnigma is held by Fosite and Fosite is actually not stateful. You initialize Fosite once (in the factory) and it runs. By making JWTEnigma stateful Fosite must be initialized on every request. It is not enough to set the Context on Enigma because concurrent requests would result in very buggy behavior.
I see multiple ways to solve this problem:

Enigma could require some sort of additional input data to the secret. I remember that osin solved this by passing the AuthorizeRequest or AccessRequest object which had an additional UserData interface{} field so it was very easy to get that data in there.
We introduce authorize/accessRequest.GetSigningMethod() which is basically a stateful enigma object where you can set context etc
We do something like enigma.Clone() but I don't really like this approach
Do you have an idea?

It's not so easy to explain the problem, I hope I phrased it somehow understandable..

Regarding option 2. This could look like (pseudocode):
// in authorize handler
ar := &AuthorizeRequest{
   // ...
   Enigma: fosite.Enigma.Clone(),
}

// ...
// in request
signer := ar.GetEnigma()
if jwtSigner, ok := signer .(*enigma.JWT); ok {
   jwtSigner.SetSubject("asdf")
}

There's another option. We are passing ctx context.Context variables down to all handlers. We could pass the context handler to Enigma's functions as well making JWTEnigma stateless

so basically changing the enigma interface to:
ValidateChallenge(ctx context.Context, t *Challenge)

I'm not sure if this is smart because the context is not really "beautiful" but it get's the job done. I think the enigma interface needs change because, as you pointed out secret's can't really be used with jwt.

Before I went to sleep, I had some more ideas spinning around. I'll write them down here so they don't get lost.
First: Authorize Code, Access Token, Refresh Token and ID Token (coming soon) are three (four) different types of tokens. For example, a refresh token might have different claims then an access token and an authorize code might just be a random string.
I think the best idea would be to put in between one layer of abstraction between the handler and any cryptographical implementation:
// these are just example names :)
myHandler := MyTokenEndpointHandler{
    AccessTokenEnigma: &JWTEnigma{JWTCrypto}, // JWTCrypto := current JWTEnigma
    RefreshTokenEnigma:  &JWTEnigma{JWTCryptoAlternativeImplementation},
    AuthorizeCodeEnigma: &OpaqueEnigma{}, // uses irreplaceable HMACSHAEnigma
    IDTokenEnigma: &JWTEnigma{IDTokenCrypto},
}

JWTEnigma and OpaqueEnigma both implement multiple interfaces:
interface AccessTokenGenerator {
    GenerateAccessToken(context.Context, http.Request, AccessRequester, session interface{}) (*Challenge, error)
    ValidateAccessToken(c *Challenge, context.Context, http.Request, AccessRequester, session interface{}) (error)
}

interface RefreshTokenGenerator {
    GenerateRefreshToken(context.Context, http.Request, AccessRequester, session interface{}) (*Challenge, error)
    ValidateRefreshToken(c *Challenge, context.Context, http.Request, AccessRequester, session interface{}) (error)
}

// ....

As you maybe noticed, these signatures are very similar to https://github.com/ory-am/fosite/blob/master/oauth2.go#L43
This is a little overhead but would allow for a very dynamic set up without bloating the cryptographical implementations (and making them harder to read, review and secure).
This would cause a little refactoring. But I think it is the best idea I came up with yet regarding this issue. I'd love to hear your feedback on this idea. If you're :100: I'd implement this behaviour quickly (unless you want to give it a try), and you could then adapt your PR to the changes.

Back after a good nights sleep! Yes, I'm aware of that issue and it was a thing I wanted to discuss since it would essentially mean that I would have to rewrite parts of the base implementation and that's really nothing i want to do unless you're on the same page.
Since you found the issue despite me falling asleep last night, i think the best way of actually making everything stateless is to move the relevant "user data" like the global secret and the jwt claims to the context. But this has a major downside: We might "bloat" the context with data that's never used. One way of solving this would be to make that variable accept everything like "interface{}" but that will add unnecessary complexity in the enigmas since we would have to validate that data prior to using it. Decisions, Decisions, Decisions....
Another problem that exists is that the developer most likely want to update the JWT claims when the token is generated (like adding user id, user email, .... to the claims) and also like updating the private reserved claims (like "exp", ...). This could be done with callback methods (anonymous functions, not clojures) that is called before and after the token is generated and in those anonymous functions we pass a reference to the context. This will only have to be done for the access tokens and not the authorize/refresh tokens obviously. But this means that we will need a way of passing what signing method that was used as well most likely for future need. By doing that, alongside passing the context down to the enigmas, i believe we could achieve a full stateless behavior as well as a way for the developer to actually control the token generation (at least in the case of JWT. HMAC doesn't have this need).
Do you have any ideas on this approach?

Since you found the issue despite me falling asleep last night, i think the best way of actually making everything stateless is to move the relevant "user data" like the global secret and the jwt claims to the context.

I think the global secret is something that is shared amongst application state. We need the global secret on various occasions and the idea is, if you change the global secret ALL tokens generated with the old one become invalid. I would like to keep the global secret therefore global :)

But this has a major downside: We might "bloat" the context with data that's never used. One way of solving this would be to make that variable accept everything like "interface{}" but that will add unnecessary complexity in the enigmas since we would have to validate that data prior to using it.

Yes I agree 100%. Giving up type safety in important security modules is not a good idea.
Did you have a chance to read through https://github.com/ory-am/fosite/pull/18#issuecomment-171572914 ? I kinda like this idea

Another problem that exists is that the developer most likely want to update the JWT claims when the token is generated (like adding user id, user email, .... to the claims) and also like updating the private reserved claims (like "exp", ...). This could be done with callback methods (anonymous functions, not clojures) that is called before and after the token is generated and in those anonymous functions we pass a reference to the context. This will only have to be done for the access tokens and not the authorize/refresh tokens obviously. But this means that we will need a way of passing what signing method that was used as well most likely for future need. By doing that, alongside passing the context down to the enigmas, i believe we could achieve a full stateless behavior as well as a way for the developer to actually control the token generation (at least in the case of JWT. HMAC doesn't have this need).

I think this would be possible with https://github.com/ory-am/fosite/pull/18#issuecomment-171572914
// in the request handler
session := NewJWTSession()
session.Set("foo", "bar")

// ...
fosite.NewAccessResponse(/* ... */, session)

// in JWTenigma
type JWTEnigma {
    Crypto Crypto
}

func (j JWTEnigma) GenerateAccessToken(_ context.Context, _ http.Request, areq AccessRequester, sess session interface{}) (token string, signature string, error) {
    jwtClaims := new(JWTClaims)

    if jwtSession, ok := session.(*JWTSession); ok {
        merge(jwtClaims, jwtSession.Claims)
    }

    jwtClaims["aud"] := areq.GetClient().GetID()
    // ...

    token, err := j.Crypto.GenerateJWT()
    // if err != nil ...

    // signature := strings.split(...
    return token, signature, nil
}

There's another thing. enigma.Challenge is not a good way to transport the various tokens around because it makes implications how a token should look like. That's why I replaced (Challenge, error) with (token string, signature string, error)

I think it's best if you implement the changes to the base and that i rebase my PR to adopt those changes both with regards of time and the fact that you have 90% better know-how of how everything works than me ;)

Absolutely :) I'll try to implement this tonight!

Hey, while I was at refactoring enigma I stumbled upon some APIs that didn't make a lot of sense to me or are incomplete. I'm currently refactoring some method signatures and some context structs / interfaces as well.
I'll probably need a little bit more time to get this right because I have to do a lot of fixes in the tests afterwards (fixing all the mocks is going to be terrible...)

But the good news is that the strategy interfaces are now much cleaner:
type AccessTokenStrategy interface {
	GenerateAccessToken(requester Request, interface{}) (token string, signature string, err error)
	ValidateAccessToken(token string, requester Request, interface{}) (signature string, err error)
}

:)

I think this signature ( https://github.com/ory-am/fosite/commit/8a830d34405f3b3d50734f5258151426dc61a94b#diff-eb12cee32bcf605b68363a07e95e0174L1 ) makes a lot more sense now :D

Hey I finished the refactor: #18
Take a look and tell me if that would solve the JWT case :)

Yes, I think that this will solve (and go even beyond) the scope of JWT. Seems to me that the new interfaces for passing strategies will add to the maintainability and extendability a lot! I'll sit a little today with jwt and then push to the jwt branch again when i'm done, this time also improving code coverage. :)

Cool, I'm really glad that you agree on the architectural draft! :) Feel free to ping me any time if you run into troubles. :)

@arekkas I think i'm done with the refactor, but running the example in the enigma-refactor branch gives an error on the explicit grant. Is this per design or something else? The error seems to be due to the GetAuthorizeCodeSession failing to retrieve "Code" from the Store. The error is present at line 94 in handler/core/explicit/explicit_token.go. I'll wait with the push until this is resolved. :)

yup that was a bug. definitely need to write more integration tests as this had not been catched by them.

ok i hope everything is fixed now :)

@arekkas Take a look now :) Finally had some time over after a pretty harsh weekend!

At first glance, this looks all very good to me. Thank you for your hard work and your commitment, you just improved fosite a lot! :)
I will take a little more time to go over the changes in detail and make sure that we didn't miss anything but I will merge this either tonight or tomorrow if nothing comes up.
Big up and thanks!

Just in case you didn't check but your name is in the Hall of Fame :)

Nice ;) But you didn't have too! I'm just glad i can help the community
grow!

I looked over everything in detail, there is just one little tiny bit missing! Every JWT must have a JSON Token ID (jti) which you already marked as "TODO" here: https://github.com/ory-am/fosite/pull/18/files#diff-548a8577b0942b2c142c8a3b60bebeb1R27
This ID is required because otherwise the tokens will look very similar. This is especially true if you issue refresh and access tokens at the same time (they have the same properties and are therefore the same string!).
I suggest to use uuid.New() ( https://github.com/pborman/uuid ) which creates a uuid v4 as a fallback if no JTI was set by the session.
Other than this everything is perfect :)

Yeah ofc! I missed that! I'll fix it asap in 2 hours. :)

@arekkas I don't know if you've seen it, but the fixes was pushed yesterday :) Please look through them so i haven't missed out on anything.

GitHub should notify people if PRs get updated. I miss that every time. :D

:tada:


Why the final hot-map shape is 25x25?

I notice that in paper SiamRPN++, Search map(x) shape is 255,Target map(z) shape is 127, after resnet-50 forward, X shape become 31, Z shape become 15.
I think the final hot map shape should be (31-15)/1+1=17,but  cfg.TRAIN.OUTPUT_SIZE is 25,why?
In TrkDataset(),I notice that
        desired_size = (cfg.TRAIN.SEARCH_SIZE - cfg.TRAIN.EXEMPLAR_SIZE) / \
            cfg.ANCHOR.STRIDE + 1 + cfg.TRAIN.BASE_SIZE

why must add cfg.TRAIN.BASE_SIZE?

Because the template feature map will be croped to 7x7, it is implemented in the AdjustLayer.

Since no further question is asked, I'm closing it for now.
Please reopen it or create a new issue if you have further question.


"Class BuildShell could not be loaded"

Currently, your build instructions are erroring out on Ubuntu 14.04 with Cake installed via apt-get. When I run cake build I get: "Class BuildShell could not be loaded." And if I run cake server I get "Class ServerShell could not be loaded." Some vague Internet exploration indicates it could be because of a Cake version.
I have never used Cake before and it's entirely possible I am doing something bad.

Hi, sorry, I just saw this. I have never seen that error, but I know cake comes with coffeescript and this project's package.json dictates that it should be used with version ~1.6.3. If you run npm install in this directory, you should be able to run cake build just fine. I have no clue what apt-get installs.


Intellisense doesn't work with constant function parameters

From @startrekdude on April 5, 2016 23:49

VSCode Version: 0.10.11
OS Version: Windows 10

Steps to Reproduce:
files.zip

Create a file called SomeAPI.js with the following content:

var SomeAPI = (function () {
   "use strict";
    var exports = {};

    exports.sayHello = function (name) {
        alert("Hello, " + name);
    }

    return exports;
})();

Create a file called SomeAPI.d.ts with the following content:

declare namespace SomeAPI {
    function sayHello (name: string) => void;
}

Create a file called app.js with the following content:

/// <reference path="./SomeAPI.d.ts"/>
(function (SomeAPI) {
    "use strict";

    var hello = function () {
        SomeAPI.sayHello(document.body); // Oops! No Intellisense!
    }

    document.addEventListener("DOMContentLoaded", hello);
})(SomeAPI); // This one works

Mouse over the line where it says "SomeAPI.sayHello" (in app.js).

Observed Behaviour:
Visual Studio Code's Intellisense informs the user that SomeAPI is of the any type, as is it's child sayHello.
Expected Behaviour:
Visual Studio Code informs the user that SomeAPI is a namespace and that sayHello is a function that takes a string.
Why this bug is important to fix:
Immediately-Invoked Function Expressions were a common way of doing modules and scoping before ES6's (awesome) import statements. There is a lot of legacy code that still uses them.
Copied from original issue: Microsoft/vscode#4990

Moving to TypeScript for investigation

@startrekdude your .d.ts file seems incorreclty authored. Did you mean the following?
declare namespace SomeAPI {
    function sayHello(name: string): void;
}

Indeed. :smile:
Here's an updated zip file: files.zip

Sadly the TS team has decided not to add this feature. See #4142 and #7601.

Reopened #4142.


Fix SPI initialization to be MSB first

The comments indicate that the code is attempting to set the SPI order to MSB first, however it actually sets it to LSB first. Since most devices are MSB first, this is the correct choice.
Closes #59.

With master + this change, I can successfully communicate with two different SPI devices using an STM32F334

Thank you for this PR. Sorry for the delay, I was quite busy with work and uni stuff the last weeks.
It seems like I oversaw this, when I changed this line of code. I briefly tested it today, and will look into this PR this week :)

Okay I've confirmed that your fix is working.
Would be strange, if not :sweat_smile:
I would be happy, if you added a note to the changelog. Something like:
# Fix

- Fixed regression ... spi was not correctly intialized as master

:)

Thanks!
Meh travis timed out. Force pushing with --amend --no-edit or squashing the commits should retrigger travis.
I should look into fixing travis sometime, as two instances doing the sames is really not useful :sweat_smile:

Thanks for force pushing. This sadly didn't help. The travis instance has a hard time initializing sscache. I'll look into fixing this.

Disable caching in travis worked :tada:


Support websocket 5.0.0

Hi.
OBS updated to v 28, and it switched to web socket 5.0.0.
The compatibility is made with 4.9.1-compat socket.
Do you want to update the project to support new version of obs-websocket?

Yes, I’m planning on doing that, but I haven’t gotten around to it yet…

Eager for this

In the meantime you can give this a try (yes, it supports the new API):
https://github.com/pschmitt/obs-cli


p5.RendererGL  reference page error !

alignment error  in the below link
https://p5js.org/reference/#/p5.RendererGL/fill

Probably related to #1544

thanks, this has been fixed with the latest update to the library.


[ru] Little fixes

Some texts updates due review changes.

Great, thank you so much again! (I'll add this to the gh-pages branch soon, too, so the changes can go live)


Reload NSpec service

Reset service factory after the service setting is changed so that the nspec service is updated accordingly.
Addresses . https://nanopay.atlassian.net/browse/CPF-2149

Addressed your comments. @kgrgreer

Addressed your comments. @kgrgreer Please take another look, thanks.

@lchanmann can you explain the reloadedServices_ , I'm still not clear on its purpose reading through the code.

We need a way to communicate with NanoRouter/NanoServiceRouter that a web agent or nano service needs to be reloaded since these routers also have a cached version of it - https://github.com/foam-framework/foam2/blob/master/src/foam/nanos/http/NanoRouter.java#L109.
So reloadedServices_ would store the service name that was invalidated - https://github.com/lchanmann/foam2/blob/ReloadNSpecService/src/foam/nanos/boot/Boot.java#L78 and NanoRouter/NanoServiceRouter can act accordingly.

@lchanmann got it, thanks.

Addressed your comments. @kgrgreer

There is a NanoServiceRouter.java but I'm not quite sure when it's being used so leaving it unchanged.


Backport "Add missing span to synthesized product mirror" to LTS

Backports #18354 to the LTS branch.
PR submitted by the release tooling.
[skip ci]

No regressions detected in the community build up to lts-18731.
Reference


Fix up a performance issue, that can occur when the population plot draws its' distribution curve

For the PopulationPlot, only draw the distribution curve for the visible part of the plot, to avoid performance issues.
This fix was implemented by myself and @cornford
I have provided an example below, to reproduce the issue.
Operating System: Windows
Application Type: WPF
public void CreatePopulationMultiSeries(WpfPlot plot)
{
    // Show the legend (not necessary for the issue)
    plot.Plot.Legend();

    // 1 group
    var groupNames = new[] { "Group A" };
    plot.Plot.XTicks(groupNames);

    // 1 series
    var seriesColours = new System.Drawing.Color[] { System.Drawing.Color.Blue };

    var seriesData = new[]
    {
        new [] // Group 1
        {
            new double[]{ 1.0, 600000.0 }
         }
    };

    // when setting these axis limits, the performance will suffer, when the distribution curve is rendered
    plot.Plot.SetAxisLimits(yMin: 0, yMax: 2.0);

    // Create the population plot
    var populations = seriesData.Select(series => series.Select(seriesData => new Population(seriesData)).ToArray()).ToArray();
    var populationSeries = populations.Select((p, i) => new PopulationSeries(p, seriesLabel: $"Series {i + 1}")).ToArray();
    var populationMultiSeries = new PopulationMultiSeries(populationSeries.ToArray());
    var populationPlot = plot.Plot.AddPopulations(populationMultiSeries);

    // Set the series colour
    for (var i = 0; i < populationPlot.MultiSeries.seriesCount; i++)
    {
        populationPlot.MultiSeries.multiSeries[i].color = seriesColours[i];
    }

    // Configure the DataFormat, (not necessary for the issue)
    populationPlot.DataFormat = ScottPlot.Plottable.PopulationPlot.DisplayItems.ScatterOnly;

    plot.Refresh();
}

<WpfPlot x:Name="PlotName"  />

Looks great! Thanks @Em3a-c and @cornford, this will be in the next release! 🚀


Update replace-an-expiring-client-secret-in-a-sharepoint-add-in.md

Fixed first indentation in code samples. Added code sample line to remove the three keys without copy&pasting values manually.

Q
A

content fix?
yes

New article?
no

Related issues?

What's in this Pull Request?
Please describe the changes in this PR. Sample description or details around bugs which are being fixed.

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

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Just to check - as this was waiting to get tested - but simply has been postponed for too long... is there a reason why this was closed? - Was the fix not then relevant? This basically got unfortunately buried, but now that we got a message on it (update), it would be again on the top of the list to get fixed.


Added 'Pointer and Reference Types' translation in ro

Hi Brian,
Here is the translation for chapter 'Pointer and Reference Types'. I also fixed some typos in the introduction section.
Cheers,
Iulian

Thank you!!


Address clippy warnings

This works on my fork: https://github.com/dburgener/ascii-canvas/pull/1
I'm not sure why it's not running the actions here.  Possibly something in the project settings?  I don't seem to have access to the settings page in this repo, so I can't look through those.  @Pat-Lafon do you have access to the settings here?

Looks like the CI is still failing clippy.  I forgot to run clippy with --all and it's failing on the test code.  I don't have time this evening, but I'll try to get a follow-up PR for those later this week, and now that we have the CI set up, we can verify it's all good before merge.

See #12. Thanks for setting this up!


Is the "create your own vector tiles" process should be performable by a complete stranger?

Thanks for a really great undertaking!
I'm having multiple different issues trying to perform the tile creation process. I've tried various versions in the last couple weeks, including release tags and the master branch recently, seen some changes to the instructions on the site and retried them. Switched to Zurich to be the dataset to eliminate possible data diff problems, but never really had luck to perform the whole process from beginning to the end.
I could file specific issues, but to save your time reading, could you please state:

Is it doable at all by a complete stranger? :)
What branch/tag should one currently use?
If one is to use docs from the website, then to which version does it correspond, if that even matters?
Maybe specify what type of hardware (server specs) one needs to do some useful stuff.

Thank you again, hoping to try my own vector tiles.

Hi Sergey, thanks for you feedback.

Is it doable at all by a complete stranger? :)

Yes, we want that the process is doable by other people

What branch/tag should one currently use?

During the last weeks we made a lot of changes to the project, the master branch should be stable now.

If one is to use docs from the website, then to which version does it correspond, if that even matters?

The documentation will get an overhaul soon (#291), but the documentation about creating your own vector tiles is current.

Maybe specify what type of hardware (server specs) one needs to do some useful stuff.

Thats a good idea. We can give an approximation about how long the process takes for a give type of hardware for the entire planet. What do you mean by do some useful stuff (render the entire planet?)
Would you be up for a chat on skype?- Its probably the easiest way to troubleshoot the problems you experience. You can find me on skype with the following email address<EMAIL_ADDRESS>

@manuelroth Many thanks for clarification!
Then maybe I'll try the process once again and come up with specific issues if they still arise.
Regarding the hardware thing - I guess maybe the entire planet is somewhat too large a task for an unexperienced stranger, but a city similar to Zurich would be a good place to start for hardware spec estimation.


[CARBONDATA-4214] inserting NULL value when timestamp value received from FROM_UNIXTIME(0)

Why is this PR needed?
Filling null in case of timestamp value is received from FROM_UNIXTIME(0) as spark original insert rdd value[internalRow] received in this case zero. if the original column value[internalRow] is zero then in insert flow adding NULL and giving NULL to spark. When query happens on the same column received NULL value instead of timestamp value.
Problem code:
       if (internalRow.getLong(index) == 0) {
        internalRow.setNullAt(index)
       }

What changes were proposed in this PR?
Removed the null filling check for zero value case and if internalRow value is non null/empty then only set the internalRow timestamp value.
Does this PR introduce any user interface change?

No

Is any new testcase added?

Yes

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3827/

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5570/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3828/

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5571/

please update PR description @maheshrajus

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3836/

LGTM

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5579/

retest this please

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3839/

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5582/

retest this please

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5585/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3842/

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5586/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3843/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3847/

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5590/

retest this please

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3850/

retest this please

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3852/

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5597/

retest this please

Build Failed  with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5601/

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3857/

retest this please

retest this please

Build Failed  with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3860/

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5605/

retest this please

Build Success with Spark 2.3.4, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbonPRBuilder2.3/5611/

Build Success with Spark 2.4.5, Please check CI http://<IP_ADDRESS>:12602/job/ApacheCarbon_PR_Builder_2.4.5/3866/


Introduce logging and suppress tf info/warnings

Replaced all print statements to Python logging
Added loglevel and logformat in constants
Suppressed tf info and warning messages
From now on, in every module, use logging.
...debug()/info()/warn()/error()/critical()
...for sending log messages

Moved to PR#81


Gradient color styles do not work when generated from the plugin

Describe the bug
Gradients display in the plugin but not in Figma color styles generated by the plugin
To Reproduce
Steps to reproduce the behavior:

Copy JSON below into plugin
Hit 'Create Styles'
The gradients that display fine in the Figma Tokens window do not translate over to color styles

Expected behavior
Gradients appear in the generated styles
Screenshots or Screencasts

JSON (optional)
{
  "status": {
    "cancelled": {
      "type": "color",
      "value": "repeating-linear-gradient(135deg, #f8f3e0, #f8f3e0 6px, #efebda 6px, #efebda 12px)"
    },
    "test": {
      "value": "linear-gradient(#e66465, #9198e5)",
      "type": "color"
    },
    "in-progress": {
      "type": "color",
      "value": "#89CFF0"
    }
  }
}

Gradient support should be way better, ideally we'd have a UI that helps users build these visually.
Right now only linear-gradients are supported, and you'd have to specify it like this:
linear-gradient(90deg, #ffffff 0%, #000000 100%)
There's a bug with their direction not resolving correctly, though: https://github.com/six7/figma-tokens/issues/156

I'll close this in favor of #421 which is more generic. Thanks again for the report!


apt-get

why can't I run apt-get commands when logged in tessel as root ?

@rafaelcmrj This is a constraint of OpenWRT, the Linux distribution running on Tessel. Instead of apt-get, OpenWRT comes with a lightweight package manager built for this type of embedded operating system called opkg. It's the same reason why we don't have npm running on Tessel, the constrained amount of RAM.
Closing because this is out of control of this project.


Fix UI

Adjust views and form UI

Done:
https://github.com/PHCNetworks/phc-press/commit/26daa335fb0f0f994534debc7cb5af3fa560ceb8


Postcode Search Issue

Apologies, seem to be having a few issues today!
If the postcode isn't entered with a space (example m13hz instead of m1 3hz) there's a large string of errors. What should I do about this?
Thanks

Appears to be the behaviour of the OpenStreetMap API, you can use Google Maps for better results.
Use issues to report bugs, please post your questions on the forums or better still search the forums for existing solutions.


doc updates

@eriklindeman  please review if your changes should go to live branch

Docs Build status updates of commit 940cfc7:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error] Cannot sync git repo to specified state. Please make sure the pull request is mergeable. Details: Git merge results in conflict, repository remote url: https://github.com/MicrosoftDocs/bingmaps-docs, working directory: W:\1qic-s, target branch: HEAD, target branch commit: 6ef6ac04f1a51f8fb94b27589baf2a4a211b8d82, source commit: 940cfc7e3ee865ec27ae05b1ccd3591f7e576bd2.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit cff44a0:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error] Cannot sync git repo to specified state. Please make sure the pull request is mergeable. Details: Git merge results in conflict, repository remote url: https://github.com/MicrosoftDocs/bingmaps-docs, working directory: W:\5vld-s, target branch: HEAD, target branch commit: 6ef6ac04f1a51f8fb94b27589baf2a4a211b8d82, source commit: cff44a0f3f2f6b0909865ba47752aa1b7e3bcd06.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


[PUI]Form Select default value disappears after opening dropdown

Please verify that this bug has NOT been raised before.

[X] I checked and didn't find a similar issue

Describe the bug*
Any form field using react-select that has a default value set will have that value visually erased if the dropdown menu is oened and closed without selecting anything new (I.e. clicking outside the dropdown)
Interestingly, the value is retained if you actively select an entry in the dropdown after loading.
Steps to Reproduce

Expected behaviour
The default value of the field should be retained
Deployment Method

[ ] Docker
[ ] Bare metal

Version Information
0.14.0 dev
Please verify if you can reproduce this bug on the demo site.

[ ] I can reproduce this bug on the demo site.

Relevant log output
No response

@LavissaWoW this is caused by a simple caching issue. Fix incoming!


[3575] Improve trainee index page loading time

Context
https://trello.com/c/AkaOjAmN/3575-spike-trainee-index-loading-slow-for-admins
Changes proposed in this pull request

Remove column name from count(). It doesn't seem to add anything apart from the extra 3-4s it takes to make the calculation.

Guidance to review
It won't be possible to test this until it's deployed to the DTTP import app.

 [SPIKE] Trainee index loading slow for admins


CASMINST-5667 Alice

Description
Add http_proxy verbiage for the purpose of downloading artifacts from external endpoints using a proxy
https://jira-pro.its.hpecorp.net:8443/browse/CASMINST-5667

[x] If I added any command snippets, the steps they belong to follow the prompt conventions (see example).
[ ] If I added a new directory, I also updated .github/CODEOWNERS with the corresponding team in Cray-HPE.
[ ] My commits or Pull-Request Title contain my JIRA information, or I do not have a JIRA.

Just one outstanding comment in upgrade/Stage_0_Prerequisites.md.


Make MIOBufferWriter type available through plugin API.

This still needs test cases and doc changes, I'm just making the PR to get initial feedback before proceeding.

@ywkaras
New APIs need to be sent to the dev mailing list.  How does someone read from the TSIOBufferWriter?

@bryancall TSIOBufferWriter is just a more convenient interface for writing to TSIOBuffer.  It will add additional blocks as needed to write an arbitrary-length byte buffer.

This PR hasn't been updated in more then 2 months and I am closing out PRs that haven't had any updates.  Please feel free to reopen if want to update it.


BGP config Import/Export Policies as list

https://github.com/napalm-automation/napalm-base/pull/14

Closing as discussed in napalm-automation/napalm-base#14


Add a Paper Queue with GithubURL (no-code without a paper).

Wrong repo :/ I was looking for arxiv-vanity


Add a DB connector example

TBD

There is an example of using a django model which connects to a db in "Advanced Column Validation" section (visible at https://phaser.readthedocs.io/en/latest/user/advanced.html)
What did you have in mind for a db connector example?


Card: Change the management of the inside border-radius

Fixes #37010.
Couldn't spot any breaking change in the example page, but I haven't dig deeper.
Solution
Make the inner border-radius management universal inside the .card.
Leads to remove some unused classes like .card-img-top and .card-img-bottom.
May lighten the bundle size.

This removes two classes with the top and bottom variants. We'd need to deprecate those instead of remove outright—think you could tackle that?

Hi mdo,
Not sure to completely understand what it is up to here. Should I mention it in the migration guide ? Should I use some deprecate comments ? Should I update the doc to tell that we don't use use those classes anymore ? It would be very helpful if you could light me up on this !
Thanks in advance !

@louismaximepiton Sorry for the delay! We need to keep the original CSS around unmodified until v6. So let's add those .card-img-top and .card-img-bottom classes back in addition to the new one. Then we can add a deprecate note to the docs (I can handle this) and mention it in the migration guide (I can handle this too).

No problem, I was busy on my side aswell. I tried something on the scss file, I'm not quite sure of the last commit on two parts:

scss file: Reintroduced the classes but their behavior too, so people shouldn't notice the changes on normal use cases. I also added a deprecation warning message for those classes. Should I remove the behavior for .card-img-top and .card-img-bottom?
docs file: Introduced a deprecation message here too based on the .navbar-light one.

May I let you the hand on the migration file ?


Add Scala 3 support via dotty compatibility

So this PR adds Scala 3 support, as a follow up of https://github.com/lihaoyi/Ammonite/pull/1144.
Its changes successively consist in:

minor refactorings, easing subsequent developments (from https://github.com/lihaoyi/Ammonite/pull/1150/commits/0dd150b9c01fcba57d9350281dff8e6fe9849485 up to https://github.com/lihaoyi/Ammonite/pull/1150/commits/6208f809f4208f223a520aee8640e617329c7b5c, 12 commits as of now),
actually adding Scala 3 support (https://github.com/lihaoyi/Ammonite/pull/1150/commits/8c22bfa162fabbc0088bf63a2e235be30f0b1664 up to https://github.com/lihaoyi/Ammonite/pull/1150/commits/6a815b0006b0b95a9a2921fe6ad6badfb5752ee3, 10 commits)
updating the tests, so that they run fine for Scala 3 (https://github.com/lihaoyi/Ammonite/pull/1150/commits/a4e2db92404186158c27ca27cc9e1bf12f5b391c up to the end, 28 commits).

All commits but one don't touch more than approx. 100 lines each, which should make it easy to review those. The only sizable commit is the one adding the Scala 3 implementation of the compiler module, under amm/compiler/src/main/scala-3 (https://github.com/lihaoyi/Ammonite/pull/1150/commits/8c22bfa162fabbc0088bf63a2e235be30f0b1664). This commit mainly:

adds new sources under amm/compiler/src/main/scala-3,
updates build.sc so that using just 3 as cross version builds and runs Ammonite as a mix of Scala 2.13 / 3 modules (that run fine together thanks to dotty compatibility)

Many of the sources this commit adds under amm/compiler/src/main/scala-3 are adapted either from dotty sources, or from Ammonite Scala 2 things.
Some features don't work yet in Scala 3, or don't work as fine as in Scala 2 yet. The commits updating the tests should make clear what has been disabled for Scala 3. Most notably:

entrypoints: this would require mainargs to be ported over to Scala 3, its use of Scala 2 macros complicates that,
line numbers in diagnostics and stack traces: an equivalent of the LineNumberModifier plugin for Scala 3 would fix both at the same time, else ammonite.interp.script.PositionOffsetConversion could be used to fix at least the former
deep completions: there's currently a candidate implementation for these (in amm/compiler/src/main/scala-3/dotty/ammonite/compiler/Completion.scala), but it's awfully slow, so it's disabled by default (look for the commented out line calling addDeepCompletions)
import $ivy completion: there's a candidate implementation too (in Completion.scala), but it has issues with backticks. This required tinkering in Scala 2, which seemed less straightforward to do in Scala 3 (IIRC, dotty doesn't easily hand us over backticks around what's being completed)
source and desugar macros: they need to be ported over to Scala 3 (using Tasty reflection-based macros I guess)

There are also limitations in the Scala 3 specific code, most notably:

the script blocks splitter (splitting around @) is regex based for now (I didn't try to have the dotty parser handle those yet)

@lihaoyi This is ready for review, if you wish. Don't fear the number of commits or the number of changed lines… All commits but one touch less than or around 100 lines. The only sizeable commit is the one adding the Scala 3 source of the compiler module - it mostly only adds code, but for its changes in build.sc.
That said, I can always split that to make it easier to review it:

all the commits until the one adding Scala 3 code in compiler in a first PR, then
adding Scala 3 code per se, then
adding CI jobs and adjusting the tests for Scala 3.

The tests now pass in https://github.com/lihaoyi/Ammonite/pull/1151, that switches to 3.0.0-M3. Its developments could also be folded here.
Lastly, some things could be cleaned-up in the biggest commit (Scala 3 code in compiler), I could update that, but that shouldn't hamper review… (or even merging).

(Last push force: folded https://github.com/lihaoyi/Ammonite/pull/1151 here.)

Since the bulk of the code here is in Scala 3, could it be worth getting someone more familiar with Scala3 to review those sections? Even if you need to explain what the code is meant to do, a second perspective from the Scala3 side of things may be valuable to make sure what we're doing sounds reasonable to them

I agree it would be nice to have more Scala 3 expert eyes have a look, yes.
@smarter @anatoliykmetyuk Don't know if you guys would be interested in having a look at the commit named Add Scala 3 stuff, currently at https://github.com/lihaoyi/Ammonite/pull/1150/commits/ecf292847abb7c4753a84760cbe8e55b26f14bb8. This commit adds Scala 3 implementations for parsing and compiler related stuff.
In more detail, it adds the following classes:

AmmonitePhase: a Scala 3 equivalent to AmmonitePlugin, which tracks new variables, but also new imports, during compilation
Compiler: as the name says, going from source to byte code, but also some completion-related things
DottyParser and Parsers: parsing-related stuff
Preprocessor; generating additional code (printing the type and value of new vals, etc.) from an AST of the input code (most of it adapted from its Scala 2 counterpart)
SyntaxHighlighting: adapted from dotty sources
Completion: adapted from dotty sources too, so that we can add support for import $ivy completions, deep completion (committed but disabled for now, as my current implem is too slow), but also for a better handling of back-quoted identifiers (that could be interesting for the dotty REPL too)

Looks like there's quite a lot of code adapted from existing code in dotty, my advice would be to instead change dotty to make the existing code reusable for your purposes when possible.

Looks like there's quite a lot of code adapted from existing code in dotty, my advice would be to instead change dotty to make the existing code reusable for your purposes when possible.

I agree. That's mostly syntax-highlighting and completion-related code.

Hi @alexarchambault. I was just working with Spark SQL in Jupyter thanks to Almond, and I'm curious how you're handling the removal of scala.Symbol and its related ' literal syntax from Scala 3 in this patch. Have you provided some kind of substitute? Unfortunately I don't understand this patch well enough to answer this question for myself. FWIW, my inquiry is partly motivated by the extensive use of the symbol literal syntax in the documentation for Ammonite at ammonite.io. However, I must admit I'm also rather partial to that syntax for use in Spark SQL, so I'm hopeful you have found a pleasant alternative.
Cheers.

@mallman In the Ammonite codebase, most symbol literals (maybe even all of them, I think) are related to os-lib paths, in code like os.pwd / 'foo / 'something. Luckily, os-lib also accepts string literals, so I just changed such code to os.pwd / "foo" / "something".
I'm not sure how spark-sql will handle the end of symbol literals, but IIRC, it also accepts string literals in most places, right? Using string literals would be the way to go then.
(By the way, this kind of question might be more suited to the Gitter channel, although I have to admit I should check my Gitter notifications more often 😬)

FYI, motivated by a little nudging from the Spark community, symbol literals may make a comeback in Scala 3 after all.
https://github.com/lampepfl/dotty/pull/11588

For anyone wondering what's the status of this, bits of this PR (mostly code originally adapted from dotty) have been moved to dotty itself in https://github.com/lampepfl/dotty/pull/11794, which is part of Scala 3.0.0-RC2. I can't update this PR to 3.0.0-RC2 right now though: it relies on dotty compatibility to have Scala 2.13 and 3.0 modules go along, and no 2.13.x release (or even nightly) can read 3.0.0-RC2 modules for now. Because tasty reader version was bumped in 3.0.0-RC2, and work is still ongoing to bump 2.13.x to the same tasty reader version.
As soon as a 2.13.x nightly can read 3.0.0-RC2 modules, I'll update this PR, and it should be good to merge.

Note that the limitations discussed in this comment, and below it, still apply.
Support for new types of statements (extensions, …) need to be added (which hopefully should only be a matter of adding a few cases in the preprocessor around here).
Line numbers in the stack traces are still wrong (we need an equivalent of the LineModifierPlugin in Scala 3 - I initially thought just postprocessing the warning and error messages, as done in the BSP support, would be fine, but it can't work for line numbers in stack traces, so we still need a compiler plugin…)
Entrypoints in scripts don't work yet. mainargs needs to be ported to Scala 3.

It seems we now have nightlies with https://github.com/scala/scala/pull/9617 (4fa6da5, cefcd53), going to try to update this.

Now only waiting for https://github.com/com-lihaoyi/Ammonite/pull/1180, so that we can use 2.13.6 as the 3.0.0-compatible 2.13 version rather than a 2.13 nightly, and so that we can scrap all the scala nightly version stuff.


Added OVN-IC path for collect-sos-ovn subcommand, so it works for OCP 4.14+

With the new OVN-Kubernetes interconnection scheme added in 4.14, all the nodes now have their own OVN databases and those are located in folders different from the previous location.
The sos report module openshift_ovn usually gathers them, but places them in the current location, so ovs-offline cannot find them.
This PR just adds the new path to the locations to search at while collecting OVN information from sosreport.

Awesome! Thanks  @palonsoro

NP. Thx to you


Add support for Arduino callbacks

Description:
Related issue (if applicable): fixes #3733
Checklist:

[x] The code change is tested and works locally.
[x ] Local tests pass with tox. Your PR cannot be merged unless tests pass

Hi @daniel-s-ingram,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

@fabaff,
I cannot comment on #3733 since it has been locked and limited to collaborators, but I just saw your comment there that we can move to pymata-aio. Should I push another commit to use that API instead? https://github.com/MrYsLab/PyMata uses cb for its callback argument whereas https://github.com/MrYsLab/pymata-aio uses callback.

@fabaff,
I cannot comment on #3733 since it has been locked and limited to collaborators, but I just saw your comment there that we can move to pymata_aio. Should I push another commit to use that API instead? PyMata uses cb for its callback argument whereas pymata_aio uses callback.

with callbacks it should not be needed to poll the platform any longer.

With callbacks it should not be needed to poll the platform any longer.

@fabaff,
Are you referring to the update method in ArduinoSensor?

Yes. According to Digital And Analog Data Reporting Callback Usage Guidelines could the code for the binary sensor and the sensor itself become much simple.

The actual callback needs to be added.

Shouldn't the callback be defined in the file instantiating the Arduino class?

We are not accepting changes to Home Assistant for people using the internal classes outside of Home Assistant.


Implement Data reading and writing

Implements file reading and writing for Data. For now use String for path instead of URL.

@swift-ci test

It is unfortunate that this does not use swift-system -- that library is supposed to expose OS APIs such as open and read in their full fidelity, which platform-abstraction libraries such as Foundation can use as a safe, idiomatic interface to the OS (hence the name "system"). Its maintainers at Apple have invested a significant amount of time on it.
It would be much nicer if this patch could introduce a set of functions to integrate Data with FilePath (even as an internal implementation detail), building on the functionality already present in swift-system, and then layer its public API on top by converting strings and URLs to FilePaths.

It is unfortunate that this does not use swift-system -- that library is supposed to expose OS APIs such as open and read in their full fidelity, which platform-abstraction libraries such as Foundation can use as a safe, idiomatic interface to the OS (hence the name "system"). Its maintainers at Apple have invested a significant amount of time on it.
It would be much nicer if this patch could introduce a set of functions to integrate Data with FilePath (even as an internal implementation detail), building on the functionality already present in swift-system, and then layer its public API on top by converting strings and URLs to FilePaths.

This is a long-term goal. Our shorter term one is to provide a drop in replacement implementation for this that works on all platforms (including Darwin), and the best way to do that is to make sure we replicate the existing functionality exactly.
Once we address some limitations in swift system (including some that are internal to Darwin builds but affect us here) we intend to figure out how to expose FilePath based API via Foundation.

@swift-ci test

@swift-ci test

@swift-ci test


Suspected race condition in Throttle operator

Hello, we believe we have identified a race condition in the Throttle operator:

Which library version?

Reproduced in 4.1.0 and 5.0.0

What are the platform(s), environment(s) and related component version(s)?

Reproduced with
Windows 10 20H2
.NET 5.0 (with system.reactive 5.0.0)
.NET Framework 4.8 (with system.reactive 4.1.0)

What is the use case or problem?

If a second event arrives at the Throttle(TimeSpan dueTime) operator at almost exactly the same time as a cached event is due to be propagated, then neither will be emitted.   I have reproduced this with Throttle(TimeSpan.Zero) but believe that it could happen with any timespan if a second or subsequent event arrives at an inopportune time.
A review of the code suggests the following interaction can occur between Throttle._.OnNext and Throttle._.Propagate
            public override void OnNext(TSource value)
            {
                ulong currentid;

                lock (_gate)
                {
                    _hasValue = true;
                    _value = value;
                    _id = unchecked(_id + 1);
                    currentid = _id;
                }

                _serialCancelable.Disposable = null;
                _serialCancelable.Disposable = _scheduler.ScheduleAction((@this: this, currentid), _dueTime, static tuple => tuple.@this.Propagate(tuple.currentid));
            }

            private void Propagate(ulong currentid)
            {
                lock (_gate)
                {
                    if (_hasValue && _id == currentid)
                    {
                        ForwardOnNext(_value!);
                    }

                    _hasValue = false;
                }

If two items arrive at OnNext in quick succession:
OnNext(1):

hasValue = true, value = 1, id = 100 (let's say)
schedules Propagate(1)

OnNext(2):

hasValue = true, value = 2, id = 101
schedules Propagate(2)

Propagate(1):

hasValue is true but id doesn't match so doesn't forward value
clears hasValue

Propagate(2):

id matches but hasValue is false, so doesn't forward value

What is the expected outcome?

An event is emitted if no further events are received within the Throttle dueTime.

What is the actual outcome?

No event is emitted

What is the stacktrace of the exception(s) if any?

N/A

Do you have a code snippet or project that reproduces the problem?

Example .NET 5 console app referencing System.Reactive 5.0.0
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;

while (true)
{
  var source = Observable.Create<int>(o =>
  {
    o.OnNext(1);
    o.OnNext(2);
    return Disposable.Empty;
  });

  var i = 0;
  try
  {
    while (true)
    {
      i++;

      await source
        .Throttle(TimeSpan.Zero)
        .Timeout(TimeSpan.FromMilliseconds(100))
        .Take(1);
    }
  }
  catch (TimeoutException)
  {
    Console.WriteLine($"Failed after {i} iterations");
  }
}

Seems like  _hasValue = false; should be within the scope of the 'if', or so I suppose...

Thank you for fixing this so quickly!


Is there a prediction code?

Is there a prediction code?

Hi @DSQ111 and thank you for your question. Currently there is no dedicated prediction code in this repo, but you can directly borrow the TestModel() function in train.py to build a prediction .py file.


EXSWHTEC-139 - Implement tests for hipGraphicsResourceGetMappedPointer

Basic positive tests
Positive parameter tests
Negative parameter tests.

Depends-on: #62

@mirza-halilcevic
Will you please resolve the merge conflicts for this PR?

PR has been merged into develop branch via c8eae3a168dabe229690650d7411266fddd09714.


docs: fix some plugin READMEs

Ⅰ. Describe what this PR did
Fix wasm-cpp jwt-auth and key_rate_limit README.md
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

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

Codecov Report

Merging #327 (e280882) into main (74ad9a5) will increase coverage by 0.34%.
The diff coverage is n/a.

Additional details and impacted files

@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   41.67%   42.01%   +0.34%
==========================================
  Files          44       44
  Lines        5850     5850
==========================================
+ Hits         2438     2458      +20
+ Misses       3237     3217      -20
  Partials      175      175

see 1 file with indirect coverage changes


Wrong style in Android on background when open default gallery

Bug
Version Number of Xamarin Forms: <IP_ADDRESS>
Version Number of Plugin: v<IP_ADDRESS>-beta
Device Tested On: samsung galaxy tab s2
Simulator Tested On: -
Expected Behavior
When I open default gallery with PickPhotoAsync I expect the gallery opened over my app OR in a different activity but with same style
Actual Behavior
My app has white background and orange primary and primarydark colours, PickPhotoAsync open a page with black background and blue primary and darkprimary colours
Steps to reproduce the Behavior
Simply call PickPhotoAsync on a tablet, it doesn't happened in phones, it seems that sometimes the gallery doesn't open fullscreen
Notes
following a couple of screenshots, how the app looks like:

how the background behind the gallery looks like

The library launches the default gallery, we have no control over the color scheme.


Could not install add-on

@hao1300 we're just started noticing an issue (within the past few hours) with the firefox-modheader/modheader.xpi add-on, specifically we're receiving the following errors:
Could not install add-on: /tmp/tmpw048_e__: ERROR_CORRUPT_FILE: The file appears to be corrupt.
Stacktrace:
WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
UnknownError@chrome://remote/content/shared/webdriver/Errors.jsm:510:5
install@chrome://remote/content/marionette/addon.js:86:13

and was wondering whether it was related to your recent https://github.com/modheader/modheader_selenium/commit/efc74ff496320faec275a17b7abf2fc2d22d5538 commit.

@john-bodley - that is quite possible. I just released new .xpi file, though it should have been signed and released the same way as before. Can you share some code snippet on how you are loading it? I am not able to reproduce on my side.

To be sure, I have republished a new version. Can you give that a try too to see if it is working?

Closing this issue. Feel free to reopen with more details if you still run into issues.


Unable to compile the swift interface

Describe the bug
I am not able to compile the swift interface due to an incomplete type.
To Reproduce

cmake . -DUSE_SWIFT_INTERFACE=1
make
See the two errors (I have removed the duplicates)

Log files
VELOCIraptor-STF/src/swiftinterface.cxx: In function ‘int InvokeVelociraptor(size_t, size_t, NBody::gpart*, part*, float*, const int*, char*)’:
VELOCIraptor-STF/src/swiftinterface.cxx:183:27: error: invalid use of incomplete type ‘struct NBody::gpart’
         if(gravity_parts[i].type == DARKTYPE) {

In file included from VELOCIraptor-STF/NBodylib/src/NBody/NBody.h:19:0,
                 from VELOCIraptor-STF/src/allvars.h:41,
                 from VELOCIraptor-STF/src/swiftinterface.h:24,
                 from VELOCIraptor-STF/src/swiftinterface.cxx:5:
VELOCIraptor-STF/NBodylib/src/NBody/Particle.h:163:31: note: forward declaration of ‘struct NBody::gpart’
         Particle(const struct gpart &p,  double lscale, double vscale, double mscale, double
...

VELOCIraptor-STF/src/swiftinterface.cxx:293:43: error: invalid initialization of reference of type ‘Options&’ from expression of type ‘Int_t {aka long long int}’
         CopyMasses(nhalos,pdatahalos,pdata);
                                           ^
In file included from VELOCIraptor-STF/src/swiftinterface.h:25:0,
                 from VELOCIraptor-STF/src/swiftinterface.cxx:5:
VELOCIraptor-STF/src/proto.h:273:6: note: in passing argument 1 of ‘void CopyMasses(Options&, Int_t, PropData*&, PropData*&)’
 void CopyMasses(Options &opt, const Int_t nhalos, PropData *&pold, PropData *&pnew);

Environment (please complete the following information):

OS: Linux x86_64
Libraries: gcc/5.4.0; openmpi/2.1.0; hdf5/1.10.0; cmake/3.12.1
Version master @ 70f159ceadd3b1e84878a86cf776d4f90d081127

Additional context
I have seen in CMakeLists.txt that you use the environment variable SWIFT_INCLUDE_DIR, but I do not know which directory I should provide. I tried $SWIFT_ROOT and $SWIFT_ROOT/src but it does not seem to matter.

@james-s-willis you may want to take care of it

Could you try pulling the latest master Loic?

I just merged the swift-interface branch into the master branch this morning. It should address these issues.

Everything is good now, thanks


openai-whisper-cpp: fix CUDA build dependency

Description of changes
For the previous commit, I thought cuda_cccl.dev was redundant because I can successfully build it without cuda_cccl.dev with callPackages in environment.systemPackages.
After it merged, when I use the master branch as flake input and build with that input, I get an error message:
/nix/store/bx7qv1akfp142m2orenqrphf39j6rzp-cuda_cudart-12.2.140-dev/include/cuda_fp16.hpp:65:10: fatal error: nv/target: No such file or directory
       >    65 | #include <nv/target>
       >       |          ^~~~~~~~~~~

Adding cuda_cccl.dev in buildInputs fix it. (llama-cpp also have this dependency)
Sorry about that.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Apologies, didn't see this issue, feel free to mention me if something else crops up.

Apologies, didn't see this issue, feel free to mention me if something else crops up.

Thats OK! I think just use your PR is fine!


App Directory Location: is invalid

I have been trying to follow this guide "https://docs.microsoft.com/da-dk/azure/static-web-apps/getting-started?tabs=vue"
I had allready started a vue project so i am not totally sure, what i should write inside app_location, because mine is set up in a different way then the one displayed in guide
this is the development code i have been using
`name: Azure Static Web Apps CI/CD
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WONDERFUL_SEA_03818DA03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/src/views/dist" # App source code path
api_location: "" # Api source code path - optional
output_location: "" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WONDERFUL_SEA_03818DA03 }}
action: "close"
`
link to the github if needed
https://github.com/Vampiredk/Woof

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

ID: 59b3b161-b559-f90b-1566-f18776a5f7da
Version Independent ID: 3e536234-16ad-2ed3-fb58-c128ba2faab2
Content: Quickstart: Building your first static site with the Azure Static Web Apps
Content Source: articles/static-web-apps/getting-started.md
Service: static-web-apps
GitHub Login: @craigshoemaker
Microsoft Alias: cshoe

app_location should be "/" and output_location should be "dist". It's easier to let Azure Static Web Apps Visual Studio Code extension do the work for you. For reference, check #88921.

changed it to that, but know i am getting this problem

Vampiredk, To isolate the issue, please see if your project works fine locally and suggest you to test the sample linked in the doc and have similar config set. On a similar discussion thread, users were able to fix the issue by - running npm audit fix, and/or appropriate nodmod version - see if it helps.
Also, as mentioned in this thread -"fsevents is an OS X-only module, you can't install it on Windows."
As a side note, this channel is reserved for ‘Azure docs’ feedback (doc bug or enhancement). This doc aims to provide a quickstart guide for deploying Azure Static Web apps with the sample linked. I see that you have also raised this question here - https://github.com/Azure/static-web-apps/issues/754

Vampiredk,  We will close this thread for now. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion.


Edit captions and drag and drop

Hello,
It would be great to be able to edit captions in the IPTC and drag and drop the original files off the grid to some other place outside of Picturama - Such as the desktop, a folder etc.

Drag and drop to other apps is already covered by #30 - so I'll remove it from this issue.


Show auth code web link in console window in addition to redirect

If the local machine does not redirect the user (open a browser window) then they are unable to authenticate against the client / secret
We should show the auth code redirect url in the output window, or console, so there is a workaround available.

linked discussion: https://github.com/sasjs/vscode-extension/discussions/332#discussioncomment-2740810


fetch continent cookie on server-side and clean up video effects

fixes #3856
fixes #3961
View events weren't firing because the streaming URL changed after the first render for new users, which caused the player to re-render and the listeners weren't added correctly.
I thought I just needed to move the continent cookie stuff to the server, but the actual issue was that those listeners weren't being attached properly from the beginning.

merging since view counts are sorta broken right now


some tests and stuff

Attempting to learn the code by adding some tests.
One big question about the license processing code - it blows up for me when run locally. See comments in the last test I added.

:tada: This PR is included in version 1.0.56 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[FP]: Wrongly reporting vulnerability on pax-logging-log4j2

Package URl
<EMAIL_ADDRESS>CPE
cpe:2.3:a:apache:log4j:::::::: versions from (including) 2.0; versions up to (excluding) 2.8.2
CVE
CVE-2017-5645, CVE-2021-44228, CVE-2021-45046, CVE-2020-9488, CVE-2021-44832, CVE-2021-45105
ODC Integration
{"label"=>"Maven Plugin"}
ODC Version
8.3.1
Description
Our product is not packing vulnerable log4j component (ie. Apache Log4j 2.x before 2.8.2), instead we are using pax-logging-log4j2-2.2.0 (interns it uses log4j-core-2.18.0).  But tools reporting below CVEs on pax-logging-log4j2-2.2.0, which is wrong.

CVE-2017-5645
CVE-2021-44228
CVE-2021-45046
CVE-2020-9488
CVE-2021-44832
CVE-2021-45105

From Dependency Check tool team, we need confirmation on these false positives.  Could you please validate and confirm?

approved


npm: ignore assets dir

assets/ dir is around 6M that nobody needs when install the package... ignore it!

Thanks a lot @llafuente 👍 🎉


Increment version.

Incremented our package.json to v3.2.1 to fix the Axios issue.

I'll skip the review, as this is a basic change.


Converter for proto to pojo rel representation

Processing on Substrait plans in Java is much more clearly accomplished by working with the POJO representation rather than the serialized proto representation. The ProtoRelConverter class implements this with the help of the existing ProtoExpressionConverter class.

just fyi, once rebased you need to run Gradle with JDK 17 and then just do ./gradlw spotlessApply to get the code properly formatted

Thanks, @jacques-n  and @nastra. All fixed up now.

Thanks for the review, @jinfengni. I've updated the PR.

@JamesRTaylor , is kind of hard to decompose this change. It looks like there are 3 relatively discrete changes in this PR.

Refactor functionlookup into separate interfaces and impls.
Update to the latest Substrait upstream version
Implement the proto => pojo conversion for rel nodes.

Would you be willing to break these changes apart?
Interestingly, it's very hard to review the submodule version update in Github. From what I can tell, the hash you're referencing isn't available in the substrait github repo on the main branch.

Changes are already in separate commits, @jacques-n. The submodule version update in Github isn’t necessary. I can revert that inadvertent change from the last commit.

Can you rebase. Unfortunately it is showing this with all the changes.

Rebased. Will address your other comments in a new commit.

Please take a look when you have a chance, @jacques-n. I can convert other methods to use the stream APIs instead of for loops if you think it's an improvement. I'll squash all the commits after you approve the changes.

PTAL, @jacques-n. I've updated it based on your comments. Thanks for the reviews.


generate unit test with snakemake but missing quote for configfile in generated test scripts

snakemake 5.31.1
I ran my workflow with success a first time
snakemake --configfile config/config_test_rapidrun.yaml -s Snakefile --cores 8 --use-conda

and then I ran again my workflow to generate unit test scripts using --generate-unit-tests
 snakemake --configfile config/config_test_rapidrun.yaml -s Snakefile  --cores 8 --use-conda --generate-unit-tests

I ran pytest3
python3 -m pytest .tests/unit/

Then all the tests failed. It appears that the path of the configfile is not quoted inside the scripts:
Instance of error:
========================================================================== ERRORS ==========================================================================
____________________________________________________ ERROR collecting .tests/unit/test_trim_primers.py _____________________________________________________
../../../miniconda3/envs/snakemake_rapidrun/lib/python3.9/site-packages/_pytest/python.py:578: in _importtestmodule
    mod = import_path(self.fspath, mode=importmode)
../../../miniconda3/envs/snakemake_rapidrun/lib/python3.9/site-packages/_pytest/pathlib.py:531: in import_path
    importlib.import_module(module_name)
../../../miniconda3/envs/snakemake_rapidrun/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
../../../miniconda3/envs/snakemake_rapidrun/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:161: in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
../../../miniconda3/envs/snakemake_rapidrun/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:354: in _rewrite_test
    tree = ast.parse(source, filename=fn_)
../../../miniconda3/envs/snakemake_rapidrun/lib/python3.9/ast.py:50: in parse
    return compile(source, filename, mode, flags,
E     File "/home/pguerin/working/edna/snakemake_rapidrun_swarm/.tests/unit/test_trim_primers.py", line 37
E       /home/pguerin/working/edna/snakemake_rapidrun_swarm/config/config_test_rapidrun.yaml
E       ^
E   SyntaxError: invalid syntax

And the faulty code:
        # Run the test job.
        sp.check_output([
            "python",
            "-m",
            "snakemake",
            "results/04_trim_primers/projet1/chond/sample2.fastq",
            "-F",
            "-j1",
            "--keep-target-files",
            "--configfile",
            /home/pguerin/working/edna/snakemake_rapidrun_swarm/config/config_test_rapidrun.yaml

            "--use-conda",
            "--directory",
            workdir,
        ])

I have the same issue when defining a configfile with --configfile.
If I define a configfile in my Snakefile like so:
configfile: "config/config.yaml"

Pytest throws the following error:
E               subprocess.CalledProcessError: Command '['python', '-m', 'snakemake', 'results/workflow/GRCh38/A.fa.gz', '-F', '-j1', '--keep-target-files', '--use-conda', '--directory', PosixPath('/tmp/tmplu3iwqww/workdir')]' returned non-zero exit status 1.

../../anaconda3/envs/snakemake_tests/lib/python3.8/subprocess.py:512: CalledProcessError
------------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------------
results/workflow/GRCh38/A.fa.gz
WorkflowError in line 20 of /home/user/git_group/new_project/workflow/Snakefile:
Config file config/config.yaml not found.
  File "/home/user/git_group/new_project/workflow/Snakefile", line 20, in <module

Interestingly, I am able to reproduce the WorkflowError when specifying a temporary directory with -d temp/. I assume that snakemake is looking for any external config files based on this new working directory, but isn't finding any. Following up on this assumption, I tried using absolute paths which lead to tests running (as in finding input files), but failing due to the following error:
E           ValueError: Unexpected files:
E           results/logs/createRandomIntervals.GRCh38.A.log
E           results/logs/extendInterval.GRCh38.A.log
E           results/logs/getSequence.GRCh38.A.log
E           results/workflow/GRCh38/A.bed.gz

.tests/unit/common.py:41: ValueError

I hope this helps

Hey,
I have the same problem. I define my config.yaml in common.smk, run my workflow succesfully, generate the unit tests automatically and then I wanted to test them with pytest. There are a couple of issues with that:

My workflow workdir is usually not the local repository but snakemake will generate the .tests directory in the workdir and not in the repository. Thus, running the tests will throw an error as it does not find the Snakefile. So I have to move my tests to the repo after generation.
The next problem is the config.yaml, samples.tsv and units.tsv which are not added as to the directories for the tests (data and expected). The tests fail because they are necessary for the workflow. I had to add them manually to all directories.
I understand that log files can not be compared, however, their generation is part of the rules which will lead to problems when pytest compares the output from the rule to the expected. I added os.remove(...) to remove them prior to the check but that is an ugly hack and I would like to get rid of that.
I use singularity for all my rules to make my workflows more portable - the autogenerated tests ignore container definitions which has the tests fail.
For two rules I receive a MissingRuleException which is weird as I could run the workflow successfully. The output from pytest is rather confusing and does not indicate any helpful information. It says it could be due to input functions. I don't use input functions for these specific rules. I add the definition of one of them below.

rule mark_duplicates:
  input:
    "{sample}/{unit}/bwa_mem.bam"
  output:
    bam = "{sample}/{unit}/mark_duplicates.bam",
    metrics = "{sample}/{unit}/mark_duplicates.metrics",
  shell:
    "gatk MarkDuplicates "
      "--java-options "
      "-Xmx30g "
      "-I {input} "
      "-O {output.bam} "
      "-M {output.metrics} "
      "--TMP_DIR {wildcards.sample}/{wildcards.unit}"

Any kind of feedback would be highly appreciated 😄

I think the following line needs to be updated:
https://github.com/snakemake/snakemake/blob/99d2517b3456771574c26a40da0cff0e611ad99a/snakemake/unit_tests/templates/ruletest.py.jinja2#L39
and replaced with
    "{{ configfile }}",

But there would also need to be some changes in how the config files are handled. Would it make sense to simply copy the config directory to the workdir? But there seem to be several additional issues here.

Okay, I've fiddled around a bit with this in the past few days. A result is here:
https://github.com/nikostr/dna-seq-deepvariant-glnexus-variant-calling/tree/main/.tests/unit
The changes I've done to get this working:

Instead of using the --configfile flag, copy or symlink the config directory into the .tests/unit directory, and update these lines in each test file (could be done in the jinja template):
https://github.com/nikostr/dna-seq-deepvariant-glnexus-variant-calling/blob/e6a945b7a0a3ac006c68a5291e28f7bc8fbafdad/.tests/unit/test_bcftools_filter.py#L20-L24
Update common.py to ignore config and log files, and other (project-specific) files that are hard to compare:
https://github.com/nikostr/dna-seq-deepvariant-glnexus-variant-calling/blob/e6a945b7a0a3ac006c68a5291e28f7bc8fbafdad/.tests/unit/common.py#L29-L36

This is of course possible to do manually, but I'd propose that this is a sensible update, together with clear instructions on how to generate the unit tests. These could specify that the config directory should contain all the config files necessary to run the tests.


Ability to Delete and Rename files from the Directory Listing

It would be nice if files could be deleted from the directory listing rather than having to open a file and delete it. Also, there doesn't seem to be an option to rename the files. Again this would be nice if it could be included in the directory listing.

Agreed, this would be a great feature.


fix: Add 'true' and 'false' to boolean value (#86)

Proposed changes
It should be added because edge template receive 'true' or 'false' as value when doing this :
Controller.ts
const myObjectWithBoolean = await MyObjectWithBoolean.query()....firstOrFail() //{myBoolean: true}
return view.render('myView', {...myObjectWithBoolean.toJSON()})

view.edge

{{myBoolean}}
  => display 'true', not 1, '1' or 'on'
eg.

  <input type="checkbox" x-model="showMessage">
  <input type="hidden" name="showMessage" :value="showMessage">

Types of changes
What types of changes does your code introduce?
Put an x in the boxes that apply

[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[x] I have read the CONTRIBUTING doc
[x] Lint and unit tests pass locally with my changes
[x] I have added tests that prove my fix is effective or that my feature works.
[ ] I have added necessary documentation (if appropriate)

Further comments
/

Thanks for it. Before I publish it, can you please also create another PR for the docs? https://github.com/adonisjs/adonisjs.com/blob/develop/docs/docs/guides/03-validator/03-data-types.md

Thanks for it. Before I publish it, can you please also create another PR for the docs? https://github.com/adonisjs/adonisjs.com/blob/develop/docs/docs/guides/03-validator/03-data-types.md

I don't understand, there is already 'true' and 'false' in the list

"1", 1, "on", "true" is casted to true.
"0", 0, "off", "false" is casted to false.

Ohh okay. Ignore it then 🙂


Improving cluster fixtures once more to be speedy and cover use cases.

Passing locally:
pytest -v --level local -k "TestCluster or TestResource"

pytest -v --level local -k "TestEnv"

Yet to pass / test:
pytest -v --level local -k "TestFunction"

pytest -v --level local -k "TestSecret"

pytest -v --level local -k "TestModule"

pytest -v --level local tests/test_servers/

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

main

PR #264

PR #265

PR #266   👈

This stack of pull requests is managed by Graphite.

Merge activity

Dec 27, 4:09 PM: @rohinb2 started a stack merge that includes this pull request via Graphite.


Partner logo "HealthCapitel"

Add the partner logo "HealthCapitel" in the footer. The image file is located in figma under assets: and taken from here: (28kB, transparent png)

Mrs Hahne sent me the logo

and also an .ai file (had to zip it so it goes into github>
logo_HealthCapital.zip

@Kavakuo Could you be so kind and implement it? Haven't opened the code for weeks so it would take me some time. I've added it in the new footer component and also re-sized and re-arranged everything a bit for more space, hope that helps, reach out if it still breaks the footer layout. If you export in 2x it should be big enough.
https://www.figma.com/file/grhz2zf8AA9Xlly5QyYZhJ/Components?node-id=957%3A421
@JoRichers @topialla It's getting pretty cozy in our footer, we should think about a new place for logos before adding any more. ;)

 Add Healthcapital logo


Support data types other than string for click.Choice values

Several times I have used click.Choice where I want my set of values to be integers.  However this class requires that the values be strings, and the resulting value is also a string (requiring conversion in my code before and after).  Is it not possible to allow other types?  Certainly it would be reasonable to raise an exception if the set of choices contained a variety of types, but as long as they were consistently one type this seems a useful improvement.  I'd be happy to work on such a feature, but wanted to check if this seems reasonable before I expend the effort.  Thanks!  (I LOVE the library, by the way!)

Click should at least convert to strings all elements from the iterator received, which is something very easy to do that will sort most of this problem.

@ssbarnea, I don't understand how click converting integers to strings helps us get integers passed to our decorated functions.

@altendky AFAIK, all my functions do assume that they will receive strings because CLI works only with strings anyway. You cannot pass real integers to a program, they are all in the end just strings.

@ssbarnea, in the command line yes, but the point is that it is nice to have an abstraction between that extremely limited environment and Python.   This means that my patch would not fix this issue but is is still valid, fixing the display of non strings objects, right?

@ssbarnea, that may be a separate thing that some people want but you'll have to have your code be expecting the string form anyways at which point it seems you may as well just have passed in strings to begin with.  But I'm admittedly on the go and haven't thought about this a lot right now.
It might be more reasonable to have a thing (maybe enhanced click.Choice, maybe something else) that takes a mapping from strings to whatever.  Given values = [9600, 19200, 57600] you could pass {str(value): value for value in values}.  Keep in mind that in other cases you may easily need something other than str() to create the strings.
Anyways, maybe what this ticket needs is example uses to get any idea of what cases need to be covered.  I feel like there may also be some simple patterns that might relate to this that could be implemented with existing options but they aren't coming to mind presently.
Relates to #605 though it is specifically for enums.

Regarding coercing other types to str, I closed the PR in favor of adding annotations instead of runtime checks. I think I'd like to keep Choice as-is right now. If you need to map to other types, you can either subclass and override Choice.convert, or add a callback to the parameter.


Correct spelling of 'generated'

Thank you for bringing this typo to our attention. We will fix it along with some other code fixes soon. Also, please let us know if you're interested in helping contribute to some features or bug fixes, and we will point you in the right direction!


Permalink structure from routes.yaml not shown in editor

Issue Summary
When I create a new blog on ghost.org, and change the routes.yaml permalink structure for blog posts, this structure is not reflected in the editor settings pane. For example, if the routes.yaml says the permalink is /blog/{year}/{month}/{day}/{slug} the editor settings pane will only show the original structure, /{slug}
To Reproduce

Create a new Ghost blog (I used ghost.org hosting but it might work on self-hosted instances).
Save a new blog post with a title
Download the routes yaml file, in the "Labs" section of the site settings.
Change the downloaded routes.yml file so that the root collection's permalink property is /{year}/{month}/{day}/{slug}/
Rename routes.yml to routes.yaml before uploading or you'll get an error saying only yaml is supported (I'll file a separate bug report for this issue).
Upload the new routes.yaml file in Settings
Reopen the blog post. The url structure in routes.yaml is not reflected in the settings pane.

In addition, if you delete the blog post and start a new one with the same title, it won't reflect the new structure as expected.
Technical details:

Ghost Version: ghost.org hosted, not sure
Node Version: ghost.org hosted
Browser/OS: macOS Catalina 10.15.6, Brave browser
Database: ghost.org hosted

This is a duplicate of https://github.com/TryGhost/Ghost/issues/12090