text:
Example of working Swift code?

I read in the docs about a bridging header, but I don't see one in the files, and I am having a hard time incorporating PureLayout into my Swift project.  What am I missing?  A very small working proof-of-concept project would be welcome.
This looks like a great package; I'm eager to use it.
Thanks!

Hi Dave!
Thanks for asking about this. I definitely want to put together a sample project that shows PureLayout being used from Swift. Right now, there isn't an official one, mainly because I haven't had the time to work on it :)
In the meantime, here are 2 small projects that are using PureLayout in Swift and can at least be a starting point for you to look at:
https://github.com/smileyborg/TableViewCellWithAutoLayoutiOS8
https://github.com/smileyborg/AdaptiveAutoLayout
Basically, you just need to integrate the PureLayout Objective-C source files into your project, and then import the PureLayout.h umbrella header from your Swift project's bridging header. If you aren't sure how to use a bridging header, Apple's documentation explains how to set that up here.
Let me know if you have any other questions. I'll try and get a real Swift sample project up and running soon.

Thanks, Tyler!  The TableCell example is just what I needed!
-Dave
============================
Dave Hirsch
Associate Professor
Department of Geology
Western Washington University
alternate email: dhirsch@mac.com
http://www.davehirsch.com
cell: (360) 389-3583
work: (360) 650-2166
fb: http://www.facebook.com/dave.hirsch
On Mar 10, 2015, at 08:38 AM, Tyler Fox notifications@github.com wrote:

Hi Dave!
Thanks for asking about this. I definitely want to put together a sample project that shows PureLayout being used from Swift. Right now, there isn't an official one, mainly because I haven't had the time to work on it :)
In the meantime, here are 2 small projects that are using PureLayout in Swift and can at least be a starting point for you to look at:
https://github.com/smileyborg/TableViewCellWithAutoLayoutiOS8
https://github.com/smileyborg/AdaptiveAutoLayout
Basically, you just need to integrate the PureLayout Objective-C source files into your project, and then import the PureLayout.h umbrella header from your Swift project's bridging header. If you aren't sure how to use a bridging header, Apple's documentation explains how to set that up here.
Let me know if you have any other questions. I'll try and get a real Swift sample project up and running soon.
—
Reply to this email directly or view it on GitHub.

Great, glad it can help. If you don't mind I will leave this issue open and use it as a reminder to put together a real Swift sample project as part of PureLayout.

The swift sample you have on the repo works great, thanks.
However I cannot get the cocoapods install to work with a new xcode project.
The cocoapods install works but attempting to write some code fails to autocomplete and give errors.
Ex: let redView = UIView.newAutoLayoutView()
results in error UIView does not have a member named ...
I tried adding the bridging header but I cannot find the correct path to use in the import.
I can get the project to work if I drag and drop the files into the xcode project and setup the bridging header in the same manner as your sample project but I would really like to manage through cocoapods.
Any suggestions?

@sixfngers Glad you were able to get it working! I definitely plan to update the README to add some specific instructions, notes, and examples for Swift soon. One of the many things on the todo list :)

Unable to get the bridging header working I found out that CocoaPods 0.36 introduced use_frameworks! especially for Swift and adding it to your Podfile enables you to simply do
import PureLayout

in your Swift code.

I've finally added Swift versions of all the existing iOS demos, and the iOS example app has been enhanced to easily switch between using the Objective-C and Swift versions. See b970c6f7bc483f28468d3d6b9010a3e90feefb86

authors: davehirsch mdio sixfngers smileyborg

repo: smileyborg/PureLayout


text:
why does  the allocated memory in a for loop keep increasing

this is my code:
using MPI, MPIHaloArrays
using FortranFiles
using CircularArrays
using JLD2
using Statistics

MPI.Init()
const comm = MPI.COMM_WORLD
const rank = MPI.Comm_rank(comm)
const nprocs = MPI.Comm_size(comm)
const root = 0 # root rank

@assert nprocs == 40 "This example is designed with $(nprocs) processes..."

function gauss_filter_parallel_1d(data::AbstractArray{T, 3}, radius, nhalo::Int) where T<:Real

	nx, ny, nz = size(data)

	filtered_data = zeros(eltype(data),nx,ny,nz)

    data = CircularArray(data[:,:,:])

	dz = 14.0 / nz

	r_gridz = ceil(Int, radius / dz)

	G = zeros(2*r_gridz+1)

	for k in 1:2*r_gridz+1
		dis_z = (k-r_gridz-1)*dz
		G[k] = sqrt(6/(π*4*radius^2))*exp(-6*(dis_z)^2/(4*radius^2))
	end

	G = G .* size(G) ./ sum(G)

    for i in 1+nhalo:nx+nhalo
        for j in 1+nhalo:ny+nhalo
            for k in 1+nhalo:nz+nhalo
                kmin = k-r_gridz
                kmax = k+r_gridz
                filtered_data[i,j,k] = mean( data[i, j, kmin:kmax] .* G)
            end
        end
    end

    return filtered_data
end

function main(filepath, nx_g, ny_g, nz_g, nx, ny, nz, nhalo,
topology, steps, Δ, δᵥ, Ndims)

    for n in steps

        f = "$(filepath)OCFD$(string(n,pad=7)).dat"

        flow_data = rand(nx, ny, nz, 5)#initializer3D(f, nx_g, ny_g, nz_g, Ndims, root, nhalo, topology)

        ρ = MPIHaloArray(flow_data[:,:,:,1], topology, nhalo; do_corners = false)
        u = MPIHaloArray(flow_data[:,:,:,2], topology, nhalo; do_corners = false)
        v = MPIHaloArray(flow_data[:,:,:,3], topology, nhalo; do_corners = false)
        w = MPIHaloArray(flow_data[:,:,:,4], topology, nhalo; do_corners = false)
        T = MPIHaloArray(flow_data[:,:,:,5], topology, nhalo; do_corners = false)

        fillhalo!(ρ, 0)
        fillhalo!(u, 0)
        fillhalo!(v, 0)
        fillhalo!(w, 0)
        fillhalo!(T, 0)

        updatehalo!(ρ)
        updatehalo!(u)
        updatehalo!(v)
        updatehalo!(w)
        updatehalo!(T)

        ρ1 = ρ.data
        u1 = u.data .* ρ.data
        v1 = v.data .* ρ.data
        w1 = w.data .* ρ.data
        T1 = T.data .* ρ.data

        for m in Δ

            gl = δᵥ * m / 2

            ρ.data = gauss_filter_parallel_1d(ρ1, gl, nhalo)
            u.data = gauss_filter_parallel_1d(u1, gl, nhalo)
            v.data = gauss_filter_parallel_1d(v1, gl, nhalo)
            w.data = gauss_filter_parallel_1d(w1, gl, nhalo)
            T.data = gauss_filter_parallel_1d(T1, gl, nhalo)

            G1=gatherglobal(ρ)
            G2=gatherglobal(u)
            G3=gatherglobal(v)
            G4=gatherglobal(w)
            G5=gatherglobal(T)

            if rank == root

			    G2 ./= G1
				G3 ./= G1
				G4 ./= G1
				G5 ./= G1

                println("Test$(string(n,pad=7))_g_filt_$(m).jld2")

            end # end rank == 0
        end #end Δ loop

    end #end for n loop

end

Ndims = 5
δᵥ = 0.0355
npx0, npy0, npz0 = 1, 40, 1
nx_g, ny_g, nz_g = 1401, 160, 128
halo_dims = (1, 2, 3)

sizes = MPIHaloArrays.get_subdomain_sizes((nx_g,ny_g,nz_g),(npx0,npy0,npz0),halo_dims)

nx, ny, nz = sizes[:,rank + 1] |> Tuple

nhalo = 0
topology = CartesianTopology(comm, [npx0,npy0,npz0], [false, false, true])
filepath = "/homeu_jyc/Data/M29/Flateplate/Tw284/70W-80W/"

steps = range(start = 798100, step = 100, stop = 798500)

Δ = [15, 60, 120, 240]# .* δᵥ ./ 2.0

main(filepath, nx_g, ny_g, nz_g, nx, ny, nz, nhalo, topology, steps, Δ, δᵥ, Ndims)

GC.gc()

MPI.Finalize()

this is the memory allocated, if allocated memory beyond my cp, it will be killed.

Look for type instabilities, e.g., @code_warntype gauss_filter_parallel_1d(ρ1, gl, nhalo). There are a few spots where you are using slices that will create copies. Do @views instead, since these don't allocated. Did you try running with julia --track-allocation=user flag? This can give you hints as to where you're allocating

thank you so much, I've tried @views and G=nothing ; data =nothing in gauss_filter_parallel_1d(ρ1, gl, nhalo); , but it still allocate memory. I tried julia  --track-allication=user, but I got some error, I'll try it again tomorrow.

Look for type instabilities, e.g., @code_warntype gauss_filter_parallel_1d(ρ1, gl, nhalo). There are a few spots where you are using slices that will create copies. Do @views instead, since these don't allocated. Did you try running with julia --track-allocation=user flag? This can give you hints as to where you're allocating

thank you so much, I've tried @views and G=nothing ; data =nothing in gauss_filter_parallel_1d(ρ1, gl, nhalo); , but it still allocate memory. I tried julia --track-allication=user, but I got some error, I'll try it again tomorrow.

why am I got wrong result when I use :
            gauss_filter_parallel_1d!(ρ1, ρ.data,nx, ny, nz, gl, nhalo)             gauss_filter_parallel_1d!(u1, u.data,nx, ny, nz, gl, nhalo)             gauss_filter_parallel_1d!(v1, v.data,nx, ny, nz, gl, nhalo)             gauss_filter_parallel_1d!(w1, w.data,nx, ny, nz, gl, nhalo)             gauss_filter_parallel_1d!(T1, T.data,nx, ny, nz, gl, nhalo)
is MPIHaloArray.data can't change in functions? It can got right result when I don't use MPI.
the function is defined:
`function gauss_filter_parallel_1d!(data::AbstractArray{T, 3},
filtered_data, nx, ny, nz, radius, nhalo::Int) where T<:Real
data0 = CircularArray(data[:,:,:])

#filtered_data = zeros(eltype(data),nx,ny,nz)

dz = 14.0 / nz

r_gridz = ceil(Int, radius / dz)

G = zeros(eltype(data), 2*r_gridz+1)

for k in 1:2*r_gridz+1
	dis_z = (k-r_gridz-1)*dz
	G[k] = sqrt(6/(π*4*radius^2))*exp(-6*(dis_z)^2/(4*radius^2))
end

G = G .* size(G) ./ sum(G)

for i in 1+nhalo:nx+nhalo
    for j in 1+nhalo:ny+nhalo
        for k in 1+nhalo:nz+nhalo
            kmin = k-r_gridz
            kmax = k+r_gridz
            filtered_data[i,j,k] = mean(@views data0[i, j, kmin:kmax] .* G)
        end
    end
end
return nothing#filtered_data

end
`

It was solved, but I have to execute GC.gc() in the end of for n in steps loop manually.

source: gharchive/issue

authors: crazyfireji smillerc

