BUG: AssertionError, the SHAP explanations do not sum up to the model's output!

Issue Description
AssertionError: The SHAP explanations do not sum up to the model's output! This is either because of a rounding error or because an operator in your computation graph was not fully supported. If the sum difference of %f is significant compared to the scale of your model outputs, please post as a github issue, with a reproducible example so we can debug it. Used framework: pytorch - Max. diff: 0.2749565706762951 - Tolerance: 0.01
Minimal Reproducible Example
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, LabelEncoder
import torch
import torch.nn as nn
import torch.optim as optim
import shap

# Data Preprocessing Class
class TitanicData:
    def __init__(self, url):
        self.data = pd.read_csv(url)
        self.label_encoders = {}
        self.scaler = StandardScaler()
        self.preprocess()

    def preprocess(self):
        print(self.data.columns)
        self.data['Age'] = self.data['Age'].fillna(self.data['Age'].median())

        # Drop the 'Name' column as it is not useful for prediction
        self.data.drop(['Name'], axis=1, inplace=True)

        # Encode categorical features
        for column in ['Sex']:
            le = LabelEncoder()
            self.data[column] = le.fit_transform(self.data[column])
            self.label_encoders[column] = le

        # Split data into features and target
        self.X = self.data.drop('Survived', axis=1).values
        self.y = self.data['Survived'].values

        # Standardize features
        self.X = self.scaler.fit_transform(self.X)

        # Split into train and test sets
        self.split_data()

    def split_data(self, test_size=0.2, random_state=42):
        self.X_train, self.X_test, self.y_train, self.y_test = train_test_split(
            self.X, self.y, test_size=test_size, random_state=random_state
        )
        self.X_train = torch.tensor(self.X_train, dtype=torch.float32)
        self.X_test = torch.tensor(self.X_test, dtype=torch.float32)
        self.y_train = torch.tensor(self.y_train, dtype=torch.float32).view(-1, 1)
        self.y_test = torch.tensor(self.y_test, dtype=torch.float32).view(-1, 1)

# Neural Network Class
class TitanicNN(nn.Module):
    def __init__(self, input_size):
        super(TitanicNN, self).__init__()
        self.fc1 = nn.Linear(input_size, 128)
        self.fc2 = nn.Linear(128, 64)
        self.fc3 = nn.Linear(64, 1)

    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = torch.relu(self.fc2(x))
        x = torch.sigmoid(self.fc3(x))
        return x

# Training and Evaluation Class
class TitanicModel:
    def __init__(self, net, criterion, optimizer):
        self.net = net
        self.criterion = criterion
        self.optimizer = optimizer

    def train(self, X_train, y_train, epochs=20):
        self.net.train()
        for epoch in range(epochs):
            self.optimizer.zero_grad()
            outputs = self.net(X_train)
            loss = self.criterion(outputs, y_train)
            loss.backward()
            self.optimizer.step()
            print(f'Epoch {epoch+1}/{epochs}, Loss: {loss.item():.4f}')

    def evaluate(self, X_test, y_test):
        self.net.eval()
        with torch.no_grad():
            outputs = self.net(X_test)
            predicted = (outputs > 0.5).float()
            accuracy = (predicted == y_test).sum().item() / y_test.size(0)
            print(f'Accuracy: {accuracy * 100:.2f}%')
        return predicted

# Explain the model's predictions using SHAP
class SHAPExplainer:
    def __init__(self, model, data):
        self.model = model
        self.data = data
        self.explainer = shap.DeepExplainer(self.model.net, self.data.X_train)

    def explain(self, X_test):
        shap_values = self.explainer.shap_values(X_test)
        shap.summary_plot(shap_values, X_test.numpy())

# Main Execution
if __name__ == "__main__":
    url = 'https://web.stanford.edu/class/archive/cs/cs109/cs109.1166/stuff/titanic.csv'
    data = TitanicData(url)
    net = TitanicNN(input_size=data.X_train.shape[1])
    criterion = nn.BCELoss()
    optimizer = optim.Adam(net.parameters(), lr=0.001)
    model = TitanicModel(net, criterion, optimizer)
    model.train(data.X_train, data.y_train, epochs=20)
    predictions = model.evaluate(data.X_test, data.y_test)
    shap_explainer = SHAPExplainer(model, data)
    shap_explainer.explain(data.X_test)

Traceback
Traceback (most recent call last):
  File "c:\Users\Joao Ferreira\Documents\Titanic_Explainability\main.py", line 112, in <module>
    shap_explainer.explain(data.X_test)
  File "c:\Users\Joao Ferreira\Documents\Titanic_Explainability\main.py", line 98, in explain
    shap_values = self.explainer.shap_values(X_test)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Joao Ferreira\anaconda3\envs\Work\Lib\site-packages\shap\explainers\_deep\__init__.py", line 159, in shap_values
    return self.explainer.shap_values(X, ranked_outputs, output_rank_order, check_additivity=check_additivity)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Joao Ferreira\anaconda3\envs\Work\Lib\site-packages\shap\explainers\_deep\deep_pytorch.py", line 214, in shap_values
    _check_additivity(self, model_output_values.cpu(), output_phis)
  File "C:\Users\Joao Ferreira\anaconda3\envs\Work\Lib\site-packages\shap\explainers\_deep\deep_utils.py", line 20, in _check_additivity
    assert maxdiff < TOLERANCE, "The SHAP explanations do not sum up to the model's output! This is either because of a " \
           ^^^^^^^^^^^^^^^^^^^
AssertionError: The SHAP explanations do not sum up to the model's output! This is either because of a rounding error or because an operator in your computation graph was not fully supported. If the sum difference of %f is significant compared to the scale of your model outputs, please post as a github issue, with a reproducible example so we can debug it. Used framework: pytorch - Max. diff: 0.2749565706762951 - Tolerance: 0.01

Expected Behavior
No response
Bug report checklist

