Adding/Changing tags doesn't work

Really hoping I can get an answer here, because I really like this plugin and am trying to use it for my site.
I tried changing bb code tags as detailed in this documentation, however, it's not working.  When I select text and click my button, it just deletes the text.  When in BB Code view, if I type the code in, or paste it, it remains unparsed.
Here is my setup code:
$('#bio-editor').wysibb({
	buttons: 'bold,italic,underline,strike,|,img,link,|,bullist,numlist,|,fontcolor,fontsize,|,left,center,right,|,quote,code,removeFormat',
	allButtons: {
		strike: {
			transform: {
				'{SELTEXT}': '[strikeout]{SELTEXT}[/strikeout]'
			}
		},
		left: {
			title: 'Left Align',
			buttonText: 'Left',
			transform: {
				'
{SELTEXT}
': '[left]{SELTEXT}[/left]'
			}
		},
		right: {
			title: 'Right Align',
			buttonText: 'Right',
			transform: {
				'
{SELTEXT}
': '[right]{SELTEXT}[/right]'
			}
		},
		center: {
			title: 'Center Align',
			buttonText: 'Center',
			transform: {
				'
{SELTEXT}
': '[center]{SELTEXT}[/center]'
			}
		}
	}
});

What I'm trying to do here is replace the default [justifyleft], [justifycenter], [justifyright] with [left], [center], [right], which are what my forums have been using for years, but I can't tell what I'm doing wrong.
Any help is appreciated.

Never mind, you can close this.  Turns out the phpBB template system was pulling out {SELTEXT} and replacing it with a blank.

Great, let us know if you find any more issues/bugs.


add support for "loose" mode parsing

In many cases there is a need to parse/extract a timestamp from the beginning of a string. If one doesn't know the length of a potential match then it is impossible (or very inefficient) to try different combinations of parsers and/or substrings. I added a flag that allows parsing in a "loose" mode - ie if the parser matches a string prefix fully then return the matched date.

Superseded by #64. Thank you for the contribution.


IW and notebooks on 3.11 swallow exception.add_note()

PEP 678 added in 3.11 allows enriching exceptions with notes. This works in the REPL:
>>> try:
...   raise TypeError('bad type')
... except Exception as e:
...   e.add_note('Add some information')
...   raise
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
TypeError: bad type
Add some information

Entering the same in an IW or Jupyter notebook using a 3.11 kernel, I don't see the note:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Untitled-1.ipynb Cell 1 in 2
      1 try:
----> 2   raise TypeError('bad type')
      3 except Exception as e:
      4   e.add_note('Add some information')

TypeError: bad type

Thanks, I've tried this in Jupyter Lab/Notebook and it does not work there either.
I'm assuming the Python kernel needs to be updated to support this (if it hasn't already been done)
Closing as this isn't an issue wit[h the Jupyter extension (all we do is return the same error message returned by the backend kernel)

By Python kernel, you mean https://github.com/ipython/ipykernel?

Yes

Doesn't look like it's been reported yet.


duphold for MantaDUP(SVTYPE=DUP) are missing, INS are present

Hello @brentp,
Thank you for the awesome tool!  We are trying to use this for SV QC  for different callers on several of our samples.
Bit confused why duphold fields (DHFFC,DHBFC,DHGT,DHSP,DHFC) were missing for all our MantaDUP (seemingly high quals) calls while being present for most of MantaINS calls ?
screen shots are provided below
Thank you
MantaDUP

MantaINS

Hi, what version of duphold are you using? The DUPs should be annotated as well.

Hi @brentp,
Using this https://github.com/brentp/duphold/files/3134909/duphold_debug2.gz currently, after we have had issues with (1. similar errors as pointed here  https://github.com/brentp/duphold/issues/23  and/or setting up DUPHOLD_SAMPLE_NAME and extracting snp/indel bcf from a multisample vcf file for DHGT).
Additionally, for Dels we observe in many of our Manta Calls
DHGTs missing (not sure if this is an error or b-allele freq could NOT be computed (but default would have been DHGT =0:0 in these cases) ?

DHGT present --

Will attempt to run the latest version  to check if there are similar problems.
Thank you!

OK. I Can see what DELs are missing. Please use latest version and let's start from there. I'll get a fix for MantaDEL and we can go from there.

I'd be grateful if you would try this binary (gunzip, chmod+x and run duphold_dev)
duphold_dev.gz

alright, trying the latest and the dev version.
Thanks !

Hi @brentp,

for DUPs we see the following differenced between latest and dev_version (adds DHGT where it was missing in latest).

dev
< 1     115680511       MantaDUP:TANDEM:22504:0:1:0:0:0 C       DUP:TANDEM    500     PASS    END=115681911;SVTYPE=DUP;SVLEN=1400;CIPOS=0,3;CIEND=0,3;HOMLEN=3;HOMSEQ=CAT;GCF=0.51035 GT:FT:GQ:PL:PR:SR:DHFC:DHFFC:DHBFC:DHGT 0/1:PASS:500:550,0,785:36,15:38,11:1.09756:1.09756:1:3,1,0,1,15
latest

1     115680511       MantaDUP:TANDEM:22504:0:1:0:0:0 C       DUP:TANDEM    500     PASS    END=115681911;SVTYPE=DUP;SVLEN=1400;CIPOS=0,3;CIEND=0,3;HOMLEN=3;HOMSEQ=CAT;GCF=0.51035 GT:FT:GQ:PL:PR:SR:DHFC:DHFFC:DHBFC      0/1:PASS:500:550,0,785:36,15:38,11:1.09756:1.09756:1
220c220

dev
< 1     207097299       MantaDUP:TANDEM:2:6254:6255:0:0:0       T       DUP:TANDEM    37      PASS    END=207097842;SVTYPE=DUP;SVLEN=543;SVINSLEN=1;SVINSSEQ=A;GCF=0.496324   GT:FT:GQ:PL:PR:SR:DHFC:DHFFC:DHBFC:DHGT 0/1:PASS:37:87,0,999:43,7:65,7:3.31707:2.72:3.02222:0,4,0,0,13
latest

1     207097299       MantaDUP:TANDEM:2:6254:6255:0:0:0       T       DUP:TANDEM    37      PASS    END=207097842;SVTYPE=DUP;SVLEN=543;SVINSLEN=1;SVINSSEQ=A;GCF=0.496324   GT:FT:GQ:PL:PR:SR:DHFC:DHFFC:DHBFC      0/1:PASS:37:87,0,999:43,7:65,7:3.31707:2.72:3.02222
232c232

for DELs, the latest and dev versions were identical.

DHFC:DHFFC:DHBFC:DHGT records present for MANTA_DUP (dev version)

Shall we use duphold_dev.gz instead the latest ? It seems more comprehensive?
Thanks once again!

yes. go ahead and use it. i'll make a release that's same as that dev version.

Hi @brentp,
Probably we will have to reopen the issue again. Many  DELs are still missing the DHGT annotation  using the latest duphold.

Thanks !

and there are other variants on chr1 that do have DHGT set? if you can provide a single variant test-case, that would really help.
And you're certain you ran the latest version of duphold?

oh. i see. it was now skipping if there were no variants found, but it should write 0's. Can you test this binary and let me know that it resolves?
duphold.gz

Hi @brentp,
Thanks for the changes! The DHGT tag is present for all deletions.

In the context of DELs only, is this the only change between latest duphold and this version which i have used for all my DELs(duphold_debug2.gz) https://github.com/brentp/duphold/issues/23#issuecomment-488311589 ? Sorry I am also very  new to nim
Just wanted to check if we can avoid ReRunning duphold for DELs across all our samples for missing DHGT.
We were using a filter like this earlier downstream -- (FMT/DHGT[0:2] - FMT/DHGT[0:1]) >= 0 || FMT/DHGT[0:1] <= 5) (now maybe use it if DHGT tag exists).
Thanks !

yes, this is the only change. also (shameless plug), considering using slivar for filtering like this.
i'll get a new release out shortly. thanks for following up.

I made a new release that should be identical to the one above.

@brentp , Thanks a lot for quickly resolving the issues !


#90 Set "Content-Type: application/json" header if Content-Type header absent in request.

Added filter that checks request headers. If there is no Content-Type header then will be added  Content-Type : application/json.

looks fine, lets merge


Multi publish

Based on issue #38. It allows:

use :alias with multiple functions
it tries to update provided alias if it already exists

No tests, didn't find them for plugin. Tested on my projects. Hope I didn't overlook something.

Was thinking about additional arguments that can allow fatal in case of create-alias! failure. Then decided not do it, because it complicates usage, adds another burden, ... If anyone uses :publish :alias XX he simply wants to publish with this alias regardless if it exists or not. Can be described in documentation / wiki.

@robertvojta Thanks, I needed this.  There's an ugly shell script which Travis runs, I'll add a line to it in the release branch.

Yeah, I've got crazy scripts like this one too.
#!/bin/bash

deploy() {
    echo "Deploying $1 ..."
    if FN_VERSION=$(lein cljs-lambda deploy $1 :publish :quiet 2>/dev/null | tail -n 1); then
        if [[ -z $FN_VERSION ]]; then
            echo "Can't get function version"
            return 1
        fi
        if [ "$CI" != "true" ]; then
            echo "Skipping aliasing, not CI"
            return 0
        fi

        #
        # By default we don't need alias update, because every published version is aliased
        # with travis build number. But under some circumstances (build restart, ...), build
        # number can be same. Thus we try to update first then create.
        #
        echo "Updating alias $1:$2 with version $FN_VERSION"
        aws lambda update-alias --function-name $1 --name $2 --function-version $FN_VERSION
        if [ $? -eq 0 ]; then
            return 0
        fi
        echo "Creating alias $2:$3 -> $2:$FN_VERSION"
        aws lambda create-alias --function-name $1 --name $2 --function-version $FN_VERSION
        if [ $? -eq 0 ]; then
            return 0
        fi
        echo "Failed to create alias"
        return 1
    fi
    return 1
}

if [ -z "$1" ]; then
    echo "Usage: $0 list-of-functions-to-deploy.txt"
    exit 1
fi

if [ ! -f "$1" ]; then
    echo "File not found: $1"
    exit 1
fi

LAMBDA_ALIAS="build-$TRAVIS_BUILD_NUMBER"
NAMES="$(< "$1")"
for FUNC in $NAMES; do
    deploy $FUNC $LAMBDA_ALIAS || exit 1
done


Webpack build fails with "SassError: Undefined variable" when updating 5.1.3 -> 5.2.0

Prerequisites

[X] I have searched for duplicate or closed issues
[X] I have validated any HTML to avoid common problems
[X] I have read the contributing guidelines

Describe the issue
When updating 5.1.3 -> 5.2.0 our webpack build fails with the following error:
error  in ./assets/scss/app.scss

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined variable.
    ╷
142 │       values: $utilities-border-colors
    │               ^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
  node_modules/bootstrap/scss/_utilities.scss 142:15  @import
  assets/scss/app.scss 14:9                           root stylesheet

