text:
hack ln implementation in convnext

See https://github.com/pytorch/pytorch/issues/71465
Slightly changes LayerNorm2d implementation,

currently when ln2d is called on a contiguous tensor, it accidentally turns most of the network into channels last mode, line 114 undoes that. With that change, eager benchmark numbers in contiguous format on A100 are 573 img/s ( python benchmark.py --bench train --img-size 224 -b 64 --precision float16 --model convnext_base). Even though eager ln implementation would copy inputs to be contiguous (and back) it's still faster than alternative decomposition

Benchmarking in float16 precision. NCHW layout. torchscript disabled
Model convnext_base created, param count: 88591464
Running train benchmark on convnext_base for 40 steps w/ input size (3, 224, 224) and batch size 64.
Train [8/40]. 573.06 samples/sec. 111.680 ms/step.
Train [16/40]. 573.13 samples/sec. 111.668 ms/step.
Train [24/40]. 573.16 samples/sec. 111.662 ms/step.
Train [32/40]. 573.16 samples/sec. 111.662 ms/step.
Train [40/40]. 573.16 samples/sec. 111.663 ms/step.

Where permute - ln - permute really improves things is channels last format (where permutations are free, and no .contiguous calls are needed), lines 115-121 enable that. The eager numbers are 619 img/s, the difference with channels-first is 8% give or take

Benchmarking in float16 precision. NHWC layout. torchscript disabled
Model convnext_base created, param count: 88591464
Running train benchmark on convnext_base for 40 steps w/ input size (3, 224, 224) and batch size 64.
Train [8/40]. 621.58 samples/sec. 102.964 ms/step.
Train [16/40]. 621.60 samples/sec. 102.961 ms/step.
Train [24/40]. 621.57 samples/sec. 102.965 ms/step.
Train [32/40]. 621.56 samples/sec. 102.968 ms/step.
Train [40/40]. 621.56 samples/sec. 102.967 ms/step.

