Stale Data not Updating

Describe Your Problem:
The H5075 hygrometers load into Homebridge just fine with the plugin.  I see a flurry of updates from the hygrometers after the boot has completed of HomeBridge and it stabilizes.  The issue is after a little bit of time the status changes don't appear to happen and the data in the Home App becomes stale and does not update.  I can sometimes trigger an update by closing the Home App and opening it back up but this is rare.
I have tried to trigger changes with one of the hygrometers and even after a 5 degree change in temperature there is no change in the HomeBridge logs with debugging turned on.  I know the hygrometers are working beucase I am also using their data in Home Asistant and the sensors in there react to the data coming from the hygrometers.
Logs:
The only thing after the initial updates that I see in the logs with debugging turned on is the like the following.  It appears that only one is giving updates.
[28/01/2021, 16:39:37] [Backyard Christmas Lights Plug 2] Retrieved status unsuccessfully.
[28/01/2021, 16:39:37] [Backyard Christmas Lights Plug 2] getOnCharacteristicHandler: false
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getStatusLowBattery
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getCurrentTemperature 21.5369
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getCurrentRelativeHumidity 36.9 offset 0
[28/01/2021, 16:39:38] [Garage Door] Current state CLOSED
[28/01/2021, 16:39:43] [Garage Door] Current state CLOSED
[28/01/2021, 16:39:48] [Garage Door] Current state CLOSED
[28/01/2021, 16:39:53] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:02] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:03] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:08] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:13] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:18] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:23] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:28] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:33] [Garage Door] Current state CLOSED
Show the Homebridge logs here, remove any sensitive information.

[28/01/2021, 16:39:37] [Backyard Christmas Lights Plug 2] Retrieved status unsuccessfully.
[28/01/2021, 16:39:37] [Backyard Christmas Lights Plug 2] getOnCharacteristicHandler: false
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getStatusLowBattery
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getCurrentTemperature 21.5369
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getCurrentRelativeHumidity 36.9 offset 0
[28/01/2021, 16:39:38] [Garage Door] Current state CLOSED
[28/01/2021, 16:39:43] [Garage Door] Current state CLOSED
[28/01/2021, 16:39:48] [Garage Door] Current state CLOSED
[28/01/2021, 16:39:53] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:02] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:03] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:08] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:13] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:18] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:23] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:28] [Garage Door] Current state CLOSED
[28/01/2021, 16:40:33] [Garage Door] Current state CLOSED
Plugin Config:
{
"name": "Govee-Home-Hygrometers-3",
"batteryThreshold": 25,
"debug": false,
"humidityOffset": 0,
"platform": "GoveeHomebridgePlugin"
}

{
    "bridge": {
        "name": "ABIT-H-HomeBR",
        "username": "XXXX",
        "port": XXXX,
        "pin": "XXX-XX-XXX"
    },
    "accessories": [
        {
            "model": "MSG100",
            "name": "Garage Door",
            "deviceUrl": "<IP_ADDRESS>",
            "channel": 0,
            "messageId": "XXXXXX",
            "timestamp": XXXXXX,
            "sign": "XXXXX",
            "garageDoorOpeningTime": 20,
            "accessory": "Meross"
        },
        {
            "model": "MSS620",
            "name": "South Fence Rope Light",
            "deviceUrl": "<IP_ADDRESS>",
            "channel": 1,
            "messageId": "XXX",
            "timestamp": XXX,
            "sign": "XXX",
            "accessory": "Meross"
        },
        {
            "model": "MSS620",
            "name": "Backyard Christmas Lights Plug 2",
            "deviceUrl": "<IP_ADDRESS>",
            "channel": 2,
            "messageId": "XXXXX",
            "timestamp": XXXXX,
            "sign": "XXXXX",
            "accessory": "Meross"
        },
        {
            "model": "MSS620",
            "name": "North Fence Rope Light",
            "deviceUrl": "<IP_ADDRESS>",
            "channel": 2,
            "messageId": "XXXX",
            "timestamp": XXXX,
            "sign": "XXXXX",
            "accessory": "Meross"
        },
        {
            "model": "MSS620",
            "name": "Stars and Pole Rope Lights",
            "deviceUrl": "<IP_ADDRESS>",
            "channel": 1,
            "messageId": "XXXXX",
            "timestamp": XXXXX,
            "sign": "XXXX",
            "accessory": "Meross"
        }
    ],
    "platforms": [
        {
            "name": "ABIT-H-HomeBridge1911",
            "port": XXXX,
            "auth": "form",
            "theme": "auto",
            "tempUnits": "f",
            "lang": "auto",
            "platform": "config"
        },
        {
            "name": "Nest",
            "googleAuth": {
                "issueToken": "XXXXXX",
                "cookies": "XXXXX"
            },
            "platform": "Nest"
        },
        {
            "name": "ABIT-HUB",
            "hubIP": "<IP_ADDRESS>",
            "hubName": "ABIT-HUB",
            "platform": "HarmonyHubWebSocket"
        },
        {
            "name": "Camera FFmpeg",
            "cameras": [
                {
                    "name": "Front Yard",
                    "videoConfig": {
                        "source": "-i rtsp://XXXXXX",
                        "maxStreams": 3,
                        "maxFPS": 0,
                        "audio": true
                    }
                },
                {
                    "name": "Side Yard",
                    "videoConfig": {
                        "source": "-i rtsp://XXXX:XXXXXX",
                        "maxStreams": 3,
                        "maxFPS": 0
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        },
        {
            "name": "Wemo",
            "discoveryInterval": 30,
            "disableDiscovery": false,
            "disableDeviceLogging": false,
            "debug": false,
            "disablePlugin": false,
            "noMotionTimer": 60,
            "doorOpenTimer": 20,
            "manualDevices": [
                "http://<IP_ADDRESS>:49153/setup.xml",
                "http://<IP_ADDRESS>:49153/setup.xml",
                "http://<IP_ADDRESS>:49153/setup.xml",
                "http://<IP_ADDRESS>:49153/setup.xml",
                "http://<IP_ADDRESS>:49153/setup.xml",
                "http://<IP_ADDRESS>:49153/setup.xml"
            ],
            "makerTypes": [
                {
                    "makerTimer": 20
                }
            ],
            "platform": "BelkinWeMo"
        },
        {
            "name": "Govee-Home-Hygrometers-3",
            "batteryThreshold": 25,
            "debug": false,
            "humidityOffset": 0,
            "platform": "GoveeHomebridgePlugin"
        }
    ]
}

Screenshots:

Environment:

Plugin Version:  homebridge-plugin-govee v1.0.7
Homebridge Version: v1.1.7
Node.js Version: v14.15.1
NPM Version: v6.14.9
Operating System: Raspbian GNU/Linux Buster (10)

@Foxtrot79 It seems that homebridge plugin is working correctly. This is likely an integration of Homebridge with Apple Home.
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getStatusLowBattery
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getCurrentTemperature 21.5369
[28/01/2021, 16:39:37] [Govee-Home-Hygrometers-3] getCurrentRelativeHumidity 36.9 offset 0

Two things to check:

Is you Homebridge added to your Apple Home as a bridge? i.e. the answer is yes if you have any other accessories exposed to Apple Home through Homebridge.
Did you check other rooms in your Apple Home? Your screenshot shows "Office", new accessory might be added into a different room.

I do have other accessories through Homebridge showing just fine and operating normally.  These are only devices like Wemo but not any other sensors through Homebridge.  The other hygrometers I have from Govee are also showing the same issue.  I have a total of 9 and they show correctly in Homebridge but with stale data.

Do you see Govee sensors on the "Accessories" tab in your Homebridge web UI?

I do see the sensors in the Accessories tab but the data is not changing.  I forced a temperature change on the Office sensor and it is not reflecting the change.  It still shows the temperature is 68.7 F degrees when the temperature on the physical sensor is 80 F.

@Foxtrot79 I identified two separate problems in your report:

Govee sensors show up as accessories in Homebridge, but not in Apple Home.
Values for Govee sensors stop updating after some period of time.

Did I frame these problems correctly and are both 1) and 2) pressing issues?
if 1) is an actual problem and not a user mistake, then this is the most puzzling to me. I'd suggest reaching out to Homebridge community for help.
as for 2), I think there's something about your bluetooth module where subscription dies out after some time. There might be a workaround to renew that automatically.

I can reach out to the home bridge community about the module but I have tried two different bluetooth modules and the same results happen.  Is there a place that I should pose the question about the module in particular that you could recommend?

@Foxtrot79 Raspbian PI community will be more likely to help than Homebridge. Also, this plugin uses noble to handle bluetooth, worth checking out their issues page and see if anyone else experiences similar issue: https://github.com/abandonware/noble/issues

Thank you for your help.

I'm absolutely experiencing this too @asednev . I've tried a couple different USB bluetooth adapters (x86_64 running on Ubuntu Server).
I dug into the code a little bit, and it looked to me like there was no code to refresh the temperature/humidity data (only on plugin initialization).
Perhaps your homebridge instance is being rebooted routinely, giving you the illusion of temperature/humidity updates?

@clogan2 thank you for looking into the code. Here's the line where subscription for peripheral discovery takes place: https://github.com/asednev/homebridge-plugin-govee/blob/master/src/platform.ts#L66
All events captured from bluetooth are passed into the instance of accessory right here: https://github.com/asednev/homebridge-plugin-govee/blob/master/src/platform.ts#L88
It's not accidental that temperature & humidity updates are working without homebridge reboot. I suspect that on some devices subscription to peripheral discovery is short lived. Might be worth digging into noble. Here's relevant API that this plugin uses underneath: https://github.com/noble/noble#peripheral-discovered

@Foxtrot79 @clogan2 I implemented some logic to restart subscription if it dies. Could you try testing this and provide feedback on whether this helped?
You will need to install version 1.1.0 - beta: https://www.npmjs.com/package/homebridge-plugin-govee/v/1.1.0
this gif shows how to install beta plugins:

@Foxtrot79 @clogan2 There is a new beta version 1.1.1. which incorporates this fix and a fix for another issue. Look forward to hearing if the fix worked for you.