That line just imports the utilities @import "~bootstrap/scss/utilities";
Reduced test cases
Don't know how to provide a test case for this as we don`t even use that variable.
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
No response
What version of Bootstrap are you using?
5.2.0

Thanks for reporting this issue @gndk. There is a new _map.scss in v5.2.0. Don't have the details regarding your Webpack build but you probably just need to @import "~bootstrap/scss/maps"; (that's where $utilities-border-colors is defined) before @import "~bootstrap/scss/utilities";.

Thanks for the quick reply @julien-deramond ! That did the trick 👍. I only looked at the patch notes in the GitHub release, so I completely missed that. Will remember to check the migration page more in the future 🙂

Hello, I have this problem, how can I solve it? @gndk @julien-deramond
https://github.com/svelte-add/svelte-add/issues/222

@turkic-dev: It is important to load the modules in the exact same order as in node_modules/bootstrap/scss/bootstrap.scss
Also, the following modules must be loaded
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/maps";
@import "~bootstrap/scss/mixins";
@import "~bootstrap/scss/utilities";
@import "~bootstrap/scss/helpers";
@import "~bootstrap/scss/utilities/api";

@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
use of the ~ is bad practice.  Unless you show as I always do, you will generate errors.  Here is what I always use:
ex:    @import "../node_modules/bootstrap/scss/_variables.scss";
I know there are little shortcuts available -- but why?

Hello, I have this problem, how can I solve it? @gndk @julien-deramond
svelte-add/svelte-add#222

FYI it's been solved in https://github.com/svelte-add/svelte-add/issues/222#issuecomment-1192777356

@turkic-dev: It is important to load the modules in the exact same order as in node_modules/bootstrap/scss/bootstrap.scss Also, the following modules must be loaded
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/maps";
@import "~bootstrap/scss/mixins";
@import "~bootstrap/scss/utilities";
@import "~bootstrap/scss/helpers";
@import "~bootstrap/scss/utilities/api";

The problem was that I did not import 'scss/maps', 'scss/helpers' and 'scss/utilities/api' files

Event fails after adding the map.scss in react project
https://github.com/twbs/bootstrap/issues/36851#issuecomment-1200792342

I know I can just add the import @import "~bootstrap/scss/maps"; in node_modules/bootstrap/scss/_utilities.scss and then it works but this is annoying as I need to repeat it everytime I do a fresh install with npm i. Will this be fixed?

@BearCooder You should not change anything in node_modules, ever. Add @import "~bootstrap/scss/maps"; to your own css instead.

So I understanded it wrong in this thread. But still adding the import @import "~bootstrap/scss/maps"; in node_modules/bootstrap/scss/_utilities.scss resolved the issue that was mentioned at the beginning.
Anyway I got rid of bootstrap, I removed it in my project as it caused to much problems

fgjfgjfgj

Check the Doc at: https://getbootstrap.com/docs/5.2/customize/sass/#importing
Download: https://getbootstrap.com/docs/5.2/getting-started/download/#source-files
From the file: bootstrap-5.2.2/scss/bootstrap.scss
Copy from // scss-docs-start import-stack
Copy to // scss-docs-end import-stack
to your new scss main file and set all the @import ""; to correct path.
Ex:
@import "functions"; -> @import "../../../../../themes/contrib/bootstrap5/dist/bootstrap/5.2.2/scss/functions";

I was having the same issue locally, so I added the @import "~bootstrap/scss/maps"; line to my imports file and it worked locally, however now when I push it out to github it fails the build step:
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
╷
11 │ @import "~bootstrap/scss/maps";
│         ^^^^^^^^^^^^^^^^^^^^^^
╵
resources/sass/app.scss 11:9  root stylesheet
at processResult (/home/runner/work/momentum/momentum/node_modules/webpack/lib/NormalModule.js:758:19)
at /home/runner/work/momentum/momentum/node_modules/webpack/lib/NormalModule.js:860:5
at /home/runner/work/momentum/momentum/node_modules/loader-runner/lib/LoaderRunner.js:400:11
at /home/runner/work/momentum/momentum/node_modules/loader-runner/lib/LoaderRunner.js:252:18
at context.callback (/home/runner/work/momentum/momentum/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
at /home/runner/work/momentum/momentum/node_modules/sass-loader/dist/index.js:54:7
at Function.call$2 (/home/runner/work/momentum/momentum/node_modules/sass/sass.dart.js:95825:16)
at _render_closure1.call$2 (/home/runner/work/momentum/momentum/node_modules/sass/sass.dart.js:83882:12)
at _RootZone.runBinary$3$3 (/home/runner/work/momentum/momentum/node_modules/sass/sass.dart.js:28060:18)
at _FutureListener.handleError$1 (/home/runner/work/momentum/momentum/node_modules/sass/sass.dart.js:26590:21)
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors
Error: Process completed with exit code 1.

yes it's also work for me

I know I can just add the import @import "~bootstrap/scss/maps"; in node_modules/bootstrap/scss/_utilities.scss and then it works but this is annoying as I need to repeat it everytime I do a fresh install with npm i. Will this be fixed?

yes it's also work for me

In the _utilities.css, you can import the maps.
@import "maps";


Automatically Fix Lint Issues in sass/scss Files

Description:
While working on #369 I found that running make lint will lint scss files and output the errors, but not autofix what it finds. All the errors I had were fixable with the change in this PR.
 It seems unlikely that there's something downstream that depends on these errors being outputted.
Note: I did consider adding the fix option to lint-js as well, but wasn't able to get it working immediately and decided that this was useful enough to put up anyway.
To Test

git checkout main
In an scss file of your choosing, add a bunch of newlines at the end to cause linting errors.
make lint
Note that you get lint error output, but the newlines are still there.
git checkout charley/fix-sass-lint-errors
make lint
Note that you don't get lint errors and the newlines disappear.

Before This PR
To lint files:

make lint
Get the output in the terminal.
Fix the output manually (or add the fix: true option to the gulpfile for lint-sass temporarily and rerun make lint).

After this PR
To lint files:

make lint

What is the exit code of the command if it fixes problematic code? My concern is that if continuous integration is checking for lint issues but fixing those without a non-zero exit code, the problems won't be highlighted in the build result (i.e. the build will pass even though there are issues to be addressed).
Typically I prefer a lint task like this to not auto-fix, and provide a separate command or option if someone wants to fix, e.g. in the IdP we have make lintfix.

I would like to continue this, but am not going to get to it for at least two weeks. I'll close for now. Thanks for following up.


SP2016 SPFx deployed webparts not showing in Apps you can add

[ ] Question
[ ] Typo
[?] Bug
[ ] Additional article idea
I have created some webparts for SP2016 using the "<EMAIL_ADDRESS>compiled the webpart (using --ship) uploaded to the package to my app catalog. I now want to add my webpart to a page but when I go to add an app, it does not show up in any of my site collections. I also tried creating a developer site with no luck.
I originally installed the September 2017 update have now updated to October 2017.
Having looked through the ULS logs I cant find any related errors, any advice on where to look to resolve this would be super.
Thanks
Chris

Forgot to mention I have also ensured that users have permissions on both the site collection they are adding the application and the site collection hosting the application catalogue.
I have noticed something strange with the application catalogue though. The column that should have the title "deployed" actually has its resource file name (so it seems that the resource file is missing). I have checked this on my test environment, development environment and production environments and it seems to be consistent (showing the resource file name). I have therefore deleted the app catalogue on my development image and created a new one ... I have the same issue.

Ok for anyone who is interested I finally managed to get this going and I suspect that there is an issue with SharePoint 2016 September 2017 CU (FP2). To make use of the role improvements I installed SharePoint then the Sep 2017 CU then configured SharePoint all the service apps and created the app catalogue deployed the app and tried to add it at site level ... no luck just the before mentioned error (previous post). Here are all the steps I did:
Ok,
I think I have a solution to my problem at least and if true it points to an issue with SharePoint 2016 FP2 (September 2017 CU).
My original installs were as follows:
Install SharePoint 2017
Install FP2
Run the installation wizard setup SharePoint
Configure all the service applications
Configure apps
Create the app catalog
Add the app to the app catalog
Try to add the app site level
… App does not appear to see an error in the ULS :
No matter what I tried I simply could not deploy those applications.
What I did:
Removed SharePoint 2016 and deleted all databases
Install SharePoint 2017
Run the installation wizard setup SharePoint
Configure all the service applications
Configure apps
Create the app catalog
Install FP2
Add the app to the app catalog
Try to add the app site level ….
The app was available
It would be good if someone at Microsoft could test this and confirm that it is an issue or not, in my Quality and Production environments I need to deploy with at least FP1 level to so that I can make use of the multi-roles, so will be testing that this week. Hopefully, it does not cause the same issue as FP2.

Install SharePoint 2017? where did you find it to install?

Typo ... SharePoint 2016,
Also, I found the issue I didn't realise that you must install the "language dependent fixes", I made the assumption that this was only required if you had a language pack installed. However, this is not so.
Once I had installed the language dependent fixes I needed to delete the app catalog and create a new one.

Were you able to deploy the example from https://docs.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-2016-support ?
I have trouble with this one.
Knows any good example to follow?

Is that the HelloWorld one? ... yes, I managed to deploy that one, however, i built it with version 1.0.2 of the SharePoint generator. Apparently, the 1.3.4 one works also but I haven't tried that.

Hello @christopher-walker,
I'm glad the issue is resolved. Thanks for keeping the thread updated with your progress. I'm closing the issue. Feel free to reopen if the original issue comes back.
Thanks


make django-cms play nice with django-multisite

django-multisite is an app that makes it possible to run multiple different domains mapped to different django.contrib.sites.Site with one django process.
It does this through a middleware that dynamically sets settings.SITE_ID.
cms.urls fetches the list of Apphooks at import time and then caches the result in the urls.py module. This is a problem when the SITE_ID changes in a later request.
Current workaround:

create a copy of cms.urls once per site

copy your root urls.py once per site. in it replace the url import for cms.urls with the copy.

add a custom middleware that sets request.urlconf and applyies set_urlconf() per domain

[ ] make a pr for django-multisite for a default implementation of the root_urlconf setting

[ ] make django-cms not rely on SITE_ID at import time. instead it should use the threadlocal site made available by set_urlconf()

[ ] make cms.middleware.utils.ApphookReloadMiddleware work as expected with multiple root urls

This is a great idea! What is the status of this?

@bartmika I'm not sure if anyone is currently working on it. @stefanfoulis how does it look on your end?

@bartmika @FinalAngel I have a great interest in this. I think this would be a godsend considering that my WordPress multisites seem to break anytime there is a major WP update, theme update, or when it just plain feels like it. Massive +1

Based on preliminary work from Stefan we have a live website using django muktisite, I think I can take care of this

Thank you @yakky @stefanfoulis @FinalAngel, this could provide a tremendous benefit for Django-CMS users who already manage a couple Django-CMS sites looking to centralize all the separate prod servers into a single prod server.

@yakky that would be awesome :-) Let me know if you need any info from me about the workaround.