NVFuser + AOT autograd further improve this to 642 img/s (python benchmark.py --bench train --img-size 224 -b 64 --precision float16 --model convnext_base  --aot-autograd --fuser nvfuser --channels-last)
Finally, ln kernels in the core are not optimized for small normalization dimension encountered here (128-512), so tricking nvfuser to codegen normalization kernels (  * 1.) further improves perf to 667 img/s, at the cost of slight eager pessimization (it's 619 with this pointless multiplication)

So in this case channels last is clearly faster, and nominally doesn't require a new LayerNorm2d op in the core, because existing LayerNorm already performs the necessary computation. Although core could definitely be improved to handle smaller normalization dimensions, future hear is codegening the performant kernels, which nvfuser is doing, with some massaging which we should make easier in the future.
Given this, @rwightman is it still high priority to add LayerNorm2d to core? In case of channels-last it would still be doing exactly what's done here and call LayerNorm underneath, so it would be limited by how optimized (or not) existing kernels are. Contiguous would improve by having dedicated kernels, but contiguous is slower to begin with.
cc @csarofeen, @chillee, there are cases where single-op ln fusion is beneficial, so maybe aot should do that? (I think there also are cases where single-op ln is slightly faster in core, so it's not a clear cut decision, would be nice if it were).

@ngimel thanks for demonstrating this... it works, but like my prev impl, it is a hack. I actually just pulled my iscontiguous version out. It was causing too many problems, and like your new version, it slows things down on older pytorch versions (that I still need to support) and even slows down eager mode a bit in some cases. Also, thanks to torchsript limitations, I can't script the memory_format arg, I had an ugly workaround in mine, but with your impl checking both formats I don't know how it'd be possible to torchscript a model using it.
So I'm sticking with just F.layer_norm(x.permute(0, 2, 3, 1), self.normalized_shape, self.weight, self.bias, self.eps).permute(0, 3, 1, 2) for now and hoping for an efficient, native way to tackle this at some point.
Also, if the torch API is changed args or layers are added, it's usually pretty easy to check if an arg exists or a new layer/fn exists and use it if present. For hacks like this though, that have very lumpy performance across older PyTorch versions (and sometimes weird issues with older hardware), it can be very challenging to determine what is appropriate to use in what instance (ie I've found out the hard way it's safer just to use permuute().layer_norm.permute() than try to use these hacks that can demonstrate performance is being left on the table, but worsen many scenarios....

The existing implementation (F.layer_norm(x.permute(0, 2, 3, 1), self.normalized_shape, self.weight, self.bias, self.eps).permute(0, 3, 1, 2)) accidentally puts the rest of the model in channels last format, which is bad for fp32/older arches, creates unfair channels-last/non-channels-last comparisons for fp16/newer arches, and also has the potential to tank the perf of model architectures that have both LayerNorm2d and grouped convolutions (or other layers that are known bad in channels last) - grouped convolutions are bad in channels last in many cases, and LayerNorm2d would force model to channels-last regardless of command-line arguments. This should be fixed IMO.
I understand that my impl is not scriptable due to memory format arg, but, well, there are ugly workarounds, and also script shouldn't be the way to speed-up models going forward, aot_autograd is increasingly becoming that thing.
We can add a not-very-performant LayerNorm2d that would hide implementation details, but going forward the way to get performance will be using codegen (and nvfuser already demonstrates that it can generate pretty good kernels), and not lots of precompiled kernels in the core that cover all the parameter space.

@ngimel a lot of people still use scripting for serving / export, not just performance. 'aot' vs 'torchcsript' on 1.12 is interesting, they are still quite different in some cases in terms of what the end result is performance-wise. And while forward is often a win, backward is frequently worse than eager.
I'll hack around with your ideas a bit more and see if there is a compromise. Given that codegen is not trivial to use at this point, is not a default, is not somethign most people aware of, and does not result in constinent improvements (especially for training) across a broad set of models, I'd still favour an impl that is best in the default scenario (most of the time).  Also, the codegen, or the code needed for the codegen to work can't get in the way of efficient model export, etc.

cc @csarofeen for regressions in backward, my understanding was that (at least for not-channels-last) aot is a win.
@rwightman I agree with your points, and btw if TorchScript is important for users, we should make them fix is_contiguous with memory format arg, because it can be frequently encountered in the actual scripts.
We are working to make codegen more usable, so it can be relied upon for performance.
Re: ease-of-use, is there anything we could do to make aot experience better?

I will add though, per the original torch issue w/ LN + axis... regardless of performance, not having a native norm layer that covers this use case (C-dim), without needing a custom layer, seems like an API gap. It's becoming more popular and it's 'native' by default in TF / JAX

cc @csarofeen for regressions in backward, my understanding was that (at least for not-channels-last) aot is a win.
I haven't seen significant regressions in backwards except in channels last BatchNorm, but in that case forward also suffers. @rwightman do you have any specific model we could take a look at, or is it just the channels last perf we're still struggling with. We're still targeting BN channels last perf by 1.13 in codegen. One thing we've played around with is the idea to codegen more directly within eager mode in some cases, but we've been prioritizing the new codegen stack (i.e. with Dynamo/FuncTorch/AOTAutograd).

@csarofeen keep in mind, I'm likely working with something a bit older than you, I was doing some testing on 1.12 release (cuda 11.3) via torchscript and aot-autograd. If you're working with newer nightlies, etc, I'm behind. A number of models were looking slower for backwards, I hope to run a big set of them soon to generate some comparative outputs...

We explicitly tested on 1.12 release, CC @ptrblck and @kevinstephano in case we were testing something slightly different. Definitely keep us posted, we're highly motivated to get our codegen in the best shape for you. If we need something targeted to work better with something a bit more dated, we might be able to figure something out as well.

@ngimel @csarofeen I ran a whole lot of BM runs on both 3090 and v100. As you can see, it's messy, I feel really messy without a clear cut win (or lose) across all scenarios. https://gist.github.com/rwightman/8b2c72d3e02147f4be75bb8165a588a7
I weight not worsening pure eager performance pretty highly. I also would rather not need to need to use torchscript or aot for good performance (there are usually some situations where it's trouble, large scale distributed libraries, other use cases).
The best performance is with torchscript (this is all 1.12 so NVF by default) and the simple permute method. The _c variants with 1x1 convs enabled for the mlp blocks is actually more representative of some other models I'm working with (where there are larger sequence of 2D NCHW ops (kxk stride convs or avgpool), etc mixed in with the need for a LN over channels.
Note the _c gets obliterated with @ngimel on V100 for some reason. The hacks often end up with an entry in the slowest for most of the model sizes. I think you can see why I decided to go back the the basic permute, it seems the safest and more often not the worst.

We explicitly tested on 1.12 release, CC @ptrblck and @kevinstephano in case we were testing something slightly different. Definitely keep us posted, we're highly motivated to get our codegen in the best shape for you. If we need something targeted to work better with something a bit more dated, we might be able to figure something out as well.

@csarofeen On this one, for the convnext, there is no clear trend relating to aot being slower than eager, with the exception of the 'base' reason (not clear why), most of them are slightly faster in train for aot, with quite a bit of noise due to the different LN impl.
One family of models that always seems to suffer in aot mode though are vit models (and related). See https://gist.github.com/rwightman/6c37e408192f2a94d29023099445e13f  ... both inference and train are worse.
For cnn and cnn-attn hybrids it's more variable. aot seems to be a win for inference most of the time, but train has random exceptions where train is slower, or just doesn't run. One other factor that may be contributing to the 'slower' is that aot is often causing higher memory consumption, so sometimes driving the batch size down in the auto-retry (at lower batch size).

There should probably be another location for 'nvfuser' + timm concerns, but will put this observation here for now
A number of torchscript + nvfuser failures are due to handling inplace activations. A number of models have inplace=True as default for activations, they're positioned such that they aren't a problem in eager (other buffers in the way), and weren't an issue for older torchscript backends, BUT with NVF as the torchscript backend, it appears to be optimizing such that the inplace ops violate grad rules a view of a leaf Variable that requires grad is being used in an in-place operation.

BUT with NVF as the torchscript backend, it appears to be optimizing such that the inplace ops violate grad rules a view of a leaf Variable that requires grad is being used in an in-place operation.

Hmmm. that's surprising... nvfuser really are only applying optimization passes within autodiff region and shouldn't be causing any autograd errors. Maybe we introduced new aliases which violates the schema?! That sounds surprising, as we usually go in the other direction (making copies other than aliasing).
Would still like to take a look at that and appreciate if you can point me to the model/script that repros the error.

Let me open a new issue to review all ts/aot problems in 1.12

@ngimel @csarofeen I spent a bit more time hacking around with this, as I keep getting frustrated by the lack of performance of non BN layers w/ PyTorch + GPU...
I ran some tests on a few familiar nets with PT XLA on TPU-v4. There things are more or less as expected, if I swap out the original nn.BatchNorm2d in say a ResNet or other well know archs with a custom '2D' C-dim LayerNorm or a GroupNorm  implemented as individual ops, they're all comparable. Somewhere in the range of a 1% or two faster, to 10% slower depending on the shapes of the feature maps / channels down the net.
Now contrast that to using PyTorch on a GPU. Moving away from nn.BatchNorm2d is almost always a world of ouch.
Switching to nn.GroupNorm(groups=32), for channels last inference throughput from 3500 -> 1100, train from 1200 -> 440. Contiguous, 2950 -> 1400, train from 920 -> 510. I'm well aware that BN is not comparable to GN or LN in terms of inference, but I wouldn't expect this big of a hit even for the inference numbers, and certainly not the difference we see here in train.
In the NCHW LayerNorm hacking I haven't found a good option with or without codegen. Without any codegen (and using permute impl since it's most consistent w/o codegen), a ResNet again, with channels last  3500 -> 1500, train 1200 -> 520. For contiguous 3000 -> 1470, train 920 -> 505. So comparable to builtin GroupNorm. With or w/o codegen the memory use for LN is higher and we have to drop batch sizes down for training.
Using codegen (norm layer only) for the LN I can get inference into 1900 range with the ResNet, but train throughput drops down to 400-300 :(
With Natalia's codegen hack and full model aot, we can get the resnet to 2700 im/sec inference and 640 train in channels_last. That's something, but non CL is still quite slow. But then, that's not apples to apples. If we compare the native BN model with full model codegen ... 5000 im/sec inf, 1200 train for aot, for torchscript 4300 inf, 1000 train (an instance where torchscript slows train, although known for CL?).
BatchNorm has many downsides, and I'm seeing more and more image models in the research space move away from it. But the state of PyTorch on GPU for as long as I can rember, there is no way of using alternate norm layers without a significant penalty. I don't believe this should be the case, as the differences in operations and flops between this norm layers isn't THAT significant relative to the other operations in the models, in some cases (for train at least), they should be less.
Codegen is improving, but it's still a long way from closing the gap (especially when you compare custom norm with model-level codegen to BN with codegen). I've been trying to train more non BN models (GN, 1-group GN, NCHW LN, EvoNorm, etc) and have ended up doing most of these non-BN experiments TPU w/ PT XLA because it's just too slow otherwise.
If it makes sense, can post this in https://github.com/pytorch/pytorch/issues/71465 ... the norm concerns due extend beyond just this one LN case though, as shown GN also seems much slower than it should be. And ops like EvoNorm, and other weight-standardization techniques, etc could benefit from a set of fast norm kernels that allowed arbitrary reduction vs affine axis.

Thanks for the data, Ross! I'm really surprised that channels-last LN is so slow - after all, it's just calling existing layer norm kernels directly, and it shouldn't be using more memory because it doesn't need copies internally to call those kernels. One hypothesis I have is that existing ln kernels do best for 1024+ features, whereas many layers in Resnet (and other image networks) are smaller than that, but even then I'd expect smaller difference, especially for inference, and I'd expect codegen to fully recover the difference. I'll take a look at what's going on (and @csarofeen I'd appreciate if someone on NVFuser team took a look at those case also).
Now, what are realistic ways forward? Norms (especially norms with arbitrary dimensions for parameters and normalizations) are pretty finicky, and writing kernels that would be good for wide parameter ranges is hard/requires a lot of kernels to handle different parameters, see that existing ln kernel in core that does pretty good on language models with 1024+ features, but falls on its face in image models with 128, and that's even before we start thinking about normalizations in the different dimensions (like GN, 1-group GN), or different kinds of norms, like RMS norm. XLA is solving this problem with codegen, and I was hoping that pytorch would have a more usable codegen state too, but unfortunately that hasn't happened yet.
So, short-ish term we can add mediocre-perf LayerNorm2d and somewhat improve its perf for smaller number of features, but a sustainable solution for this problem requires robust codegen, there's no way around it that I can see.

I did a sweep of LayerNorm FWD and BWD on the sizes I generally use for my "TIMM micro benchmarks":
Product of:
N [8, 16, 32, 64, 128, 256]
C [24, 40, 48, 56, 72, 152, 184, 200, 368]
H==W [7, 14, 28, 56, 112]
and product of :
N [128, 256, 512, 1024, 2048]
C [24, 40, 48, 56, 72, 152]
H==W [7, 14, 28, 56]
For simple testing I just did a 2D tensor, as contiguous NHWC shouldn't be any different (we can try to validate this from python). I believe what's going on (please correct me if I'm wrong), is we're just normalizing across C or the innermost dimension.
Sweeping these cases I get plots of just LN and LN BWD of:

So it does look like nvFuser is getting performance around what I would expect, and there seems like little room for improvement on the forward. The backwards clearly has much lower performance, and for LayerNorm this is because in backwards you have two orthogonal directions the reduction goes across. You'll have a reduction in backwards on C as well as on NHW. There is a fast LayerNorm in Apex that is capable of doing most of the two directions in a single kernel, with a small cleanup kernel, which should be able to get better performance in backwards. Short of this very aggressive optimization, I don't see a lot of room for improvement.
I'd be pretty surprised if XLA was capable of this optimization, and one thing I'm curious about is if XLA is really getting great performance here, or if there's just overall better performance on the other parts of the network.
We are planning to target this backwards LN optimization at some point, but I don't have a concrete plan for it, and it could even be after the end of this calendar year (sometime early next year is my best guess). This optimization doesn't work with all input sizes, as you have to hold the entire input in registers, so it's a fairly targeted optimization and roughly speaking your NHW*C (in fp16) needs to be < 64 * 1024 * SM count (108 for A100) so something like 7 million total elements in the input. This size could be increased by the total amount of shared memory on the GPU if we extended nvFuser to using a combination of SMEM and registers for this optimization, that would get us another 164KB per SM on A100 (minus some temporary buffers) providing a total count closer to 15 million elements.
This is far from impossible, but definitely takes some solid engineering work to do right/well.

@csarofeen yes we're normalizing across C in the NCHW tensor. Thanks for the insight. From a high level, it was hard for me to fathom how the end results could be so different in performance (other than the lack of any op fusion in the eager case).
Would the Apex LN provide any benfits here if combined with the needed permute to/from NHWC?
With XLA, often a bit surprised how well it does, but it certainly has some quirks, esp re shapes. Having talked to some XLA / TPU people when working through EvoNorm it was highly recommended to use the (x * x).mean() - (u * u)) form of var calc as it allows ops to be scheduled with fewer dependencies across various execution units. For the simple ResNet case LN was having a bit of trouble, but only down 10% for train throughput vs BN and GN (which were roughly on par).

I think it would perform marginal gains, but yeah, I'm trying to think what XLA is doing that's so amazing, or what are we doing that's so bad that nvFuser perf isn't good.
Do you have "the" network you want fast? I don't think we can pick out a bunch of networks, but if you have a network of "this is unreasonably fast on XLA, and unreasonably slow on PyT". I would like to look through it with the team and see what it seems like we're missing.
The general concern I would have, is if what we really need is convolution - normalization fusions, or matmul - normalization fusions. These are on our radar, but we have some distance to cover before we're there. If it's short of advanced conv/matmul fusions I would think we should be able to get something on the same order of XLA, without the shape cliffs.

Would the Apex LN provide any benfits here if combined with the needed permute to/from NHWC?

Just to be clear, for channels last inputs permutation is a very fast op on tensor metadata (no data movement) that makes tensor contiguous, and then existing (or generated) layer norm kernels operating on the last dimension can be called, followed by another fast permutation with no data movement.   For normal NCHW tensor this permute operation leads to a non-contiguous tensor, so in core a copy kernel is first called to make it contiguous (that's extra overhead, copy kernel is slow), and codegen might have a bit of trouble with it because it's non-contiguous. So, bottom line, for channels last, permutation is not a problem and shouldn't affect perf

(x * x).mean() - (u * u))
People are fond of this approximation and it is indeed very easy to compute, but it's also much less accurate than two-pass or Welford approach, which might or might not be ok, but very hard to say in advance without doing full training. For inference it's almost always fine, but it can lead to large differences in gradient. If it indeed turns out to be perf-critical it needs to be kept behind some flag so people are able to turn it on/off

@ngimel @csarofeen so, quick check of apex LN in the ResNet50 case (which is quite a bit worse for my measurements than in many of the hybrid cnn-transformer models). It's way faster. Numbers below are for eager.
contiguous:
apex -> 2700 im/sec infer, 940  train
torch -> 1470 im/sec infer, 470 train
channels_last:
apex -> 2800 im/sec infer, 960 train
torch -> 1410 im/sec infer, 510 train
So, I think that's 'good enough' for me to stop spending any more time on this. If we could get the apex performance as a default in torch I'd be pretty happy. I might try to work the current apex layer into timm so I can use it for training right now, unfortunately, the apex fn isn't useable with torchscript so I can't make it the default when apex is installed... I did try with apex LN + aot-autograd, it manged to run fwd (5000 im/sec for CL), but blew up with a 'Invalid Node' error manipulating the graph for bwd.
I'll try it on some of the other models I actually use NCHW LN with. ResNet was just a familiar and worst case performance difference. I'd never actually want to use LN with it :)
To be clear, I'm comparing:
class LayerNorm2d(nn.LayerNorm):
    def __init__(self, num_channels, eps=1e-6, affine=True):
        super().__init__(num_channels, eps=eps, elementwise_affine=affine)

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return fused_layer_norm_affine(
            x.permute(0, 2, 3, 1), self.weight, self.bias,  self.normalized_shape, self.eps).permute(0, 3, 1, 2)

instead of
class LayerNorm2d(nn.LayerNorm):
    def __init__(self, num_channels, eps=1e-6, affine=True):
        super().__init__(num_channels, eps=eps, elementwise_affine=affine)

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return F.layer_norm(
            x.permute(0, 2, 3, 1), self.normalized_shape, self.weight, self.bias, self.eps).permute(0, 3, 1, 2)

FY my resnet50 test case for ln was a quick hack in resnet.py
@register_model
def resnet50_ln(pretrained=False, **kwargs):
    from .layers.norm import LayerNormExp2d, LayerNormExpNg2d, LayerNorm2d  # different LN experiments
    model_args = dict(block=Bottleneck, layers=[3, 4, 6, 3],  **kwargs)
    return _create_resnet('resnet50_ln', pretrained, norm_layer=LayerNorm2d, **model_args)

If Apex LN is working for you go for it, it's disappointing because it's highly unlikely the big perf difference is because of the code generated but the integration in the stack. I'm happy you're unblocked, and we'll keep cranking away with these issues :-(

A difference this big ins't adding up. And also Natalias's promising fusion codegen tests being done in float16, all of mine in AMP (since that's how I train). And looking at the apex fused LN impl, it's disabling torch native autocast and casting itself, so possibly differences due to casting (or lack of in some cases).
Without AMP (infer / train throughputs):
float16 - apex - 2710 / 950
float16 - torch - 2600 / 790
float32 - apex - 1370 / 450
float32 - torch - 1310 / 410
So apex still better, but more realistically so.

Yes, layer_norm is force-cast to fp32 by amp (tbh, I don't know if it's strictly necessary or is it out of abundance of caution, I've heard some stories where it indeed prevents convergence, but also other stories of people casting model whole-sale with ln to fp16 and still converging), whereas batch_norm is left in whatever precision the inputs come in. Same is true for group_norm, it's force-cast.
Layer norm in core is marginally more accurate than layer norm in apex (it's guaranteed to produce the same results as layer norm for inputs cast to fp32, whereas apex does some intermediate truncations in the final computations), but perf difference with force casting of course will be huge in eager, so probably we should have a mechanism to adjust amp cast lists.

Yes, layer_norm is force-cast to fp32 by amp (tbh, I don't know if it's strictly necessary or is it out of abundance of caution, I've heard some stories where it indeed prevents convergence, but also other stories of people casting model whole-sale with ln to fp16 and still converging), whereas batch_norm is left in whatever precision the inputs come in. Same is true for group_norm, it's force-cast. Layer norm in core is marginally more accurate than layer norm in apex (it's guaranteed to produce the same results as layer norm for inputs cast to fp32, whereas apex does some intermediate truncations in the final computations), but perf difference with force casting of course will be huge in eager, so probably we should have a mechanism to adjust amp cast lists.

@ngimel Yeah, that's the conclusion I ended up coming to here, I think I even remember discovering that re group_norm some time ago, and then had it pushed out of my brain other things... fun spending that much time rediscovering it. I wonder if past reported instabilities re layernorm without the force-cast were due to use in larger scale transformer training, hmm.
It's my understanding that regardless of the cast, the reductions would still accumulate in float32, it's the dtype of input, affine parms, output etc that would differ in terms of float32 vs float16. So, yeah, seems likely that it may not be an issue to change the cast behaviour.
So, I'm creating my own 'fast' path (off by default) to experiment with this, it'll look something like below (doing similar to what apex is doing for the torch case). The ability to modify the torch cast lists would be quite useful though. There is an open issue on that, but no recent progress.
def fast_torch_layer_norm(
    input: torch.Tensor,
    normalized_shape: List[int],
    weight: Optional[torch.Tensor] = None,
    bias: Optional[torch.Tensor] = None,
    eps: float = 1e-5
):
    args = _cast_if_autocast_enabled(input, normalized_shape, weight, bias, eps)
    with torch.cuda.amp.autocast(enabled=False):
        return F.layer_norm(*args)

class LayerNorm2d(nn.LayerNorm):
    """ LayerNorm for channels of '2D' spatial NCHW tensors """
    def __init__(self, num_channels, eps=1e-6, affine=True):
        super().__init__(num_channels, eps=eps, elementwise_affine=affine)

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        x = x.permute(0, 2, 3, 1)
        if _ENABLE_FAST_NORM:
            if has_apex:
                x = fused_layer_norm_affine(
                    x,
                    self.weight,
                    self.bias,
                    self.normalized_shape,
                    self.eps)
            else:
                x = fast_torch_layer_norm(
                    x,
                    self.normalized_shape,
                    self.weight,
                    self.bias,
                    self.eps)
        else:
            x = F.layer_norm(
                x,
                self.normalized_shape,
                self.weight,
                self.bias,
                self.eps)
        x = x.permute(0, 3, 1, 2)
        return x

Sorry, wouldn't _cast_if_autocast_enabled cast all inputs to fp32? I couldn't find this function.

Sorry, wouldn't _cast_if_autocast_enabled cast all inputs to fp32? I couldn't find this function.

@ngimel it casts the args to get_autocast_gpu_dtype()

authors: csarofeen jjsjann123 ngimel rwightman


text:
Apply updatedAt & createdAt

Dear ryanhefner
We are using your package and are really happy about it.
Recently we had the need to get the timestamps for updatedAt & createdAt, unfortunately your package did not deliver this values with the fieldsParser.
Instead of building a workaround, I've just created this following PR for everyone.
I hope, you like it :)
Greets Chris

Thanks, @SublimeProphets!

source: gharchive/pull-request

authors: SublimeProphets ryanhefner

repo: ryanhefner/contentful-parsers

license: MIT

license_type: permissive

license_source: github-api


text:
Image* function declarations accept the wrong pointer type

Image drawing and manipulating functions accept a single-item pointer to an Image type in the Raylib itself. However in these bindings they accept a many-item pointer, which is wrong.

changed the default mapping of Image* to be a single item pointer as it is the usual case for most functions.
Also added the image_drawing example: https://github.com/ryupold/examples-raylib.zig/commit/aa4575ce5c4046d0701a9a5f55f747af12b1b421
Should be working now as expected.

Thanks! 👍🏼

source: gharchive/issue


text:
@Data is not equivalent to @RequiredArgsConstructor

The Javadoc for @Data says it is equivalent to @Getter @Setter @RequiredArgsConstructor @ToString @EqualsAndHashCode but I believe that @RequiredArgsConstructor should be replaced by @AllArgsConstructor

@RequiredArgsConstructor means all final fields are required by the constructor.
@AllArgsConstructor means all fields including non-final are required by the constructor.
At least in my experience, @Data behaves as @RequiredArgsConstructor
Here are examples to demonstrate:
@Data
static class Foo {
    private final String bar;
    private String baz;

    static Foo create() {
        Foo bar = new Foo("bar");
        bar.setBaz("baz");
        return bar;
    }
}

@RequiredArgsConstructor
static class Foo1 {
    @Getter
    private final String bar;
    @Getter
    @Setter
    private String baz;

    static Foo1 create() {
        Foo1 bar = new Foo1("bar");
        bar.setBaz("baz");
        return bar;
    }
}

@AllArgsConstructor
static class Foo2 {
    @Getter
    private final String bar;
    @Getter
    @Setter
    private String baz;

    static Foo2 create() {
        Foo2 bar = new Foo2("bar", "baz");
        return bar;
    }
}

authors: cowwoc novaterata

repo: rzwitserloot/lombok

license: mit

license_source: bigquery


text:
ClassCastException for Lombok 1.6.22 and Gradle 4.8

To reproduce:
Run gradle init --type java-library and modify generated project:
build.gradle
plugins { id 'java-library' }

dependencies {
    compileOnly 'org.projectlombok:lombok:1.16.22'
    annotationProcessor 'org.projectlombok:lombok:1.16.22'
}

compileJava {
    options.incremental = true
}

repositories {
    jcenter()
}

Foo.java
import lombok.Data;

@Data
public class Foo {
    private final boolean historical;
}

Running gradle build causes error:
> Task :compileJava FAILED
src/main/java/Library.java:4: warning: lombok.javac.apt.LombokProcessor could not be initialized. Lombok will not run during this compilation: java.lang.ClassCastException: org.gradle.api.internal.tasks.compile.processing.IncrementalFiler cannot be cast to com.sun.tools.javac.processing.JavacFiler
public class Library {
       ^
        at lombok.javac.apt.LombokProcessor.getJavacFiler(LombokProcessor.java:447)
        at lombok.javac.apt.LombokProcessor.init(LombokProcessor.java:90)
        at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:112)
        at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:165)
        at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init(AnnotationProcessor.java:73)
        at org.gradle.api.internal.tasks.compile.processing.DelegatingProcessor.init(DelegatingProcessor.java:57)
        at org.gradle.api.internal.tasks.compile.processing.IsolatingProcessor.init(IsolatingProcessor.java:44)

Note that the error appears in file not annotated with Lombok annotations (created by gradle init).
Workaround - either:

Downgrade Lombok to 1.16.20 (implicitly disables incremental compilation); or
Downgrade Gradle to 4.7

The title is wrong. It is not 1.16.12, it is 1.16.22.
What happens with 1.18.0?

1.18.0 causes the same error with the same stacktrace.

I have a similar issue:
../user/service/impl/UserServiceImpl.java:178: error: cannot find symbol     userBO.getRoles()           ^   symbol:   method getRoles()   location: variable userBO of type UserBO
I'm using Java 10, Lombok 1.18.0 and Gradle 4.8 (also tried with 4.7)

With:

Oracle Java 9.0.4,
Gradle 4.8
Lombok 1.6.22 AND 1.18.0

I receive this error.
Reverting to Gradle 4.7 results in proper functionality.

@arana198 Your problem seems to be something else unrelated to this. Perhaps #1572?

@pkubowicz  @arana198  This started with Gradle 4.6 see https://github.com/rzwitserloot/lombok/issues/1603
@victorwss  You've asked for MVCE there. So, finally we have a kind of it. It is hardly reproducible while I was trying to provide MVCE on a small project and minimal setup - it did not appear. Now this example is finally small and shows the issue, while this one uses Eclipse - this may be a hint to investigate the cause, because neither me nor many other related similar issue reporters were not using Eclipse, so maybe the difference in compilers may be a hint...

looks like Gradle internals changed in 4.8, necessitating some case handling— ☝ should address that

Funny, this is the code where the error happens:
https://github.com/rzwitserloot/lombok/blob/master/src/core/lombok/javac/apt/LombokProcessor.java#L429-L448:
	/**
	 * This class casts the given filer to a JavacFiler. In case of
	 * gradle incremental compilation, the delegate Filer of the gradle wrapper is returned.
	 */
	public JavacFiler getJavacFiler(Filer filer) {
		final Class<?> filerSuperClass = filer.getClass().getSuperclass();
		if (filerSuperClass.getName().equals("org.gradle.api.internal.tasks.compile.processing.IncrementalFiler")) {
			try {
				Field field = filerSuperClass.getDeclaredField("delegate");
				field.setAccessible(true);
				Object delegate = field.get(filer);
				return (JavacFiler) delegate;
			} catch (final Exception e) {
				e.printStackTrace();
				processingEnv.getMessager().printMessage(Kind.WARNING,
						"Can't get the delegate of the gradle IncrementalFiler. Lombok won't work.");
			}
		}
		return (JavacFiler) filer;
	}

The code is clearly aware of gradle's IncrementalFiler, but something was wrong anyway. It tests if the filer has IncrementalFiler as a superclass, but the message suggests that it is a direct instance of IncrementalFiler and not a subclass of that.
Also, that if a reflection exception happens and is caught in the exception handler, a ClassCastException will be throw in the end of the method, but this is not the real problem.

Also, the code could test if the filer is something that is neither JavacFiler nor IncrementalFiler, giving a better error message in this case to help us with future debugging and issue reporting.

Can you release this soon?
In Gradle 4.9 you cannot use Lombok 1.18.0 or 1.16.22 at all - not even for non-incremental compilation (tested on the same project configuration as in the original bug report).
To get Java sources compiled with Gradle 4.9 you need to downgrade to Lombok 1.16.20.

Gradle 4.9 just hit the Arch Linux repo, so I suspect more people will start suffering from this.

@pkubowicz Unfortunately I cannot downgrade Lombok to 1.16.20 because I use JDK 10 and this version doesn't support it

authors: arana198 gerritdrost mszabo-wikia pkubowicz ryonday sergey-morenets soberich victorwss


text:
ааааааааа

я кароч просто попробовать эту штуку

good fork, but i wont use as it is against philosophy :D

@aski425, did you know you violated copyright? a repository without a license is considered proprietary

@aski425, did you know you violated copyright? a repository without a license is considered proprietary

not the main problem here; this repo is reference doc and idea behind this config isn't meeted here - Askhat's config his personal config.

@aski425, did you know you violated copyright? a repository without a license is considered proprietary

not the main problem here; this repo is reference doc and idea behind this config isn't meeted here - Askhat's config his personal config.

ok


text:
publish wait timeout

Signed-off-by: Gong Su gong_su@hotmail.com

Jenkins Linux s390x Build #319 [push] publish wait timeout (#3... started at 20:13

Jenkins Linux amd64 Build #88 [push] publish wait timeout (#3... started at 19:13

Jenkins Linux amd64 Build #88 [push] publish wait timeout (#3... failed after 50 min

Jenkins Linux s390x Build #319 [push] publish wait timeout (#3... failed after 1 hr 2 min


text:
Multi-level Support

The player should eventually support playback of all v0.1.3 STLs.
Steps for implementing support:

[x] Support loading and playing a level besides level1.stl.
[ ] Support successfully loading all levels (even incompletely).
[ ] Support easy switching between levels during runtime.

76b9e3a72a01c0841727df87333ab7bec5584f20

Since commit 211e222, all twenty-six world1 levels are loadable and playable.

license: Unlicense


text:
[BUTTON IDEA]: Slack Login button

1. Name of button: Login with Slack
2. Description: Add a button for the slack community with purple rgb(74,21,75)  background and slack logo
3. Button Type (Animated, Special, etc...): Social Button
4. Will you work on it?: Yes

Sounds like a good idea @RajMhatre20 thank you for submitting it.
Let me know if you want to work on it.

Yes, I'm willing to work on it.

Hi! Can I work on this issue?

Hello @Ishan2077, I've already added the feature which will close this issue. I'm waiting for my pull request to get merged. Keep contributing :)

Thanks for your reply @RajMhatre20 ! I'll look out for other issues :)

repo: sButtons/sbuttons


text:
Start and end drawer support

This might be insane and out of scope for the drawer but I'm currently abusing it and nesting a left drawer and a right drawer
- drawer drawer-mobile
  ├-- drawer-content
  |    ├-- drawer drawer-mobile drawer-end
  |          ├-- drawer-content
  |          |    ├ // page content
  |          |
  |          ├-- drawer-side
  |
  ├-- drawer-side

context: a side navigation, and an activity timeline on the other side of the screen, both should be collapsible on mobile
However the right one never collapses at mobile. Working around with hidden lg:grid results in an overlay blanking everything out
Is support for this out of scope?

This started working the second I posted this, so no idea what was wrong

repo: saadeghi/daisyui


text:
Tooltip partially hidden within Card

The tooltip within a card is bounded by overflow: hidden of the card; therefore when the content of the tooltip is too long or close to the edhe of the card, it is particlaly hidden.
Example: https://play.tailwindcss.com/Z8Hq3XM8pn

The only possible temporary workaround is by applying overflow-visible class to the card. I'm also hoping that this issue will be fixed in the future 😅.

The only possible temporary workaround is by applying overflow-visible class to the card. I'm also hoping that this issue will be fixed in the future 😅.

Thanks @NikarashiHatsu ... It's a trade off of showing the card photo corners as rectangle because they are overflow... 😢 So would need to add rounded-tr rounded-tl to the img tag as well...

Yea, it's kind of annoying to have put some extra classes 😅. I thought putting z-50 along with tooltip will fix the issue, sadly it won't.

Hi, I have the same problem when usingthe tooltip in a sidebar is there any other workaround to have the tooltip always showing

This is still present AFAIK, I think overflow-clip is a better solution for this. I was getting some odd (and horrible to track down) additional spacing causing the entire page to overflow with multiple collapses in a column using overflow-visible.

authors: NikarashiHatsu SacredSkull haobinliang jorgv


text:
Button animation not working

I'm developing a simple website with VueJS (Vite as the build tool), TailwindCSS, & of course DaisyUI. I have a bunch of anchor, label, & button elements with the class btn along with their various styles. However, when I press and hold a button, the shrinking animation does not appear. After some testing, it seems like it's working in Microsoft Edge but not in Brave or Safari. I checked the styles generated by Tailwind/PostCSS in the Dev Tools and it seems like no classes like :active are present. Why is this happening?
It works in a previous project of mine with version 2.31.0.

I also opened a thread in the TailwindCSS Discord server. For anyone in the future, here is the link: https://discord.com/channels/486935104384532500/1043635632821522532


text:
Fix entry name from npm registry for installation

I attempted to install the tool using the instructions in the README. When executing "npm install -g replace-jQuery", the response report 'replace-jQuery@*' is not in the npm registry.. However, "'replace-jquery" and it appears to be authored by @sachinchoolur, but perhaps npm dropped the capitalization.
Regardless, this PR changes the README to allow for installation based on the name in npm.

@Amorymeltzer The shell commands using camelcase (i.e., replace-jQuery) work as-is despite the package name, when installed from npm, requiring the name to be all lowercase.

Sure.  I figured it might as well match, esp. the executable, but it ain't a big deal.

Yes, it should be npm i replace-jquery https://www.npmjs.com/package/replace-jquery
Thank you  👍🏻

authors: Amorymeltzer machawk1 sachinchoolur

repo: sachinchoolur/replace-jquery


text:
SASS files

Hello, thanks for a project! It's really great! Love it.
But are you going to create SASS files for it?

Sure, wait for next releases :)

Thank for this! :)

Done :)

authors: ikeagold ozasadnyy saeedalipoor

repo: saeedalipoor/icono


text:
Remove created messages validation

Closes #439
As I commented in https://github.com/safe-global/safe-client-gateway-nest/issues/439#issuecomment-1597423163, we were validating the Transaction Service response when a message gets created. Based on the OpenAPI definition, we assumed a body containing a Message entity would be returned by the Transaction Service but that's not the case.
This change removes the validation for the payload coming from the Transaction Service when creating a new message.

Pull Request Test Coverage Report for Build 5319651842

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 92.113%

Totals

Change from base Build 5311171297:
0.02%

Covered Lines:
4149

Relevant Lines:
4393

💛  - Coveralls

authors: coveralls hectorgomezv

repo: safe-global/safe-client-gateway-nest


text:
Implement endpoint to return blocked addresses

Description
Clients require a list of blocked addresses for swaps which is currently hardcoded.
Whilst this could be included in the Config Service, this list is likely to be updated often and manual management is difficult/error prone. Ideally we could implement a scheduled job to get the addresses from a dedicated source, e.g. Chainalysis or Blockaid.
Requirements

Implement an automatic job to fetch blocked addresses from a dedicated source.
Return aforementioned list from a dedicated endpoint, per chain.

Additional information
No response

After discussion within the team, we will instead opt for an RPC call to a sanctions oracle. cc @compojoom

repo: safe-global/safe-client-gateway


text:
Release 3.25.2

A fix for Intercom.

Pull Request Test Coverage Report for Build 2315023948

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 35.267%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/components/CookiesBanner/index.tsx
0
1
0.0%

Totals

Change from base Build 2299419393:
0.0%

Covered Lines:
3604

Relevant Lines:
9281

💛  - Coveralls

Intercom is working for me now so all good, thank you señores :)

authors: JagoFigueroa coveralls katspaugh

repo: safe-global/safe-react


text:
🛑 Safe Tx Service (Goerli) is down

In d753634, Safe Tx Service (Goerli) (https://safe-transaction-goerli.safe.global/check/) was down:

HTTP code: 503
Response time: 451 ms

Resolved: Safe Tx Service (Goerli) is back up in b8153a2.

repo: safe-global/safe-services-status


text:
Hotfix: Don't send notifications for not trusted txs

Don't send notifications for not trusted txs
Set version v4.14.2

This hotfix was released https://github.com/safe-global/safe-transaction-service/releases/tag/v4.14.2

repo: safe-global/safe-transaction-service


text:
build: figure out how to set RPATH properly

I want it to be set to the absolute path when installing, so installing to non-default locations works without setting LD_LIBRARY_PATH.

Fixed by https://github.com/saghul/sjs/commit/fedddc6ff1f59ea4d3b68342c104d529b386c519, I hope.

repo: saghul/sjs


text:
🛑 Nano Polycoat is down

In 4edc3a9, Nano Polycoat (https://nanopolycoat.com) was down:

HTTP code: 503
Response time: 408 ms

Resolved: Nano Polycoat is back up in 48fbace after 8 minutes.

repo: sahajananddigital/status


text:
Satellizer + Cordova functionality

I'm trying to get my cordova app working with Satellizer, but if I leave the code as is, then Facebook gives the error "redirect_uri" must be absolute. So, I modified the satellizer code to change the currentUrl string. Since I'm testing on android, the currentUrl is file:///, so I tried changing it to http://localhost, which then allows me to login via the Facebook website, not app. Once I do that, then I get an application error "net:ERR_CONNECTION_REFUSED(http://localhost/?code=AND_SO_ON)". I am lost at where to go from here since I'm new to mobile development.
Are there any suggestions you can provide?
I guess I should also mention that I'm running my web app/mobile app locally, so I don't have a domain setup or anything, that is why I did localhost.

@Mr-Antivirus were you able to work with Satellizer and Cordova ? Do we need to make any special settings ? Satellizer just worked fine with browser, so I integrated with Cordova and when I tried login, noticed the following message in stdout.log:
2015-01-11 03:26:13.180 TestApp[76120:7508846] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2015-01-11 03:26:16.360 TestApp[76120:7508846] Resetting plugins due to page load.
Any help is highly appreciated.

For me, it worked out of the box with the slight modifications Sahat provided above. Those errors you are seeing, look to be something completely unrelated though. Try removing satellizer or create a separate app with only satellizer and see if the issue persists.

Some of you had same issue as https://github.com/sahat/satellizer/issues/497?

I'm having same problem, just one question I wanted to ask- what do you mean by 'IP_OF_SERVER' in this context?? does it mean the server that is running the backend??

same problem:

Application Error
net::ERR_CONNECTION_REFUSED /http://localhost/?code=4/....

after clicking authenticating with facebook or google - can't redirect to the app.

Try to update your cordova inApp browser plugin.

authors: Mr-Antivirus alereisan gakshat14 nagappan rrNuvoPoint

repo: sahat/satellizer


text:
Fix character sequence shebangs

is the character sequence "#!" at the beginning of a script file in Unix-like operating systems, including Linux. It is followed by the path to the interpreter or command that should be used to execute the script.

It's purpose is to specify the interpreter to execute the file

The file supports python3+ and not older versions like python2, while some systems which have python2 as default, the script will not execute on these systems.

hello sir I'm GSSOC23 contributor can you assign me this issue i would like to explore and resolve it.

hello sir I'm GSSOC23 contributor can you assign me this issue i would like to explore and resolve it.

Please assign me this issue so that I can resolve it under GSSOC-23

Hey everyone, the issues are being assigned on a first-come-first-serve basis. In the meanwhile, check out the other issues, or feel free to create your own. Also, don't make a PR without raising an issue and getting it assigned to you. If the original assigned isn't active or not working on the issue, then I'll assign it to the next contributor.
One contributor will be assigned to one issue at a time, so please take up one issue at a time, don't comment on every issue.

@Akshayp02 any updates? Let me know or I'll have to unassign you.

@Akshayp02 any updates? Let me know or I'll have to unassign you.

Yes sir I'm working on it due to my submission It is a little delayed


text:
Sample code needs to be updated.

The example in the Readme.md is not working with Python3.6. The k and l are 2-D numpy matrices that need to be converted to np.arrays before sending to matplotlib. In addition, the 'col' parameter name needs to be replaced with 'c' or 'color'.
import lhsmdu
import matplotlib.pyplot as plt
import numpy as np

k = lhsmdu.sample(2, 20) # Latin Hypercube Sampling with multi-dimensional uniformity
print(k)
l = lhsmdu.createRandomStandardUniformMatrix(2, 20) # Monte Carlo sampling

k = np.array(k)
l = np.array(l)

fig = plt.figure()
ax = fig.gca()
ax.set_xticks(np.arange(0,1,0.1))
ax.set_yticks(np.arange(0,1,0.1))
plt.scatter(k[0], k[1], color="g", label="LHS-MDU")
plt.scatter(l[0], l[1], color="r", label="MC")
plt.grid()
plt.show()

m = lhsmdu.resample()
n = lhsmdu.resample()
o = lhsmdu.resample()
m = np.array(m)
n = np.array(n)
o = np.array(o)

fig = plt.figure()
ax = fig.gca()
ax.set_xticks(np.arange(0,1,0.1))
ax.set_yticks(np.arange(0,1,0.1))
plt.title("LHS-MDU")
plt.scatter(k[0], k[1], c="g", label="sample 1")
plt.scatter(m[0], m[1], c="r", label="resample 2")
plt.scatter(n[0], n[1], c="b", label="resample 3")
plt.scatter(o[0], o[1], c="y", label="resample 4")
plt.grid()
plt.show()

Thanks, I've updated the README with these suggestions.

Closing issue.


text:
🛑 Masina. Gfeller. Nyffenegger is down

In da86d9d, Masina. Gfeller. Nyffenegger (https://mgnrecht.ch) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Masina. Gfeller. Nyffenegger is back up in 6239de1 after 7 minutes.


text:
Add documentation to Control Structures

age-quiz.py need a some documentation

fixed with https://github.com/sailaja18/CoGrammar-excercises/pull/4

Fixed by https://github.com/sailaja18/CoGrammar-excercises/pull/5


text:
Update UsernameGeneratorTest.java

Removed the internationalized version of e character as it was throwing error while building the code.
Error
INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   UsernameGeneratorTest.testUsernameGeneratorWhereFirstAndLastNameValid:50 expected: <tylar.smith> but was: <tyler.smith>
[INFO]
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0
[INFO]

 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.

Hello @sunnyajmera,
If you pull the latest changes from the repository this should not be an issue. I added logic to remove diacritical marks so the test should pass.
Please let me know and I can close this PR!

I still don't see the change and issue is still happening even after pulling the latest.

authors: CLAassistant sunnyajmera

repo: sailpoint-oss/rule-development-kit


text:
Refactor: configurable file extensions

This change enables people to configure what file extensions should be
recognised as images and videos by setting:
img_extensions and video_extensions
fixes #269

Not sure why I did not go this way before, probably to limit the number of settings, but I agree that it's the easiest solution to allow users to cope with unusual extensions.

Just a minor nitpick

Done @saimn

Thanks @matelakat !

authors: matelakat saimn

repo: saimn/sigal


text:
Rectifying the shape calculator working over negative values

Describe the bug

Showing a prompt if user enter negative value for shape calculator

Possible solution

Rectifying the if else

Screenshots

If applicable, add screenshots to help explain your problem.

Please assign this to me @sairish2001

Please assign this to me @sairish2001


text:
KNL-1451 - Add metadata to event tracking service

Here's the thought on this, I think it might be useful to persist additional data on events to the database. But what I really want it for is for additional data to be available on an event for the BaseLearningRecordStoreService.update method. I'm thinking I can clean up Samigo, adding a few more events and having the existing 2 calls to registerStatement that are hardcoded into samigo just use the regular event mechanism, passing along additional data that isn't persisted in Sakai but can be persisted in an LRS.
I believe this is a dependent on SAM-2997 unless or else that code is going to be a lot more duplication.

Actually, what I really think I was going for rather than "Metadata" was adding an LRS_Statement statement as an optional parameter on the event. . .

I know this build failed but does anyone have any thoughts on this? It seems like it's a better idea to have
EventTrackingService.newEvent accepting an optional LRS_Statement parameter than have to directly call the LearningRecordService from each tool that needs to register custom statements. That was the motivation behind this. There is going to be some data that can't be stored in the event but I'm thinking that a plain string is too unstructured and would require more work than just using this correct object.

repo: sakaiproject/sakai


text:
SAK-28986 remove the ical.experimental property, enable the ical.opaqueu...

...rl.subscribe by default,
and remove some code from calendar around the old ical.experimental ICS Subscribe functionality
https://jira.sakaiproject.org/browse/SAK-28986

@buckett  can you review these changes?  They are related to SAK-21497 and calendar subscriptions

I have one fix to get public subscriptions working. An alternative would be to revert to the behaviour in earlier Sakai versions of just having the public ical only ever export the ical for the current site.

Would be good to enable to keep the opaque URL enabling part of the this pull request.

Yes, I will re-do this PR to enable opaque and document it

authors: buckett ottenhoff


text:
Not showing the Razorpay in saleor-storefront

I am activated Razorpay plugin in Saleor-dashboard. But It not showing in saleor-storefront.

Any update on Razorpay?

Hey @ameendeerom @dvlprb2
By any chance, did you folks integrated Razorypay with storefront?

authors: CuriousLearner ameendeerom dvlprb2

repo: saleor/saleor-storefront


text:
Migration of SQL database to Saleor Instance

I currently have a SQL database that i populated with my own application and now i am thinking of moving to a saleor instance and was looking out ways to migrate my current DB to saleor is it possible ? if yes , how can i achieve this?

Hey @ishanInstaCash are you talking about migrating to Saleor Cloud or to self-hosted version of Saleor?

authors: aniav ishanInstaCash

repo: saleor/saleor


text:
Charge transaction items on orderConfirm

I want to merge this change because it implements charging transaction items at the point of order confirmation.
I'm merging this to the feature branch because it relies on a couple more tickets (like the one in which there is a flag to control this behavior).
Ticket: https://linear.app/saleor/issue/SHOPX-193/orderconfirm-should-capture-transactionitems-that-have-action-charge

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations

Docs

[ ] Link to documentation:

Pull Request Checklist

[ ] Privileged queries and mutations are either absent or guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migrations are either absent or optimized for zero downtime
[ ] The changes are covered by test cases
[ ] All new fields/inputs/mutations have proper labels added (ADDED_IN_X, PREVIEW_FEATURE, etc.)
[ ] All migrations have proper dependencies
[ ] All indexes are added concurrently in migrations
[ ] All RunSql and RunPython migrations have revert option defined

I'm closing this one, not to hang forever since the priorities got switched but I'll include link to this one in the ticket description for future reference.


text:
Fix failing vatlayer for click and collect

When the checkout_info.shipping_method_channel_listings was None, the None value was provided as shipping_price to get_taxed_shipping_price method. Instead of None provide previous_value.

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[ ] The changes are tested
[ ] GraphQL schema and type definitions are up to date
[ ] Changes are mentioned in the changelog

Task linked: SALEOR-4739 Vatlayer - flat_tax error when deliveryMethod is c&c point

Codecov Report

Merging #8396 (e17474e) into main (5b24a92) will increase coverage by 0.00%.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##             main    #8396   +/-   ##
=======================================
  Coverage   92.98%   92.98%
=======================================
  Files         493      493
  Lines       37416    37419    +3
  Branches     4257     4258    +1
=======================================
+ Hits        34792    34795    +3
  Misses       1770     1770
  Partials      854      854

Impacted Files
Coverage Δ

saleor/plugins/vatlayer/plugin.py
81.70% <75.00%> (+0.15%)
:arrow_up:

saleor/payment/utils.py
91.17% <0.00%> (ø)

saleor/payment/interface.py
100.00% <0.00%> (ø)

Continue to review full report at Codecov.

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

authors: IKarbowiak codecov-commenter patrys


text:
Update selected-listbox.jsx

Fixes #
Additional description

CONTRIBUTOR checklist (do not remove)
Please complete for every pull request

[x] First-time contributors should sign the Contributor License Agreement. It's a fancy way of saying that you are giving away your contribution to this project. If you haven't before, wait a few minutes and a bot will comment on this pull request with instructions.
[ ] npm run lint:fix has been run and linting passes.
[ ] Mocha, Jest (Storyshots), and components/component-docs.json CI tests pass (npm test).
[ ] Tests have been added for new props to prevent regressions in the future. See readme.
[ ] Review the appropriate Storybook stories. Open http://localhost:9001/.
[ ] Review tests are passing in the browser. Open http://localhost:8001/.
[ ] Review markup conforms to SLDS by looking at DOM snapshot strings.

REVIEWER checklist (do not remove)

[x] CircleCI tests pass. This includes linting, Mocha, Jest, Storyshots, and components/component-docs.json tests.
[x] Tests have been added for new props to prevent regressions in the future. See readme.
[x] Review the appropriate Storybook stories. Open http://localhost:9001/.
[x] The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
[ ] Review tests are passing in the browser. Open http://localhost:8001/.
[x] Review markup conforms to SLDS by looking at DOM snapshot strings.

Required only if there are markup / UX changes

[x] Add year-first date and commit SHA to last-slds-markup-review in package.json and push.
[x] Request a review of the deployed Heroku app by the Salesforce UX Accessibility Team.
[x] Add year-first review date, and commit SHA, last-accessibility-review, to package.json and push.
[ ] While the contributor's branch is checked out, run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.

i change line 149

repo: salesforce/design-system-react


text:
Create and delete virtual multitenant tables

This is a first version. Notes:

The MtAmazonDynamoDb interface now has a new method, createMultitenantTable. It's supported only in MtAmazonDynamoDbBySharedTable.
To use this in MtAmazonDynamoDbBySharedTable, a top-level context must have been defined when constructing the client, and the context when calling createMultitenantTable must match that top-level context. Similarly, when deleting a multitenant table, the context must match the top-level context. (And the same thing when we support cross-tenant scans.)
createMultitenantTable() results in a new physical table being created on the fly. The fact that we now not only have static physical tables makes it harder to know what the set of physical tables is at any given time. What I have right now is to assume each shared table client has a unique table prefix, and determine the set of physical tables based on prefix. Not sure if this is a good idea.
Instead of storing TableDescription jsons in the table description repo, we now store MtTableDescription jsons, where MtTableDescription extends TableDescription and has an extra flag isMultitenant (and more things in the future). This should make the new logic still be able to parse existing table description repo records.
Backup of table description repo records still needs work (each record stored in S3 now needs the extra information in MtTableDescription) -- should be straightforward but I just haven't done it because it's in Kotlin which I'm not familiar with...
Thinking about how to have broad test coverage for MT tables, maybe similar to having a new MT strategy in test ArgumentBuilder

Codecov Report

Merging #648 into master will decrease coverage by 0.15%.
The diff coverage is 89.15%.

@@             Coverage Diff              @@
##             master     #648      +/-   ##
============================================
- Coverage     83.17%   83.02%   -0.16%
- Complexity      987     1021      +34
============================================
  Files            67       70       +3
  Lines          4346     4437      +91
  Branches        534      551      +17
============================================
+ Hits           3615     3684      +69
- Misses          478      493      +15
- Partials        253      260       +7

Impacted Files
Coverage Δ
Complexity Δ

...namodbv2/mt/mappers/MtAmazonDynamoDbByAccount.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...force/dynamodbv2/mt/repo/MtTableDescriptionRepo.kt
76.47% <100%> (-11.77%)
0 <0> (ø)

.../dynamodbv2/mt/admin/AmazonDynamoDbAdminUtils.java
69.11% <100%> (+1.42%)
15 <1> (+1)
:arrow_up:

...namodbv2/mt/mappers/MtAmazonDynamoDbComposite.java
97.77% <100%> (+0.05%)
24 <1> (+1)
:arrow_up:

...modbv2/mt/mappers/MtAmazonDynamoDbStreamsBase.java
78.4% <100%> (ø)
17 <1> (ø)
:arrow_down:

...namodbv2/mt/mappers/CreateTableRequestBuilder.java
98.63% <100%> (+0.03%)
33 <1> (+1)
:arrow_up:

...v2/mt/context/MtAmazonDynamoDbContextProvider.java
93.33% <100%> (ø)
4 <1> (ø)
:arrow_down:

...ers/sharedtable/impl/HashPartitioningStrategy.java
91.66% <100%> (+0.75%)
10 <1> (+1)
:arrow_up:

...dynamodbv2/mt/mappers/MtAmazonDynamoDbByTable.java
90.98% <100%> (ø)
26 <0> (ø)
:arrow_down:

...va/com/salesforce/dynamodbv2/mt/cache/MtCache.java
44.44% <100%> (+5.55%)
5 <1> (+1)
:arrow_up:

... and 17 more

Continue to review full report at Codecov.

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

authors: codecov-io hhkwong

repo: salesforce/mt-dynamo


text:
(@W-9142906)add support to sent change event from document

Without this support, on some webview page, the input value that setup via setText cannot be set to the form that submitted to server side. This is limitation is on mobile ios only.

@jimevanssfdc pls review this change. Thanks.

repo: salesforce/utam-java


text:
fix: add NUTs

What does this PR do?
adds NUTs covering each command
What issues does this PR fix or reference?
@W-8856601@

@shetzel @mshanemc I've added non-JSON tests and reduced the amount of TestSessions I'm using

repo: salesforcecli/plugin-alias


text:
MissingPluginException(No implementation found for method detect on channel LearningFaceDetection)

Face detection working fine on android but doesn't work on ios (tested on both Mac M1 & Intel)

I encountered a similar problem when using DigitalInkRecognition.
The MethodChannel has a different name in the iOS plugin for some reason. It's learning_digital_ink_recognition in iOS, but LearningDigitalInkRecognition in Android and Dart.
So on iOS the MethodChannel cannot be found :) .

Hey @lyio,
what have you altered to get it working, because I also want to get my digital ink recognition example to work?
Thanks!

Hey @lyio, what have you altered to get it working, because I also want to get my digital ink recognition example to work?
Thanks!
Edit: Seems like the iOS code is also not implemented in iOS. Has someone implemented the iOS MethodChannel already?

I want to get my digital ink recognition example to work as well. So may I ask did you solve this problem?If you did, can you tell me how to solve this problem?

@Throvn, @Sherlock-White I have not pursued this further, to be honest. As you mentioned, my last information was that it is not implemented on iOS at all.
Maybe that has changed in the meantime.

@Sherlock-White , like lyio I also didn't pursue it further. It won't work on the web because the underlying project does not have a web implementation. Only iOS and Android, but the maintainer only implemented the android version for flutter. Long story short, currently you can only have digital ink recognition on android, otherwise this package will throw an exception.

authors: Sherlock-White Throvn lyio rahil-patel-21

repo: salkuadrat/learning


text:
Permanently delete files

Delete action doesn't totally delete the file, it is still in the Settings > Files, is there a way to permanently delete the file using an action?

there was previously no way of doing this.
support for this was introduced in #1218. when you edit a file field in a table in its settings you can now choose to cascade deletion to the underlying file. if the row containing this reference is deleted, the file will also be deleted

thanks

repo: saltcorn/saltcorn


text:
Is it possible to get the table data instead of relationships through the api?

I have a few tables with keys that link to other tables. When I pull the tables through the API I get the keys linking to other tables so:
{
  success:[
    {
      value1:'from this table',
      value2: 4 //link to other table
    }
  ]
}

Can I get the actual value instead of the key?

any updates on this? thanks

implemented in #2006. use dereference=key_field_name in the query string, example in tests:
/api/patients/?dereference=favbook

(favbook is a field on patients table, key to the Books table)

authors: glutamate mywebmasteruk watfop


text:
Create Share page

create a page to share the desired route on social media

something like this, but with the route from the map too, stylized


text:
TypeError: coercing to Unicode: need string or buffer, list found

Hello,
I'm having trouble getting a simple test to work - i've attached examples of the python script and an associated csv document - what do you think could be causing the TypeError? I've also included the Traceback below:
Python Script
import csvmapper

mapper = csvmapper.JSONMapper([
  [
    {'name':'email'},
    {'name':'firstname'},
    {'name':'lastname'},
    {'name':'website'},
    {'name':'company'},
    {'name':'phone'},
    {'name':'address'},
    {'name':'city'},
    {'name':'state'},
    {'name':'zip', 'type':'int'}
  ]
])

parser = csvmapper.CSVParser('contact.csv', mapper)
payload = csvmapper.JSONConverter(parser).doConvert(pretty=False)

print payload

CSV document
email,marko@python.com.au
firstname,Monty
lastname,Python
website,http://www.python.org
company,Python
phone,555-122-2323
address,1 Shrubbery Lane
city,London
state,PY
zip,31415

Traceback:
Traceback (most recent call last):
  File "test_2.py", line 14, in <module>
    {'name':'zip', 'type':'int'}
  File "/Library/Python/2.7/site-packages/csvmapper/mapper.py", line 59, in __init__
    super(JSONMapper, self).__init__(self.parse(jsonFile))
  File "/Library/Python/2.7/site-packages/csvmapper/mapper.py", line 62, in parse
    fs = open(jFile)
TypeError: coercing to Unicode: need string or buffer, list found

Hi,
Thanks for showing interest.
Please use DictMapper instead of JSONMapper. As JSONMapper reads the mapper from a JSON file.
Also, the CSV file is not structured properly.CSV-Mapper eliminates the need for specifying row headers.
So, you don't need to use email,first name etc.
And the data should be structured in a tabular kind of form.
So, it the csv file would be like -
marko@python.com.au,Monty,Python,http://www.python.org,Python,555-122-2323,1 Shrubbery Lane,London,PY,31415

You can also retain the headers in the CSV file
For example the following file -
email,firstname,lastname,website,company,phone,address,city,state,zip
marko@python.com.au,Monty,Python,http://www.python.org,Python,555-122-2323,1 Shrubbery Lane,London,PY,31415

Could be parsed without a mapper because it already has header information.
parser = csvmapper.CSVParser('contact.csv', hasHeader=True)

@markorapaic is it working now ?


text:
Change file name for default

In version 1.7.4 with parametres:
 <plugin>
                <groupId>com.samaxes.maven</groupId>
                <artifactId>minify-maven-plugin</artifactId>
                <version>1.7.4</version>
                <executions>
                    <execution>
                        <id>minify</id>
                        <phase>prepare-package</phase>
                        <configuration>
                            <charset>UTF-8</charset>
                            <webappSourceDir>${basedir}/src/main/webapp/resources</webappSourceDir>
                            <webappTargetDir>${basedir}/target/webPortal/resources/</webappTargetDir>
                            <cssSourceDir>css</cssSourceDir>
                            <cssSourceIncludes>
                               ...
                            </cssSourceIncludes>
                            <jsSourceDir>JS</jsSourceDir>
                            <jsSourceIncludes>
                               ...
                            </jsSourceIncludes>
                            <jsSourceExcludes>
                               ...
                            </jsSourceExcludes>
                            <nosuffix>false</nosuffix>
                            <suffix>${resourceVersion}</suffix>
                            <verbose>false</verbose>
                            <skipMerge>true</skipMerge>
                            <skipMinify>false</skipMinify>
                            <jsEngine>CLOSURE</jsEngine>
                            <closureCompilationLevel>SIMPLE_OPTIMIZATIONS</closureCompilationLevel>
                        </configuration>
                        <goals>
                            <goal>minify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

 Plugin create file with next name as 'basketPage.1611280943.js'.
 But with version 1.7.5 with same parametres plugin create file with next name
  as 'script1611280948.js'.

How in version 1.7.5 create files with name as ''basketPage.1611280943.js'?

Sorry. Fixed in version 1.7.6.

authors: Pakram samaxes

repo: samaxes/minify-maven-plugin


text:
Chat only option for users

SyncLounge is Synced Plex video + Chat. But it would be useful to have an option to join the chat and not stream the video.
Use case: Multiple people are in a room watching with SyncLounge, chatting with people watching from elsewhere. Since they're in the same room watching the same TV, they don't each need a video stream, but they each want to chat. Having the ability to chat without video would reduce the number of simultaneous streams from the plex server.

This would be a similar use case to #146 and possibly the same solution would work for that too

repo: samcm/synclounge


text:
Error in endTime calculating

Hello! I'm using your widget CategoryCalendarDayView. I found 1 issue, that makes my life harder. In getTimeList method you do not take into account the information about timeEnd/start minutes, and carry out all calculations only with hours. It doesn't make sense. If im trying to make timeEnd = 13:15 => last row to draw will be 13:00 - timeGap (if gap = 15, last row to draw will be 12:45, if gap = 1, last row to draw will be 12:59 and etc.). I hope these note will help you to solve this problem. Thank you for your reply.
List getTimeList({
required TimeOfDay startOfDay,
TimeOfDay? endOfDay,
required int timeGap,
}) {
final timeEnd = endOfDay ?? const TimeOfDay(hour: 23, minute: 0);
final timeCount = !!!(PROBLEM IS HERE)!!!=> ((timeEnd.hour - startOfDay.hour) * 60) ~/ timeGap;
DateTime first = DateTime.parse(
"2012-02-27T${startOfDay.hour.toString().padLeft(2, '0')}:00");
List list = [];
for (var i = 1; i <= timeCount; i++) {
list.add(TimeOfDay.fromDateTime(first));
first = first.add(Duration(minutes: timeGap));
}
return list;
}

@KazantsevLev Hi, I'm sorry for the late response. I didn't got notify of this.
what version are you using?  could you try 3.0.0-dev.1

closed as inactive

authors: KazantsevLev samderlust


text:
Array - Binary Search Implementation

The binary search visualization for arrays needs to be implemented.
Inputs:

Data for the array
Target value to search for in the array

Outputs:

Array Visualization
Log with the steps for the algorithm

Note: binary search only works for an array with sorted elements

repo: samik-p/Algorithm-Visualizer


text:
Newbie: help to code a function

Hi,
I want to do a thing in my vault and your plugin seems to do what i want.
But i'm not a JS coder, so i need your help (if it's possible)
I try to have a subfolder in "C:/projects/" for each project.  The name of the subfolder and the name of my note in obsidian are the same.
I try to create a function that:

check if a folder with the name of the note exist in "C:/projects/"
if it's true --> show "👍"
if it's false --> show "❌"

thank you  for your time 🙏

@louwelyn-jeremy this is not the appropriate place for such questions. Your question has nothing to with the plugin. All you need is some JavaScript help, which you should look for elsewhere

authors: louwelyn-jeremy mnaoumov

repo: saml-dev/obsidian-custom-js


text:
feat: fix docs to show all docstrings

Fixes docs to include full API reference
Can test locally by:
cd docs
pip install -r requirements.txt
python -m sphinx -T -b html -d _build/doctrees -D language=en . output/html
cd output/html
python -m http.server

coverage: 67.859% (+0.08%) from 67.779%
when pulling 72d9cdc5b2fab19198cc5e903d5fbec8f696076c on pcriadoperez:fix-docs
into 4dfcd742c2da77c30dc056036692222019746395 on sammchardy:master.

authors: coveralls pcriadoperez

repo: sammchardy/python-binance


text:
Please uncomment and test.

          Please uncomment and test.

Originally posted by @TKussel in https://github.com/samply/focus/pull/101#discussion_r1469629490

runs on eric-test

repo: samply/focus


text:
Bug in volume option

Expected behaviour
Volume option should set initial volume, e.g
volume: 0.9,
Actual behaviour
Volume is not responsive at all to this option, either in video or audio, e.g in
Steps to reproduce
e.g in
const player = Plyr.setup('.js-playerv', {
volume: 1.0,
tooltips:     {    controls:       true  },
captions: {    defaultActive:  true  }
});
However a direct change via API does work, e.g
player.volume = 0.75;
In fact pointed out previously in a somewhat obscure fashion, but not sure why nobody has noticed this before. https://github.com/sampotts/plyr/issues/848
Environment

Browser:
Version:
Operating System:
Version:

Console errors (if any)
Link to where the bug is happening

I think this is caused by the local storage that stores the user preferences. I'll find a way to force the update if it's passed via the API.

+1, same with captions: { active: true } on init

problem for volume
https://github.com/sampotts/plyr/blob/fcd82088a5cca625fea16fb60a30640468cb114b/src/js/ui.js#L65
I don't think we need a reset we can go with user config
https://github.com/sampotts/plyr/blob/fcd82088a5cca625fea16fb60a30640468cb114b/src/js/plyr.js#L538-L545
when build is called in ui.js we are resetting the volume to null which calls the setter method volume, the first preference is given to local storage
problem for captions
https://github.com/sampotts/plyr/blob/fcd82088a5cca625fea16fb60a30640468cb114b/src/js/captions.js#L95-L98
we are giving pref to local storage first rather than config which in my opinion is wrong
I can raise a pr in some time if no one is working on it
any reason we are resetting the values instead of reading from the config?
https://github.com/sampotts/plyr/blob/fcd82088a5cca625fea16fb60a30640468cb114b/src/js/ui.js#L65-L77

If we always read from config, what is the point of storing the user settings? There's definitely some improvement to be made but ignoring the user settings isn't the answer. If the user sets volume low, then you change source and it shoots up to 100%, it's not a great experience.

For us the initial captions and volume options do not work even when we explicitly disable user options storage.

authors: DenisSemionov aubreyz mum-never-proud sampotts

repo: sampotts/plyr


text:
500 errors uploading changed files with ')' in filename

Describe the bug
When Maestral tries to sync changes to a file containing the character ), the Dropbox API endpoint throws back a 500 error.
To Reproduce

Create a folder on Dropbox containing two files:

01)file_with_right_paren.txt
file_without_right_paren.txt

