Adding Double Crystal Ball function

Hi, I need to fit a double crystal ball for a project. Hence, this pull request. I think I have added all necessary
lines of codes to accommodate this.
Thank you

Hi @andreas01060 and @HDembinski, I just bumped into this old PR. Any hope to get it sorted and merged soon? It's a nice addition.

Hi @eduardo-rodrigues, I couldn't get it past the tests, so in the end I just cloned my probfit version and added it to my python packages (and it works). I didn't really understand why the tests failed, that's why I abandoned on the PR. When I have some time, I will try again though.

Tests fail because ProbFit does not work with iMinuit > 1.2, I believe. I think we probably should pin the iMinuit version, then try to fix this (and then unpin the version).

Thanks for your reply @andreas01060. Seems @henryiii has found the source of the problem and PR https://github.com/scikit-hep/probfit/pull/89 aims at sorting it out. Fingers crossed ...

Hi @eduardo-rodrigues. I have a fork of profit and I modified some stuffs, like in #84, and some additions for future PR (johnsonSU pdf, add constraints to likelihood), but nothing crucial or I don't recall. As you said I have python 3.7 and iminuit 1.3.2.

So you say that with https://github.com/scikit-hep/probfit/issues/84 you actually got the builds OK? If that's the case it would make sense to have a PR with that, to try and fix Travis ...
Cc @henryiii for info.

Hi @andreas01060, can you rebase this PR to resolve the conflicts, now that https://github.com/scikit-hep/probfit/pull/91
went in?

Hi @eduardo-rodrigues , I resolved the conflicts, but the check is still failing..

The plotting test are failing, because you changed all the plotting test with gaussian with double crystal ball right, in test_plotting.py? I think you let those tests as they were with the gaussian.

Hi @marinang, yes true , but now it's back to how how it first was: I deleted those changes and put back in the original ones.

That's right, you seem to have replaced tests whereas you should be adding new tests for the double CB. I believe the replacement of tests was in since the first commit.

Hi sorry for the delay, Is it okay now? I was confused, I thought the various plotting tests should also be applied on any new functions implemented..

Whoever merges this should make sure it's a squash and merge...

Just curious though, can't you just add two crystal ball functions? I believe this even happens at the compiled code level due to Cython's cpdef.
>>> dg = probfit.AddPdf(probfit.crystalball, probfit.crystalball, prefix=['f_','g_'], skip_prefix=['mean', 'sigma'])
>>> probfit.describe(dg)
['x', 'f_alpha', 'f_n', 'mean', 'sigma', 'g_alpha', 'g_n']
>>> dg(10, 1, 2, 10, 2, 1, 1) / 2
1.0
>>> dg(11, 1, 2, 10, 2, 1, 1) / 2
0.8824969025845955

I'd rather have a small set of core elements that can be composed, I think.

I think this might be just the case from the particular example you give. If you take x such that it's in the tails, I don't think it will work. Also when the alpha and n differ for the two tails, this complicates it more.

With all the examples you've provided, I get identical results to floating point precision. Can you add an example with different values in the two tails to the test?

Henry's suggestion for extra tests is a good one. On the doc side I would suggest that you add this is a double CB of common mean and core resolution (OK, obvious from the signature, but still good to add for clarity).
Otherwise this seems ready to go. Nice.

Thumbs up from me.

Just pinging you @HDembinski, for when you have the time, as this seems ready to go.

@andreas01060 Thank you for contributing this!

Thank you all for helping me out! (This was my first time using github, so sometimes it was a bit cryptic for me. )


PMID:23333317

@JackyVH  used
FYPO:0001127 | abnormal cell size
with a suggestion for increased size variability at division.
This is quite an important phenotype  because it  is loss of control of cell size at division:
The double mutant was viable (Figure 2G). The randomization of size at division was highly reminiscent of wee1.50 cdc25.22 cells [25] (Figure 2H), consistent with the hypothesis that cut12 mutations suppress cdc25 mutations because they inappropriately promote negative feed- back-loop activity toward Wee1 [26].
I checked and we have " wee1.50 cdc25.22"
as
FYPO:0001127 | abnormal cell size.   as_severity variable severity, so I have used this option for now.
However, this won't be easy to locate and it's a little difficult to realise that the cells are both 'large' and 'small' without a bit of extrapolation. I would probably automatically think these cells were variably larger, or smaller (although obviously in this case we would have used large or small cells with this extension. Anyway,  I don't think it is intuitive that there as a whole gamut of size range at division, but I'm not sure how to capture this.
I think since we did this we have  other phenotypes with  'increased variability of..." so I wonder if we could also do that here?
And yes, I am only on figure 2 checking!

Eurgh, just from this I see what you mean about "head-fuck".
To capture variability between size (or any other quality) of whole cells, I think the term is pretty much going to have to be in the population phenotype branch. That's going to make it hard to connect to cell-level control of division that goes on (or should, but maybe doesn't in a mutant) in each individual cell. It might not be a bad idea to keep the "small cell, variable severity" annotations even when there is also a population-level "variable size" term.

... we have other phenotypes with 'increased variability of..."

Well, there's one other term (FYPO:0007390), and it's slightly different because it refers to variability of one aspect of a subcellular component, not the whole cell.

OK, what if I do
both
increased cell size variable_penetrance
decreased cell size variable_penetence
and then a population term capturing "increased variability of cell size in a vegetative population"
or words to that effect...

Yep, that sounds like the best we can do with the tools and time we've got. I'll add the population term in my next fypo-editing session, prob early next week.

added
variable cell size at division FYPO:0007474
with a bunch of synonyms


fix(user-create): duplicate email error message

Thanks for submitting a PR! Please check the boxes below:

[x] I have run pre-commit to check linting
[x] I have filled in the "Changes" section below?
[x] I have filled in the "How did you test this code" section below?
[x] I have used a Conventional Commit title for this Pull Request

Changes
Return a generic error message for user create if the email is not unique
How did you test this code?

covered by unit test cases and verified manually by creating a user with duplicate email

Codecov Report
Patch coverage: 100.00% and project coverage change: -0.01% :warning:

Comparison is base (1514bf7) 95.44% compared to head (7ccb7ae) 95.43%.
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2642      +/-   ##
==========================================
- Coverage   95.44%   95.43%   -0.01%
==========================================
  Files         976      975       -1
  Lines       27319    27254      -65
==========================================
- Hits        26074    26011      -63
+ Misses       1245     1243       -2

Files Changed
Coverage Δ

api/audit/serializers.py
100.00% <100.00%> (ø)

api/custom_auth/serializers.py
100.00% <100.00%> (ø)

api/custom_auth/tests/test_serializer.py
100.00% <100.00%> (ø)

api/environments/serializers.py
95.52% <100.00%> (-0.32%)
:arrow_down:

api/environments/views.py
90.59% <100.00%> (+1.16%)
:arrow_up:

api/organisations/views.py
91.16% <100.00%> (ø)

api/projects/serializers.py
100.00% <100.00%> (ø)

api/projects/tests/test_serializers.py
100.00% <100.00%> (ø)

api/projects/views.py
94.01% <100.00%> (-0.30%)
:arrow_down:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


chore: prepare 1.4.1

Google ApiCore v1.4.0
Fixes

