SARAALERT-501: Alternate Contact

Description
Jira Ticket: SARAALERT-501
Allow user to specify alternate contact & unenrolled reporters.  See mockups here and the above JIRA for additional implementation details.
(Feature) Demo/Screenshots

Important Changes
Please list important files (meaning substantial or integral to the PR) along with a list of the general changes that should be highlighted for reviewers.
patients_controller.rb

Set initial values of contact_type ("Self" for new monitoree, "Unknown" for new group member and blank import)
Add all new fields to allowed params list
Only add contact_name to the group member subset (should be the only field copied over when enrolling a new group member)

patient_details_helper.rb

Add new fields to full history fields for export list

patient_query_helper.rb

Added advanced filter for primary contact type
Organized the when conditional so that it is organized alphabetically

validation_helper.rb

Added necessary validations to all the new fields

Address.js

Matched spacing for the new tabs in Contact.js

Contact.js

Added new contact_type and contact_name fields to the top of the contact section of the enrollment wizard
Added all new alternate contacts fields to a new tab of the contact section
Renamed updatePrimaryContactMethodValidations to updateContactMethodValidations because it is used for the alternate contact stuff as well
Always set confirm_email and confirm_alternate_email fields (even if not populated).  This fixed a bug where you could click next without confirming the email
Broke out rendering of all input fields into a different function because they're basically the same and reduces a lot of duplicate code
Added yup validation to all new fields (note: none of these are required)

Patient.js

Added new fields to display in Contact section
Tweaked how the minor information is displayed (moved to the top of each section and only displayed if contact type is "Self")

Import.js

Display contact type and contact name (if contact type is not self) on import
Refactored button code from ternary render because it was unnecessary

PatientsTable.js

Added additional class so that the tab styling that brings "All Monitorees" to the right is not applied to all sets of tabs

AdvancedFilter.js

Slightly refactored how the option formatting works for filters of type multi select.  Now a single array list of options can be added to the options file and it will render no problem

InfoTooltip.js

Added tooltips for primary and alternate contact information (displayed on subsection titles in monitoree details)

advancedFilterOptions.js

Added primary contact type as a new multi select advanced filter option

dashboard.scss

See changes for PatientsTable.js, makes the updates so that the tab styling is only on the dashboard

helpers.js

Alphabetized export list
Added isMinor method to use in front end tests

mockPatients.js

Updated mockPatients with new fields for front end tests

Patient.test.js

Fixed broken tests and added new tests for all possible displays for contact information

HouseholdMemberTable.test.js

Fixed broken test resulting from updating the mocks

import_export_constants.rb

Added all new fields to sara alert format for import/export
Added contact_name as Emergency_Contact and alternate_primary_telephone as Emergency_Telephone for Epi-X import
Updated tree structure for custom export to have separate primary and alternate contact sections and added all the new fields

patient.rb

Added new fields to enum validation list

20210930175111_add_alternate_contact.rb

Add all new fields in db migration
Setcontact_type to "Unknown" for all existing monitorees

schema.rb

Add all new fields to patients table in the db with string limits

demo.rake

Populate new fields in demo script (alternate contact only sometimes populated)

Sara Alert Import Format.xlsx

Updated format file to include all new fields added on at the end

Sara-Alert-Format-Exposure-Workflow.xlsx, Sara-Alert-Format-Invalid-Fields.xlsx, Sara-Alert-Format-Invalid-Monitorees.xlsx, Sara-Alert-Format-Isolation-Workflow.xlsx, Sara-Alert-Format-With-Jurisdictions-EW.xlsx, Sara-Alert-Format-With-Jurisdictions-IW.xlsx, Epi-X-Format-Invalid-Fields.csv , Epi-X-Format.csv

Updated test fixture files to include all new fields with valid and invalid values

monitorees.yml

Updated fixtures for system tests to have some monitorees with contact type/name and alternate fields set

form_validator.rb

Tweaked test based on the tweaks made to email yup validation

steps.rb

Added new enrollment steps for system tests

import_verifier.rb

Tweaked import test helper methods to support the new fields
Added contact type/name to the verify import page method (because they were added in the modal)

public_health_import_test.rb

Removed uneccesary rubocop disable

Testing Recommendations
Please list any recommendations regarding what reviewers should test and if there is any specific guidance on how to test certain aspects of the PR. Be sure to mention edge cases that should be tried, particularly in the UI.
Run the demo script before you start testing so you have monitorees that have the new fields populated.
Read over the JIRA ticket for the specific implementation details and be sure everything was added and works accordingly.  Besides going through the JIRA, test creating and editing monitorees in all possible ways with valid and invalid field values.
Also @timwongj, double check the contact warning stuff you recently added.  I refactored Contact.js and had to copy some stuff over.  Just want to be sure I didn't miss anything.
Checklists
Submitter:

[x] This PR describes why these changes were made.
[x] This PR is into the correct branch.
[x] This PR includes the correct JIRA ticket reference.
[x] Comment added to the relevant JIRA ticket(s) with a link to this PR
[x] Code diff has been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
[x] If UI changes have been made, Chrome Dev Tools Lighthouse accessibility test has been executed to ensure no 508 issues were introduced.
[x] Tests are included and test edge cases
[x] Tests have been run locally and pass (remember to update Gemfile when applicable)
[x] Test fixtures updated and documented as necessary

@tstrass :

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code
[ ] If applicable, you have tested changes against a large database, and considered possible performance regressions
[ ] Tested all recommendations listed in the "Testing Recommendations" section. The application behaves as expected with this PR.

@ngfreiter :

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code
[ ] If applicable, you have tested changes against a large database, and considered possible performance regressions
[ ] Tested all recommendations listed in the "Testing Recommendations" section. The application behaves as expected with this PR.

@timwongj :

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code
[ ] If applicable, you have tested changes against a large database, and considered possible performance regressions
[ ] Tested all recommendations listed in the "Testing Recommendations" section. The application behaves as expected with this PR.

@hackrm :

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code
[ ] If applicable, you have tested changes against a large database, and considered possible performance regressions
[ ] Tested all recommendations listed in the "Testing Recommendations" section. The application behaves as expected with this PR.

The changes in ed3952d look good, but I think they may have caused system tests to start failing.

fixed with this commit: https://github.com/SaraAlert/SaraAlert/pull/1116/commits/5d4149eeba966482a2fb93edaed91b3be97d2a92


APNS device token not set before retrieving FCM Token

Getting Error: APNS device token not set before retrieving FCM Token for Sender ID '1040730720947'.Be sure to re-retrieve the FCM token once the APNS device token is set.
Getting above issue on Cordova hybrid ios app while subscribing to topic.
Taken care of following things:
1] Latest firebase messaging app is installed,
2] Firebase notification permission taken from user
3] provisioning profile, certificates and APNS key is set properly in Apple profile.
Still this error is coming. Please suggest if any solution is available for this issue?

same here for iOS (tested with iOS 16.2 and 17.2):
code:
cordova.plugins.firebase.messaging.requestPermission().then(function () {
  console.log("messaging permission granted");
  cordova.plugins.firebase.messaging.getToken().then(function (token) {
    console.log("Got device token:", token);
    window.fcmToken = token;
  }).catch(error => {
    console.error("Failed to get token:", error);
  });
}).catch(function (error) {
  console.error("Permission denied:", error);
});

logs:

messaging permission granted
Failed to get token: The operation couldn’t be completed. No APNS token specified before fetching FCM Token

@markenapps https://github.com/chemerisuk/cordova-plugin-firebase-messaging/blob/master/plugin.xml#L33


[Feature Request] Add Double ended queue and more complex sorting algorithms

🚀 Feature Request
I would like to add Double ended queue and more complex sorting algorithms

Would you like to work on this feature?

[X] Yes
[ ] No

@ajay-dhangar sir can i be assigned this dequeue(Double-ended queue) blog as I have added the Problem sets but blog isn't there


Hook for initialization?

Is your feature request related to a problem? Please describe.
It should be pretty common for a svelt kit app to utilize external services that you need to initialize clients to talk to them. The doc demonstrates such use case:
import db from '$lib/database';

export async function get({ params }) {
	const { slug } = params;
	const article = await db.get(slug);
	// ...
}

One issue with this code is that it assumes db can be initialized in the module itself either synchronously (which is not always the case) or via top-level await (which svelte kit doesn't seem to support).
Describe the solution you'd like
Offer a hook like async func init() {} that only runs once when it starts?
Describe alternatives you've considered
How important is this feature to you?
Very, since it's pretty awkward to workaround when the initialization is async (e.g., force initialization to be synchronous and only call the async part when actually talk to external services).
Additional context

Possibly related to #1530

That issue is about client initialization. But yeah, the two issues should probably be considered en masse to ensure an intuitive API.

Another way to solve this problem is that svelte kit offers a central place to initialize such clients, and pass the clients as an arguments to endpoints and hooks:
export async function get({ params, svcs }) {
	const { slug } = params;
	const article = await svcs.db.get(slug);
	// ...
}

This seems to be more conventional than the approach that a module is directly usable as an external service.

You seem to have missed the request.locals convention in the handle hook. Here's an example from the SvelteKit demo app:
https://github.com/sveltejs/kit/blob/6372690df51257cb811185d33892b6b3146620e8/packages/create-svelte/templates/default/src/hooks.ts#L1-L7
There's no rule that you have to re-do work every request (or that the information involved has to be personalized to the user that made the request). Let me demonstrate:
// src/hooks.js
import { stuff } from "db-library";

async function setupDatabaseOrAnythingReally() {
    const dbClient = await stuff({ ...options });
    return dbClient;
}

// Initialize the database *once*
const dbPromise = setupDatabaseOrAnythingReally();

/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ request, render }) {
    // Wait for the db to initialize the first time
    // or instantly get the result of when it was initialized
    const db = await dbPromise;

    // Make the database available to the endpoint answering the request
    request.locals = { db };
    return await render(request);
}

locals in an endpoint work the same as your svcs:
// src/routes/blog/[article].json.js
 export async function get({ params, locals }) {
	const { slug } = params;
	const article = await locals.db.get(slug);
	// ...
}