Sync it down using Maestral (this works)
Run touch file_without_right_paren.txt; this should work.
Run touch 01)file_with_right_paren.txt; this will generate a sync error.

Expected behaviour
Files with ) characters in them should sync normally, since they're not on the list of prohibited characters.
System:

Maestral version: 1.6.4
Python version: 3.10.8
OS: macOS Ventura 13.1

Additional context
The file can be renamed, including to a different filename containing a ) character (e.g. 01)file → 02)file), without triggering a sync error. Looking at the logs, it appears this issue only manifests when Maestral tries to use the files/upload endpoint; renames seem to use files/move_v2.
I cannot reproduce this issue with the official client, so I'm not sure if this is an issue with the Dropbox API endpoint or Maestral.

Thanks for the report! Looks like an issue with the API endpoint, though interestingly I cannot reproduce this myself.
Thanks for providing the logs output, I'll file a bug with Dropbox including the request id.

I came back to this to investigate it further and couldn't reproduce it with my own reproduction instructions—but could reproduce it on the original file I was having problems with. After completely recreating that file from scratch, I can no longer reproduce it with it either. So I think that specific file must have had something weird in it that Dropbox didn't like and the issue was never with the filename at all.

authors: ideabucket samschott

repo: samschott/maestral


text:
Determine status code in constant linear time

