Various hotfixes and API doc updates (3rd try - to master this time)

Closes #587 and #589

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
101 unchanged lines in 54 files lost coverage.
Overall coverage increased (+0.8%) to 38.751%

Files with Coverage Reduction
New Missed Lines
%

app/controllers/drugs_controller.rb
1
61.54%

app/controllers/services_v1_controller.rb
1
64.44%

app/models/data_model/drug_alias.rb
1
85.71%

app/models/data_model/drug.rb
1
72.73%

app/models/data_model/gene_claim_category.rb
1
80.0%

app/models/data_model/interaction.rb
1
83.33%

lib/genome/groupers/gene_grouper.rb
1
91.3%

lib/genome/importers/ensembl/ensembl_tsv_importer.rb
1
45.45%

lib/genome/importers/entrez/entrez_gene_pathway_importer.rb
1
33.33%

lib/genome/importers/entrez/new_entrez.rb
1
22.41%

Totals

Change from base Build<PHONE_NUMBER>:
0.8%

Covered Lines:
2463

Relevant Lines:
6356

💛  - Coveralls


Refactoring and improved handling of exceptions

Refactoring and improved handling of exceptions

Request's class now takes more responsability
Request's class now throws a exception of type Pushwoosh::Exceptions::Error when validating fields
removes activesupport dependency
Adds more tests

@antillas21
What do you think?

:smile: it looks good!
Sorry to reply after the merge, had a busy day running errands.


PlayFramework 2 doesn't get file updates

When I'm running Play Framework with command play run on a centos7 container the Play Framework doesn't get the file changes and re-compiling the code as it should be, I think is related to shared network folders or something

Your suspicion is right. PlayFramework uses inotify to find out about changes in the filesystem. inotify does not work on remote file systems, and VBox shared folders are essentially remote file systems.

Sorry, this repository is long-since deprecated in favor of Docker Toolbox (whose usage is now also discouraged in favor of Docker for Windows and Docker for Mac).


Remove contact form from website

Form at http://modeci.org/#contactPage is being used to spam us. Hasn't really been used for general contact requests...
Should be removed, and replaced by existing link to GH Discussions as well as "To contact the ModECI investigators directly please mail info - at - modeci.org".
Source https://github.com/ModECI/Website/blob/main/_includes/contact.html
Website can be tested locally with jekyll serve
@Ivy8127

Made the changes however, Jekyll serve is throwing a webrick error, that I'm debugging. I haven't worked with Ruby or an SSG like Jekyll before, so I might need a little bit more time to fix this. I also can't locate the Gemfile directory within the project.

Ok, great. I don't recall how I set up my environment for that I'm afraid. Maybe try some of the simple standard jekyll examples to test your local environment...

Ah alright, I'll figure it out soon

Ok, great. I don't recall how I set up my environment for that I'm afraid. Maybe try some of the simple standard jekyll examples to test your local environment...

Good morning @pgleeson ... the error is stemming from not having the Gemfile on my local machine, I noticed that the Gemfile.lock file on Github is on the .gitignore file. Should I just create a new Gemfile within my local env, with new version dependencies or will that break the site?

Done in #45. Thanks @Ivy8127!


fix: fixing a minor typo in the documentation

Removing an additional </p> tag

Hello!  Thank you very much for your contribution and interest in helping improve the Quartz community.
After a period of dormancy, the Quartz project is back under steady maintenance by multiple volunteers, who are working to once again handle contributions such as yours.
We notice that your contribution was made without use of the DCO feature (the sign-off feature on commits via the -s option).  Can you please update your PR with commits that use the -s option, agreeing to assign copyright ownership and other terms as described at the contributor agreement referenced here: https://github.com/quartz-scheduler/contributing/blob/main/CONTRIBUTING.md

Hello! Thank you very much for your contribution and interest in helping improve the Quartz community.
After a period of dormancy, the Quartz project is back under steady maintenance by multiple volunteers, who are working to once again handle contributions such as yours.
We notice that your contribution was made without use of the DCO feature (the sign-off feature on commits via the -s option). Can you please update your PR with commits that use the -s option, agreeing to assign copyright ownership and other terms as described at the contributor agreement referenced here: https://github.com/quartz-scheduler/contributing/blob/main/CONTRIBUTING.md
You can easily add signoff to your previous commits by running (on your PR branch):
git commit --amend --signoff --no-edit
git push -f

Or (for multiple commits):
# change 5 to the number of commits
git rebase HEAD~5 --signoff
git push -f

Hi,
It is still relevant. Just haven't found the time to do this. Will do it
asap!
On Wed, Sep 29, 2021 at 2:08 AM stale[bot] @.***> wrote:

Is this still relevant? If so, what is blocking it? Is there anything you
can do to help move it forward? This issue has been automatically marked as
stale because it has not had recent activity. It will be closed if no
further activity occurs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/quartz-scheduler/quartz/pull/682#issuecomment-929607082,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGKJ5INQWKPLDGW72WGV5YDUEIRUFANCNFSM42UW7NIQ
.


Label component

Adds <Label /> component and tests.  A separate PR will add docs.

:sake:

LGTM 🐙

Looks good: :fallen_leaf:


Modify debug mode

Created --debug-plot dedicated for showing additional plots only.
Added GSP_EXTR keyword for recording extraction aperture
Added GSP_SCTR for recording science target for reference lamps

Pull Request Test Coverage Report for Build 337

13 of 86 (15.12%)  changed or added relevant lines in 3 files are covered.
12 unchanged lines in 5 files lost coverage.
Overall coverage decreased (-0.5%) to 50.408%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

goodman_pipeline/spectroscopy/redspec.py
2
5
40.0%

goodman_pipeline/spectroscopy/wavelength.py
3
20
15.0%

goodman_pipeline/core/core.py
8
61
13.11%

Files with Coverage Reduction
New Missed Lines
%

goodman_pipeline/core/tests/test_check_version.py
1
90.48%

goodman_pipeline/spectroscopy/redspec.py
1
27.13%

goodman_pipeline/core/check_version.py
1
95.83%

goodman_pipeline/spectroscopy/wavelength.py
1
24.07%

goodman_pipeline/core/core.py
8
62.03%

Totals

Change from base Build 334:
-0.5%

Covered Lines:
2050

Relevant Lines:
3692

💛  - Coveralls


Add new index-based pattern matchers

[ ] foo[0]: Select the first named child of a node with type foo
[ ] foo[bar][0]: Select the first child at field bar of a node with type foo

As discussed in https://github.com/pokey/cursorless-vscode/pull/395#issuecomment-1005165205, let's file a separate issue for selecting the nth child at a particular field.  The syntax listed in item 2 of the description here should be referring to the first child foo[bar] (ie a grandchild if foo).

@AndreasArvidsson any suggestions for syntax for selecting nth child at a particular field name?  foo[bar.0]? foo[bar[0]]?

foo[bar.0] was my first thought.

Last task is not done yet

Last task is not done yet

that one is tracked in #427 so we can close this one 👍


config: prefixes image names with ko:// scheme

Changes

Prefixes image names with ko:// scheme. This allows ko to improve the experience with Go modules. See https://github.com/google/ko/pull/58 for more information.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[ ] Includes tests (if functionality changed/added)
[ ] Includes docs (if user facing)
[X] Commit messages follow commit message best practices

See the contribution guide for more details.
Double check this list of stuff that's easy to miss:

If you are adding a new binary/image to the cmd dir, please update
the release Task to build and release this image.

Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes

/ok-to-test
The improvement is from making typos less difficult to debug.

@ImJasonH could there be a strict way with this, as : in a "strict mode" you would get an error if a ko:// reference is missing from what ko gathered to build the image for. Would it be possible to have that ? (because otherwise, it will fail silently, right ? and will have an ErrPull… on the pod(s))

If I'm understanding, yes that's exactly what ko does with this prefix. If it sees the special prefix in normal mode it strips it (for recent versions of ko in the last 6? months). If you pass --strict then it strips the ko:// prefix and fails if the import path isn't recognized, instead of passing it through, which leads to unpullable image references.
This is step one to adopting ko strict more. After this we can run ko with --strict to avoid bad refs.

If I'm understanding, yes that's exactly what ko does with this prefix. If it sees the special prefix in normal mode it strips it (for recent versions of ko in the last 6? months). If you pass --strict then it strips the ko:// prefix and fails if the import path isn't recognized, instead of passing it through, which leads to unpullable image references.
This is step one to adopting ko strict more. After this we can run ko with --strict to avoid bad refs.

Alright, if it works like this, it sounds good to me :+1:
/lgtm
/cc @afrittoli @bobcatfish

/approve

/hold

https://github.com/tektoncd/pipeline/pull/2216/files/f7442117ba4f54a884173bebb06ff542e7bc6ffe#diff-d56e306ce931c2991f18ef68b6b501a3 needs to be taken into account :angel:

/test pull-tekton-pipeline-integration-tests

/hold cancel
I'll follow-up on this

/test pull-tekton-pipeline-integration-tests


🌱 Bump golang to v1.21.8

v1.21.8 has fixed some CVEs https://github.com/golang/go/issues?q=milestone%3AGo1.21.8+label%3ACherryPickApproved

/test-ubuntu-integration-main
/test-centos-e2e-integration-main


[fix]unused param

Proposed changes
Issue Number: close #xxx

Parameter "timeout"  in function "getInfoRequest" is not used.

Can anyone assign me a label please?


Dahua not loaded after update in Home Assistant core 2024.11.0b0

After update core 2024.10.4 to 2024.11.0b0 Dahua not loaded with 2 devices:
Generic RTSP by Dahua Firmware: 1.0
and
DHI-VTO2211G-WP by Dahua Firmware: 4.511.0000000.0.R,build:2021-11-16.
Try to reboot, delete and re-install same error.