@stefanfoulis any updates? I would love to see this come together, and I know that I'm not the only one :-)

@rodolfomartinez I should be able to push the middleware with a working setup and some rough docs in the next couple of days

@rodolfomartinez have a look at this https://github.com/nephila/djangocms-multisite (repo, packaging etc it's still totally to be defined)
@stefanfoulis @divio/django-cms-core do you think should stay as an addon?

Great job yakky!! I'll take a look at this now.

@yakky if it can be separate, then yes. The less in core the better :)

@FinalAngel agree

closing this as we'll continue on djangocms-multisite


Enforce GOCART_DT == HEARTBEAT_DT to avoid problems in gas phase GOCA…

…RT species
Certain GOCART species do not properly handle the case where GOCART_DT /= HEARTBEAT_DT, so we abort the model if the two timesteps are not the same.  Eventually this should be remedied by updating the code for the problem species.

@mmanyin  isn't this a bit more simple: ASSERT_(abs(cdt-hdt) < 1)? Also, could you please remove the GOCART_DT entry from the AGCM.rc.

@adarmenov   Yes, I like your formulation using abs(),  but I would prefer not using ASSERT until MAPL2.0 which allows for a meaningful message in the SLURM log --  note my comment about  _ASSERT  at the bottom of the edit.  I will edit the clause and re-commit.

@mmanyin you could use raise(123456, 'message'), unless its been deprecated in the newer MAPL versions.

@adarmenov  Thanks for pointing out raise,  that's new to me.  I modified the test to use 0.1 instead of 1, to disallow  differences of 0.999999   for example.   Probably should just have compared NINT(cdt) == NINT(hdt),  but the current formulation should be fine.  Note that I put the check in RUN rather than INITIALIZE,  because the latter was not reporting the stack trace correctly in the SLURM log.

@mmanyin you could use __ raise __(123456, 'message')>, unless its been deprecated in the newer MAPL versions.

I'm going to ping @tclune about this. I don't think that  __raise__ has been removed, but I don't know if it's deprecated in favor of _ASSERT in MAPL 2.0.

Hmm.   I don't recall encountering raise.   I suppose this is meant to be a hybrid between VERIFY (which has no message) and ASSERT which takes a logical.
Sounds useful.   If it is not available, let me know and I'll put it back in.   But probably with a more similar style to VERIFY and ASSERT.    Something like   RAISE_(, )

@adarmenov  and @mathomp4  - the current version catches the problem, and I've included the equivalent  _ASSERT  formulation in comments, for use w/ MAPL2.0 .  If there are no further objections, please review/approve at your convenience.  Thanks!


Add docs for stream concatenation, React-Chatbot, and Stream-Query-Client

Thanks @pwoznic ! I addressed your comments. Please merge this as soon as possible.


ToggleButton with Tooltip and aria-label create duplicate aria-labels

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
This seems to be a new issue with 5.0.  I'm in the process of migrating from v4.
When embedding a Tooltip inside a ToggleButton, and assigning an aria-label to the ToggleButton, the MUI clone process creates two elements with the aria-label applied, leading to tests that return multiple elements with the same accessible label.
Expected Behavior 🤔
When cloning the element, either omit aria-label attribute, or do not apply to the button element.
Steps to Reproduce 🕹
Codesandbox:  https://codesandbox.io/s/toggle-button-tooltip-aria-label-up43j
Steps:
(1) Inspect Button1
(2) You should find that the  has an aria-label of "Button 1" and the  directly underneath it also has aria-label of "Button 1"
Context 🔦
This causes current tests to fail, as getByLabelText() now returns multiple matching elements.  I assume this would be problematic for screen readers.
Your Environment 🌎

`npx @mui/envinfo`
  System:
    OS: Linux 5.10 CentOS Linux 8
  Binaries:
    Node: 14.17.4 - /usr/local/bin/node
    Yarn: Not Found
    npm: 7.20.4 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1
    @emotion/styled: ^11.3.0 => 11.3.0
    @mui/core:  5.0.0-alpha.47
    @mui/icons-material: ^5.0.0 => 5.0.0
    @mui/lab: ^5.0.0-alpha.47 => 5.0.0-alpha.47
    @mui/material: ^5.0.0 => 5.0.0
    @mui/private-theming:  5.0.0
    @mui/styled-engine:  5.0.0
    @mui/styles: ^5.0.0 => 5.0.0
    @mui/system:  5.0.0
    @mui/types:  7.0.0
    @mui/utils:  5.0.0
    @types/react:  17.0.0
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    typescript: ^4.3.2 => 4.4.2

It doesn't look like this bug report has enough info for one of us to reproduce it.
Though this sounds like expected behavior. Since the Tooltip acts like a visual label, it should also be the accessible label. We intentionally try to label the child in 5.x. You don't need to pass an explicit aria-label.
Please provide a CodeSandbox (https://material-ui.com/r/issue-template-latest), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

Hi, @eps1lon, thanks for taking a look at this.  I did provide a codesandbox link.  Was this not enough?
Also, the docs for ToggleButton do say this:

ToggleButton sets aria-pressed="" according to the button state. You should label each button with aria-label.

Try this codesandbox.  I moved it out of a draft folder:  https://codesandbox.io/s/toggle-button-tooltip-aria-label-up43j?file=/src/App.js
The resulting element seems wrong:
Button 1
It was cloned, judging by the data-mui-internal-clone-element attribute, but also copied along the aria-label from ToggleButton.  So, even though I only specify aria-label="Toggle Button 1" in one place (ToggleButton), the resulting HTML shows two elements with aria-label="Toggle Button 1"

The tooltip should wrap the element you want to label, not the child of the element you want to label.
However, the ToggleButtonGroup doesn't work as nice with that. For now I recommend
function TooltipToggleButton(props) {
  const { title, ...other } = props;
  return (
    <Tooltip title={title}>
      <ToggleButton {...other} />
    </Tooltip>
  );
}

export default function App() {
  return (

      <ToggleButtonGroup value="two">
        <TooltipToggleButton title="I'm one" value="one">
          Button 1
        </TooltipToggleButton>
        <TooltipToggleButton title="I'm two" value="two">
          Button 2
        </TooltipToggleButton>
      </ToggleButtonGroup>

  );
}

Closing in favor of https://github.com/mui-org/material-ui/issues/21026


Allow api to be used as a library as well

Hi! I'm working on an integration of Free@Home with Homey here: https://github.com/ZzAve/de.buschjaeger.freeathome
My primary goal is to internalise this library, basically bypassing the ws and/or http interface and jacking in to the functionality of your library directly.
My changes in include:

Expose a run and SystemAccessPoint module in index.ts, allowing for import {SystemAccessPoint} from freeathom-api in dependents
Intodruce a generic 'Subscriber' interface to have a definition of what subscrber should implement.

I'm very happy with your work and I think you did a great job taking over from Stefan!

Thanks. I also had that in mind. Some parts of the library are still a mess but it does what it's supposed to do.
The application class still needs to implement the Subscriber interface. Can you please add a commit for that?
Otherwise it looks good. If you like, you can add some documentation to the README on how to use the API as a library. Otherwise I'll do that in a week or so. My laptop is currently being repaired so I'm a bit limited.

And we also need to export the Configuration class.

Thanks for the quick and on-point review! I have noticed that error handling is still very much tightly connected to the Application class and running the api as a process. I tried some refactoring there.
I'll try to do something with the config as well, although for now I've been using the full config, which works as well (the http, ws, and debug part) aren't used yet.

Thanks. I think we can get this merged. Can you please export the Configuration class in the index.ts file? Otherwise we can't use the library externally as we don't have access to the Configuration class which is mandatory.

This last commit should do the trick, exposing ClientConfiguration

Many thanks, merged!


url映射到controller时，关于HandlerMapping的getHandler（）

遍历Map<RequestBody, HandlerBody>  修改成了通过hash去寻找。

equals & hashCode should be replaced by lombok.

I thought it better than iterate whole methodMap, but your code style is not accepted.
You should use 4 spaces, no more tabs please.

Test wanted


feat(bal-time-input): add new component

A new form component bal-time-input.
For now it does not 100% reflect the figma design due to losing a lot of time with the custom placeholders HH:MM on a native time input.
@Gagne87 to verify this is ok for a first version of this component since we, the BE team, will be the only ones using it for now.
Acceptance Criteria

Design Review by @Gagne87, @clastzoo
Technical Review by @hirsch88, @mladenplaninicic
Style Guide Review @hirsch88, @mladenplaninicic
Visual test done by @hirsch88, @mladenplaninicic, @Gagne87, @clastzoo
Functional test done by @hirsch88, @mladenplaninicic
Browser Testing by @hirsch88, @mladenplaninicic, @Gagne87, @clastzoo

Desktop

Chrome
Edge
Safari
Firefox

Tablet

iPad (Landscape / Portrait)

Mobile

Safari iOS
Chrome Preview

@JasperDeLanghe would be awesome that we jump with : to the next entry part or when we enter a full hour like 20 or 06

From my point of view:

Placeholder should be blue-3
Disabled state: grey-4 for input & grey-5 for placeholder

Active version is ok for me at the moment. We can improve that later on.

@JasperDeLanghe would be awesome that we jump with : to the next entry part or when we enter a full hour like 20 or 06

I finally got around to continuing work on this. @hirsch88, it should already automatically jump to the minute part when entering 2 digits in the hour part. Can you verify?

From my point of view:

Placeholder should be blue-3
Disabled state: grey-4 for input & grey-5 for placeholder

Active version is ok for me at the moment. We can improve that later on.

@Gagne87, since the native time input doesn't have a real "placeholder" (-- are seen as values for the hour and minute parts) I propose the following:

When the input is not focussed, set the text to color blue-3
When the input is focused, set the text to color primary
When the input has a value (both focused and not focused), set the text to color primary

I think this would be as close as possible to how a placeholder behaves.
What do you think?

[ ] Safari looks still weird, but google chrome is fine

@JasperDeLanghe run npm run changeset to create a changes with you changes described for the changelog generation.

[ ] when input is disabled and invalid it is still a bit red inside

https://design-system-m9a71jt37-baloise.vercel.app/?path=/story/components-form-time-input--basic&args=invalid:true;disabled:true

[ ] please remove the prop inverted


Ensure lambda extension in Docker is 1.1.0, version in :latest image is older

I followed instructions to install lambda extension in Docker based lambda:
FROM docker.elastic.co/observability/apm-lambda-extension-x86_64:latest AS lambda-extension
FROM public.ecr.aws/lambda/python:3.8
COPY --from=lambda-extension /opt/elastic-apm-extension /opt/extensions/elastic-apm-extension
I tried using secret APM token from secrets manager, didn't work, error was:
ELASTIC_APM_SECRET_TOKEN or ELASTIC_APM_API_KEY not specified
I closed this repo, recompiled, added new binary to my lambda and it started working. I suspect Docker image:latest in not 1.1.0

@kruskall can you take a look at this please.

Thank you for the report! 😄
version 1.1.0 has been released and I've verified latestis pointing to the1.1.0` tag. I think this can be closed.


stdlib Vec

Fixes #1077
Based on #82
Blocked by:

[x] #1121
[x] #1143

Here are the changes since this was last reviewed:

Expanded the test and moved it to e2e_vm_tests because it is just a script and doesn't need the SDK.
Small update the alloc library to only copy when the copy size is > 0.
Remove all asm blocks from the vec library and replace them with various calls from the alloc the mem libraries. Thanks @AlicanC
Some updates to the various comments to avoid any terminology regarding copy v.s. reference types. These are basically implementation detail in the alloc and the mem libraries now.

Blocked by #2013. @mohammadfawaz maybe re-target this PR onto #2013?


Improved/Up to date French Translation

This pull request didn't trigger Jenkins as its author isn't in the whitelist.
An organization member must perform one of the following:

To have this branch tested by Jenkins, use the "ok to test" command.
To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"


Issues Resolved
Removed the publicly exposed bifrost from nginx configuration
Check List

[ ] New functionality includes tests
[x] All buildkite tests pass
[ ] Full omnibus build and tests in buildkite pass
[ ] All commits have been signed-off for the Developer Certificate of Origin. See https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco
[ ] PR title is a worthy inclusion in the CHANGELOG

Pipeline Information
Adhoc - https://buildkite.com/chef/chef-chef-server-master-omnibus-adhoc/builds/2308
Umbrella - https://buildkite.com/chef/chef-umbrella-master-chef-server/builds/317


Added emoji permission support

Added support for changing the emoji permissions when uploading, and also a new feature, to change/update the permissons of an existing emoji.
I don't know how to explain it better than that.
Fix #1129

Spent some time investigating the endpoint. Confirmed the behaviour of the endpoint, and clarified the description. Made various other requested changes. Any questsions, just shoot.

Hi @H4CKY54CK, thanks for the update! Currently CI is failing in the lint stage as praw/models/reddit/emoji.py is not formatted to black's liking. Here's the CI log that says that. I'm going to take a look at the changes anyway, but CI will have to pass before we can merge.
Thanks!

Should I just change all the mod_only, post_flair, user_only to match the actual attributes post_flair_allowed, user_flair_allowed, mod_flair_only?

I apologize for that last commit. I had a momentary lapse in judgement and I shouldn't have done that. I realized it immediately afterwards. I was too focused on something that I'm not familiar enough with.

Should I just change all the mod_only, post_flair, user_only to match the actual attributes post_flair_allowed, user_flair_allowed, mod_flair_only?

Yes, it's probably good to have PRAW's names match with Reddit's, even though I think mod_only is a better name than its "official" Reddit equivalent.
Also, if Reddit's name is user_flair_allowed, the name user_only seems misleading or even wrong.

I saw your messages yesterday, both at the time they were sent, but I kept getting locked out of my account for too many failed attempts. I kept forgetting to try again, but I still couldn't log in, so I just reset it. I just wanted to let you know that I hear you, and will edit accordingly.

Didn't notice changes before. Uno momento.

@H4CKY54CK I made a PR to address upstrem and merge issues.

Anyhow you need to run tests on the data.

I've got the corrected file on my PC. Meant to upload yesterday, but i encountered an unexpected behaviour with it. I'll be back later today

I'm so forgetful...

dude drop all your commits before 71f77be with a git rebase -i upstream/master

Just FYI I'm making some modifications so that we can get this PR in.

@jarhill0 since you requested changes, please look over the updates I've made. If you like it let's merge it! Thanks for the great work @H4CKY54CK, and the updates along the way @PythonCoderAS.

Thanks @H4CKY54CK for the PR! 🎆


CFY-6006 Retry download without SSL verification on error

In this PR, when an attempt to download a file fails because of an SSL verification problem, a retry will be made with the verification step disabled. Note that this is just a workaround and a final fix will remove this behavior in the future.

The way to fix the problem will be to let the manager download the blueprint file instead of the client as it happened in the 3.4 version. Hence, this PR to workaround the download problem in the client is no longer relevant.


Interfaces renamed to start with initial-I

fixes #104

Also, please rebase with master to load new changes

Closing this PR. Creating new one.

@mejariamol please don't close PRs and create new ones like this. Always update the existing branch. When you close a PR and create a new one, we loose the connectivity of the conversation that happened on the previous PR and we now have multiple PRs linked to the issue.

@niranjan94 actually it was merge conflict occurring each time I commit. So I deleted that fork.

we loose the connectivity of the conversation that happened on the previous PR and we now have multiple PRs linked to the issue.

yes. will take care from next time.


Do you think about use Pydantic for generate swagger?

Probably I will build another package for that, this package should be a like webargs for Flask but utilising pydantic instead of marshmallow :)