This seems much simpler.

:+1:

authors: cibernox samselikoff

repo: samselikoff/ember-cli-mirage


text:
Add the Comparison Handlebar helpers

@dcalvom for whatever reason I didn't realize that handlebars couldn't do conditionals out of the box can you install the comparison helpers from here: https://github.com/helpers/handlebars-helpers#comparison
@btotharye this would allow you to do your Mycroft stuff without needing an additional API for fulfillment.

I added the comparison helper to Hanldebars.
Closed by https://github.com/samtecspg/articulate/commit/42d51df55a3e84d7cc2aac576e9cc1340c3a8b72

authors: dcalvom wrathagom

repo: samtecspg/articulate


text:
API Language validation needs to pull from settings

i update my new language but it cant show how can i fix it ?

Hey @kurodenjiro sorry that we didn't see this problem coming. For the time being you'll need to update this validation line in the API. https://github.com/samtecspg/articulate/blob/master/api/modules/agent/config/agent.validator.js#L169
We'll work on making the validation pull from the settings.

@wrathagom  i updated . how to rebuild images by docker ? . it's stille like that

Try
docker-compose down
docker-compose -f docker-compose.yml -f build-compose-override.yml build api
docker-compose up

authors: kurodenjiro wrathagom


text:
Wasm cleanup