Reporting the same issue. Tried to delete ad add again the camera but got .
Impossibile caricare il flusso di configurazione: {"message":"Invalid handler specified"}

Here to report the same issue, this is what my logs say:
Seems like he's stuck on:     from homeassistant.core import Config, HomeAssistant, callback
ImportError: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py). Did you mean: 'config'? (bottom)
Logger: homeassistant.setup
Bron: setup.py:334
Eerst voorgekomen: 00:23:46 (1 gebeurtenissen)
Laatst gelogd: 00:23:46
Setup failed for custom integration 'recycle_app': Unable to import component: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1011, in async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1071, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/recycle_app/init.py", line 9, in
from homeassistant.core import Config, HomeAssistant, callback
ImportError: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py). Did you mean: 'config'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1031, in async_get_component
self._component_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1023, in async_get_component
comp = self._get_component()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1071, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/recycle_app/init.py", line 9, in
from homeassistant.core import Config, HomeAssistant, callback
ImportError: cannot import name 'Config' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py). Did you mean: 'config'?

Thanks. I'm out of town and only have my work laptop. I'll try to get this fixed once I get back tomorrow or the next.

These are the fixes from another integration (RecycleApp) that had the same error, hope this helps you.
You can find the changes on that app here or the picture below: https://github.com/olibos/HomeAssistant-RecycleApp/compare/v2.5.2...v2.5.3-b1

It's working!, Thanks

How did you get it to work? I tried changing the init file with the above lines but it didn't work. (Not a programmer but like to figure this out since it seems simple :) )