autoloading of metadata classes (#278)
namespace fixes (#279)
enable non-slash resource name separators (#284)

Let's please add https://github.com/googleapis/gax-php/pull/272 as well

@dwsupplee it done

We also should merge https://github.com/googleapis/google-auth-library-php/pull/310, otherwise the new version of gax will result in a variable undefined error in some cases.

@jdpedrie we have one more important fix to include, can we please add https://github.com/googleapis/gax-php/pull/288? :)

@dwsupplee done!

@jdpedrie Merging now if you would like to tag


Timeout error for days

I am experiencing this kind of error for days, for single videos and multiple ones.
I cannot download anything anymore

Hi,
I just pushed a new update.
Can you try replacing your polidown.js file with the new one?
Let me know!

This error seems to happen when you try to download a video with a better quality than the available ones.
I tried the new .js file and it works, but when I try to download video(s) using the '-q' attribute with a higher value than the maximum (I experienced it using '-q 5' while the video was available in 1280x720).
Maybe it could help.

It works fine now


modify the default value to avoid breaking changes of http client

Modify the default value of maximumConnectionPoolSize as 500, which is to keep the same default behaviour with reactor netty client and avoid breaking changes with our previous versions.
Ref: https://projectreactor.io/docs/netty/snapshot/reference/index.html#_connection_pool_2

Close this pr for this has been fixed at the SDK side via https://github.com/Azure/azure-sdk-for-java/pull/26083, and it will take effect after the version of 1.12.0 of azure-core-http-netty being released.


http conn man: allow to upper-bound downstream connection lifetime.

Description: Allow upper bounding lifetime of downstream connections
Risk Level: Medium
Testing: unit test, integration test
Docs Changes: None
Release Notes: TODO
Fixes #8302

please merge master.

Looks great overall! Can you please add an idle timeout integration test along with the unit test? There should be some in test/integration/idle_timeout_integration_test.cc you can crib off of fairly easily.

added an integration test

/retest

Is there any action items for me here?
I suppose some reviewers were added automatically when I accidentally pushed rebased branch.


No proper namespace for Redis keys

The following demonstrates that data_vector:9051 is available in the top-level namespace of Redis.
> KEYS *
...
data_vector:9051
...
> HGETALL data_vector:9051
...

That wrong, because on a real server Redis may be simultaneously used by other software and that key data_vector: is without a unique prefix.
After being tricked by the logic of existing software, I also created a subroutine that creates keys like:
predict_cache:Show 10 of my GitHub repos.

that is without a unique prefix, too.
It was created by:
async def create_predict_cache():
    value_field = TextField("value")

    # Create index
    await redis_conn.ft(INDEX_NAME + "_predict_cache").create_index(
        fields=[value_field],
        definition=IndexDefinition(prefix=["predict_cache:"], index_type=IndexType.HASH)
    )

Here I was tricked by my intuitive understanding of API that .ft(...) provides a namespace INDEX_NAME + "_predict_cache" but this intuition contradicts to the fact that
HGETALL "predict_cache:Show 10 of my GitHub repos."

retrieves data without a unique prefix having been specified.
The next step is to understand what is the argument of .ft(), does it provide any useful value (because it has no expected value of providing a prefix), and then what to replace it by.

No index is required if not performing search queries. Cache only use the key to retrieve the value. No query is used therefore no index.
The prefix vector_search is enough to avoid colision with other apps that might be sharing the same instace


Ability to use different NativeCoroutineScope on each platform?

Related to #17
It would be really slick if there was a way to provide a different coroutine scope on each platform.

Actually -- maybe this is already possible using dependency injection?
Example using Koin:
// common
expect val platformModule: Module

val clockModule = module {
  single { Clock(get()) }
}

class Clock internal constructor(
  @NativeCoroutineScope
  internal val coroutineScope: CoroutineScope
) {
  // all the stuff that's already in there
}

// jsMain
actual val platformModule = module {
  factory<CoroutineScope> { GlobalScope}
}

// iosMain
actual val platformModule = module {
  factory<CoroutineScope> { CoroutineScope(SupervisorJob() + Dispatchers.Default) }
}

My first thought is that this would add a lot of extra boilerplate if supported by KMP-NativeCoroutines directly while it could easily be setup in the applications itself.
The way this should work is probably different for every application.
I think there are basically two scenarios:

you just need a CoroutineScope to be able to start your coroutines from the platform code
you are already using a custom scope in your class to control cancellation for example

In the first scenario the default scope should be enough for most of the cases (which we should be different on each platform). For the second scenario a DI solution (like you mentioned) is probably preferred anyway.
But even without DI you could leverage the expect/actual functionality to achieve this.
// commonMain
internal expect fun NativeCoroutineScope(
    context: CoroutineContext = EmptyCoroutineContext
): CoroutineScope

object Clock {
    internal val job = SupervisorJob()
    @NativeCoroutineScope
    internal val coroutineScope = NativeCoroutineScope(job)
}

// appleMain
internal actual fun NativeCoroutineScope(context: CoroutineContext): CoroutineScope =
    CoroutineScope(SupervisorJob() + Dispatchers.Default + context)

// jsMain
internal actual fun NativeCoroutineScope(context: CoroutineContext): CoroutineScope =
    CoroutineScope(GlobalScope + context)

This would allow you to have a default context for your scopes while for example still being able to use a custom job.

I think most (if not all) cases could be solved with one of the above mentioned solutions, so I am going to close this for now.
Feel free to leave a comment if you have a case where these solutions aren't sufficient 😄.


Avoid generating and parsing invalid JSON files

In the case that the crash state file fails to be written completely, avoid flushing the buffer as the file contents will be inconsistent. In addition, when parsing the file, add validation to avoid comparing a string to NULL.
To reproduce:

Install the sample app with v5.14.1 onto a device
Download the application container and show package contents
Change the contents of AppData/Library/Caches/KSCrashReport/{app name}-CrashState.json to 3 }. This triggers the code path where the file is invalid but it is not rejected before crashing.
Replace the app container on the device with the altered one
Restart app

Fixes #218

Thanks so much @kattrali ! 🙌


Best practices for dealing with large data sets on server vs client

We're building an app using Firebase, however one of the issues we have is dealing with data from on the server vs client.
On the server, we're able to use the admin SDK, so the data loads via websockets and is generally fast to load. On the client we do this using a HTTP request to get the same data. The HTTP request is slower. For small data sets this isn't really an issue since it all loads quick.
However when the data is large, there is quite a big delay if the client loads the data. When clicking on a Link, the app "hangs" while the request is being fetched, and then loads once it has the data.
One way to get around this is to do a "if server get the data, else load it once the client componentDidMount has been called". Is this the best way to handle such a scenario? Quite new to isomorphic so would like to get opinions of other ways around this.
Cheers

So, here the delay is the time spent on to fetch data on the server. Basically, you should not spend much time on that.
And you don't need to render everything in the server. But the only stuff you really really want. (That shouldn't come with cost of a big delay)
Then for other data (specially firebase) use componentDidMount to initialize them.
For that, you could simply use utilities like this: https://github.com/kadirahq/react-no-ssr

Is that huge data important for SEO ? if not maybe you could just load it always on componentDidMount.
I don't understand why loading from client should be any slower than loading from the server since the data has to travel to the browser (http) anyway (plus the rendered page which is normally larger than the page with no data). If your server is faster you can create a proxy api and use it on componentDidMount.
If you use some lib to manage state like redux

by custom-handling the link you could also put up a loading spinner before routing to the new page
you could even handle the link click so that it starts downloading the firebase data while also moving to the new page in (parallel). Then the page can wait for the promised data in componentDidMount (again). Have a look at the next.js prefetch api.

Also consider that, as a workaround, by using an <a href="page"> element you can force a full-page refresh therefore always requiring the server-rendered version of the page afaik

you could even handle the link click so that it starts downloading the firebase data while also moving to the new page in (parallel).

@davibe This need a bit of a change. We don't download the data. We only prefetch JS code only.
See: https://github.com/zeit/next.js/issues/740

@davibe in this case no, so you guys are correct moving it to componentDidMount works better.
The server always has an open connect to Firebase, so there's no delay in opening a connection (initial connection time on WS is ~1000ms). The main problem we have is that with Firebase authentication, the server is unable to get data per user because firebase authentication is global. Therefore on the client we have to do it via HTTP calls.
We're building a CMS so we don't care about SEO in the case... Although we have plans for building a blog where SEO is really important, but we don't have to worry about authentication therefore server and client will be loading the data via websockets.

I wonder how Apollo GraphQL subscriptions would compare to the Firebase approach in terms of these client-side performances 🤔 There are headless GraphQL CMSes which are starting to appear, so I guess it must be at least ok? (Can't yet say in my app because doesn't have much data yet... but after all it's based on Facebook technology which has huge data)
Also see the Firebase vs Graphcool feature comparison on https://graph.cool

When you say that on the client you're using http, is this because you're hitting your own backend to get the data? Because Firebase client javascript SDK certainly uses websockets.
Especially if SEO not that important, why not use client SDK to talk directly to Firebase from client?
Or, you can load specific user data on server on first load then subscribe to updates on client.
The server can get data per user, by the way:
https://firebase.google.com/docs/auth/admin/verify-id-tokens
You just have to structure your data correctly, isolated to each user, then after verifying the id-token, operate on that users data only
https://firebase.google.com/docs/database/web/structure-data
One thing not highlighted in the docs that I recently found out about is ability for SDK to cache data.
Maybe you're already doing something like this but if not and for others new to Firebase...
Firebase will cache reads in memory as long as there is an active listener for an event.
.once listeners automatically unsubscribe by definition. So on server you need to add a no-op listener to keep the cache alive.
const refSet = new Set()
function noOp() {}
function cache(ref, event) {
	if (!refSet.has(ref.toString())) {
		refSet.add(ref.toString())
		ref.on(event, noOp)
	}
}

export function getListElements({ refPath, orderBy }) {
	init()
	let ref = firebase.database().ref(refPath)
	if (orderBy) ref = ref.orderByChild(orderBy)

	// this just adds the no-op listener the first time we get data
        cache(ref, 'value')
        // use this in your own code to see the speedup. It's a lot.
	console.time('fb getListElements time')

	const promise = ref.once('value').then((listSnapshot) => {
		console.timeEnd('fb getListElements time')
		const list = []
		listSnapshot.forEach((childSnapshot) => {
			const childVal = childSnapshot.val()
			console.log('childVal:', childVal)
			list.push(childVal)
		})
		return list
	})
	return promise
}

Now on the client, even when using .on('value') or .on('child_added') with React components,
we need to add the no-op because usually we unsubscribe the listener on componentWillUnmount()
With both of these, when the event you've subscribed to fires ...by whomever, wherever... the caches get updated.


Start of cookbook in the documentation

This addresses the common questions found within issues like #1355, #1366, and #1504.  It also introduces the concept of a cookbook to the documentation so future common patterns can be easily documented.
@istr @mickaelandrieu @n1k0

Good idea :)


Fixed Accessiblity Issue jsx docblocks - 594

set ignoreTabKey to true so that keyboard only users can tab out of jsx docblocks fixing issue #594

Netlify broke, but pulled locally to confirm.


avoid loading duplicated volume directory

To make git history graceful, I combine several related commits to one and pushed to the branch .
And are there anything I need to modify?


Export all symbols on windows

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Not bumping the build number intentionally. I will bump when the OS X issues are also fixed.


[SPARK-19985][ML] Fixed copy method for some ML Models

What changes were proposed in this pull request?
Some ML Models were using defaultCopy which expects a default constructor, and others were not setting the parent estimator.  This change fixes these by creating a new instance of the model and explicitly setting values and parent.
How was this patch tested?
Added MLTestingUtils.checkCopy to the offending models to tests to verify the copy is made and parent is set.

Test build #74695 has started for PR 17326 at commit 89bac8a.

Test build #74695 has finished for PR 17326 at commit 89bac8a.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74695/
Test PASSed.

Merged build finished. Test PASSed.

ping @jkbradley @MLnick

ping @holdenk

Thanks for the review @MLnick!

Test build #75011 has started for PR 17326 at commit 8c03c28.

Test build #75011 has finished for PR 17326 at commit 8c03c28.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/75011/
Test PASSed.

Jenkins retest this please

Test build #75433 has started for PR 17326 at commit 8c03c28.

LGTM

Test build #75433 has finished for PR 17326 at commit 8c03c28.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/75433/
Test PASSed.

Merged to master. Thanks!


fixes #17 - consistent findOne values

Coverage remained the same at 100.0% when pulling 83facc8b608408eb41f5fadfe293b04cf88355e7 on hotfix-findone into b02a2f35b5cc2224e48a45a3cb75908c5816b850 on master.


featured image can be changed but not saved

Until the last WP update the plugin on my multisite worked very well.
Unfortunately (after the last WP update 5.3 ? ) I have the problem that the featured image at site id 3 (media lib id = 2) can be changed but not saved anymore. Mmh!?

i have the same problem. I don't know if the problem started since the last WP update, but i think it has something to do with the paths... all other places ( i tryed ) i uploaded an image worked except the feature image, when i network disable the plugin, the feature image works perfectly, but when i activate it again the feature image, lets me upload an image, then update the post, and after refresh the feature image is empty. I tryed the plugin on multiple WP multisite instaltions and it is it that is causing the bug.

Hi, I think Gutenberg is the culprit. I uninstalled it and was able to save Feature Image.

just tryed that, it doesnt work for me, but after i set the Upload Url Path for the domain, the images start to save for the posts, but now i get a different image when i print it on the front end

When I said I uninstalled Gutenberg, in fact I used Disabled Gutenberg plugin to deactivate it on a specific page. I just reactivated Gutenberg on this page after inserting a Featur Image and save it. I hope it can help!

Beware, Disabled Gutenberg plugin seems to break content format done with Gutenberg. The plugin deactivate Gutenberg on installation instead to let the user to choose. Which is not a good idea.

oh so i did test this :) and YES disabling gutenberg in the middle of a project is a very bad idea, so i did a fresh install and after i disabled the gutenberg editor, i could upload feature image, but it might've worked all along. Where i found  a problem was when a client asked me to fix his divi theme, and i noticed that in only one case, these two ( plugin and theme ) didnt work quite well, and that was only when you want to put blog posts in a slider and try to put the feature image as a background, only then there is no image or sometimes a wrong image is being displayed.