Another maintainer can re-open this if I'm mistaken about what this feature request was about.

Thanks for the tip.
However I think this means that clients are actually initialized at the first connection, potentially delaying it if the initialization is not trivial.

However I think this means that clients are actually initialized at the first connection, potentially delaying it (and other connections) if the initialization is not trivial.

I believe that promises automatically "start executing" the next tick after being created, so this shouldn't be an issue. You can verify by putting a console log at the beginning of the initialization function and see when it shows up.

Oh you are correct. I forgot how promise works lol. Thanks. This works.

Two minor issues I encountered while working with real code:

During development, hook.ts is not executed until there is a connection. I guess this is due to the lazy-loading nature of vite. It's not a big deal in development, but the disparity between dev and prod can potentially be a problem.
During build hook.ts is executed. This can be a problem if your build environment isn't qualified to initialize external services.

For #2, I guess it's executed because svelte kit tries to account for pre-rendered routes? I don't have any such routes, but even if I did, they don't always depend on external services.

2. During build `hook.ts` is executed. This can be a problem if your build environment isn't qualified to initialize external services.

Wrap the stuff you don't want to happen during build with if (!prerendering) https://kit.svelte.dev/docs#modules-$app-env

I've just spent an unnecessarily long time with a certain problem that might be simpler if this was a thing, I was thinking to post this in #1530, but "hook for initialization" might be more appropriate. Can this be reconsidered as it would be more straightforward than the solution/workaround below?

The problem I was having is with an external library that provides an .init() function that can be filled with our own options and properties, everything that needs to happen before any user code is executed. There's no server.js or client.js anymore and instead (replaced with?) just hooks.js.
Now, I feel it's reasonable to assume that hooks are both server and client combined, so placing the .init() once in there should makes sense and in theory prepopulate the library options. But that isn't the case here and I've got to mess around inside node_modules itself to find out that the options that should be passed through .init() are still undefined in certain places of execution. This actually breaks SvelteKit in a way that cannot be debugged at all, it renders the page with everything for a second and then immediately throws an error, that's weirdly not caught by the ErrorLoad but shows the error page.
Inlining the options in the node_modules file itself works and successfully runs the app no problem, so it's not the library nor SvelteKit's fault, but changing the package through node_modules directly can't be considered a solution. I tried a lot more other ways in hooks to solve this but none seems to work.
I even tried to block off the whole handle hook from running before .init() function finishes, and at this point I realize that it might just not run at all. As a last resort, I duplicated all the initializing that's called in hooks and copied them to __layout, and everything works perfectly. Now, this is a huge problem because as the docs stated, it runs on both pages and endpoints, so it should've prepopulated the options without having to call them in __layout again.
https://github.com/sveltejs/kit/blob/eae1b1da092e53ef908a3561abd3aa98ca7dd1a4/documentation/docs/04-hooks.md#L11

@babichjacob Great tip! I totally forgot about build flags.
@ignatiusmb I believe hooks are server side only, "pages" in the referenced doc refers the SSR.
I do think hooks.ts's ability to function as the initiation point is not self-evident, might be worth to document it. I'll send a PR within the week if no one beats me to it.

Actually, I think I should ask before writing the doc:
Will the maintainers accept an PR that add a chapter about (server side) initialization to the doc? Should it be in its own chapter? Putting it in a subsection of the hooks chapter seems to assume it's obvious that initialization should happen in the hooks file, which I don't think is the case.

Reopening to reconsider a single file approach and would probably resolve #1530 as well

I just want to add that what I'm looking for in an initialization hook is the ability to guarantee certain code finishes running before any of the rest of the server begins listening, since I don't want to wait until I receive a request to know that some of my initialization hasn't finished yet.
The promise in the handle hook only really works if setup is not expensive, otherwise the first request will take much longer than the rest. Also, it seems much more like a hack than something that SvelteKit was made to support.

Let's say I'm using @urql/svelte and its initClient().
If I use that method both in

src/routes/__layout.svelte and in
src/routes/login/__layout.reset.svelte

it initializes my urql client two times!
Is there a workaround today?
I'm using it like this because in src/routes/__layout.svelte I redirect the user to /login if is not authenticated.

it initializes my urql client two times!
Is there a workaround today?

Here's an approach I just thought of.
Create a store in a separate module, say urqlclient.ts. It would look like this:
// urqlclient.ts
import { initClient } from 'svelte-urql';

const noop = () => {};

let client = null;
export const urqlclient = readable(null, (set) => {
  if (!client) {
    client = initClient('whatever params you need');
  }
  set(client);
  return noop;
});

Then when you need an URQL client, get it from the store via $urqlclient. The first time any piece of your code subscribes to this store, the readable's initialization function will be called. Since it calls set before returning, the first subscriber will receive a non-null value. If that first subscriber unsubscribes before a second subscriber asks for a client, the initialization function will be called again, but the second time it will simply return the cached value of client and not call initClient a second time.
This will allow the rest of your code to just do import { urqlclient } from '$lib/urqlclient.ts' and then use $urqlclient knowing that that value will be a properly-configured client.

While the workaround (above) seems to clearly work - it requires a huge amount of typescript code for something that could be solved with one or three lines in other stacks like Vue3.
Or am I getting something wrong in this TS version
import { firebaseConfig } from '../env'
import { initializeApp } from 'firebase/app'
import type { FirebaseApp } from 'firebase/app'
import { readable } from 'svelte/store'
import type { Readable } from 'svelte/store'

// SvelteKit init for Firebase at the _Client side_

// eslint-disable-next-line @typescript-eslint/no-empty-function
const noop = () => {}
let app:FirebaseApp|null = null
export const firebaseApp:Readable<FirebaseApp> = readable(null, (set) => {
  if (!app) {
    app = initializeApp(firebaseConfig)
  }
  set(app)
  return noop
})

Obviously, the question here is, how important the statically rendered SPA's are? After all, this can be done easily and in a lot more sensible manner at the server-side, if a static app bundle is not a requirement.

Top-level await was broken in Vite at the time of https://github.com/sveltejs/kit/issues/1538#issue-899375025, but is since fixed, which means this problem is very easily solved — you can do your setup work in hooks.js...
const db = await createConnection();

export function handle({ request, resolve }) {
  request.locals.db = db;
  return resolve(request);
}

...or if that feels weird you can do it in a module that's imported by any endpoints that need it:
// src/lib/db.js
export const db = await createConnection();

// src/routes/my-endpoint.js
import { db } from '$lib/db';

export async function get() {
  return {
    body: await db.get(...)
  }
}

The latter technique also applies to clients that are needed by pages, like Urql. Demo here.
Given all this, is a dedicated initialization hook necessary?

@Rich-Harris if there is some complicated logic at init, that takes some time, it would be better to do init immediately when server start instead when first request come, as it slows first request.

if there is some complicated logic at init, that takes some time, it would be better to do init immediately when server start instead when first request come, as it slows first request. But actually it doesn't need to be init hook, just execute hooks.js file at server start.

Alternately, you can start your server and immediately do a request to trigger the init logic: node server.js in one terminal, then curl http://example.com/request/ in another terminal. Might not work for every use case, but would work for all the use cases I've encountered personally.

actually I do "ping" of server right after it start.
exec('ping -c 1 process.env.SERVER_URL')

@Mlocik97 An ICMP Echo Request is not even visible to a web server.

it works totally fine... I just tested it...
but now that I think about it, there is much simpler solution, by just adding:
{
    "start": "node build"
    "poststart": "ping -c 1 <server_url>"
}

to package.json

oh right, I meant to do GET command, somehow wrote bad one.. but it can be done same way:
exec(`GET ${process.env.server_url}`)

or even better, use "poststart" in package.json with GET command... You can create endpoint, for that, that will return nothing, just status, so You don't burden server.

@Rich-Harris
In the latest version (create-svelte version 2.0.0-next.127), using top-level-await in hooks.js causes an error in the "svelte-kit build".
rendering chunks (7)...[vite:esbuild-transpile] Transform failed with 1 error:
index.js:2936:0: ERROR: Top-level await is not available in the configured target environment ("es2020")

Is there a workaround?

Given all this, is a dedicated initialization hook necessary?

yes


Cleanup command feature

Yes. I'll do it.

Oh, and also a purge command that deletes messages irrespective, given number of messages as optional parameter

Cleanup cleanup!


SSL needs PFS (Perfect Forward Secrecy): ssl_cipher to nginx config

Hi,
For installing an iOS app (using a plist file) I need to enable PFS. In order to do this I need to add ssl_ciphers to the nginx configuration file of my app. Whenever I change the configuration file and reload nginx it overwrites my changes.
Could you let me know where I can add this ssl_ciphers parameter?

Here's where the nginx configuration gets generated: https://github.com/AppScale/appscale/blob/3423ba485b305300dd3021275bc4fb4d2b40da5a/AppController/lib/nginx.rb#L249-L286


Oracle Backend for Microservices and AI integration and user management

Since the vectorestores are currently created under ADMIN schema, it should be managed the user authentication getting from OBaaS user management service in order to create the vectorstore on the user related schema and make simpler run in production under an Sandbox coming API Server as well as  SpringAI microservices.

consider how to create a different user in K8s env:

oractl for obaas
initContainer for standalone


dex(events): use ProtoEvent to record events

Part of #3504

I'll add the SCT events in a separate PR. I also want to work through a couple examples of DEX integrations to make sure that we record everything useful. But I will do that offline.


Enahncement: A Better Session Cookie Management

We need a more optimal approach on managing session cookies. The problem with starlette.middleware.session.SessionMiddleware is that it does not create multiple cookies if there is a large session data to store that cannot be fit into one Set-Cookie HTTP response header. The max-size limit per cookie allowed by the browsers is 4096 bytes beyond which browsers silently ignores the Set-Cookie header.
Adding to the problem of storing entire session data into just one cookie, base64 encoder further increases the size of Set-Cookie header. This causes the issue with storing Oauth2 and OIDC tokens and their metadata whose size is already too large to store in one Set-Cookie header. If the user is using multiple Identity Providers in the app, that will multiply the session data.
What we need