I tried to install the beta but the GIF you are showing is to install a beta for Home Bridge itself.  I tried running the command that is on the page for 1.1.0 in the Home Bridge terminal but it errors out with the following:
pi@homebridge:/var/lib/homebridge $ npm i<EMAIL_ADDRESS>
<EMAIL_ADDRESS>install /var/lib/homebridge/node_modules/usb
prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /home/pi/.npm/_prebuilds/b839e8-usb-v1.6.5-node-v83-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.5/usb-v1.6.5-node-v83-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.5/usb-v1.6.5-node-v83-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=14.16.0 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/var/lib/homebridge/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:10: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^~~~~~~~~~~
compilation terminated.
make: *** [libusb.target.mk:148: Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/var/lib/homebridge/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.4.79-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/lib/homebridge/node_modules/usb
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN saveError ENOENT: no such file or directory, open '/var/lib/homebridge/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/var/lib/homebridge/package.json'
npm WARN homebridge No description
npm WARN homebridge No repository field.
npm WARN homebridge No README data
npm WARN homebridge No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>install: prebuild-install --verbose || node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

<EMAIL_ADDRESS>updated 1 package and audited 173 packages in 11.441s

6 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
pi@homebridge:/var/lib/homebridge $
Thanks.

@Foxtrot79 right, the gif shows how to update homebridge to beta but the process is the same for plugins. Here are a couple of screenshots to guide you:

The install worked fine and there was a flurry of events with the debug turned on but the updating showing in the Home App seems to stop the same as it did with the previous version.  I moved a thermometer closer to a heat source and in the home App the temperature climbed to the same as the thermometer was showing but when I moved it away an the temperature on the thermometer dropped the Home App still showed the stale high temperature.  The difference was about 7 degrees F.

@Foxtrot79 could you capture logs for this plugin after homebridge restart between the moment that updates to temperature come through and stop?

This is with debugging turned on for the plugin.  I don't really see anything with debugging turned off.  What I am seeing would go on for pages here but mostly it is these lines repeating over and over until they stop and things appear to sit idle.
iscovered a4c138264172 a4c138264172 a4:c1:38:26:41:72 disconnected -81
invalid peripheral, manufacturerData=[4c000215494e54454c4c495f524f434b535f48575075f2ffc2]
discovered a4c1382a512c a4c1382a512c a4:c1:38:2a:51:2c disconnected -86
a4c1382a512c: 88ec0002e8485900
discovered a4c1382a512c a4c1382a512c a4:c1:38:2a:51:2c disconnected -85
invalid peripheral, manufacturerData=[4c000215494e54454c4c495f524f434b535f48575075f2ffc2]
discovered a4c138552f32 a4c138552f32 a4:c1:38:55:2f:32 disconnected -86
a4c138552f32: 88ec00031e9f5b00
discovered a4c1383a77be a4c1383a77be a4:c1:38:3a:77:be disconnected -85
a4c1383a77be: 88ec0003170b5700
discovered a4c1383a77be a4c1383a77be a4:c1:38:3a:77:be disconnected -84
invalid peripheral, manufacturerData=[4c000215494e54454c4c495f524f434b535f48575075f2ffc2]
discovered a4c13823affe a4c13823affe a4:c1:38:23:af:fe disconnected -75
a4c13823affe: 88ec0002cc595100
discovered a4c13823affe a4c13823affe a4:c1:38:23:af:fe disconnected -74
invalid peripheral, manufacturerData=[4c000215494e54454c4c495f524f434b535f48575075f2ffc2]
discovered a4c13843a068 a4c13843a068 a4:c1:38:43:a0:68 disconnected -74
a4c13843a068: 88ec0003037a5800
discovered a4c138264172 a4c138264172 a4:c1:38:26:41:72 disconnected -86
a4c138264172: 88ec00032a515700
discovered a4c1382a512c a4c1382a512c a4:c1:38:2a:51:2c disconnected -87
a4c1382a512c: 88ec0002e8475900
discovered a4c1382a512c a4c1382a512c a4:c1:38:2a:51:2c disconnected -85
invalid peripheral, manufacturerData=[4c000215494e54454c4c495f524f434b535f48575075f2ffc2]
discovered a4c1389b7410 a4c1389b7410 a4:c1:38:9b:74:10 disconnected -99
a4c1389b7410: 88ec000339f25c00
discovered a4c13823affe a4c13823affe a4:c1:38:23:af:fe disconnected -75
a4c13823affe: 88ec0002cc595100
discovered a4c13823affe a4c13823affe a4:c1:38:23:af:fe disconnected -74
invalid peripheral, manufacturerData=[4c000215494e54454c4c495f524f434b535f48575075f2ffc2]
discovered a4c13843a068 a4c13843a068 a4:c1:38:43:a0:68 disconnected -74
a4c13843a068: 88ec0003037b5800
discovered a4c138264172 a4c138264172 a4:c1:38:26:41:72 disconnected -87
a4c138264172: 88ec00032a505700
discovered a4c138264172 a4c138264172 a4:c1:38:26:41:72 disconnected -85
invalid peripheral, manufacturerData=[4c000215494e54454c4c495f524f434b535f48575075f2ffc2]
[Front Yard] The image snapshot handler for the given accessory didn't respond at all!  I've noticed the issue too.
I do have HomeBridge v1.3.4 installed on a UbuntuServer VM on ProxMox.
The range of my bluetooth dongle is pretty good, no issues with signal only the data did't refresh on the home app after the first connection as mentioned above...
What I did was setting up an automatic task via crontab that is restarting the "hb-service" every 10mins
From ProxMox VM terminal or SSH, as sudo, run:
crontab -e (I think you will be asked to choose your preferred application to modify text)
add:
0,10 * * * * hb-service restart
Save and exit.
So far so good!
Note: you can setup your own restart time 0,10 is 10mins, 0,20 is 20mins and so on...)
Thanks
Diego

Thanks for your feedback @Furtivo360.
I am considering other ways to restart bluetooth connection. An options that I have in mind is to add a timeout for last time data, if there is no new data in X seconds, restart the connection. Interval X could be configured in settings.

Thanks for your feedback @Furtivo360.
I am considering other ways to restart bluetooth connection. An options that I have in mind is to add a timeout for last time data, if there is no new data in X seconds, restart the connection. Interval X could be configured in settings.

I found this issue while trying to figure out how to fork this and do exactly that, because I’m having this same problem. This is exactly how I wish it worked. Or is it possible to poll periodically and listen for X seconds every Y seconds?


Mystery Box never has Teddy Bear/Totem of Undying

Inside my game today I hit the same Mystery Box Location around 30/40 times not a single sign of the Toten of Undying/Teddy Bear inside my Arenas.yml I have it set to an 85% chance to spawn a Teddy
Using Spigot 1.16
COMZ DEV comzombies-Universal-2.2.65.jar

Sorry, the words are a bit misleading. They are actually 1 in x config options. so if you have 85, it's a 1 in 85 chance, not 85%. I wish json had comments 🙃

Haha well atleast it's not a bug 🤣👍


Update virtual-machines-common-premium-storage.md - issue 8770

@cynthn : Thanks for your contribution! The author, @, has been notified to review your proposed change.


Migrate 'WrapperWidgetUI' component from makeStyles to styled-components + cleanup

Description
This PR includes a refactorization of WrapperWidgetUI component, all classes from makestyles are been converted to styled components
Shortcut:  297037
Type of change

Refactor

Acceptance
The code resultant must returns same styles component visualization as the same before changes

Overview a general visualization from v1.x to v2.x
Compare visualization from v1.x to v2.x with prop margin setted and unsetted
Compare visualization from v1.x to v2.x with prop expandable setted and unsetted
Compare visualization from v1.x to v2.x with prop expanded setted and unsetted

Basic checklist

Good PR name
Shortcut link
Changelog entry
Just one issue per PR
GitHub labels
Proper status & reviewers
Tests
Documentation

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.03%

Covered Lines:
1957

Relevant Lines:
2521

💛  - Coveralls

I've fixed a couple of differencies between master and this branch. @vmilan good caught. thx!


Compilation Error: clang-15: error: cannot specify -o when generating multiple output files

When attempting to compile hip-analyzer, I encountered the following error:
[  1%] Generating gpu_pass_instr.ll
clang-15: error: cannot specify -o when generating multiple output files
make[2]: *** [CMakeFiles/gpu_pass_instr.dir/build.make:73: gpu_pass_instr.ll] Error 1
make[1]: *** [CMakeFiles/Makefile2:253: CMakeFiles/gpu_pass_instr.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

This issue appears to be caused by specifying the -o option while the hipcc compiler generates multiple output files. Removing the -o gpu_pass_instr.ll option might resolve the issue, but I am seeking a more appropriate solution or guidance on how to handle this correctly.
Could you please provide assistance or a fix for this issue?

Hi !
It seems that hipcc will always generate multiple llvm module files if you leave out the default targets. I did not have this problem since I have a amd_targets.lst in my home directory, with a single architecture :
gfx90a

You can use this as a temporary workaround. I will update the readme file soon with the appropriate fixes. You will also probably run into some weird behavior on your kernels since I'm currently running a modified version of LLVM. I'll do my best to ensure everything is documented as soon as possible.

Hi,
Thank you for your suggestion. I have added an amd_targets.lst file in the hip-analyzer home directory with the following content:
gfx906
However, I am still encountering the same error. Could you clarify if there are any other modifications needed to the build environment or LLVM version being used?
Thank you for your help.


Error Deploying

Cut and pasted this code exactly and get errors deploying 100% reproduceable
Message="Operations on a server group in dropping
state are not allowed."

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

ID: f2368d54-fdac-5b21-d467-f2e47be75061
Version Independent ID: f2368d54-fdac-5b21-d467-f2e47be75061
Content: Deploy a PostgreSQL Flexible Server Database using Terraform
Content Source: articles/terraform/deploy-postgresql-flexible-server-database.md
Service: terraform
GitHub Login: @TomArcherMsft
Microsoft Alias: tarcher

@fatpacket I apologize for not replying to this earlier. I'm able to copy/paste directly into VS Code and run the steps without a problem. Your situation might be environmental and/or involve a bug in the product. I'm closing this Issue as the doc is corrrect so this isn't a doc bug. However, if you continue to experience this problem, please open an Issue against the product. Thanks!


Apply typescript-eslint rules only when typescript is installed

Summary
Apply typescript-eslint rules only when typescript is installed
Changelog
[General] [Changed] - Apply typescript-eslint rules only when typescript is installed
Test Plan
install package and run lint and it works successful

Thanks for this.
I want to confirm how this would work for existing users of the config if they wanted to continue using ESLint with Typescript. Would they need to add dependencies to both @typescript-eslint/eslint-plugin and @typescript-eslint/parser manually for everything to continue working as expected? If so, this is a breaking change and may not be something we want to introduce just to resolve a warning.

Thanks for this.
I want to confirm how this would work for existing users of the config if they wanted to continue using ESLint with Typescript. Would they need to add dependencies to both @typescript-eslint/eslint-plugin and @typescript-eslint/parser manually for everything to continue working as expected? If so, this is a breaking change and may not be something we want to introduce just to resolve a warning.

According to the docs optionalDependencies is installed but if it fails the install process was successful them I don't think it's a breaking change, everything should work as before

Here is an example from npm https://docs.npmjs.com/files/package.json#optionaldependencies

Thanks for the links. In that case it  seems like NPM & Yarn will treat these "optional" dependencies just as dependencies and attempt to install them as it did before.
What I'm not clear on then is why this fixes the warnings. Does it treat these unmet peer dependency warnings as "failures to install"?

Thanks for the links. In that case it seems like NPM & Yarn will treat these "optional" dependencies just as dependencies and attempt to install them as it did before.
What I'm not clear on then is why this fixes the warnings. Does it treat these unmet peer dependency warnings as "failures to install"?

Ah ok now I understand. In this case the rules os typescript-eslint is not appicable to overrides, what do you suggest?

Ok. That makes more sense!
To be honest, I'm actually thinking that the warning should actually be there. The typescript package is a transitive peer dependency of this config and the developer should be warned if they don't have it installed. If they see that warning and decide that it's not important (they don't use Typescript) then they can just ignore it. If they do want to use Typescript and they have a  version of the typescript package which doesn't match the peer dependencies, then we shouldn't swallow the warnings.
What we could do, is to change the check you've implemented to instead check for the typescript  package itself:
var hasTypeScript = false;

