text:
Implementing custom authentication middleware.

I haven't been able to find a lot of information on this topic so everything I've learned has been from reading the source for the cookie authentication middleware. The middleware is written and works great except for failure cases. Returning AuthenticateResult.Fail() from HandleAuthenticateAsync() apparently does nothing. HandleUnauthorizedAsync and HandleForbiddenAsync do not get called  while my controller methods using the Authorize attribute continue executing anyway. AutomaticAuthenticate and AutomaticChallence are both set to true. I'm trying to return 401 responses for failed authentication and any help would be appreciated.

@optlink can you upload your project to GitHub so that we can take a look? It's definitely sometimes a bit tricky to write authN middleware so if we can take a look at your code we can try to help debug it.

DummyAuthentication.zip
While creating this example I discovered that the problem was being caused by the use of services.AddMvcCore().AddJsonFormatters() instead of services.AddMvcCore().AddJsonFormatters().AddAuthorization() or services.AddMvc(). However, there is another issue. The request is being authenticated (in this example all one has to do is send any data at all with the Authentication header) but fails with a 403 response. The documentation seems to imply that simple authentication with no authorization should work with this code.

I don't see anything obviously wrong. @troydai can you try debugging it?

@optlink the problem is that when the ClaimsIdentity is created in handler it is not given an authenticate type. As a result it's regarded as not authenticated. (https://msdn.microsoft.com/en-us/library/system.security.claims.claimsidentity.isauthenticated(v=vs.110).aspx)
A quick fix is to assign it a string represents any authentication type:
            var identity = new ClaimsIdentity("DummyAuthentication");
            var principal = new ClaimsPrincipal(identity);
            identity.AddClaim(new Claim("claim", "dummy"));

@troydai that fixed it, thank you.

authors: Eilon Tratcher optlink troydai

repo: aspnet/Security


text:
Detect connection state changes?

In the previous SignalR client, I could subscribe to connection state changes using:
$.connection.hub.stateChanged
Is there something similar in the new (preview2) client? Or do I have to do some kind of polling to get that information?

The state diagram for the client right now is much simpler. The start Promise lets you know when the connection starts and the closed event lets you know it's stopped. We don't have automatic reconnects, so those are the only state transitions.

Thanks for that. Been testing with preview2 in a .NET Core 2.0 application and am very pleased with the performance. Looking forward to the real-deal release. :)

How can i get close connection event?
var connection = new signalR.HubConnection('/chat', { logging: signalR.LogLevel.Trace });
connection.onclose = function(){
   console.log('connecition closed');
}
connection.start().then(function(){
   console.log('connection started');
})

im having difficult to understand it.

You actually call onclose passing it the callback you want to register. This is so that you can register multiple callbacks. So this modification to your code should work:
var connection = new signalR.HubConnection('/chat', { logging: signalR.LogLevel.Trace });
connection.onclose(function(){
   console.log('connecition closed');
});
connection.start().then(function(){
   console.log('connection started');
})

source: gharchive/issue

authors: LucasArgate anurse jceddy

repo: aspnet/SignalR

license_type: permissive

license_source: github-api


text:
4.18 Change to PreGarbageCollectDelegate for dev branch code

Just FYI since I tracked it down - in TableUtil.cpp a couple times FCoreObjectDelegates::PreGarbageCollectDelegate is used, but 4.18 has refactored that into FCoreUObjectDelegates::GetPreGarbageCollectDelegate()
Making that one change appears all that's necessary to fix build for 4.18.
Plays in editor with that change, though there is a problem with luahotupdate not finding files from HU.FileMap that I haven't tracked down yet.  Looks like HU.FileMap just isn't being loaded with them at all

fixed

authors: SonicZentropy asqbtcupid

license: mit

license_source: bigquery


text:
Payload erroné lors de la création d'un membershipassociation

Décrivez le bug
En analysant un autre bug, nous avons analysé le payload envoyé lors de la création d'une association membership sur une organisation, et nous avons découvert un enregistrement bizarre...
Ajout de Sylvain :

Analyse du Payload envoyé :

Etapes pour reproduire

Aller sur l'édition d'une orga
Ouvrir la console et la vider
Ajouter une nouvelle association membre, par exemple "Sylvain" ou un utilisateur non encore ajouté comme membre
regarder le payload envoyé.

[
{
"pair:membershipActor": "https://data.virtual-assembly.org/users/yannickduthe",
"pair:membershipRole": "https://data.virtual-assembly.org/membership-roles/admministrateur.trice",
"type": "pair:MembershipAssociation"
},
{
"pair:membershipActor": "https://data.virtual-assembly.org/users/guillaume.rouyer",
"pair:membershipRole": "https://data.virtual-assembly.org/membership-roles/admministrateur.trice",
"type": "pair:MembershipAssociation"
},
{
"pair:membershipActor": "https://data.virtual-assembly.org/users/m.guihal",
"pair:membershipRole": "https://data.virtual-assembly.org/membership-roles/sympathisant",
"type": "pair:MembershipAssociation"
},
{
"0": null,
"1": null,
"2": null,
"3": null,
"4": null,
"5": null,
"6": null,
"7": null,
"8": null,
"9": null,
"10": null,
"11": null,
"12": null,
"13": null,
"14": null,
"15": null,
"16": null,
"17": null,
"18": null,
"19": null,
"20": null,
"21": null,
"22": null,
"23": null,
"24": null,
"25": null,
"26": null,
"27": null,
"28": null,
"29": null,
"30": null,
"31": null,
"32": null,
"33": null,
"34": null,
"35": null,
"36": null,
"37": null,
"38": null,
"39": null,
"40": null,
"41": null,
"42": null,
"43": null,
"44": null,
"45": null,
"46": null,
"47": null,
"48": null,
"49": null,
"50": null,
"51": null,
"52": null,
"53": null,
"54": null,
"55": null,
"56": null,
"57": null,
"58": null,
"59": null,
"60": null,
"61": null,
"62": null,
"63": null,
"64": null,
"65": null,
"66": null,
"67": null,
"68": null,
"69": null,
"70": null,
"71": null,
"72": null,
"73": null,
"74": null,
"75": null,
"76": null,
"77": null,
"78": null,
"79": null,
"80": null,
"81": null,
"82": null,
"83": null,
"84": null,
"85": null,
"86": null,
"87": null,
"88": null,
"89": null,
"90": null,
"91": null,
"92": null,
"93": null,
"pair:membershipActor": "https://data.virtual-assembly.org/users/sylvain.roquebert",
"pair:membershipRole": "https://data.virtual-assembly.org/membership-roles/sympathisant",
"type": "pair:MembershipAssociation"
}
]

Pourquoi 93 ?
Ajout de Alice ensuite, et idem, encore 93 null

Il y a 61 orga et 61 personnes, donc rien à voir... ?
Note : il y a des orgas en double et des utilisateurs en double

Faudrait voir à quoi ça ressemble dans Fuseki...

Je vais comparer avec ce que je vois sur un autre serveur pour lequel nous avons accès aux triplets dans l'interface fuseki, ce sera plus simple.

