onImageLoaded not recognized on Next.js

Hi,
I didn't manage to use this package on a Next.js setup, I suspect it has to do with the "on image loaded" property since it doesn't return any value for the "imageRef", does anyone manage to use this package on a Next.js project?

Hi, can you show your code?

import React, { useEffect, useState } from "react";
import ReactCrop from "react-image-crop";
import demoImage from "/public/images/demo.jpg";
function ImageCropper(props) {
const { imageToCrop, onImageCropped } = props;
const [cropConfig, setCropConfig] = useState(
    // default crop config
    {
        unit: "%",
        width: 30,
        height: 30,
        aspect: 16 / 9
    }
);

const [imageRef, setImageRef] = useState();

async function cropImage(crop) {
    if (imageRef && crop.width && crop.height) {
        const croppedImage = await getCroppedImage(
            imageRef,
            crop,
            "croppedImage.jpeg" // destination filename
        );

        // calling the props function to expose
        // croppedImage to the parent component
        onImageCropped(croppedImage);
    }
}

function getCroppedImage(sourceImage, cropConfig, fileName) {
    // creating the cropped image from the source image
    const canvas = document.createElement("canvas");
    const scaleX = sourceImage.naturalWidth / sourceImage.width;
    const scaleY = sourceImage.naturalHeight / sourceImage.height;
    canvas.width = cropConfig.width;
    canvas.height = cropConfig.height;
    const ctx = canvas.getContext("2d");

    ctx.drawImage(
        sourceImage,
        cropConfig.x * scaleX,
        cropConfig.y * scaleY,
        cropConfig.width * scaleX,
        cropConfig.height * scaleY,
        0,
        0,
        cropConfig.width,
        cropConfig.height
    );

    return new Promise((resolve, reject) => {
        canvas.toBlob((blob) => {
            // returning an error
            if (!blob) {
                reject(new Error("Canvas is empty"));
                return;
            }

            blob.name = fileName;
            // creating a Object URL representing the Blob object given
            const croppedImageUrl = window.URL.createObjectURL(blob);

            resolve(croppedImageUrl);
        }, "image/jpeg");
    });
}

return (
    <ReactCrop
        src={imageToCrop || demoImage}
        crop={cropConfig}
        ruleOfThirds
        onImageLoaded={(imageRef) => setImageRef(imageRef)}
        onComplete={cropImage(cropConfig)}
        onChange={(cropConfig) => setCropConfig(cropConfig)}
        crossorigin="anonymous" // to avoid CORS-related problems
    />
);

}
ImageCropper.defaultProps = {
onImageCropped: () => { }
};
export default ImageCropper;

basically, it doesn't do anything when I load the image from the file input, I figured it's due to the "onImageLoaded" doesn't triggering anything and "imageRef" not passing the first if "(imageRef && crop.width && crop.height)".
When I  was manipulating the code by adding:
useEffect(() => {
if (imageToCrop !== undefined) {
setImageRef(imageToCrop)
}
})
 It worked but I had to create a new image object with
 const image = new Image()
  image.src = sourceImage

    but it's just return black canvas

The normal way to get an image ref is to use useRef not useState but I don't think that would cause issues.
Hard to see what is going wrong without a runnable example actually, but I recommend you integrate v10 of the library not v9, there is an example here - https://codesandbox.io/s/react-image-crop-demo-with-react-hooks-y831o

Just go back to the ver<EMAIL_ADDRESS>@DEVELOPLANCE

@DEVELOPLANCE i have the same problem. I want to have a default cropped image when the users just upload the first image (without need to make any crop).
I have version 8.6.9
In my debug, after onImageLoaded, the setImageRef is not working on time.
I mean, imageRef is null in the first attemp to crop the image, after upload.
Did you make it work?


Need maintenance help?

Hi! :wave: pixels author here.
I noticed this crate uses a very outdated version of the crate. I am interested in pulling this project into the pixels repo so that it stays up-to-date!
@dtcristo If you don't mind transferring the crate name over to me on crates.io, I would be happy to take over.

Hi @parasyte, I'm well aware it's on an older version of pixels.
Last time I tried upgrading, the new versions were incompatible with the current stable release of bevy (0.5). I couldn't get it building as this version of bevy relies on an older version of wgpu.
When bevy 0.6 is released I will update this library to the latest compatible version of pixels (hopefully the latest).
I'm still keen to maintain this library, but if you want to take over, I'd be okay with that. Happy to hand over the crate name.

Ok, I wasn't aware you had attempted an upgrade. Also I was under the impression that bevy_pixels was a drop-in replacement for bevy_wgpu and bevy_render. Those are the only crates that use wgpu, and neither are necessary when using pixels.
Anyway, since you wish to continue maintaining the library, I'll leave it in your hands! I might submit a PR though. :)


Use dependency versions from influxdb.

I was looking into upgrading to influxdb 1.0 and noticed that the submodule sync script doesn't account for dependency versions specified in the influxdb source. This patch uses gdm to sync to the versions from https://github.com/influxdata/influxdb/blob/v0.13.0/Godeps.

Bump, wdyt?

good catch, thanks! sorry, dropped the ball on this one


Please add Favorites as a normal Section

Hey.
Awesome Theme.
But could i please add a normal Section for "Favorites" in the Sidebar? At the Top, above "Webmin" "System" "Server". And without the path. Just the names of the Favorites. That would be great. thanks

Webmin has such functionality already. You can set it in Webmin Configuration, under category label, as far as I remember.


预训练模型

<EMAIL_ADDRESS>

Hi, you may refer to this link:
https://pan.baidu.com/s/1HoW3wbldnbmgW2PS4i4Irw


Clean & update build.gradle

I've cleaned build.gradle form junk that is not needed in plugin, and also updated its SdkVersions, buildToolsVersion and appcompat library to modern standards

+1 !

@greedbell can you merge and publish this to NPM, please? 🙏

@rtkhanas it's merged and published

@greedbell thank you a lot! 😃


Your Keybase folders are currently not showing up in your explorer

I can't open my Keybase folder on my pc. The following message is shown "Your Keybase folders are currently not showing up in your explorer". Clicking the message attempts to repair my installation but this fails and nothing changes.
my log id: f7eaf1a880ec4d7da657861c

I had this problem as well, for some reason rebooting my laptop helped. If a reboot doesn't help, try running keybase status and posting the result.


Effekseer crashes when Effekseer save files on Mac

It seem that mkbundle has bugs...

https://stackoverflow.com/questions/18489272/how-can-i-convince-mkbundle-to-include-monoposixhelper

Fixed
https://github.com/effekseer/Effekseer/commit/831741770e14f3bdecfb7a71b2437e2cc5de30cd


HTTPS certificate validity check?

Not directly obvious from the Readme, but is HTTPS certificate validation also supported?

Thanks a lot for your issue, will be implemented as a separate message and added to readme and separate status to table


[Android][BugBash] Bleed Issue

Platform

Android

Issue
https://github.com/microsoft/AdaptiveCards/blob/master/samples/Tests/Bleed.Comprehensive.json
JSON 1

** Figure 1**

** Figure 2**

** Figure 3**
Issue 1:
First Y and N in Figure 1 don't stretch top and bottom.
Issue 2:
There are no padding in the text in the center of Figure 3 compared to Figure 2

@nesalang thanks for finding! Moving this out of 1.2 for post-release fixing.

Fixing this issue is not currently on our roadmap. Feel free to continue the conversation on this issue. If you feel strongly about this issue, please let us know and we can reevaluate.


Check sorted labels

https://galileoteamworkspace.slack.com/archives/C02NSBN4ZK3/p1683904619808329
https://github.com/rungalileo/dataquality/pull/590/files

Codecov Report

Merging #596 (f92dde5) into main (ed4f930) will decrease coverage by 0.05%.
The diff coverage is 50.00%.

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

@@            Coverage Diff             @@
##             main     #596      +/-   ##
==========================================
- Coverage   84.88%   84.83%   -0.05%
==========================================
  Files         161      161
  Lines       12593    12591       -2
==========================================
- Hits        10689    10682       -7
- Misses       1904     1909       +5

Impacted Files
Coverage Δ

...lity/loggers/model_logger/semantic_segmentation.py
0.00% <0.00%> (ø)

dataquality/core/log.py
95.65% <100.00%> (ø)

... and 4 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Recipe fails on x64 install

Hi,
Without having the default['mozilla_firefox']['force_32bit'] set to true, the recipe fails.
It looks as if it is still looking for the 32bit path, even on a 64bit install.
01:01:38 ==> default:   * mozilla_firefox[latest-esr] action install
01:01:38 ==> default: windows_package will be removed in the next major version release
01:01:38 ==> default:
01:01:38 ==> default: of the Windows cookbook.
01:01:38 ==> default:
01:01:38 ==> default:
01:01:38 ==> default:     * windows_package[Mozilla Firefox 45.4.0 ESR (x64 en-GB)] action install
01:01:38 ==> default:     Recipe:
01:01:38 ==> default:       * remote_file[C:\chef\cache\package\Firefox Setup 45.4.0esr.exe] action create
01:01:44 ==> default:         - create new file C:\chef\cache\package\Firefox Setup 45.4.0esr.exe
01:01:46 ==> default:         - update content in file C:\chef\cache\package\Firefox Setup 45.4.0esr.exe from none to e31325
01:01:46 ==> default:         (file sizes exceed 10000000 bytes, diff output suppressed)
01:02:15 ==> default: [2016-09-27T01:02:14+01:00] INFO: windows_package[Mozilla Firefox 45.4.0 ESR (x64 en-GB)] installed Mozilla Firefox 45.4.0 ESR (x64 en-GB) at latest
01:02:15 ==> default:
01:02:15 ==> default:       - install version latest of package Mozilla Firefox 45.4.0 ESR (x64 en-GB)
01:02:15 ==> default:
01:02:15 ==> default:
01:02:15 ==> default:   ================================================================================
01:02:15 ==> default:   Recipe Compile Error in C:\vagrant-berkshelf\269a015c7626e6c66aac7be6a534eb74\cookbooks\ois_selenium_node\recipes\default.rb
01:02:15 ==> default:   ================================================================================
01:02:15 ==> default:
01:02:15 ==> default:   Mixlib::ShellOut::ShellCommandFailed
01:02:15 ==> default:   ------------------------------------
01:02:15 ==> default:   Expected process to exit with [0], but received '255'
01:02:15 ==> default:   ---- Begin output of "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -v | more ----
01:02:15 ==> default:   STDOUT:
01:02:15 ==> default:   STDERR: The system cannot find the path specified.
01:02:15 ==> default:   ---- End output of "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -v | more ----
01:02:15 ==> default:   Ran "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -v | more returned 255