experiment with a perhaps simpler setup.

cc @messense @hoodmane
This cleans up the wasm/emscripten testing a bit IHMO, in particuar:

the nox requirement is removed, package.json is used to call tests
the pyioide-setup logic is removed, it seemed to be superfluous
js code is linted
the import and running pytest logic is moved into a python block

let me know what you think.

I had some slightly weird behaviour where pytest-speed wasn't being recognised as a plugin by pytest sometimes, but it seems to have been solved by importing the package before running pytest.

I had some slightly weird behaviour where pytest-speed wasn't being recognised as a plugin by pytest sometimes

This is a known issue with pytest plugins in Pyodide, I would really like to fix it but I haven't been able to understand the cause. The problem is that for some reason importlib.metadata.distributions() doesn't see the new packages sometimes. You can see this also with micropip.list(): on runs where it is working it will show the version of pytest-speed as 0.3.1, but if it is not working it will show it as UNKNOWN.

When pytest can't find the plugin, micropip.list() looks like
Name              | Version  | Source
----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------
packaging         | 21.3     | pyodide
micropip          | 0.1      | pyodide
pytest            | 7.1.2    | pyodide
atomicwrites      | 1.4.0    | pyodide
pyparsing         | 3.0.9    | pyodide
attrs             | 21.4.0   | pyodide
six               | 1.16.0   | pyodide
more-itertools    | 8.13.0   | pyodide
pluggy            | 1.0.0    | pyodide
py                | 1.11.0   | pyodide
iniconfig         | 1.1.1    | pyodide
pytz              | 2022.1   | pyodide
setuptools        | 62.6.0   | pyodide
dirty-equals      | 0.4      | pypi
exceptiongroup    | 1.0.0rc8 | pypi
sortedcontainers  | 2.4.0    | pypi
hypothesis        | 6.49.1   | pypi
distutils         | 1.0      | pyodide
commonmark        | unknown  | https://files.pythonhosted.org/packages/b1/92/dfd892312d822f36c55366118b95d914e5f16de11044a27cf10a7d71bbbf/commonmark-0.9.1-py2.py3-none-any.whl
rich              | unknown  | https://files.pythonhosted.org/packages/13/3f/1996db12d23733e2834b9c2b094cc59c0d1ab943fedafcdb34b5c0da9ebf/rich-12.4.4-py3-none-any.whl
click             | unknown  | https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl
pytest-speed      | unknown  | https://files.pythonhosted.org/packages/84/38/3bcdb8233a73764aaa61dcac1eaa4f4157b2f1669382ae47bd203e7aa74b/pytest_speed-0.3.1-py3-none-any.whl
pygments          | 2.12.0   | pyodide
typing-extensions | 4.2.0    | pyodide
pydantic-core     | unknown  | file:/Users/samuel/code/pydantic-core/dist/pydantic_core-0.0.1-cp310-cp310-emscripten_3_1_14_wasm32.whl

