Zuul appending headers from custom filter to context path of downstream services

I have zuul gateway which is also an oauth2.0 resource server.
I want to add a 'x-userid' header from zuul to downstream services. Instead of again validating the token.
I added a custom filter
`
@Override
public Object run() {
RequestContext ctx = RequestContext.getCurrentContext();
if(SecurityContextHolder.getContext() != null) {
 ctx.addZuulRequestHeader("X-SHOPPER-STAGE3", "randomstring");

//   			 SecurityContextHolder.getContext().getAuthentication().getPrincipal().toString());
try {
System.out.println(new ObjectMapper().writeValueAsString(ctx.getZuulRequestHeaders()));
} catch (JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return null;
}
@Override
public boolean shouldFilter() {
return true;
}
@Override
public String filterType() {
return "route";
}
@Override
public int filterOrder() {
return -10000;
}`
GET /om/orders/frontend/lolx HTTP/1.1 Host: localhost:8087 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDY2ODE1NzYsInVzZXJfbmFtZSI6InByYXRlZWtAZ21haWwuY29tIiwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BVVRIRU5USUNBVEVEX1VTRVIiXSwianRpIjoiMjJjYzc1M2ItODVhYS00ZjE5LThlOGQtZDU5YWUzMjc0NzI2IiwiY2xpZW50X2lkIjoiZWRnZSIsInNjb3BlIjpbInBhc3N3b3JkIl19.WWcobtlp5hABtrWcKBTtG67BWWWTCl8CQNgTlZNJOLQ Cache-Control: no-cache
This request results in response below
{   "timestamp":<PHONE_NUMBER>126,   "status": 404,   "error": "Not Found",   "message": "Not Found",   "path": "/orders/frontend/randomstring" }
I dont know why zuul has appended 'randomstring' to context path of downstream service.
This is really weird.
Cant figure out whats wrong.

Ok there was a configuration problem in downstream controller which was causing this too happen.
Closing the issue not related to zuul.


Fix issue 2705 release and debug builds can now coexist

This PR is targeted to solve the issue #2705.
I updated the build.gradle and AndroidManifest.xml file according to these docs and this stackoverflow answer.
The update in the build.gradle file will append .debug in the package name for debug builds and the change in AndroidManifest.xml file was done to avoid the duplicate permission error due to the release app already being installed on the device, using ${applicationId} will dynamically change the package name for permissions.
I have tested the changes locally and installed both the release and debug builds simultaneously on the device successfully here is the gif for the same -

I updated the build.gradle and AndroidManifest.xml file according to these docs and this stackoverflow answer.

And glad you mentioned the references too 👍

Thanks, @jainkuniya,
But will my contribution still be counted if I close this PR?

Thanks @prateek3255 -- this is great!
There's one bit of trouble I'm having as I play with it; and thanks @jainkuniya for the modified icon, as it helps in noticing the difference.
That's that when I run react-native run-android, it goes and builds the app just fine and installs it... and then what it starts up is the release version, not the debug version I've just built.
You can see this in the output:
:app:installDebug
Installing APK 'app-debug.apk' on 'Virtual_Pixel_2_XL_API_27(AVD) - 8.1.0' for app:debug
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 6.74 secs
Running adb -s emulator-5554 reverse tcp:8081 tcp:8081
Starting the app on emulator-5554 (adb -s emulator-5554 shell am start -n com.zulipmobile/com.zulipmobile.MainActivity)...
Starting: Intent { cmp=com.zulipmobile/.MainActivity }

Note it says com.zulipmobile, not com.zulipmobile.debug.
You can also see this because when using #2745, if you hit the switch-app button, the app that was in the foreground has the unmodified icon.
It seems like we need to teach installDebug that it should start the debug version. Would you work out how to do that too, and add that to this PR?

Also, re workflow: I'm happy to leave this PR open, and when it's ready end up merging both it and #2745 .
It'll be the same result in Git either way, because with our review/merge workflow, the individual commits in a PR branch each become commits in master.

Nothing extra needs to be done for launching debug build,
just use react-native run-android --appIdSuffix=debug
:app:installDebug
Installing APK 'app-debug.apk' on 'Samsung Galaxy S5 - 4.4.4 - API 19 - 1080x1920 - 4.4.4' for app:debug
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 39.0 secs
Running adb -s <IP_ADDRESS>:5555 reverse tcp:8081 tcp:8081
error: closed
Could not run adb reverse: Command failed: adb -s <IP_ADDRESS>:5555 reverse tcp:8081 tcp:8081
Starting the app on <IP_ADDRESS>:5555 (adb -s <IP_ADDRESS>:5555 shell am start -n com.zulipmobile.debug/com.zulipmobile.MainActivity)...
Starting: Intent { cmp=com.zulipmobile.debug/com.zulipmobile.MainActivity }
Vishweshs-MacBook-Pro:zulip-mobile vishwesh$

Updating this in the commit  message & in our docs.

Thanks for finding that solution! See discussion in #2745.

This was merged yesterday as 2857d59c8. Thanks again @prateek3255 !

Thanks, 😃 @gnprice can you please also review my PR #2804 for the splash screen issue?


fix(ci): correct the docker image label to match the spec

Adjust to match the spec https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys

cc @Tieske

see #363


Testing Actions.

Signed-off-by: Vedant Shrotria<EMAIL_ADDRESS>
Proposed changes
Summarize your changes here to communicate with the maintainers and make sure to put the link of that issue
Types of changes
What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

[ ] New feature (non-breaking change which adds functionality)
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update (if none of the other choices applies)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[ ] I have read the CONTRIBUTING doc
[ ] I have signed the commit for DCO to be passed.
[ ] Lint and unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[ ] I have added necessary documentation (if appropriate)

Dependency

Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

/run-unit

/run-unit

/run-unit

/run-unit

/run-unit

/run-unit

/run-unit

/run-all

/run-all

/run-all

/run-all

/run-all

/run-unit

/run-unit

/run-unit

/run-unit

/run-all

/run-unit

/run-e2e-login


use miette's new panic hook

This also changes the style of depending on miette to target specific commits. Not only will this make things more predictable, but also you won't have to do some weird cargo update --workspace -p miette any time you want the latest miette.

let's do it - we can improve where this lights up in follow-up changes


Abilities when suited suggestion

When the player is suited who should control the abilities is the Transfured one but in the "context" it's happen by the suited player, that means that if the Transfured player who is "suiting" other player try execute the hypnosis ability it should work but the "executer" is the suited player, Basicaly just like the command execute as Entity [execute a action as the entity]

could there be a method to prohibit abilities that cannot be executed when suited btw

i guess in short you mean that suited players should be able to use abilities


Fix a Quad node mesh data leak

Fix #7303 by following my instructions there (sorry, couldn't wait for a junior to do it..)

Issues like this should be with high priority.


NEW Check that all dependency licenses are permissive

Issue https://github.com/silverstripe/recipe-kitchen-sink/issues/80
I've simply added the checks on the the existing js + phplinting jobs respectively. This means that our CI builds won't take much longer as we don't need to spin up additional jobs to run the license checks, and both these jobs already have most the prerequisites installed i.e. node_modules and the vendor dir already exist.
The npm checker is better in that it will tell you which dependency has a non allowed license, e.g.
Package "<EMAIL_ADDRESS>is licensed under "MIT" which is not permitted by the --onlyAllow flag. Exiting.
I've tested the npm checker again admin, which passed, though not other modules with js deps.
The composer checker will only tell you that a non allowed license was found, though not which dependency that applies to. This is a bit annoying though it should be easy enough to manually track this down.
In terms of how it handles multi licenses composer deps like https://github.com/nette/schema it will look in vendor/composer/installed.json and select the first license it finds. I tested this locally by deleting the "BSD-3-Clause" entry, and then the checker showed that there was a "GPL-2.0-only" license in there. If we run into a situation in the future where this doesn't work as we want it to and it says the module is non-permissive licensed even though there's a permissive license available, we can just deal with it then. For now that I think this is fine as is and both CMS 5 + CMS 6 sink appear to pass.
For both of these we're only checking non-dev dependencies, as those are what are actually used on websites. There are some non-permissive licenses in dev-only requirements, for instance npm itself is listed with an Artistic-2.0 license, however that's obviously not part of our distribution

I've tested the npm checker again admin, which passed, though not other modules with js deps.

We should resolve and license issues we have before merging this. I don't want our builds going red just for license problems while we're trying to do all these breaking changes. We rely on CI green-ness too much for that right now.

The composer checker will only tell you that a non allowed license was found, though not which dependency that applies to.

I think it's worth spending some extra time on this to see if there's a sensible way to sort that out.

In terms of how it handles multi licenses composer deps like https://github.com/nette/schema it will look in vendor/composer/installed.json and select the first license it finds. I tested this locally by deleting the "BSD-3-Clause" entry, and then the checker showed that there was a "GPL-2.0-only" license in there. If we run into a situation in the future where this doesn't work as we want it to and it says the module is non-permissive licensed even though there's a permissive license available, we can just deal with it then.

I don't think that's really suitable. We should be future proofing this now rather than knowing it is likely to cause all our builds to fail (including PR builds and everything else) in the future.
If this was its own CI run that didn't run on PRs and didn't stop all of CI from passing I'd be okay with that, but that future disruption isn't worth accepting to me.
TL;dr
Actually resolving any license issues we have with dependencies is probably worth doing right now, but I don't think this CI is ready for use and I don't think we should prioritise implementing the CI build over the CMS 6 work we already need to do.

I've updated the pull-request to:

Moved the list of allowed licenses to a shared text file
Sort the licenses of composer modules with multiple licenses so that allowed licenses are at the start of the list
Added a list of manually checked npm packages that failed the check when I ran it on other Silverstripe modules with a package.json

I used the following bash script on installs of 5.3 and 6.0 to validate that all modules should now pass in CI
# The following NPM package report as UNKNOWN have been checked they have permissive licenses:
# https://github.com/fitzgen/glob-to-regexp
# https://github.com/codedance/jquery.AreYouSure
EXCLUDE_PACKAGES='@silverstripe/react-injector@0.2.1;cwp-watea-theme@4.0.0;cwp-starter-theme@4.0.0;glob-to-regexp<EMAIL_ADDRESS>ONLY_ALLOW='MIT;MIT-0;ISC;0BSD;BSD-2-Clause;BSD-3-Clause;Apache-2.0;Python-2.0;CC0-1.0;CC-BY-3.0;CC-BY-4.0;Public Domain;Unlicense'
# assumes `npm install -g license-checker` has been run
BASEDIR=$(pwd)
FILES=$(find . | grep package.json | grep -v node_modules)
for FILE in $FILES; do
  # remove trailing "/package.json"
  SUBDIR="${FILE/\/package.json/}"
  DIR="$BASEDIR/$SUBDIR"
  echo "Checking $DIR"
  cd $DIR
  yarn install
  license-checker --production --onlyAllow $ONLY_ALLOW --unknown --out /dev/null