so stay tuned :)


silx.gui.plot.PlotWidget.addCurve: Fixed progression in color, linestyle

Checklist:

[ ] The PR title is formatted as: <Module or Topic>: <Action> <Summary> (see contributing guidelines)

From #4133
This PR fixed the way the addCurve requests color and style (examples)
Test code:
from silx.gui.plot import Plot2D
import numpy as np
from PyQt5.QtWidgets import QApplication, QMainWindow

if __name__ == "__main__":
    app = QApplication([])
    mw = QMainWindow()
    plot = Plot2D()

    x = np.linspace(0,10,10)

    y = [x*ii for ii in range(20)]

    for _ in range(20):
        color, style = plot._getColorAndStyle()
        print(f"color index is {plot._colorIndex}, style index is {plot._styleIndex}")
        plot.addCurve(x,y[_], legend=_ ,
                      #color='black',
                      color=color,
                      linestyle=style,
                     # linestyle='-',
                      )

    mw.setCentralWidget(plot)
    mw.show()
    app.exec_()

If a color is requested before to use in the plot (and maybe other plots or markers), it completes the 10 colors of the colormap before changing the linestyle

color index is 1, style index is 0
color index is 2, style index is 0
color index is 3, style index is 0
color index is 4, style index is 0
color index is 5, style index is 0
color index is 6, style index is 0
color index is 7, style index is 0
color index is 8, style index is 0
color index is 9, style index is 0
color index is 0, style index is 1
color index is 1, style index is 1
color index is 2, style index is 1
color index is 3, style index is 1
color index is 4, style index is 1
color index is 5, style index is 1
color index is 6, style index is 1
color index is 7, style index is 1
color index is 8, style index is 1
color index is 9, style index is 1
color index is 0, style index is 2

Before the PR, addCurve request the color again (not to be used) but advances +1, so the colormap finish after 5 iterations:

color index is 1, style index is 0
color index is 3, style index is 0
color index is 5, style index is 0
color index is 7, style index is 0
color index is 9, style index is 0
color index is 1, style index is 1
color index is 3, style index is 1
color index is 5, style index is 1
color index is 7, style index is 1
color index is 9, style index is 1
color index is 1, style index is 2
color index is 3, style index is 2
color index is 5, style index is 2
color index is 7, style index is 2
color index is 9, style index is 2
color index is 1, style index is 3
color index is 3, style index is 3
color index is 5, style index is 3
color index is 7, style index is 3
color index is 9, style index is 3

Now, since there is a method -_getStyle, decoupled from color, if a color ('black') is passed to addCurve, it will add +1 to the linestyle index.

color index is 0, style index is 0
color index is 0, style index is 1
color index is 0, style index is 2
color index is 0, style index is 3
color index is 0, style index is 0
color index is 0, style index is 1
color index is 0, style index is 2
color index is 0, style index is 3
color index is 0, style index is 0
color index is 0, style index is 1
color index is 0, style index is 2
color index is 0, style index is 3
color index is 0, style index is 0
color index is 0, style index is 1
color index is 0, style index is 2
color index is 0, style index is 3
color index is 0, style index is 0
color index is 0, style index is 1
color index is 0, style index is 2
color index is 0, style index is 3

Before the PR, it waits 10 color indexes to change the style:

color index is 0, style index is 0
color index is 1, style index is 0
color index is 2, style index is 0
color index is 3, style index is 0
color index is 4, style index is 0
color index is 5, style index is 0
color index is 6, style index is 0
color index is 7, style index is 0
color index is 8, style index is 0
color index is 9, style index is 0
color index is 0, style index is 1
color index is 1, style index is 1
color index is 2, style index is 1
color index is 3, style index is 1
color index is 4, style index is 1
color index is 5, style index is 1
color index is 6, style index is 1
color index is 7, style index is 1
color index is 8, style index is 1
color index is 9, style index is 1

closes #4133

Thanks for the PR!
I think the rotation of the color and style should be handled differently between the 3 cases:

no color nor linestyle
only color
only linestyle

This code
from silx import sx
w = sx.plot()

w.addCurve([1, 2], [0, 1], legend="1")
w.addCurve([1, 2], [0, 2], legend="2")
w.addCurve([1, 2], [0, 3], legend="3", color="black")
w.addCurve([1, 2], [0, 4], legend="4")

displays:

So passing only the color rotate the linestyle.
I would propose the following behavior:

no color nor linestyle: rotate color and style as it is currently done
only color: use - linestyle all the time or eventually rotate linestyle but independently from the other cases
only linestyle: rotate color. To me it is OK to rotate with the "no color nor linestyle" case. A smarter implementation could check what (color, linestyle) is already used an avoid those... but it sounds to complicated to me. An other option could be to always use the same color in this case (e.g., black) to have a similar behavior as the "only color" case with always the same linestyle, but as a user I would expect the colors to rotate...

What do you think?

Also, we need to keep the behavior as compatible as possible in order to limit unexpected changes for application using it.

The way I did it:

If no color and style is provided, rotate both with the same method (_getColorAndStyle) as before
If color provided, it rotates the style (only 4 styles available) After four curves, it uses the same color-style
If style is provided, it rotates the color. After 10 curves, it takes the same color-style
If both are provided, it uses it but it does not request again (that was the reason I opened the issue).

I think this is the logical way, if the user provides a constant color and style, (s)he is aware that eventually the color-style is going to be duplicated.

if the user provides a constant color and style, (s)he is aware that eventually the color-style is going to be duplicated.