I found a workaround solution.
The problem is the WP_REST_Posts_Controller that tries to set the featured image via "set_post_thumbnail" - in this is failing, as our "networked" attachement-id is no valid post-id (as it belongs to another site).
So what I did: I used the "rest_insert_"-Action, to set the featured image manually, and then unset the featured_image (so the REST controller can't interfere).
add_action('rest_insert_<post-type>', 'on_insert_item', 10,3);

function on_insert_item($post, $request, $update){
    $featured_media = (int) $request['featured_media'];
    if ( $featured_media ) {
         //this is the original from rest controller that does not work
        //$result = set_post_thumbnail( $post_id, $featured_media );
        //so we set the _thumbnail_id manually
        $result = update_post_meta( $post->ID, '_thumbnail_id', $featured_media );
        //now we unset the featured_image (so the REST controller can't interfere)
        unset($request['featured_media']);
        if ( $result ) {
            return true;
        } else {
            return new WP_Error( 'rest_invalid_featured_media', __( 'Invalid featured media ID.' ), array( 'status' => 400 ) );
        }
    } else {
        return delete_post_thumbnail( $post->ID );
    }
}

Make sure to replace  with the actual post-type you're using.

@frifrafry awesome that you found a solution. Where do I need to change this?
Is it something I add to functions.php?

Yes, just add it to functions.phpAm 11.02.2020 19:15 schrieb asgerqo notifications@github.com:@frifrafry awesome that you found a solution. Where do I need to change this?
Is it something I add to functions.php?
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

@frifrafry
thx, that tip saved my ass :-)

Looks like this is not working as of the most recent WordPress version if the image is uploaded to another subsite. When saving a post the thumbnails dissappears (or reverts to the previous one). Do your solution still works? @frifrafry

@artifex404
I just checked with Wordpress 5.5.1 and network-media-library 1.5.0 and yes - the solution ist still working!
:-)

For me it was not working on a plain WP 5.5.1 MU installation. The featured image dissappears when saving up the post if the image was initially uploaded to another subsite.
The code to fix was to use the class Post_Thumbnail_Saver_REST posted in some fork/pull-request, with the following change:
    /**
     * Sets up the necessary action callback if the post is being saved from a REST request.
     */
    public function __construct() {
        add_action( 'rest_api_init', function () {
            add_action( 'pre_post_update', [ $this, 'action_pre_post_update' ], 10, 2 );
        });
    }