done

Imagine one of our framework deps adopts a GPLv2 dependency for example. Suddenly all modules CI builds will fail, and we may not be able to do anything about it for a substantial amount of time.

Yeah fair point. That would happen on the composer side, though I don't think it should happen on the NPM side as the 'shared' stuff in admin isn't a part of package.json in something like linkfield.
Thinking about this for a couple of seconds it's kind of obvious that the we don't need to do the composer stuff on every build, we can just do it all centrally in a standalone job in recipe-kitchen-sink :-) I'll sort that out

Imagine one of our framework deps adopts a GPLv2 dependency for example. Suddenly all modules CI builds will fail, and we may not be able to do anything about it for a substantial amount of time.

Yeah fair point. That would happen on the composer side, though I don't think it should happen on the NPM side as the 'shared' stuff in admin isn't a part of package.json in something like linkfield.

Even if it doesn't cause the builds for all of our modules to fail, PR CI failing consistently on a module because of an upstream dependency changing its license is not a great maintenance experience. I'd be much more comfortable if all license checking was done in a CI run that's separate from our regular linting/testing CI.

... all license checking was done in a CI run that's separate from our regular linting/testing CI.

So create a new licenses.yml file and a new separate page in rhino to monitor it? I'd be pretty concerned that we'll simply forget to look at that page since it's be all green 99.999% of the time.  Another downside is that it obviously extra work to implement.
Alternatively we could use the kitchen-sink ci.yml run look everything using this script https://github.com/silverstripe/gha-run-tests/pull/44#issuecomment-2550211402.  I've already got a draft PR that does the composer side of this in recipe-kitchen-sink, so this would be pretty easy to implement.  Downside there is that it adds a minute or two of extra time to the sink job, though the job already takes over an hour so it shouldn't be noticeable.
Note that a downside of not having npm + composer in gha-run-tests (i.e. both of the two proposed solutions above) is that any pull-requests that introduce new dependencies that themselves have GPLv2 or sub-dependencies have it, is that they won't block the build and thus tagging an patch releases.
I'll make a little matrix of solutions:

Solution
Visibility to CMS squad
Potential to break builds
Blocks PRs that introduce GPLv2

A. gha-run-tests
Good
Yes
Yes

B. recipe-kitchen-sink
Mid*1
No*2
No

C. licenses.yml
Poor
No
No

*1 lag before it shows in rhino, and lag before we action it
*2 Except sink

I'd be pretty concerned that we'll simply forget to look at that page since it's be all green 99.999% of the time.

We can very easily add a "check the licenses tab" step to the broken CI and merge-ups card that gets automatically generated.
This would have been discussed if this card went through refinement. It's also the approach that https://github.com/silverstripeltd/product-issues/issues/765 recommends (just saw this a few minutes ago while looking for something else)

Another downside is that it obviously extra work to implement.

I think that's balanced by not causing big disruptions as soon as licenses change for our dependencies.

Alternatively we could use the kitchen-sink ci.yml run look everything using this script https://github.com/silverstripe/gha-run-tests/pull/44#issuecomment-2550211402. I've already got a https://github.com/silverstripe/recipe-kitchen-sink/pull/82 that does the composer side of this in recipe-kitchen-sink, so this would be pretty easy to implement. Downside there is that it adds a minute or two of extra time to the sink job, though the job already takes over an hour so it shouldn't be noticeable.

That wouldn't be the end of the world - as you say, it already takes a long time so a couple extra minutes isn't so bad.

Note that a downside of not having npm + composer in gha-run-tests (i.e. both of the two proposed solutions above) is that any pull-requests that introduce new dependencies that themselves have GPLv2 or sub-dependencies with it, is that they won't block the build and thus we could still tag a patch release with a GPLv2 dependency.

We don't add new dependencies in patches, so it'd sit in the new minor branch and we'd notice it before doing the release.
I disagree about "Poor" visibility for having a separate CI run with a new tab in rhino, since as I mentioned above we should just make that part of checking broken builds each week.
That would be my preferred solution as it represents the least disruption to our existing workflows while still providing a weekly check against unexpected changes in licenses.

Oh cool to see that original card again :-)
OK so how about this:

Do both composer + npm on a new standalone licenses.yml workflow on recipe-kitchen-sink which on a weekly cron
Do not add a new screen to rhino
Update the automatically created broken-builds issue to include a link to the recipe-kitchen-sink licenses.yml action screen

That should means it won't interfere with the existing ci.yml workflows and will minimise the amount of extra work required to implement.  There is some risk of a lag before we notice any copyleft licenses sneaking it, though I'd say there is a very low risk of us actually tagging something before we catch it.
Sound alright?

Sounds like a good plan, let's do it


file squeezenet_v1.1.caffemodel has invalid MD5 stored in scenarios

Check MD5: failed for "/home/nikolay/Projects/crowdsource-video-experiments-on-desktop/bin/openscience/data/87f5e203c47544d6/model/squeezenet_v1.1.caffemodel" calculated: "42c581aa4ef6d5978287df3bbb9137f1" stored: "0357e4e11d173c72a01615888826bc8e"
FAIL "Downloading file 'squeezenet_v1.1.caffemodel' from https://github.com/DeepScale/SqueezeNet/blob/master/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel?raw=true into /home/nikolay/Projects/crowdsource-video-experiments-on-desktop/bin/openscience/data/87f5e203c47544d6/model" "MD5 verification failed"

I've checked on a couple of machines: 0357e4e11d173c72a01615888826bc8e is correct.
I am a bit suspicious about  the URL ending with ?raw=true here, though. On some machines, this URL worked fine. On other machines, it resulted in a ~33K file - an obvious failure to download.
I believe the URL should be changed to https://github.com/DeepScale/SqueezeNet/raw/master/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel as in ck-caffe/package/caffemodel-deepscale-squeezenet-1.1/.cm/meta.json:
      "MODEL_URL": "https://github.com/DeepScale/SqueezeNet/raw/master/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel",
      "MODEL_FILE": "squeezenet_v1.1.caffemodel",
      "MODEL_HASH_CALCULATOR": "sha1sum",
      "MODEL_HASH_REF": "3397f026368a45ae236403ccc81cfcbe8ebe1bd0"
    },

Just not quite sure where the change should be made.

I looked into downloaded file, and it only contain text:
You are being redirected.
Obviously, it is not correct file. But this url is in the scenario json-file:
                    {
                        "file_size": 4950080,
                        "filename": "squeezenet_v1.1.caffemodel",
                        "md5": "0357e4e11d173c72a01615888826bc8e",
                        "model_weights": "yes",
                        "path": "data/87f5e203c47544d6/model",
                        "url": "https://github.com/DeepScale/SqueezeNet/blob/master/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel?raw=true"
                    }

and scenario was downloaded from http://cknowledge.org/repo/json.php?  when platform features was:
{
    "cpu": {
        "cpu_abi": "armeabi-v7a",
        "cpu_features": "swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt",
        "max_freq": {
            "0": 1300,
            "1": 1300,
            "2": 1300,
            "3": 1300,
            "4": 1900,
            "5": 1900,
            "6": 1900,
            "7": 1900
        },
        "name": "Samsung EXYNOS5433",
        "num_proc": "8",
        "sub_name": ""
    },
    "cpu_uid": "16270e7f2844ab79",
    "cpu_uoa": "16270e7f2844ab79",
    "gpu": {
        "name": "ARM Mali-T760",
        "vendor": "ARM"
    },
    "gpu_misc": {
        "opencl_lib_present": "no"
    },
    "gpu_uid": "8ea3d7446e912b92",
    "gpu_uoa": "8ea3d7446e912b92",
    "os": {
        "bits": "32",
        "name": "Android 5.0.1",
        "name_long": "Linux version 3.10.9-4841555 (dpi@SWDD3004) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Wed May 6 15:15:31 KST 2015",
        "name_short": "Linux version 3.10.9"
    },
    "os_uid": "382cae4a2e82853d",
    "os_uoa": "382cae4a2e82853d",
    "platform": {
        "model": "SM-N910C",
        "name": "SAMSUNG SM-N910C",
        "vendor": "SAMSUNG"
    },
    "platform_uid": "1924152a7004ec09",
    "platform_uoa": "1924152a7004ec09"
}

One more observation: when I tried to get scenario file with empty platform features ({}) it was downloaded anyway, but scenarios were different than when platform features were filled.

Not actual due to changed app algorithm - no repositories are not used anymore


Fix leadership code

I believe it was crashing because of the nil record.EventRecorder; doing
this properly(?) makes you chase about 5 structures that need to be
filled out.
Fixes #57

[ Quoting<EMAIL_ADDRESS>in "Re: [google/metallb] Fix leadership..." ]

danderson requested changes on this pull request.