Can you verify that the version you are running has this in the library?
https://github.com/dhoer/chef-mozilla_firefox/blob/master/libraries/default.rb#L8-L14
It should get caught in the rescue portion and run the non x86 path.
This really should read the registry to get the default version of firefox installed.  If you feel brave enough to submit a PR that looks at the registry and grabs the install location from there, it would be much appreciated.
The choco install give hints on what registries to read to get that info:
https://chocolatey.org/packages/Firefox

This should now be fixed in 1.2.4 release. AppVeyor wasn't catching that error.  I verified that it now works on kitchen locally for both 32 and 64 bit versions.


Language Detection from Audio and model deployment

https://www.kaggle.com/datasets/hbchaitanyabharadwaj/audio-dataset-with-10-indian-languages

I would like to work on this . Kindly assign me this @pratishthaa .

Hi @Rutikab12, @pratishthaa  I would like to work on this can you assign me?

Hi @Rutikab12 @pratishthaa , I would like to work on this issue

Hi @Rutikab12 @pratishthaa I would like to work on this issue

Hi @pratishthaa can you please assign me this issue. I am GSSOC-24 contributor.

I would love to work on this issue

@Rutikab12 @pratishthaa Please assign this issue to me. I want to work on this.

Hi @Rutikab12
I’m interested in taking on the Language Detection from Audio and Model Deployment task. I plan to utilize natural language processing techniques and machine learning models to accurately identify languages from audio samples. Additionally, I will focus on deploying the model to ensure it can be used effectively in real-time applications.


Automatically set lastmod

What this PR does / why we need it:
Removes lastmod variable from all content files and sets it's value automatically.
Which issue this PR fixes:
fixes #82

I was also working on this issue I had a problem displaying the automated date after adding the settings in the config.toml file. Nice to see it fixed :+1:

@lauragift21 Oh I'm sorry I had no idea you were working on it,


Docs question: how to implement multiple arguments with aggregate function

Thanks so much for this amazing lib! For .aggregate, the docs mention that:

Just like regular user-defined functions, user-defined aggregates can accept multiple arguments

But it doesn't seem to specify/show an example of how additional arguments can be included. My assumption is that they go after the first two parameters in the step function, e.g.:
db.aggregate('addAllCustom', {
  start: 0,
  step: (total, nextValue, customArgument) => total + nextValue + customArgument,
});

But I'd appreciation confirmation on that (or clarification if I'm confused and it actually works differently)

Your assumption is correct. The first parameter of step() is always the current aggregate value, and all of the remaining parameters of step() are the arguments passed to your user-defined aggregate function.


Add order option for interpolation

Order of interpolation can now be chosen from 1 (default), 2, and 3.

From the newly established test set, it seems that different interpolation methods have little impact on the results?

Because those tests all have uniform EM fields, whatever interpolation
method we use, the results are the same.
On Mon, Mar 27, 2023, 11:09 AM TianCheng Liu @.***>
wrote:

From the newly established test set, it seems that different interpolation
methods have little impact on the results?
—
Reply to this email directly, view it on GitHub
https://github.com/henry2004y/TestParticle.jl/pull/70#issuecomment-1484694689,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEZN3YDADZNHK7FI2O64EHLW6FDMTANCNFSM6AAAAAAWG3HBMI
.
You are receiving this because you authored the thread.Message ID:
@.***>


Electron Uploader: Updating metrics

This PR removes the device ID from the metric event name and ensures that it's returned in the source property. Previously CareLink would have undefined as source.

  Electron Uploader - KissMetrics


Windows 7 x86 support is a lie

General
With .NET Core 3.0-preview8 -- I compiled a standalone exe for Windows 7 (x86) RID using the following command:
dotnet publish -c Release -r win7-x86 -o .\bin\Redist\windows /p:PublishSingleFile=true /p:PublishTrimmed=true /p:DebugType=None
This produces a single .exe file output that runs fine on Windows 10 (x64).
But when I copy this .exe file to a Windows 7 Home Basic (x86) machine, I get the following error message when trying to run it:
The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.

According to this issue: https://github.com/dotnet/core-setup/issues/3220 it looks like this external dependency is possibly the "Windows Universal C Runtime", which can be found at this location: https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
There does appear to be a download link for Windows 7 (x86), but when you try to install it on said operating system, you get the following message: The update is not applicable to your computer. -- This leads me to believe that it is impossible to run my app on Windows 7 (x86).
Expected Behavior:

My app runs on Windows 7 (x86) without having to install anything that does not ship with
the OS. (Many Corporate and Enterprise environments do not have the ability to install
random service packs on their machines without significant IT involvement and overhead.)

Also, I'd like to avoid dependency issues, e.g. if a user has the wrong version installed, etc.

If I do have to install some random service pack, tell me about it and where to download it
instead of a random missing dll notice, as that's a disaster waiting to happen.  (A non-technical
user might just google the error message and follow some youtube video's instructions to
download random .dll files from untrusted sites and dump them into the app's folder!)

Other thoughts

This isn't that tall of an ask.  We wrote GUI software for Windows 7 with MinGW 20 years ago,
and it never required any c runtime dlls; everything was statically linkable. (And never more
than 2 MB) -- This is literally just a console app -- if there is some external dependency, just
link it into the executable already! 😑

#3290

We do not claim Windows 7 support: only Windows 7 SP1.

If I do have to install some random service pack, tell me about it and where to download it instead of a random missing dll notice

This is good feedback, thank you.

There does appear to be a download link for Windows 7 (x86), but when you try to install it on said operating system, you get the following message: The update is not applicable to your computer. -- This leads me to believe that it is impossible to run my app on Windows 7 (x86).

Correct, the update is for Windows 7 SP1.

We wrote GUI software for Windows 7 with MinGW 20 years ago, and it never required any c runtime dlls; everything was statically linkable. (And never more than 2 MB) -- This is literally just a console app -- if there is some external dependency, just link it into the executable already! 😑

Dynamic linkage gives users a better experience. By allowing the CRT to be updated independently of the app, you can fix security issues quicker without relying on developers staying on top of things.


Escaping quotes in bash broken

When using escaped quotes in bash, the highlighting breaks. This applies to latest version (currently 9.13.1).
Live Example
URL: https://plnkr.co/edit/u0diCW1oxmKhLOEwKo8W
Example bash script
#!/bin/bash
DATA=$(curl json | cut -d\" -f4)
echo "$DATA"

Sample Screenshot

Is it worth hoping that this one will be fixed? Still reproducible in 9.15.6

PR welcome 🙏

@marcoscaceres Done! https://github.com/highlightjs/highlight.js/pull/2041
I suggest /(?<!\\)"/ will do the trick

Just for history logs:
Finally, we specified escaped quote as independent syntax construction without any class name:
var ESCAPED_QUOTE = {
    className: '',
    begin: /\\"/

  };

It has to work now since v9.15.8

@marcoscaceres
I found that it doesn't work with minified bundle
https://codepen.io/anon/pen/MdxXKg
Any suggestions?

@Inzeppelin, sorry, I haven't re-released it yet. I'll try to gather a few fixes first and then release it as part of v9.15.9.

@Inzeppelin, released v9.15.9... however, I'm unsure how long it takes for it to be uploaded to the CDN.

It finally works! Tested in firefox as well. Here is working example: https://codepen.io/anon/pen/MdxXKg
Thank you!

Glad to hear it. Sorry it took a bit long to release.


Support individual multimedia links in multimedia posts

Similar to #95, but in the case where I want to append for example /video/2 (and even https://d.twittpr.com/.../video/2.mp4) to a URL in order to only embed the video in the post it does not appear to work.

yeah, because of the way FixTweet structures and separates media data it makes it a bit quirky now that Twitter is mixing media types. So we'll probably need to rework some things internally to improve this.

I went to tackle this issue again, rewrote a bunch of FixTweet's media handling code in an effort to streamline it and make this easier to fix.... buuuut it turns out I underestimated the issue. Twitter isn't even sending us multiple videos. I might have to migrate the entire API fetch system to graphql, not looking forward to doing that 💀

This appears to have been resolved at some point after we moved to GraphQL API. media.all in our API returns photos, videos, and gifs in the order they appear on Twitter, and direct media redirects also appear to work. Closing for now, but if you are still encountering this issue, please give an example URL and I can take a look!


Backport department account icon to 2.5

Ticket Link
TICKET:1704
List of squashed commits

Backport department account icon

Test Checklist

[x] Exhibits Clear Code Structure:
[x] Project Unit Tests Passed:
[ ] Project Jasmine Tests Passed:
[x] Executes Expected Functionality:
[ ] Tested For Incorrect/Unexpected Inputs:

Something went south, eh.


Incorrect result when set of minimisers

julia> @time ibc_minimise((x,y)->(x-y)^2, IntervalBox(2..4, 3..4), tol=1e-6)
  0.471267 seconds (1.18 M allocations: 60.234 MiB, 4.10% gc time)
([0, 0], IntervalBox{2,Float64}[[3.99999, 4] × [3.99999, 4], [3.99999, 4] × [3.99999, 4], [3.99999, 4] × [3.99999, 4], [3.99999, 4] × [3.99999, 4]])

Any (x, x) in (3..4) \times (3..4) should be a solution.

Unless you are trying to return only a solution instead of all solutions.

Yes the solution will be convex hull of all minimisers.

That is not what is happening here? Why will it be the convex Hull? The easiest thing to do is just return a list of all the boxes that may contain minimisers.

I said convex Hull because from it we can find smallest box which can all the minimisers.


Cannot import download or send_bytes

I am using version 0.1.3, and every time I run my project I get thrown an import error saying:
ImportError: cannot import name 'Download' from 'dash_extensions'

Same for send_bytes from snippets. I have looked at the source code and they don't seem to be there. But through pycharm I am able to go to them.

Thanks! I will check it out when I try to access the docs on my personal laptop (I am the person with the issue of not being able to access the docs page).


Use with hidden user

Hello,
First, thank you for this plugin.
I needed to use it with hidden users, if the user is not visible it is not possible to retrieve his ID. So I added the possibility of placing in the configuration the 'user_id' (of the hidden user) that we want to use.
Regards.

Coverage increased (+0.03%) to 96.441% when pulling 7306b8aea21d8c1495dc9b79d949abdd921a1dc5 on 2cadz:master into 458976b917ac8095cd34e927b71e73ff8418c72f on xsteadfastx:master.

Coverage increased (+0.03%) to 96.441% when pulling 50c9d1cc4f666d06405ad0a4b1574e72bc32ed6c on 2cadz:master into 458976b917ac8095cd34e927b71e73ff8418c72f on xsteadfastx:master.

brilliant :) thank you for the PR