When it can, it looks like
Name              | Version  | Source
----------------- | -------- | ----------------------------------------------------------------------------
attrs             | 21.4.0   | pyodide
atomicwrites      | 1.4.0    | pyodide
six               | 1.16.0   | pyodide
pluggy            | 1.0.0    | pyodide
more-itertools    | 8.13.0   | pyodide
py                | 1.11.0   | pyodide
packaging         | 21.3     | pyodide
micropip          | 0.1      | pyodide
pyparsing         | 3.0.9    | pyodide
pytest            | 7.1.2    | pyodide
iniconfig         | 1.1.1    | pyodide
pytz              | 2022.1   | pyodide
setuptools        | 62.6.0   | pyodide
dirty-equals      | 0.4      | pypi
sortedcontainers  | 2.4.0    | pypi
exceptiongroup    | 1.0.0rc8 | pypi
hypothesis        | 6.49.1   | pypi
commonmark        | 0.9.1    | pypi
rich              | 12.4.4   | pypi
click             | 8.1.3    | pypi
pytest-speed      | 0.3.1    | pypi
Pygments          | 2.12.0   | pyodide
distutils         | 1.0      | pyodide
typing-extensions | 4.2.0    | pyodide
pydantic-core     | unknown  | file:/repo/dist/pydantic_core-0.0.1-cp310-cp310-emscripten_3_1_14_wasm32.whl