@frifrafry But thanks anyway for checking so quickly 👍


Whitespace token modernization - [gh] lexers w/o html - regarding #1905

This PR is chunk of the effort (#1905) to insert the Whitespace token where ever it applies.
From this chunk, i excluded the html lexer, which i'm going to prepare separately.
The html lexers affects a hugh number of tests...

Merged, thanks a lot! I made a minor change to the Cypher lexer to use words, hope you're ok if that gets folded into this PR.

Merged, thanks a lot! I made a minor change to the Cypher lexer to use words, hope you're ok if that gets folded into this PR.

Yes sure! I just tried to maintain the original intend. But this resulted in that cumbersome section.


Is there a way to conditionally add flipper into expo app?

Hi @jakobo
Is there a way to conditionally add expo-community-flipper into the expo app based on environmental variables?
I'm trying to get Flipper to integrate only in development builds. And prevent Flipper from integrating into our app in staging or production.
Thanks!

Hi @rlam3, the feature you're looking for is the env value FLIPPER_DISABLE=1 which is useful for CI, but can also be used for production builds.

To disable Flipper in CI builds, set the env value of FLIPPER_DISABLE to 1. We specifically do not use the CI env value, as EAS identifies itself as a CI environment which would remove the ability to generate a development client containing flipper. Instead, the ENV value should be provided for your production builds.

Linking issue: #9

@jakobo Thank you!
When you're talking about setting FLIPPER_DISABLE=1, are you referring to setting this inside of the build pipeline (ie. CircleCI) OR inside of expo.dev build pipeline as a secret?

You can set it in a few places depending on how you're building:

In your app-build environment such as an EAS secret or in CircleCI's environment variables
In your app.json in a build profile specific to builds where you want Flipper disabled
In your build command when building FLIPPER_DISABLE=1 expo build (for legacy and standalone builds)


2.4 API

hi,
I tried the plugin with our 2.4 version and it seems to be not working:
./check-graylog2-stream  -stream=11223344566aabbccddee -user=monitoring -password="secret" -url='https://graylog-01.example.com:9000/api/'
UNKNOWN: Can not parse JSON from Graylog2 API

Any suggestions ?

I had the same problem but I misunderstood the credentials aspect. I thought I was supposed to generate an API token and use that name and token but I was wrong - I tried using a normal Graylog username and password that had access to the stream and it worked fine.


Typescript chat plugins

(I'm mildly irritated that the this.modlog('POLL'); -> this.modlog('POLL', null); changes are part of Git blame for all eternity, though.)

@Zarel understood. Sorry that we were impatient.


GoogleSheets guide

Purpose
To make a guide about sending and receiving data into GoogleSheets

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: Maninda:x: IbaquYou have signed the CLA already but the status is still pending? Let us recheck it.

Add an entry for this in the YAML file as well: https://github.com/wso2/ballerina-integrator/blob/master/docs/doc-generator/www/mkdocs.yml


Fix release script to handle distroless tags correctly

Fixes #15150
Problem introduced with #14737.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: c0d1ngm0nk3y
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: utka
If they are not already assigned, you can assign the PR to them by writing /assign @utka in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

release/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/lgtm

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: c0d1ngm0nk3y, jkbschmid
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: utka
If they are not already assigned, you can assign the PR to them by writing /assign @utka in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

release/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: c0d1ngm0nk3y, howardjohn, jkbschmid
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

release/OWNERS [howardjohn]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Update for 1.5.0 - needs new flag 'anonymous-auth'

[ slightly edited snip from the slack channel ]
There’s an important new flag that has to be set in 1.5.0 - anonymous-auth
for users of RBAC/ABAC (Role Based Access Control / Auth Based Access Control)
In particular, it needs to pass --anonymous-auth=false
I believe there will be a 1.5.1 shortly that either panics if you have anonymous-auth and no ABAC/RBAC, or does something similar
--anonymous-auth=true (the default) + --authorization-mode=AlwaysAllow (the default) is bad news
It is called out in the release notes: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#action-required-before-upgrading

1.5.1 removes this, which is out. We should target 1.5.1


allow IP address

Is there a way to setup an allow IP address for one virtual host and not affect the others?  I am trying to do this to protect my setup.  I have had multiple docker containers installed without my permission and I want to IP limit access to shipyard that I use to monitor my containers.

Why not use Shipyard authentication?

I had shipyard authentication and somehow my site was hacked twice how and unauthorized containers installed.
I tried putting in
allow xxx,xxx,xxx,xxx;
Deny all;

but it gets rewritten if dockers are restarted

The link I provided you points to the README file section that describes
how to customize the nginx configuration so that your customizations
persist.
Read the documentation carefully.
Also I suggest you scrutinize any log you can have on the server that was
hacked and discover how the hack actually happened. Restricting access to
the shipyard container might not be enough.
Le lun. 6 mars 2017 à 02:37, moltra<EMAIL_ADDRESS>a écrit :

I had shipyard authentication and somehow my site was hacked twice how and
unauthorized containers installed.
I tried putting in
allow xxx,xxx,xxx,xxx;
Deny all;
but it gets rewritten if dockers are restarted
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jwilder/nginx-proxy/issues/752#issuecomment-284282419,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAClPBdDqwzRw29EAtswMVQLyOpkA5bAks5ri2NngaJpZM4MTiKe
.

What I am doing while I investigate, is stopping all the shipyard containers when I do not actually need them.
I have also enable ssh to log in to the server and have disabled logging in to the server via command line and password.


Rename Occlum attester to SGX attester and add Gramine support to it

WIP: I'm planning to change the existing occlum-attester to sgx-dcap-attester.
TODO:

[x] rename feature names
[x] rename structs/modules
[x] rebase this PR

/cc @Xynnn007
I've tested both Gramine and Occlum paths manually. Occlum tester is also fixed and can be added back to CI.

moved to image-rs


Minor error in "Removed some shader duplication." commit

Hi. A rather belated report regarding https://github.com/Friendly0Fire/GW2Radial/commit/ab2f18c777aa2e2bd6085035c300ca3ac38166cf, as I just happened to update to the latest version and stopped using my fork. The commit has some minor mistakes in it resulting in washed-out colors. This line in particular: https://github.com/Friendly0Fire/GW2Radial/commit/ab2f18c777aa2e2bd6085035c300ca3ac38166cf#diff-ab8b23ed5836d16ed666687cc9608e46R240
float3 fadedColor = lerp(color.rgb, luma, 0.33f);
float3 finalColor = fadedColor;
[...]
finalColor = lerp(fadedColor, finalColor, hoverFadeIn);

This code now makes no sense, because you're lerping from one value to the same value. The original code was lerping from faded_color to the original color: g_vElementColor.rgb in the case of mask images, and color.rgb in the case of alpha-blended full-color images (which, after the commit, are both essentially represented by color.rgb).

Good catch, must've messed up while copy pasting!

But... but it should be color.rgb... Now you're lerping to a solid color all the time, even in case of fullcolor images.

Oh no... Look, I'm terribly sorry for bothering you about this the third time already, and I really should've just tested it myself (I didn't) before becoming confident that I found the cause of the issue... Turns out "comparing two pieces of code with your eyes" is not a very good way to fix bugs, who knew? Well, I tested it now, and this is the actual change that needed to be made in the first place. Sorry. Not saying that the rest are wrong and need to be reverted, just that this thing below was the actual culprit behind the discoloring.
 		color = g_vElementColor;
-		luma = dot(g_vElementColor.rgb, g_vLumaDot);
+		luma = dot(color.rgb, g_vLumaDot);
 	}
 	else
 	{
 		color = tex2D(texElementImageSampler, In.UV);
-		luma = dot(g_vElementColor.rgb, g_vLumaDot);
+		luma = dot(color.rgb, g_vLumaDot);
 	}

I went ahead and did what I should've done in the first place - created a PR: #99


add python api

Signed-off-by: Kenji Brameld<EMAIL_ADDRESS>

Merged, as error is due to a missing dependency in an upstream library. Should disappear once https://github.com/ros-perception/vision_opencv/pull/439 is merged.


[Event Request] Table 246 "Requisition Line" - trigger OnInsert - OnAfterOnInsert

Hello,
Can I please get this new event in the end of the OnInsert trigger?

trigger OnInsert()
    var
        Rec2: Record "Requisition Line";
    begin
        if CurrentKey <> Rec2.CurrentKey then begin
            Rec2 := Rec;
            Rec2.SetRecFilter;
            Rec2.SetRange("Line No.");
            if Rec2.FindLast() then
                "Line No." := Rec2."Line No." + 10000;
        end;
        ReserveReqLine.VerifyQuantity(Rec, xRec);
        ReqWkshTmpl.Get("Worksheet Template Name");
        ReqWkshName.Get("Worksheet Template Name", "Journal Batch Name");
        ValidateShortcutDimCode(1, "Shortcut Dimension 1 Code");
        ValidateShortcutDimCode(2, "Shortcut Dimension 2 Code");

      //>>>>>>>>>>>>>>>>>>>>>>>>>
       OnAfterOnInsert(Rec, ReqWkshTmpl, ReqWkshName);
	//<<<<<<<<<<<<<<<<<<<<<<<<<

    end;

	//>>>>>>>>>>>>>>>>>>>>>>>>>
 [IntegrationEvent(false, false)]
    local procedure OnAfterOnInsert(var RequisitionLine: Record "Requisition Line"; ReqWkshTmpl: Record "Req. Wksh. Template"; ReqWkshName: Record "Requisition Wksh. Name")
    begin
    end;
    //<<<<<<<<<<<<<<<<<<<<<<<<<

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 41534.


hdf5 storage for blotter

At this time mysql is very tightly integrated into the blotter. Do you have plans supporting other storage options as hdf5?
I just tried to insert 11 months of 1min bars (≈40M) from S&P500 into mysql and it took the whole day VS in hdf5 takes minutes.
Since you only have one blotter and nothing else communicating with the DB using a server seems overkill.

I noticed the blotter issues a commit with every row written; perhaps there is some way to autocommit every N seconds or N rows instead to alleviate the immediate problem.
I agree a database seems a bit heavyweight of a solution, since the access patterns are write-once, append only, and sequential reads; I don't think we need ACID or transactions or multiple writers or indexing or complex queries.  Personally I'd be happy with a system that writes to a directory of CSV files (one per instrument).  You could adapt such a system to HDF5 or Blaze or something more efficient.

MySQL was never intended to be the final solution - it was simply the quickest way to get this done. I've actually thinking of maybe replacing it with Man AHL's Arctic to allow for easier management of data clusters if needs be, which is something I'm not sure is possible with flat file formats (HDF5, CSV, etc). I will take a look at the Blaze ecosystem, tho.

I think a database abstraction would be a great upgrade here. FWIW, ran across the following info which might be of interest in this discussion.
https://docs.google.com/spreadsheets/d/1sMQe9oOKhMhIVw9WmuCEWdPtAoccJ4a-IuZv4fXDHxM/edit#gid=0
Using something like InfluxDB, it would enable using Grafana as a metrics dashboard which might allow offloading some of the development tasks of the dashboard to other tools.

Take a look at http://www.timescale.com/ as well


[FEATURE] Add automation for PR rejection

Is your feature request related to a problem? Please describe.
sometimes PRs do not follow the indicated description. handling this requires manual overhead
Describe the solution you'd like
automate the communication in a way that the maintainer can provide a reason and oss.gg does the following:

Send a message to issue that last solving attempt failed together with the closing comment of the PR.
unassigns user from PR
gives PR up for grabs again
prevents the same user from self-assigning again

So the UX should be as follows:

The maintainer writes a comment with  "/reject The PR does not follow coding best practices"
the oss.gg bot writes a comment like:

"Hey @assignee,
Thanks a lot for the time and effort you put into shipping this! Unfortunately, we cannot accept  your contribution for the following reason:
The PR does not follow coding best practices
We will open the issue up for a different contributor to work on. Feel free to stick around in the community and pick up a different issue, if you like :)
Thanks a lot!"

Thanks 🙌

/oss.gg 250

/assign


Pex 2.0 Users not staying in groups

Every time I restart the Server My file is ok but my users dont remain in the groups they are set to. Why is this happening?

Having the same problem over here
28.11 20:51:19 [Server] Server thread/ERROR [Sponge]: Could not pass FMLPreInitializationEvent to Plugin{id=permissionsex, name=PermissionsEx, version=2.0-SNAPSHOT-b145, source=/mods/PermissionsEx-Sponge.jar}

Unfortunately PermissionsEx is currently unmaintained and no further updates are planned. Because of this, all pull requests are being closed. If you are looking for an actively maintained permissions plugin, take a look at LuckPerms. It is compatible with major server platforms and can import data from PEX.


docs/WindowsBuild: Update cmark build invocation to Release mode

Might be nice to introduce a variable for the build type at this point

@swift-ci please smoke test and merge

Seems like a good idea, right now we have two variants: we build {cmark, llvm, clang} in Rel, but Swift in Debug.


erron in request: 502

I have noticed this morning (was still on 0.2.4), that the error "erron in request: 502" appeared continuously in the ioBroker log for every 5 seconds. So I updated to 0.3.0, but it is still there.
Looks like Spotify changed "something". Unfortunately I do not have time to look into this any further at this time as I am out of town and will be back in a week.
However wanted to make sure this issue is being reported.
Thanks.

@Mic-M: Any new infos here?

I could resolve the issue by deleting all Alexa devices and playlists and update these accordingly.


composer 出错

Problem 1                                                                                - casbin/think-adapter v1.0.1 requires topthink/think-migration ^2.0 -> satisfiable by topthink/t hink-migration[2.0.x-dev, v2.0.1, v2.0.2, v2.0.3] but these conflict with your requirements or minimu m-stability.                                                                                - casbin/think-adapter v1.0.0 requires topthink/think-migration ^2.0 -> satisfiable by topthink/t hink-migration[2.0.x-dev, v2.0.1, v2.0.2, v2.0.3] but these conflict with your requirements or minimu m-stability.                                                                                - Installation request for casbin/think-adapter ^1.0 -> satisfiable by casbin/think-adapter[v1.0. 0, v1.0.1].                                                                                Installation failed, reverting ./composer.json to its original content.

tp6官方的topthink/think-migration已经出到^3.0

think-casbin 仅支持tp5.1
tp6.0用这个 https://github.com/php-casbin/think-authz

收到。谢谢。


docs(subscription): Improving subscription.add() documentation

Description:
Currently the documentation claims that subscription.add() will call teardown logic during unsubscribe, this is only part of the story as teardown logic is also called when the subscription terminates for any reason.

Can I get a review on this MR? It's pretty small and I was hoping it would improve the documentation. If it's not a valuable documentation change I'd be happy to tweak it to make it more valuable.

@TheMcMurder Hey, it looks like your work here coincided with other work I was doing on the Subscriptions, and this was already updated in master.
Also, the text your adding is slightly debatable, as Subscriptions can stand on their own outside of an Observable life cycle (although they rarely do). It might make sense to add something that frames this behavior a little more accurately, as you're suggesting.
I'm also working on a better guide here, #5592, if you'd like to take a look at what I have written over there about subscriptions.
At this time, I think I'm going to let the new docs that were added here simmer for a bit. But I see what you're saying and you've got me thinking about adding more detail here. I'm just not sure this is the right way to phrase it.


'enum' ref has wrong types

Environment information
System:
    OS: Windows 11 10.0.23590
    CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics
    Memory: 13.21 GB / 23.91 GB
  Binaries:
    Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.11.0 - ~\AppData\Local\pnpm\pnpm.EXE
    bun: Not Found
    Watchman: Not Found
  npmPackages:
    @aws-amplify/backend: 0.5.5
    @aws-amplify/backend-cli: 0.9.1
    aws-amplify: 6.0.5
    aws-cdk: Not Found
    aws-cdk-lib: 2.111.0
    typescript: 5.3.2

Description
Using following models:
import { a } from "@aws-amplify/backend";

const schema = a.schema({
  ChildGender: a.enum(["MALE", "FEMALE"]),

  Child: a.model({ id: a.id().required(), gender: a.ref("ChildGender") }),

  Pregnancy: a.model({ id: a.id().required(), children: a.hasMany("Child").arrayRequired().valueRequired() })
})

and requesting data with:
amplifyClient.models.Pregnancy.list({
    selectionSet: [
      "id",
      "children.id",
      "children.gender",
    ],
  })

Typescript shows no error, but a wrong type though. Child is typed as following:
{
    readonly id: string;
    readonly gender: {
        readonly authorization: {};
        readonly required: {};
        readonly [__auth]?: undefined;
        readonly [brand]: "ref";
    } | null;
}[]

in this case, gender property should be typed as "MALE" | "FEMALE"

Hey @erickriva , Thank you for bringing this issue to our attention. We were able to reproduce the problem by following the steps outlined in your report. We have logged this as a bug so our team can investigate further.
schema:
const schema = a.schema({
  Status: a.enum(["STARTED", "INPROGRESS", "COMPLETED"]),
  Todo: a
    .model({
      content: a.string(),
      status: a.ref("Status"),
    })
    .authorization([a.allow.owner(), a.allow.public()]),
  User: a
    .model({
      id: a.id().required(),
      name: a.string().required(),
      todos: a.hasMany("Todo").arrayRequired().valueRequired(),
    })
    .authorization([a.allow.public()]),
});

I can repro with the latest version.

This bug is fixed in the latest versions of amplify-js and amplify-backend.
Note that amplify-backend is only releasing new versions under the beta tag until the first major version release.
Please upgrade to the following versions in your project:
"dependencies": {
    "aws-amplify": "^6.0.16",
    ...
  },
  "devDependencies": {
    "@aws-amplify/backend": "^0.13.0-beta.1",
    "@aws-amplify/backend-cli": "^0.11.2-beta.1",
    ...
  }

The enum type gets correctly resolved when using a custom selection set:


Software encoding working?

Hi, first of all congrats on great work on this, really impressive setup as well as documentation!
Been playing around with Jetson Orin Nano Developer Kit on e.g. samples

rtsp_cam_compatibility_test
peoplenet_detector

with branches "develop" as well as release 0.2.5. As you point out, Orin Nano does not support nvenc. So when I run either sample out of the box it will fail with error regarding exactly that.
always-on-sink_1     |  INFO  insight::savant::deepstream::encoding > Checking if encoder for codec 'h264' is available
always-on-sink_1     |  INFO  insight::savant::gstreamer::runner    > Starting pipeline <Gst.Pipeline object at 0xffff50367800 (GstPipeline at 0x181aa1c0)>...
always-on-sink_1     |  INFO  insight::savant::gstreamer::runner    > The pipeline is initialized and ready to process data. Initialization took 0:00:00.001107.
always-on-sink_1     |  ERROR insight::savant::gstreamer::runner    > Received error "gst-resource-error-quark: Cannot identify device '/dev/v4l2-nvenc'. (3)" from nvv4l2h264enc0.
always-on-sink_1     |  INFO  insight::savant::gstreamer::runner    > The pipeline is about to stop. Operation took 0:00:00.001376.
always-on-sink_1     | Exception in thread Thread-1:
always-on-sink_1     | Traceback (most recent call last):
always-on-sink_1     |   File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
always-on-sink_1     |     self.run()
always-on-sink_1     |   File "/usr/lib/python3.8/threading.py", line 870, in run
always-on-sink_1     |     self._target(*self._args, **self._kwargs)
always-on-sink_1     |   File "/usr/local/lib/python3.8/dist-packages/savant/gstreamer/runner.py", line 72, in _main_loop_run
always-on-sink_1     |     raise RuntimeError(self._error)
always-on-sink_1     | RuntimeError: Received error "gst-resource-error-quark: Cannot identify device '/dev/v4l2-nvenc'. (3)" from nvv4l2h264enc0. Debug info: "/dvs/git/dirty/git-master_linux/3rdparty/gst/gst-v4l2/gst-v4l2/v4l2_calls.c(637): gst_v4l2_open (): /GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0:
always-on-sink_1     | system error: No such file or directory".
always-on-sink_1     |  ERROR insight::savant::deepstream::encoding > You have configured NVENC-accelerated encoding, but your device doesn't support NVENC.
peoplenet_detector_always-on-sink_1 exited with code 0
However, when I change module.yml to
output_frame:
# Frame is output without any encoding
# this is to circumvent 3 hardware decoding processes limit on NVIDIA consumer hardware
codec: h264
encoder: software
I still get that same error, was specifying software not supposed to force software encoding or?
Also, as defining "encoder: software" is only, as far as I can see, an option for the "module". How would I go about making "always-on-sink_1" a.k.a. "broadcaster" in "rtsp_cam_compatibility_test" use software encoder?

@elfar hello. The Always-on RTSP sink is a hardware-only RTSP caster. The module can use 'software' encoders, but this sink adapter supports only NVENC.

@bwsw - Ah, understood, was slowly arriving at this conclusion through the documentation, but great to have it confirmed. Thanks for the quick reply. Much appreciated!


Add rez packages generation for server_addons

This commit will add a python script that allows us to quickly generate packages for ayon-backend ingestion, either by copying them to the rez repo (not advised) or installing them via the ayon-frontend by uploading the resulting zips of the script.
Changelog Description
This is a PR that will allow us to then test the functionality of this ayon-backend PR: https://github.com/ynput/ayon-backend/pull/29
Instead of creating a folder structure at this step, we delegate it to the rezbuild.py on the ayon-backend which expects the package.py and the usual folder structure  of the addon source code (https://github.com/ynput/ayon-addon-template), thus this step is greatly simplified where we only copy the contents of the addon, add a package.py and zip them up. The caveat of the openpype package is the same, so an extra step to copy the required things of OpenPype into the client folder.
Testing notes:

Clone this branch
Run python create_ayon_rez_addons.py
Confirm zip archives have been generated in OpenPype/server_addon/rez_packages
If you are running the backend with the rez implementation: Install the addon, enable it and make sure it is able to initialize.

TODO

[ ] Test all individual addons and change where required so they initialize in the backend

No point merging this here at this point. Let's port to AYON please @Minkiu

These changes  are now in this PR: https://github.com/ynput/ayon-core/pull/64


Option to scan entire table for Cloud Data Loss Prevention and Dataflow

For Cloud Data Loss Prevention and Dataflow solution on this page: https://cloud.google.com/architecture/automatically-apply-sensitivity-tags-in-data-catalog
Would be helpful to also have the option to scan entire database table.

It's already implemented.
use --sampleSize=0


NoParamTypeRemovalRule: Skip constructors

constructors - in contrast to regular methods - are allowed to have different argument orders and types

good to go


[WFRP4CharSheet] - Added new localisation tags

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

Changes / Description

Added new localization tags -> Issue #10332

Character Sheet Info Roll20 Internal Use only.


Rationales

Each thing in the list deserves a file on the rationale behind it, even if those are largely URLs.

I agree that seeing the rationale would be great, but please don't do this within the checklist, as you probably don't want to read it every time you read the checklist.

A very good idea . May be we can  start to make a seperate files as a reference to every check point.

Without a rational for each recommendation, the checklist is not very useful (to me at least).
Security is never perfect or absolute, so whether and how to secure something depends on how sensitive the data is and who you are protecting it from. And while some practices are widely accepted, there are disagreements about others. Take for example the discussions on Basic Auth and JWT in the issues on this repo. A rational for why the author(s) of this checklist recommend to use JWT Bearer Auth over Basic Auth would be good. (IMO, neither is perfect, but both can be good enough for some APIs)

I agree that this list does not come across as useful to me. A security checklist asking its users to follow its advice without question paradoxically undermines the security-conscious process and mindset the checklist appears to support.

Anyone want to try having a go at this, make some PRs, etc?


Update preferences.lua

I think it's an error. If not, you can close the request.

 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.


Remove v1 endpoints (and other refactors)

@tchx84 How are the tests based on the summary file supposed to work? I may be tired but it seems fine with Flathub data, I just can't get it to work with the mocked responses.

@tchx84 How are the tests based on the summary file supposed to work? I may be tired but it seems fine with Flathub data, I just can't get it to work with the mocked responses.

I think that unless we can create a fake summary file, we may need to drop the test_feed_by_new test too.

I think that unless we can create a fake summary file, we may need to drop the test_feed_by_new test too.

@tchx84 How are the tests based on the summary file supposed to work? I may be tired but it seems fine with Flathub data, I just can't get it to work with the mocked responses.

How is it working fine with Flathub data? I mean, how do you know?
There's no difference from how it was working before. The test it's creating its own instance of the backend (with no need for you to do anything) which is feed with whatever we dropped in [1].
[1] https://github.com/flathub/backend/blob/master/tests/appstream/repo/appstream/x86_64/appstream.xml
The test service responses should generate the proper output based on [1] as input.

@tchx84 How are the tests based on the summary file supposed to work? I may be tired but it seems fine with Flathub data, I just can't get it to work with the mocked responses.

How is it working fine with Flathub data? I mean, how do you know?
There's no difference from how it was working before. The test it's creating its own instance of the backend (with no need for you to do anything) which is feed with whatever we dropped in [1].
[1] https://github.com/flathub/backend/blob/master/tests/appstream/repo/appstream/x86_64/appstream.xml
The test service responses should generate the proper output based on [1] as input.

@tchx84 How are the tests based on the summary file supposed to work? I may be tired but it seems fine with Flathub data, I just can't get it to work with the mocked responses.

How is it working fine with Flathub data? I mean, how do you know?
There's no difference from how it was working before. The test it's creating its own instance of the backend (with no need for you to do anything) which is feed with whatever we dropped in [1].
[1] https://github.com/flathub/backend/blob/master/tests/appstream/repo/appstream/x86_64/appstream.xml
The test service responses should generate the proper output based on [1] as input.

Have you checked the errors? Only 3 tests are failing:
FAILED tests/main.py::test_collection_by_recently_updated - AssertionError: a...
FAILED tests/main.py::test_collection_by_one_recently_updated - AssertionErro...
FAILED tests/main.py::test_feed_by_recently_updated - TypeError: 'NoneType' o...

For the first 2, if you changed something with the result format, you will proably need to update
https://github.com/flathub/backend/blob/master/tests/main.py#L181
For the third one, it seems something is broken when we use [1]

@tchx84 How are the tests based on the summary file supposed to work? I may be tired but it seems fine with Flathub data, I just can't get it to work with the mocked responses.

How is it working fine with Flathub data? I mean, how do you know?
There's no difference from how it was working before. The test it's creating its own instance of the backend (with no need for you to do anything) which is feed with whatever we dropped in [1].
[1] https://github.com/flathub/backend/blob/master/tests/appstream/repo/appstream/x86_64/appstream.xml
The test service responses should generate the proper output based on [1] as input.

Have you checked the errors? Only 3 tests are failing:
FAILED tests/main.py::test_collection_by_recently_updated - AssertionError: a...
FAILED tests/main.py::test_collection_by_one_recently_updated - AssertionErro...
FAILED tests/main.py::test_feed_by_recently_updated - TypeError: 'NoneType' o...

For the first 2, if you changed something with the result format, you will proably need to update
https://github.com/flathub/backend/blob/master/tests/main.py#L181
For the third one, it seems something is broken when we use [1]

For starters, /collection/recently-updated ends up empty, its not about the response format:

For starters, /collection/recently-updated ends up empty, its not about the response format:

I think that unless we can create a fake summary file, we may need to drop the test_feed_by_new test too.

dropping tests it's a bad idea, the issue is probably that we are not getting rid of the runtime-dates, but is just a quick guess,

I think that unless we can create a fake summary file, we may need to drop the test_feed_by_new test too.

dropping tests it's a bad idea, the issue is probably that we are not getting rid of the runtime-dates, but is just a quick guess,

For starters, /collection/recently-updated ends up empty, its not about the response format:
====================================================================================== FAILURES ======================================================================================
________________________________________________________________________ test_collection_by_recently_updated _________________________________________________________________________

    def test_collection_by_recently_updated():
        response = client.get("/collection/recently-updated")
        assert response.status_code == 200
>       assert response.json() == get_expected_json_result(
            "test_collection_by_recently_updated"
        )
E       AssertionError: assert equals failed
E         []                                                                                [
E                                                                                {
E                                                                                'icon': 'https://dl.flathub.org/repo/appstream/x86_64/icons/128x128/com.anydes
E                                                                                k.Anydesk.png',
E                                                                                'id': 'com.anydesk.Anydesk',
E                                                                                'name': 'AnyDesk',
E                                                                                'summary': 'Connect to a computer remotely',
E                                                                                },
E                                                                                {
E                                                                                'icon': 'https://www.wps.com/assets/mediahub/WPS-Office-Mobile.png',
E                                                                                'id': 'com.wps.Office',
E                                                                                'name': 'WPS Office',
E                                                                                'summary': 'WPS Office Suite',
E                                                                                },
E                                                                                {
E                                                                                'icon': 'https://dl.flathub.org/repo/appstream/x86_64/icons/128x128/org.sugarl
E                                                                                abs.Maze.png',
E                                                                                'id': 'org.sugarlabs.Maze',
E                                                                                'name': 'Maze',
E                                                                                'summary': 'A simple maze game',
E                                                                                },
E                                                                                ]

yes, because the something in breaking in the service side.

For starters, /collection/recently-updated ends up empty, its not about the response format:
====================================================================================== FAILURES ======================================================================================
________________________________________________________________________ test_collection_by_recently_updated _________________________________________________________________________

    def test_collection_by_recently_updated():
        response = client.get("/collection/recently-updated")
        assert response.status_code == 200
>       assert response.json() == get_expected_json_result(
            "test_collection_by_recently_updated"
        )
E       AssertionError: assert equals failed
E         []                                                                                [
E                                                                                {
E                                                                                'icon': 'https://dl.flathub.org/repo/appstream/x86_64/icons/128x128/com.anydes
E                                                                                k.Anydesk.png',
E                                                                                'id': 'com.anydesk.Anydesk',
E                                                                                'name': 'AnyDesk',
E                                                                                'summary': 'Connect to a computer remotely',
E                                                                                },
E                                                                                {
E                                                                                'icon': 'https://www.wps.com/assets/mediahub/WPS-Office-Mobile.png',
E                                                                                'id': 'com.wps.Office',
E                                                                                'name': 'WPS Office',
E                                                                                'summary': 'WPS Office Suite',
E                                                                                },
E                                                                                {
E                                                                                'icon': 'https://dl.flathub.org/repo/appstream/x86_64/icons/128x128/org.sugarl
E                                                                                abs.Maze.png',
E                                                                                'id': 'org.sugarlabs.Maze',
E                                                                                'name': 'Maze',
E                                                                                'summary': 'A simple maze game',
E                                                                                },
E                                                                                ]

yes, because the something in breaking in the service side.

Check the logs, it shows :
    def generate_feed(key: str, title: str, description: str, link: str):
        feed = FeedGenerator()
        feed.title(title)
        feed.description(description)
        feed.link(href=link)
        feed.language("en")

        appids = db.redis_conn.zrevrange(key, 0, 10, withscores=True)
        apps = [(utils.get_json_key(f"apps:{appid[0]}"), appid[1]) for appid in appids]

        for app, timestamp in reversed(apps):
            entry = feed.add_entry()
>           entry.title(app["name"])
E           TypeError: 'NoneType' object is not subscriptable

Check the logs, it shows :
    def generate_feed(key: str, title: str, description: str, link: str):
        feed = FeedGenerator()
        feed.title(title)
        feed.description(description)
        feed.link(href=link)
        feed.language("en")

        appids = db.redis_conn.zrevrange(key, 0, 10, withscores=True)
        apps = [(utils.get_json_key(f"apps:{appid[0]}"), appid[1]) for appid in appids]

        for app, timestamp in reversed(apps):
            entry = feed.add_entry()
>           entry.title(app["name"])
E           TypeError: 'NoneType' object is not subscriptable

I will continue on Thursday; that being said, it looks like tests worked by coincidence so far or I don't understand something. /collection/recently-updated (and now /collection/new too) are based on the build times read from the summary file. Quick look in redis gives me:
<IP_ADDRESS>:6379> ZREVRANGE recently_updated_zset 0 10
 1) "com.github.rssguard"
 2) "org.gnome.PasswordSafe"
 3) "org.gnome.World.PikaBackup"
 4) "org.musicbrainz.Picard"
 5) "com.tonikelope.MegaBasterd"
 6) "com.hamrick.VueScan"
 7) "com.github.Anuken.Mindustry"
 8) "md.obsidian.Obsidian"
 9) "org.bunkus.mkvtoolnix-gui"