Dans le serveur Archipel du low-tech Lab (https://archipel.lowtechlab.org/), je me rends compte qu'il y a le même problème avec les membre :

Donc je creuse aussi l'ajout d'un utilisateur membre et je tombe cette fois sur 96 "nuls" sur l'organisation "Low-tech Lab".

Dans Fuseki (4500 triplets déjà), j'ai une structure correcte
    <http://virtual-assembly.org/ontologies/pair#organizationOfMembership>
            <https://data.archipel.lowtechlab.org/membership-associations/afca2b07-ced7-49ba-9eb1-80c85bc4cac5> , <https://data.archipel.lowtechlab.org/membership-associations/eef372eb-58f6-45e7-b333-aa3da3ade87c> , <https://data.archipel.lowtechlab.org/membership-associations/cefb0603-8a93-40a2-b233-fa6d9ca003a4> , <https://data.archipel.lowtechlab.org/membership-associations/8503e243-de4a-483f-9704-6e0835203415> , <https://data.archipel.lowtechlab.org/membership-associations/261699b9-8ae2-4fda-af7c-89302ef3af4a> , <https://data.archipel.lowtechlab.org/membership-associations/290821ef-1a93-4f7e-8b4f-0b75323587da> ;

Avec une association qui m'a l'air correcte aussi :
https://data.archipel.lowtechlab.org/membership-associations/afca2b07-ced7-49ba-9eb1-80c85bc4cac5
a       http://virtual-assembly.org/ontologies/pair#MembershipAssociation ;
http://purl.org/dc/terms/created
"2024-11-08T15:51:10.019Z"^^http://www.w3.org/2001/XMLSchema#dateTime ;
http://purl.org/dc/terms/modified
"2024-11-08T15:51:10.019Z"^^http://www.w3.org/2001/XMLSchema#dateTime ;
http://virtual-assembly.org/ontologies/pair#membershipActor
https://data.archipel.lowtechlab.org/users/494c3a88-f3d3-4508-8688-609c861d7533 ;
http://virtual-assembly.org/ontologies/pair#membershipOrganization
https://data.archipel.lowtechlab.org/organizations/low-tech-lab ;
http://virtual-assembly.org/ontologies/pair#membershipRole
https://data.archipel.lowtechlab.org/membership-roles/coordinateur.ice .
Les données sont accessibles sur : http://data.archipel.lowtechlab.org:3030/ si vous souhaitez les récupérer pour analyser.

repo: assemblee-virtuelle/archipelago


text:
FilteredArrayField & ReifiedArrayField pour show les relation réifiées

Tension
Le ArrayField classique ne permet pas d'afficher toutes les personnes qui ont un role dans une organsiation groupé par rôle. Besoin issue du projet Passerelle Normandie
Proposition
implémenté FilteredArrayField qui permettra d'afficher un ArrayField en filtrant son contenu
implémenté ReifiedArrayField qui affichera plusieurs FilteredArrayField groupé par un attribut configurable (le rôle dans notre cas)

OK pour FilteredArrayField.
Je ne serai pas pour merger ReifiedArrayField dans le repo semapps car on sort des bonnes pratiques de React-Admin (un seul label par Field)

@srosset81 si je ne merge pas ReifiedArrayField, il faudra faire du code spécifique pour afficher les relation réifié groupées par une des propriété de la relation.

Il suffit que tu gardes ce composant sur le repo spécifique, et que tu ne les mettes pas dans @semapps/archipelago-layout

Il suffit que tu gardes ce composant sur le repo spécifique, et que tu ne les mettes pas dans @semapps/semantic-data-provider

Oui, ce que tu dis fonctionne pour Passerlle-Normandie mais ne pourra pas être réutilisé pour un autre projet si ce n'est pas inclue dans le noyau. Je pense que c'est une fonctionnalité utile. Rien que Archipel je suis parti pour présenter les relations réifiées comme pour passerelle.

repo: assemblee-virtuelle/semapps


text:
Fix possible heap pollution in AtomicReferenceArrayAssert

Seems like I forgot the AtomicReferenceArrayAssert in https://github.com/assertj/assertj-core/commit/3d5841fa110c029fc2104fd7425e02dd1ed19384. This PR fixes the possible heap pollution in that class and fixes some other heap pollution for the ForProxy methods by using arrays instead of varArgs.

I missed it too, thanks.

source: gharchive/pull-request

authors: filiphr joel-costigliola

repo: assertj/assertj-core


text:
Integration test infrastructure for Kotlin

Related to #2424, we should add a new assertj-core-kotlin module under assertj-tests/assertj-integration-tests to support Kotlin based integration tests.
We could check the Kotlin related issues we had in the past to see if any Kotlin specific test case can be added.

I'm interested in contributing to this issue, so before I start working it, would you mind sparing your time explaining what the fix will be and pointing me to some resources to get started.

Hi @sreenath-tm, thanks for the help!
The idea would be to add a new Maven module called assertj-core-kotlin. The module should be a child module of assertj-integration-tests. This module should have only a src/test/kotlin folder, should be capable to compile Kotlin test source files and should execute them with JUnit Jupiter.
You might take inspiration from #2758 which added support for Groovy.
About the needed Maven config, in case you use IntelliJ, a new Kotlin-based Maven project might provide some inspiration. junit5-jupiter-starter-maven-kotlin might also be helpful.
In terms of tests to add, you could start with something similar to Assertions_assertThat_with_Groovy_strings_Test, where Kotlin specific syntax is used.
As we run our CI with all the newest versions of Java, including early access ones like 19 and 20, you might need to check if the latest Kotlin version supports all of them. The easiest way could be to create a draft PR and see if all the CI jobs are succeeding. If there are problems with certain versions, Maven profiles might help in this direction, similarly to what we have with Groovy which doesn't support Java 20 yet.

authors: scordio sreenath-tm

repo: assertj/assertj


text:
Cant get integration working

Hi,
I have configured the webhook URL and the base URL, created channel and sent a test, it was not received in the channel. Tested multiple combinations of base URL and channel name:
Our GitLab URL is: https://gitlab.com/example.com/projectslug
So I have tried:
Base: https://gitlab.com/
Ch: example.com-projectSlug
Base: https://gitlab.com/example.com
Ch: projectSlug
Thanks

This might have something to do with case sensitivity. Pls try to name the channel in all lower case.
Also, I found that the newest version from this repository is not yet in the Marketplace. I triggered a new release, but this depends on an approval from Rocketchat to actually get there. It might be worth to look out for this coming release, and try with this version again.

@jschirrmacher sorry my bad, we had it lowercase everything I just wrote the example camel case. The problem was, that the hook url was like: example.com//api/apps/...  notice the double slash after .com maybe we have rocket chat miss-configured since it was generated with that double slash, usually that's no problem for routing in most apps so I did not give it too much thought.

authors: erikkubica jschirrmacher

repo: assistify/rcapps-gitlab


text:
DatePicker autocomplete

Description
DatePicker gere mal l'autocomplete navigateur, serait il possible d'avoir une props pour la désactiver en attendant de fix ?
Comment reproduire
Avoir une valeur suggéré par le navigateur pour la date de naissance
Commencer à saisir une date "10/"
Clicker sur la suggestion : 10/05/2023
La valeur du champ devient : 10/10/05/2 car l'autocomplete s'ajoute a la valeur actuelle au lieu de la remplacer
Comportement attendu
Ne pas proposer d'auto complete
OU
Gerer l'auto complete
Projet
Refonte Inva
Contacts
Benjamin Borlet

Bonjour, nous n'arrivons pas à reproduire ce comportement, pouvez vous nous donner plus d'indications svp? Systeme d'exploitation, navigateurs? Bonne journee

Bonjour,
On va mettre en pause ce ticket je pense, car c'est Karine qui m'a remonté ce soucis, elle est en vacances, je ne sais pas le reproduire non plus, et je n'ai pas de screenshot :3
Bonne journée

N'est plus reproduis par Karine. Je clos.

authors: VachetVirginie bborlet

repo: assurance-maladie-digital/design-system

license: MIT


text:
[feature] Support multiple node for fix string

Currently, Pattern is used for string replacement. However, Pattern requires the string has a single node as root.
Example:
a += 1
b += 2

The above code cannot be used as replacement.
We can lift the constraints by adding a new struct called Fixer.

Fixed by indentation sensitive replacer.

repo: ast-grep/ast-grep


text:
Unable to determine asterisk version, assuming Asterisk 13... you should expect problems to follow.

core show version:
Asterisk certified/16.8-cert2 built by...
In your code:
private static final String VERSION_PATTERN_16 = "^\sAsterisk (GIT-)?16[-. ].";
Should be:
private static final String VERSION_PATTERN_16 = "^\sAsterisk (GIT-)?(certified/)?16[-. ].";
OR:
private static final String VERSION_PATTERN_CERTIFIED_16 = "^\sAsterisk certified/(GIT-)?16[-. ].";

Could you push a pr with the change.
On Wed, 1 Jul 2020, 10:48 pm AhmadHamdanMontyMobile, <
notifications@github.com> wrote:

core show version:
Asterisk certified/16.8-cert2 built by...
In your code:
private static final String VERSION_PATTERN_16 = "^\sAsterisk
(GIT-)?16[-. ].";
Should be:
private static final String VERSION_PATTERN_16 = "^\sAsterisk
(GIT-)?(certified/)?16[-. ].";
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/asterisk-java/asterisk-java/issues/334, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAG32OGK3VGAZFW7TOZMJZ3RZMWBDANCNFSM4ONMDVFQ
.

authors: AhmadHamdanMontyMobile bsutton

repo: asterisk-java/asterisk-java


text:
Add script that updates the version in the README

This automates updating the version in README.md after a new tag was received. See the other two commits in this PR for a demonstration

i don't have write access to the repo so i can't merge myself

Ah sorry, I just gave you and @MichaReiser write on all Astral org repos.

authors: charliermarsh konstin

repo: astral-sh/ruff-pre-commit


text:
isort counts third party imports as local when inside submodules with the same name

repro example
.
├── pyproject.toml
└── src
    └── ruff_test
        └── setuptools
            ├── __init__.py
            └── example.py

pyproject.toml
[project]
name = "ruff-test"
version = "0.1.0"
description = "Add your description here"
authors = [
    { name = "Michael Merickel", email = "unknown@domain.invalid" }
]
dependencies = []
readme = "README.md"
requires-python = ">= 3.8"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.rye]
managed = true
dev-dependencies = []

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["src/ruff_test"]