license: MIT

license_type: permissive

license_source: github-api


text:
Simplify some types of ambiguity

Scenario is that if a base sequence is:
PEPTIDE or PEPTIDE or PEPTIDE or PEPTIDE
we should simplify this down to:
PEPTIDE
if a column has ANY ambiguity, list all possibilities (for example):
PEPTIDE or PEPTIDE or PEPTIDE or PEPIETD
Currently, all possibilities are always listed even if the cell can be collapsed. This is confusing and can results in problems in parsing output.

This already seems to be working properly to me; starting on line 520 in Psm.cs:
if (list.All(b => b == null) || list.All(b => first.Equals(b)))
            {
                return new Tuple<string, string>(first, first);
            }

This rather confusing piece of code returns all options if all options are not equal, or returns the first option if all options are equal.
Can anyone find an instance in any field (especially BaseSequence or FullSequence) where this is not the case?

Cannot reproduce. Feel free to reopen or make a new issue if this is a real bug.

repo: smith-chem-wisc/MetaMorpheus

license: mit

license_source: bigquery


text:
update import to material-9

Fix an import to be compatible with @angular/material  >= 9

Hope this library is still maintained.

@vedran-m  nope it's not. I switched to raw ngx-codemirror in my projects
@RenanTashiro thank you for PR. Would you like to become a maintainer of this project? I'll happily transfer it to you

@smnbbrv sure. My current company use this library

@RenanTashiro what is your npm account?

renan685

@smnbbrv are you going to transfer this project to @RenanTashiro?
If not, can you add me as a maintainer or can you merge this pull request and do a new release?

I can't transfer the ownership because @RenanTashiro has a fork...
However he can push the packages now and is maintainer in this repo
@RenanTashiro if you remove your repo I can proceed with transfer

@smnbbrv it looks like RenanTashiro is not interested any more.
My friend Joe and I are very much interested and would like to maintain this lib.
It would be super cool if you where to add the two of us as maintainers :)

Hi @zeljkoantich
I would need your npm account, please

Hey @smnbbrv
my npm account is https://www.npmjs.com/~zeljkoantich
Joes npm account is https://www.npmjs.com/~joefire

@zeljkoantich please accept the repo transfer

@zeljkoantich please check

source: gharchive/pull-request

authors: RenanTashiro smnbbrv vedran-m zeljkoantich

repo: smnbbrv/ngx-mat-codemirror


text:
rsmq and rsqm-worker does not work with a ioredis client and Sentinels