What i've done:
Edit /homeassistant/custom_components/dahua/init.py, replace ** ** with "" "", add ++ ++
"""
Custom integration to integrate Dahua cameras with Home Assistant.
"""
import asyncio
from typing import Any, Dict
import logging
import ssl
import time
from datetime import timedelta
from homeassistant.components.tag import async_scan_tag
import hashlib
from aiohttp import ClientError, ClientResponseError, ClientSession, TCPConnector
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import CALLBACK_TYPE, Config, HomeAssistant`_
""from homeassistant.core import CALLBACK_TYPE, HomeAssistant""
from homeassistant.exceptions import ConfigEntryNotReady, PlatformNotReady
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.typing import ConfigType
++from homeassistant.helpers.typing import ConfigType++
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from custom_components.dahua.thread import DahuaEventThread, DahuaVtoEventThread
from . import dahua_utils
from .client import DahuaClient
from .const import (
CONF_EVENTS,
CONF_PASSWORD,
CONF_PORT,
CONF_USERNAME,
CONF_ADDRESS,
CONF_NAME,
DOMAIN,
PLATFORMS,
CONF_RTSP_PORT,
STARTUP_MESSAGE,
CONF_CHANNEL,
)
from .dahua_utils import parse_event
from .vto import DahuaVTOClient
SCAN_INTERVAL_SECONDS = timedelta(seconds=30)
SSL_CONTEXT = ssl.create_default_context()
SSL_CONTEXT.set_ciphers("DEFAULT")
SSL_CONTEXT.check_hostname = False
SSL_CONTEXT.verify_mode = ssl.CERT_NONE
_LOGGER: logging.Logger = logging.getLogger(package)
async def async_setup(hass: HomeAssistant, config: Config):
""async def async_setup(hass: HomeAssistant, config: ConfigType):""
"""
Set up this integration with the UI. YAML is not supported.
https://developers.home-assistant.io/docs/asyncio_working_with_async/
"""
hass.data.setdefault(DOMAIN, {})
return True
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
async def async_setup_entry(hass: HomeAssistant, entry: ConfigType):
"""Set up this integration using UI."""

Jep, that did it, was the same as i tried the first time but i must have messed something up 👍

@jodomi I made a pull request, but are you sure the last ConfigEntry has to change to ConfigType on the lines beneath?
** async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): **
"" async def async_setup_entry(hass: HomeAssistant, entry: ConfigType): ""
It seems to be working with both, but i think it has to stay the same since ConfigEntry is also imported here:
from homeassistant.config_entries import ConfigEntry

I have no idea about that, i'm not  dev just an adept of Ctrl+c Ctrl+v ;-)

Haha, same here. Will leave ConfigEntry like it is.
@rroller pull request is submitted :)
Hope i did it the right way, it's my first pull request so if you have any remarks please let me know :)

I merged and did the release for https://github.com/rroller/dahua/pull/408
Can you try it out? I had to do this from my mobile phone so I'm unable to test it.

@rroller works. Thank you. BTW you have a pull request for some Italian translations. Cheers

@dvbit thanks. The Italian translations were already merged. Thanks again!


Left Navigation tabs - Badge color always red

Yes, this is how it is supposed to work. If you have an idea, please create new feature request with all details.


Replace port number 31443

Port 31443 does not work any more and it has been replaced by 443. The documentation has been changed accordingly

@gwarf is there a way to avoid the spell checker inside code blocks?

Forcing merge as spelling errors are from command outputs and should not be changed

@gwarf is there a way to avoid the spell checker inside code blocks?

Don't know, would have to check docs/conf. Merging as you did is fine with me.


chore(ios): empty homepage prevents pod install

Hi @santiph can you have a look at this PR?
Upon updaring RN to 0.60+, I receive this error on pod install
Fetching podspec for `RNAdvertisingId` from `../node_modules/react-native-advertising-id/ios`
[!] The `RNAdvertisingId` pod failed to validate due to 1 error:
    - ERROR | attributes: Missing required attribute `homepage`.
    - WARN  | source: The version should be included in the Git tag.
    - WARN  | description: The description is equal to the summary.

Looks good to me :)

🎉


relative scroll position

Hello,
I am trying to determine my scroll position on a scale from 0-1. Have trouble understanding what the scrollOffset value in the event represents. Thought it goes from 0 to negative container width, but seems its not that simple.
Is there a simple way to get the scroll position in this range?
Thanks!

Hi,
First of all, which version of famous-flex are you using? I'm asking because v0.3 now returns the absolute  scrollOffset in the events. The scrollOffset is in pixels btw, not percentage. If you want to convert it into percentage, you could wrap it in a 'SizeAwareView' in order the width/height and convert scrollOffset to a percentage.
cheers

Thanks for the quick response,
I am using the 0.3. Noticed the scrollOffset is in pixels, but didn't quite understand what it represents. What I'd want to achieve is a centered scrollView, which starts with the middle-ish element in the middle, at which point the calculated offset is 0.5. And by scrolling to the sides it varies between 0 on the left and 1 on the right.

Works now, with scrollView.scroll(scrollViewSize/2) and onScroll with the calculation relative = (e.scrollOffset) / (scrollViewSize - e.size[0])
+1


CDN links not working

<EMAIL_ADDRESS><EMAIL_ADDRESS>https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.0.0/jspdf.umd.min.js

The file name of the UMD variant has changed: jspdf.umd.min.js
<EMAIL_ADDRESS><EMAIL_ADDRESS>


Fix regression since 0.90.0 that Helmfile becomes too slow when there are many releases

Fixes #959

Oh, why did helm3 plugin install helm-diff --version master install the outdated version of helm-diff??
bash test/integration/run.sh
INFO: (BUsing namespace: helmfile-tests-20191114-113121
INFO: (BUsing Helm version: v3.0.0-rc.2+g82ea5aa
Downloading https://github.com/databus23/helm-diff/releases/download/v2.11.0%2B5/helm-diff-linux.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100   609    0   609    0     0   2071      0 --:--:-- --:--:-- --:--:--  2078

100 6953k  100 6953k    0     0  9970k      0 --:--:-- --:--:-- --:--:-- 9970k
Preparing to install into /home/circleci/.local/share/helm/plugins/helm-diff
helm-diff installed into /home/circleci/.local/share/helm/plugins/helm-diff/helm-diff


error when start emacs 23.1 on centos 6.0

called-interactively-p has wrong arguments, see https://github.com/redguardtoo/emacs.d/commit/3076ef5f559b99b6ac2670b311163a19aa5890b4 for fix

Which library requires this? I see you've put the fix next to global-pointback-mode, but that mode doesn't use called-interactively-p.

pointback. that's what I got the callstack.

Aha, I see that the snapshots of lua-mode and magit-svn have code which passes args to called-interactively-p...

I committed a fix (which is slightly different to yours, but identical in intent); it's in a new file called init-compat.el, which I'll reserve for backwards-compatibility hacks. I remain confused about pointback.el, because that file certainly contains no reference to that function.
Thanks for the report, and the code!

I confirmed this bug.
Here is what emacs told me.
("emacs" "--debug-init")
Loading /usr/share/emacs/site-lisp/site-start.d/focus-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...done
Loading /home/cb/.recentf...done
Cleaning up the recentf list...
File /home/cb/projs/moonlet/src/CMakeLists.txt removed from the recentf list
File /home/cb/projs/moonlet/src/core/moon/src/moonlet_exe.cpp removed from the recentf list
File /home/cb/projs/moonlet/src/core/CMakeLists.txt removed from the recentf list
File /home/cb/projs/moonlet/src/web/webmodule/CMakeLists.txt removed from the recentf list
Cleaning up the recentf list...done (4 removed)
Ido mode enabled
Entering debugger...
pointback-mode: Wrong number of arguments: called-interactively-p, 1

Hmm, odd. Hard to see what's happening without the traceback. Anyway, I guess we've worked around the error now.


decimalNumbers is missing in MySqlConnectionConfig interface

Environment
Knex version: 0.16.4
Database + version: MySQL 5.7.22
OS: OSX 10.14.5
Bug

Explain what kind of behaviour you are getting and how you think it should do

Because we're using MySQL2, we need decimalNumbers  as connection option.
I think that MySqlConnectionConfig interface have to add an optional key as below.
interface MySqlConnectionConfig {
  ...
  decimalNumbers?: boolean;
  ...
}

Error message

Types of property 'connection' are incompatible.
  Type '{ host: any; port: any; user: any; password: any; database: any; decimalNumbers: boolean; }' is not assignable to type 'string | ConnectionConfig | MariaSqlConnectionConfig | MySqlConnectionConfig | MsSqlConnectionConfig | Sqlite3ConnectionConfig | SocketConnectionConfig'.
    Object literal may only specify known properties, and 'decimalNumbers' does not exist in type 'ConnectionConfig | MariaSqlConnectionConfig | MySqlConnectionConfig | MsSqlConnectionConfig | Sqlite3ConnectionConfig | SocketConnectionConfig'.

decimalNumbers: true,

PR would be most appreciated! Should be an easy change.

@kibertoad
I made a PR for this issue (#3244).

0.17.3 with this improvement was released!


[WIP] Push ASR models to Hugging Face Hub

This PR implements a Runner.push_to_huggingface_hub function that pushes ASR models to the Hub after fine-tuning with s3prl.
Here's two examples of upstream models pulled from the torch hub and fine-tuned on ASR:

hubert-base: https://huggingface.co/lewtun/superb-s3prl-hubert-asr
wav2vec2: https://huggingface.co/lewtun/superb-s3prl-wav2vec2-asr

To train these models I use the following commands (e.g. on vorace):
export HF_USERNAME=yourusername
export HF_PASSWORD=yourpassword

python3 run_downstream.py -n asr-push-to-hub -m train -u wav2vec2 -d asr --hub torch -o "config.downstream_expert.datarc.libri_root='/data/lewis/superb/LibriSpeech',,config.downstream_expert.datarc.bucket_file='/data/lewis/superb/LibriSpeech/len_for_bucket',,config.runner.total_steps=500,,config.runner.save_step=500"

where I override the default config with -o and just train for a fraction of the total steps for testing.
For some reason, using @osanseviero's hubert_base checkpoint as the upstream model produces an error in the widget for the fine-tuned model, which suggests we are missing something in the expert.py :

Here's the command I used to fine-tuned the HF Hub model:
python3 run_downstream.py -n asr-push-to-hub -m train -u osanseviero/hubert_base -d asr --hub huggingface -o "config.downstream_expert.datarc.libri_root='/data/lewis/superb/LibriSpeech',,config.downstream_expert.datarc.bucket_file='/data/lewis/superb/LibriSpeech/len_for_bucket',,config.runner.total_steps=500,,config.runner.save_step=500"

I'll add the SD task in a separate PR once we've got ASR running end-to-end :)
TODO:

[ ] Make this work with an upstream model on the HF Hub
[ ] Include tensorboard logs / training args + config in hub repo?

cc @Narsil @albertvillanova

maybe this line i added to model.py will fix the problem with loading the upstream hub model.
couldn't test it because the hub had already loaded the model and i couldn't figure out how to reload it with the new change 😅

ah maybe the cause of the problem with loading the upstream model from the hub is that we need to redeploy the superb image in api-inference-community to access the from_hf_hub feature @osanseviero  implemented in #5 ?

ok thanks to the redeploy of the superb image, this now works end-to-end: https://huggingface.co/lewtun/superb-s3prl-osanseviero__hubert_base-asr-a03c2ae5
i've also included the tensorboard logs and training args for reproducbility purposes :)


SSL Benchmark

Added a small class enabling to output aw weighted sum of a SSL model layers, with the weights learned during fine-tuning.
Downstream benchmark on 6 tasks .
More details about this benchmark are available in this published paper :
https://arxiv.org/abs/2306.00452

Thank you @salah-zaiem  for this great work!

I think the main question to discuss is how we would like to support and structure benchmarks in SpeechBrain.
One idea is to put everything under speechbrain/recipes/benchmarks/SSL_Benchmark. Then we need to add a full section in our main speechbrain README.md and website that properly advertises the benchmarks we have.

Currently, we are working on CL-MARS  (the continual learning one) and MOABB (the EEG one) and we need some consistency. For CL-MASR (see https://github.com/speechbrain/speechbrain/pull/2033) things are a bit easier as here we have a single dataset and many baselines. In the SSL benchmark, instead, we have different models and different datasets/tasks. This creates a significant overlap with standard recipes, which I don't think we can avoid easily.

@salah-zaiem  and @TParcollet  do you have suggestions?

Thank you @salah-zaiem for this great work!

I think the main question to discuss is how we would like to support and structure benchmarks in SpeechBrain.
One idea is to put everything under speechbrain/recipes/benchmarks/SSL_Benchmark. Then we need to add a full section in our main speechbrain README.md and website that properly advertises the benchmarks we have.
Currently, we are working on CL-MARS  (the continual learning one) and MOABB (the EEG one) and we need some consistency. For CL-MASR (see CL-MASR #2033) things are a bit easier as here we have a single dataset and many baselines. In the SSL benchmark, instead, we have different models and different datasets/tasks. This creates a significant overlap with standard recipes, which I don't think we can avoid easily.

@salah-zaiem and @TParcollet do you have suggestions?

Putting everything under a Benchmark folder seems like a good idea.
There's a lot of overlap with a certain number of recipes yes. One first idea, is that I can generally replace the preparation scripts ("{dataset}_prepare.py") with simlinks I guess. The rest is not straightforward to remove. It is more or less equivalent to the addition of a train_with_wav2vec in the folders of the different recipes ( but it"s not because of the weighting ).
Another option, would be the SSL weighted feature extraction, something you can call in a compute_features, by adding it to "features.py". But it would make the use of the benchmark even more complicated. (even though it may be useful for other recipes)

Thank you @salah-zaiem. We discussed the role of benchmarks in the past speechbrain general meeting and we agree that benchmarks should go into an independent repository (speechbrain/benchmarks). For now, it is private, but I gave you access with writing permissions. Would you mind closing this PR and uploading your code there?

Thank you @salah-zaiem. We discussed the role of benchmarks in the past speechbrain general meeting and we agree that benchmarks should go into an independent repository (speechbrain/benchmarks). For now, it is private, but I gave you access with writing permissions. Would you mind closing this PR and uploading your code there?

I can close it, but I still need to get the WeightedSSLModel in SB to run the benchmark code. I kept this PR here only for that for the moment. Maybe I should just open a new PR ?


Adding Array Reverse in Group Algorithm

Array Reverse in Group Algorithm by xyther14

@xyther14, Also delete these modules, vcs, and these additional files also. Just keep the main code file in the PR

There's only 1 file now. I deleted the .idea directory

@xyther14, I mentioned that PR should be in General folder only

When I saw the issue, it wasn't mentioned. You must have changed it afterwards. Should I PR again?

No No, Just change the folder of the PR

Just made a commit with this file in General folder


[]byte with one zero value fails required

type Foo struct {
	ID   []byte `valid:"required"`
	Name string `valid:"required"`
}

func main() {
	f := Foo{
		ID:   []byte{93, 93, 0, 75},
		Name: "Foo",
	}

	if ok, err := valid.ValidateStruct(f); !ok {
		log.Fatalf("ok: %v; err: %v", ok, err)
	}
}

This fails because of the 3rd element in Foo.ID. Replacing it with any other value makes required pass.
This might make sense in general (i.e. all the values in given slice should NOT have a zero value), but it breaks required for UUIDs, for instance. UUID is really just a [16]byte and thus validating Foo{ID: uuid.New()} will be nondeterministic. Depends on whether uuid.New happened to generate UUID with at least one zero byte.

I have the same bug. For example: for uuid "03691600-806c-11e9-b3d0-6c626de70856" govalidator return "non zero value required"

Created a test to cover the reported failure. Unable to reproduce using similar required value and input byte slice. Could be this was resolved in a more recent update since this issue was created. Can you all verify this behavior is still existing w/ latest code? https://github.com/asaskevich/govalidator/pull/373

This seems to be fixed now. I have no idea when, though. Given that I've opened the issue and it is no longer reproducible, I'm closing it.


The intermediary zoom levels are still allowed when constrainResolution is true in MouseWheelZoom

Describe the bug
In set a view with constrainResolution:false (default) to with MouseWheelZoom({constrainResolution:true}).
When I zoom with wheel, zoom level can be intermediate.
To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/ol6-wheel-zoom-h6jlx?file=/main.js

Zoom with wheel
After a moment zoom is not integer

Expected behavior
Zoom stay integer

In ol5, the zoom level is an integer except when I zoom with PinchZoom where zoom level can be a float. This is exactly that bahavior I would like to have with ol6

That that also happens with the Zoom control, see #10066.  As a minimum I think the description needs updating: in OpenLayers 6 with constrainResolution: true set for MouseWheelZoom it always moves by an integer amount, but if it starts at a non-integer value (as will happen if you zoom out until you hit an extent or multiWorld constraint) it adds or subtracts one, so it stays non-integer as dies the Zoom control.  To restrict only to integer zoom levels constrainResolution: true must be specified in the View options, but that will prevent non-integer values with PinchZoom or .fit().  To avoid animating between zoom levels specify duration: 0 in the MouseWheelZoom options.  The DoubleClickZoom interaction and Zoom control also have a duration option.


About the mechanics of round 2 and blame

This kind of follows up some offhand discussion on nostr. TLDR I think you need linkable ring sigs and to think through blame in more detail.
So in round 2 I am assuming:

the message takes the form (ring signature, coinjoin address). ignoring any trivial metadata is that correct?
the round 2 messages are sent as a "broadcast" from an anonymised source, like Tor

The second point was not discussed I think? But it wouldn't make sense to send (rs, cj_addr) with an identifiable point of origin (unless you make an assumption about trusting the relay with your privacy, a little like a VPN). So I am not exactly sure how that is intended to work, but for sure it can be done with e.g. Tor, modulo connection flakiness (this has been a fairly severe issue requiring a lot of attention, even for central coordinators!).
So, anywa, continuing, let's assume the ring signature is not linkable as suggested, that is the primitive we're using is SAG but not LSAG which means it is a spontaneous (you can form the signature without the cooperation of the other keyholders) anonymous (i.e. does not reveal which key) group signature. But it is not linkable in that if you publish two signatures using this method and using the same key, the two signatures are not identifiably from the same key.
In this case we have scenarios like (here notation 'r' is a ring signature, 'a' is a coinjoin address):
only 3 participants (certain scenarios will be more or less likely at e.g. 100)
Scenario 1:
alice posts (r1, a1)
charlie posts (r2, a2)
bob posts (r3, a3)
This is the happy case. Everyone sees 3 ring sigs and constructs the tx and goes on to round 3 correctly.
Scenario 2:
alice posts (r1, a1)
charlie posts (r2, a2)
alice posts (r3, a3)
bob posts (r4, a4)
This is just an example of malicious activity, but just to mention the obvious to other readers: trying to "steal" like this in coinjoin protocols never works (at least never succeeds in stealing!) ... we only sign transactions that don't steal from us (i.e. the only risk is a coding logic error). But let's think about blame:
So let's ask how the code decides to terminate round 2. Does it just wait for N messages (here 3)? If so, it will terminate on receiving (r3, a3) and move on to round 2, ignoring (r4, a4). Again, since they are anonymous, anyone could send anything at any time, so that certainly seems the most reasonable(?).
If so then in round 3 bob will not sign, of course. Is Bob kicked out for refusing to send a transaction-signing message?
(btw, I think questions like this can arise because the way you framed Round 3 is a bit off: you start with "suppose a troll did round 1 and round 2 correctly and is now in round 3" - precisely if we don't use linkable ring sigs, we can't know for sure that they did round 2 correctly)
Alternatively, perhaps we treat it as being the case that if there is any failure at round 3 we have to go back and "open" the ring signatures from round 2; that would be logical.
But that comes back to what I want to mention below about "claimability" and what you referred to as "revealing the private key for the ring signature":
I think examples like this illustrate two things:

we have to be precise about the mechanics of "revealing the key for the ring signature", and
linkable ring signatures are required here

Actually those two points are kind of connected/the same. So, a little ring signature deep lore here: we want "claimability" as a property.
Linkable ring signatures (I think always?) have claimability built in: along with a Schnorr style signature (most but not all ring sig designs use it as a basis), you attach a "key image" (sometimes "linking tag"), it's nothing too sci-fi it's just (private key)*(other basepoint) ('other' because not the usual basepoint 'G'). In effect it's an additional 32 byte tag that will never change even when you change the message you're signing. How that other basepoint is calculated varies per design but it can be e.g. hash-to-curve(list-of-all-keys-in-ring).
The nice thing about this design for our purposes is that all you have to do to reveal that a ring signature came from your pubkey, is to reveal your private key (so it lines up with your description in the README); the everyone else can calculate your-private-key * other-basepoint to get your key image and verify where it was used.
As an alternative non-linkable, consider AOS 2004 (see my blog for some background and links on that), where you just form the ring signature as a "coupled" set of Schnorr equations; doing it this way, I'm not sure how easily you can prove it was your specific private key that signed it;  simply revealing your private key on its own doesn't do it, I think (in contrast with the previous paragraph, note).
(Another thing to consider: scalability is not a trivial issue here if you want to go to 100 participants and higher. It probably won't matter but you at least have to consider it, because the "normal" ring sig designs are linear in the keyset, e.g. 232n for n keys (and there might be some n^2 broadcast going on too). Maybe that isn't an issue at all, but if it is, there are designs that are much more efficient and not too exotic.)
Finally, coming back to the trickiness of getting blame right, I think this quote from the original Coinshuffle paper does a nice job of specifying what you really need from such a protocol:

Second, the
blame phase is entered if the shuffling has not been performed correctly. In that
case, the participants can broadcast their ephemeral decryption keys, along with
the messages they have received. This information allows every participant to
replay the computations of the rest of participants and expose the misbehaving
one. Third, participants could equivocate in the broadcasts of the protocol, e.g.,
by sending different public keys to different participants in the announcement
phase. All participants exchange messages before creating the mixing transaction
to ensure that nobody has equivocated. In case of equivocation, the blame phase
is entered. Since all protocol messages are signed, the equivocating participant
can be identified; two signed messages that are different but belong to the same
sender and the same broadcast step provide evidence of the misbehavior.

I did think briefly about equivocation but I'm not sure if I have any concrete ideas on that yet. I'm not yet convinced you can have a fully 'clean' blame protocol using ring sigs instead of the layered encryption design of coinshuffle or the dc-net design of coinshuffle++, but I'm certainly not convinced you can't, either! .. I haven't much of a clue about it to be honest :)
It's also rather telling that nobody every came up with an instantiation of Coinshuffle(++) without a central server (there was a decred project that used a central server for the ++ variant, though I've no idea whether it was really working well or not).

So let's ask how the code decides to terminate round 2. Does it just wait for N messages (here 3)? If so, it will terminate on receiving (r3, a3) and move on to round 2, ignoring (r4, a4). Again, since they are anonymous, anyone could send anything at any time, so that certainly seems the most reasonable(?).

No, the code gives everyone 10 seconds to send in their round 2 messages. If the wrong number of messages comes in, it ought to start the blame round to find out which people didn't send in a message or which people sent in too many messages.

If so then in round 3 bob will not sign, of course. Is Bob kicked out for refusing to send a transaction-signing message?

If Bob sent a valid message in round 2, he is in no danger of getting kicked out during the transition to round 3. The troll who sent in two cj_addresses will be found out through the blame protocol (not implemented yet) and then everyone will redo round 2 without the troll. Then Bob will, assuming he's honest, sign the transaction in round 3.

precisely if we don't use linkable ring sigs, we can't know for sure that they did round 2 correctly

The blame protocol finds them and kicks them out automatically (well it would if I implemented it -- or at least that's what I expect)

The nice thing about this design for our purposes is that all you have to do to reveal that a ring signature came from your pubkey, is to reveal your private key (so it lines up with your description in the README); the everyone else can calculate your-private-key * other-basepoint to get your key image and verify where it was used.

Sounds cool! I would love to see an implementation of the blame protocol that uses linkable ring signatures instead of the regular kind. Sounds like it could save a round of communication, which is desirable.

So let's ask how the code decides to terminate round 2. Does it just wait for N messages (here 3)? If so, it will terminate on receiving (r3, a3) and move on to round 2, ignoring (r4, a4). Again, since they are anonymous, anyone could send anything at any time, so that certainly seems the most reasonable(?).

No, the code gives everyone 10 seconds to send in their round 2 messages. If the wrong number of messages comes in, it ought to start the blame round to find out which people didn't send in a message or which people sent in too many messages. But I haven't implemented the blame protocol so it doesn't do this yet.

Right, I did also think of it that way, i.e. timeout, but, thinking it through more, we still have to make linkable ring signatures a requirement for blame to actually work:
Imagine 3 scenarios for what's happened after 10 seconds:
2 messages have arrived - we enter blame phase and should easily be able to kick out the one who didn't send a message (after appropriate further delay). Only problem here is that of course messages on anonymised networks like Tor are often delayed; so in practice it's a bit ugly but it's well within a reasonable design criterion to say "this is our requirement for connectivity/liveness".
3 messages have arrived - but two were from Alice, one from Carol and Bob's was delayed. Here, on entering blame phase, Alice can send a valid proof of validity of one of her messages but not the other; again Bob would be kicked out. Again you can not unreasonably argue that Bob has been kicked out with good reason - his connectivity is not good enough, but it's very dodgy that Alice "passes" this round (note that she succeeds in doing so by omission of a transcript/proof). Here it's only "dodgy" but :
4 messages have arrived - two were from Alice, one from Carol, one from Bob. In this case in the blame phase Alice sends a proof that message1 is from her and is valid, Bob sends a proof that message3 is from him and is valid, Carol sends a proof that message4 is from her and is valid. Again, Alice's omission to reveal that message2 is from her and is "valid" leaves the protocol stuck in apportioning blame.
So linkability is the obvious thing to do to (a) get easy "claimability" and (b) fix the failure mode above, so that it is not possible - every linkable ring signature has to have a key image attached to be valid; if two such r.s. contain the same tag and each individually evaluates as valid, it marks both as "illegal"/invalid (note: you can't forge a valid ring signature with someone else's key and therefore key image, on a new message of your choosing).

4 messages have arrived - two were from Alice, one from Carol, one from Bob. In this case in the blame phase Alice sends a proof that message1 is from her and is valid, Bob sends a proof that message3 is from him and is valid, Carol sends a proof that message4 is from her and is valid. Again, Alice's omission to reveal that message2 is from her and is "valid" leaves the protocol stuck in apportioning blame.

Alice cannot omit proving message2 is from her if she reveals message1 is from her. Revealing message1 requires disclosing her private key, and that private key reveals that she also created the signature she sent in with message2. So she is identified as a troll and all honest parties redo round 2 without her. Bob was also a troll in this round, but accidentally, due to network delays. Alice and Bob can both try again in ~three bitcoin blocks and if either one is honest this time (including no unreasonably large network delays) they'll make it through just fine.

Alice cannot omit proving message2 is from her if she reveals message1 is from her. Revealing herself as the source of message1 requires disclosing her private key from round 1, and that private key reveals that she created the signature she sent in with message2 and the signature she sent in with message1.

That's exactly where we get into the nitty gritty of "culpability vs exculpability" and "claimability". Simply revealing your private key does not prove that you are (or aren't) the author of a particular ring sig in the normal ring signature design (non-linkable; for example, the AOS ring signature or the borromean variant that confidential transactions, mimblewimble etc. used in their range proofs). That's "exculpability", and it's not just a weird side detail, it's considered a very useful property in certain well known applications, like voting schemes. For your use case, as we're discussing here, it's something you don't want. That's why I keep bashing on about linkability; with it, you get that opposite case (though it doesn't require actually revealing the private key, which is even better but perhaps just a detail).

Thank you for patiently explaining this to me. I am now convinced that linkable ring signatures are the way to go. Thankfully, the library I used also supports ring signatures, so it should be a small code change.


Make it possible to send return in a chat message

Hello Jeffrey wanted to circle back about carriage returns in chat messages. Can we somehow make it possible to add a carriage return in a string?

Closing as OSC does not support this yet


[MDL-SELECT] Drop down list is always visible

When put into solution, the drop down list is always visible.
This is the code I used and I have attached a file showing what it looks like.
<mdl-select placeholder="testing">
    <mdl-option [value]="1">option1</mdl-option>
    <mdl-option [value]="2">option2</mdl-option>
</mdl-select>

I also created a sample project which demonstrates the problem at https://github.com/waiholiu/testMdlSelect/blob/master/src/app/app.component.html. Project is generated using angular cli so you can simply run it with ng serve.
Not sure if this is a bug or I have set up the project wrong.

looks like you are missing the required CSS files, make sure you are including all CSS (or SCSS) mentioned on https://github.com/mseemann/angular2-mdl-ext

Already mentioned in #624


fix: start api locally too

:tada: This PR is included in version 1.11.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Feature request: support 'max_input_len' and 'max_num_tokens' in config.pbtxt of tensorrtllm

Feature request: support 'max_input_len' and 'max_num_tokens' in config.pbtxt of tensorrtllm.
tensorrtllm_backend version: v0.8.0
I met the 1024 limit of maximum input length, and can't change it in config.pbtxt.
[TensorRT-LLM][ERROR] Cannot process new request: Prompt length (2096) exceeds maximum input length (1024). (/tmp/tritonbuild/tensorrtllm/tensorrt_llm/cpp/tensorrt_llm/batch_manager/GptManager.cpp:251)
1       0x7f6554286491 /opt/tritonserver/backends/tensorrtllm/libtensorrt_llm.so(+0x79d491) [0x7f6554286491]
2       0x7f6556120d55 tensorrt_llm::batch_manager::GptManager::fetchNewRequests() + 453
3       0x7f6556122790 tensorrt_llm::batch_manager::GptManager::decoupled_execution_loop() + 192
4       0x7f66b8ff2253 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xdc253) [0x7f66b8ff2253]
5       0x7f66b8d81ac3 /usr/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3) [0x7f66b8d81ac3]
6       0x7f66b8e12a04 clone + 68

parameters: {
  key: "max_input_len"
  value: {
    string_value: "xxxx"
  }
}
parameters: {
  key: "max_num_tokens"
  value: {
    string_value: "xxxx"
  }
}

Above config takes no effect for now.

max_input_len and max_num_tokens are engine argument and you should set it during building engine. The arguments in config.pbtxt are runtime parameters and you cannot control the max_input_len and max_num_tokens in config.pbtxt.

@kalradivyanshu If the problem still exists, can you please open a new issue and provide a complete log of your commands and outputs?


xchain allowed chains should be read from onchain config (client)

Description
In order to prevent a malicious user from creating a space referring to testnet while on mainnet, the list of allowed chains should be held onchain and respected by the client when trying to set a rule.

Oops, did not need to move this one.


prefetcher: fix memory leak and possible hang when skipping fetch

Consider this simple scenario:

Blocks a -> b -> c
User requests block a, which is fetched with a BlockRequestWithPrefetch action.
Block a is fetched, triggering a prefetch of b with a BlockRequestPrefetchTail action.
When the b request is handled by the main prefetcher loop, it skips further prefetching because the action says it should stop.

That's all correct, but then the prefetch requests for b and a both stay in p.prefetches forever!  If a is never requested again, it is never removed from that map, causing a memory leak (including a pointer to the assembled block).
Moreover, if someone has requested the prefetch wait channel for a and is waiting on it, they'll wait forever since it'll never be closed. The correct behavior is for the channel to be closed whenever all scheduled work is complete, even if the status is not supposed to be FinishedPrefetch.
So instead, we now make sure to cancel a request that we're skipping, as long as some other previous request is not already prefetching it.
Furthermore, if the block is a tail block, we can mark it as finished right away and complete the prefetch, instead of just skipping it.
This also fixes up some action-propagation issues to make sure that a new, upgraded action always overrides an existing lesser action.
These changes alter the timing of the partial sync test a bit, and so the test is now simplified to only check the statuses of the blocks that should definitely be finished prefetching.
It also simplifies the prefetcher tests by waiting on specific prefetches to finish, rather than waiting for the whole prefetcher to shutdown.
Other changes included here (reviewable in their own commits if desired):

Remove dead code around CommonBlock.
interfaces: add Block.IsTail() method
disk_block_cache_wrapped: no move prefetch status with block, since the status should be with respect to the new cache.

@jzila I'll fix the comment.  Did you mean to approve this, or are you still looking?  (Or does the comment grammar bother you that much?)


Can I connect gremlin-server using Neo4j-jdbc-api?

Cypher-Gremlin-Neo4j-Driver uses an API like Neo4j-java-Driver to connect Gremlin Server with Cypher plugin. Is there any API like Neo4j-jdbc-Driver that can be used to connect the Server?

Hello @hagen666,
it is not implemented.
However, it could be implemented by providing cypher-gremlin-neo4j-driver to neo4j-jdbc (probably will require minimal changes from both modules).
Currently, it is not planned for implementation, but contributions are always welcome.


Adding resizing to spec

Currently zarr-python has the ability to resize (through a metadata change) arrays with no guarantee about how the underlying data changes. This is currently not in either v2 or v3 spec. Would be good to make this clearer.
cc @joshmoore @DennisHeimbigner @jstriebel

I agree, we should add a note about that in v3. I'd propose to add something similar to:

resizing is possible
shrinking: Implementations can consider to delete chunks if the store allows this, or keep them. This should be communicated well to the user.
increasing: If no data existed previously for the new areas, they implicitly have the fill value now. Previous partial chunks will contain the fill value at the time of writing them. If there was chunk data before for the new areas, this data will be shown. The latter case should be signalled to the user appropriately.

cc @DennisHeimbigner @jbms


Capture log files from bootstrap-vz

If we pass a logdir flag, we'll now use that for log files, rather
than putting it into a temp directory which is then deleted.
NONE

@kubernetes/kube-deploy-reviewers

@timothysc @moshloop this should let us capture how the existing images are being built, to support unification


Question: How to integrate customized BackgroundTasks implementation?

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
import time
import typing

from fastapi import FastAPI
from starlette.background import BackgroundTasks, BackgroundTask

app = FastAPI()

class MyBGTasks(BackgroundTasks):
    def add_task(self, func: typing.Callable, *args, **kwargs) -> None:
        print("Wow, you added a new task :)")
        task = BackgroundTask(func, *args, **kwargs)
        self.tasks.append(task)

def task_fn():
    print("Doing a task yay")
    time.sleep(2)
    print("Done")

@app.get("/")
def route_handler(background_tasks: MyBGTasks):
    background_tasks.add_task(task_fn)
    return {"hello": "world"}

Description
Why is my custom BackgroundTasks class not loaded here? Is it possible to use custom background tasks implementation? Why does def route_handler(background_tasks: MyBGTasks = Depends(MyBGTasks)): not work?
Operating System
macOS
Operating System Details
No response
FastAPI Version
0.75.2
Python Version
Python 3.10.1
Additional Context
No response

Is it possible to use custom background tasks implementation?

No.

Why does def route_handler(background_tasks: MyBGTasks = Depends(MyBGTasks)): not work?

Because only BackgroundTasks can be used there.

@Kludex So can we use the user annotation(Here is MyBGTasks ) to get BackgroundTasks  instance?
I deep down into fastapi.dependencies.utils.get_dependant and it uses the lenient_issubclass(param.annotation, BackgroundTasks)  to get background_tasks_param_name.


Anonymous user! No more tracks to play.

Keep getting this error.
What should be the values of the following? instead of null
private static String accessToken = null;
private static String accessTokenSecret = null;

The SDK has been updated.
You need to create an application over at http://www.rdio.com/developers/your-apps/


chore: fix typos

📚 Description
Found few misspellings.
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Thanks!

Glad to contribute.

@szepeviktor BTW may i ask what tool you used to find typos?

It is called typos.
https://github.com/crate-ci/typos
It is a single Rust binary.

@pi0 .typos.toml
[files]
extend-exclude = [
    ".git/",
]
ignore-hidden = false

[default]
extend-ignore-re = [
    "Chad Lew",
    "\\bSerKo\\b",
    "\\[[0-9a-f]{7,8}\\]",
]

[default.extend-words]

[default.extend-identifiers]
# Typos
"Github" = "GitHub"


fixed typos in R package docs

Thank you for this great project. I hope you'll consider this pull request to fix minor typos in the R-package documentation (found with devtools::spell_check()).
I apologize about the extra lines touched for trailing whitespace, that is a setting I have in my IDE. Please let me know if you would like me to revert those whitespace-only edits.
I also regenerated the documentation with devtools:;document() so the .Rd files in man/ would be consistent with the roxygen changes I made.

I see that my build is failing with this error:

This is an error I saw a lot in my own projects (private and open source) when devtools went to 2.0.0.
This is a result of the use of craigcitro/r-travis in this project's CI. That project has been deprecated since 2016.
Do you have an issue open to replace it? I would love to contribute a fix!

@jameslamb That would be great!

@jameslamb Thanks, please go ahead and submit a PR.

I've rebased this to master now that #4353 has been merged. Should build successfully now.

I think Travis is failing because of that same transient failure in  the python_test stage I saw on #4353 and others.

Codecov Report

Merging #4345 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4345      +/-   ##
==========================================
+ Coverage   67.93%   67.93%   +<.01%
==========================================
  Files         132      132
  Lines       12239    12240       +1
==========================================
+ Hits         8314     8315       +1
  Misses       3925     3925

Impacted Files
Coverage Δ

src/tree/updater_colmaker.cc
39.76% <0%> (+0.11%)
:arrow_up:

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 be7bc07...61f9730. Read the comment docs.

Thanks!


Refactored, oversampled.

Code works for oversampling singles. However, due to the low abundance of a lot of late T types across certain SNR bins, some SNR-spectral type pairs for late T are not present in the resultant oversampled dataset. Added oversampling code to oversample.py in spectral_binaries.

Added environment setup to avoid dependency issues across contributors (see README for instructions)


Enable several bootstrap methods at a given time

This is a feature request
Problem
Currently, the following options are supported by BootstrapOptions:

default: Use the default bootstrap strategy
peers: pass an array of multiaddr
getPeers: pass a callback that returns an array of multiaddr
enrUrl: pass an enr url to retrieve peers using DNS Discovery

There is also:

maxPeers: Limit the number of peers returned, only applies to peers and getPeers
wakuCapabilityCount: Specify the number of node that supports given capabilities.

Currently, the logic only uses one of the bootstrap option at a time (if then else logic)
https://github.com/status-im/js-waku/blob/1dcb4ee64498c25fad64e3cc37a4c4d54e0dc039/src/lib/discovery/bootstrap.ts#L65
Which means that if a consumer passes several option, then some of those will fail silently (not good).
Also, it does not give the opportunity to the consumer to specify several bootstrap methods at the same time.
E.g. one might want to use the default bootstrap method (whatever it is) and complement with some static peers (using peers).
Finally, if one passes maxPeers with enrUrl then maxPeers is not used but no feedback is provided to the consumer.
Solution
If several bootstrap options are passed then they should all be used and their results consolidated.
if maxPeers or wakuCapabilityCount are passed but none of the passed options uses these parameters, then it should at least log a warning that the parameters are ignored.
DoD

[ ] It is possible to use several bootstrap options together, results are consolidated

[ ] maxPeers applies to each separate bootstrap option

[ ] If a parameter is passed but not used, a warning is logged.

This is done because we now use/expose the libp2p bootstrap array and can pass several methods at the same time (we have done PoC where DNS Discovery and Peer Exchange were passed together).


Use hkps instead of hkp for gpg?

Description
We're behind corporate firewall. Since https://github.com/actions/runner-images/pull/9677/files build doesn't work, hkp protocol is blocked. Could you switch to hkps? That one is using port 443 and works. I don't see any downside to that change.
images/ubuntu/scripts/build/install-swift.sh
Platforms affected

[ ] Azure DevOps
[ ] GitHub Actions - Standard Runners
[ ] GitHub Actions - Larger Runners

Runner images affected

[X] Ubuntu 20.04
[X] Ubuntu 22.04
[ ] macOS 11
[ ] macOS 12
[ ] macOS 13
[ ] macOS 13 Arm64
[ ] macOS 14
[ ] macOS 14 Arm64
[ ] Windows Server 2019
[ ] Windows Server 2022

Image version and build link
HEAD
Is it regression?
no
Expected behavior
Build working, but right now hkp port is blocking us.
Actual behavior
We get timeout on the gpg call.
Repro steps
Building HEAD for ubuntu 20/22.

Hello @mhever!
We follow the recommended approach: https://www.swift.org/install/linux/#Installation-via-Tarball
Please adjust your corporate firewall.

For compatibility reasons wouldn't it be better to switch to hkp://keyserver.ubuntu.com:80?

Hello @mhever! We follow the recommended approach: https://www.swift.org/install/linux/#Installation-via-Tarball Please adjust your corporate firewall.

Hi @MaksimZhukov , Can you please let me know what kind of adjustments should we do on our firewall?
after the firewall changes, does regular swift installation from runner image work? or do we need to add any additional steps/scripts to our build?

This is being blocked for me as well.  I've resorted to manually changing the install-swift.sh to hkps for now.


Revert "Merge pull request #3314 from maya-r/loopdev"

What this PR does / why we need it:
This reverts commit 5c0e98b816c228ba312cd6f3350f2a23a7ae8d4a, reversing
changes made to 7b7e02d8bf393549a21afcc0c871d52099afd20c.
The losetup is not namespaced, and as such is creating a new loop
device in the host for every time the disks-images-provider container
is created. As a result, our CI is doomed to only work 100 times on each
host (the number of pre-provisioned devices). Once the 'next available'
loop device is not a pre-provisioned one, the disks-images-provider
container will fail to reach a Running state, which will cause the
functest make target to fail after 5 minutes (default timeout of the
test script).
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #3569
Special notes for your reviewer:
I would rather revert this PR until we are able to extend it's proposed solution to a scalable one, than removing the entire IPv6 lane.
This is a temporal solution until we manage to come up w/ anything better than #3580
Release note:

NONE

/cc @phoracek @dhiller @danielBelenky @maya-r
I'll keep looking for an alternative tomorrow, but for now, I think this is the cheapest way to unlock CI

I wonder if it'll be easier to pass CI if you combine the revert with the new fix

I wonder if it'll be easier to pass CI if you combine the revert with the new fix in a single pull request

I'd focus on getting kubevirt's repo merge ability back by getting the lane back to life. I'm still finding new stuff about the other PR.

/approve

IPv6 lanes look good. Merging to continue test stabilization.


Implement PBKDF2 EVP_PKEY_METHOD

This adds a EVP_PKEY_METHOD for the PBKDF2. Test cases have been copied
from the PBE and all pass. Zero-length passwords and salts are
supported (although when using a string to set them, only pass/salt
work, but not hexpass/hexsalt with an empty string argument). Test case
in test/pkey_meth_kdf_test.c currently only commited in code, but unused
(will be later merged/squashed with the similar scrypt PR).
This has been cherry-picked from a commit off https://github.com/openssl/openssl/pull/4026 and split into two PRs, as a request from @snhenson.
Checklist

[x] documentation is added or updated
[X] tests are added or updated

I believe this PR is now ready for review. It's rebased to master. Some minor fixes are "SquashMe" commits that I'd squash (together with any other review commits) into the two main ones just before it's ready for merging.

A rebase is also required.

Hi @paulidale, thanks for your review! I have fixed your nits and am looking into adding a "no-pbkdf2" configuration now. Rebased & squashed everything else.

Ah, interesting point: no-pbkdf2 implies no-scrypt as well, because scrypt internally uses PBKDF2 for derivation. I'm not sure how to specify that depencency in "Configure" and I have zero perl experience... any pointers on how to proceed?

So, I have produced a patch that makes PBKDF2 disableable. However, there's serveral issues remaining. First, I receive a warning during build:
WARNING: mkdef.pl doesn't know the following algorithms:
	PBKDF2

I've looked at mkdef.pl and see that PBKDF2 is mentioned nowhere -- but since I have no clue what it does or what implications changing @known_algorithms has, I've not touched it.
Secondly, test fail now:
../test/recipes/01-test_symbol_presence.t
../test/recipes/30-test_evp.t

Apparently, the EVP test is not designed to skip non-built-in tests (likely we're going to have the same issue with scrypt, I fear).

You should probably put something like this into opensslconf.h.in
/* no-pbkdf2 imlpies no-scrypt */
# if defined(OPENSSL_NO_PBKDF2) && !defined (OPENSSL_NO_SCRYPT)
#  define OPENSSL_NO_SCRYPT
# endif

@richsalz, ah, yes of course! Great suggestion, just commited it. Squashed it as well so that the back-and-forth doesn't show up when viewing the single commit.

Just made another change to the code: Previously, I would have let the PKCS#12 GOST MAC fail with the same error code that it would have failed if PBKDF2 derivation failed. This is nonsense and horrible for the user. Therefore, the new error code PKCS12_R_MISSING_PBKDF2 is introduced in crypto/pkcs12/p12_mutl.c for this case.

No need to put the scrypt/pbkdf2 dependency in opensslconf.h.in -- Configure itself has logic for cascading dependencies.  Look for @disable_cascades and add an entry that "pbkdf2" -> ["scrypt"]

Oh, and for mkdef.pl, known_algorithms is what you want -- it's just the list of things that can be enabled/disabled by configure and produce OPENSSL_NO_BLAH preprocessor symbols.

@kaduk, thanks a lot for your hints, it worked perfectly. This also took care of the failed 01-symbol-presence test. I'm looking into 30-evp right now to find an elegant way of ignoring KDFs that we will know in advance aren't included in the build (and thus, will fail).

I'm looking into 30-evp right now to find an elegant way of ignoring KDFs that we will know in advance aren't included in the build

look at test/evp_test.c and strcmp(alg, "pbkdf2") -- right above it is some logic for handling OPENSSL_NO_SCRYPT that you can crib from.

Hi @kaduk, ah, yes! Had just found it, it really was a easy copy/paste. Tests run fine now! I'll squash the whole no-pbkdf2 thing right away so it's easily reviewable.
Thanks to you all again for your support and patience. You're all amazingly helpful, this is great!

Travis is failing. Looks like make update is required.

Thanks, @mattcaswell -- indeed it needed a make update. Just did it and will squash the patch later.

Where are we with this one, @openssl?

Oh wow, I completely dropped the ball on this. To be honest I kind of thought that it'd been already merged. Okay with you, @levitte, if I upgrade the suggested changes and rebase against master?

Please do.
I can't promise it will go into 1.1.1 at this point, though, but it should still be cared for.

Alright, gave it another shot. I left the original structure intact  and didn't do any squashing so it's clearly visible what I've changed. New patches start with d7e3230.
First, I've reverted the possibility to disable PBKDF2, as requested by @mattcaswell.
Then, I've taken the input of @levitte and @snhenson regarding merging the different PKEY #defines -- there was still no definite consensus (at least as I read it), but I believe that everyone wanted to merge salt/key values so that's how I implemented it.
Lastly, I've given a rough draft of how a man7 PBKDF2 could look like and moved the current man7 to man3, as suggested by @levitte. If this is the direction you imagine the man7 to look like, please let me know and I'll polish and extended it. Otherwise I'd just drop it.
Note that I've added some special handling for the previous scrypt-specific salt #define (scrypt has been in master for about half a year now and I don't think it's appropriate to ignore). Also note that tests 70-test_sslcbcpadding.t and 70-test_sslrecords.t are failing (but are failing on master as well, so I don't think I'm at fault).

Also note that tests 70-test_sslcbcpadding.t and 70-test_sslrecords.t are failing (but are failing on master as well, so I don't think I'm at fault).

Regarding that, #5679 may be the chosen solution...

This looks oh so much better in my view.  @mattcaswell, do you have some thoughts on this?

Is this really a PKEY method?  Might a new EVP interface for KDFs make more sense?

Unfortunately, some tests are failing.  Please see the CIs...
Also, this PR hasn't been marked with a milestone.  I'm assuming post-1.1.1 at this point, does @openssl agree?

Hi @levitte, I'll check it out -- did run the local tests but admittedly didn't check the CI.
So I'll beef up the man7 in the way that I'd started out? Does this look good to everyone?

@paulidale, re your question, this is no weirder than the other KDFs in crypto/kdf.  So yes, these are implemented as PKEY methods, which might be confusing, but I think it's been made this way because they are usually a component in PKEY protected session keys.

@johndoe31415:

did run the local tests but admittedly didn't check the CI.

It worries me a bit that the default configuration fails its tests in Travis ;-)

So I'll beef up the man7 in the way that I'd started out? Does this look good to everyone?

I'm not sure if we're still at the debate of whether it should be split up into a man3 part and a man7 part or not...  The man7 file looked pretty much ok for a first read, but I'll have a second look.  However, if it needs flashing out, please carry on!

I'm assuming post-1.1.1

Agreed.

#6674 obsoletes this one I think.
Unless we want a PKEY API for PBKDF2 when another generic KDF API is available.

#6674 obsoletes this one I think.

Indeed.  Closing this.


Add watermark to recordings with WatermarkTextureInput

We can add watermark with the use of WatermarkTextureInput in NatCoder.
Is that possible now to add watermark functionality with WatermarkTextureInput into VideoKitRecorder?
Thank you very much.

+1, would love to see this!

This has been implemented in VideoKit 0.0.6.


Improve text location: OptionalAbstractKeyword

Codecov Report

Merging #2064 into master will decrease coverage by 0.01%.
The diff coverage is 50%.

@@             Coverage Diff              @@
##             master    #2064      +/-   ##
============================================
- Coverage     80.59%   80.57%   -0.02%
  Complexity     1988     1988
============================================
  Files           332      332
  Lines          5705     5705
  Branches       1042     1042
============================================
- Hits           4598     4597       -1
  Misses          554      554
- Partials        553      554       +1

Impacted Files
Coverage Δ
Complexity Δ

...osch/detekt/rules/style/OptionalAbstractKeyword.kt
83.33% <50%> (-8.34%)
6 <2> (ø)

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 72f2225...b62b1ee. Read the comment docs.

I'm not sure what's the problem here...


Move PVnet to separate repo

Below copied from: https://github.com/openclimatefix/predict_pv_yield/issues/112
@peterdudfield
Detailed Description
Move PVnet to separate repo, so that we can install this separately, and do improvements there.
Code is here
image
Context
Good to break it up a bit, then ready to https://github.com/openclimatefix/predict_pv_yield/issues/111 or SBRI project
Possible Implementation

[x] make new repo
[x] move code there
[x] move tests there
[x] add CI
[ ] add library to pypi

@carderne Ill have to send you a Pypi env variable.
see other github actions for releasing a package here


Invalid current key state in IsKeyDown function on Raspberry Pi

When I press some key, IsKeyDown return false, because CORE.Input.Keyboard.currentKeyState[key] have value 2.
    // Update not work
    //----------------------------------------------------------------------------------
    if (IsKeyDown(KEY_D)) ballPosition.x += 2.0f;
    if (IsKeyDown(KEY_A)) ballPosition.x -= 2.0f;
    if (IsKeyDown(KEY_W)) ballPosition.y -= 2.0f;
    if (IsKeyDown(KEY_S)) ballPosition.y += 2.0f;
    //----------------------------------------------------------------------------------

// Detect if a key is being pressed (key held down)
bool IsKeyDown(int key)
{
if (CORE.Input.Keyboard.currentKeyState[key] == 1) return true;
else return false;
}
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 1
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
INFO:     > CORE.Input.Keyboard.currentKeyState[key]: 2
...

@sikor666 that's very weird... key state should never be more than 1...

@raysan5 I found in the documentation, it can be helpful:
https://www.kernel.org/doc/Documentation/input/input.txt

Event interface

  'value' is the value the event carries. Either a relative change for
EV_REL, absolute new value for EV_ABS (joysticks ...), or 0 for EV_KEY for
release, 1 for keypress and 2 for autorepeat.

@sikor666 Nice! Thank you very much for finding it! Actually I corrected the same issue for desktop a couple of weeks ago after a code tweak I did (changing >=1 by ==1). I didn't image issue will also pop-up on RPI side! Thanks! I'll review it asap!

@sikor666 Reviewed. It should work know. Feel free to reopen if it does not.


chore: Copilot version update to 24.3.6

Copilot version update to 24.3.6

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


Initial User Creation

It took me a bit to sort this out because I couldn't find any documentation on it. Either I missed it or it's not there. Either way, here is how I got it working and this possibly should be added to the quick start documentation for the server.
Set an admin password for the server when running in Docker.
docker run \
  -d \
  --name tahskr-server \
  -v "[YOUR DATA PATH]:/app/data" \
  -p [YOUR PORT]:8080 \
  -e "TAHSKR_ADMIN_PASSWORD=[YOUR ADMIN PASSWORD]" \
  --restart=always \
  dullage/tahskr-server:latest

Replace [YOUR PORT] with the tcp port for tahskr-server to listen on
Replace [YOUR DATA PATH] with a path on your filesystem where you want the data to be stored.
Replace [YOUR ADMIN PASSWORD] with an admin password of your choice.

Create a user example with curl
curl -X POST http://[SERVER IP OR NAME]:[YOUR PORT]/user -H 'Content-Type: application/json' -H 'x-admin: [YOUR ADMIN PASSWORD]' -d '{ "username": "[YOUR USERNAME]", "password": "[YOUR PASSWORD]"}'

Replace [YOUR PORT] with the tcp port the tahskr-server listens on
Replace [SERVER IP OR NAME] with the server name or ip address of the tahskr-server
Replace [YOUR ADMIN PASSWORD] with an admin password of your choice.
Replace [YOUR USERNAME] with the username you want to create
Replace [YOUR PASSWORD] with the password you want to create for the user

If all goes well you should see an output from the curl command similar to the following:
{"config":null,"created":"2023-09-17T22:34:57.068144","id":1,"username":"[YOUR USERNAME]"}

Thank you for this. The docs are a bit lacking on this front. I'll get them updated shortly.


Card title group image wrong style

Reproduction
Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/angular-2dvzly
Steps to reproduce:

Just watch

Expected Behavior
Expected design is in the StackBlitz.
Material specs doesn't explicitly explain how card title group must be. But the following image (taken from material.io) can be a good reference.

Actual Behavior
This is very ugly and not usable without custom (a lot) css. You cannot set position for image (start or end)
So you cannot use it for prototyping nor production
Environment

Angular: 11.0.0
CDK/Material: 11.0.0
Browser(s): Chrome Version 88.0.4324.190 (Build officiel) (64 bits)
Operating System (e.g. Windows, macOS, Ubuntu): Windows and macOS

are you talking about this examples ?

As you can see this looks terrible and doesn’t fit with the image I gave in my first post.
The example is exactly the same on v15.0-rc0 version of the website


Plot more than one waveforms on top of each other

I have to plot 2 audios over each other, one being the Expert voice and the other recorded by the user, each with different color. This would help in a visual compare of the 2 audios.
Any advise

it's a css thing once you created 2 wavesurfer instances using javascript. did you try creating 2 wavesurfer waveforms in seperate html elements?

I want them to be in the same canvas however separate control per instance.  I have tried with your recommended way with core css however found it difficult to implement in UI frameworks

found it difficult to implement in UI frameworks

any suggestions to improve it in wavesurfer.js are welcome, closing.


[Autocomplete] Add a service for calculating a checksum for an array …

Q
A

Bug fix?
no

New feature?
yes

Issues
n/a

License
MIT

This PR still needs some tweaks and tests, but I want to validate my idea. Currently, if we pass anything as a third argument in the ->add() method, it is only used on the form render, and is fully ignored during the AJAX call.

While implementing UX's Autocomplete in Sylius, I wanted to complete the following user story
Given I want to edit a taxon
When I want to assign a parent taxon to it
And I check a list of available taxa
Then I should see all taxa except the edited one

So basically, I have to pass a current taxon's ID to the autocomplete's query. As we know, currently it's not possible. So after contacting @weaverryan, I decided to implement a mechanism similar to the one from Live Components.
When you pass an array of options as a 3rd argument, you can use a special extra_options key, which is an array consisting scalars/arrays/nulls.
Next, when the form is rendered, I get these values, calculate a checksum for them, then pass them through json_encode and base64_encode functions. In the end, I glue them to the url values in the \Symfony\UX\Autocomplete\Form\AutocompleteChoiceTypeExtension::finishView method.
So, basically with the following configuration:

we end up with the following HTML code:

I decided to "glue" the extra_options to the URL, as I didn't have to deal with JS. Of course, I do not exclude a chance to refactor it, as a whole method should be refactored anyway.
Finally, the controller decodes the data, checks the checksum and passes the values to the autocomplete's form.

As I'm currently facing a similar issue in recreating some more complex Selection Type which is doing similar things like autocomplete. I'm going to share it also here. https://gist.github.com/alexander-schranz/b1cb8843bc54dc368001375fe6998e61#file-mycontactchoicetype-php-L39 In my case I did also go with providing a list of options, so the loading part will have possibility todo such things. But instead of duplicating the options I just provide a list of which options should be forwarded (string[], instead of array<string, mixed>`. So I don't have to duplicate the value of the option inside the extra_options, item_loader_options in my case.