[tool.ruff]
src = ["src"]

[tool.ruff.lint]
select = ["I"]

example.py
import setuptools

ruff check output
❯ ruff check -v --no-cache src/ruff_test/setuptools/example.py
[2024-03-06][23:01:54][ruff::resolve][DEBUG] Using configuration file (via parent) at: /Users/michael.merickel/scratch/ruff-test/pyproject.toml
[2024-03-06][23:01:54][ruff::commands::check][DEBUG] Identified files to lint in: 2.003584ms
[2024-03-06][23:01:54][ruff::diagnostics][DEBUG] Checking: /Users/michael.merickel/scratch/ruff-test/src/ruff_test/setuptools/example.py
[2024-03-06][23:01:54][ruff_linter::rules::isort::categorize][DEBUG] Categorized 'setuptools' as Known(FirstParty) (SamePackage)
[2024-03-06][23:01:54][ruff::commands::check][DEBUG] Checked 1 files in: 500.583µs

explanation of problem

Categorized 'setuptools' as Known(FirstParty) (SamePackage)

import setuptools here is an absolute import and should be counted as Known(ThirdParty).
The isort logic appears to be counting this as a first party import in a very specific circumstance. The critical detail here is that ruff_test is a namespace package and has no __init__.py file. If you touch src/ruff_test/__init__.py then you get the expected output Categorized 'setuptools' as Known(ThirdParty) (NoMatch).
Instead of adding the __init__.py it is also possible to define a known-third-party section to solve this issue:
[tool.ruff.lint.isort]
known-third-party = ["setuptools"]

Then you will see Categorized 'setuptools' as Known(ThirdParty) (KnownThirdParty).
If you remove the src declaration from tool.ruff it is still a problem, but I think the src declaration should make it extra clear to ruff that the absolute import of the package we created is ruff_test.setuptools, and not setuptools.
If ruff knew the appropriate top-level package roots then import setuptools would be correctly matched to a third party package because "absolute relative imports" are no longer a thing in Python 3.
Another workaround is setting detect-same-package = false. Another option is also namespace-packages = ["src/ruff_test"].
I opened this issue because I think the fact that I set src = ["src"] should have been enough info for ruff to do the right thing in the original pyproject.toml.
I tested this on ruff 0.3.0 and 0.3.1 and observed the same behavior on both.
Possibly related: https://github.com/astral-sh/ruff/issues/5667 https://github.com/astral-sh/ruff/issues/9130

Thanks for the report!
@charliermarsh do we just not support detection of first-party imports in namespace packages in general?

authors: mmerickel zanieb

repo: astral-sh/ruff


text:
DOC201 requires a returns section even when not required by the Google style guide

DOC201 requires a returns section in a docstring when the Google docstring convention is enabled, but the Google style guide says that that section “may also be omitted if the docstring starts with “Return”, “Returns”, “Yield”, or “Yields” (e.g. """Returns row from Bigtable as a tuple of strings.""") and the opening sentence is sufficient to describe the return value.” Ruff can’t validate whether the sentence is sufficient, so it should assume that if the docstring begins with the right word and the Google convention is enabled, the returns section was omitted intentionally.
$ ruff --version
ruff 0.5.6
$ cat doc201.py
def f():
    """Returns 1."""
    return 1
$ ruff check --isolated --output-format concise --preview --select DOC201 --config 'lint.pydocstyle.convention = "google"' doc201.py
doc201.py:3:5: DOC201 `return` is not documented in docstring
Found 1 error.

Thanks for reporting this.
@augustelalande do you know if Ruff's implementations are compatible with the upstream rules regarding this behavior or is this something Ruff doesn't support yet?

...so it should assume that if the docstring begins with the right word and the Google convention is enabled, the returns section was omitted intentionally.

I agree with this -- makes sense to me.

authors: MichaReiser charliermarsh dscorbett


text:
Feature request: black compatibility mode

Ruff's website says:

The formatter is designed to be a drop-in replacement for Black.
Specifically, the formatter is intended to emit near-identical output when run over Black-formatted code.

However, there is an extensive list of differences between the output of the two formatters. On my project, I was not able to configure ruff and black in such a way that the two would result in the same output, or even allow the output of the other to go unchanged. The diffs I saw can be seen here.
If black-compatibility or gradual migration from black is a goal, it would be very helpful to offer a mode which allows the output of black to go unchanged. Without this, transitioning between the two formatters requires synchronized changes to both the formatter and the code being formatted.
I understand this may be a non-goal, but I figured it was worth raising here since the website explicitly lists Black compatibility as a goal/feature.

Is the right side of the diff there Ruff's output? If so, I think most of those are pretty clear improvements to the format. I understand it's tough to use both formatters at once though.
We are targeting Black compatibility, but it's very hard to reach 100% compatibility due to architectural differences. During the initial implementation, we spent time trying to close the gap from 99% -> 100% (e.g., https://github.com/astral-sh/ruff/pull/6343). I'm not sure how feasible it is to get closer. In the long term, we will probably diverge further from Black as we want to improve the produced format. Unfortunately, it's very hard to maintain multiple "modes" of the formatter, which is part of why we support a limited number of settings. I think this is a significant burden to a compatible mode as well.
cc @MichaReiser

We have goal to match Black closely so that migrating from black to ruff results in none or only very few code changes.
Achieving 100% compatibility is a non goal. It would require us to re-implement bugs in black or make our formatting worse just for compatibility.

transitioning between the two formatters requires synchronized changes to both the formatter and the code being formatted.

I recommend you against switching between formatters and instead advise you to commit to one (Black or Ruff).

authors: MichaReiser cramertj zanieb


text:
Red knot: Add file watching and cancellation

Summary
Okay, I must admit this PR does more than what the title says.
The changes not covered by the title are:

It adds a new lint_syntax method that performs two checks. It mainly serves to see if file changes are correctly picked up. The implemented checks are:
Whether any line contains more than 88 characters (yeah, it should be the line width, but I didn't bother for the prototype)
Whether any string literal uses single quotes instead of double quotes (again, a very dumb implementation. It even flags strings that contain double quotes, which normally would be considered okay)
It changes Source to use SourceKind instead of always an Arc<str>. This is necessary to support IPython notebooks. There's absolutely no good reason why this is part of this PR and I'm happy to split it out if people find that useful. I think it doesn't matter much.

The main change of the PR is that red-knot now accepts an "entry path" and runs the analysis in watch mode. This is interesting because it tackles a few challenges:

How to wait for file changes or until the user presses Ctrl+C without using a spin loop. That's not conceptually difficult, but it's something I've never done before, so it took me a few approaches to get it right.
How can we ensure that we get a mutable reference to program after all scheduled analysis have been completed
How to cancel pending analysis.

I'm undecided if the ultimate goal should be that this code is isolated and reused across the LSP, CLI watch mode and regular CLI. It would certainly be nice, but I could also see this be part of the "Host" specific code, and each host should have as much flexibility as possible to implement the most efficient scheduling for its needs.
Future Improvements:

We should ignore changes to files that are ignored in the settings and isn't a dependency of Program
The current error handling is mostly unwrapping. We should do better.
File watching...: Correctly handle folders, new files, cases where a user deletes a file and creates a folder with the same name etc.
The invalidation logic requires more love, but I don't think it's important to fully implement it right now because the PR proves the important point, that we can get a mutable Program (db)

Test plan
I ran the CLI locally, then made changes to the test file by adding a new single quoted string and I then verified that the console showed the new diagnostic.

CC: @BurntSushi for the case I do anything horrible inside of main.rs

Okay, I think what I want to do tomorrow is:

Figure out if we can move the orchestration thread out of the main loop. I suspect that this should be straightforward by adding one more channel :laughing:
Add a program.check(context) and program.check_file(id, context) functions and move the logic for checking a program there. The context would expose a method to schedule a dependency so that it's up to the host to decide if that should run on the same thread (queuing) or on a thread pool.

Very cool! Sorry I didn't see this / review it sooner so you could have landed it today.

All good. I'm not in a rush. Having the review next morning is still a perfectly quick review and I should have tagged you as reviewer! Thank you


text:
add conventional xml.etree.ElementTree import alias

Summary
Adding a conventional alias for ElementTree. I looked for other conventional aliases in standard library in order to generalize the point, but found none.
There is still an issue with this. It conflicts with N817 CamelCase 'ElementTree' imported as acronym 'ET'. I have to ignore locally:
import xml.etree.ElementTree as ET # noqa: N817
too bad
Test Plan
only test as a lint.flake8-import-conventions.extend-aliases configuration option

You need to add this to CONVENTIONAL_ALIASES in crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs too. We may need to include this in the next minor version.

authors: charliermarsh edhinard


text:
[red-knot] Remove Type::Unbound

Summary

Remove Type::Unbound
Handle (potential) unboundness as a concept orthogonal to the type system (see new Symbol type)
Improve existing and add new diagnostics related to (potential) unboundness

closes #13671
Test Plan

Update existing markdown-based tests
Add new tests for added/modified functionality

Oh shoot, sorry for merging https://github.com/astral-sh/ruff/pull/14016 :(
It didn't even occur to me that this would give you more tests to update. I won't merge anymore red-knot PRs until this lands! 😄

authors: AlexWaygood sharkdp


text:
[flake8-use-pathlib] Implement os-path-getsize and os-path-get(a|m|c)-time (PTH202-205)

Reviving https://github.com/astral-sh/ruff/pull/2348 step by step
Pt 3. implement detection for:

os.path.getsize
os.path.getmtime
os.path.getctime
os.path.getatime

Ecosystem changes are correct


text:
Copy files, then create directory on fallback

Summary
Most wheel entries are files, not directories. So it seems more efficient to attempt to create the file, then create the directory on-error, rather than checking every entry to see if it's a directory.
(I need to benchmark this.)

Isn't the filetype already retrieved so this check is just a bitshift?

Hmm, I don't think so, it looks like this ultimately calls self.is(libc::S_IFDIR).

That call then does the bitmask and compare: https://github.com/rust-lang/rust/blob/96e51d9482405e400dec53750f3b263d45784ada/library/std/src/sys/pal/unix/fs.rs#L651-L657

Thank you!

repo: astral-sh/uv


text:
Updates to custom CUDA HEALPix FFT primitive

Some updates to #204
Still need to resolve:

[x] Resolving licensing for  external code in lib/include/kernel_helpers.h (link to comment)
[x] Adjusting license in header for lib/include/kernel_nanobind_helpers.h to list modifications made (link to comment)

@ASKabalan this PR I think resolves the main outstanding comments from my side for your PR #204. Specifically it

Removes the BasePrimitive abstract base class in favour of just defining a function register_primitive which is directly passed the primitive details
Adds docstrings to the new healpix_fft_cuda and healpix_ifft_cuda functions.
Reverts changes to formatting in s2fft/transforms/spherical.py.
Removes the now redundant requirements files and updates the test workflow accordingly.
Adds headers to lib/include/kernel_helpers.h and lib/include/kernel_nanobind_helpers.h attributing the authors of the original files these were adapted from and including a copy of the original MIT license and copyright statement for the former.

I'll tag you for a review - if you are happy with these changes then I'll merge in to your cufft-primtive branch.


text:
Add Monitor as exposed function

Add Monitor as exposed function to allow programatic access

Thanks!

authors: Vincent-CIRCL astrofrog

repo: astrofrog/psrecord


text:
Add TaskGroup support

closes #27
This PR makes a few small changes to support for Airflow TaskGroups in a Databricks workflow:

it traverses up the tree of task groups to see if the task is in a Databricks Workflow TaskGroup instead of just the immediate parent
instead of iterating over direct children of the Databricks Workflow TaskGroup, it first flattens the children by recursively removing task groups
small bugfix in the Tiltfile to fix the dev folder sync
adds an example dag to the dev directory using TaskGroups

I've run the example DAG in Astronomer's Databricks account, and it worked like a charm! Worth noting that Databricks themselves don't have support for TaskGroups/dependency groups, so this was pretty cool to put together.
Also worth noting that in the process of putting this together, I uncovered a bug I filed to be addressed separately.

Codecov Report
Patch coverage: 76.66% and project coverage change: -0.55 :warning:

Comparison is base (0538602) 78.82% compared to head (1ddcdc5) 78.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
- Coverage   78.82%   78.28%   -0.55%
==========================================
  Files           5        5
  Lines         425      442      +17
  Branches       47       52       +5
==========================================
+ Hits          335      346      +11
- Misses         73       76       +3
- Partials       17       20       +3

Impacted Files
Coverage Δ

src/astro_databricks/operators/notebook.py
89.52% <63.63%> (-3.19%)
:arrow_down:

src/astro_databricks/operators/workflow.py
83.46% <84.21%> (-0.57%)
:arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: codecov-commenter jlaneve

repo: astronomer/astro-provider-databricks


text:
AbundanceFunction objects are not pickle-able

For an unknown reason, the AbundanceFunction objects can not be pickled.  It would be ideal to be able to pickle them and save so they can be loaded and used to make mocks.
@aphearin, do know what the problem is?

In what way is a pickled abundance function ideal?

I would like to calculate and fit an abundance function and save the result.  Then multiple codes could load and use the object without hard coding the result in.  Is there a better option?

What is the disadvantage of hard-coding the best-fit parameters into the source code?

If I change how I calculate the abundance function, e.g. bins, cuts, simulations... I don't have to go back and edit a whole bunch of code.  You don't agree?

I just don't understand. If you want to be able to change how you do the calculation, how does pickling the result save you any trouble? A pickled object is about as hard-coded as it gets.

My reaction is that it sounds like you should just be using pickled objects in your own workflow, but not in the global repo

I am imaging I have some code called, calculate_sdss_mstar_abundance.py
Then I have some code called, make_sham_mock.py that uses the output of the previous script.
Right now I have to run the first script.  Then copy and paste the results into the second script when I initialize the AbundanceFunction.  The run the second script.  It would be nice to be able to run the first followed by the second with not copying and pasting, just automatically loading the result of the first in the second.

So the final result of calculate_sdss_mstar_abundance.py is an AbundanceFunction instance (or maybe an instance of an AbundanceFunction sub-class)?

If so, can't your make_sham_mock code just accept an instance as an input argument? Then whatever data is bound to the result of calculate_sdss_mstar_abundance will be carried into make_sham_mock, with no hard-coding of anything except attribute names, which should be standardized anyway.

hmmmmm im confused.  I think this would be easier in person

Sounds like this might be easier to discuss in person while looking at code. I'll close this issue for now and we can revisit it next week when I get back in town

authors: aphearin duncandc

repo: astropy/halotools


text:
Added in random downsampler

See halotools.utils.array_utils for the randomly_downsample_data method

Ask and you shall receive, @andrew-zentner


text:
Ctrl+c Ctrl+v don't work

I can't copy text using Ctrl+c, although I disabled using ctrl keys in both normal and insert modes. I even tried to escape the keys using
    {
        "command": "-vscode-neovim.send",
        "key": "ctrl+c"
    }

Escape keys are not being sent to neovim
the correct keybinding is
    {
        "command": "-vscode-neovim.escape",
        "key": "ctrl+c"
    }

But you're right <C-c> should be disabled if when you turn off insert control keys

Oh, my bad. After fixing my keybinding it works well now, thanks.
I love Vim but copying and pasting from different files gets painful, many **"y "p

authors: ShadyAlfred asvetliakov

repo: asvetliakov/vscode-neovim


text:
v0.1.7

This version should introduce a lot of features that are crucial to pyscan, explained below.
Listed in the order of importance.

[ ]  pyscan | pyscan map: Persistent dependency network analysis; responsive to changes, scans every dependency and their dependencies with efficiency and provides a graph/map, with indicators for different levels of severity.
[ ]  pyscan check: help novice developers avoid installing malicious dependencies from PyPI.
[ ]  pyscan history: Scan history, Age analysis and Dependency evolution tracking; should show how old a dependency is, and whether its worth updating to the latest version, other analytics.
[ ]   pyscan common: Dependency correlation; Analyze which dependencies in different projects have common vulnerabilities. This can help identify patterns and potentially identify shared security concerns across projects, making it valuable not just for individual developers but the Python community as a whole.
[ ]  pyscan report: risk assessment reports.
[ ]  pyscan alert: custom alerts through email, Github issues or Slack.
[ ]  pyscan trends: vulnerability trends.
[ ]  pyscan score: security scorecards.
[ ] known vulnerability exclusion
[ ] parse SBOMs and KBOMs

Issues fixed

Hey, haven't been able to work  on the latest version (and a lot of new features) because of my obligations as an asian student.
Being in a country where everyone wants the same thing as you is hard, I'm talking about entrance exams. I'll work on pyscan whether or not I get to fulfill my dream. That's the nice thing about having a project, you can come back and work on it no matter where, who or how you are.
Expect me by May.

this project is awesome!!! please come back soon.

authors: aadithks aswinnnn

repo: aswinnnn/pyscan


text:
Annotation object has no attribute 'sentiment' run test

run tests/algorithms/word_splitting_op_test.py, get errors as follow:
..\..\fortex\aug\base\base_data_augmentation_op.py:118: in perform_augmentation
    augmented_data_pack = self._apply_augmentations(input_pack)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <fortex.aug.algorithms.word_splitting_op.RandomWordSplitDataAugmentOp object at 0x000001FE7F7FF460>
data_pack = <forte.data.data_pack.DataPack object at 0x000001FE7F805E20>

    def _apply_augmentations(
        self,
        data_pack: DataPack,
    ) -> DataPack:

        r"""
        The objective of this function is to actualize the augmentations
        proposed by the augment function. It will copy and update the text
        of datapack and auto-align the annotation spans. The links are also
        copied if its parent & child are both present in the new pack.
        The groups are copied if all its members are present
        in the new pack.
        Args:
            data_pack: The Datapack holding the replaced annotations.
        Returns:
            A new data_pack holds the text after replacement. The annotations
            in the original data pack will be copied and auto-aligned as
            instructed by the "other_entry_policy" in the configuration.
            The links and groups will be copied if their members are copied.
            New annotations added by the `insert_annotated_spans` function
            will also be added to the newly created data pack. Conversely, if
            annotation is deleted by the `delete_annotation` function or an annotation
            exists within a span that is deleted by the `delete_span` function, it will
            not be added to the new data pack.
        """

        replaced_annotations = self._replaced_annos[data_pack.pack_id]

        if len(replaced_annotations) == 0:
            return deepcopy(data_pack)

        spans: List[Span] = [span for span, _ in replaced_annotations]
        replacement_strs: List[str] = [
            replacement_str for _, replacement_str in replaced_annotations
        ]

        # Get the new text for the new data pack.
        new_text: str = ""
        for i, span in enumerate(spans):
            new_span_str = replacement_strs[i]
            # First, get the gap text between last and this span.
            last_span_end: int = spans[i - 1].end if i > 0 else 0
            gap_text: str = data_pack.text[last_span_end : span.begin]
            new_text += gap_text
            # Then, append the replaced new text.
            new_text += new_span_str

        # Finally, append to new_text the text after the last span.
        new_text += data_pack.text[spans[-1].end :]

        # Get the span (begin, end) before and after replacement.
        new_spans: List[Span] = []

        # Bias is the delta between the beginning
        # indices before & after replacement.
        bias: int = 0
        for i, span in enumerate(spans):
            old_begin: int = spans[i].begin
            old_end: int = spans[i].end
            new_begin: int = old_begin + bias
            new_end = new_begin + len(replacement_strs[i])
            new_spans.append(Span(new_begin, new_end))
            bias = new_end - old_end

        new_pack: DataPack = DataPack()
        new_pack.set_text(new_text)

        entry_map: Dict[int, int] = {}
        insert_ind: int = 0
        pid: int = data_pack.pack_id

        # Only iterate over those entries that are necessary. ie. the
        # ones that are inserted or are present in the other_entry_policy
        # config.
        existing_entries = self.configs["other_entry_policy"].keys()

        new_entries: Dict[str, List[Tuple[int, int]]] = {}
        for pos, data in self._inserted_text[pid].items():
            new_entries[data[1]] = new_entries.get(data[1], []) + [
                (pos, data[0])
            ]

        entries_to_copy: Set[str] = set(
            list(existing_entries)
            + [val for val in new_entries if val is not None]
        )

        def _insert_new_span(
            entry_class: str,
            insert_ind: int,
            inserted_annos: List[Tuple[int, int]],
            new_pack: DataPack,
            spans: List[Span],
            new_spans: List[Span],
        ):
            """
            An internal helper function for insertion.
            Args:
                entry_class: The new annotation type to be created.
                insert_ind: The index to be insert.
                inserted_annos: The annotation span information to be inserted.
                new_pack: The new data pack to insert the annotation.
                spans: The original spans before replacement, should be
                  a sorted ascending list.
                new_spans: The original spans before replacement, should be
                  a sorted ascending list.
            """
            pos: int
            length: int
            pos, length = inserted_annos[insert_ind]
            if entry_class is None:
                return
            insert_end: int = self.modify_index(
                pos,
                spans,
                new_spans,
                is_begin=False,
                # Include the inserted span itself.
                is_inclusive=True,
            )
            insert_begin: int = insert_end - length
            new_anno = create_class_with_kwargs(
                entry_class,
                {"pack": new_pack, "begin": insert_begin, "end": insert_end},
            )
            new_pack.add_entry(new_anno)

        # Iterate over all the original entries and modify their spans.
        for entry_to_copy in entries_to_copy:

            class_to_copy = get_class(entry_to_copy)
            insert_ind = 0

            if not issubclass(class_to_copy, Annotation):
                raise AttributeError(
                    f"The entry type to copy from [{entry_to_copy}] is not "
                    f"a sub-class of 'forte.data.ontology.top.Annotation'."
                )

            if entry_to_copy not in new_entries:
                new_entries[entry_to_copy] = []

            orig_annos: Iterable[Annotation] = data_pack.get(class_to_copy)

            for orig_anno in orig_annos:
>               old_sent = orig_anno.sentiment
E               AttributeError: 'Token' object has no attribute 'sentiment'

..\..\fortex\aug\base\base_data_augmentation_op.py:535: AttributeError

======================== 1 failed, 1 warning in 6.00s =========================

Process finished with exit code 1

Hi, thanks for your interest in the project. I have checked the code and there is a bug in the migration. The project is work-in-progress but we do have basic tests to make sure everything can run under our setup. So thanks again for your help.

thank you for your reply,
this project is production or a trial?

It seems that the bug is caused by migration so we should be able to fix it soon, like 1~2 days.
This project is a research demo, probably not really at "production" grade. But do you have any specific usage scenarios?
Anyway, we are definitely targeting a high-quality code base, but with a few new features under construction.

This is a good job. I look for some data augmentation.
this project is a systematic framework. but it's too tight coupling with other projects, as forte.

Thanks for being interested in our work.
Yes, we use Forte as our data framework which is relatively lightweight. By the way, do you anticipate problems using another project?

btw, the issue should be fixed as the current CI test pipeline passes

ok

authors: bigdata-ny hunterhector

repo: asyml/ForteAug


text:
trait vs. allOf ref vs. component ref - CloudEvents

I just stumbled across traits, must've missed them before. My initial thought was: 'oh nice, now I can pull out the CloudEvents JSON schema from the specs and don't need all the copypasta'.
I then found this and there is ... no trait:
components:
  schemas:
    whateverPayload:
      type: object
      allOf:
        - $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.1/spec.json'
      properties:
        data:
          $ref: '#/components/schemas/somethingElse'

Now I'm a bit confused. If I get it right, it'll just merge in the whole CloudEvents spec object, including its properties (why the allOf, though? Would it conflict with the explicit properties otherwise?). Now that's what I thought traits would be useful for. If we can just do it like that, why do we have traits? I'm pretty sure I'm missing something.
Another thing in the back of my mind is schema validation. If I externalize parts of the schema, how will validation behave? Applications now need to reach out to GH and fetch the CloudEvents spec from there. Do I want this? Will it be cached? Should I rather split it into the spec I write and a "compiled" spec with everything inlined?
So, I was wondering how you do it and what traits are there for (the docs are rather brief).

Hi @black-snow,
I created the issue https://github.com/cloudevents/spec/issues/1276 because I think it is a bit more complicated.
There are multiple bindings per protocol for CloudEvents, so I think we need different traits depending on the protocol and mode (structured or binary). In structured mode, https://raw.githubusercontent.com/cloudevents/spec/v1.0.1/spec.json should probably be great.
For the fetching, caching, etc. questions: This is not part of the spec, but an implementation detail (but please correct me if I'm wrong).

Thanks for sharing that thread. Very insightful.
As someone having that use case I absolutely agree there is a use case :D
It gets really messy once you produce or consume just half a handful of events. Right now my schema looks like
components:
  messages:
    WhatevsEvent:
      # ...
      payload:
        allOf:
          - $ref: "#/components/schemas/Envelope"
          - $ref: "#/components/schemas/WhatevsEventEnvelopeOverrides"
          - type: object
            properties:
              data:
                $ref: "#/components/schemas/WhatevsEventPayload"
# ...
  schemas:
    Envelope:
      allOf:
        - $ref: 'https://raw.githubusercontent.com/cloudevents/spec/v1.0.2/cloudevents/formats/cloudevents.json'
        - $ref: "#/components/schemas/MyEnvelopeExtensions"

Where overrides contains constants for subject, for example. It works but it's not pretty. Perhaps there's an obvious way to make this less of a puzzle. I was hoping traits were the answer (or part of it at least).

Stale it is, but no less relevant. I wonder if I should close it in favour of https://github.com/cloudevents/spec/issues/1276, tho.

authors: Lazzaretti black-snow

repo: asyncapi/spec


text:
Triage maintainers are not pinged in relevant PRs

Describe the bug
Recently with the additions of new triage maintainers in the website, CODEOWNERS file (https://github.com/asyncapi/website/blob/master/CODEOWNERS) has got into multiple errors. These errors are because of providing only Triage access to the new maintainers. Hence, none of the new joines are pinged whenever there is a new PR opened.
Expected behavior
With each PR opened or changes pushed, relevant triage maintainers should get a ping with either a comment inside PR or adding them to reviewers list of PR.
Proposed solution
Using Github APIs, you can try to add reviewers on the PR open or update using Github workflows.

cc: @TRohit20 @VaishnaviNandakumar

Working on fixing this.

repo: asyncapi/website


text:
No Validation examples

No Validation examples are available

Required
Numeric
Regular expression
how to write custom validation fuction if need then.

Do you want see validation examples for the datepicker or some other part of the library?

authors: atatanasov saineshwar

repo: atatanasov/gijgo


text:
🛑 Wedding HTTPS is down

In e6e3d7d, Wedding HTTPS ($WEDDINGHTTPS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Wedding HTTPS is back up in 121142c.

repo: atatkin/milos-uptime


text:
🛑 Wedding HTTPS is down

In 2eca1c9, Wedding HTTPS ($WEDDINGHTTPS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Wedding HTTPS is back up in ba85569.


text:
🛑 Wedding HTTPS is down

In 993da5c, Wedding HTTPS ($WEDDINGHTTPS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Wedding HTTPS is back up in 5a08cb1.


text:
🛑 Wedding HTTPS is down

In a0dc8fe, Wedding HTTPS ($WEDDINGHTTPS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Wedding HTTPS is back up in 29fe74c.


text:
🛑 Wedding HTTPS is down

In cc297ca, Wedding HTTPS ($WEDDINGHTTPS) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Wedding HTTPS is back up in 6e4361c.


text:
Extract base domain + FilmDetail parsing

We extracted a base domain module where we could keep models that would be shared throughout the app - like Image or FilmSummary.
In practice, this meant that all the domain models went here - I don't think there are any domain models left that are specific to a feature module.

Also added the parsing logic for Film including the directors and characters. The annoying bit is that images don't seem to be included for the cast - if we want them, we'd have to do an API call per actor. What do you think about just avoiding this for now? e.g. showing their initials instead or using robohash?

(Also there's a new API to fetch a list of films given an actor ID. This wasn't meant to be committed - I wanted to do it as part of the same PR where the actor-detail modules are added, but oh well.)

Looks good! I'm onboard with robohash too, might seem a bit overkil lfor now to make a request per actor - we can always change it along the line if we want

authors: ataulm hitherejoe

repo: ataulm/muvi


text:
Test applying Certificate.Verify() to leaf certificate

https://golang.org/pkg/crypto/x509/#Certificate.Verify
https://pkg.go.dev/crypto/x509#VerifyOptions

From what I can tell at a glance it doesn't appear to be too difficult to work in. This should probably be either optional or at least opt-out as not every certificate tested will have a proper signature (e.g., certificates for some network appliances such as storage arrays).

Initial prototyping work suggests that we're going to want to allow the user to specify custom paths to root certificates, intermediate certificates.
I tested against a site that uses a custom CA and the initial verification failed (as expected), but once I provided the CA public key the verification was successful (and I had hoped).

The work for GH-211 is applicable here; adding support for validation is useful, but it should probably be opt-in with explicit notation whether validation is enabled.

for lscert, it can be provided via the summary
for check_cert, it can be listed "below the fold" in the LongServiceOutput details

For the latter, the output currently provided by plugin in the atc0005/check-vmware project can serve as inspiration. In that output, whether the server cert is ignored is explicitly noted.

Potentially relevant from https://go.dev/doc/go1.18#crypto/x509

Certificate.Verify now uses platform APIs to verify certificate validity on macOS and iOS when it is called with a nil VerifyOpts.Roots or when using the root pool returned from SystemCertPool.
SystemCertPool is now available on Windows.
On Windows, macOS, and iOS, when a CertPool returned by SystemCertPool has additional certificates added to it, Certificate.Verify will do two verifications: one using the platform verifier APIs and the system roots, and one using the Go verifier and the additional roots. Chains returned by the platform verifier APIs will be prioritized.
CertPool.Subjects is deprecated. On Windows, macOS, and iOS the CertPool returned by SystemCertPool will return a pool which does not include system roots in the slice returned by Subjects, as a static list can't appropriately represent the platform policies and might not be available at all from the platform APIs.
Support for signing certificates using signature algorithms that depend on the MD5 and SHA-1 hashes (MD5WithRSA, SHA1WithRSA, and ECDSAWithSHA1) may be removed in Go 1.19.

See also:

https://github.com/atc0005/check-cert/issues/359

Note to self: Pretty sure I have a WIP private branch with initial skeleton details in place.
When I pick back up on this, console "The Go Workshop" title, somewhere around page 511. Potentially relevant to:

#209


text:
GitHub Action stuck on "starting your workflow run"

https://github.com/atc0005/elbow/commit/e244ccce30359de8b7129e39d05ba63fcabef392/checks?check_suite_id=286266038
I had thought this was entirely on GitHub's end (and it still might be), but digging around in the community forums I see several users note that typos in the configuration can lead to the same behavior:

https://github.community/t5/GitHub-Actions/Stuck-on-quot-starting-your-workflow-run-quot/m-p/31702#M873
https://github.com/actions/setup-ruby/issues/26

Others didn't seem to have any such typo:

https://github.community/t5/GitHub-Actions/Action-blocked-on-quot-Starting-a-workflow-run-quot/m-p/33855#M1685
https://github.com/goreleaser/godownloader/pull/142/files#annotation_6656311066563110

See also #103, #106, #104, #105

I suspect I found it:
    runs-on: ${{ matrix.platform }}
    strategy:
      matrix:
        # Supported versions of Go
        go-version: [1.12.x, 1.13.x]

        # Supported LTS versions of Ubuntu Linux
        os: [ubuntu-16.04, ubuntu-18.04]

This line:
    runs-on: ${{ matrix.platform }}

Fixed by work on #108.


text:
Which angle does mvdr refer to? Which axis is the included angle of x, y, z?mvdr中的角度是指哪个角度呢?是x、y、z哪个轴的夹角呢?

Which angle does mvdr refer to? Which axis is the included angle of x, y, z?
mvdr中的角度是指哪个角度呢?是x、y、z哪个轴的夹角呢?

请问处理了吗？我也遇到同样的疑问

并不是很清楚，你的beamforming效果好吗?我测试的效果不是很好

repo: athena-team/athena-signal


text:
Let's make error readable.

Scenario: I'm not connected to JioFi. Running the program generates:
joe733 in jiofi-cli at xpsl502x on ⎇ master via 🅒 jiofi
➜ python main.py basic
Traceback (most recent call last):
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
    conn = connection.create_connection(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1240, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1286, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1235, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1006, in _send_output
    self.send(msg)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 946, in send
    self.connect()
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connection.py", line 171, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fd71d8fa5e0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
    retries = retries.increment(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='jiofi.local.html', port=80): Max retries exceeded with url: /cgi-bin/qcmap_web_cgi (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd71d8fa5e0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 107, in <module>
    fire.Fire({
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/fire/core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/fire/core.py", line 463, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "main.py", line 99, in getBasicDetails
    bats = deviceDetails(False)
  File "main.py", line 59, in deviceDetails
    res = requests.post(URL,form)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='jiofi.local.html', port=80): Max retries exceeded with url: /cgi-bin/qcmap_web_cgi (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd71d8fa5e0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Catch the exeption and print out: Please double check if you are connected to JioFi hotspot

Oops! little late :wink:. I think #1 resolves it.

Could you try upgrading the package and run again?
Don't close it yet

Hey, @athul  I've a doubt. I forked your repo and I try to sync it with pull-bot from the market place. But I've to wait for it to sync the repo. Now my fork is 3 commits behind yours so how can I manually sync it?

@joe733 I haven't used that yet and haven't got any idea on how to resolve that issue. I'm really sorry.
I looked into that traceback and there seems to be a lot of them and the solution I could bring up was
import requests
import socket
from urllib3.exceptions import NewConnectionError,MaxRetryError
try:
        res = requests.post(URL,form)
    except requests.ConnectionError or NewConnectionError or MaxRetryError or socket.gaierror:
        print("Connect to a Jiofi Network to get the details")
        sys.exit(1)

When using the script, it tends to work when I simple add the requests.ConnectionError in the except statement

Yes #1 works when not connected to JioFi

Nope, not like this. Could you try
pip install jiofi

And run the commands of jiofi

Oh okay jiofi basic does produce these errors when not connected to a JioFi network.
Traceback (most recent call last):
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
    conn = connection.create_connection(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1240, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1286, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1235, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 1006, in _send_output
    self.send(msg)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/http/client.py", line 946, in send
    self.connect()
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connection.py", line 171, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f86c7ebb8b0>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
    retries = retries.increment(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='jiofi.local.html', port=80): Max retries exceeded with url: /cgi-bin/qcmap_web_cgi (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f86c7ebb8b0>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/joe733/anaconda3/envs/jiofi/bin/jiofi", line 8, in <module>
    sys.exit(main())
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/jiofi/jiofi.py", line 106, in main
    fire.Fire({
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/fire/core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/fire/core.py", line 463, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/jiofi/jiofi.py", line 99, in getBasicDetails
    bats = deviceDetails(False)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/jiofi/jiofi.py", line 59, in deviceDetails
    res = requests.post(URL,form)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/joe733/anaconda3/envs/jiofi/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='jiofi.local.html', port=80): Max retries exceeded with url: /cgi-bin/qcmap_web_cgi (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f86c7ebb8b0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Check the NewRelease. It will Work I guess.
pip install --upgrade jiofi --user

Guess #4 closes this

Yea it does. Closing the issue.

repo: athul/jiofi-cli


text:
Unable to modify a session in from hook

I'm running into an issue where, where I'm unable to modify a session from inside of the fetch hook.
Here is an example.
export default defineNitroPlugin(() => {
  sessionHooks.hook("fetch", async (session, event) => {
    const { getSASUrl } = $storage()

    // Update the SAS Token expiration, and get a new SAS token if it's expired
    const isTokenExpired = dayjs(session.SAS.expiresOn).isBefore(dayjs())

    if (isTokenExpired) {
      const { url, expiresOn } = await getSASUrl(
        session.activeTeam.id,
        StorageContainer.UserUploads,
      )
      session.SAS = {
        url,
        expiresOn,
      }
    }
})

when this hook runs in SSR context its able to get a updated SAS token based on the current expiresOn, however, when I refresh the page, the old cookie value is present.
Although the session is updated for the request, the cookie itself isn't updated, so the isTokenExpired above will always true because the session passed in will always be the session from the cookie.
I hope that makes sense.
is there a a proper way to update a session without having the user Logout and Log back in?

Hi @genu
This hook is only used to populate the session for the client-side with dynamic data but it cannot update the cookie, only the returned value for useUserSession() on the app-side.

is there a a proper way to update a session without having the user Logout and Log back in?

This is a bit related to #255, I would suggest a server middleware that can update the session.

Thanks @atinux  I moved the above to a middleware, and it seems to get the job done.
I appreciate it.

authors: atinux genu

repo: atinux/nuxt-auth-utils


text:
Add return breakdown for connection_handler

Quick fix to add return breakdown for connection_handler.

Pull Request Test Coverage Report for Build 7821015814

-1 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.02%) to 38.135%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

sdx_controller/handlers/connection_handler.py
0
1
0.0%

Totals

Change from base Build 7757392363:
-0.02%

Covered Lines:
605

Relevant Lines:
1425

💛  - Coveralls

repo: atlanticwave-sdx/sdx-controller


text:
Release text

Affected Packages
Unknown
Problem
Why do your releases have notes attached, but if we don't use the action, no note is attached.
Here is an example monorepo I have set up monodist/monodist.
I think that the Action you've provided (the one which does a force push to a branch: version, is a smelly anti-pattern. So I chose to handle that bit directly (and have that part of the merge process).
Proposed solution

Why do your releases have notes attached, but if we don't use the action, no note is attached.

They are created by the action: https://github.com/changesets/action/blob/bfeb9e077e6cf393e4c4ef17e2bbc75b308b4364/src/run.ts#L35-L40

I think that the Action you've provided (the one which does a force push to a branch: version, is a smelly anti-pattern.

Everything has someplace in the world 😉 In this particular example we feel that this is the right way to handle this - causing less friction for the users and without many downsides. The versioning PRs that our action creates is supposed to represent a single commit, a single point in time - it syncs to what happens to your base branch.

I have a couple concerns with the force push strategy though.

if changesets aren't routinely merged (from the version branch), they'll be overwritten. Right?
the version branch becomes a sort of de-factor primary branch (like, e.g. master), right? Or, vice-versa.

The way I implemented it (there's a tradeoff, of course), is to have the commit to master create a second commit – the result of version. I think this is a good way, but there's still the problem that two rapid commits to master produce a race-condition. Was wondering if you'd put thought into that and had a workaround.
I also assume you'd put thought into my workflow (the auto-commit to master), and am really curious as to why you didn't go that route.
Anyway, very excited about the future of this package. :)

if changesets aren't routinely merged (from the version branch), they'll be overwritten. Right?

Not quite - what is being pushed is always your base branch with changeset version applied to it. So unless you remove something on your base branch you won't "lose" it from the versioning PR either.

the version branch becomes a sort of de-factor primary branch (like, e.g. master), right? Or, vice-versa.

Not quite. Your base branch stays untouched - we only create a branch from it that can be merged to that base branch at any time to trigger the release (assuming you have our action installed on the base branch).

The way I implemented it (there's a tradeoff, of course), is to have the commit to master create a second commit – the result of version.

It sounds like you make a release after each merge to your base branch - which is fine, but it's not something we default to here. As mentioned - the releases don't happen rapidly with each merge to the base branch, but rather can be done at any suitable time by simply merging the versioning PR.

but there's still the problem that two rapid commits to master produce a race-condition. Was wondering if you'd put thought into that and had a workaround.

I thought about race conditions in general regarding this workflow, but haven't encountered them in practice yet.

authors: Andarist dfee

repo: atlassian/changesets


text:
Transaction error

Good afternoon,
I'm facing an issue every time I try to run a transaction of any kind because I receive the following error (notice: using "normal" firebase, transactions work without problem):
type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'Future<Null>?'

package:cloud_firestore_mocks/src/cloud_firestore_mocks_base.dart 88:5  MockFirestoreInstance.runTransaction

By diving a little bit deeper in the changes of the most recent version I noticed this change:
//old version
  Future<Map<String, dynamic>> runTransaction(
      TransactionHandler transactionHandler,
      {Duration timeout = const Duration(seconds: 5)}) async {

//new version
  Future<T> runTransaction<T>(TransactionHandler<T> transactionHandler,
      {Duration timeout = const Duration(seconds: 30)}) async {

When I saw this change I tried to specify the transaction type (see below) to see if the issue got solved. However, even if the error disappears, the transaction is not executed.
//specify dynamic
FirebaseFirestore.instance.runTransaction<dynamic>(/*code*/);

So I'm guessing if the issue is related to the latest update of the package

The related diff of official plugin is https://github.com/FirebaseExtended/flutterfire/commit/27d574e620c3a95792682397b12e54e40abe572f#diff-4b03d320cd06661a52dd22772cf78abfL82-R181
Would you provide sample code ?
If you can, please provide test case like this https://github.com/atn832/cloud_firestore_mocks/blob/66b043f566cd858db9670e8bc4e228fc2a167580/test/cloud_firestore_mocks_test.dart#L842

I tried different cases and I found that the error happens only if there isn't a return statement or you return null, while, on the official firebase plugin, even if the return statement is suggested is not mandatory.
//Sample generating the issue
final FirebaseFirestore firestoreMock = MockFirestoreInstance();

  final String mockID= 'anduqw098eh12nesad2';
  final Map<String, dynamic> mockUser = {
    'id': mockID,
    'nickname': 'nick',
    'email': 'not@relevant.com',
  };

  test('transaction get and update', () async {
    //GIVEN: SETUP DB ADDING A MOCK USER
    DocumentReference mockUserReference=firestoreMock.collection('users').doc(mockID);
    mockUserReference.set(mockUser);

    //WHEN: RUN TRANSACTION (READ+UPDATE)
    //ADD 'aaaa' to the nickname
    await firestoreMock.runTransaction((transaction) async {
      DocumentSnapshot snapshot = await transaction.get(mockUserReference);
      transaction.update(mockUserReference, {'nickname': snapshot.data()['nickname']+'aaaaa'});
      //add return here to solve.
    });

    //ASSERT:
    DocumentSnapshot userSnap = await mockUserReference.get();
    expect(userSnap.data()['nickname'], 'nickaaaa');
  });

@AndreaCostanzo1 thanks for your good report.
Because I found the reason, I will send the PR to resolve that issue.

https://github.com/atn832/cloud_firestore_mocks/pull/130

I've published @sensuikan1973's fix at https://pub.dev/packages/cloud_firestore_mocks/changelog#0501. Thank you!


text:
Holy s**t Atom deleted everything

Prerequisites

[ ] Can you reproduce the problem in safe mode?

Not entirely sure about this.

[ ] Are you running the latest version of Atom?

Yes. I have "install new updates on restart" enabled.

[ ] Did you check the debugging guide?

I asked on Slack (atomio.slack.com) and one user mentioned how I should definitely file an issue for this. I've never seen or heard any application delete all packages and user settings based on application close.

[ ] Did you check the FAQs on Discuss?

Just performed cursory search, no issues like this open.

[ ] Are you reporting to the correct repository?

This happened to the Atom editor.

[ ] Did you perform a cursory search to see if your bug or enhancement is already reported?

Just did, this was not a crash (closed properly), but when it restarted all the packages were missing.
For more information on how to write a good bug report or enhancement request, see the CONTRIBUTING guide.
Description
Atom deleted all of my packages and themes upon application restart. Not really sure how else to elaborate on this, but pretty much reverted to base install (maybe more basic as file explorer is not present on left-hand-side as well).
Steps to Reproduce

Have a lot of tabs open (I had my React project open at the time and had my README.md, and many Javascript files)
Notable installed packages include those needed to run .eslintrc file (eslint-plugin-{react, lodash, etc.}, eslint)
Delete tabs by using shortcut Cmd + P really fast
Reopen Atom by typing in Terminal atom . in targeted directory
cry

Expected behavior: [What you expected to happen]
Atom closes and starts up again with all packages and themes present. File explorer present on left hand side.
Actual behavior: [What actually happened]
Atom deleted all themes and packages. ~/.atom directory still exists, ~/.atom/packages does not. No green square on bottom-left-hand-side (not sure if I should be looking for this.)
Still present: all directory files (Atom did not touch any of my files, and since I had just pushed to devel branch there weren't any unsaved changes to any files so I don't know if those would have been lost or not).
Versions
Atom 1.9.8
apm 1.10.0
OS: OS X 10.11.5

In Slack you said you used Cmd+W, but in these repro steps you say Cmd+P. Is that a typo?

Yes, that is a type. It is Cmd+W, not Cmd+P. Corrected in the issue.

repo: atom/atom


text:
there is  a problem after open Atom

After I download Atom from inernet ,I open it and find a red tips

Cannot find module '/Users/myName/Downloads/Atom.app/Contents/Resources/app.asar/src/display-buffer'

I do not know what is wrong with it , please give me some suggestions  , 3Q

And there is the path screenshots

this is the path

error screenshots