10) "org.filezillaproject.Filezilla"
11) "com.giuspen.cherrytree"

…which must come from my local summary file; as all these apps are not in mocked appstream.xml, /collection/recently-updated produces empty response.

I will continue on Thursday; that being said, it looks like tests worked by coincidence so far or I don't understand something. /collection/recently-updated (and now /collection/new too) are based on the build times read from the summary file. Quick look in redis gives me:
<IP_ADDRESS>:6379> ZREVRANGE recently_updated_zset 0 10
 1) "com.github.rssguard"
 2) "org.gnome.PasswordSafe"
 3) "org.gnome.World.PikaBackup"
 4) "org.musicbrainz.Picard"
 5) "com.tonikelope.MegaBasterd"
 6) "com.hamrick.VueScan"
 7) "com.github.Anuken.Mindustry"
 8) "md.obsidian.Obsidian"
 9) "org.bunkus.mkvtoolnix-gui"
10) "org.filezillaproject.Filezilla"
11) "com.giuspen.cherrytree"

…which must come from my local summary file; as all these apps are not in mocked appstream.xml, /collection/recently-updated produces empty response.

The "coincidence" part is this: https://github.com/flathub/backend/pull/28/files#diff-66f8d5005283b655987b16421f05a21880d4e6b5d16c078c71afb6518f11a76dL131-L132
The current master skips setting build dates for refs not available in appstream.