try {
  var typeScript = require('typescript');
  hasTypeScript = true;
} catch (e) {
  hasTypeScript = false;
}

You could then use that decide if we configure ESLint with the @typescript-eslint packages.
I'm not sure if that's actually needed though and if it will just cause more issues than it's worth. The @typescript-eslint packages already have typescript marked as an optional peer dependency which should mean that, aside from the warning, everything should work find with or without it.
Unless this is causing an actual parsing issue for people who don't use Typescript, I would recommend leaving this config as it is. I think the warning can safely be ignored by people that don't use Typescript and acts as a good reminder to install the typescript module  for those that do.
How does that sound?

Ok. That makes more sense!
To be honest, I'm actually thinking that the warning should actually be there. The typescript package is a transitive peer dependency of this config and the developer should be warned if they don't have it installed. If they see that warning and decide that it's not important (they don't use Typescript) then they can just ignore it. If they do want to use Typescript and they have a version of the typescript package which doesn't match the peer dependencies, then we shouldn't swallow the warnings.
What we could do, is to change the check you've implemented to instead check for the typescript package itself:
var hasTypeScript = false;

try {
  var typeScript = require('typescript');
  hasTypeScript = true;
} catch (e) {
  hasTypeScript = false;
}

You could then use that decide if we configure ESLint with the @typescript-eslint packages.
I'm not sure if that's actually needed though and if it will just cause more issues than it's worth. The @typescript-eslint packages already have typescript marked as an optional peer dependency which should mean that, aside from the warning, everything should work find with or without it.
Unless this is causing an actual parsing issue for people who don't use Typescript, I would recommend leaving this config as it is. I think the warning can safely be ignored by people that don't use Typescript and acts as a good reminder to install the typescript module for those that do.
How does that sound?

I totally agree with you, I'll make the suggested changes, thanks!

@matt-oakes Done! I removed all changes in package.json and yarn.lock

@matt-oakes this changes make sense?