as published here https://github.com/mpneuried/rsmq-worker/issues/21
Hi to all,
I'm using ioredis to establish a connection to Redis and use it as a client to RSMQ https://github.com/smrchy/rsmq and RSMQ-worker https://github.com/mpneuried/rsmq-worker.
If I use a standalone Redis server with default settings localhost:6370, all my code work as charm and tasks are being processed as expected.
Issues appear as soon as I try to use ioredis with Sentinels option (https://github.com/luin/ioredis#sentinel)
So after shut down the standalone Redis instance, I have set up a Sentinels environments with
a master server and 2 slaves servers in my local machine.
Then I connect to them with
var redis_client = new Redis({
     sentinels: [{host: "localhost", port: "16380"},{host: "localhost", port: "16381"},{host: "localhost",             port: "16382"}],
name: "redis-cluster"

});
as reported in https://github.com/luin/ioredis#sentinel.
Apparently everything seems to work correctly, and
redis_client.on('connect;,function(){}
says that the client has been connected to the Sentinels servers.
Then according to the RSMQ documentation I can use the already existing Redis client with the RSMQWorker
var worker = new RSMQWorker("mytask", {
interval: [0, 10],
autostart: true,
maxReceiveCount: variables.rsmq.maxReceiveCount,
customExceedCheck: fnCheck,
redis: redis_client,
redisPrefix: "rsmq",
alwaysLogErrors: true
});
but unfortunately with these settings tasks stop to work.
As a clue the Redis Master server receives nothing on monitor.
So I started to investigate and first of all I have printed out the redis_client object, just to discover a couple of localhost connections in it.
[...]
options:
{ sentinels: [ [Object], [Object], [Object], [Object], [Object] ],
name: 'redis-cluster',
port: 6379,  <---------
host: 'localhost', <----------
[...]
SentinelConnector {
options:
{ sentinels: [Object],
name: 'redis-cluster',
port: 6379, <------
host: 'localhost', <------
family: 4,
[...]
Does someone knows why even if I connect using Sentinels, the redis_client json has localhost and local port values on ?
I was wondering if someone has experience with Sentinels and with these kind of issues.
Thanks in advance
REDIS CLIENT: Redis {
domain: null,
_events:
{ connect: [ [Function], [Object] ],
close: { [Function: g] listener: [Function] } },
_eventsCount: 2,
_maxListeners: undefined,
options:
{ sentinels: [ [Object], [Object], [Object], [Object], [Object] ],
name: 'redis-cluster',
port: 6379,
host: 'localhost',
family: 4,
connectTimeout: 3000,
retryStrategy: [Function],
keepAlive: 0,
connectionName: null,
role: 'master',
sentinelRetryStrategy: [Function],
password: null,
db: 0,
parser: null,
dropBufferSupport: false,
enableOfflineQueue: true,
enableReadyCheck: true,
autoResubscribe: true,
autoResendUnfulfilledCommands: true,
lazyConnect: false,
keyPrefix: '',
reconnectOnError: null,
readOnly: false,
stringNumbers: false },
scriptsSet: {},
commandQueue: { [String: '[object Object]'] _capacity: 16, _length: 1, _front: 0 },
offlineQueue: { [String: ''] _capacity: 16, _length: 0, _front: 0 },
connector:
SentinelConnector {
options:
{ sentinels: [Object],
name: 'redis-cluster',
port: 6379,
host: 'localhost',
family: 4,
connectTimeout: 3000,
retryStrategy: [Function],
keepAlive: 0,
connectionName: null,
role: 'master',
sentinelRetryStrategy: [Function],
password: null,
db: 0,
parser: null,
dropBufferSupport: false,
enableOfflineQueue: true,
enableReadyCheck: true,
autoResubscribe: true,
autoResendUnfulfilledCommands: true,
lazyConnect: false,
keyPrefix: '',
reconnectOnError: null,
readOnly: false,
stringNumbers: false },
connecting: true,
retryAttempts: 0,
currentPoint: 0,
sentinels: [ [Object], [Object], [Object], [Object], [Object] ],
stream:
Socket {
_connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_eventsCount: 7,
_maxListeners: undefined,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 14,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 1244,
read: [Function],
_consuming: true,
_peername: [Object] } },
retryAttempts: 0,
status: 'connect',
condition: { select: 0, auth: null, subscriber: false },
stream:
Socket {
_connecting: false,
_hadError: false,
_handle:
TCP {
_externalStream: {},
fd: 16,
reading: true,
owner: [Circular],
onread: [Function: onread],
onconnection: null,
writeQueueSize: 0 },
_parent: null,
_host: null,
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: false,
endEmitted: false,
reading: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null,
resumeScheduled: false },
readable: true,
domain: null,
_events:
{ end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd],
error: [Object],
close: [Object],
data: [Function],
timeout: [Object] },
_eventsCount: 7,
_maxListeners: undefined,
_writableState:
WritableState {
objectMode: false,
highWaterMark: 16384,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 1,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object] },
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 14,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 1244,
read: [Function],
_consuming: true,
_peername: { address: '127.0.0.1', family: 'IPv4', port: 6380 } },
replyParser:
JavascriptReplyParser {
name: 'javascript',
buffer: ,
offset: 0,
bigStrSize: 0,
chunksSize: 0,
buffers: [],
type: 0,
protocolError: false,
offsetCache: 0,
handleReply: [Function],
handleNumbers: [Function],
returnError: [Function],
returnFatalError: [Function],
returnReply: [Function] } }

I haven't looked into ioredis or sentinel. Feel free to send a PR.

Can you confirm this is only affecting rsmq with ioredis setup and not the default configuration?
If you explain what you expect to happen in the PR, I could be able to spend some time on fixing that.

We are running rsmq with the official redis client https://www.npmjs.com/package/redis without any issues.
Re: Sentinel it could be that Sentinel works different with LUA scripts (which rsmq needs to use).

I get that this was closed but this issue is still not solved.
https://github.com/smrchy/rsmq/blob/master/index.js#L516-L521 this line of code stops rsqm from being able to use ioredis in both normal redis client and cluster client.
The redis client is simply named Redis in ioredis.
The redis cluster client is named Cluster in ioredis.
I feel that using a type of duck type checking would be better than checking .constructor.name for a certain name.
The ioredis client supports a lot of connection types that the redis package does not support. The redis client provided by ioredis matches the redis package closely https://github.com/luin/ioredis/wiki/Migrating-from-node_redis.
I am willing to make a PR if you feel that supporting ioredis clients is something that is wanted. Would love to know what you feel would be the right way to validate a passed in client, if support for ioredis would be wanted.

O don't think lua scripts would work reliably on a cluster. You might start getting bugs depending on which redis instance is handling your work at the moment.
You can use kue if you like its features.
I ended up rolling my own on top of atomic list operations.

authors: Larry1123 antoniodimariano naugtur smrchy

repo: smrchy/rsmq


text:
Solid date input button has incorrect border color

Duplicate of #346


text:
Rule with Nextflow workflow not being executed concurrently for multiple samples on SLURM

Snakemake version

7.32.4
Describe the bug

When attempting to integrate the use of a foreign workflow management system into Snakemake, Snakemake does not execute the rule for multiple samples "concurrently". Instead, it waits for the whole Nextflow workflow to finish to then start the analysis for the second sample, i.e. it's submitting jobs sequentially instead of the expected concurrent (parallel?) submission of jobs for different samples.
Is this an issue related to the nature of this type of rule? Is it maybe because the execution of the rule is "handover" to another executor and treated as a local rule and that's why submission is sequential instead of concurrent? I may be misunderstanding how local rules work, but if not, the issue would be unrelated to SLURM and probably to the handover directive.
However, if this is indeed a SLURM issue as mentioned different times (in other contexts) on https://github.com/snakemake/snakemake/issues/2339 and https://github.com/snakemake/snakemake/issues/2060, is there any way we can change this behaviour?
Minimal example

A snippet of my Snakefile running the Nextflow workflow
rule sarek:
    input:
        params="results/{project}/{sample}/{sample}_params.json"
    output: mutect2="results/{project}/{sample}/variant_calling/mutect2/{sample}_Tumor_vs_{sample}_Normal/{sample}_Tumor_vs_{sample}_Normal.mutect2.filtered.vcf.gz"
    params:
        pipeline="sarek3.2.2",
        revision="3.2.2",
        profile="slurm_singularity",
        outdir="results/{project}/{sample}"
    handover: True
    shell:
        "nextflow23.04.02 run {params.pipeline} -revision {params.revision} -profile {params.profile} "
        "-params-file {input.params} --outdir {params.outdir} -work-dir /scratch/work"

How I'm executing Snakemake:
snakemake --slurm --keep-going --verbose --printshellcmds --reason --nolock --jobs unlimited --cores 24 --local-cores 4 --rerun-incomplete
I've also just run Snakemake on the head node, i.e. without including --slurm, and the problem persists. Interestingly, commenting out handover: True and running Snakemake with the above comment works for submitting and executing N jobs for rule sarek at the same time, however, I get this error:
ERROR ~ Error executing process > 'NFCORE_SAREK:SAREK:FASTP (PT_6_Tumor-Lane1)'

Caused by:
  Failed to submit process to grid scheduler for execution

Command executed:

  sbatch .command.run

Command exit status:
  1

Command output:
  sbatch: error: Batch job submission failed: Access/permission denied

Additional context

The nextflow workflow is saved on my home, i.e. it has already been pulled, and I have modified the slurm profile (here called slurm_singularity) in the nextflow.config to work on the HPC I work with. This workflow has been tested on my HPC before and works well "on its own", so I know the issue is not with the nextflow workflow and SLURM.

The reason for this behavior is because we cannot really pass parallelization info to nextflow directly:
The idea when using the nextflow wrapper is that the user has to specify a nextflow config that properly configures nextflow to parallelize the workflow. I would be happy to offer something automatic there, but this would require some nextflow engineers to help with translating Snakemake's parallelization info to what nextflow understands (e.g. translate Snakemake's slurm args to corresponding nextflow args). This is future work.
Until then, the only option I see here is to tell sarek to run all the samples in one go (I hope that is possible with sarek, as it seems quite a natural task to me).

authors: johanneskoester juliawiggeshoff

repo: snakemake/snakemake


text:
Cryptic error if the output is an empty string

Snakemake version
5.14.0
Describe the bug
Snakemake does not exit gracefully if the output filename is an empty string
Logs
$ snakemake -j1 archive

Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 12
Rules claiming more threads will be scaled down.
Job counts:
        count   jobs
        1       archive
        1

[Tue Apr 21 04:13:50 2020]
rule archive:
    output:
    jobid: 0

Traceback (most recent call last):
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/__init__.py", line 633, in snakemake
    keepincomplete=keep_incomplete,
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/workflow.py", line 850, in execute
    success = scheduler.schedule()
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/scheduler.py", line 374, in schedule
    self.run(job)
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/scheduler.py", line 393, in run
    error_callback=self._error,
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/executors.py", line 356, in run
    super()._run(job)
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/executors.py", line 178, in _run
    self.register_job(job)
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/executors.py", line 171, in register_job
    job.register()
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/jobs.py", line 938, in register
    self.dag.workflow.persistence.started(self)
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/persistence.py", line 161, in started
    f,
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/persistence.py", line 304, in _record
    recpath = self._record_path(subject, id)
  File "/home/avmo/.conda/envs/eturb/lib/python3.7/site-packages/snakemake/persistence.py", line 362, in _record_path
    b64id = ["@" + s for s in b64id[:-1]] + [b64id[-1]]
IndexError: list index out of range

Minimal example
import os

def file_name_generator(base):
    if os.path.exists(base):
        return "my_file.tar"
    else:
        return ""

rule clean:
    params:
        tarball = file_name_generator("source.txt")
    shell:
        """
        if [ "{params.tarball}" ] && [  ! -f "{params.tarball}" ]; then
            echo "ERROR: Archive {params.tarball} not found. Refusing to clean simulation files! Run 'snakemake archive'"
            exit 1
        fi
        rm -f source.txt
        """
rule archive:
    params: msg = "Hello"
    output: file_name_generator("source.txt")
    shell: "tar -cf {output} source.txt"

Additional context
Both rules execute if source.txt is present. I used the empty string as a placeholder, when source.txt is missing which triggered this error message.

Got the same error when the generator function in the input.
Can't understand what's happened since list index out of range appears not in the start or in the end of the list but several elements before the end. I'm iterating over in the for loop.
    input:
        *path_adapter(config['all_targets'])
    output:
        "postReport.log",
        report(directory("results"),
               caption="report/field_annotation.rst",
               patterns=["{name}.png"],
               category="Fuzzy Logic Results")
    run:
        import os
        from python.baseline import BaselineCaseData, BaselineFuzzyEstimator

        workflow_results = {}
        print(input)
        for archive_path in input:
            print(archive_path)

authors: ashwinvis engenegr


text:
feat: add votes page

Closes: https://github.com/snapshot-labs/sx-ui/issues/724
Closes: https://github.com/snapshot-labs/sx-ui/issues/607
Test plan

Use different sorting/filters.

Screenshots

Layout doesn't looks great atm (my fault) could we move to something like this for the overview page:

Using the "Overview | Votes" nav as first element of the page
Keep title of the proposal how it was previously
Move author and space name under title of the proposal

For the votes page I suggest to:

Add label for column, and sorting for Date and Voting power. If the sorting is active the label and icon should be white. If the sorting is not active we shouldn't show the icon.
Add 3 dots icon in the end of the line, this open a dropdown with a link "View on block explorer"
Use only 1 line per item (we can remove the % of vp for now)

I created this proposal with a bunch of vote to test:
http://localhost:8080/#/gor:0x21e0a186e708094859c064b656037ebbbd61f57b/proposal/2/votes
Also can we merge this to #760 and continue with a single PR?

By the way, why was the back button removed even though the issue #760 is closed and links to this PR?

@samuveth it's no longer a back button as it didn't fit the design, it's now clickable Space name under proposal title that can take you back.

Sorry for the back and forth but here is the final design for the votes page: https://www.figma.com/proto/Q7y6LYRDtdJrMPYN0qkYKX/Snapshot%3A-votes-page?type=design&node-id=565-20912&t=H1UHRN7XsoT0zaUU-1&scaling=scale-down-width&page-id=419%3A12100&mode=design
You will need to click on top left icon to see comments, I added few of them to give more details

Looks great! Just some few details:

"Voting Power" should be "Voting power"
Against and abstain icons should be same as in the app with the cross and arrow (this was misleading in my Figma I didn't had the icons so I used approve icon)
The choice icons should be aligned to "Choice" column label and all align to left in the column.
Ideally the whole column "Date", "Choice" and "Voting power" should be clickable

Also the choice circle icons should be same height and width than on the overview or proposal page, 40px size, not 48px.

Also we lost border on modals:

Can we have them back?

authors: Sekhmet bonustrack samuveth

repo: snapshot-labs/sx-ui


text:
rel="salmon" for my Atom feed?

What should I use if I want fed.brid.gy to deliver slaps to me as webmention?

salmon senders will actually look it up via webfinger, so you don't actually need it in your atom feed. e.g. https://fed.brid.gy/.well-known/webfinger?resource=singpolyma.net includes this in its response:
  "links": [
    "..."
    {
      "href": "https://fed.brid.gy/singpolyma.net/salmon",
      "rel": "salmon"
    }

looks like you don't currently have the redirect from https://singpolyma.net/.well-known/host-meta to https://fed.brid.gy/.well-known/host-meta set up, but that should be all you need: https://fed.brid.gy/#setup

I'm in the middle of a rewrite (moving from wordpress to static) so that's why you don't see it enabled yet.
That looks like the link I'm looking for :)  I know webfinger-enabled people will see it there, but it can't hurt to put things in more places to support anyone who comes in some other way.

i'm really glad you're going to try this! it's definitely had some usage, but not a ton, so expect more hiccoughs. AP and OStatus interop are both really finicky in practice, for a variety of reasons. e.g. Mastodon will happily accept and 202/204 incoming replies, and then proceed to not show them. i've only figured out some of the reasons. others are still mysteries. (moderation? sig verification differences? sigh.)

Yeah, I've never tried with Mastodon yet with my current stuff because they're known for not caring about the specs or common practise and just doing whatever they want.  That it works at all will be a step up for me :)

authors: singpolyma snarfed

repo: snarfed/bridgy-fed


text:
Ignore "no connection" for localhost

Is there any way to ignore if there is no connection to a redis server on localhost dev setups?
ConnectionException in AbstractConnection.php line 168:
Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte. [tcp://localhost:6379]

I want to run a local dev setup under Microsoft Windows without Redis but if the website is deployed it should be using Redis on the same machine. How to ignore it for the local setup?

where is AbstractConnection.php file?

Duplicate issue, see #253.

authors: JHGitty piotrkochan

repo: snc/SncRedisBundle


text:
Class attribute documentation is not shown

It appears the theme does not render documentation at all for class instance attributes, making it rather useless for documenting "struct"-like classes.
Example: http://temporenc.readthedocs.org/en/latest/#temporenc.Value  (locally generated version using the default Sphinx theme works fine)
It looks like this is the issue reported at rtfd/readthedocs.org#632  (which points to this repo, but I couldn't find a previously filed ticket...)

Ditto.

Closing this issue here as it seems it has moved on to rtfd/readthedocs.org#632

Currently at https://github.com/sphinx-doc/sphinx/issues/2006, but yes, moved on from here, at least. :-)

authors: agjohnson wbolster whit537


text:
Set install_requires for pip deps

This change fixes the pip install dependencies per https://packaging.python.org/discussions/install-requires-vs-requirements/
Current State:
aijay-mbp:venvs aijay$ python3 -m venv pyaug
aijay-mbp:venvs aijay$ source pyaug/bin/activate
(pyaug) aijay-mbp:venvs aijay$ pip install py-august
Collecting py-august
  Downloading https://files.pythonhosted.org/packages/47/0a/4dc955657d407455d7fc844693122eaaae5127122f2f87680d505cf2180f/py-august-0.9.0.tar.gz
Installing collected packages: py-august
  Running setup.py install for py-august ... done
Successfully installed py-august-0.9.0
(pyaug) aijay-mbp:venvs aijay$ pip freeze
py-august==0.9.0

With change:
(pyaug) aijay-mbp:py-august aijay$ pipdeptree
pipdeptree==0.13.2
  - pip [required: >=6.0.0, installed: 9.0.1]
py-august==0.8.0
  - requests [required: Any, installed: 2.22.0]
    - certifi [required: >=2017.4.17, installed: 2019.6.16]
    - chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
    - idna [required: >=2.5,<2.9, installed: 2.8]
    - urllib3 [required: >=1.21.1,<1.26,!=1.25.1,!=1.25.0, installed: 1.25.3]
  - vol [required: Any, installed: 0.1.1]
    - docopt [required: Any, installed: 0.6.2]
setuptools==28.8.0

Thanks! I’ll make a release soon

authors: aijayadams snjoetw

repo: snjoetw/py-august


text:
Added multitenancy for storage backend

Description of changes:
Forward tenantId to the dynamodb table.
The table key is an composite key (resourceid + tenantId) if multitenancy is enabled, tenantid is also separately stored in a column.
Utility functions are implemented to create the composite key and to extract the resource id and tenant id again.
For ddb to elasticsearch the resource id and tenant id are stored separately. The tenant id is also configured as index.
Added tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Hi @ilyash-b this is approach makes more sense. Is there also typescript an option the override cast operators, like in c++? So that f(s); would also work. Thx a lot for that feedback!
Next week I try it out and start with snkeos/fhir-works-on-aws-interface.

Is there also typescript an option the override cast operators, like in c++? So that f(s); would also work.

Not aware of such thing

authors: MarioDegen ilyash-b


text:
Unable to add \Throwable using the PhalconDebug helper

The method \PhalconDebug::addException accepts \Exception as argument although further are accepted Trowables as well.
https://github.com/snowair/phalcon-debugbar/blob/master/src/Debug.php#L188 and https://github.com/snowair/phalcon-debugbar/blob/master/src/PhalconDebugbar.php#L507
It should accept \Throwable, as the \Exception is a subclass of the former.

Thank you for your PR

authors: alexbusu snowair

repo: snowair/phalcon-debugbar


text:
SNOW-1445416, SNOW-1445419: Implement DataFrame/Series.attrs

Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

Fixes SNOW-1445416 and SNOW-1445419

Fill out the following pre-review checklist:

[ ] I am adding a new automated test(s) to verify correctness of my new code

[ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing

[ ] I am adding new logging messages
[ ] I am adding a new telemetry message
[ ] I am adding new credentials
[ ] I am adding a new dependency
[ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes.

Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.

Marking as WONTFIX: the hackier parts were already removed by removing the modin/pandas folder from our codebase. Remaining work is blocked on a task from the open source side: https://github.com/modin-project/modin/issues/7404

repo: snowflakedb/snowpark-python


text:
Plans for upcoming privacy requirement from Apple

At this year's WWDC, Apple announced it will require both app developers and SDK developers to declare usage of certain APIs, as well the reasons for using them. This information should be placed in a file embedded both the app bundle, but also in the built SDK artifact. As I understand it, including the privacy file in a built SDK also means it needs to be signed by the developer/organization which owns it. Apple will enforce this for app reviews, starting spring of 2024. Is this something you have begun working on, and do you have a preliminary timeline?
References:

https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393
https://developer.apple.com/wwdc23/10060

Hi @hakonk, thank you for raising this! It is on our roadmap to include the privacy manifest in the tracker SDK. I don't have a timeline to share for this yet, but it is definitely something that we plan to address well before Apple enforces it.

Hi @hakonk, thank you for raising this! It is on our roadmap to include the privacy manifest in the tracker SDK. I don't have a timeline to share for this yet, but it is definitely something that we plan to address well before Apple enforces it.

@matus-tomlein That's great! Thanks for answering so quickly

authors: hakonk matus-tomlein

repo: snowplow/snowplow-ios-tracker


text:
AsyncEmitter threads are not closed correctly when exitting app on iOS

Describe the bug
When closing an app that uses the Snowplow tracker with an AsyncEmitter the threads are not properly closed in the AsyncEmitter class thus making the app hang for 5 seconds before the OS forcefully closes the app.
This produces a crash report in xcode on our released app.
To Reproduce

Have an iOS app running with the snowplow tracker enabled (must be on device, does not reproduce in Editor)
Use an AsyncEmitter.
Close the app completely.
Immediately open the app again.
Observe the app hangs for about 5 seconds before it boots up again.
The app hang is due to the OS waiting for the threads to close, but that never happens.
In xcode

Expected behavior
Its expected that the AsyncEmitter threads are closed when closing the app. This can be done implemented a cancellation token or calling Abort (properly best with a cancellation token).
Screenshots
No screenshots as the app just hangs.
Device and Build Information (please complete the following information):

Device: Tested on iPhone 12, crash reports shows it happens on a lot of iphone devices.
OS: I would guess most versions of iOS
Unity Version 2020.3.32f1, but happened in previous versions as well.

Additional context
The method Stop() in AsyncEmitter line 103 is where I have made a local fix for the issue.

Hi @dkjepben, thank you for the bug report!
I tried to reproduce the behavior based on the steps that you outlined, but I wasn't successful in doing so. I used the demo app in this repository with AsyncEmitter. I tried closing the application by forcefully quitting it or by calling Application.Quit(). However, opening the app immediately after didn't make it hang for me. I assume that there is some other influence that I am missing in my simple demo.
To help me understand the problem better, please bear with me with the following questions:

What did you mean by closing the app? Was it forcefully quitting it or calling `Application.Quit() or something similar?
Does it also happen in case events are being successfully sent to the Snowplow collector?
Are you calling tracker.StopEventTracking() when the application is quit, maybe in the OnApplicationQuit() callback?
Could you please share the local fix that you mentioned adding to the Stop() method in AsyncEmitter?

The AsyncEmitter has a mechanism to gracefully stop the emitter and consumer threads. In the Stop() function, it uses the emitLock to notify the emitter thread to shut down and the payloadQueue to notify the consumer thread. This is a similar mechanism as the cancellation token that you mentioned. I would prefer to avoid calling Abort on the threads and rather close them gracefully as that could cancel ongoing requests and increase the likelihood of an inconsistent state. It's preferable to finish sending events before app is quit.

Hi @matus-tomlein,
Thanks for the reply.
We get it thread hang when we close the app by swipe-closing it on iOS (it only is reproducable on iOS devices). It could be a combination of our app logic and this that does the trick which cannot be reproduced in the demo app, then I know it can be difficult to fix.
To answer the points:

I close the app by swipe-closing it on iOS. I havent tried with Application.Quit().
It happens 10/10 times and we do receive tracking events, so I would say yes. But Im not 100% sure that it happens while it sents events only as we do not send that many events and I can reproduce it everytime.
Yes we call the StopEventTracking OnApplicationQuit().
I fixed it in our app by calling Abort on the two threads in the Stop method(see below). And yes you are right the Abort is properly not the best solution, however, for some reason the threads are not closed in time in our app, which is 5 seconds according to the crash logs.

/// <summary>
/// Stops the Emitter and the Event Consumer.
/// </summary>
public override void Stop() {
	if (sending) {
		// Stop the emitter sending loop.
		sending = false;
		lock (emitLock) {
			Monitor.Pulse(emitLock);
		}

		// Stops the event consumer.
		consuming = false;
		payloadQueue.Enqueue(null);

		// Cancel threads
		emitThread.Abort();
		payloadConsumer.Abort();
	}
}

Hope it helps and make sense, if not let me know.

Thanks for the information, @dkjepben! While I still couldn't reproduce the exact behavior, I could reproduce having the emitter thread not close properly when app is closed. There is a missing check for whether the emitter is still running in a loop in the emitter thread. If you are interested, you can see PR #47, it's just a one line change. Hopefully it will fix the problem that you are seeing.

Awesome, I will try to test if this fixes the issue in our app. Thank you very much, and will let you know the results.

I can confirm this fixed our issue (and in a better way than my own fix ;)), thank you very much.

Awesome, glad to hear that!

authors: dkjepben matus-tomlein

repo: snowplow/snowplow-unity-tracker


text:
fix multicast binding on Windows

Windows is only able to bind local IP addresses.  This change binds the local IP, and afterwards, it should be added to the multicast group.
There may be a more elegant way to find the local IP, as this one is admittedly pretty ugly.

Also trying to fix this in #39

🤦 Sorry for the dupe.  I saw there had been some changes in the master branch that weren't on PyPI yet, but I didn't even think to check if there was an open PR for the same thing.

I had to punt on this in 6.0.0, I will try to get to it in the next patch release.

authors: ampledata dB-SPL

repo: snstac/pytak


text:
name cancelPorgress has typo

should be cancelProgress

Thanks! I have fixed a typo.

authors: dannygrob soberman

repo: soberman/ARSLineProgress


text:
Can dragging slider update the layer?

Thanks for this nice plugin!
I would like to drag the slider to see the changes, without releasing it. Is it already possible - didn't find it in the docs!

The default control changes the displayed date when you move the slide, and only fires changes when you stop. It uses slide and stop events from jquery UI slider(see jqueryUI slider docs and https://github.com/socib/Leaflet.TimeDimension/blob/master/src/leaflet.timedimension.control.js#L190).
You could extend L.Control.TimeDimension and overwrite _createSlider, to modify the behaviour of slide event (or others).
Here you have an example of extension of the timedimencion control: https://github.com/socib/Leaflet.TimeDimension/blob/master/examples/js/example12.js#L130

nice - thanks a lot! I've just followed this and got it working :) !

L.Control.TimeDimensionCustom = L.Control.TimeDimension.extend({
    _createSlider: function (className, container) {
        var _slider = L.DomUtil.create('a', className, container);
        _slider.href = '#';
        L.DomEvent
                .addListener(_slider, 'click', L.DomEvent.stopPropagation)
                .addListener(_slider, 'click', L.DomEvent.preventDefault);

        _slider.innerHTML = '

';
        var slider = $(_slider).find('.slider');
        var max = this._timeDimension.getAvailableTimes().length - 1;
        slider.slider({
            min: 0,
            max: max,
            range: "min",
            stop: (function (event, ui) {
                this._sliderValueChanged(ui.value);
            }).bind(this),
            slide: (function (event, ui) {
                var date = new Date(this._timeDimension.getAvailableTimes()[ui.value]);
                this._displayDate.innerHTML = this._getDisplayDateFormat(date);

                // update route too
                this._sliderValueChanged(ui.value);
            }).bind(this),
        });
        return slider;
    },
});
map.addControl(new L.Control.TimeDimensionCustom({
    position: 'bottomleft',
    autoPlay: true,
    playerOptions: {
        transitionTime: 200,
        loop: true
    }
}));

I'm a bit untrained with these JavaScript frameworking. Can I avoid copy and pasting the whole method somehow with a super call? Like
var slider = super._createSlider(className, container);
slider.slide = (function (event, ui) {
     this._sliderValueChanged(ui.value);
}).bind(this),
return slider;

Yes, you can do it. It's no as easy as other languages as Python, but you can do:
_superCreateSlider: L.Control.TimeDimension.prototype._createSlider,

_createSlider: function (className, container) {
    var slider = this._superCreateSlider(className, container);
    slider.slide = (function (event, ui) {
         this._sliderValueChanged(ui.value);
    }).bind(this),
    return slider;
},

Thanks! I had to use this slightly modified code now:
L.Control.TimeDimensionCustom = L.Control.TimeDimension.extend({
    _superCreateSlider: L.Control.TimeDimension.prototype._createSlider,
    _createSlider: function (className, container) {
        var that = this;
        var slider = this._superCreateSlider(className, container);
        slider.on("slide", function (event, ui) {
            that._sliderValueChanged(ui.value);
        });
        return slider;
    }
});

As the slide option seems only to work while creation ...

authors: bielfrontera karussell


text:
NOJIRA Fix build

sbt assembly has been failing due to duplicate classfiles from the rojoma-simplearm dependencies. This updates spandex to use one (and only one) version of simple-arm (2.3.0). This change gets sbt
assembly working again.
For manual testing, I ran the whole stack, tested suggestions against an already replicated dataset, and I created a new dataset, forced replication of that dataset, checked that were no errors in the logs, and then successfully executed suggestion requests against that dataset. In other words, I manually tested both the secondary (the index side) and spandex-http (the search side).

[x] styleCheck passes
[x] unit tests pass
[x] integration tests pass
[x] manual tests pass
- [ ] API docs updated

This build looks good.

authors: rlvoyer socrata-jenkins

repo: socrata-platform/spandex


text:
[GCP FileShare Support]  Implement Create Fileshare API for GCP Fileshare Driver

What type of PR is this?

/kind new feature

What this PR does / why we need it: This PR is needed to support File Share Creation for GCP cloud backend.
Which issue(s) this PR fixes:

Fixes #1076
Test Report Added?:

/kind TESTED

Test Report:

The following testing is done for Create File Share API for GCP cloud backend:

[x] Register Backend

[x] List Backend

[x] Create FileShare for GCP Backend

Register a Backend
Example 1: Registering an Azure Backend for File Share
POST http://192.168.20.162:8089/v1/94b280022d0c4401bcf3b0ea85870519/backends
Request:
{
  "name": "gcp-backend-file",
  "type": "gcp-file",
  "Region": "<project_id>",
  "Access": "<access_key>",
  "Security": "<secret_key>"
}

Response:
{
    "id": "5f66397740852a0001bcc3f7",
    "tenantId": "94b280022d0c4401bcf3b0ea85870519",
    "userId": "558057c4256545bd8a307c37464003c9",
    "name": "gcp-backend-file",
    "type": "gcp-file",
    "region": "<project_id>",
    "access": "<access_key>",
    "security": "<secret_key>"
}

List Backend:
GET http://192.168.20.162:8089/v1/94b280022d0c4401bcf3b0ea85870519/backends
Response:
{
    "backends": [
        {
            "id": "5f66397740852a0001bcc3f7",
            "tenantId": "94b280022d0c4401bcf3b0ea85870519",
            "userId": "558057c4256545bd8a307c37464003c9",
            "name": "gcp-backend-file",
            "type": "gcp-file",
            "region": "<project_id>"
        }
    ],
    "next": 1
}

Create a File share
Example 1: Creating File Share for AWS Backend
POST http://192.168.20.162:8089/v1/94b280022d0c4401bcf3b0ea85870519/file/shares
Request:
{
    "name": "gcpfshim",
    "description": "GCP FileShare",
    "backendId": "5f66397740852a0001bcc3f7",
    "availabilityZone": "asia-east1-a",
    "size": 1099511627776,
    "type": "cloudFS",
    "tags": [
      {
        "key": "creator",
        "value": "himanshu"
      }
    ],
    "metadata": {
      "Tier": "STANDARD"
    }
}

Response:
{
    "id": "5f663ac22c7bc100019d2cd6",
    "createdAt": "2020-09-19T22:37:14",
    "updatedAt": "2020-09-19T22:37:14",
    "name": "gcpfshim",
    "description": "GCP FileShare",
    "tenantId": "94b280022d0c4401bcf3b0ea85870519",
    "userId": "558057c4256545bd8a307c37464003c9",
    "backendId": "5f66397740852a0001bcc3f7",
    "backend": "gcp-backend-file",
    "size": 1099511627776,
    "type": "cloudFS",
    "region": "<project_id>",
    "availabilityZone": "asia-east1-a",
    "status": "creating",
    "tags": [
        {
            "key": "creator",
            "value": "himanshu"
        }
    ],
    "metadata": {
        "fields": {
            "Tier": {
                "Kind": {
                    "StringValue": "STANDARD"
                }
            }
        }
    }
}

Special notes for your reviewer:
Since GET Fileshare API for GCP implementation is not included in this PR. Sync Metadata from cloud to DB will break.

Please fix fs naming conventions

If we needs to take the instance name from User input. I can add instance id to metadata. What do you say?

repo: sodafoundation/multi-cloud


text:
Update stack

stack lts-18.0
fix test code

Hi @yoshmiru!
Thanks a lot for your PR. Happy to see that someone's using wai-make-assets.
The PR itself looks great, I'd be happy to merge.
I noticed that the CI configured in this project doesn't work anymore, since travis-ci.org doesn't run builds anymore. I've opened #4 to address that. I think it'd be good to get that merged before making any changes to the project, including merging this PR. Sorry for the inconvenience. Would you be willing to review #4? That'd be great!

I merged #4 and afterwards merged master to your branch. I couldn't push to your branch though, so I made a new PR: #6. That one is also merged. Closing this here now.

Also released to hackage as 0.3.

authors: soenkehahn yoshmiru

repo: soenkehahn/wai-make-assets


text:
Use <time> tag for datetime

adding <time> tag are great for accessibility; i'm willing to open a PR.

@scarf005 PR would be wonderful thank you!

repo: softinio/scalanews


text:
Refactor to align with updated style guide

https://github.com/softlayer/ember-style-guide#defining-functions-to-be-called-when-events-are-triggered

willInsertElement() - https://github.com/softlayer/sl-ember-components/blob/v0.11.0/addon/components/sl-progress-bar.js#L106

Taking this

authors: azizpunjani notmessenger

repo: softlayer/sl-ember-components


text:
Restore original reporter after compilation

In multi-module sbt projects the build system needs its original reporter back between subsequent module compilations.

0.4.0 released, hopefully things will work this time :)

Issue reoccurring with 0.5.0. Project with four modules, scala-clippy as global sbt plugin

@ksilin what's the error you are getting? which version of sbt?

Have been getting a java.lang.ClassCastException: com.softwaremill.clippy.DelegatingReporter cannot be cast to xsbt.DelegatingReporter for quite some time yesterday . However I must have done sth recently and can no longer reproduce it :confused: scala-clippy 0.5.0, sbt 1-SNAPSHOT. Sry for the trouble.

hmm, 1-snapshot, living on the edge :) well if you would have a way to reproduce this we'll certainly take a look :)

authors: adamw kciesielski ksilin

repo: softwaremill/scala-clippy


text:
Extend handshake timeout in AsyncHttpClientCatsBackend

I send a lot of heavy requests and some of them fall due to handshake timed out. Is it possible to extend it?
sttp.client3.SttpClientException$ConnectException: Exception when sending request: GET request
at sttp.client3.SttpClientException$.defaultExceptionToSttpClientException(SttpClientException.scala:35)
at sttp.client3.asynchttpclient.AsyncHttpClientBackend.$anonfun$adjustExceptions$1(AsyncHttpClientBackend.scala:227)
at sttp.client3.SttpClientException$$anonfun$adjustExceptions$1.applyOrElse(SttpClientException.scala:59)
at sttp.client3.SttpClientException$$anonfun$adjustExceptions$1.applyOrElse(SttpClientException.scala:58)
at cats.ApplicativeError.$anonfun$recoverWith$1(ApplicativeError.scala:130)
at delay @ sttp.client3.impl.cats.CatsMonadAsyncError.$anonfun$async$1(CatsMonadAsyncError.scala:10)
at map @ sttp.client3.impl.cats.CatsMonadAsyncError.$anonfun$async$1(CatsMonadAsyncError.scala:10)
at async @ sttp.client3.impl.cats.CatsMonadAsyncError.async(CatsMonadAsyncError.scala:10)
at flatten @ sttp.client3.impl.cats.CatsMonadError.flatten(CatsMonadError.scala:21)
at map @ sttp.client3.impl.cats.CatsMonadError.map(CatsMonadError.scala:9)
at flatMap @ sttp.client3.impl.cats.CatsMonadError.flatMap(CatsMonadError.scala:12)
at recoverWith @ sttp.client3.impl.cats.CatsMonadError.handleWrappedError(CatsMonadError.scala:17)
at flatMap @ sttp.client3.impl.cats.CatsMonadError.flatMap(CatsMonadError.scala:12)
at map @ sttp.client3.impl.cats.CatsMonadError.map(CatsMonadError.scala:9)
at map @ sttp.client3.impl.cats.CatsMonadError.map(CatsMonadError.scala:9)
at parTraverse$extension @ com.traveltime.threescale.api.ApplicationApi.$anonfun$getAllApplicationsMetrics$1(ApplicationApi.scala:41)
at parTraverse$extension @ com.traveltime.threescale.api.ApplicationApi.$anonfun$getAllApplicationsMetrics$1(ApplicationApi.scala:41)
Caused by: java.net.ConnectException: handshake timed out after 10000ms
at org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:179)
at org.asynchttpclient.netty.channel.NettyConnectListener$1.onFailure(NettyConnectListener.java:151)
at org.asynchttpclient.netty.SimpleFutureListener.operationComplete(SimpleFutureListener.java:26)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117)
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2090)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
... 12 more
Caused by: io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 10000ms
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2087)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

I can see you are using the async-http-client backend. The timeout can be configured over there - use e.g. AsyncHttpClientCatsBackend.resourceUsingConfigBuilder(updateConfig = _.setHandshakeTimeout(...))

authors: adamw danielnaumau

repo: softwaremill/sttp


text:
تفاوت بین Asynchronous و Multi-Threading

نام و نام‌خانوادگی شما
userFullName: "Amir Mokarchi"
عنوان محتوا
postTitle: "تفاوت بین Asynchronous و Multi-Threading"
خلاصه‌ای حداکثر ۲ الی ۳ خطی درباره مضمون محتوا
postDescription: "    انتخاب بین دو مدل برنامه‌نویسی به طور عمده به performance بستگی دارد."
لینک محتوا
postLink: "https://vrgl.ir/zetYG"

ضمن تشکر در #207 پیشنهادی در این خصوص مطرح شد

authors: Hameds mokarchi

repo: softwaretalks/newsletter


text:
发送post请求崩溃

代码是参考tutorial-01-wget.cc写的

你调get_parsed_body，size是不是传了个nullptr？

解决了，通过HttpChunkCursor方式获取数据就行了

get_parsed_body应该也是正常的才对啊。你原来代码是怎么写的？

authors: Barenboim coderwxl

repo: sogou/workflow


text:
通过workflow实现转发功能的问题

服务器A-->转发服务器(workflow实现)--->服务器B(workflow实现)，要求B的vitrual CommConnection* new_connection(int accept_fd)函数中能读取到A的ip，可以实现么？

楠楠同学，我先指出一下你这个问题本身的问题哈。提issue的时候，最好直接说明你的实际需求，而不是说你试图解决的方案。你可以先参考一下这个XY problem：http://xyproblem.info

简单的说一下应用场景：A服务器通过代理服务器发消息给服务器B，B服务器需要根据A的IP来判断是否可以访问。只有B服务器有服务器白名单IP的列表。代理服务器怎么使用workflow实现，来让B能识别A的ip。

你肯定没有办法通过proxy和B的连接fd，取得A的IP地址的。所以这事并不能通过实现B的new_connection虚函数来实现。而且通过new_connection实现的话，只能简单在断开连接，proxy也无法知道B是什么原因不接受请求。
我觉得可以在proxy的process里，把A的地址拿出来，放到http header里转给B：
void proxy_process(WFHttpTask *task)
{
    struct sockaddr_storage ss;
    socklen_t addrlen = sizeof *ss;
    if (task->get_peer_addr(&ss, &addrlen) == 0)
    {
        //add a header;
    }
}

B如果在header里发现来源IP不是白名单，返回一个403之类的响应。如果做得细一点，proxy可以记录下来这个IP是被禁止的，这样proxy可以实现new_connection直接拒绝这个IP的下一次连接，或者下次直接给这个IP返回403

感觉谢爷的回答。首先**“proxy可以记录下来这个IP是被禁止的，这样proxy可以实现new_connection直接拒绝这个IP的下一次连接”**这个是不可以的，B的白名单的变化频率非常的高，如果这么做，需要涉及B和proxy白名单数据一致性的问题，会增加整个问题的复杂度。


text:
Monitor availability over time

The link liveliness checker implements the checking of links in metadata and the storage of the results of these checks in the SWR database.
To provide useful status info and monitoring, the liveliness checker should be operationalised as a process and the results need to be translated to end user visualisation, for now through the catalogue UI.
Definition of Done

[ ] Decisions on the design of the operational workflow and management (include in scheduled task, delete outdated history records) and monitoring (e.g. desired visualisation)
[ ] Operationalisation of the liveliness checker as part of the workflow (backend)
[ ] Implement a call that can be used to retrieve/translate the status of a link for monitoring
[ ] Adapt UI to show monitoring results

Issue description updated based on a discussion with @pvgenuchten

authors: pvgenuchten roblokers

repo: soilwise-he/link-liveliness-assessment


text:
token-cli: finish client conversion

this will be the last pr for converting the token cli to use the token client for everything. we will convert:

~transfer~
~create multisig~
~enable/disable transfer memo~
~set interest rate~
~gc~

closes #3482

the most recent push fixes the comment thread i marked resolved re: close authority in gc. unfortunately the behavior is somewhat more restricted than before. previously, it would attempt to transfer tokens out of accounts with separate close authority, but leave them open. now, it leaves them untouched
i drafted the logic for this and it made me somewhat queasy, so rather than wandering into the weeds and implementing it, ill wait for your review
            match (close_authority == owner, is_associated, amount == 0) {
                // owner authority, associated or auxiliary, empty -> close
                // owner authority, auxiliary, nonempty -> empty and close
                // separate authority, auxiliary, nonempty -> transfer
                // separate authority, associated or auxiliary, empty -> print warning
                // anything else, including a nonempty associated account -> unreachable
            }

because, see, i could do this. but what i might like better is to have it revoke the close authority and close the damn account. personally i find it very strange that setting close authority makes the owner unable to close the account, because having no close authority doesnt make the account uncloseable. but, on the other hand, this makes the logic even more complicated. and thats not even getting into the thought i had to gate authority revocation behind another cli flag...
anyway, the options are:

leave gc as-is, ignore noncloseable accounts entirely
impl the logic in the code block, replicate the previous transfer behavior
remove close authority and close the account, either unconditionally or behind a flag, either as its own transaction or by modifying the client more

i think i want to do 2 and let the user mess around with close authority on their own time, i dont think its that commonly used a feature

nevermind, writing the previous comment was enough to convince me i was right, so i implemented 2. i hope when youre back this saga is more amusing than confusing

re: close authority once again, today i learned an account owner cant even remove close authority from it! this feels wrong. nevertheless it means 3 was impossible anyway so 2 is the correct flow

alright i think i addressed everything! lmk if theres anything i missed or anything else

repo: solana-labs/solana-program-library


text:
on  ajoute le crh token

Please note: This repository is being rebuilt to accept the new volume of token additions and modifications. PR merges will be delayed.

I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
This repository is managed using an auto merge action. Please ensure your PR has no deleted lines, and it will be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Auto merge requirements
Your pull request will be automatically merged if the following conditions are met:

Your pull request only adds new tokens to the list. Any modification to existing
tokens will require manual review to prevent unwanted modifications.

Your pull request does not touch unrelated code. In particular, reformatting changes to unrelated
code will cause the auto merge to reject your PR.

Any asset files added correspond to the token address you are adding. Asset files
must be PNG, JPG or SVG files.

Your change is valid JSON and conforms to the schema. If your change failed validation,
read the error message carefully and update your PR accordingly.

No other tokens shares the same name, symbol or address.

For example, this change would be rejected due to unrelated changes:

The bot runs every 60 minutes and bulk-merges all open pull requests to prevent conflicts.
This means that you need to wait up to 60 minutes for your pull request to be merged or reprocessed.

approval

repo: solana-labs/token-list


text:
adding rum and sealz tokens

Please note: This repository is being rebuilt to accept the new volume of token additions and modifications. PR merges will be delayed.

I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
This repository is managed using an auto merge action. Please ensure your PR has no deleted lines, and it will be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Auto merge requirements
Your pull request will be automatically merged if the following conditions are met:

Your pull request only adds new tokens to the list. Any modification to existing
tokens will require manual review to prevent unwanted modifications.

Your pull request does not touch unrelated code. In particular, reformatting changes to unrelated
code will cause the auto merge to reject your PR.

Any asset files added correspond to the token address you are adding. Asset files
must be PNG, JPG or SVG files.

Your change is valid JSON and conforms to the schema. If your change failed validation,
read the error message carefully and update your PR accordingly.

No other tokens shares the same name, symbol or address.

For example, this change would be rejected due to unrelated changes:

The bot runs every 60 minutes and bulk-merges all open pull requests to prevent conflicts.
This means that you need to wait up to 60 minutes for your pull request to be merged or reprocessed.

I can help stop wasting your time refer this
zakimzf/profile#1

authors: danvisser zakimzf


text:
CAC

Please note: This repository is being rebuilt to accept the new volume of token additions and modifications. PR merges will be delayed.

I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
This repository is managed using an auto merge action. Please ensure your PR has no deleted lines, and it will be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Auto merge requirements
Your pull request will be automatically merged if the following conditions are met:

Your pull request only adds new tokens to the list. Any modification to existing
tokens will require manual review to prevent unwanted modifications.

Your pull request does not touch unrelated code. In particular, reformatting changes to unrelated
code will cause the auto merge to reject your PR.

Any asset files added correspond to the token address you are adding. Asset files
must be PNG, JPG or SVG files.

Your change is valid JSON and conforms to the schema. If your change failed validation,
read the error message carefully and update your PR accordingly.

No other tokens shares the same name, symbol or address.

For example, this change would be rejected due to unrelated changes:

The bot runs every 60 minutes and bulk-merges all open pull requests to prevent conflicts.
This means that you need to wait up to 60 minutes for your pull request to be merged or reprocessed.

added in https://github.com/solana-labs/token-list/pull/12748

authors: Fiverr-Coin-Hunter keone


text:
Updating existing: Description change because old too long

Manual inspection needed. Updating existing token description, because old one was too long

Will leave this open as instructed in cases when updating existing description


text:
Add ZI Token

I agree to not ping anybody on Discord/Twitter/email about this pull request. Instead I will inquire by posting a new comment in the pull request if needed.

PRs are reviewed in bulk and and can take up to two weeks to be merged.
Please provide the following information for your token.
Please include change to the src/tokens/solana.tokenlist.json file in the PR.
DON'T modify any other token on the list.
At minimum each entry should have

Token Address:
Token Name:
Token Symbol:
Logo: (logo should be uploaded under assets/mainnet//*.<png/svg>)
Link to the official homepage of token:
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

Hi, may I know when I will be merged?


text:
Pkgconfig: Set the correct nodeschemapath.

The old file does not exist anymore.

+2

+2 (now with Signed-Off-by ;)

Merged.

authors: anselmolsm cabelitos ibriano

repo: solettaproject/soletta


text:
single & multi-select drop down list

Refer to https://github.com/solidify/jira-azuredevops-migrator/issues/40#issuecomment-482722481 and previous comment. I haven't seen any further actions on this topic. What I'd like to see is single & multi-select drop down lists, similar to https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-extensions-multivalue-control. Thanks for the good work up to now.
AB#5937

Hi, Would like this feature, any progress? Cheers

Any update on the multi-select drop down list

No, and we will probably not prioritize functionality outside of the Core ADO features for now :)

If it's not planning now, is there any option of  customizing it by own.
Pls share thought of how we can customize by self to own project, as in my project migration the multi select field is must to migrate it.

Migrate the raw data to a text field and then bulk copy (+transform) the contents of that field to your custom field? You may need a custom script solution if you cannot use ADO Queries

authors: Alexander-Hjelm AmarnathReddyN RoyalWulf gecon27

repo: solidify/jira-azuredevops-migrator


text:
Updating to monaco 0.31+ seems to break the typings...

I tried to update the monaco-editor dependency to the latest (0.31.1) but it seems to break the custom typings we setup in the setupSolid.tsx file.
I did check their CHANGELOG.md but couldn't really pin point.
If anyone is willing to investigate, I'd be more than grateful, this stuff is way beyond me.
(cc @modderme123)

I believe we are running into https://github.com/microsoft/monaco-editor/issues/2841

repo: solidjs/solid-playground


text:
Move Attribute accessor-definition responsibility into Virtus::AttributeAccessor

@solnic
I wanted to ask for early feedback before investing the time, so I didn't move the tests yet.
That said, what do you think of this approach?

@emmanuel in general I'm totally in favor of moving the responsibility of adding the accessors to the attribute module. I had a couple of small points which I added within the commits, but overall I think this is awesome.

I feel like there's pretty good coverage of attribute method behavior already present in spec/integration/virtus/class_methods/attribute_spec.rb.
The prior implementation (dynamically adding a module nested under the class as self::AttributeMethods) was not directly specified, and this seems like only a slight variation on that theme.

@dkubb — I hear what you're saying about the previous AttributeAccessor implementation needing too much internal knowledge of Attribute, and the violation of "Tell, Don't Ask" that results.
I just pushed a double-dispatch version. It splits the responsibility more finely, and I think it reasonably balances "Tell Don't Ask" with SRP (method definition/module mutation not being the single responsibility of Attribute).
What do you think about this approach?

@emmanuel this is really good. The attribute almost uses the AttributesAccessor as a builder, and gives it just enough information to create the methods. I know this is a spike, but I would bet this is closer to what TDD would nudge you towards; it seems like this is going to be way easier to test.
Should Attribute have a #define_attribute_accessor method, and then be responsible for calling AttributesAccessor#define_attribute_accessor inside ClassMethods#attribute ? That way, other than setting up the attribute module, nothing besides Attribute uses it directly. That seems a bit cleaner than spreading out that knowledge amongst multiple classes.

@emmanuel Your code fails in case you create an attribute on a descendant of the class virtus was included into. You have to make sure a instance of the AttributesAccessor is initialized and includes the methods from parent.

@mbj — Thanks!
There wasn't a test covering the case of defining an attribute in a descendant, so I added a spec and fixed the implementation.

And the plot thickens... /cc @solnic, @dkubb, @mbj
It turns out that the implementation on master has what looks to me like a bug: adding an attribute to a descendant whose superclass has at least one attribute will cause the descendant's attribute methods to be available on the superclass. I assume that defining an attribute in a descendant should not alter that descendant's superclass.
This happens because there is a single module defined as a nested constant of the class that extends Virtus::ClassMethods. Descendants of that class do not get a separate module, so adding an attribute to a descendant adds attribute accessor methods to the descendant's superclasses, up to the class that extends Virtus::ClassMethods. The self::AttributeMethods module is acting similarly to a class variable (ie, akin to @@attribute_methods).
The last commit here finally captures this issue in a spec. This spec fails on master (for the reasons described above) and passes on this fork (since each subclass gets its own attributes methods module).
I see one potential issue with the implementation I've included: I wrote this such that descendants will define and include their own private attribute accessor methods module when they receive their first call to ClassMethods#attribute. This means that the ordering of the descendants ancestors could be dependent on when attribute is called, which may be a problem. One alternative implementation would be to implement ClassMethods#inherited and have the descendant include its attribute accessor methods module in there (instead of in ClassMethods#attribute).

@emmanuel I would tend to want to define things using an #inherited hook because the process can become explicit instead of whenever the memoized method is called.
In Veritas I strongly veered away from the @ivar ||= init_something convention towards setting things up in an explicit initialization step (usually #initialize for objects). The only case I was using memoization was with "pure functions".

OK, I think this patch is in a pretty good state at this point.
I've YARDoc'd the methods I just added, thought rake ci still fails, complaining that YARD coverage is at 99.2%, which is shy of the 100% threshold. I can't find what is missing YARDoc coverage.
Let me know if there's anything else I should do to improve this!
/cc @solnic, @dkubb

YARDoc is back to 100%, and I was able to reduce the Flay threshold and total score. Reek complains of some smells, but they 1) look like false positives to me, and 2) the reported smells reference existing code that was not touched in this fork. Flay and Roodi both seem to pass, but I'm not familiar with them, so I don't know for certain that silence is success.
In other words, I think this is ready to be merged: it provides a slightly improved implementation and resolves a subtle bug relative to the current mainline.
Who's going to merge this in? :)

@emmanuel thanks man, I'll be catching up during the xmas break...!

@solnic — awesome, thanks!

authors: dkubb emmanuel mbj solnic

repo: solnic/virtus


text:
intermittent issue with LabeledPatientTask.add_event when calling femr.models.transformer.compute_features

Describe the bug
add_event fails with an assertion error ("We have labels that appear to be before birth?") when calling femr.models.transformer.compute_features using labels created for all patients + events in a dataset.
Steps to reproduce the bug
# Sample code to reproduce the bug

I cannot share the dataset. The events in the dataset include all of the dates in the test labels.
The following code snippet raises the assertion error:
import datetime

test_labels = [
    {'patient_id': 1, 'prediction_time': datetime.datetime(1956, 8, 20, 0, 0), 'boolean_value': False},
    {'patient_id': 1, 'prediction_time': datetime.datetime(1994, 3, 23, 0, 0), 'boolean_value': False},
    {'patient_id': 1, 'prediction_time': datetime.datetime(2019, 1, 11, 0, 0), 'boolean_value': False},
]

features = femr.models.transformer.compute_features(test_dataset,os.path.join(TARGET_DIR, "motor_model"), test_labels, num_proc=4, tokens_per_batch=128, ontology=None)

However, if we change the third label prediction time to an earlier date, then this assertion error is not raised. The following code snippet runs without error:
import datetime

test_labels = [
    {'patient_id': 1, 'prediction_time': datetime.datetime(1956, 8, 20, 0, 0), 'boolean_value': False},
    {'patient_id': 1, 'prediction_time': datetime.datetime(1994, 3, 23, 0, 0), 'boolean_value': False},
    {'patient_id': 1, 'prediction_time': datetime.datetime(1997, 1, 11, 0, 0), 'boolean_value': False},
]

features = femr.models.transformer.compute_features(test_dataset,os.path.join(TARGET_DIR, "motor_model"), test_labels, num_proc=4, tokens_per_batch=128, ontology=None)

Expected results
the code above should create the object features without raising an assertion error
Actual results
Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-dc9f0838-a900-4b8d-b5e3-8aacc4a713f0/lib/python3.10/site-packages/datasets/builder.py", line 1726, in _prepare_split_single
    for key, record in generator:
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-dc9f0838-a900-4b8d-b5e3-8aacc4a713f0/lib/python3.10/site-packages/datasets/packaged_modules/generator/generator.py", line 30, in _generate_examples
    for idx, ex in enumerate(self.config.generator(**gen_kwargs)):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-dc9f0838-a900-4b8d-b5e3-8aacc4a713f0/lib/python3.10/site-packages/femr/models/processor.py", line 204, in _batch_generator
    creator.add_patient(dataset[patient_index.item()], offset, length)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-dc9f0838-a900-4b8d-b5e3-8aacc4a713f0/lib/python3.10/site-packages/femr/models/processor.py", line 127, in add_patient
    num_added = self.task.add_event(last_time, event["time"], features)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-dc9f0838-a900-4b8d-b5e3-8aacc4a713f0/lib/python3.10/site-packages/femr/models/tasks.py", line 101, in add_event
    assert is_valid, (
AssertionError: We have labels that appear to be before birth? 1 {'prediction_time': datetime.datetime(1956, 8, 20, 0, 0), 'boolean_value': False} 2017-05-15 00:00:00 2017-05-24 00:00:00

Environment info

datasets version: 2.16.1
Platform: Linux-5.15.0-1053-azure-x86_64-with-glibc2.35
Python version: 3.10.12
huggingface_hub version: 0.20.2
PyArrow version: 14.0.2
Pandas version: 1.5.3
fsspec version: 2023.6.0

This was discussed offline and appears to be fixed now.

authors: EthanSteinberg duncanmcelfresh

repo: som-shahlab/femr


text:
Clear entity cache to prevent memory leak

Subject
I am targeting this branch, because this is a bug fix. The issue and the fix is the same as in https://github.com/sonata-project/EntityAuditBundle/pull/543.
Changelog
### Fixed
- Clear entity cache to prevent memory leak

Thanks

Yep, everything is ready for a release as far as I'm concerned.

repo: sonata-project/EntityAuditBundle


text:
允许批量调整用户、用户组，渠道、渠道组

允许批量调整用户、用户组，渠道、渠道组

重复 #153

repo: songquanpeng/one-api


text:
[Comb] Change CheckAllInterfaceUpOverGnmi function to CheckAllInterfaceOperStateOverGnmi.BERT test.

PR Description:
Change CheckAllInterfaceUpOverGnmi function to CheckAllInterfaceOperStateOverGnmi.BERT test.
Keyword Check:
bibhuprasad@eonms7vm1:~/Sonic_06_06_2024/sonic-buildimage/src/sonic-p4rt/sonic-pins$ ~/keyword_checks.sh .
Keyword check Passed.
Build Results:
bibhuprasad@bb37b62b1ae4:/sonic/src/sonic-p4rt/sonic-pins$ bazel build $BAZEL_BUILD_OPTS ...
INFO: Analyzed 367 targets (0 packages loaded, 0 targets configured).
INFO: Found 367 targets...
INFO: Elapsed time: 0.658s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
bibhuprasad@bb37b62b1ae4:/sonic/src/sonic-p4rt/sonic-pins$
UT Results:
bibhuprasad@bb37b62b1ae4:/sonic/src/sonic-p4rt/sonic-pins$ bazel test $BAZEL_BUILD_OPTS --cache_test_results=no ...
INFO: Analyzed 367 targets (0 packages loaded, 1 target configured).
INFO: Found 241 targets and 126 test targets...
INFO: Elapsed time: 90.630s, Critical Path: 16.36s
INFO: 131 processes: 138 linux-sandbox, 17 local.
INFO: Build completed successfully, 131 total actions
//gutil:collections_test                                                 PASSED in 0.5s
//gutil:io_test                                                          PASSED in 0.5s
//gutil:proto_matchers_test                                              PASSED in 0.6s
//gutil:proto_ordering_test                                              PASSED in 0.6s
//gutil:proto_test                                                       PASSED in 0.5s
//gutil:status_matchers_test                                             PASSED in 0.5s
//gutil:test_artifact_writer_test                                        PASSED in 0.6s
//gutil:testing_test                                                     PASSED in 0.5s
//gutil:version_test                                                     PASSED in 0.8s
//lib/gnmi:gnmi_helper_test                                              PASSED in 0.8s
//lib/gnoi:gnoi_helper_test                                              PASSED in 0.5s
//lib/utils:json_utils_test                                              PASSED in 0.0s
//lib/validator:validator_backend_test                                   PASSED in 0.5s
//p4_fuzzer:constraints_util_integration_test                            PASSED in 0.7s
//p4_fuzzer:fuzz_util_test                                               PASSED in 0.6s
//p4_fuzzer:fuzzer_showcase_test                                         PASSED in 0.8s
//p4_fuzzer:switch_state_test                                            PASSED in 0.6s
//p4_fuzzer:table_entry_key_test                                         PASSED in 0.1s
//p4_pdpi:built_ins_test                                                 PASSED in 0.5s
//p4_pdpi:entity_keys_test                                               PASSED in 0.5s
//p4_pdpi:ir_tools_test                                                  PASSED in 0.7s
//p4_pdpi:p4_runtime_matchers_test                                       PASSED in 0.6s
//p4_pdpi:reference_annotations_test                                     PASSED in 0.7s
//p4_pdpi:sequencing_util_test                                           PASSED in 0.6s
//p4_pdpi/netaddr:ipv4_address_and_network_address_test                  PASSED in 0.5s
//p4_pdpi/netaddr:ipv6_address_test                                      PASSED in 0.5s
//p4_pdpi/netaddr:mac_address_test                                       PASSED in 0.5s
//p4_pdpi/packetlib:packetlib_fuzzer_test                                PASSED in 16.3s
//p4_pdpi/packetlib:packetlib_matchers_test                              PASSED in 0.5s
//p4_pdpi/packetlib:packetlib_test                                       PASSED in 0.1s
//p4_pdpi/packetlib:packetlib_test_runner                                PASSED in 0.1s
//p4_pdpi/packetlib:packetlib_unit_test                                  PASSED in 1.3s
//p4_pdpi/string_encodings:bit_string_test                               PASSED in 0.5s
//p4_pdpi/string_encodings:byte_string_test                              PASSED in 0.5s
//p4_pdpi/string_encodings:decimal_string_test                           PASSED in 0.0s
//p4_pdpi/string_encodings:decimal_string_test_runner                    PASSED in 0.0s
//p4_pdpi/string_encodings:hex_string_test                               PASSED in 0.0s
//p4_pdpi/string_encodings:hex_string_test_runner                        PASSED in 0.0s
//p4_pdpi/string_encodings:readable_byte_string_test                     PASSED in 0.5s
//p4_pdpi/testing:helper_function_test                                   PASSED in 0.6s
//p4_pdpi/testing:info_test                                              PASSED in 0.1s
//p4_pdpi/testing:info_test_runner                                       PASSED in 0.1s
//p4_pdpi/testing:main_pd_test                                           PASSED in 0.0s
//p4_pdpi/testing:mock_p4_runtime_server_test                            PASSED in 1.6s
//p4_pdpi/testing:packet_io_test                                         PASSED in 0.1s
//p4_pdpi/testing:packet_io_test_runner                                  PASSED in 0.1s
//p4_pdpi/testing:rpc_test                                               PASSED in 0.1s
//p4_pdpi/testing:rpc_test_runner                                        PASSED in 0.1s
//p4_pdpi/testing:sequencing_test                                        PASSED in 0.1s
//p4_pdpi/testing:sequencing_test_runner                                 PASSED in 0.1s
//p4_pdpi/testing:sequencing_util_test                                   PASSED in 0.1s
//p4_pdpi/testing:sequencing_util_test_runner                            PASSED in 0.1s
//p4_pdpi/testing:table_entry_gunit_test                                 PASSED in 0.8s
//p4_pdpi/testing:table_entry_test                                       PASSED in 0.1s
//p4_pdpi/testing:table_entry_test_runner                                PASSED in 0.1s
//p4_pdpi/utils:annotation_parser_test                                   PASSED in 0.5s
//p4_pdpi/utils:ir_test                                                  PASSED in 0.6s
//p4rt_app/event_monitoring:app_state_db_port_table_event_test           PASSED in 0.9s
//p4rt_app/event_monitoring:app_state_db_send_to_ingress_port_table_event_test PASSED in 0.9s
//p4rt_app/event_monitoring:config_db_cpu_queue_table_event_test         PASSED in 0.9s
//p4rt_app/event_monitoring:config_db_node_cfg_table_event_test          PASSED in 0.9s
//p4rt_app/event_monitoring:config_db_port_table_event_test              PASSED in 0.9s
//p4rt_app/event_monitoring:debug_data_dump_events_test                  PASSED in 0.9s
//p4rt_app/event_monitoring:state_verification_events_test               PASSED in 1.0s
//p4rt_app/p4runtime:cpu_queue_translator_test                           PASSED in 0.5s
//p4rt_app/p4runtime:ir_translation_test                                 PASSED in 0.7s
//p4rt_app/p4runtime:p4info_verification_schema_test                     PASSED in 0.7s
//p4rt_app/p4runtime:p4info_verification_test                            PASSED in 0.9s
//p4rt_app/p4runtime:packetio_helpers_test                               PASSED in 0.9s
//p4rt_app/p4runtime:resource_utilization_test                           PASSED in 0.8s
//p4rt_app/sonic:app_db_acl_def_table_manager_test                       PASSED in 0.7s
//p4rt_app/sonic:app_db_manager_test                                     PASSED in 0.8s
//p4rt_app/sonic:app_db_to_pdpi_ir_translator_test                       PASSED in 0.7s
//p4rt_app/sonic:hashing_test                                            PASSED in 0.7s
//p4rt_app/sonic:packet_replication_entry_translation_test               PASSED in 0.7s
//p4rt_app/sonic:packetio_impl_test                                      PASSED in 0.6s
//p4rt_app/sonic:packetio_port_test                                      PASSED in 0.6s
//p4rt_app/sonic:response_handler_test                                   PASSED in 0.7s
//p4rt_app/sonic:state_verification_test                                 PASSED in 0.6s
//p4rt_app/sonic:vrf_entry_translation_test                              PASSED in 0.7s
//p4rt_app/sonic/adapters:fake_sonic_db_table_test                       PASSED in 0.1s
//p4rt_app/tests:acl_table_test                                          PASSED in 1.4s
//p4rt_app/tests:action_set_test                                         PASSED in 1.2s
//p4rt_app/tests:api_access_test                                         PASSED in 1.2s
//p4rt_app/tests:arbitration_test                                        PASSED in 1.3s
//p4rt_app/tests:cpu_queue_name_and_id_test                              PASSED in 2.9s
//p4rt_app/tests:debug_data_dump_test                                    PASSED in 1.1s
//p4rt_app/tests:fixed_l3_tables_test                                    PASSED in 3.5s
//p4rt_app/tests:forwarding_pipeline_config_test                         PASSED in 5.6s
//p4rt_app/tests:grpc_behavior_test                                      PASSED in 5.4s
//p4rt_app/tests:p4_constraints_test                                     PASSED in 0.2s
//p4rt_app/tests:p4_constraints_test_runner                              PASSED in 0.4s
//p4rt_app/tests:p4_programs_test                                        PASSED in 2.0s
//p4rt_app/tests:packetio_test                                           PASSED in 4.0s
//p4rt_app/tests:port_name_and_id_test                                   PASSED in 3.2s
//p4rt_app/tests:resource_limits_test                                    PASSED in 2.9s
//p4rt_app/tests:response_path_test                                      PASSED in 4.0s
//p4rt_app/tests:role_test                                               PASSED in 1.3s
//p4rt_app/tests:state_verification_test                                 PASSED in 2.2s
//p4rt_app/tests:vrf_table_test                                          PASSED in 1.9s
//p4rt_app/tests/lib:app_db_entry_builder_test                           PASSED in 0.0s
//p4rt_app/utils:event_data_tracker_test                                 PASSED in 0.0s
//p4rt_app/utils:table_utility_test                                      PASSED in 0.7s
//sai_p4/instantiations/google:clos_stage_test                           PASSED in 0.5s
//sai_p4/instantiations/google:fabric_border_router_p4info_up_to_date_test PASSED in 0.0s
//sai_p4/instantiations/google:middleblock_p4info_up_to_date_test        PASSED in 0.0s
//sai_p4/instantiations/google:sai_p4info_fetcher_test                   PASSED in 0.7s
//sai_p4/instantiations/google:sai_p4info_test                           PASSED in 0.9s
//sai_p4/instantiations/google:sai_pd_proto_test                         PASSED in 0.0s
//sai_p4/instantiations/google:sai_pd_util_test                          PASSED in 0.5s
//sai_p4/instantiations/google:tor_p4info_up_to_date_test                PASSED in 0.0s
//sai_p4/instantiations/google:union_p4info_up_to_date_test              PASSED in 0.1s
//sai_p4/instantiations/google:wbb_p4info_up_to_date_test                PASSED in 0.0s
//sai_p4/instantiations/google/test_tools:table_entry_generator_helper_test PASSED in 1.2s
//sai_p4/instantiations/google/test_tools:test_entries_test              PASSED in 0.8s
//sai_p4/instantiations/google/tests:p4_constraints_integration_test     PASSED in 0.8s
//sai_p4/tools:p4info_tools_test                                         PASSED in 0.5s
//sai_p4/tools:packetio_tools_test                                       PASSED in 0.7s
//thinkit:bazel_test_environment_test                                    PASSED in 0.5s
//thinkit:mock_control_interface_test                                    PASSED in 0.5s
//thinkit:mock_generic_testbed_test                                      PASSED in 0.6s
//thinkit:mock_mirror_testbed_test                                       PASSED in 0.6s
//thinkit:mock_ssh_client_test                                           PASSED in 0.0s
//thinkit:mock_switch_test                                               PASSED in 0.6s
//thinkit:mock_test_environment_test                                     PASSED in 0.1s
//sai_p4/instantiations/google/test_tools:table_entry_generator_test     PASSED in 2.4s
Stats over 5 runs: max = 2.4s, min = 0.9s, avg = 1.8s, dev = 0.6s
Executed 126 out of 126 tests: 126 tests pass.
INFO: Build completed successfully, 131 total actions
bibhuprasad@bb37b62b1ae4:/sonic/src/sonic-p4rt/sonic-pins$

Co-authored-by: Srikishen Pondicherry Shanmugam kishanps@google.com

repo: sonic-net/sonic-pins


text:
Are Sonyflakes strings always guaranteed to be in order and the same length?

Hi!
We would like to know if sonyflakes generated from now are a guaranteed sort order and if not then when is the next time that length will change. We have noticed an issue in our database where our sort order is being ill-computed based on that we sometimes store sonyflakes as strings. Could you kindly affirm whether the length of a sonyflake string can change? Or is there a guaranteed length.
In particular the following algorithm...
l = [
    "1",
    "9999",
    "2",
    "10000",
    "3",
    "4",
    "999",
    "6",
    "7",
    "8",
    "9",
    "5",
    "10",
    "100",
    "1000",
    "90",
]

print(l)
l.sort()
print(l)

Shows that say the number 2 > 1000000000000000 when doing string comparison. I would like to know how Sonyflakes generated reliably are affected by this as the impact of this could affect the sort ordering for some production data (may require migration). Due to the algorithmic complexity of the Sonyflake and how its generated (sonyflakes are always the same length I believe) I'm not sure if we would be impacted by this in the near future.
Go example
package main

import (
    "fmt"
    "sort"
)

func main() {
    sl := []string{"1", "9999", "2", "10000", "3", "4", "999", "6", "7", "8", "9", "5", "10", "100", "1000", "90"}
    fmt.Println(sl)
    sort.Strings(sl)
    fmt.Println(sl)
}

I appreciate that this is not your concern and represents a mistake made in our systems, however I would appreciate any help on the matter. It would be helpful if I can run unit tests locally to generate snowflake now to the range generate one years in the future, but I have no idea how to adjust the snowflake without changing my system time like this. Appreciate the easiest way to diagnose the impact!

Hi,
Sonyflake guarantees the uniqueness of its generated IDs. But its order is not always time order if you use multiple machine IDs. As you know, if you convert Sonyflake IDs, which are originally uint64, to strings, its order is not time order but lexical order.
I think Sonyflake is not suitable for time-order guarantee.　But you can guarantee time order if you use Sonyflake under the following constraints:

using a single machine ID
padding with zeros when you convert Sonyflake IDs to strings like "0000...002"

@YoshiyukiMineo Thank you for getting back. The configuration we use for the Sonyflake is as follows... sonyflake.NewSonyflake(sonyflake.Settings{})This has reliably generated new Sonyflakes in, roughly, order of unit time. This might be improper usage but it has worked thus far. Since the machine ID isn't being set am I correct to understand the reason this is consistent is the machine ID is always a calculation of the constants
	BitLenTime      = 39                               // bit length of time
	BitLenSequence  = 8                                // bit length of sequence number
	BitLenMachineID = 63 - BitLenTime - BitLenSequence // bit length of machine id

So 16. Which means that all machine IDs have been a single "constant" machine ID up to now.

authors: YoshiyukiMineo mmacheerpuppy

repo: sony/sonyflake


text:
Spatial Average Pooling has same implementation for pooling and unpooling?

Is this intended?
class S_AvgPool(nn.Module):
    def __init__(self):
        super(S_AvgPool, self).__init__()

    def forward(self, x, M):
        x = torch.einsum('nctv,vw->nctw', x, M)
        return x.contiguous()

class S_AvgUnpool(nn.Module):
    def __init__(self):
        super(S_AvgUnpool, self).__init__()

    def forward(self, x, M):
        x = torch.einsum('nctv,vw->nctw', x, M)
        return x.contiguous()

It is implemented in this manner just for maintaining consistency with the temporal pooling/unpooling methods, even if both methods require the same operation.

I see, otherwise you would have to name it AvgPoolOrUnpool, which would be confusing to read. This way you can see the intension while reading the code.

authors: joverwey soomean

repo: soomean/Diverse-Motion-Stylization