The "coincidence" part is this: https://github.com/flathub/backend/pull/28/files#diff-66f8d5005283b655987b16421f05a21880d4e6b5d16c078c71afb6518f11a76dL131-L132
The current master skips setting build dates for refs not available in appstream.

OK, so I think that's mostly it. This PR:

removes "inStoreSinceDate" and associated code to pull the data from GitHub via GraphQL
ditches fields not used by the current POC from "summary" form of the apps
moves "updated at" field to /updated_at endpoint
changes "new apps" and its RSS feed to work based on whether app-id existed before in the database
removes /apps endpoint completely as I want to go away from "custom" data formats
backports some bug fixes that landed in the v1 branch

It's mostly a starting point for adding new endpoints. From the missing pieces as of now, the main problem is that
none of the endpoints returns a list of all available IDs. This is probably used by next.js so we'll need to restore
it somewhere.

OK, so I think that's mostly it. This PR:

removes "inStoreSinceDate" and associated code to pull the data from GitHub via GraphQL
ditches fields not used by the current POC from "summary" form of the apps
moves "updated at" field to /updated_at endpoint
changes "new apps" and its RSS feed to work based on whether app-id existed before in the database
removes /apps endpoint completely as I want to go away from "custom" data formats
backports some bug fixes that landed in the v1 branch