I try currently some magic to find out automatically my extra_options without have the need to define them in my custom Selection Type:
    public function buildView(FormView $view, FormInterface $form, array $options): void
    {
        $extraOptions = [];
        $formType = $form->getConfig()->getType();

        $innerType = $formType->getInnerType();
        $defaultOptionsResolver = new OptionsResolver();
        $innerType->configureOptions($defaultOptionsResolver);
        $definedOptions = $defaultOptionsResolver->getDefinedOptions();
        foreach ($defaultOptionsResolver->getMissingOptions() as $missingOption) {
            $defaultOptionsResolver->remove($missingOption);
        }
        // FromType, ChoiceType options which we keep always in mind and are important for form widget rendering e.g. required, disabled, attr, ...
        $definedOptions = \array_merge($definedOptions, $options['extra_options']);

        $defaultOptions = $defaultOptionsResolver->resolve([]);
        foreach ($options as $key => $value) {
            if (!\is_scalar($value)) {
                // ignore all options which are non-scalar values
                continue;
            }

            if (!\in_array($key, $definedOptions)) {
                // we ignore all options which were not defined specifically for the inner type
                continue;
            }

            if (isset($defaultOptions[$key]) && $defaultOptions[$key] === $value) {
                // we ignore all options which have the same value as the default value
                continue;
            }

            $extraOptions[$key] = $value;
        }

        $view->vars['extra_options'] = $extraOptions;
    }