[GSSoC '23] Some fixes which would make the website even more beautiful

Properly align the images, they are completely left aligned

2.The Join us and other buttons have some outer border which doesn't go with the website's theme. I'd like to change that

Change the size of the footer and properly orient the objects

Check these issue if they can be assigned @SahityaRoy

Check these issue if they can be assigned @SahityaRoy

Please go ahead with this and enhance the UI.


fixed upload button disabled during image upload

When uploading to S3 (for example), the upload button was not being disabled, this was causing unnecessary uploads of the same file.
This fix disabled the button during the upload and adds a text with an animated 'loading' gif informing that the upload is processing.

Hi @almeidarruben, thanks for your work on this it's really appreciated. However there's an existing open pull request here https://github.com/torchbox/wagtail/pull/1075 to add spinners to all buttons connected to forms with a potentially long-running submit. It's still being implemented, but will be a more admin-wide addition.


Piper as Library?

Can Piper be used as a library directly in an application, or is it necessary to create a wrapper for the Piper executable?

TLDR;
There is a python module for piper which I haven't found any documentation for, so I've written a simple 1 script wrapper for it, but there is also a more feature filled library called dimits which is a bit buggy which I did not make (https://pypi.org/project/dimits/).
Hello, I assume by this issue that you want to use the text to speech of piper in a python script. There is indeed already an official python module for piper, but I haven't been able to find any documentation for it. There are two ways I think you could implement piper's text to speech using this library:

Using the dimits library https://pypi.org/project/dimits/ (I didn't make this.)
By using a simple script I made

If you want to use the dimits library I recommend going to the PyPi page and reading through the guide there, https://pypi.org/project/dimits/.
If you want to just pick and choose the functions you need from the wrapper, or want to import it as a module, then you first to need to install the PyPi library for the official piper library and pygame to play the audio files generated cross-platform pip install piper-tts pygame, then choose a voice from https://rhasspy.github.io/piper-samples/ and download it. The script is below:
from piper.voice import PiperVoice as piper #Backbone of text to speech
import wave #Writing text to speech to wave files
from sys import platform
from os import remove
from os import environ

environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" #Stop pygame from saying hello in the console

from pygame import mixer

mixer.init()

#Check if the operating system is MacOS
if platform == 'darwin':
    print('This library cannot be used on MacOS yet, due to piper not being supported there.')
    exit() #Piper isn't available on MacOS yet

model = None #Set the model to none at the start
voice = None #Set the voice to none at the start

#Function to load and set the voice model to be used
def load(model_set):
    global model
    global voice

    if '.onnx' in model_set: #Is the extension .onnx in the filename, if not add it below.
        model = model_set #Set model variable as is.
    else:
        model = model_set + '.onnx' #Set model variable and append .onnx.

    #Try to load the model
    try:
        voice = piper.load(model) #Load the model
    except:
        print("Something went wrong, did you type the correct name for the model?")
        exit()

#Function to save a text to speech file to disk
def save(text, file_name, model_set=model):
    global model
    global voice

    if model_set == None and model == None: #Check if a model has been set, if not then exit.
        print("No model was set! Please set a model using the load function: load(\"your_model_here\")")
        exit()
    elif model_set != None: #Is there a voice that should be used only once?
        temp_voice = piper.load(model_set)
        with wave.open(file_name, "wb") as wav_file:
            temp_voice.synthesize(text, wav_file)
    else: #If not, use the voice that was set eariler.
        with wave.open(file_name, "wb") as wav_file:
            voice.synthesize(text, wav_file)

#Function to save the file to disk, play it on the speakers, then delete the file.
def say(text, model_set=model):
    global model
    global voice

    if model_set == None and model == None: #Check if a model has been set, if not then exit.
        print("No model was set! Please set a model using the load function:  load(\"your_model_here\")")
        exit()
    elif model_set != None: #Is there a voice that should only be used once?
        temp_voice = piper.load(model_set)
        with wave.open('tmp_text_2_speech.wav', "wb") as wav_file:
            temp_voice.synthesize(text, wav_file)
    else: #If not, use the voice that was set earlier.
        with wave.open('tmp_text_2_speech.wav', "wb") as wav_file:
            voice.synthesize(text, wav_file)

    #Play the file
    mixer.music.load('tmp_text_2_speech.wav')
    mixer.music.set_volume(1)
    mixer.music.play()

    remove("tmp_text_2_speech.wav") #Remove the temporary file

A simple example is of using this script is:
import whatever_you_named_the_script as engine
engine.load('ModelNameHere')
engine.say('I want to eat ice cream after this.')

Good luck, and if I was wildly off topic and wrong in my answer please let me know, and I'll try to help.

Nice, thanks for the script. I was looking for a c++ library but maybe looking at the source of piper-tts helps.... but thanks anyway!

Okay, I only know a little bit about C++, but I believe that you will be able to either use or take inspiration from the src/cpp/ directory in this repo. main.ccp seems to also have a command line usage that you could pull apart.
Good luck!

This project may be of interest: https://voicedock.app/apps/ttspiper/ - wraps Piper with a gRPC API

Any progress on this? I am interested cause for now I'm using system but I'd want to avoid it :S

Maybe you find the project
https://github.com/k2-fsa/sherpa-onnx
interesting.
It supports all vits models from piper and we have converted all of the English/French/German/Spanish models from piper
to sherpa-onnx. You can try them by visiting the following huggingface space
https://huggingface.co/spaces/k2-fsa/text-to-speech
There are also pre-built Android APKs for it. Please see
https://k2-fsa.github.io/sherpa/onnx/tts/apk.html
If you want to use sherpa-onnx in your own application, we provide APIs for C++/C/Python/Go/Swift/Kotlin/C#, etc.
You can build sherpa-onnx either as a static or a dynamic library. It supports linux/macos/windows.
For instance, you can follow
https://k2-fsa.github.io/sherpa/onnx/c-api/index.html
to use the C API of sherpa-onnx.
https://github.com/k2-fsa/sherpa-onnx/blob/master/c-api-examples/offline-tts-c-api.c
is an example using the C API of sherpa-onnx for TTS.

If you want a minimal version of @mario872  's answer:
from piper.voice import PiperVoice as piper
import wave
voice = piper.load("en_US-lessac-medium.onnx")
with wave.open("test.wav", "wb") as wav_file:
    voice.synthesize("This is a test", wav_file)

The next version of Piper will be usable via a C API and a Python API.

Great to hear. Also is there a way currently via python to pass in multiple sentence? The readme says with a pipe it can be done using json format but I can't find how to do it in python

@synesthesiam Neat, a C API would be incredibly useful, especially for game design.
Do you have an idea when the next version of Piper will be released?

+1 for a C or C++ API

+1


Wrong SQL for multiple abilities

I have 2 conditions:
can :read, Order, customer_from_id: user.role.customers.ids
can :read, Order, customer_to_id: user.role.customers.ids
Error index page for orders:
PG::SyntaxError: ERROR:  syntax error at or near "{"
LINE 1: SELECT COUNT() FROM "orders" WHERE (({:customer_to_id=>[4, ...
^
: SELECT COUNT() FROM "orders" WHERE (({:customer_to_id=>[4, 2, 1]}) OR ({:customer_from_id=>[4, 2, 1]}))
with one ability everything fine:
SELECT COUNT(*) FROM "orders" WHERE "orders"."customer_from_id" IN (4, 2, 1)
need help

Which version of Rails are you using?

ruby '2.4.0'
gem 'rails', '~> 5.1.0.rc2'

can you please also post the code that generates the wrong query? Does it look like Order.accessible_by(current_ability, :read).count? thanks

can you please update Rails to 5.1.0? I just tried your example and everything seems to work. Please look at this gist: https://gist.github.com/coorasse/0c0a773d2d215115cbd6161e9d4ddaf5 and edit it to reproduce the issue. Thanks

code that generates wrong query is
Order.joins(:status).where(statuses: {is_final: true}).accessible_by(current_ability).size

I was update to rails 5.1.0. your test https://gist.github.com/coorasse/0c0a773d2d215115cbd6161e9d4ddaf5 working fine for me
we are using postresql for project

are you able to write a similar test to reproduce your issue? Thanks

it's working with rails 5.1.1, so updated and bug is gone

Thanks for the update. I close the issue. Feel free to reopen in case.


Investigate unexpected memory increase of Actor POD during actor load testing

In what area(s)?
/area runtime
Problem
While running actor load-test for > 24hr, we discovered unknown POD eviction due to the memory usage of stateactor application. stateactor nop method returns 200 immediately. so that we're suspecting dapr runtime memory usage.
This issue is to profile dapr runtime to ensure that there is no memory leak under high load test.
How to run actor load test
Load test readme : https://github.com/dapr/dapr/tree/master/tests/apps/actorload

install edge version dapr
Run stateactor service with dapr cli

dapr run --app-id stateactor --app-port 3000 --enable-profiling -- ./dist/stateactor -p 3000

Start profiler
Run loadtestclient to call nop method

dapr run --app-id testclient -- ./dist/testclient -qps 2000 -numactors 2048 -t 30m -m nop

cc/ @yaron2 @artursouza

Closing with #2292, #2295, #2302, #2332


Add status change event

Solution/Idea
PR adds event API and new SSE(server sent event) channel status_change.
Proposed changes
PR adds event API implementation in pkg/crc/api/events/events.go
Modify sync client implementation to trigger event when status is changed.
Fixes in existing log events, rename constants related to SSE
Testing

launch demon
connect to status_change channel with curl -GET -i --unix-socket <path to socket>/crc-http.sock "http://localhost/events?stream=status_change"
start crc with crc start
Ensure that new events appeared, like:

id:                                                                                │
data: {"status":{"CrcStatus":"Starting","OpenshiftStatus":"Starting","OpenshiftVersion":"","PodmanVersion":"","DiskUse":0,"DiskSize":0,"RAMUse":0,"RAMSize":0,"Preset":"microshift"}}
event: status_change

/retest

connect to status_change channel with curl -GET -i --unix-socket /crc-http.sock "http://localhost/events?stream=status_change"
start crc with crc start

the events are shown only when starting via the api curl --unix-socket ~/.crc/crc-http.sock "http://localhost/api/start" running the crc start command the events are not shown, is this expected?

the events are shown only when starting via the api curl --unix-socket ~/.crc/crc-http.sock "http://localhost/api/start" running the crc start command the events are not shown, is this expected?

Yes, that is expected, as start, stop is performed on CLI side, not on daemon, at least for now.

Tested locally and functionality is working as expected, LGTM. it'd be nice to have more detailed commit messages explaining the changes in each commit

/need-rebase

I've rebased it at https://github.com/cfergeau/crc/tree/stus-change-event and added a fixup commit to fix compliation of the first commit in the series.

I'm not sure step 3. is correct in the testing instructions:

start crc with crc start

Don't we need to start it with the REST API for now as otherwise start won't get through the daemon?
 curl -GET -i --unix-socket ~/.crc/crc-http.sock  "http://localhost/api/start"

I was wondering if curl -GET -i --unix-socket ~/.crc/crc-http.sock  "http://localhost/api/start" should also send a status event to help with syncing state if the state change behind the daemon's back?

Don't we need to start it with the REST API for now as otherwise start won't get through the daemon?

Yes, you are correct, need to start with rest API.

 curl -GET -i --unix-socket ~/.crc/crc-http.sock  "http://localhost/api/start"

I was wondering if curl -GET -i --unix-socket ~/.crc/crc-http.sock "http://localhost/api/start" should also send a status event to help with syncing state if the state change behind the daemon's back?

Daemon send response only after start is finished(or error incase of any error), but calling api/start will trigger events on events?stream=status_change event channel.

Few more things I noticed during testing, if VM exists, and then I call delete, I get
id:
data: {"status":{"CrcStatus":"Error","OpenshiftStatus":"","OpenshiftVersion":"","PodmanVersion":"","DiskUse":0,"DiskSize":0,"RAMUse":0,"RAMSize":0,"Preset":""},"error":"Cannot load 'crc' virtual machine: no such libmachine vm: crc"}
event: status_change

which does not seem correct as the VM existed before being deleted.
After that, if I call again delete I don't get any notifications .

Few more things I noticed during testing, if VM exists, and then I call delete, I get
id:
data: {"status":{"CrcStatus":"Error","OpenshiftStatus":"","OpenshiftVersion":"","PodmanVersion":"","DiskUse":0,"DiskSize":0,"RAMUse":0,"RAMSize":0,"Preset":""},"error":"Cannot load 'crc' virtual machine: no such libmachine vm: crc"}
event: status_change

which does not seem correct as the VM existed before being deleted. After that, if I call again delete I don't get any notifications. If I call stop, I get first stopping and then error

That was actually bug, status was not report NoVm state, only error. (It was due to not implementing Is method for MissingHostError, so comparing error was always wrong)
Now it should work properly.

What is holding back this PR?

What is holding back this PR?

Some discussion around https://github.com/crc-org/crc/pull/3903#discussion_r1476130780 would have been useful
Apart from this, as said multiple times, the comit log must be a lot more detailed about how this works:

If we don't record this knowledge now when it's more or less fresh in our minds, it will be very difficult to find this back in 6 months from now if we need it :-/

I'd say we can go with this for now, more details about the design choices, the implementation limitations, ...
(this sentence is malformed though :-/ )

And https://github.com/crc-org/crc/pull/3903#discussion_r1474772073 is also still pending

@cfergeau Could you look on this?


Bad link in README

Line 180 in readme:
Rustup gives you easy access to the nightly compiler and its
[experimental features]. To add it just run `rustup install
nightly`:

[experimental features]: http://doc.rust-lang.org/nightly/book/nightly-rust.html

That link is dead, closest one I can find is this. https://doc.rust-lang.org/1.16.0/book/nightly-rust.html
If anyone wants I can make a PR.

The Unstable Book at https://doc.rust-lang.org/unstable-book/ describes unstable features.  Is that the best reference for experimental features?
The table of contents of the second edition of The Rust Programming Language indicates there will be an Appendix D - Nightly Rust but it doesn't appear to exist yet.

I think the Unstable book @kraai linked is probably the best link, as it actually lists all current nightly features.


When slides are revised, adjust lecture chapters

Chapters are being divided and stuff, therefore the numbering is off

Has this been solved?

Well check a bit yourself? Do you still see any numbers in filenames or slide set titles?

File names seem ok.
$ ls -R | grep -E '*\.Rnw$'
slides-performance-intro.Rnw
slides-performance-learningcurves.Rnw
slides-performance-measures.Rnw
slides-performance-overfitting.Rnw
slides-performance-resampling.Rnw
slides-performance-roc-1.Rnw
slides-performance-roc-2.Rnw
slides-performance-train-test.Rnw
perf_extra_stuff_unused.Rnw
roc-extra-unused.Rnw
slides-tuning-hyperparameters.Rnw
slides-tuning-nestedresampling.Rnw
slides-practical.Rnw
slides-forests-bagging.Rnw
slides-forests-benchmark.Rnw
slides-forests-discussion.Rnw
slides-forests-featureimportance.Rnw
slides-forests-intro.Rnw
slides-forests-proximities.Rnw
slides-basics-datatask.Rnw
slides-basics-learnercomponents-hro.Rnw
slides-basics-learners.Rnw
slides-basics-notation.Rnw
slides-basics-riskminimization.Rnw
slides-basics-supervised.Rnw
slides-basics-whatisml.Rnw
slides-mlphilo-2cultures.Rnw
slides-mlphilo-blackboxes.Rnw
slides-mlphilo-ontology.Rnw
slides-classification-discranalysis.Rnw
slides-classification-discriminant.Rnw
slides-classification-generative.Rnw
slides-classification-intro.Rnw
slides-classification-knn.Rnw
slides-classification-linear.Rnw
slides-classification-logistic.Rnw
slides-classification-naivebayes.Rnw
slides-classification-softmax.Rnw
slides-regression-knn.Rnw
slides-regression-linearmodel.Rnw
slides-regression-losses.Rnw
slides-regression-polynomials.Rnw
slides-cart-discussion.Rnw
slides-cart-intro.Rnw
slides-cart-splitcomputation.Rnw
slides-cart-splitcriteria.Rnw
slides-cart-stoppingpruning.Rnw
slides-cart-treegrowing.Rnw
slides_extra_trees.Rnw
tree-unused.Rnw

Titles seem ok, too:
Just titles with numbers in Rnw files:
$ grep -r --include \*.Rnw "\lecturechapter{.*[0-9]"
03-performance/slides-performance-roc-1.Rnw:\lecturechapter{Evaluation: ROC Analysis 1}
03-performance/slides-performance-roc-2.Rnw:\lecturechapter{Evaluation: ROC Analysis 2}
trees/attic/slides_extra_trees.Rnw:\lecturechapter{0}{Add on material: Extremely randomized trees}

All titles in Rnw files:
$ grep -r --include \*.Rnw "\lecturechapter{"
ml-philosophy/slides-mlphilo-blackboxes.Rnw:\lecturechapter{Machine Learning as Black-Box Modeling}
ml-philosophy/slides-mlphilo-ontology.Rnw:\lecturechapter{Introduction - Ontology of ML Tasks}
ml-philosophy/slides-mlphilo-2cultures.Rnw:\lecturechapter{The Two Cultures of Statistical Modeling}
03-performance/slides-performance-overfitting.Rnw:\lecturechapter{Overfitting}
03-performance/slides-performance-train-test.Rnw:\lecturechapter{Evaluation: Train and Test Error}
03-performance/slides-performance-roc-1.Rnw:\lecturechapter{Evaluation: ROC Analysis 1}
03-performance/slides-performance-learningcurves.Rnw:\lecturechapter{Evaluation: Learning Curves}
03-performance/slides-performance-roc-2.Rnw:\lecturechapter{Evaluation: ROC Analysis 2}
03-performance/slides-performance-resampling.Rnw:\lecturechapter{Evaluation: Resampling and Cross-Validation}
03-performance/slides-performance-intro.Rnw:\lecturechapter{Evaluation: Introduction and Remarks}
03-performance/slides-performance-measures.Rnw:\lecturechapter{Evaluation: Simple Metrics for Regression and Classification}
forests/slides-forests-featureimportance.Rnw:\lecturechapter{Random Forests: Feature Importance}
forests/slides-forests-benchmark.Rnw:\lecturechapter{Random Forest: Benchmarking Trees, Forests, and Bagging K-NN}
forests/slides-forests-proximities.Rnw:\lecturechapter{Random Forests: Proximities}
forests/slides-forests-discussion.Rnw:\lecturechapter{Random Forests: Advantages and Disadvantages}
forests/slides-forests-bagging.Rnw:\lecturechapter{Random Forests: Bagging Ensembles}
forests/slides-forests-intro.Rnw:\lecturechapter{Random Forest: Introduction}
ml-basics/slides-basics-notation.Rnw:\lecturechapter{Notation and Definitions}
ml-basics/slides-basics-learnercomponents-hro.Rnw:\lecturechapter{Introduction: Components of a Learner}
ml-basics/slides-basics-riskminimization.Rnw:\lecturechapter{Introduction: Losses \& Risk Minimization}
ml-basics/slides-basics-whatisml.Rnw:\lecturechapter{Introduction: What is Machine Learning?}
ml-basics/slides-basics-learners.Rnw:\lecturechapter{Introduction: Models \& Learners}
ml-basics/slides-basics-datatask.Rnw:\lecturechapter{Introduction: Tasks \& Data}
ml-basics/slides-basics-supervised.Rnw:\lecturechapter{Introduction: Supervised Learning}
05-tuning-nested/slides-tuning-hyperparameters.Rnw:\lecturechapter{Hyperparameter Tuning}
05-tuning-nested/slides-tuning-nestedresampling.Rnw:\lecturechapter{Nested Resampling}
trees/slides-cart-splitcomputation.Rnw:\lecturechapter{CART: Computational Aspects of Finding Splits}
trees/slides-cart-discussion.Rnw:\lecturechapter{CART: Advantages \& Disadvantages}
trees/slides-cart-stoppingpruning.Rnw:\lecturechapter{CART: Stopping Criteria \& Pruning}
trees/slides-cart-splitcriteria.Rnw:\lecturechapter{CART: Splitting Criteria}
trees/slides-cart-intro.Rnw:\lecturechapter{Classification and Regression Trees (CART): Basics}
trees/attic/slides_extra_trees.Rnw:\lecturechapter{0}{Add on material: Extremely randomized trees}
trees/slides-cart-treegrowing.Rnw:\lecturechapter{CART: Growing a Tree}
06-practical-hints/slides-practical.Rnw:\lecturechapter{Practical tips}
supervised-classification/slides-classification-naivebayes.Rnw:\lecturechapter{ML Basic for Classification - Naive Bayes}
supervised-classification/slides-classification-softmax.Rnw:\lecturechapter{ML Basic for Classification - Softmax and Softmax Regression}
supervised-classification/slides-classification-linear.Rnw:\lecturechapter{ML Basics for Classification - Linear Classifiers}
supervised-classification/slides-classification-discriminant.Rnw:\lecturechapter{ML Basic for Classification - Discriminant Approach}
supervised-classification/slides-classification-knn.Rnw:\lecturechapter{ML Basic for Classification - K-Nearest Neighbors}
supervised-classification/slides-classification-generative.Rnw:\lecturechapter{ML Basic for Classification - Generative Approach}
supervised-classification/slides-classification-intro.Rnw:\lecturechapter{ML Basics for Classification - Basic Terminology and Tasks}
supervised-classification/slides-classification-logistic.Rnw:\lecturechapter{ML Basics for Classification - Logistic and Logistic Regression}
supervised-classification/slides-classification-discranalysis.Rnw:\lecturechapter{ML Basic for Classification - Discriminant Analysis}
supervised-regression/slides-regression-polynomials.Rnw:\lecturechapter{Polynomial Regression Models}
supervised-regression/slides-regression-losses.Rnw:\lecturechapter{Loss Functions for Regression}
supervised-regression/slides-regression-linearmodel.Rnw:\lecturechapter{Linear Regression Models}
supervised-regression/slides-regression-knn.Rnw:\lecturechapter{$k$-Nearest Neighbors Regression}

Is that all that was needed to be checked here @berndbischl ?


Can't open link with  "data-interception='off'" for IE

We are using "data-interception='off'" attribute for  elements with server-relative SharePoint links like Home site
I've checked without "data-interception='off'" and it works but opens in self tab.

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

ID: 2321fde2-93bd-8529-a7e6-76d1f85b359f
Version Independent ID: 9b6fd36b-0a17-3648-cc56-808334efa861
Content: Hyperlinking considerations in SharePoint Framework
Content Source: docs/spfx/hyperlinking.md
Product: sharepoint
Technology: sharepoint-framework
GitHub Login: @spdevdocs
Microsoft Alias: spdevdocs

Hi IlyeniaMaksim,
I tested this issue with following anchors in an SPFx webpart:

The href is an external site and did not set "data-interception='off'"
external site, no data-interception

The href is an external site and set "data-interception='off'"
external site + data-interception

The href is a server-relative SharePoint link and did not set "data-interception='off'"
SP site, no data-interception

The href is a server-relative SharePoint link and set "data-interception='off'"
SP site + data-interception

Result:
Here it shows that when the URL is an external site, it will open a new tab whether we set "data-interception" or not.
For SP links, by default it will open in a self tab. If we add "data-interception", it will open in a new tab, this is an expected result as the doc described.

Baker Kong
Microsoft SharePoint Community Support

Thanks!
It works:

          Text
          Text

But does not work:

          Text
          Text

In  tag content must be wrapped to one element


Fix typos in README and debug message in window.rs

This is a mirror. See https://github.com/redox-os/orbtk/pull/90


30 it is necessary to make an error display when analyzing the graph

optimized the graph traversal algorithm to find cyclic dependencies. Added error collection when traversing the graph


Check what preserveValueImports does under --module nodenext in CJS files

I had some reason to limit preserveValueImports to operating on ESM emit, and at the time that could be done with this check:
https://github.com/microsoft/TypeScript/blob/4110b80fbb24f2ac6dd284ef3511ca69ac6db517/src/compiler/program.ts#L3656-L3658
But now, ModuleKind.Node16 and NodeNext are >= ES2015, yet may emit CJS files, and I have no idea what will happen.

The answer:
--preserveValueImports false
// main.cts
import { SyntaxKind } from "typescript";

// main.cjs
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

--preserveValueImports true
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typescript_1 = require("typescript");

So the require is preserved, but importantly we don’t get the identifier SyntaxKind in scope, because we never get SyntaxKind as a bare identifier in CJS emit, which is why the flag is only supposed to work on ES module syntax. It’s not possible to make this work and preserve live bindings semantics.
This is not great, but I think I’d rather just let it keep doing the right thing for ESM files and the wrong thing for CJS files than prohibit the option in --module nodenext.


Fix test data generation for assignments model

mini-milestone :)

@robert-tan please do a merge from the sti-assignment branch.


[TRACKING] AWS Distribution for Kubeflow v1.7

AWS is testing Kubeflow on EKS as part of distribution testing.
AWS need to verify the following features:

[ ] Vanilla Kubeflow
[ ] Load balancer integration
[ ] Cognito Integration
[ ]  RDS integration for pipelines
[ ] RDS integration for Katib
[ ] S3 integration for pipelines
[ ]  DLC in Jupyter Notebooks
[ ]  EFS
[ ]  FSx
[ ]  AWS IAM Profile plugin
[ ]  KServe
[ ]  Cloudwatch
[ ]  Update e2e tests
[ ]  Documentation updates to website

Should the list also include the testing of Tensorboard using S3 as remote source since it just got added or will be added to Kubeflow 1.7 RC?

@AlexandreBrown Have added and tested it :)

I can get e2e tests updated, Which branch we are working on for this?

This issue should be fix before releasing v1.7 : https://github.com/awslabs/kubeflow-manifests/issues/609

@surajkota @ryansteakley I suppose this can be closed since 1.7 was released?

1.7 has been released


Don't early-exit from validate.sh when doing a manual release

Only skip validate.sh - when RUN_BAD_TESTS is unset - in CI.

Closing PR, as it's obsolete


Eulerian Cycle with isolated vertexes

Eulerian cycle visits every edge once. It must still exist if you add any number of isolated vertexes, which currently isn't true.

Example:
0, 1, 0, 0,
0, 0, 1, 0,
1, 0, 0, 0,
0, 0, 0, 0,

Expected: 0⇒1⇒2⇒0
Actual: Graph has not Eulerian cycle

Fixed.


Deleting program from selected program list should regenerate previewed start times

This actually might happen already... need to confirm

Verified this already happens, not sure what I was seeing before.


Define Design Language

Refactor

[x] part of should be replaced to import due high processor loading
[ ] abstract, library, pack_core, utils should be divided to design_core and utils_core

Design - Figma

[x] define brand accent colours
[x] generate accent color swatch
[ ] define highlight color
[ ] dimension
[ ] alignments
[ ] icons
[ ] elevation
[ ] shapes
[ ] radius
[ ] shadows
[ ] spacing
[ ] form factor

Theme

[ ] colors
[ ] typography
[ ] radius
[ ] shadows
[ ] spacing
[ ] form factor

closing as it is completed


[TACHYON-473] Remove System Properties use in integration tests

https://tachyon.atlassian.net/browse/TACHYON-473

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/Tachyon-Pull-Request-Builder/3261/
Test PASSed.

+1 LGTM
thanks


Where / how to start a security discussion?

Hi y'all,
I would like to talk with you folks about a potential security issue.
Where is a good place to start this? (Looks like you are not providing a sec policy on Github)
(I know you offer a helpdesk and a contact form, but as this is not customer related, maybe you want to use some other place.)
This is related to https://github.com/IQSS/dataverse as we are a user of your Java libs.

Can you please enable my account to create a ticket<EMAIL_ADDRESS>Thx

Account invite sent and JIRA ticket has been created. Further discussion will be in JIRA, so I'll close this issue.


Linking fails with zstd dependency on GitHub Actions targetting Windows

Reduced example: https://github.com/niklasf/cargo-auditable-issue-141 (where cargo build --release works but cargo auditable build --release fails)
Workflow: https://github.com/niklasf/cargo-auditable-issue-141/blob/main/.github/workflows/demo.yml
Error: https://github.com/niklasf/cargo-auditable-issue-141/actions/runs/8866193441/job/24343338399
Log snippet:
2024-04-28T08:15:04.6004775Z   = note: LINK : warning LNK4044: unrecognized option '/Wl,--undefined=AUDITABLE_VERSION_INFO'; ignored
2024-04-28T08:15:04.6005683Z           libzstd_sys-2baf2e10c8662d45.rlib(5eeec2f4c1e9b3b6-zstd_v03.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6006640Z           libzstd_sys-2baf2e10c8662d45.rlib(1ddd1489cc625d97-hist.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6007577Z           libzstd_sys-2baf2e10c8662d45.rlib(5eeec2f4c1e9b3b6-zstd_v06.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6008518Z           libzstd_sys-2baf2e10c8662d45.rlib(5eeec2f4c1e9b3b6-zstd_v04.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6009431Z           libzstd_sys-2baf2e10c8662d45.rlib(5eeec2f4c1e9b3b6-zstd_v01.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6010344Z           libzstd_sys-2baf2e10c8662d45.rlib(5eeec2f4c1e9b3b6-zstd_v02.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6011312Z           libzstd_sys-2baf2e10c8662d45.rlib(1ddd1489cc625d97-zstd_compress.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6012284Z           libzstd_sys-2baf2e10c8662d45.rlib(b0401a448be314bb-zdict.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6013221Z           libzstd_sys-2baf2e10c8662d45.rlib(5eeec2f4c1e9b3b6-zstd_v05.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6014149Z           libzstd_sys-2baf2e10c8662d45.rlib(5eeec2f4c1e9b3b6-zstd_v07.o) : error LNK2001: unresolved external symbol ___chkstk_ms
2024-04-28T08:15:04.6015225Z           libzstd_sys-2baf2e10c8662d45.rlib(b0401a448be314bb-zdict.o) : error LNK2019: unresolved external symbol __mingw_vfprintf referenced in function fprintf
2024-04-28T08:15:04.6016319Z           libzstd_sys-2baf2e10c8662d45.rlib(b0401a448be314bb-fastcover.o) : error LNK2001: unresolved external symbol __mingw_vfprintf
2024-04-28T08:15:04.6017298Z           libzstd_sys-2baf2e10c8662d45.rlib(b0401a448be314bb-cover.o) : error LNK2001: unresolved external symbol __mingw_vfprintf
2024-04-28T08:15:04.6018495Z           D:\a\cargo-auditable-issue-x\cargo-auditable-issue-x\target\release\deps\cargo_auditable_issue_x-477cc37b35224d7f.exe : fatal error LNK1120: 2 unresolved externals
2024-04-28T08:15:04.6019329Z
2024-04-28T08:15:04.6019444Z
2024-04-28T08:15:05.1457161Z error: could not compile `cargo-auditable-issue-x` (bin "cargo-auditable-issue-x") due to 1 previous error
2024-04-28T08:15:05.1457962Z
2024-04-28T08:15:05.1458107Z Caused by:
2024-04-28T08:15:05.1472415Z   process didn't exit successfully: `set CARGO='\\?\D:\a\_temp\msys64\mingw64\bin\cargo.exe'&& set CARGO_BIN_NAME=cargo-auditable-issue-x&& set CARGO_CRATE_NAME=cargo_auditable_issue_x&& set CARGO_MANIFEST_DIR='D:\a\cargo-auditable-issue-x\cargo-auditable-issue-x'&& set CARGO_PKG_AUTHORS=''&& set CARGO_PKG_DESCRIPTION=''&& set CARGO_PKG_HOMEPAGE=''&& set CARGO_PKG_LICENSE=''&& set CARGO_PKG_LICENSE_FILE=''&& set CARGO_PKG_NAME=cargo-auditable-issue-x&& set CARGO_PKG_README=''&& set CARGO_PKG_REPOSITORY=''&& set CARGO_PKG_RUST_VERSION=''&& set CARGO_PKG_VERSION=0.0.0&& set CARGO_PKG_VERSION_MAJOR=0&& set CARGO_PKG_VERSION_MINOR=0&& set CARGO_PKG_VERSION_PATCH=0&& set CARGO_PKG_VERSION_PRE=''&& set CARGO_PRIMARY_PACKAGE=1&& set PATH='D:\a\cargo-auditable-issue-x\cargo-auditable-issue-x\target\release\deps;C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin;D:\a\_temp\msys64\mingw64\bin;D:\a\_temp\msys64\usr\local\bin;D:\a\_temp\msys64\usr\bin;D:\a\_temp\msys64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\a\_temp\msys64\usr\bin\site_perl;D:\a\_temp\msys64\usr\bin\vendor_perl;D:\a\_temp\msys64\usr\bin\core_perl'&& C:\Users\runneradmin\.cargo\bin\cargo-auditable.exe rustc --crate-name cargo_auditable_issue_x --edition=2021 'src\main.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=477cc37b35224d7f -C extra-filename=-477cc37b35224d7f --out-dir 'D:\a\cargo-auditable-issue-x\cargo-auditable-issue-x\target\release\deps' -L 'dependency=D:\a\cargo-auditable-issue-x\cargo-auditable-issue-x\target\release\deps' --extern 'zstd=D:\a\cargo-auditable-issue-x\cargo-auditable-issue-x\target\release\deps\libzstd-c8cf5de31f378c0a.rlib' -L 'native=D:\a\cargo-auditable-issue-x\cargo-auditable-issue-x\target\release\build\zstd-sys-33d347c9f0b79841\out'` (exit code: 1)
2024-04-28T08:15:05.1585513Z ##[error]Process completed with exit code 1

Thank you for the report!

unrecognized option '/Wl,--undefined=AUDITABLE_VERSION_INFO'; ignored

This is caused by cargo auditable prefixing the --undefined option with -Wl because typically rustc doesn't use the linker directly, it uses a compiler such as GCC as a wrapper around the linker, and -Wl is the GCC and clang option to pass an argument to the linker.
This could be an issue with cargo auditable that was undiscovered until now because it is only a warning. I'll investigate it. However, it is only a warning, so that's not what is causing compilation to fail.

unresolved external symbol __mingw_vfprintf

This indicates that libzstd has been build with mingw (GCC for Windows) toolchain; linking it with the MSVC toolchain then fails, as expected.
So it seems that something confuses zstd-sys and makes it build with MinGW instead of MSVC toolchain when run under cargo auditable.
I don't think cargo auditable emits the wrong kind of object file, because then we would be seeing linking errors from things other than libzstd - it would either complain about cargo_auditable_issue_x_audit_data.o or about the toplevel binary being compiled.
This is the extent of the changes that cargo auditable makes to the compilation command.
Perhaps zstd-sys sees the options starting with - or -- and decides that it should be using MinGW instead of MSVC?

After I figure out the -Wl issue, the compilation failure may or may not go away. I suggest reporting this to zstd-sys maintainers regardless. If the issue is indeed with it incorrectly picking MinGW instead of MSVC, then zstd-sys should be fixed regardless because their toolchain detection is fragile and will break not just under cargo auditable.

I've created a branch that might fix the issue: #142
Could you test it and see if the problem still occurs?

New run: https://github.com/niklasf/cargo-auditable-issue-141/actions/runs/8866914352/job/24344898298

unrecognized option '/Wl,--undefined=AUDITABLE_VERSION_INFO'; ignored

This is now fixed.

However, it is only a warning, so that's not what is causing compilation to fail.

And indeed it still fails with libzstd_sys-2baf2e10c8662d45.rlib(b0401a448be314bb-fastcover.o) : error LNK2001: unresolved external symbol __mingw_vfprintf etc.

I've double-checked the way cargo auditable write object files, and there is no distinction between MinGW and MSVC targets. And this logic were incorrect (already a stretch because it's copied from rustc), all builds would be broken, not just zstd.
I'm afraid that's an issue with zstd-sys getting confused about what toolchain should be used, and mistakenly picking MinGW. That's not something I can fix in cargo auditable; you will have to report it to zstd-sys maintainers.

Thanks for looking into it!


Design system for SPSP Pull Payments

Pull-payments are defined in IL-RFC-36. We should read through that spec, and design a system to support them.
We should also decide which components belong in Quilt and which components belong in Artemis (e.g., see https://github.com/sappenin/artemis-server/issues/3)

Closing. This functionality is subsumed by https://openpayments.dev.


Optimize amazon metadata service calls

This code:
https://github.com/Netflix/eureka/blob/42d73d3e36be60e8ddad3ef2014da286c823c8a5/eureka-client/src/main/java/com/netflix/appinfo/AmazonInfo.java#L118
does 7 network calls for every AmazonInfo.autoBuild() call which gets triggered by default every 30 seconds by InstanceInfoReplicator thread in DiscoveryClient.
We can optimize this to only fetch the public hostname & IP which can only change after an instance has started. We can cache everything else.

This was greatly optimized in release 1.1.158


1sec split seq validation problems (fmad80)

using fmad80 capture splits aren`t working correctly.
remote_download_split regression fails completely with a single 1x40G port. The full capture is ok, but the splits are being calculated incorrectly. Likely the chunk metadata is getting messed up somewhere e.g. during flush.

updated the 40G packet generator for a configurable start sequence. regression with the 20G system uses this to fragment the capture so its not one continous data rate. e.g. capture .. idle .. capture .. idle but the final output is still a continus sequence

packet generator can now set the sequence number enabling split regression to run. splits are now good.. mostly. some unrelated bugs it seems still persist

its likely the same bug as 20v2 where the last chunk flush timestamp was set to 0. causes the last split to output invalid data

would have showed up in the regressions. closing


Q: when a user clicks on a link in an email, can you trigger a journey on that?

Yes! It will trigger a email_clicked event that you can then use in journeys. The event contains the campaign name, ID, subscription ID and some related context that you can use for filtering

Is there a way to see a list of previous events for a certain user?

Yes! You can look up the user by ID, email or phone on the users page then navigate to the events tab. Clicking on any event will show you its full payload.

Ah, this is cool, thank you, Chris!


Bug in SentencepieceTokenizer

Identified potential bug in SentencePieceTokenizer where encoding was
not restricted to specific token. Sentencepiece.Encode itself doesn't
clear the input vector before populating the result for the input
token.

kick off the CI by commenting, since PR owner hasn't been a member yet.

the draft PR seems not to trigger the CI pipeline, in case if you are wondering.


[Fix] Move yamlparser to prod deps

There's a bug where a library that uses this dep fails because it doesn't install the dev deps, this is to move the yamlparser dep into the correct section in package.json.

Yes, please. Having the same issue.

I didn't wanted to mention the library itself, but is Device.

You can just manually do npm install yamlparser useragent as npm flattens the node_modules tree, the useragent module will find the yamlparser you manually installed and use that instead. I don't want to bundle it as part of the dependencies as it's optional functionality.

@3rd-Eden bro, if it's optional why do the mentioned libs break? are you suggesting those libs should know it's optional and they should be in charge of installing those deps?

Yo bro, I have no idea why it breaks. The only part of this library that uses yamlparser is when you call the useragent(true) update API, which mentions that you need to manually install those dependencies in order for that to work.
The browserslist-useragent library does not invoke this, nor does the device parser of this library use yamlparser.

Maybe it's incompatibility with transpilers, i'm using it inside TypeScript, how's supposed to know that the yaml dep is optional if the optional part is decided at runtime?
Anyway i moved away from Device, so it depends on @manuelbieh if he explains his case better.


More principled handling of string<->numeric conversions.

This refactor comes after a belated realization that our numeric
conversion routines (principally from_string<> and format) are
"locale-dependent" via their use of strtod, as well as atof() scattered
through the code.
In particular, this means that when software using this code is running
with a locale in which the decimal mark is something other than '.'
(e.g., many European locales that use ',' for decimal mark), these
functions will incorrectly parse text floating point numbers that use
the standard period as decimal mark.  For example, if the locale is
"fr_FR", atof("123.45") will return 123.0, rather than the correct
123.45.
After much debate, and a few implementations, we are declaring that
since the whole point of OIIO is about reading and writing persistent
data (image files!), that in order to be consistent, ALL of OIIO's
string parsing and formatting, including that done by utility library
functions, will be locale-independent by using the "C" locale (in
particular, we will use the usual North American default of '.' for
decimal separator).
Additionally:

Added a new stof(), stoi(), stoul() to replace the clunkier template
syntax of from_string<>. As explained, these are hard-coded to "C" locale,
not the native/global locale.

Much more attention to string_view safety, finding a number of subtle
bugs (including Strutil::parse_int, etc.)  where it was definitely not
safe to assume that the string_view passed was the null-terminated edge
of the string, and so, for example if a string_view pointed to the
characters "12" but the very next characters were "345" parse_int would
return 12345 instead of the correct 12.

Strutil::format and ustring::format (and our copy of tinyformat
underneath) were touched up so that the versions of format() that return
strings will use the "C" locale, versions added that return strings and
use an explicitly-passed locale, and the versions that append their
results to existing streams continue to operate as before by honoring
the existing locale conventions of the streams they are using.
We may revise this later depending on what the upstream tinyformat
chooses to do about the issue.

Several places where we assembled strings using std::ostringstream,
I forced the stream to use classic "C" locale in cases where it was
likely to have any floating-point data output.

For maketx and oiiotool, globally set the locale to classic. In these
cases, we control the whole app, so this is safe to do.

If we ever decide that we want versions of these functions that take
explicit locales, it's not hard to add.

This PR is a counter-proposal to #1785. In this one, we are not adding any API calls that take explicit locales, instead just changing the documentation on existing APIs to specify that OIIO uses "C" locale exclusively for formatting numerical values. Internally, of course we still play some games with locales to get that right. And we still fix all the bugs discovered with string_view and whatnot that were part of the other proposal.

LGTM
Eventually I would love to see us roll our own strtod/strtof -- but they are harder to write, so this seems like a good start.

We can easily drop in an alternate strtod implementation if we find a suitable one. Suitable means:

100% sure it matches system strtod in all edge cases, never has LSB errors even in unusual circumstances.

Outperforms the current scheme.

Is straightforward to modify to work directly on a string_view, without risking introducing bugs in the process.

Would be great if this could be backported to 1.8 and maybe 1.7 too (I'm stuck on 1.7 on Windows because of https://github.com/OpenImageIO/oiio/issues/1795).


Bump substrate to commit 8df8d908c4d77a8dd19751784b6aca62159ddda8

Sorry, I did some minor beautification while debugging the broken no_std build: found this unfortunately: https://github.com/scs/substrate-api-client/issues/218#issuecomment-1063477099


feat: add IncDedup filter

:question: What
Add the IncDedup filter.  IncDedup filter out records which contains identical values on configurable fields.
:white_check_mark: Checklists

[x] Is there unit/integration test coverage for all new and/or changed functionality added in this PR?
[x] Have the changes in this PR been functionally tested?
[x] Have new components been added to the related all.go files?
[ ] Have new components been added to the documentation website?
[x] Has make gofmt-write been run on the code?
[x] Has make govet been run on the code? Has the code been fixed accordingly to the output?
[x] Have the changes been added to the CHANGELOG.md file?
[x] Have the steps in CONTRIBUTING.md been followed to update a Go module?

Codecov Report

Merging #143 (02cca18) into main (1975c4e) will increase coverage by 0.15%.
The diff coverage is 77.27%.

@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
+ Coverage   49.19%   49.35%   +0.15%
==========================================
  Files          55       56       +1
  Lines        3852     3874      +22
==========================================
+ Hits         1895     1912      +17
- Misses       1748     1752       +4
- Partials      209      210       +1

Impacted Files
Coverage Δ

filter/inc_dedup.go
77.27% <77.27%> (ø)

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 1975c4e...a5051ac. Read the comment docs.


Talk to me 🙂🍔^_^🚗

Machine learning
Federated Learning
Cryptography
Differential Privacy

Would love to talk to you on any technical topic as I'm a hardcore Engineer, who loves TECH😎

Hi there @ramesht007

Hi @shashanktripathi0204

Hi Ramesh


Generic Dialogs API spec

I've had a couple requests for enhancements to the existing ContentDialog functionality. As a result, I'm drafting up an API spec for generic dialogs. As ContentDialog is a WinUI item (reverse engineered instead of ported, but still) I don't want to modify the API in a way that makes it different to the upstream version other than bug fixes or minor feature additions.
The biggest issue from the comments is that the lack of button options in ContentDialog make it somewhat limiting, something the old vista-style TaskDialog solves (to an extent). This proposal, therefore, seeks a new control and API spec. Note that this is just an API spec to layout the general thought and get feedback of desired features - and is not yet a firm proposal or commitment.
Haven't decided on a name yet (hence, "generic dialogs"), but I'm leaning toward either MessageDialog or TaskDialog (probably TaskDialog, as MessageDialog preceded ContentDialog in UWP and may be confusing about its use). To draft up the general idea, I've taken a look at the ContentDialog and vista-style TaskDialog (from the old Windows API codepack) APIs.
Generally, it will follow the same idea as a ContentDialog (asynchronous, hosted in the OverlayLayer of the window) including styling, but gives additional options for how it is set up:
public class TaskDialog : ContentControl
{
    // Title of the Dialog
    public string Title { get; set; }

    // Dialog icon
    public IconSource IconSource { get; set; }

    // Content (from ContentControl)
    public object Content { get; set; }

    // ContentTemplate (from ContentControl)
    public IDataTemplate ContentTemplate { get; set; }

    // The list of buttons to use for the dialog
    public List<TaskDialogButton> Buttons { get; }

    // Additional option items
    public List<TaskDialogControl> Options { get; set; }

    // Gets/sets whether the dialog has a footer region
    public TaskDialogFooterVisibility HasFooter { get; set; }

    // Sets whether the footer is expanded by default
    public bool IsFooterExpanded { get; set; }

    // Sets the title of the footer
    public string FooterTitle { get; set; }

    // Get/sets the footer icon
    public IconSource FooterIcon { get; set; }

    // Gets/sets the footer content
    public object Footer { get; set; }

    // Gets/sets the footer content template
    public IDataTemplate FooterTemplate { get; set; }

    // Sets the root object for which the dialog is hosted
    // Usually set to the window or top-level view
    // This will need to be set if the TaskDialog is not declared
    // in Xaml, so the OverlayLayer can be found
    public IVisual XamlRoot { get; set; }

    // Fired when opening, but before its shown
    public event TypedEventHandler<TaskDialog, EventArgs> Opening;

    // Fired when the dialog is opened
    public event TypedEventHandler<TaskDialog, EventArgs> Opened;

    // Fired when a closing action is in progress. Uses ContentDialogClosingEventArgs, which
    // provides mechanism for deferral and cancellation
    public event TypedEventHandler<TaskDialog, ContentDialogClosingEventArgs> Closing;

    // Fired when the dialog is closed
    public event TypedEventHandler<TaskDialog, EventArgs> Closed;

    // Shows the dialog asynchronously
    public async Task<object> ShowAsync() { }

    // Hides the dialog with a TaskDialogStandardResult.None result indicating no action should be taken
    public void Hide() { }

    // Hides the dialog with the given result
    public void Hide(object result) { }
}

public enum TaskDialogFooterVisibility
{
    Never, // Footer is never visible
    Auto, // Footer title is visible with expand option to show/hide
    Always // Footer is always visible and the footer title is hidden
}

// Base class for controls that can be added to a TaskDialog
// These would be abstractions and not actual controls, TaskDialog would create/manage that
public abstract class TaskDialogControl
{
    public TaskDialogControl() { }

    public TaskDialogControl(string text, object result) { }

    // The text caption of the control
    public string Text { get; set; }

    // The result the button corresponds to and is returned when the dialog
    // closes. Can be TaskDialogStandardResult or an user chosen object
    // May not be null
    public object DialogResult { get; set; }

    // Gets/sets whether the control is enabled
    public bool IsEnabled { get; set; }

    // Is this the default button - will only be settable on one control
    // error thrown if multiple are set
    public bool IsDefault { get; set; }
}

// Represents a regular button in a TaskDialog, can be placed in Buttons or
// Options area of dialog
// Buttons placed in the Buttons area will trigger an automatic close of the dialog,
// Buttons placed in the Options area will not, call Hide() if you wish to do so
public class TaskDialogButton : TaskDialogControl
{
    public TaskDialogButton() { }

    public TaskDialogButton(string text, object result)
        :base(text, result) { }

    // An optional icon
    public IconSource IconSource { get; set; }

    // Event fired when button is clicked/tapped (occurs before dialog close)
    public event TypedEventHandler<TaskDialogButton, EventArgs> Click;

    // Default Buttons - these will be immutable (no properties can be set on them)
    public static readonly TaskDialogButton OKButton = new TaskDialogButton("OK", TaskDialogStandardResult.OK);
    public static readonly TaskDialogButton CancelButton = new TaskDialogButton("Cancel", TaskDialogStandardResult.Close);
    public static readonly TaskDialogButton YesButton = new TaskDialogButton("Yes", TaskDialogStandardResult.Yes);
    public static readonly TaskDialogButton NoButton = new TaskDialogButton("No", TaskDialogStandardResult.No);
    public static readonly TaskDialogButton RetryButton = new TaskDialogButton("Retry", TaskDialogStandardResult.Retry);
    public static readonly TaskDialogButton CloseButton = new TaskDialogButton("Close", TaskDialogStandardResult.Close);
}

public enum TaskDialogStandardResult
{
    None,
    OK,
    Cancel,
    Yes,
    No,
    Retry,
    Close
}

// Represents a extra options command - can only be placed in the options area
public class TaskDialogCommand : TaskDialogButton
{
    // Additional caption for this command button
    public string SubText { get; set; }
}

// Represents an radiobutton within a TaskDialog - can only be placed in options area
public class TaskDialogRadioButton : TaskDialogButton
{
    public bool IsChecked { get; set; }
}

Mock-up of how it would look (this was done in PowerPoint, so slight alterations would be made in the actual styles)

Feedback welcome or just leave a reaction for support. The more support/demand for this, the more likely this enters my priority queue and will get done.

Looks really good and it allows to make our applications even better.

I really like this, as it adds more customisation options. alot like the material.avalonia custom dialogs

FYI, similar ideas were discussed in WinUI here: https://github.com/microsoft/microsoft-ui-xaml/issues/2313. You might find some inspiration/good-ideas there as well.

Looks like Avalonia has a discussion as well: https://github.com/AvaloniaUI/Avalonia/issues/670#issuecomment-767827453

Can be closed as #104 has merged


Plotting tests fail because of different image sizes

When comparing reference plots with CI plots, the image sizes are slightly different.
I tried to resize the image before using the compare_image function of matplotlib in tests/integration/test_dummy_integration.py, but the resizing creates small shifts in axes and labels which make the comparison not relevant.

It seems these reference plots are quite sensitive to minor changes in various things. Do we think it is a long-lasting solution to directly compare reference plots to one another or should we systematically resort to comparing only output numbers?

It seems these reference plots are quite sensitive to minor changes in various things. Do we think it is a long-lasting solution to directly compare reference plots to one another or should we systematically resort to comparing only output numbers?

It's a good question. Comparing numbers is great, and testing the plots does not replace this. However, a visual comparison of the data can often help quickly make sense of the data.
In addition, we want to regression test the plots (a large part of the output from PROTEUS is in the plots after all) as well as improve code coverage (see #268).
About this being a long-lasting solution: the pattern itself is used by matplotlib for their internal testing. I have used the pattern in several projects, and I have not encountered issues, the plots are typically reproducible cross-platform and cross-version.
We should look into the difference however. The major difference between other implementations of this pattern is that they directly work with the fig object, stripping any styling, which reduces differences with e.g. font rendering (usually the biggest source of differences).

The current code only supports saving the file and returning the figure (e.g. for use in a notebook). We should split out the actual plotting bit from the io (e.g. saving vs. displaying). This will also help solve the issue with the tests.


feat(helper): add getPageText

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

-1 of 27 (96.3%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+1.2%) to 73.055%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

tools/helper/src/node/page/text.ts
26
27
96.3%

Totals

Change from base Build<PHONE_NUMBER>:
1.2%

Covered Lines:
279

Relevant Lines:
362

💛  - Coveralls


Tracking exactly what is installed on ospc.org and when

Related to the #560 discussion on the release process we discussed, among other things, tagging the webapp-public master commits we are releasing.  This will help better track what is installed.  We also can do the following activities to better track the exactly what we install on ospc.org and its backend workers over time.  TODO:

[ ] Make a google doc for internal usage where we can write down exactly what we deployed to ospc.org and on which date and time we did it
[ ] Keep a folder on google drive where we upload yaml files that are created by conda env export on a backend or frontend worker after a deployment
* [ ] It would be good to have this as a reusable script, but even if the script is not done in time for the next deploy, we can go ahead and do conda env export manually.

@PeterDSteinberg said:

Related to the #560 discussion on the release process we discussed, among other things, tagging the webapp-public master commits we are releasing. This will help better track what is installed.

Yes, I agree completely.  It seems to me we want a record of the releases being used by TaxBrain for the following repos: webapp-public, Tax-Calculator (taxcalc package), OG-USA (ogusa package), and B-Tax (btax package).
This information should appear in two places that can be viewed by the public.
First, the current release numbers should be a the bottom of the TaxBrain page that appears when you click on What is TaxBrain?.  Right now there is this cryptic information:
          CODE BUILD

Version 0.9.0.d79abf - GitHub

And second, a history of this release information should be added to a new webapp-public RELEASES.md file, similar to the one now being used in the Tax-Calculator repo.
I think your suggestion of storing this historical information in a google doc is a very bad idea.  This is an open source project.  This basic information should be public.
@MattHJensen @PeterDSteinberg @brittainhard @jbcrail @hdoupe

I agree with @martinholmer that these documents should be public.  I don't think that
          CODE BUILD

Version 0.9.0.d79abf - GitHub

is too cryptic except for the "d79abf" part.  I think "Version 0.9.0" is fine.  However, while checking this out, I noticed that the link you select when you click Version 0.9.0.d79abf - GitHub is
https://github.com/OpenSourcePolicyCenter/Tax-Calculator
when I think it should be this https://github.com/open-source-economics/Tax-Calculator/tree/0.9.0 as found on the releases page.

@hdoupe said in #581 he thought only the commit number .d79abf was cryptic.
I agree.  The commit number adds no extra information, it just adds potential confusion for TaxBrain users who are not knowledgeable about git and version control.
Good catch on the need to have the link be something like:
https://github.com/open-source-economics/Tax-Calculator/tree/0.9.0

@MattHJensen @PeterDSteinberg @brittainhard @jbcrail


Sprig in control panel

Question
Is it possible to use Sprig within the admin side of a Craft site?
Additional context
I have a page to generate reports (made 100% better using Sprig), but I'd like it to be a page within the admin cp. I can add the basic markup, but when I get to adding the Sprig component I get an error of file not found. I have copied the component to just about every folder I can think it may be looking in, but have had no joy.

After a long gap in working on Craft stuff, and then getting back in to module development, I ran in to this same issue - I just couldn't seem to get sprig to load up templates no matter where I put them.  Drove me nuts.
I had forgotten the one key thing - in plugins/modules, the template path must be preceded by the module name as a pointer to where to find the templates folder in this context.
From the docs: https://craftcms.com/docs/3.x/extend/cp-templates.html#page-templates - it's just kind of hidden in the text there but it's really important:
Plugins can define templates within the templates/ folder within their base source folder.
Templates within there can be referenced using the plugin’s handle as the template path prefix.

As an example, I have a module named bridge, and I have a folder in it for templates, with a sub-folder for sprig components, so from the Craft root directory it looks like this on disk:
/modules/bridge/templates/stock.twig  (parent template that loads the sprig component)
/modules/bridge/templates/_sprig_components/stock-check.twig  (the actual twig component)
in the main module file (Bridge.php), I define a nav item:
        Event::on(
            Cp::class,
            Cp::EVENT_REGISTER_CP_NAV_ITEMS,
            static function(RegisterCpNavItemsEvent $event) {
                $event->navItems[] = [
                    'url' => 'bridge/stock',
                    'label' => 'Check Stock Levels',
                    'icon' =><EMAIL_ADDRESS>                ];
      )

(note the URL here is module_name/template_name - without the templates folder that is actually in the physical path, this is the bit I always get confused about...but there's 'magic' that means it looks in the templates folder when given this path...)
Then in /modules/bridge/templates/stock.twig I actually call on sprig to load and make the component reactive (actually a few components):
{% extends '_layouts/cp' %}
{% set title = 'Stock Check' %}
{% block toolbar %}
    <div class="toolbar-wrapper">
        {{ sprig('bridge/_sprig_components/toolbar-actions') }}
        {{ sprig('bridge/_sprig_components/toolbar-cache-tracker') }}
    </div>
{% endblock %}
{% block content %}
    {{ sprig('bridge/_sprig_components/stock-check') }}
    {# Has to be inside a block, might as well be here... #}
    {{ sprig.script }}
{% endblock %}

Again, note the 'magic' of using the module_name (ie bridge) - and NOT using the templates folder,  and then using the sub folder that has your components in it, so that:
Physical path:
/modules/bridge/templates/_sprig_components/stock-check.twig
Reference in your module:
 {{ sprig('bridge/_sprig_components/stock-check') }}
(Personally I find magic like that rather irritating and wish that using the module name just pointed things at the module root folder, rather than this implicit (and english centric) reference to templates, but....that's how it works...I presume so that it is very clear as to what will be web accessible and what won't).
In terms of the actual templates, from there it should be like any other control panel template, or really any template in Craft.  (And I'll just add the dev experience of using Sprig to build CP things is just glorious - you can add so much useful functionality so quickly!).
Hopefully I am not making an incorrect assumption as to what your problem is - if so, can you post some code?

Thanks for responding @bossanova808!


[FEATURE] sap.ui.demokit.CodeViewer: Improve readability of Code samples

Improves readability of Code samples (in the Explored App) by reducing the size of each tab using the new tab-size CSS property.
Before:

After:

Hi Hirse,
thanks for your pull. From a brief look it looks very good, but a responsible devloper will review it thoroughly and will get back to you.
Best regards,
Tobias

Hi Hirse,
Currently the defined tab-size in Explored App Code Viewer is 3ex, which is less than the proposed value of 4. After applying the proposed change the js sources look too stretched (opposite of the attached images).
Best Regards,
Nikolay

@NStoichkov I was looking at the explored app in Firefox, which unfortunately doesn't support an unprefixed property yet. There the code looks as in my first screenshot.
It would be great if -moz-tab-size could be added regardless the final value.
Yes, a value of 4 is wider than 3ex, but I was comparing it to the default which is 8, so 4 was a big improvement.
If you prefer less than 4, I would propose to change it to 2. The unit-less value means number of spaces which - in my opinion - makes more sense for code indentation than using a multiple of "the height of the lowercase x".
I will update this PR to the new values.

Thanks Hirse, the change is merged and will take place in openui5 1.42.2
Best Regards,
Nikolay


New users can't see their own posts

New user sees by default not his own post in the top 21:

After enabling wild west mode:

I mean, this makes sense that wild west mode is not enabled by default but maybe it would make sense that every user can see his own posts all the time?

Nice catch!
This is a bug. It should be visible.

This post actually got a lot of downvotes and AFAICT should be visible on homepage ranking, but is just lower in the fold. In WWM right now it's at position 33 but 46 in tenderfoot mode.
Going to close. Will reopen if there's confirmation that it's hidden and not just downranked.

Mhh, yes, interesting. Just testing locally and own posts show up without wild west mode as a new user.


Predicate built-in functions: valid code rejected by lint, invalid code accepted

There was the following lint error while checking abap2xlsx#805:
Statement does not exist in ABAPv702(or a parser error), "IF".

Concerned code (using the predicate built-in function contains):
      IF contains( val = <fs_sheet_string>-string_value start = ` ` )
            OR contains( val = <fs_sheet_string>-string_value end = ` ` ).

I think the syntax is valid in ABAP 7.02. At least it's accepted in 7.52.
If I force it to this invalid code (ABAP syntax error in 7.52), lint doesn't report an error:
      IF contains( val = <fs_sheet_string>-string_value start = ` ` ) = abap_true
            OR contains( val = <fs_sheet_string>-string_value end = ` ` ) = abap_true.

Workaround which both works in ABAP (at least 7.52) and in lint (ABAPv702):
      IF boolc( contains( val = <fs_sheet_string>-string_value start = ` ` ) ) = abap_true
            OR boolc( contains( val = <fs_sheet_string>-string_value end = ` ` ) ) = abap_true.

https://github.com/abaplint/abaplint/pull/2560/commits/b0e8bc5ad59e38dacff7b7ea61362602ac5a4957 adds information on what is builtin predicate functions


Cron job doesn't set the time

I use Raspberry Pi 4 with Raspberry Pi OS 64 and I installed the megaind repository. If I run set_time.sh from terminal it works, but when I set a cron job it doesn't. I have to set the full path to megaind in set_time.sh to work with cron.
t=$(/usr/local/bin/megaind 0 rtcrd)
https://github.com/SequentMicrosystems/megaind-rpi/blob/dbd74395461a73d679b6d19d1c133ee994e36adc/rtc/set_time.sh#LL20C1-L20C21

Hi,
Theoretically the megaind command is available to all users but your solution is a good one for all situations.
Thank you, we will change the script.


fix: fix a typo in .gitignore file.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


CLEWS-25132 Take 2: Rename package

Original PR: https://github.com/gro-intelligence/api-client/pull/188
Now consolidating the client classes has been pulled out into separate PRs:

https://github.com/gro-intelligence/api-client/pull/205
https://github.com/gro-intelligence/api-client/pull/226

so there are fewer diffs than last time.
Only user-facing difference is that now, both work:

old imports, i.e. from api.client.gro_client import GroClient
new imports, i.e. from gro import GroClient

Code does not need to be changed, at least not immediately. We can have a soft deprecation period going from the old imports to new.

testing and doing some  reorg as discussed

Tested with the old api.client imports:

[ ] search.py
[ ] quick_start.py
[ ] at-time-query-examples.ipynb
[ ] analogous_years/get_started_with_analogous_years.ipynb
[ ] crop_models/Sao_Paulo_brazil_sugar_content_modeling.ipynb
[ ] crop_models/brazil_soybeans.ipynb
[ ] crop_models/cash_crops.py
[ ] crop_models/ethiopia_cereals.ipynb
[ ] crop_models/kenya_cereals.ipynb
[ ] crop_models/soybeans.py
[ ] crop_models/sugar.py
[ ] analysis_kits/stocks_to_use_price_model/stocks_to_use_price_model.ipynb
[ ] anomaly_detection/sample_anomaly_detection.ipynb
[ ] similar_regions/find_similar_regions.py
[ ] batch_queries/batch_queries.py
[ ] prevented_plant/prevented_plant_models.ipynb


mergeResolvers() fails when find just one resolver file

I'm not sure if this is a bug, but I think is kind of weird the fact that I cant just have one resolver or mergeResolvers() call will fail

@erick2014 This is currently expected behaviour as we are using merge.all from deepmerge which expects an array. Relevant code in our repo is here.
Potentially we could change this behaviour if it isn't intuitive. @RodMachado Would it make sense to not fail if someone only has one resolver?