is it somehow related to caching? is there a cache somewhere I can delete to to avoid this?
If it helps, I've never seen the error with hypothesis, just with pytest-speed and pytest-timeout.

Well there is importlib.invalidate_caches but I think we already do that.

I wonder if the problem is that we call importlib.invalidate_caches at the beginning of micropip.install instead of the end? I have the feeling that I investigated this once and moving it to the end didn't help. But probably it's a good idea in any case.
https://github.com/pyodide/pyodide/blob/main/packages/micropip/src/micropip/_micropip.py#L525

authors: hoodmane samuelcolvin

repo: samuelcolvin/pydantic-core


text:
Custom validator does not include Enum fields in 'values' argument

Bug
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.9.1
            pydantic compiled: True
                 install path: /home/shade/.virtualenvs/kafka_sap_pi_adapter/lib/python3.8/site-packages/pydantic
               python version: 3.8.13 (default, Mar 19 2022, 05:55:35)  [GCC 11.2.0]
                     platform: Linux-5.10.126-1-MANJARO-x86_64-with-glibc2.34
     optional deps. installed: ['dotenv', 'typing-extensions']

Hello!
I have a problem with custom validator and a model including Enum fields.
Given the following model which works like expected:
from pydantic import Field, validator
from pydantic.main import BaseModel