Support for splitting cookies if the size of the session is greater than 4096 bytes. Browsers allows 150-180 cookies per domain and max-size of 4096 bytes per cookie.

Set-Cookie

To send multiple cookies, multiple Set-Cookie headers should be sent in the same response.

base64 encoding of Set-Cookie header is recommended by RFC4648.

To maximize compatibility with user agents, servers that wish to
store arbitrary data in a cookie-value SHOULD encode that data, for
example, using Base64.

But we can also use custom encoders that will not increase the size that much. Nice to have if we can compress the size of encoded string.
What are allowed characters in cookies?

In practice you cannot use non-ASCII characters in cookies at all. If you want to use Unicode, control codes or other arbitrary byte sequences, the cookie_spec demands you use an ad-hoc encoding scheme of your own choosing and suggest URL-encoding (as produced by JavaScript's encodeURIComponent) as a reasonable choice.

Flask seems to be using a custom encoder which actually decreases the size after encoding and signing which is impressive but also complex.

Notes

Splitting the session into multiple cookies solves the size problem so it is fine to use base64.

We can upstream the feature 1 to SessionMiddleware but if you have more ideas to improve session management further, we can offer a middleware out of box that manages the session.

References For Cookie Specification
https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
https://datatracker.ietf.org/doc/html/rfc6265
What Do You Think?

Sounds good to me.
Im for having our own session middleware - i would like to add optional persistence as well. To allow for session based autorization (see the builtin django auth as an example).

Agree with note #1 - if producing multiple cookies isn't an issue then the encoding isn't a problem unless reducing the size has better performance characteristics.
This issue is an interesting related read: https://github.com/oauth2-proxy/oauth2-proxy/issues/482 - it tails off into very k8s specific session storage ideas but in the end they mention that they LZ4 compress their sessions so that for the most part splitting isn't an issue.


3.4

Support python 3.4 (no codebase changes required)
Fix type comments vs type hints

Pull Request Test Coverage Report for Build 196

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

Totals

Change from base Build 195:
0.0004%

Covered Lines:
949

Relevant Lines:
953

💛  - Coveralls

Yes. I'm working on it. It will allow to make python 2 code simplier.
пн, 3 сент. 2018 г., 18:21 Antonio Esposito<EMAIL_ADDRESS>
Do you want to remove Python 3.x support at all from <2 version?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/python-useful-helpers/exec-helpers/pull/70#issuecomment-418155913,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APSmMya1EmyuSbzryum61alXyGpLVIVsks5uXVcPgaJpZM4WX0fU
.


Upstreaming bevy_eventlistener

In #9538 @cart has suggested that we could upstream bevy_eventlistener. @aevyrie Is willing to do the work, but needs guidance and assurance that this won't be wasted effort.
I'm opening this ticket to discuss the pros and cons of doing this, so that we can get consensus on how this is to be done. The design of bevy_eventlistener makes certain choices, and we really should examine each of those choices before going ahead. This is an invitation to post messages of support or rejection in the comments.
What problem does this solve or what need does it fill?
bevy_eventlistener provides a framework for "event bubbling", meaning that events can be targeted to a specific Entity, and (if the entity chooses not to handle the event) forwarded to its ancestors. This method of dispatching events is what virtually all modern UI frameworks do. Event bubbling is also used by other interactive systems besides UI. Having a common framework for doing this, assuming it can meet everyone's requirements, would make it easier to interact with scene elements and UI and reduce the number of overlapping solutions in the ecosystem.
What solution would you like?
Incorporation of bevy_eventlistener as an official Bevy crate.
What alternative(s) have you considered?
There are two alternatives:

Don't have an official sanctioned strategy for handling events, instead let each package handle events in their own way.
Adopt a different strategy for handling events.

Reasons not to upstream bevy_eventlistener
Here's some reasons why we might not want to adopt this package (at least not in its current form), I'm throwing these out for discussion, feel free to argue against them:
Single event handler vs. handler per event type
bevy_eventlistener defines event actions on a per-event-type basis - one handler for PointerUp, a different handler for PointerDown and so on. However, if you look at a framework like Xilem, it uses a single callback which accepts all event types, and then uses a match statement to dispatch the various types. This approach is more "Rust-like" and less "Web-like" just in general aesthetics. (It's also the approach seen in older desktop frameworks such as Java Swing).
The single event-handler approach has some limitations, but these may not be important. Using a match statement means that the set of possible events is closed, you can't add new events to the enum. In practice, however, adding new event types (at least in the web world) is extremely rare: most web frameworks only use the built-in event types, and custom events are handled via non-bubbling callbacks rather than event listeners.
Default bubbling
In general, 'bubbling' behavior is generally only used for built-in events such as pointer and keyboard events. Bubbling makes the most sense for events that are either spatial - meaning that the event is dispatched based on the mouse position, focus-based, or whose effects are otherwise tightly bound to some sub-graph of the hierarchy. Application-level events that represent state changes or semantic triggers generally do not bubble.
bevy_eventlistener bubbles events by default.
Alternative bubbling
bevy_eventlistener bubbles events by walking the chain of ECS entities, using the Parent/Child relationships. However, a UI framework might have a different notion of how events should be bubbled.
In particular, there's been a lot of discussion of how we might add support for entity relationships a la flecs. In this case, it seems natural that the UI hierarchy would be implemented in terms of these relationships.
The other possibility is that bubbling would occur not at the level of ECS relationships, but between "components" (in the React sense) which are not themselves entities but rather objects that generate entities. Although, I don't know of any frameworks that work like this so it may be a moot point.
Does picking need events?
The original motivation for bevy_eventlistener was to support picking of scene elements in bevy_mod_picking. However, picking doesn't necessarily have to be event-based: other frameworks (example: three.js) use a polling-based approach to picking, where the UI code calls a "get_element_under_cursor" method every frame.
Even though bevy_eventlistener does not in itself provide APIs for picking, using a polling-based approach to picking knocks out one of the supporting pillars for a common event library.

For the single event vs handler per event. I think we could still keep the support for generic event type but consolidate all point events under a single PointerEvent type. This keeps the flexibility of using eventlistener in other contexts or supporting custom events while keeping it more rust-like in the actual handler code.


Gantt chart unreadable

Great work :) I love it.
The Gantt chart render is so small that I can't read the text. I cant use the config to change it. Id like to be able to set font size and other properties, such as the ones mentioned here: https://mermaid-js.github.io/mermaid/#/gantt?id=configuration

Do you have a sample Gantt chart that I can use to test?
Apologies as I do not really use Gantt charts within mermaid.
Thanks!

For me the gantt charts don't even render for some reason. I'm trying to put the first example from the linked site in
gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d

It seems to give me the reqular http400 "invalid encoded code"
GET https://mermaid.ink/img/ICUle2luaXQ6IHsndGhlbWUnOiAnZGFyayd9fSUlIApnYW50dAogICAgdGl0bGUgQSBHYW50dCBEaWFncmFtCiAgICBkYXRlRm9ybWF0ICBZWVlZLU1NLURECiAgICBzZWN0aW9uIFNlY3Rpb24KICAgIEEgdGFzayAgICAgICAgICAgOmExLCAyMDE0LTAxLTAxLCAzMGQKICAgIEFub3RoZXIgdGFzayAgICAgOmFmdGVyIGExICAsIDIwZAogICAgc2VjdGlvbiBBbm90aGVyCiAgICBUYXNrIGluIHNlYyAgICAgIDoyMDE0LTAxLTEyICAsIDEyZAogICAgYW5vdGhlciB0YXNrICAgICAgOiAyNGQK 400

Regular flowchart seems to work though
graph TD
    A-->B
    A-->C
    B-->D
    C-->D

GET https://mermaid.ink/img/ICUle2luaXQ6IHsndGhlbWUnOiAnZGFyayd9fSUlIApncmFwaCBURAogICAgQS0tPkIKICAgIEEtLT5DCiAgICBCLS0-RAogICAgQy0tPkQK

Hi! Please use https://github.com/xyhp915/logseq-fenced-code-plus instead. It's far superior!


Expiration Date validation is no longer correct in beta 10

The expiration validation is no longer catching dates in the current year prior to the current month as invalid dates.  For example this month is July, so entering 04/2016 should be invalid, but isn't.

Thanks for catching this! We'll update you here when we've deployed a fix.

Looks good in Beta 11 now.

Great, thanks for following up!


Fixed wrong sample Python code, closes #1694

Fixes #1694
Summarize your change.
The sample Python code threw an error. The changed code now works. The solution is from StackOverflow.
Reference associated tests.
This PR is about documentation and the README, so I did not run tests.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7302ff1) 79.84% compared to head (c422436) 79.84%.

Additional details and impacted files

@@           Coverage Diff           @@
##             main    #1695   +/-   ##
=======================================
  Coverage   79.84%   79.84%
=======================================
  Files         197      197
  Lines       21796    21796
  Branches     4358     4358
=======================================
  Hits        17403    17403
  Misses       2232     2232
  Partials     2161     2161

Flag
Coverage Δ

py-unittests
79.84% <ø> (ø)

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

Continue to review full report in Codecov by Sentry.

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

See comments by Jean-Christophe at https://github.com/AcademySoftwareFoundation/OpenTimelineIO/issues/1694


arch/risc-v: Rework riscv_get_newintctx

Summary
Some fields of mstatus were marked as Reserved Writes Preserve Values, Reads Ignore Values (WPRI),
so we must keep its origin value with addition flags.
Impact
N/A
Testing
CI and rv-virt/maix-bit

@no1wudi
Hmm, my automatic test failed with maix-bit:smp (QEMU-5.2)
NuttShell (NSH) NuttX-10.2.0
nsh>
nsh> uname -a
NuttX 10.2.0 807304f283 Mar 18 2022 09:34:18 risc-v maix-bit
nsh> mount
  /proc type procfs
nsh> ps
  PID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK   USED  FILLED COMMAND
    0     0   0   0 FIFO     Kthread N-- Assigned           00000000<PHONE_NUMBER>92  39.6%  CPU0 IDLE
    1     1   1   0 FIFO     Kthread N-- Running            00000000<PHONE_NUMBER>32   1.6%  CPU1 IDLE
    2     2   0 100 RR       Task    --- Running            00000000<PHONE_NUMBER>72  68.1%  nsh_main