@@ -201,7 +201,7 @@ func main() {
if err != nil {
glog.Fatalf("Error setting up leader election: %s", err)
}

go func() { le.Run() }()

le.Run()

This looks like it changes the semantics to block before client.Run(), so the controller never starts executing. Are you sure?

No, I'm not sure. But is seems such an odd API to export if I have to start it
within a goroutine...
I haven't run this in a cluster, yet.

Reverted le.Run() change. PTAL


Review is getting stuck after few sentences

It seems like it's starting the review, but after 2/3 sentences it continue with loading and stops generating text

I'm having the same issue, and the console of the popup window shows an error:
Uncaught (in promise) SyntaxError: Unexpected non-whitespace character after JSON at position 4
    at JSON.parse (<anonymous>)

I'm having the same issue. 😔 This is an awesome extension though! Just gotta get the bugs like this one worked out and it will be even better!


Is it possible to get data based on "website_id" rather that "store_id" in magento platform.

Problem:
I want to get data using website_id rather than store_id, is that possible?

@gopalvirat great question!
Right now this is possible with code changes, and in the future we can make it part of the configuration.
Are you using the main master branch to extract the data, or one of the pull request branches?
If you are using the master branch, you can change the filters we use to fetch this data here:
Customer: https://github.com/Shopify/shopify_transporter/blob/master/lib/shopify_transporter/exporters/magento/customer_exporter.rb#L35
Order: https://github.com/Shopify/shopify_transporter/blob/master/lib/shopify_transporter/exporters/magento/order_exporter.rb#L37
You can change item to anything you need:
              item: {
                key: 'website_id',
                value: 1,
              },

We are thinking of removing the store_id filter and fetching all data - will this work better for your use case?

Thanks @gopalvirat!
Are you trying to get all the customers and orders, regardless of the website_id/store_id? Or are you trying to export customers for different websites and stores one at a time?
We're going to make the default export all customers and orders, regardless of the stores. You can see how to do this in the code in this pull request: https://github.com/Shopify/shopify_transporter/pull/31/files

@gopalvirat we have removed any sort of store_id and website_id filtering, and extract all data in the newest release. Please let us know if this is not ideal or if you run into any other issues with this.


[core] Add an option to exclude platforms

There are 2 options to select a platform:

--select-current-platform
select-platform

However there's no way to exclude a platform.
cc: @ebullient

Released in v1.4.0 -> https://github.com/jreleaser/jreleaser/releases/tag/v1.4.0


Create installation instructions

how to:

clone the project
set up environment variables and secrets
open firewall ports and services

Close this issue with commit 7316521


What is the right way to stop the worker?

For a simple example like the following, what is the right way to exit the program?  I tried stop() at the end and it didn't seem to do anything.
worker.on("ready", function() {
    var i, len, msg, ref;
    ref = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
    for (i = 0, len = ref.length; i < len; i++) {
        msg = ref[i];
        console.log('SEND', msg);
        worker.send(msg);
    }
});

just call .stop().
https://github.com/mpneuried/rsmq-worker#stop

That's what I thought too.  Here's what I tried, but the script didn't stop.  Am I missing something?
worker.start();
console.log('stop?');
worker.stop();

OK, now i can understand your need.
You want your script to end after the .stop(), right?
That was not the intension of .stop().
So i added a .quit() method with version 0.4.2.
Here's an extract of the changed docs:

.stop()
Just stop the receive interval.
This will not cut the connection to rsmq/redis.
If you want you script to end call .quit()
Return
( Self ): The instance itself for chaining.

.quit()
Stop the worker and close the connection.
After this it's no longer possible to reuse the worker-instance.
It's just intended to kill all timers and connections so your script will end.


Jet fixes3

Codecov Report

Merging #68 (e911212) into master (67745d1) will increase coverage by 0.39%.
The diff coverage is 72.22%.

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   78.20%   78.60%   +0.39%
==========================================
  Files          15       15
  Lines        2216     2061     -155
==========================================
- Hits         1733     1620     -113
+ Misses        483      441      -42

Impacted Files
Coverage Δ

src/classical_register.jl
31.57% <55.55%> (+28.54%)
:arrow_up:

src/symbolic_cliffords.jl
84.61% <75.00%> (+2.38%)
:arrow_up:

src/experimental/NoisyCircuits.jl
26.70% <100.00%> (-1.11%)
:arrow_down:

src/project_trace_reset.jl
92.33% <100.00%> (-0.33%)
:arrow_down:

src/precompiles.jl
0.00% <0.00%> (-5.89%)
:arrow_down:

src/enumeration.jl
96.93% <0.00%> (-0.31%)
:arrow_down:

src/graphs.jl
100.00% <0.00%> (ø)

src/entanglement.jl
100.00% <0.00%> (ø)

... and 8 more


Does it matter what UI thread is used?

The documentation states:  "You can only access the clipboard when the calling application is in focus on the UI thread"
Our app has secondary windows and hence multiple UI threads.  If one of our windows is in focus (activated), does it matter which UI thread the static Clipboard methods are called from?

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

ID: 100fb5ed-12d9-c09f-1820-02521ec76f8b
Version Independent ID: 57d08ba1-0df1-1345-8009-641f40f9713a
Content: Clipboard Class (Windows.ApplicationModel.DataTransfer) - UWP app developer
Content Source: https://cpubwin.visualstudio.com/DefaultCollection/windows-uwp/_git/winrt-api-build?path=%2fwinrt-api-build%2fwindows.applicationmodel.datatransfer.clipboard.yml&version=GBlive&_a=contents
Product: windows
Git Login: wdg-dev-content
Microsoft Alias: wdg-dev-content

Thanks for taking the time to let us know about this and I sincerely apologize for the delayed response. This GitHub repo is specifically for reporting documentation bugs. For technical questions like this, please see the community of experts and Microsoft Engineers over at Microsoft Q&A.
I'm marking this issue as closed now, but please feel free to reopen it if you have more information that indicates a real doc bug here. Thanks again!


Translate d3.svg.brush code to d3-brush?

Trying out the version of this library pushed to npm yesterday. My code, like most d3 brush code to control the time axis of a chart, looks more or less like this:
var timeScale = d3.time.scale()...
var brush = d3.svg.brush()
    .x(timeScale)
    .on("brush", brushed);

There doesn't seem to be an x(scale) method on brush anymore. Is there an example anywhere?
My actual code is here.

I’m still working on it. I’ll post examples and documentation soon. Please be patient.

Any example posted on this? Any example two dimensional brush not with pixel value instead x y values??


sidebar.autoCollapse: true is not working

I want the sidebar to open only 1 level at a time, followed the documentation & applied the setting via theme.config.js file. But I keep getting an error in the console Unrecognized key(s) in object: 'autoCollapse'. Path: "sidebar.
Not sure what is missing or if this functionality has been disabled. My defaultMenuCollapseLevel setting is set to 1

It was not released, try now to install latest nextra


Upgrade to ionic v1.0.0-rc.5

If it is ok, please create a tag.
Tested locally without errors.

:+1:


refactor(fuzz): Reject invalid UTF-8 data

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 67.486%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
3707

Relevant Lines:
5493

💛  - Coveralls


Error in ESTIMATEONLY

The document has "ESTIMATE ONLY" (with  a space) and the command requires ESTIMATEONLY (no space).

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

ID: f81ceda7-f086-be93-7213-affd26e8aa23
Version Independent ID: 36dd40d5-21c3-eb68-a51b-7e9977d61d73
Content: DBCC CHECKALLOC (Transact-SQL) - SQL Server
Content Source: docs/t-sql/database-console-commands/dbcc-checkalloc-transact-sql.md
Product: sql
Technology: t-sql
GitHub Login: @pmasl
Microsoft Alias: umajay

Addressed with PR #12882

@ssg-randy-knight -- thank you for your feedback.  We have updated the documentation and it should be live by tomorrow.
@pmasl -- thank you for creating PR 12882.  I have signed off on it and it is now merged.


null I/flutter ( 8097): 'package:flutter/src/widgets/text.dart': Failed assertion: line 253 pos 10: 'data != null': A non-null String must be provided to a Text widget.

Steps to Reproduce

...
...
...

Logs

I think its pretty clear from the message, you have passed null as value to a Textwidget.
For more help please ask at stackoverflow


Class PostRoutingApi.kt does not compile

I am just a Kotlin beginner and try to learn with your examples. I have started with project core-kotlin, and after fixing missing gradle dependencies(see issues/7245), I get these compile errors in class PostRoutingAPI:
e: /home/carlo/develop/baeldung/tutorials/core-kotlin/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt: (10, 5): Class 'posts' is not abstract and does not implement abstract base class member public abstract val bytes: ByteArray? defined in com.baeldung.fuel.PostRoutingAPI e: /home/carlo/develop/baeldung/tutorials/core-kotlin/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt: (12, 5): Class 'comments' is not abstract and does not implement abstract base class member public abstract val bytes: ByteArray? defined in com.baeldung.fuel.PostRoutingAPI e: /home/carlo/develop/baeldung/tutorials/core-kotlin/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt: (38, 27): Type of 'headers' is not a subtype of the overridden property 'public abstract val headers: Map<String, HeaderValues /* = Collection<String> */>? defined in com.github.kittinunf.fuel.util.FuelRouting'
I'm using Kotlin version 1.3.40; Idea 2.19.1; Gradle 5.4.1

@carlolf could you please let us know to which article you are referring to?

Sorry, I do not refer to an article at Baeldung's website. Of course, I read some of them on Kotlin themes. And then wanted to try some code. So I pulled the whole huge tutorial code from and tried to test module "core-kotlin". First things I discovered were missing dependencies in build.gradle. I could resolve them. But class 'PostRoutingAPI' gave compile errors as reported.

@carlolf our modules uses Maven as a primary dependency management framework. Gradle dependencies are added as optional in some article. Could you please check if it will work for you when built with Maven?
Thanks!

Well, this is not a matter of using Gradle or using Maven. The error is an error reported by Kotlin compiler. It says, class PostRoutingAPI is not abstract but has undefined methods from the inherited interface. PostRoutingAPI, as it is on Github, has these inner classes:
class posts(val id: String, override val body: String?): PostRoutingAPI()  class comments(val postId: String, override val body: String?): PostRoutingAPI()
If I implement the classes like this:
`    class Posts(val id: String, override val body: String?): PostRoutingAPI() {
override val bytes: ByteArray?
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
}
class Comments(val postId: String, override val body: String?): PostRoutingAPI() {
    override val bytes: ByteArray?
        get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
}

`
the compiler is quite satisfied.

Please note also: your inner classes are named 'posts' and 'comments'. This should be by convention: 'Posts' and 'Comments'.

Your module is provided with a Gradle build file. So I used this; and of course my IDE IntelliJ also uses it.
To make it useable for Gradle, I declared these dependencies:
`dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile 'com.github.kittinunf.fuel:fuel:2.1.0'
compile 'com.google.code.gson:gson:2.8.5'
compile 'uy.kohesive.injekt:injekt-core:1.16.1'
compile "ch.qos.logback:logback-classic:1.2.1"
testCompile group: 'junit', name: 'junit', version: '4.12'

}`

Thanks for letting us know - we'll update the configuration. Do you need any additional help in here?


Duplicate Packages

In the pyproject.toml file, there are two packages that mean the same thing. Remove one of the packages and import the entirety of our package instead of just a single file in our package.

the project now imports the entire Python package


[url_launcher_linux] file scheme support for canLaunch

Fixes canLaunch implementation for file scheme.
canLaunch incorrectly returned a false response to launchable file scheme URLs.
Fix uses same method than g_app_info_launch_default_for_uri does internally to detect default application for URI.
Fixes #93326
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the relevant style guides and ran the auto-formatter. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[x] I signed the CLA.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[x] I updated CHANGELOG.md to add a description of the change.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Seems like new tests are failing on Cirrus CI.
It is likely that the Cirrus CI system will not be able to open that filepath used on test (file:/) and returns always false.
Unit tests will be rewritten after fix for #88724 is available in stable.
Mockable system apis are needed to be able to mock file check; and I even used a bit of my time to test one approach to implement those (commit), but desided to wait fix for work already done related to #88724

Thanks for the submission! Marking as a draft per the comment above; please remove the draft designation once the tests have been reworked.

Adding @robert-ancell for second review.


Id like for the file name to be appended by date YYYY-MM-DD create date. easier to find similar notes.

          Id like for the file name to be appended by date YYYY-MM-DD create date. easier to find similar notes.

Originally posted by @Kmfernan5 in https://github.com/Superkikim/obsidian-chatgpt-import/issues/1#issuecomment-2101577268

Will be implemented in next release. Settings: With or without prefix ?
Prefix format: YYYY-MM-DD or YYYYMMDD.
Stay posted.


Delete button should display on select of multiple files instead of comma serpate

If user select multiple files at the same time. It need to display separately with delete icon instead if comma sepration. like it is displaying for single file seletion.

I'm looking also for this Feaure!

That's not possible thru Javascript because the browser does not allow you to manipulate the value of the selection. Files selected together have to stay together with this file input approach, according to the html5 spec.
But there are other plugin that use a different approach that will deliver the functionality you need

@digggggggggg Please name of that other plugin, that deliver this functionality without ajax submitting, like this plugin does.

As far as we know that cannot be done with Javascript, period. As @digggggggggg said above, the browser does not provide a way to manipulate the selection of multiple files that were selected together.
Happy to be corrected if we missed anything.
But maybe you shud try something like this... https://blueimp.github.io/jQuery-File-Upload/


adding xanderyzwich to participants.md

Users formatted as bullet list
Note added about ordering
added self

@drkennetz @ericwburden @parhaml
Change has been made to be ordered by first name (oddly enough this did not change the list only the description)


chore(main): release 1.14.2

:robot: I have created a release beep boop
1.14.2 (2024-12-06)
Bug Fixes

first & second action can never be equal when generating unsupported action string (815078b)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v1.14.2
:sunflower:


How to save the QR to the server?

Hi! This is probably a very noob question to ask but how do I save the QR code to my server folder? I've been using the QR library which this was based on but there you would call QRcode::png($data, $filePath . $fileName, QR_ECLEVEL_H, 6, 1); and it would be saved.

Made it work with file_put_contents(), still think it would be nice if this was documented :)