It's mostly a starting point for adding new endpoints. From the missing pieces as of now, the main problem is that
none of the endpoints returns a list of all available IDs. This is probably used by next.js so we'll need to restore
it somewhere.

Yeah, production uses the v1 branch.

Yeah, production uses the v1 branch.


Setup project to measure library performance.

Before trying different data structures it is important to first start to measure speed and memory consumption.

Added criterion package for benchmarking with some documentation.


Webpack config

Can you please also provide a webpack expample config? I can't get it to work with webpack.

It is just a preprocessor. Try to see how to setup Svelte's preprocessors in webpack configs.
I don't touch this package for a long time, and didn't test it with webpack.


add: URL docs to Smartlead Object Metadata

#926  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Cobalt0s and the rest of your teammates on  Graphite


Swift

I would love to use this, but is there a swift version?

Yep, it's here

awesome thanks, so do I just drag that file into my project?


RC5 distributions contain web.x.config

There is a packaging issue in RC5 where web.debug.config and web.release.config have somehow managed to find their way into the zip file.

Fixed in PR #5297


Use ImagerPixelSpacing when PixelSpacing is missing

Some modalities do not populate PixelSpacing (x00280030) in which case tools such as length show 'pixels' instead of 'mm'
In these cases is may be better to (instead of showing pixels) use ImagerPixelSpacing ('x00181164') if available.
We do that in our application however some may not desire that so maybe it should be configurable ?
See further info on those tags here - http://gdcm.sourceforge.net/wiki/index.php/Imager_Pixel_Spacing under "ImagerPixelSpacing to PixelSpacing"