Agreed.
To me the key issue is that if both color and style are provided, it should not rotate the default.
Now when changing this, we have to keep an eye on providing a similar behavior for backward compatibility at the same time as improving this behavior.
The fact that adding a curve with a color rotates the style for the next curve without color (see code in https://github.com/silx-kit/silx/pull/4138#issuecomment-2176415182) sounds hard to understand without knowing the internals, thus my previous propositions reorganised here:

If no color and style is provided, rotate both with the same method (_getColorAndStyle) as before
If both are provided, it uses it but it does not request them again (that was the reason I opened the issue).

Agreed.
Regarding the remaining cases:

If color provided:
If the styles rotates there, it should not interfere with the " no color and style is provided".
I'm in favor of always using a solid line style here, because rotating the style would mean keeping a record of which style was last used for which color (not worth it IMO).

If style is provided, it rotates the color. After 10 curves, it takes the same color-style
OK for me, and I would use _getColorAndStyle
@axelboc suggested using the previously used default color (i.e. take the color but do not rotate) unless the current default style is the same, and in this case do a rotation.

Anyone has comments on this discussion?

Ok, yes, I fully agree, especially because it's keeping the same behavior as before the PR

I think this way it stays it as similar as before but solving the index bug and the rotating style discussion

If color is provided, use that color and the current linestyle
Any other situation proceeds the same way as before, rotating both color and style

perfect, thanks


Flutter framework null safety migration

This tracks the migration of the Flutter framework code itself.
cc @a14n @Hixie

@a14n My understanding is that you will be primary owner of this work.  We'll be doing exploratory ports of packages over the next few weeks to get ready for this.  Once we're ready to go with this, my understanding is that the process will look something like the following:

The core packages that the framework depends on need to be ported.

These ports can either be done by landing a ported copy in a branch, or possibly by publishing
versions with the appropriate migration tool hints and migrating against that.  cc @stereotype441

@a14n and possibly others will iteratively work with the migration tool to add sufficient migration hints to the framework code that the migration tool can on demand produce a correctly migrated flutter framework.

Correctly migrated here means no static errors and all tests pass.

We may try to run internal pre-submits with the generated trial port to shake out additional issues before landing.  cc @athomas @davidmorgan
We will validate performance by running the trial port against benchmarks before landing.  cc @athomas @a-siva
When we see functional and performance parity and believe that we are ready to land the port:

The main Dart repo will turn the experiment on by default and increase the minor version (probably to 2.9).
The ported framework (as generated by the migration tool) rolls to Flutter master
The next dev release from Flutter and/or Dart is the first release with Null Safety available to users.
Ported versions of the core set of packages required for a small Flutter app are landed and published.  cc @kevmoo @srawlins

Does this seem reasonable?  Issues or concerns about this?  Things that I'm missing?

Sounds good to me

@a14n , @ferhatb brought up the question of the flutter engine code this morning.  Are you expecting to port that code as well?  Note that there are two versions of it: the native version which is largely API surface that calls into C++, and the web_ui version which is largely written in Dart.  These would need to be exactly in sync at the API level.

@jason-simmons or @cbracken are probably the right people to do engine changes if there's engine changes needed by NNBD.

I hadn't thought about the engine that I'm not used to.

engine changes if there's engine changes needed by NNBD.

I don't know that there are any functional changes required, but the APIs do need to be updated with nullability annotations where needed, and as I understand it web_ui has a fair bit of Dart code in it.  I can file a separate issue for this.

For the web_ui engine, @yjbanov or @ferhatb are probably the right contacts.

Have dart:html, dart:js, and dart:js_util been migrated? Other than that, there shouldn't be anything on the Web side that would prevent the migration (assuming all other dart: libraries are ready).
@leafpetersen Is it possible to migrate one part file at a time? We use them a lot (example).

Have dart:html, dart:js, and dart:js_util been migrated?

@srujzs is working on dart:html.  I think it's close (or maybe functionally complete but pending some optimization?)  dart:js_util is done.

@leafpetersen Is it possible to migrate one part file at a time? We use them a lot (example).

No.  The minimum granularity of the migration is a library.

@leafpetersen Is it possible to migrate one part file at a time? We use them a lot (example).

No. The minimum granularity of the migration is a library.

Ok, at least our tests (web_ui/tests) and dev tools (web_ui/dev, web_ui/tool) are separate libraries. It will still be a bit of a big bang migration. I suggest the following sequence:

Prototype the changes for web_ui/lib in a branch, show that it passes all tests. This can take as long as necessary.
Stop-the-world GC: everyone stops touching code in web_ui/lib and lets the null safety PR land (otherwise it could be a merge conflict nightmare). I'm assuming this part doesn't require more than a day.
Upgrade web_ui/tests, web_ui/dev, and web_ui/tool one library at a time. These are quite fine-grained.

@leafpetersen Is it possible to migrate one part file at a time? We use them a lot (example).

No. The minimum granularity of the migration is a library.

Ok, at least our tests (web_ui/tests) and dev tools (web_ui/dev, web_ui/tool) are separate libraries. It will still be a bit of a big bang migration. I suggest the following sequence:

Prototype the changes for web_ui/lib in a branch, show that it passes all tests. This can take as long as necessary.
Stop-the-world GC: everyone stops touching code in web_ui/lib and lets the null safety PR land (otherwise it could be a merge conflict nightmare). I'm assuming this part doesn't require more than a day.
Upgrade web_ui/tests, web_ui/dev, and web_ui/tool one library at a time. These are quite fine-grained.

I'm more than happy to help out with dart:ui migration in the engine codebase. Most of the Dart code in the engine lives under the lib/ dir, but there are Dart test fixtures that live in a few places in the repo as well.
If you've got a doc that goes over migration steps and tooling, I'm happy to help co-ordinate.

Have dart:html, dart:js, and dart:js_util been migrated?

@srujzs is working on dart:html. I think it's close (or maybe functionally complete but pending some optimization?) dart:js_util is done.

It's the latter, it's been migrated otherwise.

The recommended way to migrate is to add migration tool annotations bit by bit until the tool can migrate the entire library in one go automatically.

If possible, I'd like to follow this workflow, because I think it will make it easier to keep the two API surfaces in sync.  We'll have to validate the the tool works with dart: libraries - there are some oddities in dealing with those.  cc @stereotype441

If you've got a doc that goes over migration steps and tooling, I'm happy to help co-ordinate.

Great, thanks.  We have a doc, but I think it's out of date with the latest tooling changes.  I'll get it up  to date before we start this.

I'm happy to help on the web engine side.

The recommended way to migrate is to add migration tool annotations bit by bit until the tool can migrate the entire library in one go automatically.

Oh, I didn't know that's how the tool worked. That sounds great!

We'll have to validate the the tool works with dart: libraries

The web engine source is a plain Dart package. It is converted to dart:ui by a script. Would we still need dart: support in the migration tool?

Is there a link to documentation about the migration tool and annotations?

Is there a link to documentation about the migration tool and annotations?

@MichaelRFairhurst @stereotype441 @jcollins-g ?

https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/lib/src/edit/nnbd_migration/README.md
This is the most current information we have on how to run the migration tool.  There are a lot of things not fully documented yet and the correct way to run it is still changing -- please reach out to us if you have questions or run into trouble.
I am trying to set up the flutter engine build locally so I can try the tool myself and reproduce any problems you might run into.

@yjbanov
Looking at the engine, I think it will be a prerequisite to somehow graft in the NNBD version of the Dart SDK into the engine build (at the very least, the .dart code itself -- binaries aren't needed to try the tool).    I am still learning your build process and have not yet found the right place to apply some duct tape.

Looking at the engine, I think it will be a prerequisite to somehow graft in the NNBD version of the Dart SDK into the engine build (at the very least, the .dart code itself -- binaries aren't needed to try the tool). I am still learning your build process and have not yet found the right place to apply some duct tape.

@jcollins-g shout if you need help figuring this out -- happy to help in whatever way I can.

I think @vsmenon might know how to get an unforked Dart SDK (at least for DDC) into a flutter engine build.

For DDC testing, I've been updating an unfork CL daily:
https://dart-review.googlesource.com/c/sdk/+/134562
It's messy, but if you want to play with it:
(1) Have a current Flutter engine build.
(2) cd third_party/dart
(3) git cl patch 134562
(4) cd ../..
(5)  ./flutter/tools/gn --unopt --full-dart-sdk &&  ninja -C out/host_debug_unopt
Note, to opt dart:ui back in, you'll also need to undo my CL here to remove the @dart tags:
https://github.com/flutter/engine/commit/0ef67b5e74c6a43915b72fc7ec682deed762206c

OK.  Thanks to @cbracken's help and @vsmenon 's patch, it's possible to run the migration tool on the dart:ui code and get something that looks reasonable.  It's a mess on top of a mess, but the UI comes up and the suggestions don't seem outlandish at first glance.
(1) Do everything in @vsmenon's comment above
(2) Have a current SDK checkout (you will need a version newer than the one in third_party).
(3) Run the migration tool:
 ../out/host_debug_unopt/dart-sdk/bin/dart ~/dart/sdk/sdk/pkg/dartdev/bin/dartdev.dart migrate lib/ui --no-web-preview

The web preview currently only functions for some of the pages (some kind of javascript error I haven't seen yet), but you can try it to see what it looks like by removing the flag.

Thanks, @jcollins-g - your instructions work for me on lib/ui.  The web version of dart:ui is separate, in lib/web_ui, so I run that as well.  Here's the result on both:
https://github.com/flutter/engine/compare/master...vsmenon:vsm-migrate

Yep -- didn't update but worked for me as well, though I didn't run on web_ui :) Thanks!
Question to @vsmenon and @jcollins-g at what version of Dart are we safe to actually land these patches?

Once an unforked version of Dart rolls into Flutter, we should be able to start landing.  At that point, dart:core, etc., will be opted-in, and only dart:ui would be opted out.

Tried building the migrated code.  Blocked on https://github.com/dart-lang/sdk/issues/40834 for now.

https://dart-review.googlesource.com/c/sdk/+/138047/2 has landed.  This means that you can now remove --no-web-preview from the instructions, above, and use the web preview without it crashing right away while browsing.

With @Hixie's help we've created #hackers-nnbd in the flutter discord.  The rest of the NNBD migration tool developers will shortly be joining the server.   @vsmenon @cbracken we'd welcome you to join us there.

The parse error has been fixed.  Here's the current set of engine build errors after migration:
dart-ui-nnbd.txt

I believe that dart:ui is now unblocked for migration.
cc @yjbanov @cbracken @kevmoo @vsmenon

@yjbanov @cbracken - if dart:ui files are ever interpreted as packages (for testing ?), we may need to whitelist those packages here:
https://github.com/dart-lang/sdk/issues/41538

please support  really null safety types, currently int? or double? or ... is fake null safety type like java's generic type.

@leafpetersen shell we close this?

Done, thanks all!


Experiencing possible race condition with pthread_cond_timedwait.

I'm using a combination conditional variables and mutex's for thread synchronization on a shared resource. I seem to be experiencing a race condition, in which a signal on a condition variable is missed, which results in the application logic becoming locked, with every thread is waiting on my interlocking mutex's.
I've attempted to extract the problematic logic out of our existing application, into a minimal reproducible example, which still encounters the issue:
#include <assert.h>
#include <err.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>

#include <debug.h>

// clang-format off
struct trigger_cmd {
  pthread_mutex_t mutex;
  pthread_cond_t cmd_cond;
  pthread_cond_t result_cond;
  enum Type {
    trg_NONE,
    trg_START,
    trg_HALT,
  } trigger;
} core = {
    PTHREAD_MUTEX_INITIALIZER,
    PTHREAD_COND_INITIALIZER,
    PTHREAD_COND_INITIALIZER,
    trg_NONE
};
// clang-format on

pthread_mutex_t serialise = PTHREAD_MUTEX_INITIALIZER;

size_t get_random(size_t min, size_t max) {
  FILE *f = fopen("/dev/urandom", "rb");
  if (f == NULL) {
    printf("Can't get random number\n");
    exit(EXIT_FAILURE);
  }

  size_t buffer;
  int count = fread(&buffer, sizeof(size_t), 1, f);
  fclose(f);
  if (!count) {
    printf("Can't get random number\n");
    exit(EXIT_FAILURE);
  }
  return min + (buffer % max);
}

void busyloop() {
  size_t us = get_random(0, 1000000);
  sinfo("Sleep for %u\n", us);
  usleep(us);
  sinfo("Wake\n");
}

void trigger_start() {
  sinfo("Lock serialise: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_lock(&serialise);
  sinfo("Lock core: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_lock(&core.mutex);

  core.trigger = trg_START;

  sinfo("Signal on cmd: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_cond_signal(&core.cmd_cond);
  sinfo("Wait on result: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_cond_wait(&core.result_cond, &core.mutex);

  sinfo("Unlock core: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_unlock(&core.mutex);
  sinfo("Unlock serialise: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_unlock(&serialise);
}

void trigger_halt() {

  sinfo("Lock serialise: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_lock(&serialise);
  sinfo("Lock core: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_lock(&core.mutex);

  core.trigger = trg_HALT;

  sinfo("Signal on cmd: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_cond_signal(&core.cmd_cond);
  sinfo("Wait on result: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_cond_wait(&core.result_cond, &core.mutex);

  sinfo("Unlock core: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_unlock(&core.mutex);
  sinfo("Unlock serialise: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_unlock(&serialise);
}

static void process_trigger(void) {
  switch (core.trigger) {
  case trg_START:
    busyloop();
    break;
  default:
  case trg_HALT:
    break;
  case trg_NONE:
    return;
  }
  sinfo("Signal on result: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_cond_signal(&core.result_cond);
}

void add_time(struct timespec *expire, size_t milliseconds) {
  assert(milliseconds < 1000);
  const long int billion = 1e9;
  const long int million = 1e6;
  clock_gettime(CLOCK_REALTIME, expire);
  expire->tv_nsec += milliseconds * million;
  if (expire->tv_nsec > billion) {
    expire->tv_sec += 1;
    expire->tv_nsec -= billion;
  }
}

int worker(void) {
  struct timespec expire;
  size_t count = 0;

  sinfo("Lock core: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  pthread_mutex_lock(&core.mutex);
  sinfo("Process inital trigger %d, ser %d\n", core.mutex.pid, serialise.pid);
  process_trigger();

  while (true) {
    // Reset state for all code paths.
    core.trigger = trg_NONE;
    add_time(&expire, 97);

    sinfo("Wait on cmd: core %d, ser %d\n", core.mutex.pid, serialise.pid);
#if 1
    int rc = pthread_cond_timedwait(&core.cmd_cond, &core.mutex, &expire);
#else
    int rc = pthread_cond_wait(&core.cmd_cond, &core.mutex);
#endif
    sinfo("timed wait rd %d, core %d, ser %d\n", rc, core.mutex.pid,
          serialise.pid);
    switch (rc) {
    case 0:
      // Something to do;
      process_trigger();
      count = 0;
      break;

    default:
      count++;
      break;
    }
    if (count > 20) {
      PANIC();
    }
    sinfo("Finished work: core %d, ser %d\n", core.mutex.pid, serialise.pid);
  }

  pthread_cond_destroy(&core.cmd_cond);
  pthread_cond_destroy(&core.result_cond);
  pthread_mutex_unlock(&core.mutex);
  pthread_mutex_destroy(&core.mutex);
  return 0;
}

void *trigger_generator(void *arg) {
  (void)arg;

  // clang-format off
  struct trigger_map {
    const char* name;
    void (*handler)();
  }tm[] = {
    {"start", trigger_start },
    {"halt",  trigger_halt  },
  };
  // clang-format on
  const size_t trigger_count = sizeof(tm) / sizeof(struct trigger_map);

  while (1) {
    size_t index = get_random(0, trigger_count);
    sinfo("trigger %s, core %d, ser %d\n", tm[index].name, core.mutex.pid,
          serialise.pid);
    tm[index].handler();
    usleep(500000);
  }
};

int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;

#if 1
  {
    pthread_mutexattr_t attr;
    pthread_mutexattr_init(&attr);
    pthread_mutexattr_settype(&attr, PTHREAD_PRIO_NONE);
    pthread_mutex_init(&serialise, &attr);
    pthread_mutex_init(&core.mutex, &attr);
    sem_setprotocol(&core.cmd_cond.sem, SEM_PRIO_NONE);
    sem_setprotocol(&core.result_cond.sem, SEM_PRIO_NONE);
  }
#endif

  // Just assume the default priority is 100 and create 3 threads around this median to produce triggers.

  for (int i = 0; i < 3; i++) {
    int priority = 99 + i;
    struct sched_param param = {priority};
    pthread_t id;
    pthread_attr_t attr;
    pthread_attr_init(&attr);
    pthread_attr_setschedparam(&attr, &param);
    if ((pthread_create(&id, &attr, &trigger_generator, NULL)) == 0) {
      pthread_detach(id);
    } else {
      printf("pthread create failed..\n");
      exit(EXIT_FAILURE);
    }
    pthread_attr_destroy(&attr);
  }
  return worker();
}

Here's what I believe to be the signification parts of my defconfig:
CONFIG_ALARM_ARCH=y
CONFIG_ARCH="risc-v"
CONFIG_ARCH_ADDRENV=y
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR=""
CONFIG_ARCH_CHIP="litex"
CONFIG_ARCH_RISCV=y
CONFIG_ARCH_USE_MMU=y
CONFIG_ARCH_USE_S_MODE=y
CONFIG_BOARD_LOOPSPERMSEC=5259
CONFIG_BUILD_KERNEL=y
CONFIG_DEV_URANDOM=y
CONFIG_ONESHOT=y
CONFIG_PRIORITY_INHERITANCE=y
CONFIG_PTHREAD_MUTEX_TYPES=y
CONFIG_SCHED_TICKLESS=y
CONFIG_USEC_PER_TICK=1

Here's a sample of the syslog for this program, around the point where the signal seems to be missed.
[ 6] [  INFO] pthread_cond_clockwait: cond=0x10401038 mutex=0x1040101c abstime=0x1080bf78
[ 6] [  INFO] pthread_cond_clockwait: Give up mutex...
[13] [  INFO] trigger_generator: trigger start, core -1, ser -1
[13] [  INFO] trigger_start: Lock serialise: core -1, ser -1
[13] [  INFO] pthread_mutex_timedlock: mutex=0x10401000
[13] [  INFO] pthread_mutex_timedlock: Returning 0
[13] [  INFO] trigger_start: Lock core: core -1, ser 13
[13] [  INFO] pthread_mutex_timedlock: mutex=0x1040101c
[13] [  INFO] pthread_mutex_timedlock: Returning 0
[13] [  INFO] trigger_start: Signal on cmd: core 13, ser 13
[13] [  INFO] pthread_cond_signal: cond=0x10401038
[13] [  INFO] pthread_cond_signal: sval=-1
[13] [  INFO] pthread_cond_signal: Signalling...
[13] [  INFO] pthread_cond_signal: Returning 0
[13] [  INFO] trigger_start: Wait on result: core 13, ser 13
[13] [  INFO] pthread_cond_wait: cond=0x1040104c mutex=0x1040101c
[13] [  INFO] pthread_cond_wait: Give up mutex / take cond
[ 6] [  INFO] pthread_cond_clockwait: Re-locking...
[ 6] [  INFO] pthread_cond_clockwait: Returning 110
[ 6] [  INFO] worker: timed wait rd 110, core 6, ser 13
[ 6] [  INFO] worker: Finished work: core 6, ser 13
[ 6] [  INFO] worker: Wait on cmd: core 6, ser 13

From this output:

Worker (PID 6) waits on the command condition variable and releases the mutex.
A producer (PID 13) takes the serialise and core mutexes
The producer signals on the command condition variable.
The producer waits on the result condition variable and releases the core mutex.
The worker re-locks the core mutex and returns 110.

At this point, I would have thought pthread_cond_timedwait would return 0, since the signal did occur. However it seems that the signal is delivered either before or after the semaphore (in the command condition variable) is waited on.
There's a few things I've experimented to try and narrow down the issue:

Using the non-standard additions, as outlined in the wiki -> No effect on the outcome.
Changing from pthread_cond_timedwait to pthread_cond_wait. -> Fixes the issue I'm seeing. However, our application requires the usage of timedwait here.
Switching from tickless to ticked scheduler. -> No effect on the outcome.
Running without CONFIG_DEBUG_FEATURES to remove syslog output. -> Same issue, however it happens less often.
Building and running using qemu-rv32 port. -> Haven't been able to reproduce the issue. Although I haven't run it for extended durations.
Removing the non-standard components of my example and building and running with gcc on my Linux host machine. -> Cant reproduce the issue here.
Change the priorities of all threads producing triggers to be below that of the worker thread. -> No difference.

There's a few comments I've found while looking through the source, which makes me think that an assumption is made that the clock_id time source is stopped if interrupts are disabled, which may not be the case on all platforms.
From sched/semaphore/sem_clockwait.c:
int nxsem_clockwait(FAR sem_t *sem, clockid_t clockid,
                    FAR const struct timespec *abstime)
{
  FAR struct tcb_s *rtcb = this_task();
  irqstate_t flags;
  sclock_t ticks;
  int status;
  int ret = ERROR;

  DEBUGASSERT(sem != NULL && abstime != NULL);
  DEBUGASSERT(up_interrupt_context() == false);

  /* We will disable interrupts until we have completed the semaphore
   * wait.  We need to do this (as opposed to just disabling pre-emption)
   * because there could be interrupt handlers that are asynchronously
   * posting semaphores and to prevent race conditions with watchdog
   * timeout.  This is not too bad because interrupts will be re-
   * enabled while we are blocked waiting for the semaphore.
   */

  flags = enter_critical_section();

  /* Try to take the semaphore without waiting. */

  ret = nxsem_trywait(sem);
  if (ret == OK)
    {
      /* We got it! */

      goto out;
    }

From sched/pthread/pthread_condclockwait.c:

      sinfo("Give up mutex...\n");

      /* We must disable pre-emption and interrupts here so that
       * the time stays valid until the wait begins.   This adds
       * complexity because we assure that interrupts and
       * pre-emption are re-enabled correctly.
       */

      sched_lock();
      flags = enter_critical_section();

If that is the case, I could see how the absolute time given to pthread_cond_timedwait may have expired before nxsem_wait is called in nxsem_clockwait. However, I would have through that the scheduler is locked between when the mutex is released and the wait is started, so this shouldn't have any effect.
I've spent a bit of time trying to understand the interactions, but I don't believe I have a full understanding of the implementation in Nuttx to make any feasible progress. At this point I'm not sure if it's an issue with the Litex port, the kernel configuration, or an oversight in our application.
I'd appreciate any assistance tracking down the issue I'm seeing.

@g2gps did you try it on some ARCH more stable like STM32 or ESP32?

Also it would be good if you can try if disabling priority inheritance gives any change to reproduction rate.

Thanks for the feedback. Enabling or disabling priority inheritance doesn't have a noticeable effect on the time until failure.
I did try building and running on an esp32-devkitc and the following configuration.
# CONFIG_ARCH_LEDS is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_ARCH="xtensa"
CONFIG_ARCH_BOARD="esp32-devkitc"
CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_ESP32_DEVKITC=y
CONFIG_ARCH_CHIP="esp32"
CONFIG_ARCH_CHIP_ESP32=y
CONFIG_ARCH_CHIP_ESP32WROVER=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_ASSERTIONS_EXPRESSION=y
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_SCHED=y
CONFIG_DEBUG_SCHED_ERROR=y
CONFIG_DEBUG_SCHED_INFO=y
CONFIG_DEBUG_SCHED_WARN=y
CONFIG_DEBUG_WARN=y
CONFIG_DEV_URANDOM=y
CONFIG_ESP32_UART0=y
CONFIG_FS_PROCFS=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBM=y
CONFIG_MM_REGIONS=3
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_START_DAY=6
CONFIG_START_MONTH=12
CONFIG_START_YEAR=2011
CONFIG_SYSLOG_BUFFER=y
CONFIG_SYSLOG_PROCESSID=y
CONFIG_SYSLOG_PROCESS_NAME=y
CONFIG_SYSTEM_NSH=y
CONFIG_UART0_SERIAL_CONSOLE=y

Same result. After a period of time, the signal is missed.

This is an issue with our application logic and not NuttX.
What's happening is the  cmd_cond  conditional variable is being signaled after the abs time in pthread_cond_timedwait has expired, and before the mutex is relocked this function returns. From the documentation on opengroup, this is the expected behavior of this interface.


Merge develop branch to v2 branch

Codecov Report

Merging #2359 (b23f99e) into v2 (ea1d48c) will decrease coverage by 0.59%.
The diff coverage is 100.00%.

:exclamation: Current head b23f99e differs from pull request most recent head 1f95247. Consider uploading reports for the commit 1f95247 to get more accurate results

@@            Coverage Diff             @@
##               v2    #2359      +/-   ##
==========================================
- Coverage   97.63%   97.03%   -0.60%
==========================================
  Files          56       59       +3
  Lines       10592    11115     +523
==========================================
+ Hits        10341    10785     +444
- Misses        251      330      +79

Impacted Files
Coverage Δ

botocore/__init__.py
100.00% <100.00%> (ø)

botocore/session.py
96.61% <0.00%> (-1.50%)
:arrow_down:

botocore/signers.py
98.14% <0.00%> (-0.40%)
:arrow_down:

botocore/auth.py
97.89% <0.00%> (-0.10%)
:arrow_down:

botocore/client.py
98.64% <0.00%> (-0.09%)
:arrow_down:

botocore/monitoring.py
99.54% <0.00%> (-0.01%)
:arrow_down:

botocore/args.py
100.00% <0.00%> (ø)

botocore/config.py
100.00% <0.00%> (ø)

botocore/loaders.py
99.28% <0.00%> (ø)

botocore/docs/service.py
100.00% <0.00%> (ø)

... and 10 more

Continue to review full report at Codecov.

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


Don't treat full connection pool as error

This diff makes the broker distinguish between the connection pool failing to get an idle connection and failing to create a new connection. Only the latter indicates a problem which refreshing metadata would solve. This diff dramatically reduces metadata refresh rate in Goscribe.

Oh oops I missed that you requested @daisyzhou, well, LGTM and merged. Nice catch!


Text-Based Browser for Waymo Scenarios

scenarios/waymo_motion/waymo_utility.py, a text-based Waymo dataset browser to explore and export the tfRecords to SMARTS dataset.

Since those console images are just text it would be reasonable to format and inline them. (e.g. scenario_1.png, tfrecord_1.png, ...)


how to run with Multi-Clip Rewards ?

I would like to Train the agent capable to turn left, right, go forward. as in the published video https://youtu.be/vppFvq2quQ0?t=332...
Please let me know how to do it.
and is it possible to train agent without mocap data? if I yes how?
Thanks @xbpeng

@xbpeng expecting some help from you !!

Sorry about the late response. We haven't included the code and data for the multi-clip reward. But it shouldn't be very difficult to implement given the existing framework.

get clips of different walking and turning motions
when computing the reward function in cSceneImitate::CalcReward, compute the reward with respect to every motion, and take the max reward

this framework only supports training policies to imitate mocap. But you can change the reward function to not look at the mocap and instead computes the reward using some other objective.

@xbpeng Thank you for ur comment .. I will try it

Sorry about the late response. We haven't included the code and data for the multi-clip reward. But it shouldn't be very difficult to implement given the existing framework.
1. get clips of different walking and turning motions

2. when computing the reward function in cSceneImitate::CalcReward, compute the reward with respect to every motion, and take the max reward

sorry i understood the second point but can you please explain me how to get clips of different turning motions ?? @xbpeng
if any sample implementation is there it would of great help
Thanks

You can find some free mocap clips online. For example http://mocap.cs.cmu.edu/. You'll need to convert the file formats to the format in data/motions/ before using it.

@xbpeng so how you convert the file formats to the format in deepmimic? Since I noticed the coordinates in cmu dataset are somewhat different from that in deepmimic?

@firefox1031 Have a look at this repository.

Sorry about the late response. We haven't included the code and data for the multi-clip reward. But it shouldn't be very difficult to implement given the existing framework.
1. get clips of different walking and turning motions

2. when computing the reward function in cSceneImitate::CalcReward, compute the reward with respect to every motion, and take the max reward

@xbpeng when you calculate the reward with respect to every motion, is the simulated character imitating always a single motion clip during the whole training process?
if you have 4 motion clips (0, 1, 2, 3), does the simulated character always try to imitate the clip 0 and you calculate the reward based on 0, 1, 2 and 3 or do you alternate them somehow during training - e.g., one iteration with clip 0 (and calculate reward), one iteration with clip 1 (and calculate reward) and so on?


alist: add update.nix

Add update.sh to bump version automatically.
https://github.com/AlistGo/alist/releases/tag/v3.40.0

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[x] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Since there is no progress on the issue, a hacky way to update vendorHash is temporarily used here.


bot.cancelAllDialogs() called inside a dialog handler causes a crash

I am trying to leave all the existing dialogs from within an handler; checking if the user really wishes to leave, then I call await bot.cancelAllDialogs() in the handler.
I am getting the following error at runtime:
(node:76242) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'state' of undefined
    at BotkitConversation.<anonymous> (/Users/etienne/Code/botkit-example/node_modules/botkit/lib/conversation.js:617:62)
    at Generator.next (<anonymous>)
    at /Users/etienne/Code/botkit-example/node_modules/botkit/lib/conversation.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/etienne/Code/botkit-example/node_modules/botkit/lib/conversation.js:3:12)
    at BotkitConversation.end (/Users/etienne/Code/botkit-example/node_modules/botkit/lib/conversation.js:614:16)
    at BotkitConversation.<anonymous> (/Users/etienne/Code/botkit-example/node_modules/botkit/lib/conversation.js:558:35)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/etienne/Code/botkit-example/node_modules/botkit/lib/conversation.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)

After some investigation, I found that the end() method in the BotkitConversation class uses dc.activeDialog which has been nulled by cancelAllDialogs(). Hence, the crash.
Here is the code example for reproduction:
const { BotkitConversation } = require('botkit');

module.exports = function(controller) {
    const DIALOG_SUBJECT_ID = 'subject-dialog';
    const DIALOG_INTERRUPT_ID = 'interrupt';

    const subjectDialog = new BotkitConversation(DIALOG_SUBJECT_ID, controller);

    for (let i = 0; i < 30; i++) {
        subjectDialog.ask(`Message #${i}`, [], `conv-${i}`);
    }

    controller.addDialog(subjectDialog);

    const interruptDialog = new BotkitConversation(DIALOG_INTERRUPT_ID, controller);

    interruptDialog.ask({
        text: "This subject is not interesting to you?",
        quick_replies: [
            {
                title: 'Sure',
                payload: 'Sure'
            },
            {
                title: 'Nope',
                payload: 'Nope'
            }
        ]
    }, [{
        pattern: 'Sure',
        handler: async function (response, convo, bot) {
            await bot.say('Let\'s continue then!');
        },
    },{
        pattern: 'Nope',
        handler: async function (response, convo, bot) {
            await bot.say('Let\'s leave then!');
            await bot.cancelAllDialogs();
        },
    }]);

    controller.addDialog(interruptDialog);

    controller.hears('go', ['message', 'direct_message'], async (bot, message) => {
        await bot.beginDialog(DIALOG_SUBJECT_ID);
    });

    controller.hears('not interested', ['message','direct_message'], async (bot, message) => {
        await bot.beginDialog(DIALOG_INTERRUPT_ID);
    });
};

Context:

Botkit version: 4.5.0
Messaging Platform: Web
Node version: v10.16.3
Os: MacOS

@etiennellipse hey, did you find any solution or workaround for this?

It works from a bot.interrupts handler, though. It would seem that it fails because the handler runs inside a dialog, maybe?
        controller.interrupts(async () => true, ["hello"], async (bot: CerebroBotWorker) => {
            await bot.cancelAllDialogs();
            await bot.say("Hey, you are back! Wanna talk?");
        });

should be fixed in v4.6

I don't think it's fixed in v4.6.

@chahat-arora can you  please send some sample code that exhibits this issue? I am not able to reproduce it.


Permission denied when using docker extension for vscode

Describe the bug
When I attempt to use the Docker Extension I get the following error. I am attempting this from a devcontainer instance. It works as expected when using vscode outside of a devcontainer. I have executed the symlink prompt at boot.
Error: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&size=1": dial unix /var/run/docker.sock: connect: permission denied
To Reproduce
No response
Expected behavior
No response
Diagnostic report (required)
OrbStack info:
Version: 0.15.0 (150000)
Commit: c5bda1bf8c660116c880c5f4fae3b7625ff19030 (v0.15.0)
System info:
macOS: 13.5 (22G74)
CPU: arm64, 10 cores
CPU model: Apple M2 Pro
Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2023-07-28T19-39-37.158542Z.zip
Screenshots and additional context (optional)

Can't reproduce with this config:
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-outside-of-docker
{
	"name": "Docker outside of Docker",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	"image": "mcr.microsoft.com/devcontainers/base:bullseye",

	"features": {
		"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
			"version": "latest",
			"enableNonRootDocker": "true",
			"moby": "true"
		}
	},

	// Use this environment variable if you need to bind mount your local source code into a new container.
	"remoteEnv": {
		"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
	}

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Use 'postCreateCommand' to run commands after the container is created.
	// "postCreateCommand": "docker --version",

	// Configure tool-specific properties.
	// "customizations": {},

	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
	// "remoteUser": "root"
}

Can you share a way to reproduce this?

IS this still an issue?

Sorry, I believe it was a vscode issue. It went away after an update.
On Fri, Aug 18, 2023, 13:49 Danny Lin @.***> wrote:

IS this still an issue?
—
Reply to this email directly, view it on GitHub
https://github.com/orbstack/orbstack/issues/497#issuecomment-1683387336,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAQTSKFVGMRDO6XE27Z5GMDXV367HANCNFSM6AAAAAA235ADVE
.
You are receiving this because you authored the thread.Message ID:
@.***>

No worries, thanks for the update.


Docker integration commits

A set of commits required for docker integration. Please see individual commits for more
detailed description.

Updated commit to take care of @mavenugo's comments

Thanks for taking care of the comments. LGTM.


What is the $index parameter purpose here ?

I was looking at how it works to create a PO file from scratch and saw this function:
https://github.com/oscarotero/Gettext/blob/901c9d9c85d3f1fb9415c7ebcc314bd3ad2a4fc1/src/Translations.php#L206
What is the purpose of the $index parameter as it's not used in the function.
Am I missing something ?

This parameter is only to comply with the ArrayAccess interface (https://www.php.net/manual/en/arrayaccess.offsetset.php) used by this class to allow to get/set translations using the array syntax.


Salvage scripts from Dimi and setup repo like we do for TrIAS

I have copied all work done by @DimEvil from:
https://github.com/inbo/data-publication/tree/master/datasets/rl-flanders-unvalidated-checklist
https://github.com/inbo/data-publication/tree/master/datasets/rl-flanders-validated-checklist
... to this branch: https://github.com/inbo/red-list-flanders-checklist/tree/copy-info
I tried to organize it following data science cookie cutter, removing duplicate files. Because R, Notebooks, Exploratory and Refine was used, we still have a lot of scripts and interim data files in that branch, so best not to merge.
We need to set up 2 dwc_mapping.Rmd files (for validated and unvalidated) and incorporate the good parts from the existing scripts.

Not sure we should keep all the interim data for this repo. I'd rather remove it for the moment, redo the scripts and check if there is some interim data to keep. the original repo was created 9 months ago, before a structure was even proposed.

I agree, which is why I parked those data and scripts on a separate branch, as backup for now.


New Safe App: Token Approval Manager

Revision checks

[X] Your Safe App include a manifest.json file at the root with the required data
[X] The app can be loaded as a custom Safe App in the Apps section of https://gnosis-safe.io/app
[X] The app auto-connects to the Safe
[X] You are able to trigger and execute one transaction with a Safe
[X] RPC requests are optimized (not triggering many requests in a very short time period

Note for the last Checkbox: It loads quite a lot of transaction data initially via the gateway-sdk.
I could replace this with fetching Approval-Logs on chain via RPC.
Name/Description
Token Approval Manager

Keep track of the safe’s ERC20 token approvals
Edit / revoke multiple approvals in a single transaction

Type

New addition

Compatible Networks
- Mainnet
- Rinkeby
- xDai

It should actually also be compatible with all other networks. But I only tested these three because I don't have any funds / token approvals on the others.
Code for review
https://github.com/schmanu/token-approval-tracker
IPFS hash/App URL
https://ipfs.infura.io/ipfs/QmZZbZ6Kr2Ek5FCS4o18NmJYhKrpL3deRcsFQEp2epKA1D
Desired date
No specific date.
Screencast
Note: Submitting the tx on rinkeby was slow there. Usually that's fast :shrug:

Hi @schmanu
Great app!!. I was taking a look to the code and doing some testing. It works pretty well. I found some things that can be improved I think. Let discuss them:

In the Safe Apps the order using the SDK/Services availables should be SDK - Gateway - Tx Service. Giving this tip, the fetchTokenInfo function could be substituted with experimental_getBalances from the SDK

Example of usage here
You can get the token information using it and avoid the requests to the transaction service (I think they are duplicated by the way)

Client gateway usage is ok but in the TransactionService.ts file you are doing some validation based on the url you have in the networks (baseApiURL) but later in you use a request based on the gateway (baseApi). Is a little strange and don't know if this is intended.

When doing several approvals/rejections/customizations seems that the first row in the group is the activated one and the others are not activated. But in reality only the group row is telling the truth

Please use the icons property instead the iconPath in the manifest as is the standard one and we started supporting it weeks ago :)

Example here

Would be great to include some Help section about how to use the app. Perhaps in a future iteration but is always welcomed in my opinion as a starting point to the users. The Wallet Connect app can be some inspiration for design :)

Thanks for the submission Manu !!

Hi @yagopv ,
thank you for your feedback. I was looking forward to the first review :)
I have some questions / remarks about some review issues:

I assume experimental__getBalances only fetches the balances and token information for tokens the safe holds a positive balance of.
Approvals may still exist for tokens with 0 balance and these approvals would still be of interest.
Is there an efficient way for safe apps to get on-chain Events? I only know of getLogs(filter) but I read that its a heavy RPC call. I think the best / most intuitive solution would be to fetch the Approval Events instead of going through the entire tx history.

That's wierd. I'll look into this. Could you tell me the steps how you reproduced that? Or if it's okay for you: tell me the wallet address you tested with.

I'll look into this. Some kind of FAQ  in the app would be great to also explain why revoking / changing approvals is important.

Another thing I'd love to add is a filter for 0-approvals because those are already revoked. I think it's good to show them to double check that an approval worked but to scout for non-rejected approvals this filter would be great.
I'll have some time today and tomorrow to fix these issues.

Hey @yagopv,
I just finished a new version which fixes most of your issues:
IPFS URL
Hash: QmbSDy6Vc5zZ9hz15RQf7gUtt3dxjZHVjHjeK6ZShLEMLh
https://ipfs.infura.io/ipfs/QmbSDy6Vc5zZ9hz15RQf7gUtt3dxjZHVjHjeK6ZShLEMLh
Summary

fixes the unnecessary multiple fetching of the token info. I also found a few other optimizations.
new help / faq section
new settings dialog with the option to filter revoked approvals
fixed icon property of manifest

Open / Feedback needed
The app is still using the Safe Services to fetch the approval history / token info because of the mentioned issue in my comment above.
Also I could not reproduce the third issue: Wrong order of approval history.

Note: please remove the usage of the client gateway. The client gateway is exclusively meant to be used by the safe-react project and the safe mobile apps. We will not consider any other projects when deprecating or changing endpoints.

Also I could not reproduce the third issue: Wrong order of approval history.

Is fixed for me in the new version

Ok @schmanu , @dasanra gave me the tip. You can use the safe-core-sdk as it exposes transaction service endpoints

Hi @yagopv,
I reworked the approval fetching. It now uses the eth_getLogs RPC Call as Richard also suggested.
It's way faster, less complicated and more decentralized like this. The gateway sdk dependency was removed in the process.
I published a new version 1.0.2 which should be ready for release.
https://github.com/schmanu/token-approval-tracker/releases/tag/1.0.2
IPFS Hash: QmPzsUC8uxpE4WEGPYxBtVxAKvCA5mKaKE1YmHbZWsnuNR
FYI: In the process of onboarding I will request a review from one or two of the safe web team members

Thanks!
Will take a look as soon as i can

FYI: In the process of onboarding I will request a review from one or two of the safe web team members

Cool!

Ok @schmanu , @dasanra gave me the tip. You can use the safe-core-sdk as it exposes transaction service endpoints and is intended for public usage. Perhaps in the future will be ruled by API keys but still :)

Hey @schmanu
Last step should be using the safe-core-sdk instead the tx service. This is not changed :(

Hey, this is fine on my side @schmanu. Let's our beloved QA @JagoFigueroa take a look

Hola señores! A couple of notes from my side after checking with Yago.
I have been using 2 different versions of the app for testing, the one available on the first message (1.0.0) and 1.1.0.
For my testing safe on gnosis chain (0xfca7Da0a0290D7BcBEcD93bE124756fC9B6F8E6A) I am seeing different approved tokens for v1.0.0 and v1.1.0 of the app. Is this expected?

Also on Rin (0x91dB860c37E83dab0A4A005E209577E64c61EEfA) I approved DAI & USDC tokens on uniswap and approvals are popping just fine on v1.0.0 of the app (even edited one of them) but these approvals are not popping up for me on v1.1.0.

Any idea why this could be?
Cheers!

Hi @JagoFigueroa,
I've looked into it: Ethers seems to have problems with parsing some of the on-chain event data for that rinkeby address:
Error while fetching approval transactions: Error: data out-of-bounds (length=0, offset=32, code=BUFFER_OVERRUN, version=abi/5.5.0)

I will try to build it more error prone by trying to skip data leading to errors or parsing it somehow differently.
In the first case (Gnosis Chain): I think previously the fetching was incomplete and in the new version we fetch all Approval Events properly from on-chain.

Thank you for your awesome work with the app @schmanu !
It has been working nicely for me after the latest changes so all bueno from my side ;)


The atomic masses in the TIP5P water model within the OPLSAA2023 force field.

Thank you very much for your work. I noticed that in the OPLSAA2023 force field file, the atomic mass of the oxygen atom in the TIP5P water model is 32.035, which is the same as the atomic mass of sulfur. Could this be an error in the force field file?

Thank you.  Yes.  This is an error.  Also, I never got around to verifying that the TIP5P water model works with OPLSAA.  I removed the TIP5P example (which only worked with the old 2008 version of OPLSAA).

I am no longer in science, and I no longer have library access to download papers.
I can correct the masses.
If you spot any mistakes in the charges or bond-lengths or angles for these water models, please let me know.

More problems with water in OPLSAA 2023:
I don't see any atom types defined for the TIP3P water model.
There's a "TIP3P/F" water atom type, but it has the wrong charges and LJ parameters.  Furthermore, I can't find a reference for this atom type.
So I'll deleting that atom type and replacing it with TIP3P.

Thanks for  responding. If there are any issues, I will provide timely feedback.

I think I fixed all of the problems with the water models.  (There were a lot of problems.  Not just the mass.)
But more testing is needed.  (This takes a few hours.)
I need to go to bed, but I'll post an update tomorrow with some working TIP5P, TIP3P, SPC/E, and SPC examples.

This issue was resolved with the release of version 2.22.0 today.
Cheers!

nice,( ゜- ゜)つロ,Cheers!