It's already built-in and documented: https://github.com/chillerlan/php-qrcode#qroptions-properties - see: $cachefile.


Type checker: Fixes #791  and #784

Fixes #791  and #784
PR description to follow to help reviewers what's being done in this PR

Fix #784

Unification clean up is not done in this PR, but I have moved to separate modules.


[CRITICAL] [Advanced Approval Workflows] Implement utils that transform data between backend and frontend (convertApprovalWorkflowToPolicyEmployees & convertPolicyEmployeesToApprovalWorkflows functions)

Coming from: #wave-control: advanced approval + workflows polish

Hey! I’m Błażej Kustra from Software Mansion, an expert agency, and I’d like to work on this issue!

@tgolen Functions implemented in this PR aren't used anywhere yet, that's why I think we do not need C+ review for this one.

Same thing for this PR, I added onyx actions for the future PRs but for now these are unused.

Monthly Update

There was no C+ review of this PR and the work has been completed. I will close this out.


How to remove the tags after uninstalling?

I uninstalled the plugin and the tag is still there. The links won't transform back into normal links.

I've removed my account
Cleared the cache

Never mind. I've restarted Obsidian.


chore(SetTheory/Cardinal/Basic): tweak lift simp lemmas

We tag various non-functioning simp lemmas, and deprecate the duplicate lift_umax'.

bors merge


Support Infinite PyDataset

Toy datasets are often generated on the fly, making their effective size infinite. Model.fit() nicely supports this idea by allowing to pass a batch_size and steps_per_epoch parameter. However, we already need both of these in a fully generated PyDataset since we need to return a positive length and return batches from __getitem__. This leads to code like this:
dataset = MyPyDataset(batch_size=128, steps_per_epoch=100)
model.fit(dataset, batch_size=128, steps_per_epoch=100)

which creates redundancy, because the parameters to fit() are ignored, or both must have the same value.
Conceptually, it makes the most sense to pass this information in model.fit(), so I propose two changes to PyDataset:

Allow signalling a dataset of infinite length, e.g. by returning -1 or raising a TypeError like a tf.data.Dataset
Allow fetching dynamically sized batches in __getitem__, e.g. by returning only single items instead of a batch, like a torch.utils.data.Dataset

I would be willing to help out on a pull request for this, but would appreciate some initial pointers and whether these changes could see merging. Thank you.

There are two separate issues here: support for infinite cardinality, and support for dynamically sized batches.
For infinite cardinality support, we can use None to indicate it. We can definitely support it, similar to what we do for infinite tf.data.Dataset instances. If you're able, feel free to open a PR!

Yes, I felt the two issues are similar enough to group them in one issue. Apologies if this is not how you see it.
As for returning None as the length, I feel this is a little risky, since forgetting a return statement also looks like returning None from the outside. This could be an issue for a dataset that has a more complex length computation, such as one they increases in length as training goes on (e.g. experience replay buffers).

Hi @LarsKue ,
Thank you for reporting this.
For item 2., this is already how it works. __getitem__ returns a full batch, and the batch size can be different from batch to batch.
For item 1. I just pushed a change that enables this. You implement the num_batches property and return None to signal an infinite dataset. I understand the concern that if you forget a return clause, you could return None by accident. But weighing this against other options, it seemed relatively less error prone (you could easily do incorrect math with -1).
Note that you can also easily feed a infinite dataset to model.fit() by using a generator.
def generate():
    while True:
        x = ...
        y = ...
        yield x, y

model.fit(generate(), ...)

It's less code than implementing a PyDataset and doesn't require being able to access your data by index. However, it doesn't support multiprocessing / multithreading.


Post release automated changes for chaos releases

Post release automated changes for azure-arm-chaos

API change check
API changes are not detected in this pull request.


Restore test

Restore and update test that was removed from Past PM pages. Will check if the last PM has a link or the copy exsists.
⚠ This repo is Continuously Deployed: make sure you follow the guidance ⚠

Not sure what happened with this but this is now very stale.


AttributeError: 'ResidualCouplingTransformersLayer2' object has no attribute 'remove_weight_norm'

Hi there, I have this error when I want to convert model weight to onnx model.
How can I solve the problem?
Using mel posterior encoder for VITS2
Multi-band iSTFT VITS2
INFO:root:dec.stft.forward_basis is not in the checkpoint
INFO:root:dec.stft.inverse_basis is not in the checkpoint
INFO:root:Loaded checkpoint 'logs/models/G_48000.pth' (iteration 242)
Removing weight norm...
Traceback (most recent call last):
File "onnx_export.py", line 79, in
net_g.flow.remove_weight_norm() # Remove weightnorm in flows - a8d9f74
File "/MB-iSTFT-VITS2/models.py", line 759, in remove_weight_norm
l.remove_weight_norm()
File "/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1269, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'ResidualCouplingTransformersLayer2' object has no attribute 'remove_weight_norm'

From my experience, I will add what I personally encountered.
In requirements.txt you have row with pyopenjtalk==0.2.0. There was a problem for me on env witho building the wheel. I added pyopenjtalk==0.2.0 --no-build-isolation and everything was good.
Also zoneinfo is requid, but the supported version of python is >=3.9, but your app need 3.8.  I had to change several files to "from backports.zoneinfo import zoneinfo" from "import zoneinfo"
Now I'm trying to run inference.ipynb to check the model but there was a problem with error

RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xd . Check the section C-API incompatibility at the Troubleshooting ImportError section at https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility for indications on how to solve this problem .

ImportError                               Traceback (most recent call last)
Cell In[11], line 1
----> 1 get_ipython().run_line_magic('matplotlib', 'inline')
2 import matplotlib.pyplot as plt
3 import IPython.display as ipd
File ~/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py:2456, in InteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)
2454     kwargs['local_ns'] = self.get_local_scope(stack_depth)
2455 with self.builtin_trap:
-> 2456     result = fn(*args, **kwargs)
2458 # The code below prevents the output from being displayed
2459 # when using magics with decorator @output_can_be_silenced
2460 # when the last Python token in the expression is a ';'.
2461 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/.local/lib/python3.9/site-packages/IPython/core/magics/pylab.py:99, in PylabMagics.matplotlib(self, line)
97     print("Available matplotlib backends: %s" % backends_list)
98 else:
---> 99     gui, backend = self.shell.enable_matplotlib(args.gui.lower() if isinstance(args.gui, str) else args.gui)
100     self._show_matplotlib_backend(args.gui, backend)
File ~/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py:3630, in InteractiveShell.enable_matplotlib(self, gui)
3609 def enable_matplotlib(self, gui=None):
3610     """Enable interactive matplotlib and inline figure support.
3611
3612     This takes the following steps:
(...)
3628         display figures inline.
3629     """
-> 3630     from matplotlib_inline.backend_inline import configure_inline_support
3632     from IPython.core import pylabtools as pt
3633     gui, backend = pt.find_gui_and_backend(gui, self.pylab_gui_select)
File ~/.local/lib/python3.9/site-packages/matplotlib_inline/init.py:1
----> 1 from . import backend_inline, config  # noqa
2 version = "0.1.6"  # noqa
File ~/.local/lib/python3.9/site-packages/matplotlib_inline/backend_inline.py:6
1 """A matplotlib backend for publishing figures via display_data"""
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the BSD 3-Clause License.
----> 6 import matplotlib
7 from matplotlib import colors
8 from matplotlib.backends import backend_agg
File ~/.local/lib/python3.9/site-packages/matplotlib/init.py:174
169         if LooseVersion(module.version) < minver:
170             raise ImportError("Matplotlib requires {}>={}; you have {}"
171                               .format(modname, minver, module.version))
--> 174 _check_versions()
177 # The decorator ensures this always returns the same handler (and it is only
178 # attached once).
179 @functools.lru_cache()
180 def _ensure_handler():
File ~/.local/lib/python3.9/site-packages/matplotlib/init.py:159, in _check_versions()
155 def _check_versions():
156
157     # Quickfix to ensure Microsoft Visual C++ redistributable
158     # DLLs are loaded before importing kiwisolver
--> 159     from . import ft2font
161     for modname, minver in [
162             ("cycler", "0.10"),
163             ("dateutil", "2.1"),
(...)
166             ("pyparsing", "2.0.1"),
167     ]:
168         module = importlib.import_module(modname)
ImportError: numpy.core.multiarray failed to import