FYI what we're doing here is:
if (!dataSet.elements['x00280030']) dataSet.elements['x00280030'] = dataSet.elements['x00181164'];

It's an interesting problem. There are a decent number of tags that can influence how measurements are interpreted. We touched on it a bit in an ultrasound issue a while back.
The viewer I work in has a custom metaDataProvider that will set pixelSpacing to the "highest priority" tag. Ultrasound specific tools use metadata from Ultrasound region tag(s).
Arguably, that's not the best place for the logic to live. We chose it because it's the easiest location to update and have all tools utilize the correct value. I'd be interested in hearing other arguments, now that we're in a better place to revise tool implementations.

We actually really need US regions as well !
As I understand it you can't just use the values there - they are only relevant within a particular region .. if an US has multiple regions, different annotations (ie lengths) will have different values in mm in the different regions even if they have the same value in pixels.
Ideally also you want to show the regions so that a user does not create an annotation that crosses regions (and if he does show it in pixels).
But all that is a bit off topic to this issue which is specific to ImagerPixelSpacing and PixelSpacing ..
Perhaps you can ask the other core maintainers if they are ok with using ImagerPixelSpacing when PixelSpacing is missing by default ?

Yeah based on the link that @kofifus posted, it seems that falling back from PixelSpacing to ImagerPixelSpacing is fine. We should put that link in the code comments or something though. We also have to be sure that we aren't displaying mm if no values are present. If we don't know anything, we can't default to 1x1, we have to display things in pixels for safety.
Thanks @kofifus for pushing this forward. US regions would be great but that's a significant effort to add. We would have to update pageToPixel etc.

Good question....
In my mind the metadata providers should just faithfully return the metadata, and the consumers should implement any logic like this.
Since I believe it makes sense to also set the cornerstone image's rowPixelSpacing and colPixelSpacing using this same logic (someone please correct me if I am wrong, would ImagerPixelSpacing ever break the way things are displayed?). In that case, what we could do is implement this logic in a function inside createImage, somewhere prior to this line:
https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/src/imageLoader/createImage.js#L120
Currently, it just uses what is in imagePlaneMetadata. Instead, it would check imagePlaneMetadata for a value, and if it's not present, check for ImagerPixelSpacing via the metaDataProvider, and if that is also empty, use null.

Merged: https://github.com/cornerstonejs/cornerstoneWADOImageLoader/pull/261
Will be available in the next release 👍

Updating to indicate we reverted this behavior, and why: https://github.com/cornerstonejs/cornerstoneWADOImageLoader/pull/261#issuecomment-499951878