class E1ADHDR(BaseModel):
    message_type: str = Field(alias="MESTYP")
    message_type_lng: str = Field(alias="MESTYP_LNG")
    e1state: List[E1STATE] = Field(alias="E1STATE")

    @validator("e1state", each_item=True)
    def check_names_not_empty(cls, val, values, **kwargs):
        if values["message_type"] == "RELEVANT_OOS_DETECTED" and val.stapa4_lng is None:
            raise ValueError("stapa4_lng is required")
        return val

If I change the type of message_type  field from str to Enum like this:
class E1AdhrMessageType(Enum):
    """Possible values of E1STATE's status field."""

    trigger = "OOS_RELEVANT_DETECTED"
    invent = "WVINVE_UTP"
    writeoff = "WRITEOFF_UTP"

the message_type field disappears from values in validator resulting in KeyError exception

You mean change from str to E1AdhrMessageType?

Yes

Is that the only change u did?
is it possible u also changed the fields order?
from the docs: https://pydantic-docs.helpmanual.io/usage/validators/

Validation is done in the order fields are defined. E.g. in the example above, password2 has access to password1 (and name), but password1 does not have access to password2. See Field Ordering for more information on how fields are ordered

Sorry for late answer.
This seems to be the only change I did.
I've re-checked again and noticed that version with enum:
from enum import Enum
from typing import List, Optional

from pydantic import Field, validator
from pydantic.main import BaseModel

class E1AdhrMessageType(Enum):
    """Possible values of E1STATE's status field."""

    trigger = "OOS_RELEVANT_DETECTED"
    invent = "WVINVE_UTP"
    writeoff = "WRITEOFF_UTP"

class E1ADHDREnum(BaseModel):
    message_type: E1AdhrMessageType = Field(alias="MESTYP")
    e1state: List[int] = Field(alias="E1STATE")
    stapa4_lng: Optional[str]

    @validator("e1state", each_item=True)
    def check_names_not_empty(cls, val, values, **kwargs):
        print("validator_enum", val, values)
        if values["message_type"] == "RELEVANT_OOS_DETECTED" and val.stapa4_lng is None:
            raise ValueError("stapa4_lng is required")
        return val

m_enum = E1ADHDREnum.parse_obj({
    "MESTYP": "xxx",
    "E1STATE": [1, 2, 3],
})

crashes with the KeyError
validator_enum 1 {}
Traceback (most recent call last):
  File "./model_test.py", line 31, in <module>
    m_enum = E1ADHDREnum.parse_obj({
  File "pydantic/main.py", line 578, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 404, in pydantic.main.BaseModel.__init__
  File "pydantic/main.py", line 1040, in pydantic.main.validate_model
  File "pydantic/fields.py", line 734, in pydantic.fields.ModelField.validate
  File "pydantic/fields.py", line 767, in pydantic.fields.ModelField._validate_sequence_like
  File "pydantic/fields.py", line 899, in pydantic.fields.ModelField._validate_singleton
  File "pydantic/fields.py", line 737, in pydantic.fields.ModelField.validate
  File "pydantic/fields.py", line 913, in pydantic.fields.ModelField._apply_validators
  File "pydantic/class_validators.py", line 275, in pydantic.class_validators._generic_validator_cls.lambda2
  File "./model_test.py", line 26, in check_names_not_empty
    if values["message_type"] == "RELEVANT_OOS_DETECTED" and val.stapa4_lng is None:
KeyError: 'message_type'

only in case if invalid value for message_type is given.
If the field value matches the E1ADHDREnum values validation works as expected.
Is it accepted behavior not to check enum values first in this case?

Yep, this is the expected behavior, and it is also documented here
see the second bullet:

where validators rely on other values, you should be aware that:
Validation is done in the order fields are defined. E.g. in the example above, password2 has access to password1 (and name), but password1 does not have access to password2. See Field Ordering for more information on how fields are ordered
If validation fails on another field (or that field is missing) it will not be included in values, hence if 'password1' in values and ... in this example.

authors: PrettyWood danielkatzan radiophysicist

repo: samuelcolvin/pydantic


text:
Collection Titles

Summary
On the importer and exporter show page, the collections titles no longer render properly.
[ ] Collection titles should display on the importer/exporter show page, if the work is associated with a collection
[ ] We need to update how we retrieve collection titles, with the Bulkrax 3+ upgrade (which deprecated collection_field_mapping)
Exporter example:

Importer example:

kill the collection column

@ShanaLMoore is this issue resolved by this PR? https://github.com/samvera-labs/bulkrax/pull/480

yep!

authors: ShanaLMoore bkiahstroud orangewolf

repo: samvera-labs/bulkrax


text:
Add error message when accessing 0th item

See discussion in #58

Thanks for contributing!

This was included on v0.8.0 release
Release notes: https://github.com/san650/ember-cli-page-object/releases/tag/v0.8.0
NPM: https://www.npmjs.com/package/ember-cli-page-object
Thanks again for your contributions!


text:
PSR Generation - Update week handling

PSRs should be generated for the previous week from Saturday - Friday instead of Monday - Sunday.

In the server, generate weekly project status reports method in the project status report service.

repo: sancsoft/hq


text:
clusterIP is None

This is more of a question than an issue actually, what is the reason for setting clusterIP to None? Wouldn't this make the cluster inaccessible to its clients? Nice work by the way.

Have you tried connecting to it? For example:
$ kubectl run -it --rm redis-client --image redis /bin/bash
root@redis-7c87d5bf45-blf4j:/data# redis-cli -h redis-cluster -c
redis-cluster:6379> SET foo bar
-> Redirected to slot [12182] located at 10.1.0.6:6379
OK

If you want to be able to connect to it from outside the cluster you might change the Service type, but if you're connecting from inside the cluster a headless service works fine.

How do you change the service type, and change it to what?

headless service perfect fit redirect client strategy used by redis

authors: dantuluri nealYangVic pepedocs sanderploegsma

repo: sanderploegsma/redis-cluster


text:
DPL-880-3 Add a new UI to show all prefix data and also provide the ability to mark a prefix as inactive and not delete.

User story
As PSD developer I want to be able to view/retrieve all prefixes data in the UI and to be able to mark a prefix as invalid/inactive.
Who are the primary contacts for this story
Sangeetha, Steve
Who is the nominated tester for UAT
Sangeetha
Acceptance criteria
To be considered successful the solution must allow:

[ ] UI to show/list all prefixes data.
[ ] ability to mark a prefix as invalid/inactive(and not delete).
[ ] the application should continue to work as expected without any loss of service to the users.

Dependencies

https://github.com/sanger/baracoda/issues/470
https://github.com/sanger/baracoda/issues/471

References
This story has a non-blocking relationship with:

https://github.com/sanger/baracoda/issues/417

Additional context
Add any other context or screenshots about the feature request here.

Tasks:

[ ] Create a new UI to show/list all prefixes data.

[ ] Create the html to list all the prefixes data in a table
[ ] Add edit functionality only to mark a prefix as active/inactive.
[ ] Add endpoints to retrieve the data and to save the preferences.
[ ] Add functionality to mark prefix as active/inactive, and allow creation of new barcodes for prefixes that are only active.
[ ] Create a button View prefix details in the index.html to navigate to this page.

repo: sanger/baracoda


text:
x1216 - As TS (Katy) I would like to add a date sectioned to the section registration page, so we can process sldies within the recommended limit of the protocols

"On Manual entry to appear under the External barcode
To appear in the details column on the history page
Need to add column to the file upload registration
Appear on the release file in date sectioned column"

@Katy, Is the sectioned date related to the labware or to the slot? ie, for the same labware, when the user adds a new slot, is it required to enter a new sectioning date

@sabrine33 it should be the same for all sections on a labware, but probably be safer to do it per slot on a labware

@sabrine33 it should be the same for all sections on a labware, but probably be safer to do it per slot on a labware

If we are adding it per slot, better to add the sectioned input date within the section information (not after the barcode as requested), what do you think @KatyTudor

@sabrine33 @khelwood I have attached the new request form with the new format because of this story, i.e. with Date sectioned column added
SGP Xenium Request Form V3.xlsx

repo: sanger/stan-client


text:
Update jackson-module-scala to 2.12.3

Updates com.fasterxml.jackson.module:jackson-module-scala from 2.12.1 to 2.12.3.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (2.12.1).
You might want to review and update them manually.
.github/workflows/ci.yml
build.sbt

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.fasterxml.jackson.module", artifactId = "jackson-module-scala" } ]

labels: library-update, semver-patch, old-version-remains

Superseded by #51.

repo: sangria-graphql/sangria-jackson


text:
🐞[Bug]: forget password not below the password secrtion

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
the forgot password is showing on the right side of the screen.
Expected behavior
It should be shown below the input box but it is showing on the side of the screen.
Add ScreenShots

What browsers are you seeing the problem on?
No response
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I have starred the repository

please assign this issue to me @sanika391