[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest release of shap.
[X] I have confirmed this bug exists on the master branch of shap.
[ ] I'd be interested in making a PR to fix this bug

Installed Versions
shap==0.45.1

Same issue here when I run shap on a residual CNN regression model.

Same issue when running deep explainer on a network with the following structure:

Masking(self.constant_value, input_shape=(nsteps, nfeatures)

tf.keras.layers.LSTM(n, return_sequences=True),

tf.keras.layers.Dropout(a),

tf.keras.layers.LSTM(w, return_sequences=True),

AttentionLayer(),

tf.keras.layers.Dense(1, activation='sigmoid', bias_initializer=None)

I also tried GradientExplainer there was not any error message, but I had the same issue: the sum between shap values and the base value did not match the model output


onclick on mobile mode

Hi authors,
I use bootstrap-select on mobile, so I set the option data-mobile to true and it works fine when I press it on screen, it shows a popup item select like android does. However, I am trying to get an input field that when I enter key code 13 (which is Enter) and than that emulate press action.
I use jquery to select the  dom and use .click() :
$("button[data-id='theType']").click()
The dropdown still able to display, but it is on the normal style like I did not set the data-mobile to false.
Maybe I just missed out something or I should not use .click on the button rendered. please let me know if there are any hints, Thank you for the great plug-in =)

You'll want to initiate the click on the select element itself, rather than the button. The button is simply for appearances, and is actually underneath the select when mobile is enabled.


Use streams-lib as polyfill

Chrome natively supports ReadableStream and Firefox will soon have it (for now via dom.streams.enabled). Changing util.js to allow conditionally include ReadableStream as polyfill.

/botio test

I'm assuming here that people who use the extension will not be using very old version of chrome

/botio-linux preview

Looks good. Thank you!


feature request: enhancements to Endpoint#play method

Currently, the Endpoint#play method takes either a single file (as a string) or an array of files (as an array).  I would like to offer another possibility:

the method takes an object, which contains a single file to play and a seek offset at which to start playing it (ie can play from somewhere in the middle of the file). See here for details on how to play a file on freeswitch from a given offset.

So for example, this would be possible:
ep.play({file: 'http://example.com/recording.wav, seekOffset: 7000});

If an object is passed it can have the following properties:

file: required, the name of the file to play (string),
seekOffset:  optional, the seek offset to start play (integer, default: 0)
timeoutSecs: optional, the number of seconds after which to automatically stop the play, (integer, default: play entire file)

The method should then play the fill starting from the given offset.
This option is only available when playing a single file, not an array of files.
Furthermore, when the play is done we currently call the callback and pass back playbackSeconds and playbackMilliseconds to tell the caller how much of the call was played.  This payload should be enhanced to include:

playbackLastOffsetPos

Hey @davehorton, I can work on this.

great!

Actually, looks like this got implemented already back in august.

ah right I forgot!

published in 2.4.6


Replace cargo-project with cargo-metadata

This started as a fix for #41 , but it ended up making quite a few invasive changes 😅 .
This replaces cargo-project with cargo-metadata. Cargo project isn't very robust: it tries to guess where cargo places things, has its own parser for cargo's project files that sometimes fails, etc... This causes issues like #41.
Instead, I propose we let the cargo binary tell us this information where possible. To achieve this, we use the cargo_metadata crate to parse the output of cargo build --message-format=json to find out where the binaries/libs/examples end up. We also use it to parse the cargo metadata output, which tells us where the target path is located. This has the advantage of being quite a bit more fool-proof, working with workspaces and stuff.
This comes with a couple of disadvantages:

Somewhat unexpectedly, the JSON message format does not include the target triple of the generated binary. I'll probably be making an issue (and maybe a PR?) to cargo to add this, but it means we have a bit of an ugly heuristic to figure out the target (see from_artifact function).
As an alternative, I guess I could get the target via the from_flag function, using cargo_metadata only to get the artifact path.

cargo build can generate multiple files for an artifact. This is especially problematic for libs, which generate an rlib and an rmeta. I made it just pass the first file to the tool (which is always the rlib), but that's sort of fickle (IDK if it's guaranteed by cargo that the first element will always be the rlib - It probably isn't). A more robust solution would be nice.

EDIT: I suspect this would also fix the issues #51 and #22

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @reitermarkus (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

I also ran into #41 which this seems to solve.  What's needed to move it forward?

bors r+

bors retry


FS example does not run

[Enter feedback here]
many errors,  starting with feature_store not defined, which I fixed as from databricks import feature_store I'm using ML 13.1
am I doing something incorrectly?

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

ID: c36a99a9-7386-90fd-8d31-d8c676049700
Version Independent ID: c36a99a9-7386-90fd-8d31-d8c676049700
Content: Feature Store workflow overview - Azure Databricks
Content Source: databricks/machine-learning/feature-store/workflow-overview-and-notebook.md
Service: azure-databricks
GitHub Login: @mssaperla
Microsoft Alias: saperla

@ulc0
Thanks for your feedback! We will investigate and update as appropriate.

@ulco
It seems like you are trying to use the feature store in Azure Databricks and encountering some errors. It's great that you were able to fix the first error by importing the feature store from databricks. However, it's difficult to say what the issue is without more information about the specific error messages you are seeing.
Can you please provide more details about the errors you are encountering? Specifically, what is the error message you are seeing and what line of code is causing the error? This will help me better understand the issue and provide you with more specific guidance.
For an issue like this, I'd recommend you create a support ticket since the support team will be able to respond much more quickly and have a conversation with you to figure out what could be going on.

Hi I was on PTO, I'll get this information by COB today


update dev guide to explain proto build process

We should add a section to the dev guide about generating protos explaining:

The instructions in https://github.com/penumbra-zone/penumbra/tree/main/tools/proto-compiler about how to compile the protos
That the version of protoc in apt is pretty old and to follow these instructions if you're not on mac: https://grpc.io/docs/protoc-installation/#install-pre-compiled-binaries-any-os

See PR #1475 which has helpful text for the guide

There's a draft PR at https://github.com/penumbra-zone/penumbra/pull/1559. I'm happy with the docs changes, but hope to tack on a CI check that'll nag devs if they forget to rebuild the protobuf specs when necessary.


CAN_83K3BPS for 8MHz not defined

 CAN.begin(CAN_83k3BPS, MCP_8MHz);
won't work, because in mcp_can.cpp, there is no 83k3BPS case in the select statement for MCP_8MHz.
Also, in mcp_can_dfs.h,
#define MCP_8MHz_83k3BPS_CFG1 (0xxx)
#define MCP_8MHz_83k3BPS_CFG2 (0xxx)
#define MCP_8MHz_83k3BPS_CFG3 (0xxx)

is missing.
Probably forgotten at #49

Thanks for your suggestion, we will add it.

or
#define MCP_8MHz_83k3BPS_CFG1 (0x01)
#define MCP_8MHz_83k3BPS_CFG2 (0xbe)
#define MCP_8MHz_83k3BPS_CFG3 (0x07)

If you feel you need to continue the discussion, you can reopen the issues.


fixing copy-paste error in non-tree onnx tests

This was a copy paste error from our LGBM tests

Codecov Report

Merging #210 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
- Coverage   93.94%   93.93%   -0.01%
==========================================
  Files          35       35
  Lines        1850     1848       -2
  Branches      325      325
==========================================
- Hits         1738     1736       -2
  Misses         60       60
  Partials       52       52

Flag
Coverage Δ

#unittests
93.93% <ø> (-0.01%)
:arrow_down:

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

Impacted Files
Coverage Δ

...rd/ml/operator_converters/_tree_implementations.py
98.07% <0.00%> (-0.02%)
:arrow_down:

Continue to review full report at Codecov.

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


How to resize the Dialog?

Starting a new issue to continue to discussion with @johnnyongesa from #129.
Please see the demonstration of resizing a dialog here: http://plnkr.co/edit/tPZ8GJ?p=preview

All you should need to add to your CSS is the following override:
.ms-Dialog-main {
  max-width: 600px; /* Your maximum width here */
}

Thank you. its working


use active-class props in router-link to add class to the active route

The navbar earlier used conditional statements to add class to the currently active route. Use the active-class prop of router-links component.
fixes #95

Thanks!


k9 doesn't allow commas in Recipient Names (to/cc/bcc)

Describe the bug
I can't add commas to mail recipients
To Reproduce
Start writing an e-mail.
Paste this into the to/cc/bcc fields:
"h<EMAIL_ADDRESS>Expected behavior
it pastes the string instead of deleting it due to the comma in the naming string.
Answering e-mails works fine and keeps these names but you cannot write or paste names with commas within K9 itself.
Environment (please complete the following information):

K-9 Mail version: 5.7.34
Android version: 10, Havoc OS 3.12
Device: OnePlus 3T
Account type: irrelevant, IMAP

Logs
I could take some logs but reproducing this is easy.

Maybe similar?   Cannot paste group of emails into address portion (either direct recipient, or CC or BCC) after holding group of email in K-9 and receiving confirmation "Addresses copied to clipboard" - paste into address field shows nothing pasted.   Does not allow paste from clipboard - when selecting Paste, no text appears in the address field.
K9  v 5.734
Android 10  (Samsung ver FFUE1)
Samsung SM-960F

@zzDrew: See #5199


Default 'host' Header when proxying requests

Any reason why the "host" header is not set to the host by default?
Ran into a problem with my nginx server when requests were proxied without changing the incoming host header. Just wanted to know if there's any reason behind not making this a default behaviour.

+1 (Having the exact same problem)


Build status email notifications

Describe the solution you'd like
I would love to get build status email notifications (passed/failed/etc.)
Describe alternatives you've considered
In AppCenter, there is no dashboard with the current build status. If an organization has multiple apps with multiple builds running on a regular basis, checking build status requires visiting each app's build page to see build execution results.
Additional context
Add any other context or screenshots about the feature request here.

Hey @vmalyi - you can manage your email notifications in your app settings page.

It's a bit hidden but the email settings we have should meet the solution requirements you described. Let me know if that's not the case.
I've also linked a few feature requests similar to your note about app dashboards:
https://github.com/microsoft/appcenter/issues/1184
https://github.com/microsoft/appcenter/issues/1567
https://github.com/microsoft/appcenter/issues/937
Feel free to give them a +1. Thanks!


Addition of dist directory for usage in Bower

Do you have any issues with including the dist directory so this package can be used with Bower?

How would the contents be kept up to date with every release?
And... why does everybody seem to think sanitizing HTML on the browser side
makes any sense??? (I kid, sorta, because I gather some people are cool
with storing user-entered markup and sanitizing it every time it is
displayed... but it sure doesn't make nearly as much sense as doing it
once on the server (: )
On Thu, Nov 30, 2017 at 12:58 PM, Cory Chase<EMAIL_ADDRESS>wrote:

Do you have any issues with including the dist directory so this package
can be used with Bower?
You can view, comment on, or merge this pull request online at:
https://github.com/punkave/sanitize-html/pull/186
Commit Summary

Addition of dist directory for usage in Bower

File Changes

M .gitignore
https://github.com/punkave/sanitize-html/pull/186/files#diff-0 (1)
M README.md
https://github.com/punkave/sanitize-html/pull/186/files#diff-1 (2)
M package-lock.json
https://github.com/punkave/sanitize-html/pull/186/files#diff-2 (2)
M package.json
https://github.com/punkave/sanitize-html/pull/186/files#diff-3 (2)

Patch Links:

https://github.com/punkave/sanitize-html/pull/186.patch
https://github.com/punkave/sanitize-html/pull/186.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/punkave/sanitize-html/pull/186, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB9fU6sO09ye_9iUyiPIiFb9ENhJbHvks5s7uy5gaJpZM4Qw9aJ
.

--
THOMAS BOUTELL, CHIEF SOFTWARE ARCHITECT
P'UNK AVENUE |<PHONE_NUMBER>  |  punkave.com

Oh, it's definitely not elegant and I wish I didn't have to worry about Bower anymore, but I suppose it would have to be built out and pushed for each release.
I absolutely agree about where and how the sanitization needs to live. We just discovered a minor exploit and want to close the gaps as quickly as possible. We're using sanitize-html to clean up the output until we close the hole in the API because of regression considerations.
I completely understand if this addition isn't worth the headache, but I thought I'd reach out all the same.

Have a look at what was just published in 1.16.3, I believe it should meet your needs, if something more is needed please open a PR that leverages the build that is now in dist/. Thanks!


Does it support the smart Humidifier?

Is there a list of devices that are supported by this integration?  I have a bunch of their lights in my set up that are working fine after I was able to tweak the API refresh rate, but I just purchased and set up 2 of their smart humidifiers which I'd like to control with a simple on/off command however I do not see them being picked up by this integration. The specific model I am referring to is the H7141.
Thanks!

Would also be interested, as I'd like to control my govee fan via temp/humidity sensors

Same here. Tower fan.

Same here. Tower fan.

I've got the H7160 humidifier that I'd love to get connected. I've got it in HomeKit by way of Homebridge but it's not showing up through HomeKit Controller.

Hmm, bump.  Would be interested in implementing

New API supports both Lights and Appliances: https://developer.govee.com/

Yes, a separate issue has been raised for the new API support; #138


[UX] Clean up Vite boilerplate content

Hey @akiskips, do you need assistance with the web app?

Hey @akiskips, do you need assistance with the web app?

Hi @jamelachahbar , Sure! Just starting.
Lets sync.


[Feature Request]: Use unique id for Python BigQueryIO

What would you like to happen?
There can be a collision when 2 pipelines using templates are loading to BigQuery at the same time to the same temp_location.
@baeminbo found there is code to use unique_id [1], but it seems that templates can re-use the same uuid. It is fixed for Java[2] by moving the UUID generation into a DoFn of a ParDo
[1] https://github.com/apache/beam/blob/v2.34.0/sdks/python/apache_beam/io/gcp/bigquery.py#L2399
[2] https://github.com/apache/beam/blob/v2.34.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java#L1094-L1105
Issue Priority
Priority: 2
Issue Component
Component: io-py-gcp

Given that this collision can occur only when using templates, is this an issue in Python's BQ IO?

I suspect this issue was open in regards to Python classic templates, which create a pipeline creation request at template creation.
cc: @harrisonlimh who I think also looked at or is looking at this issue.

.take-issue

I think this is a non-issue, given this is fixed in Java. IIUC, because templates use only Java IOs under the hood (and the direction of templates seems to be to migrate to flex), a fix here should be unnecessary.

.close-issue

I think this is a non-issue, given this is fixed in Java. IIUC, because templates use only Java IOs under the hood (and the direction of templates seems to be to migrate to flex), a fix here should be unnecessary.

I think this is a pronounced misinterpretation of the issue. The existing BigQuery IO transforms in the Beam SDK do not use Java at all, only the new Storage API based writer does that, so all unchanged existing code is expected to rely on code that has this issue.
Furthermore while Flex templates exist and it seems to be a desire by the Dataflow maintainers for uses to migrate to them, the classic templates are still fully supported, keep being developed and no deprecation notice has been issued. At my job we have currently no desire to migrate to Flex templates as they solve 0 issues for us and would only introduce unwanted latency in our job orchestration.

templates use only Java IOs under the hood

You refer to Google-provided classic tempates; however Python users can and do create templates, and yes classic templates are still supported. Also, this should be easy to fix.

@svetakvsundhar do you still plan to look into this?


Add functionality to generate RV files that users can export through RavenPy

In RavenWPS, we have the option to have the WPS server return the bundled rv files as a zip. Having this option exist explicitly in RavenPy would help a lot to simplify the model building process.
I'm thinking something like calling "model.export_rv" or something like this that will return a link to the rv files.
Perhaps this exists but I can't seem to find it!
Thanks

I seem to have found the model.outputs['rv_config'] method, however on the pavics.ouranos.ca server it goes to a /tmp/ folder and I can't seem to download it. Any way we can make this available to the user?

You can set the workdir, where all these files will be created.
e.g.
HMETS(workdir="./exp01")

Thanks for the quick answer, and sorry for my delayed response.
I tried this, and I get this error:
model = GR4JCN(workdir="./exp01")
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('exp01/exec/model/p00/raven'): PosixPath('exp01/exec/model/p00/raven')

I should mention that it does create the folder in my writable-workspace parallel to the notebooks with the input files, but not the output files due to the error noted above.

I can't reproduce this problem. On my end the directory is created and in the final subdirectory I can see the rv.zip file and download it. Reopen if problem occurs on your end.


The AudioStreamWav unit

Tested versions
Latest version of the master branch hash: f4af8201bac157b9d47e336203d3e8a8ef729de2
System information
Gentoo 2.15 - Wayland - integrated AMD Radeon Graphics (RADV RENOIR) - AMD Ryzen 5 5600U with Radeon Graphics (12 Threads) - pipewire - libpipewire 1.0.7
Issue description
The unit test [Audio][AudioStreamWAV] Save empty file segmentation faults. 3 other of my friends (all of which run linux) also tried running the tests and also got segmentation faults.
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
===============================================================================
./tests/scene/test_audio_stream_wav.h:230:
TEST CASE:  [Audio][AudioStreamWAV] Save empty file
  Stream can be saved as .wav

./tests/scene/test_audio_stream_wav.h:230: FATAL ERROR: test case CRASHED: SIGSEGV - Segmentation violation signal

===============================================================================
./tests/scene/test_audio_stream_wav.h:230:
TEST CASE:  [Audio][AudioStreamWAV] Save empty file

DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
  Stream can be saved as .wav

===============================================================================
[doctest] test cases:   8 |   7 passed | 1 failed | 1037 skipped
[doctest] assertions: 131 | 131 passed | 0 failed |
[doctest] Status: FAILURE!

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.dev.custom_build (f4af8201bac157b9d47e336203d3e8a8ef729de2)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x3c9d0) [0x7ff5f42ba9d0] (??:0)
[2] ./bin/godot.linuxbsd.editor.x86_64(+0x67260e8) [0x5558fff4f0e8] (??:0)
[3] ./bin/godot.linuxbsd.editor.x86_64(+0x3496a03) [0x5558fccbfa03] (??:0)
[4] ./bin/godot.linuxbsd.editor.x86_64(+0x3497d43) [0x5558fccc0d43] (??:0)
[5] ./bin/godot.linuxbsd.editor.x86_64(+0x2f2bb40) [0x5558fc754b40] (??:0)
[6] ./bin/godot.linuxbsd.editor.x86_64(+0x300039b) [0x5558fc82939b] (??:0)
[7] ./bin/godot.linuxbsd.editor.x86_64(+0x2edbdf0) [0x5558fc704df0] (??:0)
[8] ./bin/godot.linuxbsd.editor.x86_64(+0x2e3c5fa) [0x5558fc6655fa] (??:0)
[9] /lib64/libc.so.6(+0x26350) [0x7ff5f42a4350] (??:0)
[10] /lib64/libc.so.6(__libc_start_main+0x89) [0x7ff5f42a4409] (??:0)
[11] ./bin/godot.linuxbsd.editor.x86_64(+0x2e3c4a5) [0x5558fc6654a5] (??:0)
-- END OF BACKTRACE --
================================================================
[1]    1966 IOT instruction  ./bin/godot.linuxbsd.editor.x86_64 --test --test-case="*[AudioStreamWAV]*"

Steps to reproduce

Pull the repository
Compile with tests
Run tests

The exact command I use to compile and run the test:
scons linker=mold tests=true vscode=yes && ./bin/godot.linuxbsd.editor.x86_64 --test --test-case="[AudioStreamWAV]"
Minimal reproduction project (MRP)
N/A

I don't understand why it's not detected by the github actions

It seems like building with dev_build=yes doesn't segfault o.0

There are tests that are run with sanitizers in GitHub actions, but (at least for the UB sanitizer) don't make the job fail if it detects problems. Should they be treated as errors?

The test doesn't segfault with asan and lsan sanitizers :/

Closed by https://github.com/godotengine/godot/pull/100422


Remove static constants

PR Summary
Please review commit by commit.
Historically PowerShell code contains a lot of static constants because of limitations in old .Net APIs. For example, now we have string.Split(char) and can use it instead of string.Split(char[]).
I had to refactor some methods.

Escape() method now is more short, simple, clear and fast.
GetModuleNameAndVersion() method is refactored based on Regex. Regex is very fast in latest .Net versions.
PathSearchTrimEnd is removed based on https://github.com/dotnet/runtime/issues/76122#issuecomment-1256977256
(for ex., now we don't remove trail spaces that are valid in file names)

PR Context

PR Checklist

[ ] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[ ] Summarized changes
[ ] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[ ] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[ ] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[ ] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:

[ ] Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode
(which runs in a different PS Host).

[ ] Issue filed:

[ ] Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.

[ ] Issue filed:

[ ] Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).

[ ] Issue filed:

[ ] Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

[ ] Issue filed:

I suggest splitting PathSearchTrimEnd changes.

We could avoid some string allocations with the following IndexOfAny<T> overloads:

IndexOfAny(ReadOnlySpan, T, T).
IndexOfAny(ReadOnlySpan, T, T, T).

I suggest changes to CompletionCompleters.NativeCompletionVariableCommands are split as well.

I don't think it's really worth the changes.

My intention was to remove static initializations (not just these) that slow down startup. If you don't find it useful, you can close this PR. Sorry for wasting your time.

@iSazonov I didn't mean to frustrate you and I absolutely appreciate your intention for starting this work (this is not a simple change and you obviously put lots of effort).
I do agree with the gist of your idea, and that's why I spent time going through the changes here. But we need some compromises, for example, for IndexOfAny('\\', '/', ':'), how about we have Separators.DirectoryOrDrive to be const string of "\\/:", and then use it as IndexOfAny(Separator.DirectoryOrDrive)? With this, there will be much less changes, which is easier for you to change as well as for others to review. I'm not asking for doing this for all existing members in Separatos, for those with single character values, I think you are right that we don't need to create a const member for them.
Also, it would be less obstacles to get the PR in if there are not semantic changes bundled together, such as the changes to regex.Escape. If you do think that's faster, then get the measurement to prove it and open a separate PR for it. Mixing them in one PR makes it harder to push it through.

I didn't mean to frustrate you

I know :-)

It's easier if you use the commits you find useful. You can delete the rest. Disagreement about personal preferences is not something worth wasting our time on.

Escape and DirectoryOrDrive reverted.

Escape was moved to #18230

@daxian-dbw Could you please merge?

Thanks for the reminder!


On usability of NPM and JSPM manager

Intention

I'm initiating a discussion that should result with  a feature request

Original context from Gitter chat

My explanations to items tagged with red markers:
Marker 1
Before making any "sweeping" change (like upgrading the Aurelia framework version) Monterey needs to make backup copies of all affected files (package.json / config.js when using SystemJS module loader) to allow eventual "undo" later.
Marker 2
This is a complex way of saying that I would like to see Monterey know all versions of all modules of interest and be able to find "fitting combinations".
Example:
command npm view aurelia-kendoui-bridge versions will list all registered versions of aurelia-kendoui-bridge:

npm view aurelia-templating versions yields

Monterey user should be able to say I want to use the latest version of KendoUI bridge that works with Aurelia framework that has its  aurelia-templating ver. 1.0.0-rc.1.0.1
Anyone claiming how this is an unreasonable expectation, imagine the example that is closest to this one and is condered reasonable 😏 )
Marker 3
Marker 4.

I may want to upgrade to Aurelia version "one before latest" for example

This is exactly something I wanted to add to the JSPM/NPM package manager screens.
In https://github.com/monterey-framework/monterey/issues/99#issuecomment-239767318 I wrote this:

Right now we have to do tens of requests to NPM/Github to find out the latest version of a package. There isn't a nice http endpoint where we can say "Get me the versions of packages X, Y and Z" with a single http request. Right now we need to do a requests for X, Y an Z seperately. If we build a http API then monterey can do a single request, and the http api can do caching to speed up the process even more.

Maybe there are existing solutions for this already, but this is the problem we need to solve before we can implement the feature that you are proposing. I have opened up https://github.com/monterey-framework/monterey/issues/361 for when we don't find existing solutions

Monterey user should be able to say I want to use the latest version of KendoUI bridge that works with Aurelia framework that has its aurelia-templating ver. 1.0.0-rc.1.0.1

What you are explaining here is semver, because based on semver you should be able to figure out compatibility between packages. JSPM is doing this when we call jspm install or jspm update

A different feature, similar to this, would be to remove (and add again) the caret (^) sign in front of all dependencies of your app, so that JSPM will not automatically download the latest version of a library without you knowing

And i'd like to have some sort of fork analyzer, something that could help you figure out why the hell forks were created. Right now we this in a very basic form (it will warn you that there are forks, and what packages were forked) but not why

I may have not been sufficiently clear - my expected solution requires more than semver which I saw failing often. I used the term expert system defined as

In artificial intelligence, an expert system is a computer system that emulates the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning about knowledge, represented primarily as if–then rules rather than through conventional procedural code

So, our database would be peppered with if-then-rules that the whole community maintains (with supervision of course).
Again, as before having this expert system in our plans does not preclude any of the solutions being discussed in this thread.
My dream goal would be a query like: 'find the best combination of aurelia-framework 1.0.2 with kendoui-bridge and jQuery newer than 2.4- and that comes back withdone, your old package.json / config.js saved -- click here to revert`

Love the discussion label!!

A triple YESSSS to the fork analyzer](https://github.com/monterey-framework/monterey/issues/360#issuecomment-251137132) idea

So, our database would be peppered with if-then-rules that the whole community maintains (with supervision of course).

The problem I see here is that there are so many different packages, each releasing new versions pretty rapidly, so the chance of Monterey knowing about one particular compatibility issue between two packages is very small. Also, little reward of reporting compatibility issues (you report something but will probably never hear back) could be an issue as well

I completely agree with this - which is why I am defining such unlikely to reach goal. My hope is that might use some of the tricks from the that "expert systems bag"


Remove redundant children definition

This method is already mixed in from AST::NamedChildren it seems. The
super mutation is useful! Huzzah!

Nice catch


Branch rename savefile

This PR updates the savefile name for the application from "addressbook.json" to "managera.json".
Instructions for developer team:
To allow this to take effect in your local copy. Delete the config.json and preference.json files from the tp folder then start the app.

Codecov Report

Merging #215 (d5ce904) into master (352a415) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master     #215   +/-   ##
=========================================
  Coverage     76.33%   76.33%
  Complexity      801      801
=========================================
  Files           115      115
  Lines          2252     2252
  Branches        262      262
=========================================
  Hits           1719     1719
  Misses          456      456
  Partials         77       77

Impacted Files
Coverage Δ

...u/address/storage/JsonSerializableAddressBook.java
100.00% <ø> (ø)

src/main/java/seedu/address/model/UserPrefs.java
80.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Update Node  ver and others deps

1.update deps and ver;
2.update example checkout version;
3. add ZH README.md and superlink

This would resolve #40. Any update?


Preservation of receive buffer causes underflow

Sometimes, I get a panic like this:
thread 'main' panicked at 'attempt to subtract with overflow', /home/vorner/.cargo/git/checkouts/neli-94d2bc1fa408b168/ad0cb18/src/nl.rs:104:31
stack backtrace:
   0:     0x5555555810a4 - backtrace::backtrace::libunwind::trace::h7eb4b43b611b7867
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1:     0x5555555810a4 - backtrace::backtrace::trace_unsynchronized::hd915225b960621fe
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2:     0x5555555810a4 - std::sys_common::backtrace::_print_fmt::h03e09238238aa7ea
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x5555555810a4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd2bc77662b898564
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x5555555994fc - core::fmt::write::h8ebd3dea7d60af99
                               at src/libcore/fmt/mod.rs:1030
   5:     0x55555557f687 - std::io::Write::write_fmt::hcc91da7d626d8d3c
                               at src/libstd/io/mod.rs:1412
   6:     0x555555583425 - std::sys_common::backtrace::_print::h71d790ff242dd25b
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x555555583425 - std::sys_common::backtrace::print::h0598a41f9f73dcfd
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x555555583425 - std::panicking::default_hook::{{closure}}::h402ca543df8941ce
                               at src/libstd/panicking.rs:200
   9:     0x555555583116 - std::panicking::default_hook::h654c705cfbcaa6d8
                               at src/libstd/panicking.rs:214
  10:     0x555555583a75 - std::panicking::rust_panic_with_hook::h56efa3c9265fc6c3
                               at src/libstd/panicking.rs:477
  11:     0x555555583612 - std::panicking::continue_panic_fmt::h21f1f952a36d712d
                               at src/libstd/panicking.rs:384
  12:     0x555555583506 - rust_begin_unwind
                               at src/libstd/panicking.rs:311
  13:     0x555555596eca - core::panicking::panic_fmt::hb830357db65719c4
                               at src/libcore/panicking.rs:85
  14:     0x555555596e09 - core::panicking::panic::hb2537515f34024e6
                               at src/libcore/panicking.rs:49
  15:     0x55555556222f - <neli::nl::Nlmsghdr<T,P> as neli::Nl>::deserialize::h41f512b50efc9532
                               at /home/vorner/.cargo/git/checkouts/neli-94d2bc1fa408b168/ad0cb18/src/nl.rs:104

I've discovered this is caused by preserving the self.buffer in socket after a receive of an error message ‒ and it seems the kernel sends something after the message, or I don't parse it fully correctly and there are some attributes I don't use.
It seems the next run of the recv_nl tries to reuse the buffer, or its leftover and as this is not the start of the message, it fails miserably.
I have few questions:

Why is the buffer even preserved? What I know, netlink is not like TCP, it's message-based. If a buffer is too short, it gets truncated, and you never get multiple messages through one recv. Or is there some other reason for that?
Should it panic/do such things if the message is garbage? Shouldn't it just return an error?

Please see #15. There are cases where netlink will return multiple messages. There is an example in that issue that the reporter provided showing that multiple messages can correspond to a single read.
As for the panic, you're correct. That should not happen. I'll take a look at using checked_sub instead. I had another contributor add that elsewhere and I intend to standardize on that.

I'm really surprised that the kernel can send multiple messages in one read, I did think it always corresponded 1:1 with reads/writes.
Anyway, I still have a gut feeling what I have here is some kind of a leftover from the previous message or unparsed garbage, not another message. For one, I'm expecting just one. For another, when I start examining the variables in gdb, the amount of data in the buffer is smallish, so it definitely wasn't truncated ‒ but the line where the underflow happens would suggest there isn't enough data in the message to make sense. So, even if the code uses checked_sub, what will it do at that place?
If you want to have a more concrete data in hand, I can reproduce it with this code: https://github.com/vorner/nelilog/commit/6069967783b3af055795e4db3fbdc4b1d4330132. If I run it as an unprivileged user, I get a permission denied error first. Then the panic. Indeed, that code is more of an experiment than something „nice“ or even correct, but I probably shouldn't be able to destroy neli's internal data through the API.

I'm really surprised that the kernel can send multiple messages in one read, I did think it always corresponded 1:1 with reads/writes.

It makes sense from a performance standpoint.  If the kernel can transmit multiple messages in one syscall, why wouldn't it?
I have personally witnessed this with the rtnetlink subsystem, so I think it's best to assume that it could happen in any subsystem.

@vorner I agree that there shouldn't be a panic. I'm going to put up a PR to switch over to returning an error if the usize value drops below zero. However, the panic you've highlighted here indicates you are incorrectly parsing the data. the length of the entire packet can never be less than the size of the netlink header. I agree that this should be an informative error instead of what you're getting, but I'd recommend looking at the binary data and see if you are indeed specifying the appropriate types for what's being returned from the kernel.

Yes, I know, I was parsing it as the wrong type.
But optimally, parsing one message as the wrong type should not damage the socket to the state it won't be possible to consume other messages ‒ if I understand correctly, netlink messages are length prefixed. If I parse one incorrectly, it should still be possible to eat the right amount of data (either give up parsing the wrong type when the length runs out, or consume the extra).

Thank you for your patience. I've been thinking on this a bit. I think providing some way to indicate that a message has failed parsing and moving on to the next one or allowing a re-parse is a great idea. I hadn't considered how to do that so I wanted to take some time to figure out what a reasonable implementation might be. Currently, this is what I propose:

Changes to buffering crate to support the position of both the beginning of the current message and the beginning of the next message. This would allow fast forwarding and discarding the current message or rewinding and retrying the message parsing.
Given that this check really only can be done at the message level, this would involve some special casing in the Nlmsghdr struct. This would allow storing the necessary information for replay and fast forwarding the buffer at the beginning of the deserialize() method. If a method below returns a DeError or the entire message is not consumed at the end of deserialization, return some error indicating that the message is not fully parsed and allow the user to handle either fast forwarding or rewinding through the buffering crate at the lowest level.
High level API considerations should probably be allowing the user to specify the default behavior when a message fails to parse. Either rewind or fast forward by default and also expose an API to override this if necessary.

How does this sound? I'm not set on how I've outlined this yet so I'd be happy to hear any suggestions you have.

To me it sounds reasonable, and probably solves part of #50, allowing to re-parse it as something different. So the error could contain optional u16 as the type and have methods to rewind (and then parse again as another type) and skip.
An alternative is to look for what others do. I've seen many use the bytes crate. That one has a buffer type that can be very cheaply split into smaller (owned) parts:
https://docs.rs/bytes/0.4.12/bytes/struct.Bytes.html (it implements the Buf trait, which allows reading basic types from it ergonomically).
That way, the receive buffer could be split into an iterator of (u16, Bytes) by the lengths. Then, the payload would be parsed from each Bytes buffer, which would already know its range. When parsing attributes and sub-attributes, the same way could be used uniformly ‒ splitting the Bytes into smaller chunks. That would solve this issue, #50 and #52 in one go. The disadvantage is obviously big API change and probably quite a lot of work to do it.

This should be resolved in branch v0.5.0-dev. Closing.


Packages containing a period results in invalid filename

Original Discussion: https://www.pika.dev/packages/@pika/web/discuss/1109
/cc @martinAnsty
Bug Description
@pika/web was built to install packages to PACKAGE_NAME.js, unless the package name already ended with .js (so that you don't end up with things like popper.js -> web_modules/popper.js.js).
It looks like there is a bug in this logic causing @pika/web to ignore .* and not just .js.
Expected Behavior
pixi.js is installed to web_modules/pixi.js
dat.gui is installed to web_modules/dat.gui.js

Actual Behavior
pixi.js is installed to web_modules/pixi.js
dat.gui is installed to web_modules/dat.gui

Fixed in d500b73


transformer.py:36-40: Compose train.csv data as input...

The puzzle 75-676fe262 from #75 has to be resolved:
https://github.com/h1alexbel/samples-filter/blob/cc3b08209239b202a6b789e602515299dea068f1/model/transformer.py#L36-L40
The puzzle was created by @rultor on 07-May-24.
Estimate: 45 minutes,  role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

The puzzle 75-676fe262 has disappeared from the source code, that's why I closed this issue.

@0pdd the only puzzle #119 is solved here.


added tests for upload functions

General Checkups

[x] Have you checked that there aren't other open pull requests for the same issue/update/change?
[x] If your code includes new features and not just bug fixes/copy editing: Did you include new tests?

Description

Related Issue

Example

Hi @madprime @gedankenstuecke , please review the pr for tests for upload function. Thanks :)

Hi @mcescalante , I changed the uri for maintaining uniformity across tests. Please review. Thanks!


[D435i] Motion and Camera (RGB, Depth) Frames can't be received simultaneously

Required Info

Camera Model
D435i

Firmware Version
<IP_ADDRESS>

Operating System & Version
Linux (Ubuntu 20.04

Kernel Version (Linux Only)
20.04

Platform
Linux

SDK Version
2.0 (v2.54.1)

Language
C

Issue Description
Hello, I'm dealing with an issue regarding getting motion and rgb/depth data from my D435i. I have read several other posts with helpful comments from @MartyG-RealSense regarding issues with using the realsense-viewer and accessing all three forms of data. I have also read additional posts indicating that this issue mostly involves the viewer and that scripts should be able to bypass it. @MartyG-RealSense recommends the use of callbacks for C++ and multiple pipelines for python.
So far I have tried :

Setting up two pipelines with callbacks: only the motion one ever produces frames (see below for details)
Setting up one pipeline with one callback: only ever produces motion frames (see below for details)
Using a thread with try_wait_for_frames: this hangs forever if the motion streams are included (works fine for just rgb and depth)
Using a thread with poll_for_frames: this of course succeeds but never produces any frames to iterate over

Code Excerpts:
One pipeline with callback:
    rs2::config cfg;
    cfg.enable_device(serial);
    cfg.enable_stream(RS2_STREAM_COLOR, colorWidth, colorHeight, RS2_FORMAT_RGB8);
    cfg.enable_stream(RS2_STREAM_DEPTH, depthWidth, depthHeight, RS2_FORMAT_Z16);

    cfg.enable_stream(RS2_STREAM_ACCEL, RS2_FORMAT_MOTION_XYZ32F);
    cfg.enable_stream(RS2_STREAM_GYRO, RS2_FORMAT_MOTION_XYZ32F);

    rs2::pipeline pipeline(ctx);
    pipeline.start(cfg, [&](rs2::frame frame){
        cout << "got frame: ";
        if (frame.as<rs2::motion_frame>()) {
            cout << "motion" << endl;
        } else {
            cout << "camera" << endl;
        }
    });

Output:
got frame: motion
got frame: motion
got frame: motion
got frame: motion
got frame: motion
...

Two pipelines with callbacks:
    rs2::pipeline pipeline(ctx);
   if (camera) {
         rs2::config cfg;
         cfg.enable_device(serial);
         cfg.enable_stream(RS2_STREAM_COLOR, colorWidth, colorHeight, RS2_FORMAT_RGB8);
         cfg.enable_stream(RS2_STREAM_DEPTH, depthWidth, depthHeight, RS2_FORMAT_Z16);

         pipeline.start(cfg, [&](rs2::frame frame){ cout << "got frame: camera" << endl;})
    }
    rs2::pipeline motionPipeline(ctx);
    if (motion) {
         rs2::config motionCfg;
         motionCfg.enable_device(serial);
         motionCfg.enable_stream(RS2_STREAM_ACCEL, RS2_FORMAT_MOTION_XYZ32F);
         motionCfg.enable_stream(RS2_STREAM_GYRO, RS2_FORMAT_MOTION_XYZ32F);

         motionPipeline.start(motionCfg, [&](rs2::frame frame){ cout << "got frame: motion" << endl;})
    }

Output if (motion = true and camera = true):
got frame: motion
got frame: motion
got frame: motion
got frame: motion
got frame: motion
...

Output if (motion = false and camera = true):
got frame: camera
got frame: camera
got frame: camera
got frame: camera
got frame: camera
...

Output if (motion = true and camera = false):
got frame: motion
got frame: motion
got frame: motion
got frame: motion
got frame: motion
...

Any assistance in getting both of these data types up and running would be appreciated! Thank you.

Hi @jeremyrhyde  Please try putting callback into the brackets of your pipe start line so that the script knows that it is a callback script.
One pipeline
rs2::pipeline pipeline(callback, ctx);
Two pipelines
pipeline.start(callback,cfg, [&](rs2::frame frame){ cout << "got frame: camera" << endl;})
This principle of putting 'callback' in the brackets is demonstrated in the SDK's rs-callback C++ example program.
https://github.com/IntelRealSense/librealsense/blob/master/examples/callback/rs-callback.cpp#L46

Hi @jeremyrhyde  Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.


[View] Revisit InstallQuickInput file

Let's revisit InstallQuickInput file.
ONE-vscode-DCO-1.0-Signed-off-by: Yongseop Kim<EMAIL_ADDRESS>

It works well. I tested.

The refactoring points

Let's separate data and ui
Let's get ui-flow easily -> getMultiSteps() and collectInputs()
Let's make a baseline to get something to refactor another things

In the future, we could support like MultiStepInputBuilder for using MultiStepInput easily.

PTAL @jyoungyun

PTAL @yunjayh . I think this should be applied to runInference ui.

ping @llFreetimell


Proposal to implement ADBC driver for Apache Cassandra

What feature or improvement would you like to see?
There isn't an existing ADBC driver for Cassandra as far as I can tell, and it would be great to have one! I'm interested in starting this effort as I have experience getting Arrow data to/from Cassandra, and have a little experience working on an ADBC driver for a different database (comdb2). I met @zeroshade at Community Over Code recently, who inspired me to start the discussion around creating a Cassandra driver :)
Some initial thoughts:

Choice of language

I'm personally most familiar with the Cassandra C/C++ driver as well as Arrow C++. However, if there's good reason to implement the driver in a different language, I'm open to that and happy to get up to speed.

Matt explained that it would be better to use nanoarrow rather than Arrow C++ as the latter is a heavy dependency and can complicate building/deploying drivers. Using nanoarrow sounds like a good idea to me.

Implementation considerations

Cassandra currently does not offer any native mechanism for fetching/ingesting data in Arrow format, so we would likely to have to implement row ↔ column transposition on the client side (in the driver).

The Cassandra Query Language (CQL) can be thought of as an extremely limited subset of SQL. This StackOverflow answer is a good overview of the general limitations. I figure this shouldn't matter as far as implementing an ADBC driver is concerned, but thought it was worth mentioning in case I'm wrong.

Matt also mentioned that there is now an ADBC driver framework. I don't see any reason not to use this. If we find any gaps in the framework while implementing the driver, I'm happy to help fill them in.

First step(s)

Matt mentioned that, before implementing anything, it would be good to stand up a Cassandra node/cluster in CI so that others can also play around with and contribute to the driver.

I suppose the next step would be to configure the build system to pull in the necessary dependencies (like the Cassandra C/C++ driver).

... Start implementing the driver along with integration tests?

I'd love to hear any other considerations for implementing this ADBC driver and/or recommendations on getting started!

Thanks Dewey for the detailed guide!
I'd say so long as Cassandra in C++ doesn't require gRPC, and you can use nanoarrow (instead of Arrow C++ for the aforementioned reasons), then C++ would be great.

there is also not a straightforward way to implement the validation suite outside this repository (or if there is, nobody has tried it yet!)

We briefly did this when I tried to get Flight SQL into pyarrow instead of having a separate wheel. I think it wasn't complicated, we'd have to probably fix up the CMake definitions again though.

@paleolimbot @lidavidm Thank you so much for the detailed guidance and insights! My apologies for not being able to respond sooner. I was pretty busy for the past couple of weeks but my schedule has freed up a bit now :)

I'm hoping to finish it this week, but there's a work-in-progress tutorial of how to get started building a driver in C++ using nanoarrow/the framework here!

Perfect timing! I'll be sure to check it out and share any feedback on the tutorial.

Arrow C++ presents a packaging problem (e.g., difficult/impossible to make an R driver wrapper, Python wrapper would require pinning a version of pyarrow until we sort out how to put two different Arrow C++ versions in the same process), which is why Matt probably recommended nanoarrow.

All of that makes sense, thanks for clarifying. I think we've had trouble using Arrow C++ in Python extensions for similar reasons, so I'm totally onboard with using nanoarrow.

It's a bit subjective, but all our existing drivers lean on the most arrowish SDK available for the driver... I have no idea what Cassandra provides, but if it had a fairly complete Go or Rust client already and nothing for C++ that might be a good reason to implement it in those languages.

These are good points! From some quick searching around, these are the main drivers I found in each language:

C++: DataStax C/C++ Driver. Although it doesn't seem to have much active development, we've been using it for a while in production and it is generally performant and reliable.

Go: Cassandra GoCQL Driver. Looks like this initially started as an independent project and was recently (as of this year) donated to Cassandra. I've noticed that ScyllaDB is maintaining their own fork of this driver, which appears to be much more actively maintained.

Rust: the major ones I'm aware of are cassandra-rs, cdrs-tokio, and ScyllaDB's Rust driver. My understanding (based on what I've learned from my colleagues) is that Scylla's driver is the most performant/reliable right now.

A couple of other random observations/thoughts:

Cassandra's list of documented drivers seems to suggest that DataStax owns/maintains quite a lot of the major drivers.

If the hope is to eventually donate this ADBC driver to the Cassandra project, maybe using one of the drivers they maintain (like GoCQL) would make it a less controversial suggestion.

The choice does seem like a bit of a toss-up. Like you said, I could be of more help if we pursued this in C++, so I'm still leaning towards that approach.
To address David's point about dependency management, the C/C++ driver lists the following dependencies:

CMake v2.6.4+
libuv 1.x
Kerberos v5 (Heimdal or MIT) *
OpenSSL v1.0.x or v1.1.x **
zlib v1.x ***

Certainly no gRPC, but please let me know if any of these seem problematic.

We have some docker compose services for databases for this purposes. You could do a PR first that makes it so that we can do docker compose up apache-cassandra-test.

Sounds good to me! It should be doable, Cassandra does publish official Docker images: https://hub.docker.com/_/cassandra.

The Postgres driver has an example of writing tests for this without a live connection to the database (the "copy" tests). No pressure to do it exactly like that but I found it useful to accelerate the process of adding full type support there.

I've been wondering how to approach this as well, so I'll definitely take a look at that. Appreciate the pointer.

Where to put it is a good thing to think about... ideally we'd (maybe just speaking for me here) like for ADBC connectors to live with the project instead of with us to spread out the maintenance load...

I agree, it would be nice if the ADBC driver lived under the Cassandra project. This was also discussed in the most recent Arrow community call. The main hurdle seems to be that Cassandra is generally used for more OLTP-style workloads, so it may not be clear to them how Arrow fits into the picture or why an ADBC driver is necessary. I think starting in this repo to prove out the idea and then approaching the Cassandra community would be a viable strategy.

Feel free to ping me early and often as you get started (probably everybody else is game too, but I'll let the volunteer themselves 🙂).

Thank you! I'll definitely reach out as necessary and plan to use draft PRs to get early feedback (if that's ok).

Thanks for looking into all this!
The one thing that might be questionable is a hard dependency on OpenSSL 1.x, but I suppose that migration is still ongoing and I don't think anything should pose dependency conflicts AFAIK.

Cassandra currently does not offer any native mechanism for fetching/ingesting data in Arrow format, so we would likely to have to implement row ↔ column transposition on the client side (in the driver).

A couple of years ago @0x26res created an Arrow-based Python driver for Cassandra and gave a great talk about it. That might be something you could build on or at least take a look at.

A couple of years ago @0x26res created an Arrow-based Python driver for Cassandra and gave a great talk about it. That might be something you could build on or at least take a look at.

@ianmcook Thank you for sharing this! I agree that decoding the raw bytes received from the database is likely to provide a noticeable performance improvement. @0x26res It's promising that you have a working example of this, and it's definitely worth building on top of. I dug around the C/C++ Cassandra driver and couldn't find an obvious way of getting those raw bytes, however, so we might need to ask the driver maintainers if they'd be open to having such functionality be exposed.


Update nf-wdm-keaddtriagedumpdatablock.md

Explicity state that that the array must have been initialized,

Thanks again, Graham!


Failure: http://www.thedailyshow.com/full-episodes/fri-october-4-2013-

Command: youtube-dl --verbose http://www.thedailyshow.com/full-episodes/fri-october-4-2013-
Result:
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.thedailyshow.com/full-episodes/fri-october-4-2013-']
[debug] youtube-dl version 2013.10.07
[debug] Python version 2.7.5 - Linux-<IP_ADDRESS>-grsec-2.1.14-modsign-xeon-64-x86_64-with-debian-5.0.9
[debug] Proxy map: {}
[ComedyCentral] fri-october-4-2013-: Extracting information
[ComedyCentral] fri-october-4-2013-: Downloading webpage
[ComedyCentral] fri-october-4-2013-: Downloading show index
[ComedyCentral] fri-october-4-2013-: Downloading configuration for 429230
[ComedyCentral] fri-october-4-2013-: Downloading configuration for 429540
[ComedyCentral] fri-october-4-2013-: Downloading configuration for 429541
[ComedyCentral] fri-october-4-2013-: Downloading configuration for 429542
[ComedyCentral] fri-october-4-2013-: Downloading configuration for 429543
ERROR: Unable to download webpage: HTTP Error 404: Not Found; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
File "/home/luomat/bin/youtube-dl/youtube_dl/extractor/common.py", line 147, in _request_webpage
return compat_urllib_request.urlopen(url_or_request)
File "/home/luomat/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/home/luomat/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/home/luomat/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/home/luomat/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/home/luomat/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/home/luomat/lib/python2.7/urllib2.py", line 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/home/luomat/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/home/luomat/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/home/luomat/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/home/luomat/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/home/luomat/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Now the original URL redirects to http://www.cc.com/shows/the-daily-show-with-trevor-noah. However playlists on cc.com are not supported yet. Please move to #10003 for further discussion.


USHIFT-2392: require story points and set target version on jira tickets

Update the jira ticket tools to set the target version of a ticket based
on the branch the PR is created from and support setting the story points
for a ticket.
/assign @ggiguash

/lgtm


[C++][Parquet] Minor: Default initialize some variables in Parquet metadata

Describe the enhancement requested
Some variables in Parquet metadata is not been initialized. This patch initialize them
Component(s)
C++, Parquet

Issue resolved by pull request 43144
https://github.com/apache/arrow/pull/43144


Remove preferGlobal flag

Most projects should be using a local version of the typescript compiler, typically via a build tool like grunt/gulp, not a globally installed one. That way each project can upgrade the typescript compiler when it's ready to. The warning on npm install is misleading, and can confuse new programmers jumping into an existing project.

Seems worth considering. I think originally we imagined taking so few breaking changes that you'd just always use the latest tsc since a project that hadn't updated to vNext features would still 'just work' with the new compiler. Since we've been taking more breaking changes over time it's less and less the case that you could confidently take all your new projects to tsc vNext and experience 0 new errors. In which case you'd be more likely to use the workflow described here with a local tsc rather than a global one.

Not saying I disagree with this (I don't), but TypeScript isn't the only one guilty of using "preferGlobal": true, when the best, most common use case is locally. Even CoffeeScriptRedux, Traceur, and (almost surprisingly) Browserify don't. It's simple enough, I'm opening a quick PR for it.
(The ones I linked were CoffeeScript, Babel's CLI, LiveScript, and JSHint.)

Not sure. From the NPM docs:

If your package is primarily a command-line application that should be installed globally, then set this value to true to provide a warning if it is installed locally

I think this applies to the NPM typescript package (same as it does to the other packages you linked). I don't believe that local npm usage is the most common use case -- is there any data available on that?

... can confuse new programmers jumping into an existing project.

I agree with this part, but come to a different conclusion. The way I see it is that there are two cases -- people who generally know what they're doing with NPM packages, and people who don't.
The people who know what they're doing understand how to do version management and will know to ignore the warning about preferGlobal because they want a local version. Removing this setting doesn't help them.
The people who don't know what they're doing run npm install typescript, see that running tsc doesn't work, then look at the warning that says "install with -g please", run npm install -g typescript, and avoid thinking that TypeScript or NPM are broken. Removing this setting hurts these people a lot, and is going to create noise for us because people will say "I ran npm install typescript and it didn't install tsc !" and we'll have to tell them about a flag that we could have warned them about automatically.
Is my logic off here?

@RyanCavanaugh
Browserify does not. And out searching for "npm" and "command", the only one I found that is remotely close to that kind of problem is this bug. And I actually clicked on about a quarter of them (the ones that weren't immediately obvious as not related).  They aren't as stupid as the large number of people who ask me if I know how to hack some system, even if they know I'm a web developer, or those that assume I can program, thus I know how to fix every hardware/software issue on the planet. Developers, in my experience, are not usually the ones to say "this program doesn't work - this company is <insult>!" over a small bug.
I don't know a lot of end-user, general public programs that require them to use npm to install it. Most people, at the sight of monospaced code, tend to get a little uncertain about what's going on, and Windows users are the worst.
Also, sadly, on a near-weekly basis I'm asked about some Windows issue by a family member, even though they know I use Ubuntu.

First, keep in mind that removing the flag doesn't mean users can't still install typescript globally. It just removes the warning which, for a significant portion of users, is not really true - the preferred place to install the compiler is at the project level, not global. Remember, projects want to list typescript as a dependency not just because of breaking changes, but because they need a minimum version.
I doubt using tsc from the command line is a common usage of the compiler, or any compiler for that matter. For new users, it's easier to just open up a .ts file in an IDE or editor that supports compile-on-save and just hit save, which defaults to compiling it into the same directory. For experienced users, they will either do the same or use a build system like grunt/gulp. With TypeScript 1.5's tsconfig.json functionality, it's even less likely any users, new or experienced, will be using tsc from the command line, by hand. It's just not practical, for nearly any use case. I mean, can you imagine any project, open source or closed, requiring users to compile files individually, by hand, from the command line? It's just not done.
Besides, the best pattern in npm for command line utilities that are primarily versioned at the project level is to have a separate *-cli npm package that is installed globally. See for example grunt and grunt-cli. Alternatively, the single typescript package, when installed globally, would look for a locally installed version and run that instead, before falling back to itself. Even if you go the second route, you would still remove the preferGlobal flag, because both local and global are acceptable choices.

@JeroMiya A few (Gulp as an example) just bundle both the module and CLI into a module, and requires the local version for the task list, bailing if one doesn't exist.

@impinball yes, I pointed out that option as well. in that case, I would still remove the flag because the package serves a dual use (local or global), where the global package would defer to the local one, if present.

As @JeroMiya brings up, that the TS package has multiple reasons to install it is part of the issue - stemming from the multiple ways to use npm install - you can install executables (ie, -g) and/or update/install dependencies with it. And those dependencies may be for another node package or for a browserify/webpack/component/whatever browser project. As has been mentioned by others, given how the community that uses npm works, the dependency management cases might be more likely than the cli installation case.
The typescript npm package provides many services - some of which should be preferGlobaled, some of which should not. typescript as in tsc should be preferGlobal - it provides what is intended to be a global executable installation, and should be globally available. typescript as in tsserver should probably not be global - applications which depend on it (despite it being executable) would likely prefer to bundle a specific version of it (and generally do so already). typescript as in 'the library and platform' should probably not be global - again, tools which depend on it as a library would likely like to bundle a specific version. There's also a few other distributions in bin -  typescriptServices (which is the same sources as typescript but not for node) and tslssl (which is just tsserver as a library). On top of those, there are the standard library .d.ts files which all of them rely on.
All of these are distributed on npm via one monolithic package at present. Given that their only dependencies are on one another at build time (sans common dependency on standard library .d.ts files), it doesn't seem impossible to publish each deliverable to separate packages to alleviate the issue. There really are a handful of distinct services provided by this repository.


fix(containers): ensure containers are destroyed when wing console is interrupted

Use docker --rm --detach along with a random container name.

Superseded by https://github.com/winglang/winglibs/pull/128.


Refactoring

Restructure our code to make it more readable and easier to access documents

This would be useful.


feat: about page visualization updates

Trello Ticket 304

Reorganize Awardees Visualizations
Provide links to individual PI's labs
Reformat/Reword copy

Screenshot of copy updates (when they were on devtest):

 Visualization Updates


[BUG] Err Handling Issue in statefulsyncer

Related PR: #99
This PR fixes a bug in statefulsyncer when fetchErr is nil.
Changes

[ ] Add coverage to statefulsyncer package
[ ] fetcher only retry if retriable

Pull Request Test Coverage Report for Build 4109

40 of 65 (61.54%)  changed or added relevant lines in 4 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.4%) to 74.739%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

fetcher/block.go
4
29
13.79%

Files with Coverage Reduction
New Missed Lines
%

fetcher/block.go
2
35.21%

Totals

Change from base Build 4078:
-0.4%

Covered Lines:
3861

Relevant Lines:
5166

💛  - Coveralls


Document the release

On pull requests I'd like to be glad to provide the built asmcrypto.js however I don't know which flag should I use for it. Is it grunt --with ALL ? Can you add it to the README so others can help? :)
I know you don't like building everytime you commit, however I think you should tag the stable enough releases and beside this we should maintain a compiled/testpassinggreen devel version (on master branch).

Perhaps worth revisiting this post #119 and adding a CONTRIBUTING.md?


many provenance-log-files get produced during tests

While running the full pytest in the top level directory, 9 log-files get produced, which are "untracked files" for git:
$ git status --short
?? application.provenance.log
?? ctapipe-display-dl1.provenance.log
?? ctapipe-display-imagesum.provenance.log
?? ctapipe-display-integration.provenance.log
?? ctapipe-display-televents.provenance.log
?? ctapipe-dump-triggers.provenance.log
?? ctapipe-reconstruct-muons.provenance.log
?? ctapipe-stage1-process.provenance.log

maybe we can git-ignore them?

Or pass a tmp dir for them now that these are configurable

I would go for the tmp dir, to not have them at all in the repo, not even ignored.

use the tmpdir fixture of pytest in the tests. https://docs.pytest.org/en/stable/tmpdir.html

There seems to be some problems:

the provenance_log trait is missing a .tag(config=True)
it's missing an alias, eg. self.aliases['provenance-log'] = 'Tool.provenance_log' (?)
after adding these two things, I get two log-files, the default and the one I provided, both having exact the same content (during the tests, not when running the tools myself)

the provenance_log trait is missing a .tag(config=True)

oh man, not again...

It took me longer than I care to admit, but here it is, a script that scans all ctapipe classes for traits without config=True:
import ctapipe
import pkgutil
import importlib

from ctapipe.core import Component, Tool

ignore_traits = {
    'config', 'parent', 'argv', 'log', 'name', 'subcommands', 'version', 'subapp', 'aliases',
    '_loaded_config_files', 'cli_config', 'description', 'examples', 'extra_args',
    'flags', 'keyvalue_description', 'option_description',
    'raise_config_file_errors', 'subcommand_description', 'classes'
}

def find_all_traitlets(module):
    module_name = module.__name__

    for submodule_info in pkgutil.iter_modules(module.__path__):
        submodule = importlib.import_module(module_name + '.' + submodule_info.name)

        if submodule_info.ispkg:
            find_all_traitlets(submodule)
        else:
            for obj_name in dir(submodule):
                obj = getattr(submodule, obj_name)

                try:
                    has_traits = issubclass(obj, (Component, Tool))
                except:
                    has_traits = False

                if has_traits:
                    for traitname, trait in obj.class_traits().items():
                        if not trait.metadata.get('config', False) and traitname not in ignore_traits:
                            print(f'{f"{obj.__module__}.{obj.__name__}":<80} {traitname}')

print('Traits without config=True')
find_all_traitlets(ctapipe)

Should we use that on travis?

oh man, not again...
Should we use that on travis?

I would say yes, since you did the work now and this seems to be a common problem.
Does it exit with an error status? Otherwise we won't notice on travis.

We can make it raise an error if it finds anything

I will also get rid of the duplication

Fixed in by running test tools in tmp dirs


test test_cryto_sign fails: crypto_sign_open allows trivial forgery of contents

Please check and possibly fix.

Fails sometimes with mlen=71 in the second loop of the test.
In case the test does not fail there, it never returns, probably freeing and faulting...

free(m) fails in the test, see branch mbedos5

fixed, the issue was related to the use of test_random(), which returned a long instead of a char, creating a memory leak, corrupting stack.


Automate the inclusion of Overview diagram, caption and text

PyLODE creates a stub <div> for Overview. At present, we just paste some stock html into the <div> that points to images/overview.png and  includes a caption. For the moment, in the ontology that I'm working on, I've  saved an 'include' file images/overview.html and then replace the 'overview' div with <div w3-include-html="images/overview.html"></div>.
Issues #127 and #131 seem similar.
Is there a way to automate this? I could not find a nice dcterms: property to handle this but perhaps there is something I haven't found?

Example commit: https://github.com/AGLDWG/phs-ont/commit/54598a7b26a8e2665f6fb575db38dd549b3e240c

Can't really "fix" this as such. I like to keep an annoying grey box being auto-generated to prompt people to put in an image but we can't predict how they might generate an image and we're not auto-generating images, so it's really out of scope to make any real change here.


Clojure LSP incorrectly marks [\!\@] as an error <form> expected, got '\!\@'

Describe the bug
When I write in a *.clj file:
 [\!\@]

Clojure LSP IntelliJ marks \!\@ as an error: <form> expected, got '\!\@'
This appears to be independent of the actual values (\! and \@ in this case; e.g. \a\b or \.\: behaves the same way).
The vector [] is not necessary either. Given a file containing:
\a\b

Clojure LSP IntellJ will mark \a\b as an error: '\a\b' unexpected
Expected behavior
\a\b is valid syntax. [\a\b] is a vector containing char values \a and \b.
User details

OS: Fedora Linux 40
Editor: IntelliJ 2024.1.1 with Clojure LSP plugin 2.4.5
Version: clojure-lsp 2024.04.22-11.50.26, clj-kondo 2024.03.13

Originally reported as https://github.com/clojure-lsp/clojure-lsp/issues/1816.

That's a bug on our Language grammar parser, but I don't know exactly how to solve it, help welcome for this one


Production deployment

Closing this PR, as production deployment is done with new PR because we decided to add some additional changes from develop branch.


Hide edit layer and edit resource button for unauthorized user

This change is

Reviewed 6 of 6 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Simplify C locations handling

The first commit simplifies the various bits of location handling to refer to a shared new predicate (Location::fullLocationInfo, which is like hasLocationInfo/5 but exposes the actual container entity). This avoids a certain amount of repetition, as all the predicates that explicitly called the three locations_* tables can now just refer to the single place that unions those tables.
The second commit is a minor simplification to defintions.qll, following recent changes to location handling (and more things becoming Containers rather than Files). In particular, it allows us to find a much better way of evaluating that part of the predicate.

@pavgust wrote on Slack:

For the record, https://github.com/Semmle/ql/pull/12 is somewhat invasive, and I'm profiling it on our usual set of projects.

Let's postpone merging until we hear how the profiling went.

Profiling still going on; this is likely to pick up a few more changes and tweaks shortly.

@jbj Profiling looks good, results unchanged. I think this is good to go.


[FEATURE] 当目录为空时，不渲染目录或隐藏目录 When the Contents is empty, do not render the Contents or hide the Contents

Describe the feature you want 描述你的功能需求
When the ## title  is not used to organize the article structure in the post, the content of the table of contents is blank, but the generated page will still have the words
Contents
.
当 post 中未通过 ## 标题 来组织文章结构时，目录内容为空白，但是生成的页面中还是会有
目录
 字样。
It is hoped that the word "Contents" will not be displayed when the contents is empty to make the blog look more concise.
希望当目录内容为空时不显示“目录”字样，以使博客看上去更加简洁。
Useful reference 有价值的参考
No response

Add
toc:
  enable: false

to the front matter to turn toc off for individual post.


Nicer FunctionSignature literals

In https://github.com/googleprojectzero/fuzzilli/commit/c1a3848b0cdc713b40a326bb76f791066128837e we had to change FunctionSignature literals to look like this:
let sig = [.plain(.integer), .opt(.string), .rest(.anything)] => .integer

since they now contain a Parameter struct instead of just a Type.
However, it would be nice if we found some way (that isn't a terrible hack) to be able to write FunctionSignature literals like this again (or something similar):
let sig = [.integer, .opt(.string), .anything...] => .integer

This is just a "nice to have" though.

Well, I've looked into this, but the only feasible way to do this is with classes. If you're ok with that then I'll have this implemented asap

Oh cool, do you have a short code snippet to explain what you mean (i.e. what would have to become a class, etc.)? Thanks!

I actually found a way to do it using structs. I think I tried this before and was caught up with an issue that could have been solved by making my own  init(rawValue:) initializer.

struct BaseType: OptionSet, Hashable {
    private var _parameterKind: ParameterKind
    var rawValue: UInt32 = 0

    static let integer     = BaseType(rawValue: 1 << 1)
    static let bigint      = BaseType(rawValue: 1 << 9)
    static let anything    = BaseType([.integer, .bigint])

    init(rawValue: UInt32) {
        self._parameterKind = .plain
        self.rawValue = rawValue
    }
}

extension BaseType {

    enum ParameterKind {
        case plain
        case optional
        case variadic
    }

    var parameterKind: ParameterKind { _parameterKind }

    init(rawValue: UInt32, parameterKind: ParameterKind) {
        self.init(rawValue: rawValue)
        self._parameterKind = parameterKind
    }

    static func opt(_ _type: BaseType) -> BaseType {
        var _type = _type
        _type._parameterKind = .optional
        return _type
    }

    static func variadic(_ _type: BaseType) -> BaseType {
        var _type = _type
        _type._parameterKind = .variadic
        return _type
    }
}

typealias Parameter = BaseType

let parameters: [Parameter] = [.integer, .opt(.bigint), .variadic(.anything)]

With that out of the way, my initial concern of needing to make the BaseType struct a class has been alleviated.
Having this set up as-is would be great, but the printing functions on the ParameterType struct should be moved to the BaseType as well as an extension to make everything come full circle as there's no need to have a separate struct/enum representing it.

As a suggestion as well, maybe instead of wrapping an optional parameter in opt(_:), maybe we could define an "extend to optional" postfix operator -?. Ex:
postfix operator -?
postfix func -?(_type: BaseType) -> BaseType {
    var _type = _type
    _type._parameterKind = .optional
    return _type
}

let signature: FunctionSignature = [.integer, .bigint-?, .anything...] => .bigint

It was an idea that popped into my head when adding the operators into my snippet, and I think it would be good for unifying the style as being declarative instead of functional.

This is now fixed as a drive-by in https://github.com/googleprojectzero/fuzzilli/commit/7f2c432232c620fd5f0bdf5ea243b72ad49a1db6
This way of doing it now has some redundancy with the duplicated constructors, but this also makes it possible to forbid certain parameter types completely, e.g. .unknown, which is nice. It also still allows using union types as parameters, which is required in the JavaScriptEnvironment.swift. So probably this is good enough...
It'd be nice to just have ? to express optional parameters, but I think that's impossible, and probably .opt is intuitive enough.


Dark Mode - Persist

Dark mode feature
Once a user selects dark mode, it should persist throughout the project, until and unless the user changes it.
Replicate

Switch to dark mode.
Go to some other tab.

I would like to work on this issue.

great Idea execute this well !!

I had the same issue and coded a working solution.
Works with one and same CSS file + basic JavaScript functions for the switch and color settings memory recall on load.
Here is the GitHub Demo page :
https://dorson.github.io/CSS-Dark-Mode-and-color-switch/
Feel free to copy, fork, adopt, port, etc...


[FEAT]: Fetch Single Team by ID Endpoint

Description
Create an endpoint to retrieve details for a single team to which the user belongs.
Acceptance Criteria
Endpoint implementation:

The endpoint should be accessible at /api/v1/teams/{:teamId}

The endpoint should only accept HTTP GET requests

Endpoint security:

Only authenticated users can have access to the endpoint

A user must have the appropriate permissions to access the endpoint

Each request to the endpoint must include a valid authentication token in the Authorization header

Authorization: Bearer <token>

Validation

The endpoint should check whether the provided teamId is valid, that is, the teamId exists in the database.

If the validation succeeds (team exists):

send a response with team details retrieved from the database with an HTTP status code of 200 (OK)

If the validation fails (the team does not exist):

send an error response with HTTP status code of 404 (Not Found)

Sample Request
Route: GET /api/v1/teams/{:teamId}

Query parameters:

teamId: UUID string

Accessing Protected Routes
Authorization Header

Given a valid token in the Authorization header, the system should allow access and return the requested data when the user accesses a protected route.

{
  "Authorization": "Bearer <token>"
}

When a request is given without an authorization header or with an invalid token when the user accesses a protected route, the system should return 401 Unauthorized status.

Sample Response

successful response

teamId is valid and team details have successfully been retrieved from the database
{
  "status": "success",
  "message": "Team details retrieved successfully",
  "data": {
    "id": "d2ccacfa-666c-4ef3-beb2-fdc292ba2711",
    "name": "Team Dynamo",
    "description": "Maximum composure",
    "created_at": "timestamp",
    "updated_at": "timestamp"
  },
  "status_code": 200
}

unsuccessful response

teamId is invalid and team details cannot be retrieved from the database

{
  "status": "error",
  "message": "Team with this ID cannot be found",
  "status_code": 404
}

The user is unauthenticated and cannot access the endpoint

{
  "status": "error",
  "message": "Access denied, Unauthorized request",
  "status_code": 401
}

Purpose
The endpoint provides necessary data about a single team's details for the frontend
Requirements

[ ] Ensure the endpoint is being accessed by an authenticated user

[ ] Ensure that users can only fetch team details for teams they belong in

[ ] Develop server-side logic to fetch team details by ID

[ ] Ensure that data retrieval complies with security standards

Expected Outcome
A secured API endpoint that fetches team details by ID from the backend, to support the team details page frontend
Tasks

[ ] Implement the endpoint route /api/v1/teams/{:teamId}
[ ] Query the database to retrieve team by team ID
[ ] Ensure that only authorized users can access the endpoint
[ ] Implement error handling for scenarios when the user is unauthorized and when the team cannot be found, with the appropriate HTTP status codes
[ ] Return a response body in the format specified above, with the 200 (OK), HTTP status code.

Testing

Unit testing for the API endpoint, covering authentication logic, retrieval, error handling etc
Integration testing to ensure end-to-end functionality.
Security testing for data protection (e.g users can only see team details for teams they belong in)

we do not have any concept like teams in this app


Add expand merge commit option

In the Multiple RELEASE files for mono-repo style, there is a use case where you can use the commitInclude option to match only the commits that are relevant to the target application.
This option works well, but it requires the developer to include the keyword in every commit. However, there are cases where keywords are specified only for merge commits.
So I added an option to expand all the commits included in the matched merge commit. This allows you to include keywords in the merge commit to match all related commits.

If you don't want anything other than merge commit in your Release Note, you can still exclude it using the releaseNoteGenerator option.
Additional processing, such as sending metrics to FourKeys, can be done using outputs.releases, which contains all the commits.

@na-ga Thank you for your contribution.
I have just left some comments. PTAL.

@nghialv Thanks for the review! I made a fix to add an option to ReleaseCommitMatcherConfig struct.

Nice update!
Thank you.


[flaky api] Disable deployment of gitea, nexus, airlock processor

Describe the bug
To be better able to diagnose the api timeout issues, we want to have it alone in the plan without any other application

Closing since gitea and nexus are anyway installed via a test and airlock is moving to its own service plan with a separate PR


Ensure patients are part of current programme

When importing patient records we want to be sure that the patient belongs to one of the current programme's year groups. This is necessary as we don't currently have a way of showing patients not attached to a current cohort.
We expect this is will be a temporary validation for the first release as it doesn't allow users to upload historical records, or work very well with cohorts being agonistic of programmes.
To support this I have refactored the Cohort model in a way that I think makes it easier to understand going forward.

agnostic*, though agonistic is a great word!

I didn't even know that word exists!


[spring boot] add links to RN in runtime details

This is a Follow- on issue for Release Notes when RN link available:

issue 812
add links to SB specifications table (it has features and versions  table for JSP, servlet, etc).
The link should be added in SB guide  runtime details information section for the Embedded Apache Tomcat container.
issue 814
add links to the SB runtime component versions table (SB version table for tested starters)
The link should be added in SB guide SB versions section

@inoxx03 I have updated the follow-on PR with items needing link to RN.

@ccopelloRH @rhoads-zach @inoxx03  I have added the tasks in this issue to the  RN JIRA for tracking purposes. This follow-on issue 863, which was added to resolve RN  links needed for  812 and 814 can be closed.

closing per discussion at todays standup.


⚠ Contemporanea Group has degraded performance

In a7ee16b, Contemporanea Group ($SITE_CNTMG) experienced degraded performance:

HTTP code: 200
Response time: 5982 ms

Resolved: Contemporanea Group performance has improved in c577790.


Clarify how to set $PATH properly on macOS

Update README.md for macOS
Clarify how to set $PATH properly on macOS

This has some side-effects. Closed until resolved.


Beta Tester

I am a beta tester but I cannot test the app if I can't get on the app, it keeps exiting me out

It only works for a device that runs threw google! If ur phone and/or tablet runs threw Google, you need to go to the download page. The download could take a few hours. If it dident download, its a technical error on your end. Sorry about and inconvenience.

Thank you
On June 27, 2016, at 1:20 PM, "History2.0"<EMAIL_ADDRESS>wrote:
It only works for a device that runs threw google! If ur phone and/or tablet runs threw Google, you need to go to the download page. The download could take a few hours. If it dident download, its a technical error on your end. Sorry about and inconvenience.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.￼

Please close this issue.


enable jetson-flash device types

This required:

adding docker in docker to the worker container - this is because jetson-flash uses a container
adding the jetson-flash device type flashing logic to the autokit sdk - code here builds and starts the jetson flash container
docker in docker is not started with the qemu worker - as it is not needed.

@balena-ci I self-certify!