SDIST on Pypi is missing requirements.txt

Perhaps you should add a MANIFEST.in file.
>>> Emerging (1 of 1) dev-python/pyrainbird-0.4.3::HomeAssistantRepository
>>> Failed to emerge dev-python/pyrainbird-0.4.3, Log file:
>>>  '/var/tmp/portage/dev-python/pyrainbird-0.4.3/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.21, 0.23, 0.20
 * Package:    dev-python/pyrainbird-0.4.3
 * Repository: HomeAssistantRepository
 * Maintainer<EMAIL_ADDRESS> * Upstream<EMAIL_ADDRESS> * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_9 test userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking pyrainbird-0.4.3.tar.gz to /var/tmp/portage/dev-python/pyrainbird-0.4.3/work
>>> Source unpacked in /var/tmp/portage/dev-python/pyrainbird-0.4.3/work
>>> Preparing source in /var/tmp/portage/dev-python/pyrainbird-0.4.3/work/pyrainbird-0.4.3 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/pyrainbird-0.4.3/work/pyrainbird-0.4.3 ...
locale: Cannot set LC_ALL to default locale: No such file or directory
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/pyrainbird-0.4.3/work/pyrainbird-0.4.3 ...
 * python3_9: running distutils-r1_run_phase distutils-r1_python_compile
python3.9 setup.py build -j 6
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pyrainbird-0.4.3/work/pyrainbird-0.4.3/setup.py", line 7, in <module>
    with open("requirements.txt") as fd:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
 * ERROR: dev-python/pyrainbird-0.4.3::HomeAssistantRepository failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  127:  Called src_compile
 *   environment, line 2829:  Called distutils-r1_src_compile
 *   environment, line 1151:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  454:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2512:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2043:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2041:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line  759:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line 1142:  Called distutils-r1_python_compile
 *   environment, line 1002:  Called esetup.py 'build' '-j' '6'
 *   environment, line 1578:  Called die