Do you want some help/feedback/other on this ?

Hi @smnandre,
I've refactored one of two places I marked as "needs to be refactored". I have to write some functional tests for it, and... basically it will be ready to be fully reviewed.
I'll let you know once ready to be reviewed :D.

Great! Good luck then :)

I guess I haven't missed anything, and it's ready to be reviewed 👍🏻. AFAIR LiveComponent build failures are not related to my PR.

Somewhere in the future documentation, should we add a small warning about the visibility of extra_options ? Something like "the given extra options can be retrieved and therefore should not contain sensible or personal information"

Do you have a demo in mind (once its merged) ?
I was thinking about it, and i think a "basic" demo would be great (with the kind of scenario you describe in the PR introduction).
But even greater, and showing how all the UX component can together create some smart interface, i'd suggest something that combine LiveComponent and Autocomplete+option.
Something like:

What do you think ? Have you any other idea ?

FYI my solution seems to work. I set up a new Sylius branch locally with our new admin panel, and here're results :).
final class TaxonTypeExtension extends AbstractTypeExtension
{
    /**
     * @param array<string, mixed> $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $taxonId = $builder->getData()->getId();

        $builder
            ->add('parent', TaxonAutocompleteChoiceType::class, [
                'label' => 'sylius.form.taxon.parent',
                'extra_options' => [
                    'excluded_taxons' => null !== $taxonId ? [$taxonId] : [],
                ],
            ])
        ;
    }

    public static function getExtendedTypes(): iterable
    {
        return [TaxonType::class];
    }
}

// ...
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'class' => $this->entityClass,
'searchable_fields' => ['translations.name'],
'choice_label' => 'fullname',
'query_builder' => function (Options $options) {
return function (EntityRepository $er) use ($options) {
$qb = $er->createQueryBuilder('o');
$qb->andWhere('o.enabled = true');
                $taxonsToBeExcluded = $options['extra_options']['excluded_taxons'] ?? [];
                if ([] !== $taxonsToBeExcluded) {
                    $qb->andWhere($qb->expr()->notIn('o.id', $taxonsToBeExcluded));
                }

                return $qb;
            };
        }
    ]);
}

// ...

![CleanShot 2023-12-27 at 15 30 58@2x](https://github.com/symfony/ux/assets/80641364/9218552b-2356-4138-a935-f600e4381909)

@smnandre about the demo... I wasn't thinking about it yet :D.

@smnandre about the demo... I wasn't thinking about it yet :D.

Oh it's not something required or asked in any way haha :)  Just to know if you had something in mind :))

Friendly ping :) - I'd love to get this across the finish line. Thanks!

Hi @weaverryan,
I'll try to get back to it this weekend 😅.

Thanks for your hard work on this Jacob!

Not sure if this is bad etiquette, but if anyone came to this thread looking for how to use this new feature, an example of how to use it is in this thread, it's just hidden by GitHub. It's right here.

Oh yea, it looks like we missed creating a docs PR. @jakubtobiasz are you able to create a quick docs PR for this feature?


Update pushsafer.py

Now you can setup your pushsafer notification, and change the following parameters:
sound, vibration, icon, devices (targets), icon/led color, url, url title, time2live, picture
Configuration variables:

name (Optional): Setting the optional parameter name allows multiple notifiers to be created. The default value is notify. The notifier will bind to the service notify.NOTIFIER_NAME.
private_key (Required): Your private or alias key. Private key = send the notification to all devices with standard params, alias key send the notification to the devices stored in the alias with predefined params.

Examples:
Message to 2 devices with formated text
{
  "title": "Test to 2 devices",
  "message": "Attention [b]bold[/b] text[br][url=https://www.pushsafer.com]Link to Pushsafer[/url]",
  "target": ["1111", "2222"],
  "data": {
    "icon": "2",
    "iconcolor": "#FF0000",
    "sound": "2",
    "vibration": "1",
    "url": "https://home-assistant.io/",
    "urltitle": "Open Home Assistant",
    "time2live": "0"
  }
}

Message to 1 device with formated text and image from an external URL
{
  "title": "Test to 1 device with image from an url",
  "message": "Attention [i]italic[/i] Text[br][url=https://home-assistant.io/]Testlink[/url]",
  "target": ["1111"],
  "data": {
    "icon": "14",
    "iconcolor": "#FFFF00",
    "sound": "22",
    "vibration": "3",
    "url": "https://home-assistant.io/",
    "urltitle": "Open Home Assistant",
    "time2live": "60",
    "picture1": {
       "url":"https://home-assistant.io/images/components/alexa/alexa-512x512.png"
     }
  }
}

Message to 2 devices and 1 device group with formated text and local image
{
  "title": "Test to 3 devices with local image",
  "message": "Attention [i]italic[/i] Text[br][url=https://home-assistant.io/]Testlink[/url]",
  "target": ["1111","2222","gs3333"],
  "data": {
    "icon": "20",
    "iconcolor": "#FF00FF",
    "sound": "33",
    "vibration": "0",
    "url": "https://home-assistant.io/",
    "urltitle": "Open Home Assistant",
    "time2live": "10",
    "picture1": {
       "path":"C:\\Users\\Kevin\\AppData\\Roaming\\.homeassistant\\image-760-testimage.jpg"
     }
  }
}

@MartinHjelmare
made your suggested changes

@pvizeli
everything is fine now, or must a change be made.
Why Travis CI build failed?


unsafeURI throws a helpful error

Instead of "fromJust: Nothing" (which could be from anywhere!), the error explains that the library was unable to parse the URI and shows the URI string.

Thanks for the contribution @emhoracek! I've merged your commit (with some formatting tweaks) and released as 0.2.5. My apologies for the delay -- I must have missed the email notification for this and didn't see the PR until just now.

@cbaatz There was no hurry! Also you may be interested to know that atom-basic is now being used in production by Jacobin Magazine (https://www.jacobinmag.com/feed). Seems to be working well!

@emhoracek ah, cool, happy to hear you're finding it useful!


is that possible add a  div between  and

This is a (multiple allowed):

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Swiper Version: EXACT RELEASE VERSION OR COMMIT HASH, HERE.

Live Link or JSFiddle/Codepen or website with isssue: PREFERABLY (IF YOU WANT YOUR ISSUE TO BE RESOLVED ASAP).

What you did
EXPLAIN WHAT YOU DID, PREFERABLY WITH CODE EXAMPLES, HERE.
such as draggable between swiper and swiper-slide

Expected Behavior
EXPLAIN WHAT IS TO BE EXPECTED, HERE.
can work
Actual Behavior
EXPLAIN WHAT IS ACTUALLY HAPPENING, HERE.
P.S. Remember, an issue is not the place to ask questions. You can use Stack Overflow
for that.
Before you open an issue, please check if a similar issue already exists or has been closed before.

No, not by default, but you can use plain Swiper instead of this plugin. But i'm note sure that slides dragging will work


TS-3235: fix crash problem caused by sync problem in PluginVC.

This is an updated version of PR 164 that has been tested in production. It attempts to fix the related issue in the C++ API.

What is ScopedContinuationLock for?

It lets the C++ API lock a mutex that is contained in a continuation in a scoped fashion. The already existing mutex locking mechanisms handle mutexes via the POSIX interface ({{pthread_mutex}} via {{pthread_mutex_lock}} and {{pthread_mutex_unlock}}). Those mutexes are completely independent of ATS provided mutexes. This makes mutual locking difficult. {{ScopedContinuationLock}} makes it possible for the C++ API to lock a continuation in a way that is detectable by core ATS.

I just meant that I didn't see it used in this patch. Did I look in the right place?

Hmmm. I did use it at one point during development of this patch but it appears that code was removed. I'd prefer to leave it in for future use, although it's not actually needed for this change.

Ah. Yep that seems fair enough.