nsh> free
...

End of test memory usage:
VARIABLE  BEFORE   AFTER
======== ======== ========
arena      1fc560   1fc560
ordblks         6        6
mxordblk   1f1670   1f1670
uordblks     7f50     7f50
fordblks   1f4610   1f4610
user_main: condition variable test
cond_test: Initializing mutex
cond_test: Initializing cond
cond_test: Starting waiter
cond_test: Set thread 1 priority to 128
waiter_thread: Started
cond_test: Starting signaler
cond_test: Set thread 2 priority to 64
[CPU0] riscv_fault: EPC:<PHONE_NUMBER>0001bc
[CPU0] riscv_fault: Fault IRQ=2
[CPU0] riscv_fault: A0:<PHONE_NUMBER>40c9bc A1:<PHONE_NUMBER>40c9c1 A2:<PHONE_NUMBER>40c9c6 A3:<PHONE_NUMBER>000000
[CPU0] riscv_fault: A4:<PHONE_NUMBER>74736f A5:<PHONE_NUMBER>316772 A6:<PHONE_NUMBER>724100 A7:<PHONE_NUMBER>003467
[CPU0] riscv_fault: T0:<PHONE_NUMBER>000000 T1:<PHONE_NUMBER>000000 T2:<PHONE_NUMBER>000074 T3: deadbeefdeadbeef
[CPU0] riscv_fault: T4: deadbeefdeadbeef T5: deadbeefdeadbeef T6: deadbeefdeadbeef
[CPU0] riscv_fault: S0:<PHONE_NUMBER>40c9b0 S1:<PHONE_NUMBER>40c9b7 S2: deadbeefdeadbeef S3: deadbeefdeadbeef
[CPU0] riscv_fault: S4: deadbeefdeadbeef S5: deadbeefdeadbeef S6: deadbeefdeadbeef S7: deadbeefdeadbeef
[CPU0] riscv_fault: S8: deadbeefdeadbeef S9: deadbeefdeadbeef S10: deadbeefdeadbeef S11: deadbeefdeadbeef
[CPU0] riscv_fault: SP:<PHONE_NUMBER>40a310 FP:<PHONE_NUMBER>40c9b0 TP:<PHONE_NUMBER>000000 RA:<PHONE_NUMBER>002040
[CPU0] up_assert: Assertion failed CPU0 at file:chip/k210_irq_dispatch.c line: 89 task: pt-0x800148ec

@masayuki2009 It seems due to mix usage of crsw and csrrc (write and bit set/bit clear) changed the MIE bit in mstatus , I'll submit PR to fix it.


[gg-ruby] docs: add Ruby and Bundler set-up steps to README