Also build for Jammy

Field has reached out to ask whether we could also make the COS Proxy available for deployment on jammy. Currently, we only support focal, but I see no reason why we couldn't add another series to the charm.

Closed with #45


Add papercolor theme

Hi, I added a theme papercolor.vim to match this color scheme Paper Color
I used the code of molokai.vim as a base to design this.
:)

looks good!  also, i noticed you already added the airline theme to your theme repo, which makes perfect sense.  thanks.

Do you plan to merge so that other people can still use it without having to install my color scheme?

interesting view point...i was thinking that since you're the author it makes sense for to live under your umbrella, but as you said, others wouldn't be able to use it...

Thanks for merging :)


python310Packages.ring-doorbell: 0.7.7 -> 0.8.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.ring-doorbell is: Python library to communicate with Ring Door Bell
meta.homepage for python310Packages.ring-doorbell is: https://github.com/tchellomello/python-ring-doorbell
meta.changelog for python310Packages.ring-doorbell is: https://github.com/tchellomello/python-ring-doorbell/releases/tag/0.8.0
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.8.0 with grep in /nix/store/sdkjq1cfrbx3svzk8iy7mgv2wzad473q-python3.10-ring-doorbell-0.8.0
found 0.8.0 in filename of file in /nix/store/sdkjq1cfrbx3svzk8iy7mgv2wzad473q-python3.10-ring-doorbell-0.8.0

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

3 total rebuild path(s)

3 package rebuild(s)

First fifty rebuilds by attrpath
home-assistant-component-tests.ring
python310Packages.ring-doorbell
python311Packages.ring-doorbell

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/sdkjq1cfrbx3svzk8iy7mgv2wzad473q-python3.10-ring-doorbell-0.8.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

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

Or:
nix build github:r-ryantm/nixpkgs/71891246f86c3848545c639b860e23c2ccd77567#python310Packages.ring-doorbell

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/sdkjq1cfrbx3svzk8iy7mgv2wzad473q-python3.10-ring-doorbell-0.8.0
ls -la /nix/store/sdkjq1cfrbx3svzk8iy7mgv2wzad473q-python3.10-ring-doorbell-0.8.0/bin

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

3 packages built:

home-assistant-component-tests.ring
python310Packages.ring-doorbell
python311Packages.ring-doorbell

Maintainer pings
cc @graham33 for testing.

It's possible this is a breaking change for Home Assistant: https://github.com/tchellomello/python-ring-doorbell/releases/tag/0.8.0
Add custom exceptions and encapsulate oauth error handling by @sdb9696 in tchellomello/python-ring-doorbell#304 This is a breaking change as consumers who currently handle oauth exceptions directly will need to handle the new exceptions instead
Unfortunately I no longer have Ring doorbells so I can't test it.

Hi Graham, apologies I don’t understand how this repository works and what kind of things you’re merging/checking but to clarify:

This won’t be a breaking change for home assistant because there is a home assistant code change included in the library dependency bump to use the new exception types.
This will be a breaking change for other consumers who currently catch OAuthlib exceptions and will now have to capture ring_doorbell exceptions. Hence the release number increment is minor rather than patch.

Hi Graham, apologies I don’t understand how this repository works and what kind of things you’re merging/checking but to clarify:

This won’t be a breaking change for home assistant because there is a home assistant code change included in the library dependency bump to use the new exception types.
This will be a breaking change for other consumers who currently catch OAuthlib exceptions and will now have to capture ring_doorbell exceptions. Hence the release number increment is minor rather than patch.

Thanks for the info @sdb9696. This repo contains packages for Nix and NixOS, which some people use to manage Home Assistant installations declaratively (not an officially support Home Assistant installation mechanism, but it works well). It sounds like as long as we're up to date on Home Assistant itself (nixpkgs is on 2023.11.2), this should be ok. Thanks!


Fixes for v10

I got this to work with v10. I have not tested with Levels or Perfect Vision, but I did get it working with my Elevated Vision module. It is a great addition to that module! Thanks for coming up with it!
FYI, you can ignore the changes to "manifest" and "download" in the module.json; that was just so I could test it out. For v10, you do need the "relationships", "id", and "compatibility."

I've implemented the changes but couldn't figure out how to leave the manifest changes out so I didn't end up merging this request.


Fix wrong owner being sent to api

Closing this bug as this seems to be an API issue for not correctly mapping of org to repo created
@izrake


svelte adapter build as module

Describe the problem
I have several resources I want to initialize before opening the svelte web app. Things like reading config, connecting to a database, downloading remote assets. Currently these things need to be done in the src/hook.ts file. The logic has to look something like this:
let config = new Config('config.yml')
let database
let initialized = false
export async function handler(request, resolve) {
  if (!initialized) {
    await config.load()
    database = new Database(config.database_path)
    initialized = true
  }
  request.locals.db = database
  request.locals.config = config
  await resolve(request)
}

this is less than ideal because:

fatal errors (e.g. database is invalid) will not stop the app from running
fatal errors are not caught right away
the first page load will be very slow

I am building a local web app, so there are other issues which are possibly specific to that. For instance, there not a good mechanism for parsing command line arguments for a cli sveltekit app. The best we have right now is environment variables, but those are less than ideal because they arent self discoverable with something like --help. Again, you cant get immediate feedback on invalid args either, theres no way to exit the app until at least a request has been made, and even then only using process.exit(1).
Describe the proposed solution
I would like to see an adapter, or ideally a parameter for all adapters to export a module with lifecycle events rather than a process that starts right away. The config might look something like:
const config = {
  // Consult https://github.com/sveltejs/svelte-preprocess
  // for more information about preprocessors
  preprocess: [preprocess({})],

  kit: {
    adapter: adapter({ module: true }),

    // hydrate the <div id="svelte"> element in src/app.html
    target: '#svelte',
  },
}

export default config

this would build the app with the following available:
class SvelteApp {
  // context could map directly to request.locals or to request.locals.context
  async start(context?: any) {}
  async stop() {}
}

Alternatives considered
the alternative is to continue using src/hooks.ts, and relying on process.exit(1) calls to exit on fatal startup errors. This is still not ideal though, since it requires the client hitting an endpoint before the app will exit.
Importance
would make my life easier
Additional Information
I am building a local web app, ideally published to npm, and ran on the command line. I want to be able to give users an interface like:
forager --config <config_file>

For the Node adapter, duplicate of #927.
For other adapters, I don't think stuff you need to start when the process starts is going to be particularly applicable, because you're going to be running on a lambda or something similar.

Closing as a duplicate of the #927


Chrome won't download the Flutter export.

Describe the bug
When I click export on Google Chrome Version 114.0.5735.198 (Official Build) (x86_64) there's a message in the download bar that says "material-theme.zip is dangerous, so Chrome blocked it (Discard)".
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: MacOS Venture 13.4.1 (22F82)
Browser:  Google Chrome Version 114.0.5735.198 (Official Build) (x86_64)
Version:  Google Chrome Version 114.0.5735.198 (Official Build) (x86_64)

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Having the same issue, it is not possible to download the Flutter theme.

exporting Flutter throws error in console

Same problem. Please fix

Hi all, it seems exports are working on Chrome 120.0.6099.130. See if you have any updates for Chrome before attempting to export.
Unfortunately, exports are broken on the latest Firefox, Version 121.0. They fail with error:
Uncaught (in promise) TypeError: module$exports$google3$third_party$javascript$typings$jszip$index is not a constructor
    download https://m3.material.io/_mtb/app.js?version=1670027719620561:13291
app.js:13291:794

This was due to browser settings that would sometimes flag or interfere with the download library we were using.
Downloads are more consistent with our new version, please access it here instead: https://material-foundation.github.io/material-theme-builder/

Thanks! @jwill


Website

Fixes links on the website

Hello @rasbt! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file docs/custom_mkdocs/mkdocs/__main__.py:

Line 33:80: E501 line too long (80 > 79 characters)
Line 35:80: E501 line too long (80 > 79 characters)
Line 41:80: E501 line too long (80 > 79 characters)
Line 42:80: E501 line too long (81 > 79 characters)
Line 43:80: E501 line too long (89 > 79 characters)
Line 45:80: E501 line too long (116 > 79 characters)
Line 47:80: E501 line too long (115 > 79 characters)
Line 53:80: E501 line too long (102 > 79 characters)
Line 54:80: E501 line too long (86 > 79 characters)
Line 56:80: E501 line too long (80 > 79 characters)
Line 95:80: E501 line too long (81 > 79 characters)
Line 98:80: E501 line too long (81 > 79 characters)
Line 99:80: E501 line too long (85 > 79 characters)
Line 100:80: E501 line too long (80 > 79 characters)
Line 102:80: E501 line too long (118 > 79 characters)
Line 114:80: E501 line too long (89 > 79 characters)
Line 125:80: E501 line too long (100 > 79 characters)
Line 126:80: E501 line too long (95 > 79 characters)
Line 127:80: E501 line too long (88 > 79 characters)
Line 149:80: E501 line too long (83 > 79 characters)
Line 164:80: E501 line too long (83 > 79 characters)
Line 174:80: E501 line too long (106 > 79 characters)
Line 183:80: E501 line too long (106 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/commands/build.py:

Line 40:80: E501 line too long (90 > 79 characters)
Line 76:80: E501 line too long (81 > 79 characters)
Line 109:80: E501 line too long (99 > 79 characters)
Line 123:80: E501 line too long (106 > 79 characters)
Line 126:80: E501 line too long (88 > 79 characters)
Line 136:80: E501 line too long (90 > 79 characters)
Line 140:80: E501 line too long (82 > 79 characters)
Line 151:80: E501 line too long (88 > 79 characters)
Line 158:80: E501 line too long (90 > 79 characters)
Line 172:80: E501 line too long (81 > 79 characters)
Line 183:80: E501 line too long (97 > 79 characters)
Line 194:80: E501 line too long (91 > 79 characters)
Line 227:80: E501 line too long (105 > 79 characters)
Line 229:80: E501 line too long (94 > 79 characters)
Line 235:80: E501 line too long (97 > 79 characters)
Line 260:80: E501 line too long (118 > 79 characters)
Line 261:80: E501 line too long (111 > 79 characters)
Line 264:80: E501 line too long (83 > 79 characters)
Line 265:80: E501 line too long (81 > 79 characters)
Line 266:80: E501 line too long (91 > 79 characters)
Line 268:80: E501 line too long (103 > 79 characters)
Line 280:80: E501 line too long (81 > 79 characters)
Line 292:80: E501 line too long (103 > 79 characters)
Line 293:80: E501 line too long (106 > 79 characters)
Line 313:80: E501 line too long (108 > 79 characters)
Line 326:80: E501 line too long (83 > 79 characters)
Line 328:80: E501 line too long (91 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/commands/gh_deploy.py:

Line 31:80: E501 line too long (83 > 79 characters)
Line 62:80: E501 line too long (97 > 79 characters)
Line 67:80: E501 line too long (88 > 79 characters)
Line 71:80: E501 line too long (90 > 79 characters)
Line 75:80: E501 line too long (85 > 79 characters)
Line 79:80: E501 line too long (90 > 79 characters)
Line 80:80: E501 line too long (92 > 79 characters)
Line 86:80: E501 line too long (84 > 79 characters)
Line 117:80: E501 line too long (82 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/commands/serve.py:

Line 29:80: E501 line too long (95 > 79 characters)
Line 64:80: E501 line too long (117 > 79 characters)
Line 77:80: E501 line too long (89 > 79 characters)
Line 107:80: E501 line too long (88 > 79 characters)
Line 117:80: E501 line too long (80 > 79 characters)
Line 147:80: E501 line too long (87 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/config/base.py:

Line 34:80: E501 line too long (82 > 79 characters)
Line 36:80: E501 line too long (83 > 79 characters)
Line 37:80: E501 line too long (96 > 79 characters)
Line 39:80: E501 line too long (82 > 79 characters)
Line 138:80: E501 line too long (90 > 79 characters)
Line 191:80: E501 line too long (92 > 79 characters)
Line 214:80: E501 line too long (92 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/config/config_options.py:

Line 258:80: E501 line too long (84 > 79 characters)
Line 259:80: E501 line too long (83 > 79 characters)
Line 260:80: E501 line too long (87 > 79 characters)
Line 261:80: E501 line too long (90 > 79 characters)
Line 344:80: E501 line too long (103 > 79 characters)
Line 403:80: E501 line too long (96 > 79 characters)
Line 410:80: E501 line too long (98 > 79 characters)
Line 445:80: E501 line too long (84 > 79 characters)
Line 451:80: E501 line too long (109 > 79 characters)
Line 457:80: E501 line too long (104 > 79 characters)
Line 460:80: E501 line too long (90 > 79 characters)
Line 462:80: E501 line too long (93 > 79 characters)
Line 464:80: E501 line too long (90 > 79 characters)
Line 465:80: E501 line too long (97 > 79 characters)
Line 466:80: E501 line too long (89 > 79 characters)
Line 505:80: E501 line too long (87 > 79 characters)
Line 506:80: E501 line too long (86 > 79 characters)
Line 544:80: E501 line too long (86 > 79 characters)
Line 550:80: E501 line too long (80 > 79 characters)
Line 556:80: E501 line too long (82 > 79 characters)
Line 562:80: E501 line too long (87 > 79 characters)
Line 590:80: E501 line too long (94 > 79 characters)
Line 614:80: E501 line too long (82 > 79 characters)
Line 620:80: E501 line too long (82 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/config/defaults.py:

Line 110:80: E501 line too long (81 > 79 characters)
Line 111:80: E501 line too long (82 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/contrib/search/__init__.py:

Line 17:80: E501 line too long (82 > 79 characters)
Line 24:80: E501 line too long (86 > 79 characters)
Line 40:80: E501 line too long (98 > 79 characters)
Line 41:80: E501 line too long (91 > 79 characters)
Line 46:80: E501 line too long (95 > 79 characters)
Line 48:80: E501 line too long (97 > 79 characters)
Line 70:80: E501 line too long (97 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/contrib/search/search_index.py:

Line 68:80: E501 line too long (93 > 79 characters)
Line 88:80: E501 line too long (82 > 79 characters)
Line 106:80: E501 line too long (107 > 79 characters)
Line 115:80: E501 line too long (80 > 79 characters)
Line 117:80: E501 line too long (88 > 79 characters)
Line 120:80: E501 line too long (90 > 79 characters)
Line 122:80: E501 line too long (84 > 79 characters)
Line 125:80: E501 line too long (82 > 79 characters)
Line 128:80: E501 line too long (80 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/plugins.py:

Line 18:80: E501 line too long (85 > 79 characters)
Line 20:80: E501 line too long (85 > 79 characters)
Line 43:80: E501 line too long (89 > 79 characters)
Line 45:80: E501 line too long (90 > 79 characters)
Line 55:80: E501 line too long (84 > 79 characters)
Line 56:80: E501 line too long (87 > 79 characters)
Line 73:80: E501 line too long (80 > 79 characters)
Line 85:80: E501 line too long (89 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/structure/files.py:

Line 59:80: E501 line too long (96 > 79 characters)
Line 71:80: E501 line too long (83 > 79 characters)
Line 73:80: E501 line too long (92 > 79 characters)
Line 74:80: E501 line too long (96 > 79 characters)
Line 88:80: E501 line too long (102 > 79 characters)
Line 100:80: E501 line too long (81 > 79 characters)
Line 102:80: E501 line too long (114 > 79 characters)
Line 103:80: E501 line too long (115 > 79 characters)
Line 104:80: E501 line too long (113 > 79 characters)
Line 116:80: E501 line too long (84 > 79 characters)
Line 122:80: E501 line too long (90 > 79 characters)
Line 127:80: E501 line too long (82 > 79 characters)
Line 130:80: E501 line too long (85 > 79 characters)
Line 176:80: E501 line too long (96 > 79 characters)
Line 179:80: E501 line too long (83 > 79 characters)
Line 181:80: E501 line too long (81 > 79 characters)
Line 188:80: E501 line too long (93 > 79 characters)
Line 227:80: E501 line too long (89 > 79 characters)
Line 233:80: E501 line too long (88 > 79 characters)
Line 240:80: E501 line too long (90 > 79 characters)
Line 244:80: E501 line too long (111 > 79 characters)
Line 246:80: E501 line too long (106 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/structure/nav.py:

Line 13:80: E501 line too long (93 > 79 characters)
Line 78:80: E501 line too long (93 > 79 characters)
Line 86:80: E501 line too long (84 > 79 characters)
Line 101:80: E501 line too long (93 > 79 characters)
Line 113:80: E501 line too long (93 > 79 characters)
Line 120:80: E501 line too long (98 > 79 characters)
Line 121:80: E501 line too long (96 > 79 characters)
Line 122:80: E501 line too long (93 > 79 characters)
Line 136:80: E501 line too long (83 > 79 characters)
Line 137:80: E501 line too long (83 > 79 characters)
Line 141:80: E501 line too long (82 > 79 characters)
Line 142:80: E501 line too long (80 > 79 characters)
Line 153:80: E501 line too long (82 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/structure/pages.py:

Line 12:80: E501 line too long (81 > 79 characters)
Line 38:80: E501 line too long (86 > 79 characters)
Line 57:80: E501 line too long (84 > 79 characters)
Line 58:80: E501 line too long (86 > 79 characters)
Line 120:80: E501 line too long (99 > 79 characters)
Line 126:80: E501 line too long (87 > 79 characters)
Line 156:80: E501 line too long (89 > 79 characters)
Line 208:80: E501 line too long (87 > 79 characters)
Line 209:80: E501 line too long (80 > 79 characters)
Line 212:80: E501 line too long (88 > 79 characters)
Line 216:80: E501 line too long (89 > 79 characters)
Line 222:80: E501 line too long (85 > 79 characters)
Line 223:80: E501 line too long (85 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/theme.py:

Line 25:80: E501 line too long (82 > 79 characters)
Line 56:80: E501 line too long (87 > 79 characters)
Line 57:80: E501 line too long (80 > 79 characters)
Line 88:80: E501 line too long (80 > 79 characters)
Line 91:80: E501 line too long (101 > 79 characters)
Line 98:80: E501 line too long (96 > 79 characters)
Line 99:80: E501 line too long (106 > 79 characters)
Line 110:80: E501 line too long (90 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/utils/__init__.py:

Line 80:80: E501 line too long (96 > 79 characters)
Line 184:80: E501 line too long (83 > 79 characters)
Line 200:80: E501 line too long (81 > 79 characters)
Line 216:80: E501 line too long (91 > 79 characters)
Line 316:80: E501 line too long (80 > 79 characters)
Line 329:80: E501 line too long (80 > 79 characters)

In the file docs/custom_mkdocs/mkdocs/utils/meta.py:

Line 5:80: E501 line too long (80 > 79 characters)
Line 11:80: E501 line too long (81 > 79 characters)
Line 12:80: E501 line too long (81 > 79 characters)
Line 15:80: E501 line too long (81 > 79 characters)
Line 21:80: E501 line too long (82 > 79 characters)
Line 22:80: E501 line too long (80 > 79 characters)
Line 27:80: E501 line too long (81 > 79 characters)
Line 48:80: E501 line too long (91 > 79 characters)

In the file docs/custom_mkdocs/setup.py:

Line 60:80: E501 line too long (84 > 79 characters)


Add support for migration history management

In the analogy of database migration, I believe a migration history management feature will be definitely useful.
This PR allow us to set a migration file directory and history storage in the configuration file, and apply all pending unapplied migrations in sequence.
Migration files will be applied in alphabetical order by filename. You can use a serial number for filename (e.g. 123.hcl), but I recommend you to use a timestamp as a prefix to avoid git conflicts (e.g.<PHONE_NUMBER>0000_mv_bar1.hcl)
A history file serializes and saves the History object in JSON format. It also contains format version in case of format change. An example of history file as follows:
{
    "version": 1,
    "records": {
        "20201114000000_mv_bar1.hcl": {
            "type": "state",
            "name": "bar1",
            "applied_at": "2020-11-14T23:18:38.743079+09:00"
        },
        "20201114000001_mv_bar2.hcl": {
            "type": "state",
            "name": "bar2",
            "applied_at": "2020-11-14T23:21:18.976782+09:00"
        }
    }
}

The history file is stored in a Storage. Since Terraform supports multiple cloud storages to store tfstate, so we probably need to support them to store the migration history, but the Terraform's backend implementation cannot be reused as it is, so I implemented it by myself only we need with a primitive SDK. There is also an external library that abstracts cloud storage, but I didn't use it because I will probably want full control authentication options to match the behavior with terraform.
I had another option which implementing a custom terraform provider for tfmigrate, but I thought it wouldn't match the provider's resource model because migration isn't idempotent and its order is important.
This PR implemented local and s3 storage. The Storage interface is simple, so it's easy to add implementations from other cloud providers. If your cloud provider is not supported for now, as a workaround, you can use local storage and synchronize it to your cloud storage with a wrapper script.
A new configuration file has been added to specify the migration directory and history storage. The configuration file path defaults to .tfmigrate.hcl. You can change the path of configuration file with command line flag --config. An example of configuration file as follows:
tfmigrate {
  migration_dir = "./tfmigrate"
  history {
    storage "local" {
      path = ".tfmigrate_history.json"
    }
  }
}

tfmigrate {
  migration_dir = "./tfmigrate"
  history {
    storage "s3" {
      bucket = "example-tfmigrate-test"
      key    = "tfmigrate/history.json"
    }
  }
}

The plan / apply command applies all unapplied migrations if the argument is omitted, but you can plan / apply only a given migration file by the argument.
$ tfmigrate apply --help
Usage: tfmigrate apply [PATH]

Apply computes a new state and pushes it to remote state.
It will fail if terraform plan detects any diffs with the new state.

Arguments
  PATH               A path of migration file
                     Required in non-history mode. Optional in history-mode.

Options:
  --config           A path to tfmigrate config file

@hermanschaaf Hi, thank you for your interest!
A persistence mechanism of history has been almost completed and connecting it to migrator implementations and UIs should be done before merge.
As I'm working on multiple side projects in my spare time, so the progress is a bit slow, but I believe it's a definitely helpful feature for us. Stay tuned!

There are still something I would like to fix, such as s3 authentication options, but the diff is too big and the minimum use-case works for now, so I'll merge it and fix them in the following PRs.

@hermanschaaf Released in v0.2.0 🚀


GN-4841 Add ability to specify area locations in the location-plugin

Overview
Required some work to shield ember-leaflet from being confused by args and some type gymnastics. I'm pretty happy with the UX for something simple, but maybe it's not intuitive enough? I'll try to get leaflet-draw to work.
connected issues and PRs:
https://binnenland.atlassian.net/browse/GN-4841
Setup
N/A
How to test/reproduce
On the besluit sample, 'insert location', then select area. I'm not going to say how to use it, as it'll help you see if it's intuitive enough. Once you've figured out how to do it, try making different location types, hoping between editing different ones, refreshing, etc.
Challenges/uncertainties
Still not sure what we want to do on the template builder side as we can't set a label yet, so it's still using the old address plugin.
Checks PR readiness

[x] UI: works on smaller screen sizes
[x] UI: feedback for any loading/error states
[x] Check if dummy app is correctly updated
[x] Check cancel/go-back flows
[x] changelog
[x] npm lint
[x] no new deprecations

and I think its very intuitive

I think all the jumping around style issues should be fixed now.

(unsure if already previously discussed) do we want to open the edit-location modal automatically after inserting a location-placeholder?

This hasn't been discussed, but it seemed natural to me, since this is not (at least currently) for making templates, as there is no way to set a label for the placeholder.  It's easy to change if we think it makes more sense to not auto-open.

I think all the jumping around style issues should be fixed now.

(unsure if already previously discussed) do we want to open the edit-location modal automatically after inserting a location-placeholder?

This hasn't been discussed, but it seemed natural to me, since this is not (at least currently) for making templates, as there is no way to set a label for the placeholder.  It's easy to change if we think it makes more sense to not auto-open.

Yeah that makes sense. If we would still want to change this behaviour in the future, we can always do it in a seperate PR.

Okay, let's try that again... I think everything should be fixed now in terms of the map jumping around unexpectedly.

weighing in on the "open the modal automatically": it didn't even register for me as that's exactly what I was expecting to happen, so I think we're good


Add authentification to API

Our bitcart backend API is written in fastapi.
It is located in main.py file and api/ folder.
Currently it is accessible by everyone.
We should add authentification, either Token, or JWT, or some other kind of auth.
Some useful links:
https://fastapi.tiangolo.com/tutorial/security/intro/
https://fastapi.tiangolo.com/tutorial/security/get-current-user/
https://fastapi.tiangolo.com/tutorial/security/first-steps/
https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/
The user model is defined in schemes.py(pydantic validation for output in API), and database model in models.py.
Also, when user is logged in API should be restricted  to displaying only those wallets, store, products, invoices that user have.
User has is_superuser value, if it is True, then all data should be displayed.
If user is not superuser, users list might not be accessible at all, or there should be a new endpoint added:
/users/current
Or /profile
Returning logged user info.

Hey! I would like to give it a shot.

Thanks a lot! Feel free to ask any questions you got during implementing that

@hmuhammadazeem Do you need any help in understanding the repo or how to contribute? Ask questions if any, we can discuss further details of implementation here.

Hey! I'm going with JWT. I'll get to you if I've any questions.

Hey, there is a /token end point. What is that for? Is it for auth? Or should I create my own for auth? And the code isn't working locally for me. Error is in model_view method on line 144. Error says: re.error: unbalanced parenthesis at position 26

re.error? I don't use regex or anything like so.
What is your python version?
/token endpoint is POST endpoint to create a token, you submit username and password, and if it is valid, it created token for that user(os.urandom(32).hex()).
It is just a usual token, so you might need to change that if needed.

Yea, you don't but fastapi does it.
Well, I'm still trying to at least code it right. And as /token point is just for creation. So, I'll adjust it to use pyJWT. And might also add an expiry column for token.

How do I apply auth on endpoint such as "/products". These are dynamically added. Can you point to any reference?

You should edit model_view code in utils.py, it generates views.
Like async def post is for post request https://github.com/MrNaif2018/bitcart/blob/master/api/utils.py#L92
But in general, for this model_view function I would add additional apply_auth or just auth=True/False which will turn on/off auth. Also having a decorator like @auth_required would be good.

I didn't get auth=True/False thing.
Should I just wrap individual functions defined inside model_view with decorator or some auth check?

I mean make model_view function accept additional boolean parameter:
I think you can do like
if auth:
    # enable auth somehow

Decorator is not for model_view, but just additional convience thing to use in usual views.
def model_view(
    router: APIRouter,
    path: str,
    orm_model,
    pydantic_model,
    create_model=None,
    allowed_methods: List[str] = ["GET_ONE"] + HTTP_METHODS,
    custom_methods: Dict[str, Callable] = {},
    background_tasks_mapping: Dict[str, Callable] = {},
    auth: bool = False
):

One tip, when developing, start api with
uvicorn --reload main:app
To get automatic code reloading!

So, @hmuhammadazeem, do you take on this issue or I can do that myself?
If you've encountered any problems, report them there and we will resolve them.

I'm still on it. If I get stuck I'll let you know if I want to continue or take help.

@hmuhammadazeem Could you please open your WIP(Work in Progress) PR with your changes so that we can keep track on the progress?

Hey, till now I've been unable to progress much on this. Multiple reasons. Can you do some working on it yourself? I'll like to observe and learn. Thanks.

Of course, yesterday I created it,will open PR for you to see how I did that.

Check the PR here: #87

We need to decide actually.
Do we need JWT at all or not?
We can just store tokens in redis or postgres, and have a /login and /logout endpoints.
Frontend would just store that in localStorage.
It would allow revoking tokens and logging out from all devices

Authentification has been added! A lot of job done, now we need to do some additional improvements in UI and API!


Safer continuations-related libcall implementations

This patch makes the interfaces and implementations of continuation-related libcalls safer as they now handle traps/failures.
In addition, this patch increases the default fiber stack size to 2MB.

I'm fine with landing this as is (modulo my nit about the default size), but it would be nicer to move the external interfaces to use std::ptr::NonNull where possible so we can eschew many of the traps due to potential null pointers.

I agree. We can do that in a follow-up patch.


Make upper case for h2 optional

Hi, I've noticed that all h2 elements becomes all upper case, and I personally don't want that.
Could you please tell me how to disable this behavior? Thanks in advance.

I've solved this by custom CSS:
.section > h2 { text-transform: none; }
.md--footer > h2 { text-transform: none; }
.nav-main__link { text-transform: none; }


[ci] Use the PR base branch also for other dependecies repos

Without specifying the branch default branch is checked out and in case of backport PRs (PR to 2.7 branch), build of DBZ server dependecies (an others) fails as it use 3.0.0 branch and requires Java 21.

Great catch on the PR workflow @vjuranek :+1:


📚 Use new need-example directive for all examples

This removes the duplication of examples (as literal and render), by using a directive.
It removes issues with inconsistencies, and also allows for consistent/centralised formatting of the examples

Note this is currently based on top of #1186

Don't know why RTD is not reporting the status, but it built: https://sphinx-needs--1190.org.readthedocs.build/en/1190/index.html


feat: change source codes to typescript

Issue
#335
Details
This closes #335

@mixed
I've updated my code, thanks for the review.

Coverage decreased (-45.7%) to 46.901% when pulling 9bab5a46d41158d79956ccb2436784fa72ddffe6 on WoodNeck:feat-typescript into b835bd93317e86c2570788410a6045b5710aa3f0 on naver:master.


Double-clicking on a SourceControlHistoryItemChange of a non-git SCM extension fails to open diff editor

This code assumes that the uris of the SourceControlHistoryItemChange have a query element consisting of a JSON string representation of a two-property object:
https://github.com/microsoft/vscode/blob/a003d5fb8d6d026b5e0019ed06b8ee864acfa6db/src/vs/workbench/contrib/scm/browser/util.ts#L77-L80
I think the code should be conditional on uri.scheme === 'git'

Closing this issue as this piece of code has been removed.


add a check for local puppeteer config

adds a check for local puppteer config (usually .puppeteer.json) which can be used by mermaid

Nice, thanks :tada:


Error: ENOENT:

gulp build:darwin64
[10:25:46] Requiring external module coffee-script/register
[10:25:48] Using gulpfile ~/Desktop/electron/gulpfile.coffee
[10:25:48] Starting 'resources:darwin'...
[10:25:48] Starting 'kill:darwin64'...
[10:25:48] Finished 'kill:darwin64' after 41 ms
[10:25:48] Starting 'download:darwin64'...
[10:25:48] Verifying requested version (v0.31.1)
[10:25:48] Finished 'resources:darwin' after 158 ms
[10:25:55] 'download:darwin64' errored after 7.26 s
[10:25:55] Error: ENOENT: no such file or directory, rename './build/darwin64/Electron.app' -> './build/darwin64/SuperKit.app'
at Error (native)

Found the solution. It seems the error comes from line 39 of tasks/download.coffee, there must be some kind of permissions error in fs.rename.
This worked for me:
rm -rf build/darwin64 # warning! this deletes the folder
mkdir -p ./build/darwin64/Electron.app/Contents/MacOS/Electron # manually creates the directories
gulp build:darwin64 # build the app

Hope it helps.

:+1: same here

Please see https://github.com/Aluxian/Whatsie
I used superkit there, but I upgraded it a lot. Please note the app is not fully released, so some things (e.g. the updates) don't work correctly. I'm slowly fixing everything

I am still getting this issue. Has anyone found a solution for it?


Django integration

Any django integration planned ?

In which context would you see a Django integration ? in a template tag ? in a custom FileField ?
At the moment we're not planning on any framework integration but it might change in the future.

I'd very much like to see a custom FileField with built in file preview


Enable DuckDB >= v0.8.0

Description
This PR enables the use of DuckDB versions >= v0.8.0 (v0.9.0 was just released). I made a minor adjustment to an existing test which appeared to have issues with mixed order of columns.
What is the nature of your change?

[ ] Bug fix (fixes an issue).
[x] Enhancement (adds functionality).
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
[ ] This change requires a documentation update.

Checklist
Please ensure that all boxes are checked before indicating that a pull request is ready for review.

[x] I have read the CONTRIBUTING.md guidelines.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] New and existing unit tests pass locally with my changes.
[ ] I have added tests that prove my fix is effective or that my feature works.
[x] I have deleted all non-relevant text in this pull request template.

Thank you @gwaybio and @falquaddoomi for your reviews! Merging this in.


Extended blazor demo

Extended blazor demo in test project
Use ms appbuilder in program.cs
added screenshot

Thank you.


Hide GDAL from public interface, fix export

Purpose

Enforce export in CI
Hide implementation details of GDAL in implementation
Install headers per latest ament recommendations to allow package: https://docs.ros.org/en/humble/How-To-Guides/Ament-CMake-Documentation.html#adding-targets
This is crucial before realeasing as a library
Remove unused yaml dependency
Add all missing libraries in ament_export_dependencies
Fix a few typos in comments
Add badges for all jobs but point them to the default ros2 branch  rather than any branch
Fix style check not running on ros2 branch

Ticket
Relates to https://github.com/ethz-asl/grid_map_geo/issues/50, we should fix the export, hide unused things, and then test consuming the library so consumers don't report bugs against the export.
Risk
Low, the CI checks should catch anything. I did remove the implementation of transform to a translation unit, so this may impact performance a tad, but it's necessary if we have any hope to hide GDAL.

Ready for final review.


[Bug] esm-import of @felte/common fails when using @sveltekit/adapter-node

Just noticed that there is a bug with @felte/common when building a sveltekit-app using @sveltejs/adapter-node@next. The problem disappears if I remove the adapter. The problem doesn't exist when doing a named import from f.e. the felte-package itself...
I'm unsure why this happens as the correct esm-package seems to be built and is referenced in @felte/common's package.json... There seem to be a subtle difference in the rollup-config which makes the adapter unhappy ;)
vite v2.4.4 building SSR bundle for production...
✓ 74 modules transformed.
.svelte-kit/output/server/app.js   199.25kb

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-node
> Named export 'getPath' not found. The requested module '@felte/common' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@felte/common';
const { getPath } = pkg;

file:///[..]/.svelte-kit/output/server/app.js:2
import { getPath } from "@felte/common";
         ^^^^^^^
SyntaxError: Named export 'getPath' not found. The requested module '@felte/common' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@felte/common';
const { getPath } = pkg;

Reproduction

npm init svelte@next felte-esm-repro && cd felte-esm-repro && npm i && npm add -D @felte/common @sveltejs/adapter-node@next
Use the default for every question by hitting enter.
Add the following to your svelte.config.js:

import node from '@sveltejs/adapter-node';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
  	adapter: node(),
		// hydrate the <div id="svelte"> element in src/app.html
		target: '#svelte'
	}
};

export default config;

Add the following to src/routes/index.svelte:

<script>
	import { getPath } from "@felte/common";
	import Counter from '$lib/Counter.svelte';

	console.log(getPath);
</script>

run npm run build and see it fail.

This is really weird. The rollup configuration does change a lot between the common package and the rest. Mainly because the ESM build does need to keep each function as a separate module to facilitate tree-shaking for rollup. I've checked the package.json file and it does set the module and exports field appropriately.
Personally I've only used the static adapter for https://felte.dev, so now I'm wondering if reporter-svelte works with the node adapter since it uses @felte/common in a similar way as you have described.

I think the underlying problem is described here: https://github.com/chartjs/Chart.js/issues/9436.
Sidenote: If I add "type": "module" to the package.json of @svelte/core, the problem disappears, but I'm unsure if this breaks pure commonjs-setups...

Ah, generally I think this is what's generally solved by adding the dep as a dev dep to Vite or Kit, or using the noExternal option of vite in either. The world does seem to be moving to full ESM packages (completely ditching CommonJS) so this is something I have been considering. I haven't had the time to test the implications if, for example, you're using this in Sapper with SSR (since it uses Rollup, not Vite). But I'd assume since Rollup also does favor ESM it shouldn't be an issue.
For reference (to anyone who might find this thread), here's a wonderful guide to ESM packages by Sindresorhus that I'll be using as a guide for transitioning.

I'm having the same occur with the vercel adapter in my typescript project :\

@softgripper out of curiosity. I'm guessing you're importing the @felte/common package directly? Or is this happening when importing felte?

I'm using both.
I use felte, and also rolled my own typescript svelte reporter and a different implementation of the validation message.  I imported types and _get from felte.

It's still happening with the v1 version of felte and the static adapter, at least for the dev mode. Repository for repro can be found here: https://github.com/chloe-the-catgirl/felte-issue-45-repro (pnpm install && pnpm run dev)
Since the vite.ssr property is not longer in newer versions of SvelteKit (and adding it nonetheless has no effect), this issue seems still up to date. Although there's an error on the command line, the code seems to work, at least in half of the cases (it's really flaky).

exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/home/jasmin/repos/felte-esm-repro/node_modules/.pnpm/felte<EMAIL_ADDRESS>contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.

@chloe-the-catgirl weirdly enough, this was not happening in our site (although it was a few versions behind with Kit). But I managed to reproduce it with your repo. Thanks a lot for that!
Vite seems to be ignoring the "exports" field of our package.json somewhere when creating the server side output. I'm not sure why this is happening since I'm not that familiar with Vite, but I fixed this (or at least it's not happening on my end anymore) by setting our rollup config to output the commonJS file with an extension of .cjs. The error should stop appearing by upgrading to<EMAIL_ADDRESS>

@pablo-abc It is fixed, thanks! Is it possible to sponsor you or spend you a coffee or two? Since the work you are doing here is absolutely stunning!


Support manually adding time

This was an issue that came up during the Subathon stream when the bits subscription stopped working.
Making the request to add time would most likely be done client-side, actually adding time would be done on the server-side (utilizing socket.io).

Opened a separate issue for client-side addition because YEP

#14


Neal on GPU

Current Problem
Can Neal run on GPU?
Proposed Solution
??
Alternatives Considered
??
Additional context
??

No. Just CPU.


cmd/compile: internal compiler error: Type.Elem UNSAFEPTR

What version of Go are you using (go version)?

$ go version
go version go1.11.5 darwin/amd64

Does this issue reproduce with the latest release?
It's latest release
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/egartman/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/egartman/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mv/gfk793qd08b1kj0qcxt5cf_40000gn/T/go-build087446295=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
Ran this test:
package main

import (
	"reflect"
	"testing"
	"unsafe"
)

//go:linkname memmove runtime.memmove
func memmove(to, from unsafe.Pointer, n uintptr)

func TestMemmove(t *testing.T) {
	from := []byte{1, 2, 3, 4, 5}
	to := []byte{7, 7, 7, 7, 7}
	want := []byte{7, 1, 2, 3, 7}
	memmove(unsafe.Pointer(&to[1]), unsafe.Pointer(&from[1]), uintptr(3))
	if !reflect.DeepEqual(to, want) {
		t.Fatalf("unexpected %v, want %v", to, want)
	}
}

What did you expect to see?
Test running
What did you see instead?
:1: internal compiler error: Type.Elem UNSAFEPTR

Does this issue reproduce with go1.12rc1?

CC @randall77 @griesemer

Does this issue reproduce with go1.12rc1?

No. It works fine.
> go version
go version go1.12rc1 darwin/amd64

> go test
--- FAIL: TestMemmove (0.00s)
    memmove_test.go:18: unexpected [7 2 3 4 7], want [7 1 2 3 7]
FAIL
exit status 1
FAIL    testing.fun/unescape    0.005s

Duplicate of https://github.com/golang/go/issues/30061, it seems. If you'd like it backported to 1.11, leave a comment there.


Accessing list of booleans changes result

I get different results depending on whether a variable I just set is immediately accessed or not.
Variable "ro".
Right after I define it there's a line that just says "#ro".
If that line is commented out, I get the wrong result.
If it's live, I get the right result.
Casting the elements in "ro" to int also makes it work.
Printing "ro" makes it work.
To test, call gga like this:
gga (65, 60, 0, True, 1, [65., 65.], [4100., 2000.], 1.)
Correct output is:
B
234.0
If "#ro" is commented out you'll get this instead:
C
0.0
import math

gis_t4 = {
    0       : 123,
    2000    : 234,
    7000    : 345,
}

def f (data, tx, s):
    txu = tx * s

    keys = sorted(list(data.keys()))

    for i in range(len(keys) - 1, -1, -1):
        k = keys[i]
        if txu >= k:
            return data[k] / s

    return data[0] / s

#pythran export gga (
#   int, int, int, bool, int, float64 list, float64 list, float64
#)
def gga (b, c, y, m, cnum, osa, tx, s):
    other_cnum = 1 - cnum

    tca = (b if cnum == 0 else c) + y
    oca = (b if other_cnum == 0 else c) + y

    tto = max(osa[other_cnum] - oca, 0.)
    if tto == 0:
        fraction = 1.
    else:
        fraction = max (1 - tto, 0.)

    ro = [
        (b + y) >= math.floor(osa[cnum]),
        (c + y) >= math.floor(osa[other_cnum]),
    ]
    #ro

    if not m:
        print ('A')
        return 0.
    else:
        if ro[other_cnum] and tca >= 60 and tca <= 64:
            print ('B')
            return f (gis_t4, tx[cnum] + tx[other_cnum], s) * fraction
        else:
            print ('C')
            return 0.

The preprocessed code as output by pythran -P mycode.py shows that some forward substitution happen, that's probably the reason. I'll be offline for a few weeks, but I'll have a look afterward. Thanks for reporting!