I'm confirming this issue:
Defaulting to user installation because normal site-packages is not writeable
Collecting pyrainbird
  Downloading pyrainbird-0.5.0.tar.gz (6.6 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.8 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4fy8lzqo/pyrainbird_c36dd014791b42bb809fb05022e98b9e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4fy8lzqo/pyrainbird_c36dd014791b42bb809fb05022e98b9e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-7ozawii7
         cwd: /tmp/pip-install-4fy8lzqo/pyrainbird_c36dd014791b42bb809fb05022e98b9e/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4fy8lzqo/pyrainbird_c36dd014791b42bb809fb05022e98b9e/setup.py", line 7, in <module>
        with open("requirements.txt") as fd:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/4e/1e/d15c493034097e2b976738ec061ad0a431c0121e02291837636be5b7ed75/pyrainbird-0.5.0.tar.gz#sha256=e85b921af138210982b53e69f4166a3af25461bec8982f4a60836f13e7c78ebe (from https://pypi.org/simple/pyrainbird/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Just looked at it, thanks. Will try it when it's bumped at HA.
BTW: the exclude in https://github.com/jbarrancos/pyrainbird/blob/master/setup.cfg ("tests") does not match the actual name of your test directory. This could lead into a top level violation.

Will keep open to fix test issue


Center map on layer with 1 point and custom basemap goes to 32 zoom level

If i do 'center map on layer' in the points layer goes to 32 zoom level

.carto -->  Untitled map 10 (on 2018-02-20 at 16.19.17).carto.zip

More information: it happens when the basemap is a custom color
<3 you

So...
STR

Create a map with just one point
Change the basemap to custom color
Center lo layer

Current result

Zoom goes up to 32.

Expected result

Zoom goes to 18 (as with regular basemaps).

Yeah. Thanks ramiramen

Something similar happens if you make a search. If you use the search box and CARTO does the Leaflet fly-to, you'll be able to zoop up to 20.

Stale issue. Closing 👋


Update TriggerReferenceDocsCI.yml

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

Thank you for your contribution! We will review the pull request and get back to you soon.

Since the --ff-only merge does not create a new commit on the main branch but merely moves the branch pointer forward, no new commit is actually "pushed" to the main branch.
Therefore, the push event will not be triggered.
So, switch to using the 'released' event as the trigger condition.


How to use package without installing?

This issue is relevant to the issue mentioned at https://github.com/pratiman-91/colormaps/issues/8. Due to a conflict with PySide6 and colormaps, I could not use your package. Request you suggest a way to use it without installing it.

@wxguy I am looking into the issue.

You can try using the development version using:
git clone https://github.com/pratiman-91/colormaps.git
cd colormaps
python setup.py install

python setup.py install.
Is there any advantage of using this method over pip? I would like to keep the package next to my own script/ application and start importing. This is what I am looking at.

It is important to use setup.py at least the first time as it will dynamically generate the whole package. If you skip this step things might not work as expected.
I hope this explains.


Push for a better mutter api

These might be of interest to you:

Allow for a clearner way to access the underlying client id https://gitlab.gnome.org/GNOME/mutter/issues/211

get_description fails to convert UTF-8 string to JS string
https://gitlab.gnome.org/GNOME/mutter/issues/212

Maybe you want to vote for them to be fixed.

Thanks for the update.


"any" handle with path "/*" doesn't run before next handle

This does work:
const uWS = require('uWebSockets.js');

const app = uWS.App();

app.get('/api', (res, req) => {
    console.log('First')
    req.setYield(true);
    res.onAborted(() => {
        res.aborted = true;
    });
})

app.get('/api',(res,req)=>{
    console.log('Second')
    res.end('Hello');
})

app.listen(9001, (token) => {
    if (token) {
        console.log('Running');
    } else {
        console.log('Failed to run');
    }
})

Output:
First
Second

While this doesn't work:
const uWS = require('uWebSockets.js');

const app = uWS.App();

app.any('/*', (res, req) => {
    console.log('First')
    req.setYield(true);
    res.onAborted(() => {
        res.aborted = true;
    });
})

app.get('/api',(res,req)=>{
    console.log('Second')
    res.end('Hello');
})

app.listen(9001, (token) => {
    if (token) {
        console.log('Running');
    } else {
        console.log('Failed to run');
    }
})

Output:
Second
First
First
First

If I comment out req.setYield(true); then it will output:
Second
First

I tested this a bit just now, looks like app.any() always matches after the other types like app.get(), it doesn't matter if you assign it before the other ones in the JS. The best way for this to work would be to match in the order it was assigned in the JS. In my apps I always use a single app.any() to handle all requests so I don't have this issue but seems like it should be fixed

More discussion about this here https://github.com/uNetworking/uWebSockets/issues/975
My recommendation is use a single app.any(/*) because then you can code exactly how you want it without worrying about all these routing rules, but maybe it's just my preference

It's a toipic in the user manual, you can read it there: https://github.com/uNetworking/uWebSockets/blob/master/misc/READMORE.md#pattern-matching
The router is a tree, not a linear vector, so there is no way to have it by order like Express does it. A tree is much more efficient, but has no sane ordering.

@hst-m Your recommendation routes in O(n), the router in uWS routes in O(log n) if your routes are decently balanced. Maybe this doesn't matter for your use case, but it's inferior, algorithmically.

There are performance considerations and there are logic/flow/readability considerations, @d4n5h is trying to do what every user will want to do which is do some functions before the other routes get called, but currently any('/*) won't get called before so it doesn't work, so then instead you have to manually add these functions to every get() route which is redundant and difficult to maintain with many routes. Instead if you do a single any('/*) you can easily code exactly what you need one time. Regarding performance, if you have critical paths you can optimize your JS to route match those paths first, therefor I believe a single any('/*) is good option

Whatever floats your boat, of course. I don't like the recommendation though. I don't want to promote usage that ignores the router that is already built-in. There's nothing that "cannot be done" or is "hard to maintain" if you know how to compose basic  functions. Even things like "middleware" is really just function composition.
The problem with encouraging people to do their own routing is you end up with projects like Express, where 40% of the overall performance is lost in routing. Your particular snippet is probably fine, but Express is insane - they do RegEx kind of search in linear fashion which severely limits performance and I've worked for companies I cannot legally disclose - but I know cases where the routing list can cut performance down 90%. And that is sad, even if it might now affect the business monetary flow, it still sucks.
So yeah, I have pretty strong opinions here.

I noticed people building things on top of this library doing strange things, I've got app with complex stuff going and everything working well with this library so no complaints so far

Well, sometimes I just want to buy a farm and grow potatoes for a living.

@alexhultman @hst-m
Got it. it makes total sense. I don't want to make the same mistakes as Express, but there are some concepts which I still fond of and often there's a way to achieve the same (or similar) results in a way which doesn't sacrifice performance (too much).
I totally respect and agree with your opinion. This is not Express and for a good reason. That's why I'm trying to move away from Express. Really nice work by the way.
Anyway, I found a workaround that that will solve my problem.
I just automatically generate more routes matching (without regex, just a simple split) the path and method of the child-routes and it works in the same way as a "middleware". works like a charm and barely any performance loss.

you should post here so other people can get ideas on more ways to do it. I am fan of doing it all in JS (but no monolithic/express library on top, minimal amount only)

Module:
const { flatten } = require('array-flatten'),
    uWS = require('uWebSockets.js'),
    fs = require('fs'),
    p = require('path'),
    slice = Array.prototype.slice;

function parseQuery (query) {
    query = query.split('&');
    let results = {};
    for (let i = 0; i < query.length; i++) {
        const kv = query[i].split('=');
        if (kv.length > 1) {
            results[kv[0]] = kv[1];
        }
    }
    return results;
}

const methods = ['get', 'post', 'put', 'del', 'any', 'ws', 'patch', 'listen', 'connect', 'options', 'trace', 'publish', 'head']
const exclude = ['ws', 'listen', 'connect', 'options', 'trace']

const uApp = function (options = {}) {
    this.uWS = uWS;
    if (options.ssl) {
        this.app = this.uWS.SSLApp(options.ssl);
    } else {
        this.app = this.uWS.App();
    }

    this.stack = [];
    this.req = {};

    this.set = function (key, val) {
        this.req[key] = val;
        return this;
    }

    this.use = function use(fn) {
        let offset = 0;
        let path = '/';

        if (typeof fn !== 'function') {
            let arg = fn;

            while (Array.isArray(arg) && arg.length !== 0) {
                arg = arg[0];
            }

            if (typeof arg !== 'function') {
                offset = 1;
                path = fn;
            }
        }

        const callbacks = flatten(slice.call(arguments, offset));

        callbacks.forEach((callback) => {
            if (callback.stack) {
                req = Object.assign(callback.req, this.req)
                callback.stack.forEach((cb) => {
                    this.stack.push({
                        path: path + cb.path, isMw: cb.isMw, method: cb.method, callback: function (res, req) {
                            req = Object.assign(req, this.req)
                            req.query = parseQuery(req.getQuery());
                            cb.callback(res, req)
                        }
                    })
                })
                const newReqs = Object.keys(callback.req);
                for (let i = 0; i < newReqs.length; i++) {
                    const key = newReqs[i];
                    const val = callback.req[key];
                    this.req[key] = val;
                }
            } else {
                if (path == '/') {
                    path = '/*'
                }
                this.stack.push({
                    path: path, isMw: true, method: 'any', callback: (res, req) => {
                        req = Object.assign(req, this.req)
                        req.query = parseQuery(req.getQuery());
                        req.setYield(true);
                        res.onAborted(() => {
                            res.aborted = true;
                        });
                        callback(res, req);
                    }
                })
            }
        })
        return this;
    };

    const that = this;
    methods.forEach(method => {
        uExpress.prototype[method] = function (path, callback) {
            this.stack.push({
                path: path, method: method, callback: function (res, req) {
                    req = Object.assign(req, that.req)
                    req.query = parseQuery(req.getQuery());
                    callback(res, req)
                }
            })
            return this
        }
    });

    this.listen = function (port, cb) {
        if (this.req.static) {
            this.get(this.req.static, (res, req) => {
                const filename = p.join(__dirname, req.getUrl())
                const totalSize = fs.statSync(filename).size;
                const readStream = fs.createReadStream(filename);
                pipeStreamOverResponse(res, readStream, totalSize);
                res.onAborted(() => {
                    res.aborted = true;
                });
            })
        }

        for (let i = 0; i < this.stack.length; i++) {
            const route = this.stack[i];
            if (route.path.includes('*') && route.isMw) {
                const base = route.path.split('*')[0];
                for (let x = 0; x < this.stack.length; x++) {
                    if (this.stack[x].path.includes(base) && !this.stack[x].path.includes('*') && !this.stack[x].isMw && !exclude.includes(this.stack[x].method)) {
                        this.app[this.stack[x].method](this.stack[x].path, route.callback)
                    }
                }
            } else {
                this.app[route.method](route.path, route.callback)
            }
        }
        this.app.listen(port, cb);

    }
    return this;

}

module.exports = uApp;

Usage:
let app = require('./uApp.js');
const port = 9001;

app = new app();

app.use((res, req) => {
    app.req.test = 'test'
})

app.get('/api/:id', (res, req) => {
    console.log(req.test)
    res.end('asd')
})

app.listen(port, (token) => {
    if (token) {
        console.log('Listening to port ' + port);
    } else {
        console.log('Failed to listen to port ' + port);
    }
})

that is a pretty large amount of complex code added on top, plus external library that needs to be installed. In my method of doing this, I would do the same thing in only a couple lines of code instead of 150. Here is how I would do the same example:
app.any('/*', (res, req) => {
  const method = req.getMethod()
  const path = req.getUrl()
  res.test = 'test'
  switch(method) {
    case 'get':
      if(path.startsWith('/api/')) {
        const id = path.slice(5)
        console.log(res.test, id)
        return res.end('asd')
      }
  }
  res.writeStatus('404').end()
})

then you continue adding endpoints in the same way, no extra large amount of opaque code needed, the least amount of code possible in the clearest and shortest way. You've basically got an Express thing going on there lol was not expecting that. It's not even the performance that is an issue for me with that, it's the added complexity that is just not needed. this is all my opinion however obviously and how I prefer to code

@hst-m That's also an option. But it doesn't let you pass the additional req variables/objects to routes in other files in recursion.
I don't mind it being similar to Express in a sense of organization. If I could do things in a similar way without sacrificing performance then it's not a bad thing, even with the added complexity. That's why you've got frameworks. And this (in comparison to Express) is extremely streamlined.
Anyway, I can remove the external libraries so it will only be depended on uWS.

I matched your example to show how I would do the same thing, but if you have a different more involved example that showcases more of the code I would be interested in seeing that and matching it in my style to compare, use the most complete and advanced example you can and I could try to match it

@hst-m
https://gist.github.com/d4n5h/dbd7f64c7fc09abf9b4eec99401833d5 Try this one and go to: http://localhost:9001/routerPath/api
It will load the routes from route.js to the main stack and pass req to all of them

@hst-m The benefit of this functionality, for example: let's say you want to check Auth only in one place and pass the result to all routes in different files. Or you want to work on a part of the API in an isolated way. Or reuse a part of the API in another project or even be a standalone app without almost any adjustment to the code. Very much like a separation of microservices.

ok just getting back and looking at this.
Ok so the only difference here is you moved part of this to an external file, and your example you described using this for would be to "check Auth only in one place and pass the result to all routes". But that would be very easy to do without this "Route" feature thing and without the external file. In my app I have thousands of subdomains that change programmatically each with multiple types of cookies for multiple users on each subdomain, and I have no problem checking auth in multiple different places and passing those to the different routes, all with fairly simple code (like a couple lines) so I dont see the benefit in this case.
the 2nd example you say would be to "reuse a part of the API in another project or even be a standalone app without almost any adjustment to the code". For my server app I only need 1 file so this applies less to me, so it's possible this is helpful to you in some way, though I would think you could do it in less code, but it would depend on what you are trying to do. Some side trivia: Deno (Node 2.0) is now refactoring their entire codebase into a single 10k line file because it is easier to work with than many individual files (see dev link)
so in conclusion I still believe it is important to use as little code as possible, you need to save the complexity for parts that really need it and keep everything else as simple as possible. this is just what works for me though and I enjoy looking at what other people are doing

@hst-m There is no silver bullet which will fit in all circumstances. I understand your perspective, and for you it make sense to use this library as-is. I really don't know what is complex in what I did, with my code you could still use uWS in the exact same way but you'll have a few other functions that can make some workflows a bit more easier and it shouldn't effect performance since the routes are converted to regular uWS routes at build time and there's no change in the way the route system works.

I asked for an updated example that added functionality, and all the updated code does is add a 2nd basic endpoint /api except now it spans more files than the 1st example and still uses all of that code that is completely unnecessary, so I have still not seen an example of where any of this is necessary, maybe I am missing something

What you don't understand?... If you want to separate the router/app to multiple files because for most people (clearly not you) it's easier to maintain especially if you work in a team which each person work on different part of the app and you want to test each part separately in isolation or to reuse it and a different app. If you don't see the value in it but you say that "but no monolithic..." then it's a bit strange.  Anyway, no. I will not work on a 10k line file and I will not use this library in the way that you suggested (creating one any route and using a switch) lol. Maybe I'm weird but when I open a browser I like to have multiple tabs and not one tab with the content of 20 websites. And I prefer to read a book with muiltple pages and not a scroll. Need more examples?

@hst-m anyway, could you provide me with an example that achieves the same result (separate router/app files with shared req objects) without using your solution of using one any wildcard route and a switch?

My app is only 200 lines of code so far, obviously 10k is for a major application like Deno. It is true I am the only developer so it is much easier for me to code only what is needed. I previously worked with a team for a company and it was very difficult to work on things in a way everyone agrees. In fact it tore the company apart and resulted in massive amount of bugs and the product never launched because the entire thing was way over-complicated between the front-end and back-end, that is where I get my philosophy from. I can look into doing what you requested

I asked for an updated example that added functionality, and all the updated code does is add a 2nd basic endpoint /api except now it spans more files than the 1st example and still uses all of that code that is completely unnecessary, so I have still not seen an example of where any of this is necessary, maybe I am missing something

I will not write you a whole api just for an example. I think that you can imagine how this example might scale.

My app is only 200 lines of code so far (client-side at 650 vanilla js for the main SPA page), obviously 10k is for a major application like Deno. It is true I am the only developer so it is much easier for me to code only what is needed. I previously worked with a team for a company and it was very difficult to work on things in a way everyone agrees. In fact it tore the company apart and resulted in massive amount of bugs and the product never launched because the entire thing was way over-complicated between the front-end and back-end, that is where I get my philosophy from. I can look into doing what you requested

Seems like bad project management. You should've use scrum/kanban. By the way, another great reason why to use frameworks.

Yes it is 100% dependent on whoever is in charge, and the lead devs were clueless and there was nothing I could do because I disagreed with everything they were doing. I am very anti-framework though and enjoy my vanilla javascript, and is why I like this uws library because it is simple/basic does what it needs and thats it

Deno (Node 2.0) is now refactoring their entire codebase into a single 10k line file because it is easier to work with than many individual files (see dev link)

Monkeys throw their feces. That doesn't mean we should copy them. The Pope rapes children. That doesn't mean we should.
Deno is written by amateur hipsters with no direction or leadership. Anything goes, as long as you use correct pronouns and only bring positive feedback. It's a safe space community. They are insane.

well you cut out where I said "side trivia" because it is mostly meaningless, mostly entertaining to see how other people are doing things, their internal debate documents leaked, and happens to be somewhat related in that its supposed to be http server etc

I don't think they have anything internal. There's no leadership. Ryan is a people pleaser, he'll say yes to everyone then sail in randomly changing direction.
 Then I tell him the performance is crap and I get banned.

@hst-m That document you linked doesn't even say they moved 10k lines in one file for ease of use, they did that because they had "bootstrapping problems" and TypeScript problems. Linking to something you haven't even read is very lazy.

very clearly says "this will allow new contributors to quickly understand how Deno bootstraps itself" which means it is easier to use and understand, which I tend to agree with in my own experience

then it says "Build-time complexity and performance is obviously better with this setup"

You're focusing on select sentences and pulling them out of context. The context is that TypeScript enforces certain parts they dislike. That's their problem definition.
Look I can also pull individual sentences out of context:

the idea of having a 10k line javascript file sounds unappealing

Thanks for today, I'll be removing this issue


Wrong parameters

Since yesterday my integration is no longer working. Home assistant is giving this log.
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/clevertouch/coordinator.py", line 79, in _async_update_data
    self.user = await self.api_session.get_user()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/clevertouch/objects.py", line 58, in get_user
    await user.refresh()
  File "/config/deps/lib/python3.11/site-packages/clevertouch/objects.py", line 121, in refresh
    data = await self._api_session.read_user_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/clevertouch/api.py", line 148, in read_user_data
    result = await self._read(endpoint, payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/clevertouch/api.py", line 125, in _read
    raise ApiCallError(result.status, f"Read failed with {result.status}")
clevertouch.api.ApiCallError: Read failed with ERR_PARAM(3): Wrong parameters
2023-10-28 05:11:59.467 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
2023-10-28 05:11:59.467 ERROR (MainThread) [homeassistant] Error doing job: Unclosed connector
2023-10-28 05:12:16.129 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
2023-10-28 05:12:38.304 ERROR (MainThread) [custom_components.clevertouch.coordinator] Unexpected error fetching<EMAIL_ADDRESS>data: Read failed with ERR_PARAM(3): Wrong parameters
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/clevertouch/coordinator.py", line 79, in _async_update_data
    self.user = await self.api_session.get_user()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/clevertouch/objects.py", line 58, in get_user
    await user.refresh()
  File "/config/deps/lib/python3.11/site-packages/clevertouch/objects.py", line 121, in refresh
    data = await self._api_session.read_user_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/clevertouch/api.py", line 148, in read_user_data
    result = await self._read(endpoint, payload)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/clevertouch/api.py", line 125, in _read
    raise ApiCallError(result.status, f"Read failed with {result.status}")
clevertouch.api.ApiCallError: Read failed with ERR_PARAM(3): Wrong parameters

Can the API have been changed on e3 side?

It's possible. Still works on my side though. Both reading and writing.
I restarted HomeAssistant to make sure it wasn't an initialization issue only.
I believe I am on an old version of HomeAssistant but that is likely irrelevant given the error message.
I did not attempt to remove the service and add it again.
Maybe you should at least try the restart.
(I of course assume that your installation works in the CleverTouch app.)

If it works for you, it is unlikely they introduced a breaking change on
their side. And the app works.
But I am on a rather new version of HA. Maybe the latest:
2023.11.0b1
Sent from Gmail Mobile
On Sat, 28 Oct 2023 at 08:30, Michael Hemph @.***>
wrote:

It's possible. Still works on my side though. Both reading and writing.
I restarted HomeAssistant to make sure it wasn't an initialization issue
only.
I believe I am on an old version of HomeAssistant but that is likely
irrelevant given the error message.
I did not attempt to remove the service and add it again.
Maybe you should at least try the restart.
(I of course assume that your installation works in the CleverTouch app.)
—
Reply to this email directly, view it on GitHub
https://github.com/hemphen/hass-clevertouch/issues/7#issuecomment-1783721374,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEBC6PEXN2HHXH7OHOCKFU3YBSRBTAVCNFSM6AAAAAA6TWYIOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTG4ZDCMZXGQ
.
 I'll have time to upgrade and look into it.
There is another non-critical issue anyway that seems to have been introduced with newer versions HomeAssistant (#6).

Thats great!
Let me know if I can help and when to test!
Sent from Gmail Mobile
On Sat, 28 Oct 2023 at 09:10, Michael Hemph @.***>
wrote:

Fortunately Höstlov (school holiday) is coming up. I'll have time to
upgrade and look into it.
There is another non-critical issue anyway that seems to have been
introduced with newer versions HomeAssistant (#6
https://github.com/hemphen/hass-clevertouch/issues/6).
—
Reply to this email directly, view it on GitHub
https://github.com/hemphen/hass-clevertouch/issues/7#issuecomment-1783728923,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEBC6PDFCCQUHZCZAAOGJF3YBSVWVAVCNFSM6AAAAAA6TWYIOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTG4ZDQOJSGM
.
You are receiving this because you authored the thread.Message ID:
@.***>

Upgraded to latest stable (container) version 20231005.0 without issues. Integration still works, perhaps "unfortunately" since it makes debugging much harder.
So, two simpler tests remains:

For you to reconfigure your account - it could possibly be your session token that has expired. It has some absurd lifetime - two years or so - meaning that I never got around to implement a refresh for it. I am not sure exactly how the reconfiguration affects your customizations though. I guess they will go unaffected given that you're not changing any names or device ids etc. but I can't promise anything. I would recommend backing up your config.

For me to install the beta - but it seems like a long shot.

If none of those works I need to implement better logging and you perhaps increase verbosity on your side.

Alright, it seems more and more likely that it is something on my side.
I can absolutely try to reconfigure the account. But how do I get the
integration to prompt for username/password again?
Is the token stored in some file that I could replace? I can easily get it
from the browser.
On Tue, Oct 31, 2023 at 11:49 AM Michael Hemph @.***>
wrote:

Upgraded to latest stable (container) version 20231005.0 without issues.
Integration still works, perhaps "unfortunately" since it makes debugging
much harder.
So, two simpler tests remains:

For you to reconfigure your account - it could possibly be your
session token that has expired. It has some absurd lifetime - two years or
so - meaning that I never got around to implement a refresh for it. I am
not sure exactly how the reconfiguration affects your customizations
though. I guess they will go unaffected given that you're not changing any
names or device ids etc. but I can't promise anything. I would recommend
backing up your config.
2.
For me to install the beta - but it seems like a long shot.
If none of those works I need to implement better logging and you perhaps
increase verbosity on your side.
—
Reply to this email directly, view it on GitHub
https://github.com/hemphen/hass-clevertouch/issues/7#issuecomment-1786967714,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEBC6PCW3NLYQYDB6JRSCJDYCDJSVAVCNFSM6AAAAAA6TWYIOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBWHE3DONZRGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

I got it!
The HA Gui was a bit buggy, but re-adding the integration from the
integration settings page eventually worked.
Thanks for the help!
On Tue, Oct 31, 2023 at 8:28 PM Lars Hasselrot @.***> wrote:

Alright, it seems more and more likely that it is something on my side.
I can absolutely try to reconfigure the account. But how do I get the
integration to prompt for username/password again?
Is the token stored in some file that I could replace? I can easily get it
from the browser.
On Tue, Oct 31, 2023 at 11:49 AM Michael Hemph @.***>
wrote:

Upgraded to latest stable (container) version 20231005.0 without issues.
Integration still works, perhaps "unfortunately" since it makes debugging
much harder.
So, two simpler tests remains:

For you to reconfigure your account - it could possibly be your
session token that has expired. It has some absurd lifetime - two years or
so - meaning that I never got around to implement a refresh for it. I am
not sure exactly how the reconfiguration affects your customizations
though. I guess they will go unaffected given that you're not changing any
names or device ids etc. but I can't promise anything. I would recommend
backing up your config.
2.
For me to install the beta - but it seems like a long shot.
If none of those works I need to implement better logging and you perhaps
increase verbosity on your side.
—
Reply to this email directly, view it on GitHub
https://github.com/hemphen/hass-clevertouch/issues/7#issuecomment-1786967714,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEBC6PCW3NLYQYDB6JRSCJDYCDJSVAVCNFSM6AAAAAA6TWYIOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBWHE3DONZRGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Great! I'll keep this issue open if someone else run into the same problem.
I also added a new issue #8 with the (supposedly) proper fix, which is supporting the reauthentication config flow.


Proposal to Use __events__ instead of register_event_type

Description of the Feature
So kivy has two ways for registering an event, one way is to use register_event_type method, which involves calling this method at the __init__ level. But there's a drawback on this approach; this does not allow binding an event during when an object is created. Example code of binding an event object during object creation, assuming on_fire to be the event:
Object(height=2, on_fire=self.fire)

But with the current implementation of event registering in kivymd, you get to write two lines of code
obj = Object(height=2)
obj.bind(on_fire=self.fire)

A quick fix for this while using register_event_type would be to call register_event_type before super
Example code:
class Object(Widget):
    def __init__(self, **kwargs):
        self.register_event_type("on_fire")
        super().__init__(**kwargs)

    def on_fire(self):
        pass

A more cleaner fix would be
class Object(Widget):
    __event__ = ("on_fire",)

    def on_fire(self):
        pass

Thanks, let's check it out!


Intermediate Sorting Algorithms in Python

List of beginner to intermediate algorithms in Python:

[ ] Wiggle sort

[ ] Tree sort

[ ] Shell sort

[ ] Tim sort

[ ] Stooge sort

[ ] Recursive Quick Sort

[ ] Recursive Insertion Sort

[ ] Recursive Bubble Sort

[ ] Random Pivot Quick Sort

[x] Bead Sort

[ ] Bitonic Sort

[x] Bogo Sort

[ ] Bucket Sort

[x] Cocktail Shaker Sort

[ ] Comb Sort

[x] Pigeon Sort

[ ] Pancake Sort

[ ] Gnome Sort

[ ] External Sort

[ ] Double Sort

[ ] Cycle Sort

Please comment on which one you would like to work on so that we can assign you.
Please make separate PRs for every algorithm so that it gets easy for us to review as well.
Join our slack channel  here. . Keep Contributing. Thankyou :)

Hey @geekquad I would like to work on Recursive Insertion Sort. Please assign me..

Hey @geekquad I would like to work on Recursive Insertion Sort. Please assign me..

Hey Kritika, surely, We'll assign you with it. Just wait for today, and you'll be good to go from tomorrow.

Hi, @geekquad when the hacktoberfest starts please assign me Recursive Quick Sort

Hi, @geekquad I would like to work on recursive bubble sort, please assign me!

Hello Everyone!
Assigning @kritikaparmar-programmer with Recursive Insertion Sort.
Assigning @arkodeepg with Recursive Quick Sort.
Assigning @utkarshbajaj with Recursive Bubble Sort.
Remember, PRs will be counted from the 1st of October. Please go through the  contributing  guidelines too. Please join our  Slack  channel as well.

I would like to work on the following :
Bead Sort, Bitonic Sort, Bogo Sort, Bucket Sort, Cocktail Shaker Sort, Comb Sort
if Multiples are allowed, so @geekquad  pls assign me these.

Assigning Bead Sort, Bitonic Sort, Comb Sort to @Siddhant-K-code
Remember, PRs will be counted from the 1st of October.

Hi, I would like to work on  tree sort, Tim sort, Pancake Sort and External Sort.

Hi I would like to work on trim sort

Hey @

Hi I would like to work on tim sort

Hey Srishti, which one would you like to work upon. Remember, PRs will be counted from 1st Oct. Also, do join the slack channel.

Tim Sort

Assigning @srishtipoudel with Trim Sort

Hey, @geekquad I would like to work on Cocktail shaker sort and Bitonic sort.

Hello @geekquad , I would like to work on tree sort and random pivot quick sort.

Assigning Cocktail Shaker Sort and Boggo sort to @vlx01
Assigning Random Pivot Quick Sort and Tree Sort to @sarthakregmi

Hi @geekquad Just had a lil confusion since it is going to be my first time contribution in open source project, should we have to sort the given dataset or only write the sorting algorithm code in python?

Hello, I'd like to work on Merge Sort.

Hello , I'd like to work on Gnome sort

Assigning Gnome Sort to @ABHI165
Remember, PRs will be counted from the 1st of October.

Can we have other algorithms like binary search ,bubble sort etc??

Can we have other algorithms like binary search ,bubble sort etc??

Hello @rohitjoshi6, we already have them.
Please go through all the issues.

Yes Apologies for not going through them earlier.
I will try contributing over there

Hi @geekquad i want to work on Bucket Sort. please assign me.

hi i want to work on Pancake Sort

Assigning @chaturvediabhay24 with Bucket Sort.
Assigning @icecreamcake101 with Pancake Sort

hey @geekquad  i would like to work on piegon sort

Assigning Pigeon Sort to @arpita1899

Hello @geekquad, can I please work on wiggle sort?

Hey, I would like to work on Cycle Sort.

Assigning Cycle sort to @alpha037

Hi, I want to work on Shell Sort too, can you assign me @geekquad ?

Hi, I want to work on Shell Sort too, can you assign me @geekquad ?

Hey @srishtipoudel, Shell sort is already taken up by someone. Is there any other algorithm you would like to contribute to?

what about stooge sort, external sort
I didn't anyone assign in that @geekquad

Assigning Stooge Sort and External Sort to @srishtipoudel

Hello, could you assign me double sort and cycle sort?

Assigning @sarthakregmi with double sort.
Cycle sort has been already assigned.

@MAJOR-BEAST create pr with pancake sort pls check

Hello @MAJOR-BEAST @geekquad, I would like to work on this issue :)
sorting algorithm which I want to add in the repo is ...

[x] Heap sort
[x] raddix sort
[x] tree sort

Thank you :)

Hi @geekquad I would like to contibute for random pivot quick sort. Could you please assign this issue to me?

Assigning @hritik5102 with tree sort

Assigning Random Pivot Quick Sort to @ddhira123.

@geekquad I would like to work on Shell Sort.

Assigning Shell Sort to @riddhi-jain

Hey @geekquad Can I take Gnome sort if it's still up ??

hey @panda311, I am sorry but it is already assigned. But please stay with us for a while. We are adding more issues. You can grab the. Please do a check on the issues after a while.  Join our slack channel for further information.

@geekquad   I want to work on recursive insertion sort. Can u assign it to me if its still there?

@geekquad Please assign me bucket sort if it's still available. Thanks!

Hey @nickymarino, unfortunately, they are already assigned to someone else. But we have more issues here.

I would like to contribute Wiggle sort , Counting sort, Strand sort, Topological sort and Pigeonhole sort, @geekquad could you please assign me.

I would like to contribute Counting sort and Strand sort, @geekquad could you please assign me!!

Hey @geekquad please assign me recursive quick sort

Assigning @Kamesh-Mishra with Counting sort and Strand sort.
Assigning @kritikaparmar-programmer with Recursive quick sort.

#Added Counting Sort #287

#287

Assigning @Kamesh-Mishra with Counting sort and Strand sort.
Assigning @kritikaparmar-programmer with Recursive quick sort.

#287

Hi! Please assign me Recursive Insertion Sort.

Assigning Recursive Insertion Sort to @adi-mohan.

I was assigned to Gnome sort in CPP but I pushed the algorithm in Python instead. You can assign me on Gnome sort here if you wish.

Hey @Vrok2401, it is okay. Since you have already pushed it and the code has been merged I have omitted it. Thankyou.

Hey @nickymarino, Bucket Sort is available. Let me know if you would like to work on it. Thankyou.

@geekquad I can do it!

Awesome. Assigning Bucket Sort to @nickymarino.

Assign me cycle sort

Assigning Cycle Sort to @Its-Puja-Singh

I like to add cycle sort.can you assign me.

Hey @geekquad  can I work on cycle sort.

Assigning Cycle Sort to @Poobalan1210.
Sorry @LakhanMardi, issues are first come first serve.


Chore: Update dependencies - April 2024

Did some chore updates to make sure we are free of any vulnerabilities due to dependencies.

You are welcome @gounthar!


Broken unicode text when building on Windows systems

Description of the bug & expected behaviour (required)
On Windows, the Java compiler assumes a file encoding "appropriate" for the user's language settings instead of UTF-8. If the plugin is built on Windows, the generated JAR file will have broken Pokémon strings.

The fix is to set Java compiler to use UTF-8. I will make a PR for this in a bit.
Environment Info (required)

OS: Windows
JetBrains Product: Any
JetBrains Product Version: Any
Plugin Version: Any

Fixed in 1.7.0


Any example for ArmFileEncoder?

I could see there is a sample for ArmFileDecoder. Would be great if there is a sample for ArmFileEncoder as well so that it would be easy to use. Thanks in advance.

you can refer this file https://github.com/kevinho/opencore-amr-android/blob/master/Codec/app/src/main/java/io/kvh/media/sound/Filer.java

Does the short[] input and byte out used in encode are fixed? With 160 and 32 values the time taken to convert is more. Is there anyother relation between these two variable so that can the read speed can be increased.


Remove the undefined type from optional property

Same as the merged one(https://github.com/Magickbase/neuron/pull/52) but the previous one was mistakenly merged without squash so I create the new one


Cannot automatically sort tailwindcss classes

Cannot automatically sort tailwindcss classes
Please write your blade template that occurs issues.
I tried settings  sortTailwindcssClasses to true in both rc file and vscode settings.json but it does not sort the tailwindcss classes
Context (Environment)

<EMAIL_ADDRESS>Laravel Version 9.28.0

Description

My config file
.bladeformatterrc.json
{
    "wrapAttributes": "force-expand-multiline",
    "sortHtmlAttributes": "code-guide",
    "endWithNewLine": true,
    "noMultipleEmptyLines": true,
    "sortTailwindcssClasses": true
}

Before formatting

        Select Event

@livewire('admin.select-event')

After formatting

        Select Event

@livewire('admin.select-event')

The gap-4 class should be after flex-row

Hi @jedymatt
It seems classes are already sorted.
When I formatted below

        Select Event

@livewire('admin.select-event')

it will be formatted into

        Select Event

@livewire('admin.select-event')

This behaviour is compatible with official tailwind prettier plugin.

My bad, I thought it sorts alphabetically

Thanks for the response


XML highlighting breaks because of special treatment for style

XML highlighting breaks on the following XAML snippet:
<Style TargetType="TextBox">
  <Style.Triggers>
  </Style.Triggers>
</Style>

As far as I can see the reason is special treatment of style because of HTML. I understand this makes sense for HTML but it doesn't for any XML flavor, e.g. XAML as above. Why not have HTML as a separate language and keep XML generic without special cases of any kind?

They used to be apart long ago but have been merged to reduce maintenance. But the problem you describe is real, so we have to find a way around it. Thanks for reporting it!
Current idea: make HTML a separate language with subLanguage: 'xml' at the root mode and define only styles, scripts etc. One problem is that it will have extra <span class="xml"> within <code>.


variable-tabs: tab-size option and tab to spaces replacement

I think we can swap all 4 spaces with tabs and replace them back on save.
With that technique we can provide to users any tab size they want in generated code.

Thanks :+1:


[FirebaseAuth]: Unhandled Exception: type 'List<Object?>' is not a subtype of type 'PigeonUserInfo' in type cast

I'm having the same issue as in #13077, no suggestions from that thread or other sources worked so far. It seems I can't reopen the issue #13077, so I'm creating a new one.
try {
      final googleAccount = await _googleSignIn?.signIn();
      final googleAuth = await googleAccount?.authentication;
      final googleCredential = GoogleAuthProvider.credential(
        accessToken: googleAuth?.accessToken,
        idToken: googleAuth?.idToken,
      );
      await FirebaseAuth.instance.signInWithCredential(googleCredential);
    } catch (error, st) {
      //
    }

And I see it's printing
I/flutter (31925): error caught: type 'List<Object?>' is not a subtype of type 'PigeonUserDetails?' in type cast #0      PigeonUserCredential.decode (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:432:23)
I/flutter (31925): #1      _FirebaseAuthHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:830:37)
I/flutter (31925): #2      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
I/flutter (31925): #3      StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:522:23)
I/flutter (31925): #4      _FirebaseAuthHostApiCodec.readValueOfType (package:firebase_auth_platform_interface/src/pigeon/messages.pigeon.dart:840:22)
I/flutter (31925): #5      StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477:12)
I/flutter (31925): #6      StandardMessageCodec.decodeMessage (package:flutter/src/services/message_codecs.dart:341:28)
I/flutter (31925): #7      BasicMessageChannel.send (package:flutter/src/services/platform_channel.dart:218:18)

Versions:
  firebase_core: ^3.3.0
  firebase_auth: ^5.1.4
  google_sign_in: ^6.2.1
  cloud_firestore: ^5.2.1
  firebase_crashlytics: ^4.0.4
  firebase_analytics: ^11.2.1

Originally posted by @myproblemchild in https://github.com/firebase/flutterfire/issues/13077#issuecomment-2274270689

Hello, I'm not reproducing this issue. Can you run flutter clean and try again?

Hello @myproblemchild, please follow the bug template so we can help you better.

Hi, My team and I are seeing the same issue. Are there any available resources to fix this issue?


Image search from homepage won't update after a previous search

Describe the bug
When we search from the homepage, and then return to it to perform a new search then the old results are shown .It's an extension of #616
To Reproduce
Steps to reproduce the behavior:

Go to 'https://search.creativecommons.org/'
2.Search something
Return to home page
4.Search something else
You'll see the previous results with new query in search box

Expected behavior
The image results should be updated
Screenshots
Search something

Press the back button to return to homepage

Search Something else by clicking on search or return key

You'll see the previous results

Desktop (please complete the following information)

OS: Windows 10
BrowserChrome
Version 79.0.3945.130

Additional context
This extends from #616

@akmadian

@brenoferreira

@DantrazTrev please do not ping mentors or admins for review unless you have not heard back for three business days. We all keep an eye on our repos, and hances are that we’ve seen your message but have not gotten around to replying yet.

Sorry


Add support where Aria Operations collectors / proxies reside in another domain

Code of Conduct

[X] I have read and agree to the project's Code of Conduct.
[X] Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
[X] Do not leave "+1" or other comments that do not add relevant information or questions.
[X] If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description
Add support where Aria Operations remote collectors or cloud proxies reside in another domain.
Use Case(s)
Add support where Aria Operations remote collectors or cloud proxies reside in another domain, such as a dual-region with collectors / proxies in the second region management domain.
Potential Configuration
In "VMware Cloud Foundation mode" the collector / proxy nodes location could be returned from SDDC Manager and Aria Lifecycle - or directly from Aria Lifecycle when not in this mode. The collectors / proxies should then be shutdown prior to the cluster.
References
No response

i can pick this up


🥰 Pleasant Spring Grand Piano Story 🥰

Hey deep-daze fans and devs,
I just wanted to share with you my little creation.
https://www.youtube.com/watch?v=1uyZhnQoTIc
This was made with deep-daze and my Optimus-Virtuoso in about 4 hours from scratch and just from the following 5 words:
🥰 Pleasant Spring Grand Piano Story 🥰
Absolutely amazing!
This is raw video and audio without any mods or post-production. Not cherry-picked, although I did a few runs on each to be fair.
I will update a link shortly with all source multimedia files just in case someone wants it.
I guess all we gotta wait for is the 3D projections and we will be able to put together a nice Projected Reality 🥰 (aka Holodeck)
Any feedback, good or bad would be tremendously appreciated.
Thanks.
Alex

You could even improve it with the new added --story_separator
With it, you could make the transitions more fluid :)

@Fliens Thanks. That is the plan. I am trying to put together a nice implementation of a deep-daze + music generator so that it would be possible to easily create movies like that. Holodeck, here we come! :)

@asigalov61
Making music videos is great
I made some but due to copyright i can't put audio on them
With audio you could even better understand what is currently being imagined
Break my stride
Walking on a dream
Mary had a little lamb <- a bit horrifying xD
I used the complete lyrics on Mary had a little lamb but for the other two I only used the chorus

@Fliens Very nice :) Thank you for sharing. I liked and subbed.
Yes, this is why I added music to mine because it makes it much more immersive. In fact, this greatly reminds me of the first silent movies era when they also started with videos, then added music, and only then voice and sfxs.
Good job! :)


Update s3gan_generation_with_tf_hub to remove duplication

The line 70 i.e. "as little as 2.5% labeled data using self- and semi-supervised learning techniques." is a repeat of line 67. This seems to be an oversight and not deliberate - hence deleting same.

Thanks @coolngr8. Submitted as https://github.com/tensorflow/hub/commit/168e9781c91738fb96a244fa8f3346060bd582c2


NSKeyedArchiver/NSKeyedUnarchiver integration point

Contains everything except for the archiver itself which is dependent on stdlib SPI approval [SR-381].

Deleting this branch. Please see PR #184.


Error during glob: TypeError: list indices must be integers or slices, not str"

What happened:
I am getting this error on a call to .glob after upgrading gcsfs and fsspec both to 2021.05.0.
The exact same code works with gcsfs=0.6.1 and fsspec=0.6.2. The only difference between the two envs that work and don't is the versions of these two libraries (and whatever version changes that may have induced indirectly in the respective envs to other packages).
  File "/deps/envs/deps/lib/python3.7/site-packages/fsspec/asyn.py", line 72, in wrapper
    return sync(self.loop, func, *args, **kwargs)
  File "/deps/envs/deps/lib/python3.7/site-packages/fsspec/asyn.py", line 53, in sync
    raise result[0]
  File "/deps/envs/deps/lib/python3.7/site-packages/fsspec/asyn.py", line 20, in _runner
    result[0] = await coro
  File "/deps/envs/deps/lib/python3.7/site-packages/gcsfs/core.py", line 637, in _glob
    return await super()._glob(path, prefix=prefix, **kwargs)
  File "/deps/envs/deps/lib/python3.7/site-packages/fsspec/asyn.py", line 435, in _glob
    root, maxdepth=depth, withdirs=True, detail=True, **kwargs
  File "/deps/envs/deps/lib/python3.7/site-packages/gcsfs/core.py", line 943, in _find
    par = o["name"]
TypeError: list indices must be integers or slices, not str"

What you expected to happen:
For the glob to continue to work. The glob format I am using has is a wildcard like gs://bucket/some/path/prefix_*.txt.
Minimal Complete Verifiable Example:
Here is where things get strange. When I fire up the interpreter in the same conda environment that is producing this error, and try the same glob pattern, everything works fine. Unfortunately executing this code path in the exact way this error is produced is very hard to intercept (remote cluster, inside of a container, etc etc).
Anything else we need to know?:
I realize below is a somewhat vague bug report. I hope to get some suggestions as to where to look, so I can produce more useful information.
Environment:

Dask version: 2.18.1
Python version: 3.7
Operating System: centos
Install method (conda, pip, source): conda. also tried pip via conda's env.yml under the -pip section, same result.

I cannot reproduce your error, so anything you can do to find out the specific situation under which is happens would be appreciated.

Thanks, I will try to recreate the env exactly and report back. I was hoping you'd maybe have some guess like "library X used to return lists but now returns dicts so that's the thing that is out of date" or something along those lines :)

I imagine, it's the detail= parameter getting lost somewhere (list of names versus list of dicts)

Also, it might depend on whether the directory has already been listed.

Ok, I tried to get the sequence of commands that are run to see if it could lead to a reproducer, it did not. Basically a few .exists and then the .glob that fails, but trying that sequence locally is fine. I cannot actually intervene (eg. with a pdb) in actual process that produces this error, so I'm at a little bit of a loss on how to further provide useful info.
However, your hunch appears to be correct that it's cache related. If I pass cache_timoue=-1 when I construct the filesystem, then I don't get the error.

I also have no reproducer (still trying to find one, but quite hard), but we also hit the same issue with .find() w/prefix. https://github.com/iterative/dvc/issues/6244

Even though I still have no reproducers, I started to notice that this codepath might be wrong when prefix is given. https://github.com/dask/gcsfs/blob/17e7a093613f3ff13544a1503aa79dbfc39eef14/gcsfs/core.py#L940-L948

Reproducer;
import secrets
from gcsfs import GCSFileSystem

bucket = "<bucket>"
random_dir = bucket + "/" + secrets.token_hex(16)

fs = GCSFileSystem(token="<token.json>")

# create a bunch of files
fs.touch(random_dir + "/test_1")
fs.touch(random_dir + "/test_2")
fs.invalidate_cache()

# populate cache
fs.ls(random_dir)

# run the find()
fs.find(random_dir, prefix="non_existing_prefix_")

OK, thanks for working up a test, we can proceed with that. I'll get back to you when I have a little time (unless you give it a go first).

I am not really familiar with gcsfs's internals, though from what I understand _get_object() shouldn't return directories, so a possible fix that I can think of is this;
--- a/gcsfs/core.py
+++ b/gcsfs/core.py
@@ -380,11 +380,11 @@ class GCSFileSystem(AsyncFileSystem):
         # Check if parent dir is in listing cache
         listing = self._ls_from_cache(path)
         if listing:
-            f = [f for f in listing if f["type"] == "file"]
-            if f:
-                return f
-            # parent is listed, doesn't contain the path
-            raise FileNotFoundError(path)
+            for file_details in listing:
+                if file_details["type"] == "file" and file_details["name"] == path:
+                    return file_details
+            else:
+                raise FileNotFoundError(path)

         if not key:
             # Attempt to "get" the bucket root, return error instead of

and also this, since even though the previous reproducer probably not fail after this, it is still wrong to try to get path if there is a prefix
--- a/gcsfs/core.py
+++ b/gcsfs/core.py
@@ -937,7 +937,7 @@ class GCSFileSystem(AsyncFileSystem):
             delimiter=None,
             prefix=prefix,
         )
-        if not out and key:
+        if not prefix and not out and key:
             try:
                 out = [
                     await self._get_object(

I don't think that I can also generate the VCRs, so if you think that these changes are correct feel free to convert them to a PR. (I can verify that these changes fix both the script above and also the test I added for DVC to check for this case).

You should be able to record VCR so long as you have a GCP account, but I can have a look soon.


added protection around structuredText calls

This should fix #429
It just checks for structuredText[startLine] before running the logic.
@gotwarlost thoughts?

This cannot fix the issue because error occurred because source code differs that actually executed after babel. Your fix just supresses problem, but doesn't solve. You will get report with wrong lines highlight if you try to test this on your code.
Also, note that branch "source-map" already has the fix, but it need more testers to consider issue fixed

I agree with @just-boris here. The root cause of all this is due to the fact that the source does not match the original source that was instrumented. The protection just hides the problem.
We should probably do something better in terms of detecting mismatches (e.g. store a hash of the source code in the coverage object and compare with the hashed content on reporting or something like that) but I'm inclined to let this fix go.

@gotwarlost I agreed that it wasn't the "proper fix", however I'm also one of those that would rather the process complete than it throw on something like this that we can protect against. This was just a "stop gap" until the original issue was fixed :)


Make reference card clickable and allow player to flip through reference card images

Instead of having a massive tooltip for the reference card, we should make the reference card clickable and show a popup which allows the player to flip through the reference cards one at a time. This design will make it easier to add new reference cards for expansions (the addition will be tracked in a separate issue).

See https://en.doc.boardgamearena.com/Game_interface_logic:_yourgamename.js#Dialogs,_warning_messages,confirmation_dialogs,.

Not sure whether this is something we should do or not.

We could move it to the echoes/cities milestone if we don't need it.  I agree that it seems optional as long as the wiki has the appropriate content.

I detached it from the milestones altogether.


Easy way of running fabio server in tests

When testing microservices, it would be nice to have an ability to run fabio server and register urls manually.
Is there any easy way doing it?

I can think of two ways:

You can start up with a property file and set the proxy.routes value with a static route. That will disable the dynamic routing update from consul and use only those routes
You can set the routes in consul as manual override and remove them afterwards.

I was actually planning to remove the proxy.routes feature since I don't see a use-case for it since the whole point of fabio is to not have such an option.
The more important question for me is why you would want to do this in the first place? If you have microservices and they register in consul during startup or test then fabio will pick their routes up. Maybe you just need to mask your tests with a consul registration/deregistration wrapper to achieve this since this is how your services would act when run in production.

I'm going to close this question for lack of feedback for now. Please re-open if you need more information or create a ticket with a specific feature request for a concrete use case.
Thx


Database rework: part 2

This PR adds some new functionality and implements more parts of the estimation branch:

grouptype are now parsed from CSV. for now it has some compat limits, but already helps on differenciating some UNIFAC variants we had on our codebase (PRSK vs Dormund UNIFAC).

all EoS that accept groups, accept the group_userlocations option. on VTPR, PRSK, UMRPR, EPPR78, you can now pass groups directly:

julia> model = EPPR78(["methane" => ["CH4" => 1],"hydrogen sulfide" => [ "H2S" => 1]]) #this form comp => pairs is new
PR{BasicIdeal, PR78Alpha, NoTranslation, PPR78Rule} with 2 components:
 "methane"
 "hydrogen sulfide"
Contains parameters: a, b, Tc, Pc, Mw

inline CSV
You can pass "inline CSV", that is:
x = """Clapeyron Database File,
              i can write anything here, unlike, association [csvtype = like] but the csv type is already specified.
              species,a,b
              sp1,1000,0.05
              sp2,700,0.41
              """

julia> getparams(["sp1","sp2"],userlocations = [x])
Dict{String, Clapeyron.ClapeyronParam} with 2 entries:
  "b" => SingleParam{Float64}("b")["sp1", "sp2"]
  "a" => SingleParam{Int64}("a")["sp1", "sp2"]

note that we can add options (at the moment, grouptype and csvtype) with the format [key1 = val1, key2 = val2]
New parsing options

@REPLACE: any filepath (or inline CSV) that starts with this, will remove all previous occurrences of the parameters inside. for example, removing kij from PCSAFT:

no_kij = """@REPLACE Clapeyron Database File,
              no kij [csvtype = like]
              species,k
             """
 model = PCSAFT(["methane","butane"], userlocations = [no_kij]) # stored kij: 0.022, with this, kij = 0

@DB: shortcut to indicate our database. now these are equivalent:

getparams(["comp1"],"SAFT/PCSAFT")
getparams(["comp1"], userlocations = ["@DB/SAFT/PCSAFT"]

@REMOVEDEFAULTS: it will remove all default locations stablished by us:

model = PCSAFT(["methane","butane"], userlocations = ["@REMOVEDEFAULTS"]) #now you need to pass all parameters

thanks to those options, PRSKUNIFAC is not needed anymore. now it returns an UNIFAC model with the correct defaults:
julia> model = PSRKUNIFAC(["water","methanol"])
UNIFAC{BasicIdeal} with 2 components:
 "water": "H2O" => 1
 "methanol": "CH3OH" => 1
Group Type: PSRK
Contains parameters: A, B, C, R, Q

the ignore_headers option will skip parsing completely for those columns instead of reading and then discarding.
GroupParam accepts the grouptype keyword argument. if no group types are found in the input csv, it will use this.

Deprecations
This pr deprecates params.param.diagvalues from all models. We do not depend on this anymore since the last version, so this is a non-functional change.

Codecov Report
Base: 85.50% // Head: 85.14% // Decreases project coverage by -0.36% :warning:

Coverage data is based on head (da19f1f) compared to base (5a088b4).
Patch coverage: 81.04% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #124      +/-   ##
==========================================
- Coverage   85.50%   85.14%   -0.37%
==========================================
  Files         202      199       -3
  Lines       12669    12783     +114
==========================================
+ Hits        10833    10884      +51
- Misses       1836     1899      +63

Impacted Files
Coverage Δ

src/database/ParamOptions.jl
100.00% <ø> (ø)

src/models/AnalyticalSLV/AnalyticalSLV.jl
0.00% <0.00%> (ø)

...rc/models/EmpiricHelmholtz/IAPWS95/IAPWS95Ideal.jl
76.92% <0.00%> (+5.49%)
:arrow_up:

src/models/SAFT/association.jl
92.91% <ø> (ø)

src/models/cubic/equations.jl
87.30% <ø> (ø)

src/models/cubic/mixing/modWS.jl
0.00% <0.00%> (ø)

src/models/ideal/ideal.jl
0.00% <ø> (-23.08%)
:arrow_down:

src/utils/core_utils.jl
33.33% <11.11%> (-66.67%)
:arrow_down:

src/database/database_rawparam.jl
90.47% <28.57%> (-0.93%)
:arrow_down:

src/models/cubic/mixing/mixing.jl
69.23% <50.00%> (+10.89%)
:arrow_up:

... and 77 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Uncaught Error: Invariant Violation: Uncontrolled(Calendar).render():

Hi!
I'm trying to implement your component to the my project but I'm receiving one error all the time.
render: ->
  <BigCalendar />

Uncaught Error: Invariant Violation: Uncontrolled(Calendar).render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.
Do you have some idea how to solve this or maybe an idea why I'm getting this kind of error?
Thank you very much!

I'm trying figure out why I'm getting this error, for example:
calendar = <BigCalendar />

console.log calendar

# ReactElement {key: null, ref: null, _owner: ReactCompositeComponentWrapper, _context: Object, _store: Object}

So this looks like that in calendar variable is valid react element but maybe somewhere inside your component is some problem. What do you think?

Hey there, I am looking into it. but these sort of issues indicate something not handling imports correctly which suggests taht your build is at fault...
How are you importing the calendar?

BigCalendar = require('react-big-calendar');
moment      = require('moment');

BigCalendar.setLocalizer(
  BigCalendar.momentLocalizer(moment)
);

Unfortunately I can't repo this, so I am kind of at the end of my ability to troubleshoot the issue.
you can set some breakpoints around and see whats going on, but it seems like browserify is doing something odd to the package.
if you console.log BigCalendar.ControlledComponent do you get anything?
if you look at the render method in the uncontrollable package (a dep of react-big-calendar) where the error is actually occurring can you follow the stack trace back up to see where something is going wrong?

console.log BigCalendar.ControlledComponent

application.js:99644(props, context, updater) {
      // This constructor is overridden by mocks. The argument is used
      // by mocks to assert on what gets mounted.

      if ("development" !== 'production')…

yeah so it doesn't look like anything is wrong with the files themselves.
I would try and follow the stacks to the main issue to pin it down. If you do end up finding something wrong with this package please let me know I will fix it quickly

Ok. I'll let you know.


[FEATURE] Cadence 1.0 updates

Issue to be solved
All Cadence code will need to be updated for compatibility with the pending 1.0 milestone.
See language reference docs for more info.
Suggest A Solution
No response
What are you currently working on that this is blocking?
No response

Can this be closed?


Updates SDK dep

Does a dep ensure -update code.gitea.io/sdk to add new structs in the sdk
Also updates commits.go to use the Identity substruct

I don't know why but looks like swagger json needs to be updated, see drone CI output

@lafriks Yeah, saw that just now. Thanks for your input. Got the swagger updated.

Codecov Report

Merging #6406 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #6406      +/-   ##
==========================================
+ Coverage   38.86%   38.86%   +<.01%
==========================================
  Files         365      365
  Lines       51389    51393       +4
==========================================
+ Hits        19970    19972       +2
- Misses      28551    28553       +2
  Partials     2868     2868

Impacted Files
Coverage Δ

routers/api/v1/repo/commits.go
72.91% <100%> (+1.17%)
:arrow_up:

models/repo_list.go
66.84% <0%> (-1.06%)
:arrow_down:

Continue to review full report at Codecov.

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


bugfix (#1485): fix charmdebug breakpoints in SMP mode

Several places in cpd startup constrained initialization to
CmiMyRank==0 based on defunct non-smp assumptions. The
restrictions for CmiRank 0 in cpd and ccs have been cut down
to the minimum.
Likewise the cmiArgDebugFlag has been refined to only
indicate that the debugger is attached. Code that formerly relied
on the (now false) assumption that it was only set on CmiRank 0
now tests for that condition explicitly. +cpd is now parsed
earlier to set cmiArgDebugFlag early enough for CmiTimerInit
to use it.
The barriers in CmiTimerInit caused a startup hang when the
debugger is attached.  Those are now disabled by cmiArgFlagDebug.
This does mean that timers may slip slightly when charmdebug
is attached, however, that is unlikely to create trouble as the
perturbations from charmdebug itself will be many orders of magnitude
greater than that slip.
atomic breakPointSet has been added to the EntryInfo struct
(when charmdebug is enabled) to safely handle entry table
modifications for entry point breakpoints.
This also includes a bunch of commented out print statements,
because debugging a debugger leaves you with a dependency on
bare bones tools.

I can't reproduce that BigSim error.  Is there something weird about that build environment I should know about?


Blow out fixes

Related to issue #1676
As a user I'd like better control over where blowout occurs. Currently my options are source plate A1, destination, trash.
As a user I'd like a surfaced default selection, so I can't select blow out and then nothing in the destination dropdown
Acceptance Criteria

[ ] Blow out destination options are: (1) Source well, (2) Destination well, (3) Trash
[ ] Blow out default displays in dropdown. There's no null state.

@howisthisnamenottakenyet did we want to remove blowout for Transfer? What about Consolidate?


Examples give flow errors, (Flowtypes incorrect?)

Using the example from the README with Flow:
// @flow
import { routerForBrowser } from 'redux-little-router'

const { reducer, middleware, enhancer } = routerForBrowser({
    routes
})

Results in Flow errors:
message: 'object literal (This type is incompatible with the expected param type of BrowserRouterArgs Property `basename` is incompatible:)'

message: 'object literal (This type is incompatible with the expected param type of BrowserRouterArgs Property `historyOptions` is incompatible:)'

message: 'object literal (This type is incompatible with the expected param type of BrowserRouterArgs Property `history` is incompatible:)'

I'm no flow expert, I just starting to use it, but if arguments are truly optional as they seem to be, shouldn't the type for BrowserRouterArgs be:
type BrowserRouterArgs = {
  routes: Object,
  basename?: string,
  historyOptions?: BrowserHistoryOptions,
  history?: History
};

instead of:
type BrowserRouterArgs = {
  routes: Object,
  basename: string,
  historyOptions: BrowserHistoryOptions,
  history: History
};

+1, Just started with flow as well, and I've been having this same issue on a fresh project using:

redux-little-router v14.3.0
flow-bin v0.64.0