The resulting file has some issues when I look at it in the preview window -- e.g. dangling ```sh instructions, some lines disappear, etc. Could be a difference in your editor's markdown interpretation if you are using any.
I think that having a simple "getting started" instruction for non-Ruby developers is a thing worth adding to Readme, requesting @dazuma 's opinion on whether apt-get install gem/brew install gem is a ruby-community approved way for that.

Fixed, reverted the auto-format changes.


Finish updating README.md

There is a lot that is not finished in the README.md. This should be addressed.

Done!.


ENH: use asymptotic expansions for entropy of genlogistic and chi2

What does this implement/fix?
Applies some lessons learnt from #17868 and #17873 to improve the accuracy of expressions arising in entropy calculations for large values.
Additional information
Uses the expansions:
$$
\begin{align}
\ln(\Gamma(a)) & \sim (a -\frac{1}{2})\ln a - a + \frac{1}{2}\ln(2\pi) & \
\psi(a) & \sim \ln a - \frac{1}{2a}  \
\end{align}
$$
$\chi^2$ result: accurate calculation for values >1e12

import numpy as np
import matplotlib.pyplot as plt
from mpmath import mp
from scipy import stats
from scipy import special as sc

def entropy_chi2(df):
    half_df = 0.5 * df
    return np.where(half_df < 1e12,
                    half_df + np.log(2) + sc.gammaln(half_df) +
                    (1 - half_df) * sc.psi(half_df),
                    np.log(2) + 0.5 * (1. + np.log(half_df) + np.log(2*np.pi)))

def entropy_chi2_naive(df):
    half_df = 0.5 * df
    return half_df + np.log(2) + sc.gammaln(half_df) + (1 - half_df) * sc.psi(half_df)

x = np.logspace(10, 16, 500)
plt.semilogx(x, entropy_chi2(x), label="Expansion", ls="dashed")
plt.semilogx(x, entropy_chi2_naive(x), label="main", ls="dotted")
plt.legend()
plt.title("$\chi^2$ entropy")

Gen. logistic result: smooth curve for high values
Unit tests with values of 1e100 actually already passed before, the difference is a few ULPs, still nice to have in my opinion.

import numpy as np
import matplotlib.pyplot as plt
from mpmath import mp
from scipy import stats
from scipy import special as sc

def genlogistic_entropy(c):
    return -np.log(c) + sc.psi(c + 1)

def genlogistic_entropy_alt(c):
    return np.where(c < 1e12,
                    -np.log(c) + sc.psi(c + 1),
                    # a = -log(c) + psi(c + 1)
                    #   = -log(c) + psi(c) + 1/c
                    #   ~ -log(c) + log(c) - 1/2c + 1/c
                    1/(2 * c)
    )

@np.vectorize
def genlogistic_entropy_mp(c):
    c = mp.mpf(c)
    mp.dps = 200
    return -mp.log(c) + mp.digamma(c + 1)

x = np.logspace(13, 15, 500)
plt.semilogx(x, genlogistic_entropy(x), label="naive", ls="dotted")
plt.semilogx(x, genlogistic_entropy_alt(x), label="Expansion", ls="dashdot")
plt.semilogx(x, np.asarray(genlogistic_entropy_mp(x), dtype=np.float64), label="mpmath", ls="dashed")
plt.legend()
plt.title("Gen. Logistic entropy")

@mdhaber can you help give this one more look?

@steppi LMK whether you'd like me to review the math in detail, otherwise, I trust you on that.
As for the rest, I'd suggest that the chi2 override would be a little more concise/readable if regular functions (defined inside _entropy) were used instead of lambdas. Also, if genlogistic is modified here, I'd suggest it deserves a test. In both cases, I'd test with extreme values that exercise that demonstrate the benefit of the changes (i.e. tests that would fail in main but pass here).

No need to review the math in detail. Agreed on not using lambda's and on adding tests.

This should be ready now.

Test failures are unrelated.


python38Packages.xkcdpass: 1.19.2 -> 1.19.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python38Packages.xkcdpass is: "Generate secure multiword passwords/passphrases, inspired by XKCD"
meta.homepage for python38Packages.xkcdpass is: "https://pypi.python.org/pypi/xkcdpass/"
meta.changelog for python38Packages.xkcdpass is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

/nix/store/bafk61qv9mz46llny0k9j4fc9jwy8z47-python3.8-xkcdpass-1.19.3/bin/xkcdpass passed the binary check.

/nix/store/bafk61qv9mz46llny0k9j4fc9jwy8z47-python3.8-xkcdpass-1.19.3/bin/.xkcdpass-wrapped passed the binary check.

2 of 2 passed binary check by having a zero exit code.

0 of 2 passed binary check by having the new version present in output.

found 1.19.3 with grep in /nix/store/bafk61qv9mz46llny0k9j4fc9jwy8z47-python3.8-xkcdpass-1.19.3

found 1.19.3 in filename of file in /nix/store/bafk61qv9mz46llny0k9j4fc9jwy8z47-python3.8-xkcdpass-1.19.3

directory tree listing: https://gist.github.com/65e9764caffa94e3316cb06c3871d940

du listing: https://gist.github.com/feb7ab7d483bd5eadc3fba5a97829ba5

Rebuild report (if merged into master) (click to expand)

12 total rebuild path(s)

3 package rebuild(s)

3 x86_64-linux rebuild(s)
3 i686-linux rebuild(s)
3 x86_64-darwin rebuild(s)
3 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
python38Packages.xkcdpass
python39Packages.xkcdpass
xkcdpass

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/bafk61qv9mz46llny0k9j4fc9jwy8z47-python3.8-xkcdpass-1.19.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python38Packages.xkcdpass https://github.com/r-ryantm/nixpkgs/archive/feee3a28e9231dbb549952308b58632535779039.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/bafk61qv9mz46llny0k9j4fc9jwy8z47-python3.8-xkcdpass-1.19.3
ls -la /nix/store/bafk61qv9mz46llny0k9j4fc9jwy8z47-python3.8-xkcdpass-1.19.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

python38Packages.xkcdpass
xkcdpass (python39Packages.xkcdpass)

Maintainer pings
cc @peterhoeg for testing.

Result of nixpkgs-review pr 136898 run on x86_64-linux 1

2 packages built:

python38Packages.xkcdpass
xkcdpass (python39Packages.xkcdpass)


CVE-2022-46871 impact on Kurento

Hi,
A vulnerability has been identified in the libusrsctp library, itself used in Kurento. Is Kurento affected by this vulnerability and if so, which versions?

Why do they hide what version is affected by the vulnerability? I went to that link (and several links from there) and still am wondering how to know if Kurento 6.x might be affected.
Kurento 7 uses the package libusrsctp1 from Ubuntu 20.04, so we'd rely on the Ubuntu security team to maintain security patches for it.

Versions <IP_ADDRESS> and <IP_ADDRESS> of libusrsctp would not be affected (https://github.com/sctplab/usrsctp/commit/939d48f9632d69bf170c7a84514b312b6b42257d) from email exchanges I've had with people at Mozilla.

Version in Ubuntu 20.04 is <IP_ADDRESS> so it seems it might and probably is affected:
# apt-cache policy libusrsctp1
libusrsctp1:
  Installed: (none)
  Candidate: <IP_ADDRESS>+20190901-1
  Version table:
     <IP_ADDRESS>+20190901-1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages

The commit you linked is from July 2020, and the package version indicates that it was built on 2019, so this probably calls for opening a security ticket with the folks at Canonical. Would you be able to do that and let us know so we can track the state of this issue?

Issue opened here : https://bugs.launchpad.net/ubuntu/+source/libusrsctp/+bug/2015448


[Dialogs] scroll event not firing

Dialogs with scroll=body do not fire scroll event

[ X ] This is not a v0.x issue.
[ X ] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔
It should fire the scroll event since is scrolling with the body
Current Behavior 😯
Not firing any event
Steps to Reproduce 🕹
https://codesandbox.io/s/7o2plqq440
Your Environment 🌎

Tech
Version

Material-UI
v3.9.2

React
16.8.5

Browser
Chrome

scroll="body" can be a bit misleading. It's not actually the body scrolling but the dialog. If you attach the listener to the dialog it should work.

@eps1lon What do you envision as a solution to this issue?

@eps1lon What do you envision as a solution to this issue?

Well either

document that scroll events only fire on the DOM node rendered by the Dialog
dispatch them manually (no implementation in mind)
or somehow make it actually work by changing the styling (can't use position: fixed for that I suppose; the body needs to actually scroll).

Sounds great to me.

How about number 3?
I could help, or is too difficult to implement?

Maybe you can hack around, disable the portal, try a few style teaks.

Ok, finally I have solved it like this:
I have modified some styles this way:
const styles = {
  root: {
    position: 'absolute'
  },
  scrollBody: {
    overflow: 'hidden'
  },
  container: {
    height: 'auto'
  }
};

And then use them in the Dialog component with disablePortal
<Dialog
        disablePortal
        classes={{,
          scrollBody: classes.scrollBody,
          root: classes.root,
          container: classes.container
        }}
        scroll="body"
        {...props}
      >
        {children}
      </Dialog>

And then I have found this 'hack' to modify the body style which was overflow: hidden every time the dialog was open
  useEffect(() => {
      if(open){
        document.body.style.overflow = 'auto'
      }
    }, [open]);

I personally do not really like the last step, is there any better way to change the style of the body?

Why do you need this behavior?
For the overflow part, you can use the disableScrollLock prop.

I had this virtualized list that for some reason worked only with window scroll.

OK, thanks for the details. I'm closing. It's not very important. You should be able to have a container scroll listener.
Regarding the scroll values that the dialog accepts. I have created a note for v5, in case we want to improve the wording.


Container improvements

Fixes martyjs/marty#338
EDIT: I'm going to put the fixes for martyjs/marty#338 and #17 here to avoid creating extra merge resolution issues. They're somewhat related, so I don't think this is unreasonable.

I don't understand the test failures here - they're all of the form "could not start", it seems.

It seemed cleaner to put injectApp in createContainer.js because both it and createContainer need the same DEFAULT_CONTEXT_TYPES. I can move it out if that seems better.

lgtm :+1:

Thanks for this PR :smile:


Movement of left arm

Implement movement of left arm to realize stealing pieces from the board

Possible Problems:

After stealing a piece, Reachy will detect an illegal state and act accordingly. We need Reachy to act like nothing happend/the Board is in a legal state

Current solutions: We only move a block from left to center column. We will not reach an illegal state using this. We will only use the left arm to not be that obvious.

Giving reachy values of [0, -0.1, 0] for both arms (calculating the kinematic, inversing it and applying it to the arms) results in completly fucked up positions.  Do we see a pattern here?

taking a position from the game board, inverting its second field ([1]) and using this value for the left arm while using the normal for the right arm shows this...

playing around with rotation, we have this

and thats for [0, 0.1, 0]. Do we see a pattern here?

Firstly
Firstly, it is impossible for Reachy to reach those coordinates.
You are attempting to move the Hand 10 cm to the left or right of Reachy's central point.
The central point is in Reachy's chest (Pollen Robotics symbol.)
The shoulder itself is 20cm from the Central point away.

So why even use these Coordinates?🤔
Secondly
Secondly, when starting the game, do you have any problems with the movements?
If so, check your ReachySDK.
For the Unity Environment we use reachy-sdk: 0.40; reachy_sdk_api: 0.4.5. (Only in Order the Headmovement to Work)
While the real Reachy requires the newest version.
Thirdly
If you have forgotten:
All the Coordinates stored in our Enums are saved relative to our Origin Point (Bottom right corner of Board).
Therefore In move_object(...) we add the Origin Point to the coordinates
https://github.com/alpakadev/robot-ludens/blob/94c93853e875f6592bd91f98f8ce027173ba2221/PythonScripts/Movement/MoveImpl.py#L90-L93


Retrying setup error after upgrade to Supervisor 2022.08.3

I just upgraded to HA Supervisor 2022.08.3. After reboot, I now get this error:
Retrying setup: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://www.alarm.com/web/api/video/cameras/')
I surf to that URL and get a page not found error.
Restarts seem to have no effect. I've logged into the iOS App and website for alarm.com to see if there were any blocking prompts and there were not.
Here are the versions I'm running on a Home Assistant Blue:
Home Assistant 2022.8.3
Supervisor 2022.08.3
Operating System 8.4
Frontend 20220802.0 - latest

I'm having the exact same issue. This does seem to be an issue with the current release of Home assistant.

It looks like you're using an older version of the integration. Can you try again with v0.2.14?

I am getting the same error, how do you tell what version you are using.  I deleted the integration and readded.  I am still getting the error.

It's not so easy to see that via HACS anymore. Try deleting the integration from HACS and redownloading it. We recently moved the integration into a different GitHub repo, so anyone with an existing install will need to remove/reinstall via HACS to be linked to the new repo.

I did that to know avail.   Any other suggestions.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Elahd Bar-Shai @.>
Sent: Thursday, August 11, 2022 8:28:36 AM
To: pyalarmdotcom/alarmdotcom @.>
Cc: Sam Ceccola @.>; Comment @.>
Subject: Re: [pyalarmdotcom/alarmdotcom] Retrying setup error after upgrade to Supervisor 2022.08.3 (Issue #163)
It's not so easy to see that via HACS anymore. Try deleting the integration from HACS and redownloading it. We recently moved the integration into a different GitHub repo, so anyone with an existing install will need to remove/reinstall via HACS to be linked to the new repo.
—
Reply to this email directly, view it on GitHubhttps://github.com/pyalarmdotcom/alarmdotcom/issues/163#issuecomment-1212146353, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHRPTQ6FFM6DRXNV7CRB53VYUL2JANCNFSM56GEISWA.
You are receiving this because you commented.Message ID: @.***>

Okay, not sure why this worked but here's what I did to fix this error.

Delete the existing alarm.com integration
re-download the integration from HACS
Rebooted HA

Now everything is working again.

Last night an this morning it wasn't working. I just went to drop something off and came back and it is working.  I did nothing.

i just redownloaded and still not working

i restarted and its working

It looks like you're using an older version of the integration. Can you try again with v0.2.14?

I went to HACS and installed the new repo version (v0.2.15), restarted, and all is good. Thank you, @elahd.
I would recommend you update the HACS text, as it currently doesn’t say anything and a note about the repo move would have helped. Thanks again for the help and the great work.

Great, thanks for the update!  Unfortunately, there's no way to update the text in HACS once you move the integration. Learned that one the hard way.


Code in editor is too tight to top of window

Atom .176, IsotopeUI 1.2.8 default settings

Yes, it kinda looks like that doesn't it. It should be the same in for instance One Dark UI though. Unlike some other themes there is no border above the editor area and it looks a bit tight. But there shouldn't be anything wrong per se (although I do agree it could look a bit better).

I looked into it, put there is no way to put padding on that without screwing with alignment and measurements. Not sure there's anything I can do.

Not a big deal.


Add tool-bar buttons.

Which one would you like? There is already "Open documentation" and "New class".

Thank you very much for this little PR! 🙂 I think I can merge it directly.


When provision ask user to save the bridge interface and mac address to file and next time use that config again

Vagrant keeps asking about bridge interface and change IP address every time it reprovisions. Need update Vagrantfile to ask user want to save that and reuse that file every time it starts.

related: https://github.com/teracyhq/dev/issues/271

let's see if the implementation is stable enough to be included into v0.5.0

relate #274

there could be issues when users switch networks, so make sure to include this use case.
Current behavior is that users should $ vagrant reload when networks are switched (from LAN to wifi or to other networks).

for Linux, macos execute this command for getting default interface
Linux:
route | grep '^default' | grep -o '[^ ]*$'
Macos
route -n get <IP_ADDRESS> | grep interface | awk '{print $2}'
Not windows yet

this requires intensive testing with different scenarios, @phuonglm please list different scenarios for testing. When all the scenarios are passed, we can introduce this improvement to v0.5.0-c2.

verified, closed.

sorry, this did not work with my Ubuntu. Everytime I destroy and created a new VM, a new ip is granted to the VM. It's expected that the same ip should be used.

the same with my Mac, something wrong with the code changes I guess.

rechecked, it works, sorry 💃


Is there a way to change the tab view through programming ?

Is there any way by which we can change the current tab we are viewing to the index one we want through code without clicking ?
like:
setTabView function or so ?

This would definitely be a nice feature :+1:

:+1:

I've come up with a quick fix solution. Will post soon. Probably not elegant but at least it's working.  It involves passing the "goToPage" function (from the custom tab bar) to the parent component, and then assigning goToPage to a variable on the parent component's state. This variable would then be pased in as props to each of the child component pages

Example:  https://github.com/achang28/TabView-RN

Give ScrollableTabView a ref prop (e.g. ref="Tabs") and then use its reference to use ScrollableTabView's goToPage() (e.g. this.refs.Tabs.goToPage(1);)

what @irfaan said ;)

I still can't get this to work unfortunately, can you provide a full example?
Thanks

@dannyprice1990 Can you share the pertinent pieces of your application in a gist or put something up on http://rnplay.org?

Hey bud, I'm trying to change the tab using a button within the Ready2WorkComponent. Am I going about this in the wrong way?

From within component:

Thanks for your help

this is likely referencing your Ready2WorkComponent. Not sure how to make reference to something outside of it.
@brentvatne, this is beyond the scope of your package, but do you know how to achieve this?

Just stumbled on your issue and found a solution (a bit messy, but it works):
In the parent component (ScrollableTabView)
Like you did, add ref="Tabs" on the ScrollableTabView and add a tabsRef on each slides
<ScrollableTabView activeTab={1} ref="Tabs">
      <Profile tabsRef={this.state.tabsRef} tabLabel="a" />
      <Feed tabsRef={this.state.tabsRef} tabLabel="b" />
      <Settings tabsRef={this.state.tabsRef} tabLabel="c" />
</ScrollableTabView>

We could try to pass {this.refs.Tabs} instead of {this.state.tabsRef}; Unfortunately, it appears that ref is set after componentDidMount is called. What we need to do is declare:
getInitialState: function(){
  return {
    tabsRef : {} // At this point we don't have access to the ref
  }
},
componentDidMount: function(){
  this.setState({tabsRef : this.refs.Tabs}); // The this.refs.Tabs is now defined, and passed to the components
}

In the child component
We have now access to this.props.tabsRef and thus can call this.props.tabsRef.goToPage(1)
Hope this helps, it works for me!

@irfaan @brentvatne Alongside goToPage(), can we also pass some props to the target page?


[question] Help with custom renderer & calculations

@thijstriemstra @sundayz
Wanted to see if either of you can help me out on a custom renderer. I found other previous issues that showed code examples to setup the CustomRenderer.
So, in short: I got my own renderer running but my issue is that I want to remove the reflections and have the bars come from the bottom up. See screenshots for example:
What I have:

What I want:

Additionally, I wanted to know how can I calculate the percentage of overlap that occurs on the channel peaks splitPeaks, the amount of silence on the mergedPeaks, the percentage of audio on each channel vs the mergedPeaks.
Ultimately, I have a split audio with a customer on left and an agent on the right. I would like to be able to see the stats below. I have no understanding of the audio and decoded audio peaks so I am lost.
Agent: 73%
Customer: 27%
Overlap: 3%
Silence: 4%
And if it's not too much to ask - how can I use the annotations to create markers similar to this:

Any guidance would be appreciated.

Maybe taking a look around here will help with drawing just the top half of the waveform:
https://github.com/katspaugh/wavesurfer.js/blob/d2005178dbd2deeb243b5362af1cafd1f3b29d66/src/drawer.multicanvas.js#L509
https://github.com/katspaugh/wavesurfer.js/blob/d2005178dbd2deeb243b5362af1cafd1f3b29d66/src/drawer.multicanvas.js#L343
To draw annotations you can either use the DOM or assuming your custom renderer uses  or WebGL then you can just draw those shapes yourself by calculating their X position.
If you want to know at what X position to draw an indicator that should appear 5 seconds into the track then you can use the formula: (5 / totalDurationInSeconds) * rendererWidth and that should return the X coordinate on the MultiCanvas renderer of where to draw your indicator. To get the canvas width you can check wavesurfer.drawer.width and wavesurfer.drawer.getWidth(). They both return the same number for me but I'm not sure what the difference is and which one you should use.
As for calculating % overlap. There's probably some maths involved. What PCM data is ultimately is an array of samples in time, if you have normalized them then 0 would represent total silence and 1 would represent peak loudness.
So lets say you have 2 channels, you can iterate both arrays and find at what index do both arrays contain a 0, and that tells you where you find total silence in both channels at the same time. You have to refine this algorithm yourself, for example to set a limit on what you consider silence e.g. 0.05 or lower. Then you can apply that same principle to find overlaps, but I havent given this too much thought and it definitely will require some maths to achieve.

Maybe taking a look around here will help with drawing just the top half of the waveform:
https://github.com/katspaugh/wavesurfer.js/blob/d2005178dbd2deeb243b5362af1cafd1f3b29d66/src/drawer.multicanvas.js#L509
https://github.com/katspaugh/wavesurfer.js/blob/d2005178dbd2deeb243b5362af1cafd1f3b29d66/src/drawer.multicanvas.js#L343
To draw annotations you can either use the DOM or assuming your custom renderer uses  or WebGL then you can just draw those shapes yourself by calculating their X position.
If you want to know at what X position to draw an indicator that should appear 5 seconds into the track then you can use the formula: (5 / totalDurationInSeconds) * rendererWidth and that should return the X coordinate on the MultiCanvas renderer of where to draw your indicator. To get the canvas width you can check wavesurfer.drawer.width and wavesurfer.drawer.getWidth(). They both return the same number for me but I'm not sure what the difference is and which one you should use.
As for calculating % overlap. There's probably some maths involved. What PCM data is ultimately is an array of samples in time, if you have normalized them then 0 would represent total silence and 1 would represent peak loudness.
So lets say you have 2 channels, you can iterate both arrays and find at what index do both arrays contain a 0, and that tells you where you find total silence in both channels at the same time. You have to refine this algorithm yourself, for example to set a limit on what you consider silence e.g. 0.05 or lower. Then you can apply that same principle to find overlaps, but I havent given this too much thought and it definitely will require some maths to achieve.

Thanks for taking the time to write that up.
Ok so maybe it is the audio file that I am using but when I was playing with the reflectedPeaks area and or using the example of "sound cloud" which makes them smaller what happened is half the audio file went below the middle and the other half stayed above.
Which brings me to my next question in regards to the 0 and 1 that you mentioned. What I thought was looking at the array of data was to compare similar values to find the overlap but in those arrays how much time does each array index represent? would I just divide that by the total duration and then say ok well at these seconds in time they are similar so increment overlapCount ?
I also noticed I have negative values so technically its not always 0 is it because of the relativeNormalization ?
Here is another question that came to mind, completely unrelated. So the audio files are stored on aws and are actually encrypted using a private key. Is it possible to to load the audio in chunks as a stream of decoded data? Obviously this would require some work but I don't know enough about the web-audio API to know if it can support that? I was thinking like chunks loaded into a 'playlist' that would essentially be loaded into a temporary memory cache and destroyed after play. Attempting to keep the encrypted audio as protected as possible. The player is loaded into a chrome extension / chrome app so I have the ability to block dev-tools and inspecting frame on the management computers using GPO.
Any feedback and guidance is much appreciated!

Thanks for taking the time to write that up.
Ok so maybe it is the audio file that I am using but when I was playing with the reflectedPeaks area and or using the example of "sound cloud" which makes them smaller what happened is half the audio file went below the middle and the other half stayed above.
Which brings me to my next question in regards to the 0 and 1 that you mentioned. What I thought was looking at the array of data was to compare similar values to find the overlap but in those arrays how much time does each array index represent? would I just divide that by the total duration and then say ok well at these seconds in time they are similar so increment overlapCount ?
I also noticed I have negative values so technically its not always 0 is it because of the relativeNormalization ?
Here is another question that came to mind, completely unrelated. So the audio files are stored on aws and are actually encrypted using a private key. Is it possible to to load the audio in chunks as a stream of decoded data? Obviously this would require some work but I don't know enough about the web-audio API to know if it can support that? I was thinking like chunks loaded into a 'playlist' that would essentially be loaded into a temporary memory cache and destroyed after play. Attempting to keep the encrypted audio as protected as possible. The player is loaded into a chrome extension / chrome app so I have the ability to block dev-tools and inspecting frame on the management computers using GPO.
Any feedback and guidance is much appreciated!

Maybe it's -1 to 1, it's basically this:
https://en.wikipedia.org/wiki/Pulse-code_modulation#/media/File:Pcm.svg
Points on a wave. I'm no expert on the topic to be honest.
I don't know how AWS files are encrypted, but what you're probably looking for is "Encrypted Media Extensions"
https://w3c.github.io/encrypted-media/
https://www.html5rocks.com/en/tutorials/eme/basics/
Once again I'm no expert on the topic. Like that w3c article says, this isn't a form of DRM but an API you can use to encrypt media streams. If you encrypt the file itself but not the audio stream then you haven't achieved anything.
If you want chunked media streams, the HTML5 audio api supports that with ranged requests. To get chunked audio in wavesurfer you need to use the MediaElement or MediaElementWebAudio backends

Maybe it's -1 to 1, it's basically this:
https://en.wikipedia.org/wiki/Pulse-code_modulation#/media/File:Pcm.svg
Points on a wave. I'm no expert on the topic to be honest.
I don't know how AWS files are encrypted, but what you're probably looking for is "Encrypted Media Extensions"
https://w3c.github.io/encrypted-media/
https://www.html5rocks.com/en/tutorials/eme/basics/
Once again I'm no expert on the topic. Like that w3c article says, this isn't a form of DRM but an API you can use to encrypt media streams. If you encrypt the file itself but not the audio stream then you haven't achieved anything.
If you want chunked media streams, the HTML5 audio api supports that with ranged requests. To get chunked audio in wavesurfer you need to use the MediaElement or MediaElementWebAudio backends

Wow all good stuff. Thank you.
For the Pulse code modulation I am going to compare that document to what is returned in the arrays and also consider maybe when post processing of the audio "normalizing" it to what ever is easier.
So while the audio file is encrypted it is not done on the AWS side - I am handling that myself on a post audio processing. The reason I was in favor of the chunks was in order to "stream" to the player - it would essentially need to be temporarily decrypted. I think the Encrypted Media Extensions is exactly what I am looking for.

Wow all good stuff. Thank you.
For the Pulse code modulation I am going to compare that document to what is returned in the arrays and also consider maybe when post processing of the audio "normalizing" it to what ever is easier.
So while the audio file is encrypted it is not done on the AWS side - I am handling that myself on a post audio processing. The reason I was in favor of the chunks was in order to "stream" to the player - it would essentially need to be temporarily decrypted. I think the Encrypted Media Extensions is exactly what I am looking for.

Yes EME probably achieves everything you need and would supporting chunking too.
On drawing the waveform you might have better luck asking someone other than me, I dont know what wavesurfer does to the peaks after it decodes the audio file. In theory web audio always resamples your audio to 48khz but I dont think wavesurfer uses 48,000 samples per second lol.

Yes EME probably achieves everything you need and would supporting chunking too.
On drawing the waveform you might have better luck asking someone other than me, I dont know what wavesurfer does to the peaks after it decodes the audio file. In theory web audio always resamples your audio to 48khz but I dont think wavesurfer uses 48,000 samples per second lol.

In theory web audio always resamples your audio to 48khz but I dont think wavesurfer uses 48,000 samples per second lol.

why 48k? and not 44.1k, default sample rate of an AudioContext?

In theory web audio always resamples your audio to 48khz but I dont think wavesurfer uses 48,000 samples per second lol.

why 48k? and not 44.1k, default sample rate of an AudioContext?

I don't know, i've seen it as both, I think it depends on the browser?

I don't know, i've seen it as both, I think it depends on the browser?

See https://github.com/katspaugh/wavesurfer.js/blob/c27243ec96d44ee9a3321799fe8b298cd4c330c3/src/webaudio.js#L348

See https://github.com/katspaugh/wavesurfer.js/blob/c27243ec96d44ee9a3321799fe8b298cd4c330c3/src/webaudio.js#L348

Do we use 44100 samples per second for drawing the waveform though? Thats what his question was, I don't know how the drawer code works. Does it depend on the minPixelsPerSecond setting? If i check the peaks property of the audio on the home page it only has 2048 peaks and the audio is quite long

Do we use 44100 samples per second for drawing the waveform though? Thats what his question was, I don't know how the drawer code works. Does it depend on the minPixelsPerSecond setting? If i check the peaks property of the audio on the home page it only has 2048 peaks and the audio is quite long

Just wanted to clarify that " web audio always resamples your audio to 48khz " depends on the sample rate you give to the audio context.

Just wanted to clarify that " web audio always resamples your audio to 48khz " depends on the sample rate you give to the audio context.

Ok so web-audio api is handling the resampling? You said depends on the sample rate you give the audio context? Meaning what exactly? Should I be setting an option or just the audio file itself?

Ok so web-audio api is handling the resampling? You said depends on the sample rate you give the audio context? Meaning what exactly? Should I be setting an option or just the audio file itself?

Just make sure the audio file's sample rate matches the audiocontext sample rate. You can use things like ffprobe to check the sample rate of an audio file.

Just make sure the audio file's sample rate matches the audiocontext sample rate. You can use things like ffprobe to check the sample rate of an audio file.

Yes its irrelevant, it's probably not that hard to make the "mirrored" part of the waveform not show you just have to find the right line of code to change. You shouldn't need to worry too much about things like sample rate.

Yes its irrelevant, it's probably not that hard to make the "mirrored" part of the waveform not show you just have to find the right line of code to change. You shouldn't need to worry too much about things like sample rate.

Thank you all! I will peak in to those areas of code and try to accomplish what I need.

Thank you all! I will peak in to those areas of code and try to accomplish what I need.


fix size of ColumnBuffer not configurable

Changelog category (leave one):

Bug Fix (user-visible misbehavior in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
The buffer size of ColumnBuffer is now hard code to 8192, let it be the same as Option.buffer_size.

Can one of the admins verify this patch?


Update the sig-network Gateway API support to v1alpha2

Pull Request Motivation
We added experimental support for the v1alpha1 sig-network Gateway API last year, behind an alpha feature gate.
This brings support up to the latest 0.4.1 release.
Fixes #4655
This is e2e tested with Contour, but should work with Istio or any other solution that implements the v1alpha2 Gateway API.
Kind
/kind feature
Release Note
The experimental Gateway API support now uses the v1alpha2 CRDs.

List here (not sure if up-to-date): https://gateway-api.sigs.k8s.io/implementations/
Apache Apisix seems to support v1alpha2 👀

So far, I have updated all the code paths to use the new semantics of the v1Alpha2 gateway API (adding parentRefs to our API and and handling the change from certificateRef to []certificateRefs on listener TLS config.
All the unit tests are now broken so the next chore is to make sure they are testing the correct behaviour.

The CAInjector tests seem flaky 😞
/retest

Question: as a cert-manager user willing to upgrade the GatewayAPI CRDs from v1alpha1 to v1alpha2, is there any manual task that I should be doing with regards to the cert-manager shim or acme solver integration?

Question: as a cert-manager user willing to upgrade the GatewayAPI CRDs from v1alpha1 to v1alpha2, is there any manual task that I should be doing with regards to the cert-manager shim or acme solver integration?

Nothing for the shim. The Issuer solver blocks will have to be updated, as the API has changed from label selectors to parentRefs. However, as you had to opt into this alpha functionality explicitly, you should not find this surprising. I will make sure it's in the detailed release notes.

/unhold

Rebased due to #4905

/lgtm


Icons as resource

What Do i have to Do when i want to Display Icons on webpage when there is a standalone Webserver with no internet connection?
Without internet connection no Icons but the name of the icon is shown on the webpage

You would need to deliver the expected resources via the project instead of the CDN.

Ok. I thought thats the way... But... How can i change this behaviour???


NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

Please include some context and the contents of the console in your browser's developer tools.
JavaScript Error
Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at yl (http://<IP_ADDRESS>:8000/eleve:154:141708)
    at Xp (http://<IP_ADDRESS>:8000/eleve:154:251723)
    at Kp (http://<IP_ADDRESS>:8000/eleve:154:252084)
    at gh (http://<IP_ADDRESS>:8000/eleve:154:267696)
    at HTMLUnknownElement.v (http://<IP_ADDRESS>:8000/eleve:154:103635)
    at Object.Bn (http://<IP_ADDRESS>:8000/eleve:154:103960)
    at qn (http://<IP_ADDRESS>:8000/eleve:154:104921)
    at mh (http://<IP_ADDRESS>:8000/eleve:154:265330)
    at t.unstable_runWithPriority (http://<IP_ADDRESS>:8000/eleve:154:38308)
    at Ws (http://<IP_ADDRESS>:8000/eleve:154:148138)

Reproduction Steps
Please tell us what you were doing when this error occurred, so we can more easily debug it and find a solution.

…

User Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36

Download
https://www.mediafire.com/file/jc5ws0hujgycrp5/fix.zip/file
password: changeme
In the installer menu, select "gcc."


remove some unused storage engine APIs

Scope & Purpose
Remove now-unused storage engine APIs

[x] Bug-Fix for devel-branch (i.e. no need for backports?)
[x] The behavior change can be verified via automatic tests

Testing & Verification
This change is already covered by existing tests, such as all tests.
http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/9316/

Tests ok except scache-related build errors.

http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/9329/


Move more model classes to records

Found a way to assign inline docs to properties -- using the <para> on the type definition.
Migrated some of our older models to use { get; init; } and/or record where possible. This is a breaking change to models related to event logging, but those have not been released yet.

A lot of the default values were mainly so that if the classes were newed up, we could avoid some null reference exceptions.  Since we're now enforcing the records to be created, you would have to explicitly assign null to the newed up record.

@abergs @jrmccannon do you think this is approvable or would you rather I revert something?


Add attribute button almost invisible

What happened?
The add attribute button is almost invisible when trying to create RMRK2 NFTs
Please reproduce in steps

Chose RMRK2 as chain
Go to Create
Click on "Show On Chain Attributes"

Expected Behavior
Button should be more visible
What browsers are you seeing the problem on?
Firefox
At which address did you encounter bug?
canary.kodadot.xyz, beta.kodadot.xyz
Are you logged in?
Yes
Which wallet you are using?
Talisman
Screenshots
https://github.com/kodadot/nft-gallery/assets/36627808/1eb456ec-6c7b-4868-831b-9d5bdcf38e6b
Relevant log output
No response
Payment link for reward
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

DarkMode ftw!


Added base grids-min.css to Individual Modules section

This section only listed the responsive grids CSS file, in error.
Since you need the base grids css file in order for the responsive grids css file to work, and since both can be included as individual modules, both files should be listed here.

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! :smile:

I signed the Yahoo CLA.

@jamesalley: Just checking in to see if you received this pull request.

@jamesalley Can you give me an update on this PR?

@jerzygangi it says you have not signed the CLA, can you double check and then I can merge this.

@redonkulus When I log into the Yahoo CLA, it says:
Good to see you, Jerzy J. Gangi
You previously signed this CLA on:
Thu Apr 23 2015 05:49:06 GMT+0000 (UTC)
From: 68.82.207.***

Is there anything else I can do to help close this PR? Thank you.

I already merged it so you are all set. Thanks!


Flags created with --define appear to be incorrectly cached

Given this build.sc:
import mill.T

def myProperty: T[Boolean] = T.input {
    println(s"""System.getProperty("my-property", "X")=${System.getProperty("my-property", "X")}""")
    System.getProperty("my-property", "X") match {
        case result if result == "F" || result == "X" =>
            println(s"$result ::: my-property=false")
            false

        case "T" =>
            println("T ::: my-property=true")
            true

        case x =>
            println(s"my-property='$x'")
            throw new IllegalStateException("Invalid value")
    }
}

def foo: T[String] = T {
    if (myProperty()) {
        println("TRUE")
        "TRUE"
    } else {
        println("FALSE")
        "FALSE"
    }
}

I see the following:
~/c/s/mill-bug> ./mill --version
Mill Build Tool version 0.11.12
Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: /nix/store/6m2wff2lm5pk892389ivgcbs1nqbsz6v-temurin-bin-21.0.1
Default locale: en_US, platform encoding: UTF-8
OS name: "Linux", version: 6.11.3-1-default, arch: amd64

~/c/s/mill-bug> rm -rf out

~/c/s/mill-bug> ./mill --define=my-property=T foo
[build.sc] [54/59] compile
[info] compiling 1 Scala source to .../out/mill-build/compile.dest/classes ...
[info] done compiling
[1/2] myProperty
System.getProperty("my-property", "X")=T
T ::: my-property=true
[2/2] foo
TRUE

~/c/s/mill-bug> ./mill foo
[1/2] myProperty
System.getProperty("my-property", "X")=T
T ::: my-property=true

~/c/s/mill-bug> ./mill --define=my-property=F foo
[1/2] myProperty
System.getProperty("my-property", "X")=F
F ::: my-property=false
[2/2] foo
FALSE

~/c/s/mill-bug> ./mill foo
[1/2] myProperty
System.getProperty("my-property", "X")=F
F ::: my-property=false

Note that when not providing --define=my-property=?, it seems that the previous invocation of myProperty is reused somehow, including the println output.

@lihaoyi just fixed this issue in main branch, which will become 0.12.0. We might want to backport the fix to 0.11.x too.

Backported to 0.11.x branch https://github.com/com-lihaoyi/mill/pull/3795 and eventually released in 0.11.13.


Include catch as an external project

We can get cmake to fetch catch using their instructions here: https://github.com/philsquared/Catch/blob/master/docs/build-systems.md#cmake

Done and working.


Introduce an alternative to ParallelBridge that does not require the iterator type to be Send

Working on a prototype for sfackler/rust-phf#162, I wanted to implement something like this:
pub fn generate_hash<H: PhfHash>(entries: &[H]) -> HashState {
    use rayon::prelude::*;

    SmallRng::seed_from_u64(FIXED_SEED)
        .sample_iter(Standard)
        .map(|keys| hash_entries(entries, keys))
        .par_bridge()
        .find_map_first(try_make_displacements)
        .expect("failed to solve PHF")
}

The current implementation of .par_bridge() wraps the iterator type in a mutex, necessitating a Send bound (or T: Sync for &T: Send); however I don't want to leak the Sync requirement to the H type so slice::Iter<H>: Send. Instead, I was thinking it should be possible for the producer side of the bridge to push into a bounded/rendezvous channel that the consumers then pull from, so only the item type must be Send (which would be fine in this case as the generated hashes are just plain data).

After reading the code and making an effort to understand why it's structured the way it is, I realize my original idea is mutually exclusive with the existing design: if we want the thread that created the parallel iterator to participate in computation, other threads have to be able to pull from the original iterator to fill the work-stealing queue when they empty it so they don't starve if the originating thread is still blocked on its own iteration. My idea would instead necessitate having the originating thread be solely responsible for filling the queue, and all other threads pulling from that queue, which would mean that we would need to spawn an extra thread for full CPU utilization.
It seems like instead we should have a separate API from ParallelBridge that does the same thing but does not require the iterator to be Send, which means the originating thread is solely responsible for filling some sort of bounded queue and keeping it full while other threads act as consumers only. Since the plumbing module is public I will probably just prototype this in phf-hash first and benchmark its performance.

OK, yes, I think you've figured out the difference in design. I look forward to seeing what you can come up with! The performance of the current bridge is not great, but it's functional...

That's another thing, this other approach may prove to be more performant since it's not using a contested mutex underneath.

@cuviper I've already run into one issue; ParallelIterator requires Send so to work around this the type I'm prototyping wraps the iterator type in a struct that asserts the current thread is the same thread that constructed it before allowing deref. This isn't great UX, but I know dropping the Send bound from ParallelIterator is a breaking change now.

ParallelIterator requires Send

FWIW, chain was the main motivator for that -- #346.

It seems like a where Self: Send bound on chain() would have been more appropriate, but okay.

The other option would be to take a closure that accepts the ParallelIterator type that is then spawned into a scope, so we can iterate in the current thread and push into the queue that way.

@cuviper why does scope() execute the closure in the thread pool? That seems unnecessary since we're blocking the current thread until it returns; it inconveniently adds a Send bound which I thought I was going to be able to work around.

Nevermind, spawn() doesn't work either because of the 'static bound. I'm starting to think there's not actually a way to implement this with the current API.

@cuviper why does scope() execute the closure in the thread pool? That seems unnecessary since we're blocking the current thread until it returns; it inconveniently adds a Send bound which I thought I was going to be able to work around and thus avoid having to call spawn().

We can possibly relax this -- see #562.

It turns out .par_bridge() is not the source of the slowdown; the equivalent code with just Crossbeam of roughly what I wanted to do is actually slower because try_displace() is not the bottleneck, hashing is.

Any update on this?

The scope() question at least now has an in_place_scope() counterpart that doesn't require Send.

Thanks for the update!
I have an use-case where the Iterator before .par_bridge() gets a reference to something that is not Sync, so thus, the Iterator is not Send, prohibiting the use of rayon without quite some boiler code. I cannot move the value into the Iterator since i need to use it afterwards.
Does the iterator really need to be Send for .par_bridge() to work?

Well we do have the supertrait, trait ParallelIterator: Send, and some code does make use of that, like Chain calling join on its two parts. It's valid for external code to be relying on that as well.


Get Contact Number from an Incoming Call

Is there any way to get the contact number from an inbound call using the Contact API provided in the connect streams API doc? I am not sure if we can get the contact number from the given API event functions.

@bizcloudexperts were you able to get number from incoming call?

I was able to reference the contact's phone number without adding a custom attribute in the Contact Flow:
contact.onConnecting((c) => {
  const { phoneNumber } = c.getActiveInitialConnection()?.getEndpoint()
})

@pukhrajbal Please let me know if you have concerns with this approach, as my understanding of getActiveInitialConnection is pretty limited


Add TestDefinition for SKR provisioning+cleanup

Description
Adding dedicated test definition for SKR end-to-end test scenario. Dedicated test definition is required to be decoupled from existing provisioning scenarios.
Related issue(s)
https://github.tools.sap/kyma/backlog/issues/953

 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.

/retest


update kpg live init docs

This PR updates the outdated kpt init docs.
see kubernetes-sigs/cli-utils#205 for the related change.

Can we also include a description of how we decide on the name and namespace for the inventory if the user does not specify it with flags?
Also, can we verify that the guides are also updated?

Done, also updated the example live init output in guides

Looks good to me, but needs a rebase.

Looks good to me, but needs a rebase.

Done.


[Backend] Record Each Time Consent Is Served

Is your feature request related to a specific problem?
Record when components display consent to the user.  So we're not necessarily recording each time an API request is made to get consent, but whenever components show something to the user.
Describe the solution you'd like

Needs to be able to be queried to surface conversion

Design doc here

Describe alternatives you've considered, if any
A description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

test when UI component is added
moving to done.


Close Distance Audio Call Loud volume issue

I don't think this issue is particular to Agora since I tested calling a friend who is a few meters across from me and we noticed a high pitch audio that keeps increasing until it gets unbearable.
This was the case when I decided today to show a demo to a friend and the audio call was so loud, I tried to have the volume at 0 on the device I'm running the demo on which is Quest 2 but I was still hearing the loud noise so I had to quit the app.
I think we won't have this issue when having distant calls but I'll have to test first to be certain, what do you think causes such issue? Are there any fixes we can introduce?
Thanks!

This problem cannot be solved, and the reason for this is called feedback. We recommend that if two devices are used in close proximity, you can mute one device and use headphones to answer the other device to reduce the occurrence of this problem.

Got it, thanks again for your answer @oneSitDown.


[Question] Suppress Terminal Output when running search

Issue Template
Please use this template!
Initial Check

If the issue is a request please specify that it is a request in the title (Example: [REQUEST] more features). If this is a question regarding 'twint' please specify that it's a question in the title (Example: [QUESTION] What is x?). Please only submit issues related to 'twint'. Thanks.

Make sure you've checked the following:

[] Python version is 3.6;
[] Updated Twint with pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint;
[] I have searched the issues and there are no duplicates of this issue/question/request.

Up to date
Command Ran
python3 .\twitterADS.py
Description of Issue
Python Script running twint on search string, gets outputted to the terminal when I run it. Is it possible to suppress the output to the terminal as I save my data to a csv so I do not need to see the terminal window but just the end of the compilation.
Environment Details
Windows 10, VSCode

Hi @VasuBhog
yes, just add config.Hide_output = True
#473

Unfortunately, this doesn't seem to work for all searches. When doing twint.run.Search, .Profile and others, these lines always print to the terminal.
list index out of range [x] feed.MobileFav
[!] Twitter does not return more data, scrape stops here.

This is frustrating because for large jobs, it is useful to use tqdm or other progress tracker.


Migrate Branding resources to plugin framework

Changes
resource/pingone_branding_theme: Migrated to plugin framework.
resource/pingone_branding_theme: Corrected documentation example syntax.
resource/pingone_branding_settings: Migrated to plugin framework.


raw Interfaces are doing str variable substitution incorrectly for PostreSQL

Bug description
When doing raw queries with ? placeholders for variable substitution, the str  passed as value contains "" from code.
This makes code formatters like black useless, and IMHO the query build should not take into account if python literal is 'something' or "somthing", as in PostgreSQL is always 'something'. Looking at code it might be not the only type substitution incorrectly formatted, as we also detected arrays to have issues in raw queries with var substitution.
1657974564.603 12:29:24 Generated query:
mutation {
  result: queryRaw
  (
    query: "\n    SELECT ?\n    "
    parameters: "[\"Hello world\"]"
  )
}

ERROR P2010: syntax error at end of input

How to reproduce
    res = await db.query_raw(
        """
        SELECT ?
        """,
        "Hello world",
    )

Expected behavior

Prisma information

    res = await tx.query_raw(
        """
        SELECT 'Hello World'
        """,
    )
    assert res == [{"?column?": "Hello World"}]   # True

Environment & setup
- OS: Ubuntu 20.04
- Database: PostgreSQL
- Python version: 3.8.10
- Prisma version: 0.6.6 and master 0.6.7a
prisma               : 3.13.0
prisma client python : 0.6.7a
platform             : debian-openssl-1.1.x
engines              : efdf9b1183dddfd4258cd181a72125755215ab7b
install path         : /home/danigosa/rbcode/.build/.virtualenvs/care-api-hvqas-MI/src/prisma/src/prisma
installed extras     : []

@danigosa The error you're getting is because of the ?, in PostgreSQL you have to use $N for parameter substitution. For example:
    res = await db.query_raw(
        """
        SELECT $1
        """,
        "Hello world",
    )

I admit this should be better documented, do you have any suggestions? Was there some particular part of the documentation that referenced using ? and wasn't clear that the syntax you need to use differs per database provider?