cmd/go: go fmt does not ignore dot files

Documentation specifies that gofmt ignores dotfiles but go fmt will still pass them as arguments to gofmt. For example (Go 1.7.3)
-> ᛯ echo package main >main.go
-> ᛯ strace -f gofmt . 2>&1 |grep nope
[pid  7607] lstat(".nope.go", {st_mode=S_IFREG|0644, st_size=13, ...}) = 0
-> ᛯ strace -f go fmt 2>&1 |grep nope
[pid  8013] lstat("/tmp/asd/.nope.go", {st_mode=S_IFREG|0644, st_size=13, ...}) = 0
[pid  8029] execve("/usr/lib/go-1.7/bin/gofmt", ["/usr/lib/go-1.7/bin/gofmt", "-l", "-w", ".nope.go", "main.go"], [/* 64 vars */] <unfinished ...>
[pid  8029] stat(".nope.go",  <unfinished ...>
[pid  8029] openat(AT_FDCWD, ".nope.go", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid  8029] read(3, "package nope\n", 512) = 13

some editors like emacs create symliks as locks for modified files like that: .#wifitoken.go -> xani@ghroth.11692:1482232478 and that causes go fmt to spew errors:
-> ᛯ go fmt
stat .#wifitoken.go: no such file or directory
exit status 2

which could also be avoided if go fmt correctly ignored files

I'm not sure there is a bug here.  Both programs are following their documentation.  I think the open question is whether we should modify the go tool to ignore filenames that start with '.'.

I'd be nice to have consistency, for example go vet ignores dotfiles (even tho doc doesn't explicitly say anything about it), as does go build

Dot files are a Unix convention and not a universal one. In general tools should not ignore them; they are just files like any other.

@robpike, there's no need for us to be stubborn about it, though. Many of our public talks on Go extol the virtues of convention over configuration (the GOPATH layout, file naming, etc). We should accept popular existing common conventions (dot files), even if we don't all totally agree with them.
But consistency between "go fmt" and "gofmt" is probably a bigger argument.

But @bradfitz, dot files are only special on Unix.

Can't we just consistently ignore the hidden files depending on the system the tool is running? Dot files on Unix, hidden file attribute on Windows. There are many support files editors generate and it is terrible having to deal with them.

Wait, something is wrong here.  The go tool, for better or worse, already ignores files whose name begins with '.' (and '_').

Oh, I see.  go fmt specifically runs gofmt on all Go files that it finds, which includes the files that the go/build package stores in IgnoredGoFiles.  The go/build package puts all non-matching files whose name ends in ".go" in IgnoredGoFiles.  Files that start with '_' or '.' do not match, and therefore always wind up in IgnoredGoFiles.
So now I think the bug is that the go tool should really ignore files that start with '_' or '.' for those three cases.

@rakyll you pretty much have to have same ignore list between platforms or else you will end up with inconsistencies with build process.
If say .something.go is ignored on unix (because dotfiles) but is not ignored on windows (because it does not have hidden attribute) then you will have different result on both platforms. And filename is pretty much only thing common between platforms so using any extra filesystem attributes could potentially add to the problem

@XANi I don't think we shouldn't care other than consistently ignoring dotfiles everywhere because dotfiles are portable. If you put your source in a hidden file/temp file, you are already inviting trouble because meaning of a hidden/temp file is dependent to your platform. The go tool should consider those files as invalid sources of code and ignore them all together.
The go tool already uses different ignore lists via build tags. I don't think our users are having a problem with keeping the integrity of their packages. I assume ignoring hidden files is not going to create more trouble.

@rakyll I didn't say it should care, just that relying on anything other than file name generates problems and IMO isn't even worth the effort of writing platform-specific code.
It is extra code that doesn't really help anyone, as you said if someone is using hidden attribute they probably will screw themselves at some point anyway, whether go tools ignore it or not.


How to setDimAmount like dialog?

dialog.getWindow().setDimAmount(0);
is there any way to do like this?

1.11 has a method to change overlay background. I think this will solve this issue.
setOverlayBackgroundResource


Dynamic collection of command names

Describe the problem
I have a nested architecture where there is a common set of parameters that are shared with multiple commands.  In my usage statement I want to see something like this:
Usage:  app [one|two] [options]
class Common
  include TTY::Option
  # ... common params for all commands
end

class One < Common
  # ... parameters unique for one
end

class Two < common
  # ... parameters unique to two
end

How would the new feature work?
app --help
Returns a usage report for only the common parameters and gives the command name and command description that are available.
app one --help
Gives a usage report showing the common parameters and the unique parameters for command one.
Drawbacks
Could get lost in ObjectSpace ...
I tried using a class variable at the base class level; but, command is executed at elaboration time.  This does not allow for the dynamic assignment of content.
Bottom line: as is, I can statically assign command "[one|two]" in the base class; but, when I add or remove command classes I have to remember to change that static text.  I'd rather the computer do it for me like this:
command '[' +
  ObjectSpace
    .each_object(Class)
    .select { |klass| klass < App::Command }
    .map{|k| k.name.downcase.split('::').last}
    .join('|') +
  ']'

DSL by its nature is executed at elaboration.  What I'm wanting has to be done AFTER elaboration.  That means that the DSL needs to be lazy.
I am still trying.

Hi Dewayne 👋
Thanks for taking an interest in tty-option and providing your thoughts on handling multiple commands.
However, this issue is not related to this repository, so I'll close it here.


Scanning Missing episodes on current database

Scan missing episodes on every seasons , query the missing episodes by Title + sXXeYY *( Maybe using Kat-api )

is anyone working on it ?


Failed to start sail with "sudo chown -R" problem

I built last snapshot of Sail, and I got the following error when run project:
Successfully tagged linux-china_sail-demo-hat-4dd9e4a6c1c7d141:latest
2019-05-22 16:29:02 INFO	writing sail proxy logs to /var/folders/fc/2bmlvpc166qbp2jc5d610jw00000gn/T/sailproxy_linux-china_sail-demo948935679
2019-05-22 16:29:30 INFO	loaded code-server in 27.792900111s
2019-05-22 16:29:40 ERROR	failed to wait for project to be online: context deadline exceeded
+ cd /home/user/sail-demo
+ sudo chown -R user:user /home/user/.vscode
2019-05-22 16:29:40 ERROR	build run failed: context deadline exceeded

and it's fine with Sail 1.0.0 version.
My env:   Mac with VS code installed already.

By" last snapshot", do you mean release?
What OS are you on?

Can you run code-server from the binary?

This may happen if you have a large ~/.vscode directory, I'll create an issue for it

@nathanpotter  it's correct and .vscode is large, and Docker logs as following:
+ cd /home/user/sail-demo
+ sudo chown -R user:user /home/user/.vscode
+ code-server --host <IP_ADDRESS> --port 8443 --data-dir /home/user/.config/Code --extensions-dir /home/user/.vscode/host-extensions --extra-extensions-dir /home/user/.vscode/extensions --allow-http --no-auth
+ tee /tmp/code-server.log
(node:199) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
INFO  code-server v1.1119-vsc1.33.1
WARN  "--data-dir" is deprecated. Use "--user-data-dir" instead.
INFO  Additional documentation: http://github.com/cdr/code-server
INFO  Initializing {"data-dir":"/home/user/.config/Code","extensions-dir":"/home/user/.vscode/host-extensions","working-dir":"/home/user/sail-demo","log-dir":"/home/user/.cache/code-server/logs/20190523022943700"}
INFO  Starting webserver... {"host":"<IP_ADDRESS>","port":"8443"}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://github.com/cdr/code-server/blob/master/doc/security/ssl.md
WARN  Launched without authentication.
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Starting shared process [1/5]...
WARN  stderr {"data":"(node:212) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO  Connected to shared process

Might I propose a --no-extensions flag that would disable the mounting of the user's local extensions?

Would this be similar to sshcode's nosync?

The fix is to remove the -R.

We only want to make sure the automatically created directory ~/.vscode, has the right perms.

will open a PR in a second


Re-enable Pexp_letception tests disabled in #1531

Re-enables tests that were disabled because this feature was not available on 4.03 and earlier.
Fixes #1535.
Introduces a convention for naming typecheck tests to only run them on the OCaml compiler version in their name or later.

Should these be disabled on 4.03 and earlier?

It's a feature that doesn't run on 4.02.3. Probably needs to be 4.04.2 and higher. Test script needs to be changed to run certain tests on specific versions. They were disabled because of this. Focus is on shipping the new syntax atm.

I added a commit which allows typeCheckedTests to skip the compilation step on certain compiler versions by adding a line to formatTest/typeCheckedTests/ignore_in_version indicating the filename and version number separates by a : character, i.e.
./attributes.re:4.02.3

If it is ignored on the compiler version which it is running on then it is marked as   ☒ IGNORED in yellow in the output and does not result in a failure.

Does that ignore the whole file?

Currently what it does is ignore only the compilation at the end of the typeCheckedTest. The formatting is still done, and it can fail if something went wrong there. Perhaps the naming of this type of ignore could be expanded upon a bit, but I figured we only wanted to ignore the parts that were failing due to differences in compiler support.

Not sure if ignoring the test is a good idea 😄
Can you make it so that all test with the following name scheme work on specific compiler versions and above?
Example:
myFileTestName.<version>.re
attributes.4.04.2.re

So attributes.4.04.2.re only runs on 4.04.2 & 4.05 & 4.06 (e.g. a >=)

I was also thinking about whether the stuff that needs to be ignored in earlier compilers should be moved to its own file (so far just these two blocks in question). So I might go ahead and move these two into their own file.

Can you make it so that all test with the following name scheme work on specific compiler versions and above?
I think that is probably an easier way of specifying which ones not to try to compile. Should they not be run at all or just skip the compilations step?

 Should they not be run at all or just skip the compilation step?

We only care about the typed_checked tests because the unit tests only print the ast. It's the actual compilation with the ocaml compilier that verifies if the ast is correct. Ocaml-migrate-parsetree internally migrates the ast version to make Reason compiler-version agnostic. The ocaml compiler will complain though when you try to use 4.04 features on 4.02.3 for example.
Overall this PR is good for me.

I know we don't build on it in CI, but I have verified that all the tests pass on OCaml 4.04.0, as that was the minimum version set for these tests.

We do run on 4.04 and it's passing?

Thanks, merged!


Too many files in the project folder

Presently, there are about 17 files in the test folder and the number of files is only expected to grow. The issue is that files from the test driver and the test suites are in the same folder.
I propose placing the files for each test suite in its own sub-folder and also create a new filter under "Source Files"  in the Visual Studio solution. So, as of now, this proposal will cause three sub-folders: driver-test, array-test, string_view-test
The proposal also enables automation of determining and acting on test suites (with a certain organizational convention enforced)

@cmcmone has addressed this issue in commit 7745eec which is included in PR #23


[Question/Feedback]: Exclude some resources from being monitored

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Description
I have a customer requirement where several VMS are being deployed but not all VMs require Alerting. This normally is the case with Devops Runners that switch off regularly everyday at a certain period of time. Once this event happens a heartbeat alert will be fired which is not required on those VMs.
For more clarity, Consider the following example:
there are 3 Vms, 2 Vms require the alerting but the third Vm needs to be excluded.
I also looked into the Monitor Disable parameter in the Json however, this might have some limitation:

the parameter is targeting scopes meaning all VMs will be affected and in my case i only want some VMs to have alerting disabled.
In the Json itself, the Monitor Disabled isn't included within the VMs alerting

Hello @MohmadEh ,
any news about this one?

Hello @MohmadEh ,
given your feedback through IM, I will close this one as well, since you can apply the same solution proposed for [Question/Feedback]: Monitor Disable Parameter #131.
Thanks,
Bruno.


ZeroDivisionError: integer division or modulo by zero

I got this error messsage when trying to train the images. FYI my images is more than 20.
My command
sudo python retrain.py --bottleneck_dir=tf_files/bottlenecks --how_many_training_steps=500 --model_dir=tf_files/inception --output_graph=tf_files/retrained_graph.pb --output_labels=tf_files/retrained_labels.txt --image_dir /Users/ZERO/Documents/Github/tensorflow-python/tf_files/images/..

Error message
Looking for images in 'bottlenecks'
No files found
Looking for images in 'images'
Looking for images in 'inception'
WARNING: Folder has less than 20 images, which may cause issues.
Looking for images in 'images'
Looking for images in 'inception'
WARNING: Folder has less than 20 images, which may cause issues.
2017-05-23 13:00:12.940135: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-23 13:00:12.940170: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-23 13:00:12.940177: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-05-23 13:00:12.940184: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-23 13:00:12.940190: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2017-05-23 13:00:21.462092: Step 0: Train accuracy = 100.0%
2017-05-23 13:00:21.462469: Step 0: Cross entropy = 0.427569
CRITICAL:tensorflow:Label inception has no images in the category validation.
Traceback (most recent call last):
  File "retrain.py", line 1107, in <module>
    tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "retrain.py", line 910, in main
    bottleneck_tensor))
  File "retrain.py", line 515, in get_random_cached_bottlenecks
    image_dir, category)
  File "retrain.py", line 227, in get_image_path
    mod_index = index % len(category_list)
ZeroDivisionError: integer division or modulo by zero

Please advice. Thank you.

CRITICAL:tensorflow:Label inception has no images in the category validation.
and warning says you need more images in inception.
So instead of "images" folder, can you share what's in "inception" folder?

Here is the inception folder.

See if this link helps
https://stackoverflow.com/questions/41542706/tensorflow-label-inception-has-no-images-in-the-category-training?rq=1

Thank you for supporting our friend @shitian-ni.

@jart You are welcome.
@datomnurdin I think the actual error reason is in your command argument --image_dir /Users/ZERO/Documents/Github/tensorflow-python/tf_files/images/...
The .. in the end means the parent folder of images folder. So it also find images in folder bottlenecks and inception.
You should delete .. from the argument.
Another point is that I think you should put images in folder "images" in subfolders with folder name as category names

@shitian-ni The problem still occur even I already put more than 2++ images. Still generate this error message
2017-05-27 19:52:29.487781: Step 0: Train accuracy = 100.0%
2017-05-27 19:52:29.489798: Step 0: Cross entropy = 0.440165
CRITICAL:tensorflow:Label inception has no images in the category validation.
Traceback (most recent call last):
  File "retrain.py", line 1107, in <module>
    tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "retrain.py", line 910, in main
    bottleneck_tensor))
  File "retrain.py", line 515, in get_random_cached_bottlenecks
    image_dir, category)
  File "retrain.py", line 227, in get_image_path
    mod_index = index % len(category_list)
ZeroDivisionError: integer division or modulo by zero

Please advice.

Did you remove .. from --image_dir  argument?

@shitian-ni yeah, its fixed. worked now. thanks.

good day for datomnurdin
finally... can you write the working list of params?
because I have the same problem with the "Label inception has no images in the category validation"

Hello datomnurdin ,
Can you please highlight what worked, Im facing same issue.
Thank You

It worked, pls ignore.
Thanks

Instead of using
--image_dir=fruits
use
--image_dir=./fruits


feat(tabs-extended): avoid opening to middle of accordion content

Related Ticket(s)
none
Description
Before:
https://github.com/carbon-design-system/carbon-for-ibm-dotcom/assets/12532727/47a9ac11-2959-48fe-8b78-263ff538ff08
After:
https://github.com/carbon-design-system/carbon-for-ibm-dotcom/assets/12532727/a4a6abfc-ca0c-4c27-aaf9-110417fda231
Changelog
Changed

Ensures opening a <dds-tabs-extended> mobile accordion item brings users to the top of the accordion content.

just needs a yarn format and we can get into the release


Add cluster to cmdline options

This options could be useful in user topology.

👍

@nwangtw  Was this change updated in the documentation anywhere?

@nwangtw Was this change updated in the documentation anywhere?

Good point. I don't think the CLI document contains information about any of these options. Will see where to add them. Thanks.

Thank you sir


Find or create replacement for Scholarpress Coins

The ScholarPress Coins plugin causes problems when users switch themes, and has been banned by WordPress.org, so we need to find a replacement.
The plugin adds metadata to WordPress posts and pages for Zotero import.
There are some alternatives here: https://www.zotero.org/support/plugins but they are all quite old. It might be better to write something from scratch, or based on one of the listed plugins.
There is some documentation from Zotero here about COinS: https://www.zotero.org/support/dev/exposing_metadata/coins
They suggest Google's system as a better alternative.

Zotero has some information on creating a "translator" here: https://www.zotero.org/support/dev/translators.
There's frameworks for doing this:
https://www.zotero.org/support/dev/translators/scaffold
https://www.npmjs.com/package/generator-zotero-plugin


Fixing issue where request error could prevent the response from completing

Would you mind elaborating on why this is needed. What scenario causes both the success and error handlers to be invoked?

@clayreimann ping

We saw this when we were making request to a server we had running on the same machine. The request we were making was ~22k of JSON. The error we were seeing was that Node was telling us that the remote server had closed the connection (which it had, because it was done sending) triggering req.on('error) before our res.then had finished processing.
Not sure why this behavior is exhibited, but I also can't think of a scenario when an error in the req layer wouldn't propagate down into res. I haven't created a minimal test case for this behavior but I can give it a shot if you need.

@clayreimann I think we can close this PR because it's been open for over year and doesn't have a clear purpose. Once the promise the adapter returns is settled (because the complete response has been received or an stream was requested) is cannot change its state, so there's no need to add that flags because your .then will never be called more than once.
If you think there's more to this please add a comment and a failing test.
Thanks!


The imported project "C:\Program Files\dotnet\sdk\1.0.0-preview4-004233\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found.

I have installed the latest version of Nadeko.
This happens whenever I try to run Nadeko.
Quick Edit: The file does not exist on disk. I have checked.
Quick Edit 2: Nor do any of the folders after 1.0.0-preview4-004233.
ERROR BELOW.
D:\Programming\Discord Bot\Nadeko\NadekoBot\src\NadekoBot\NadekoBot.xproj(7,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-preview4-004233\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

My fix for the problem is to disable 1.0.0-preview4-004233 by renaming it x1.0.0-preview4-004233.
Also got: 1.0.0-preview2-1-003177, 1.0.0-preview2-1-003131, 1.0.0-preview2-1-003156 but those work fine.

That worked. Thanks.

@raxixor or @Kwoth, close the issue. 😛


Use of "const" in strict mode

This error occurs on a new install, after cloning the repo, running npm install, and running npm run hot-server.
server.js doesn't seem to be a true JavaScript file, regardless of the .js extension. In addition to the error below, there is a CoffeeScript-like closure using => and string interpolation using backticks. All of these prevent npm run hot-server from running. Is there a dependency not installed with npm install?
/Users/awmartin/Dropbox/Playground/electron-react-boilerplate/server.js:4
const path = require('path');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

npm-debug.log.txt

Which node version you are using? Now required node >=4.
https://github.com/chentsulin/electron-react-boilerplate/blob/master/package.json#L104

That was it. Perhaps some documentation in the README or an error if the version doesn't match would help? Thanks.

Maybe  we can use https://github.com/facebook/fbjs/blob/master/scripts/node/check-dev-engines.js and postinstall to improve this https://github.com/facebook/react/blob/master/package.json#L53


Added C-HR Hybrid engine f/w

@joxaarol#2418's 2020 C-HR Hybrid DongleID b7087e3bfd3a9cf6
https://discord.com/channels/469524606043160576/524592892627517450/721373655174742086
I also alphanumerically sorted the engine firmwares as a best practice, and to be consistent.

Confirmed working!


[feat]:  ready for development

Tag Name
rh-stat
Purpose
The Stat component is used for displaying statistics in an eye-catching block form.

Stat can also be used inside other components, like <rh-card>.

More specifications
Distinguishing factors
No response
Where will it be used?
RH Stat will be used on marketing pages, customer portal pages, dashboards and other areas where displaying eye-catching statistics is important.
End user
A customer or potential customer who would be interested in seeing statistics around a certain feature or product.
Intended end use
A customer or potential customer would be presented with a nice visual representation of a statistic.
Properties
See specifications
RH Stat needs a few slots:

Statistic (text, number)
Title (optional)
Caption / short description / body text
Icon (optional, above statistic always)

Options:

Position of title can be above or below the statistic.
Sizes: default and large
Theme: on light and on dark
Text is centered (always)

May need to discuss inclusion of CTA due to spacing requirement below the stat.
Examples:

Page Builder

[ ] My component will be part of a page-builder experience
[X] I'm not sure

Accessibility Features

[X] Color: Color should not be the primary visual means of communicating information (1.4.1)
[X] Content or microcopy Text in any language should be clear, meaningful, structured, etc.
[X] Text Contrast: Small text should have a contrast ratio of at least 4.5:1 (1.4.3)
[X] Text Contrast: Large text should have a contrast ratio of at least 3:1 (1.4.3)
[X] Resizable Text: Text should have the ability to be resized up to 200% without losing content or functionality (for example, horizontal scrolling) (1.4.4)
[X] Alt Text: Non-text elements should have concise text descriptions (a.k.a. alt text) (1.1.1)
[X] Keyboard: Descriptions of how interactive elements behave when a key is pressed should be included (2.1.1) (for example, the Esc key closes a navigation menu)
[X] Focus Appearance: Colors between focused states should have a contrast ratio of at least 3.1 (2.4.11)
[X] Focus Appearance: Borders should have a thickness of at least 2px (2.4.11)
[X] Focus Order: It should be logical how a user moves focus from one element to another (2.4.3)
[X] Motion Animation: Controls should be available to disable an animation triggered by an interaction (2.3.3)
[X] Mobile: Interactive elements should be reachable for touching, scrolling, or dismissing

MVP Requirements

[X] Correct styles and neccessary sizes, orientations, variants, spacers, and themes
[X] Responsive sizes and page layout examples placed on screenshots
[X] Functionality guidance and static animation frames or prototypes with motion
[X] Interaction and Selected states
[X] Alignment options, character counts, and necessary translations
[X] Clear and structured content, acceptable text contrast, and logical keyboard events

Appearance

[ ] Foundations are represented as tokens or variables (border, color, font, opacity, spacing, shadow, etc.) [Consult with the assigned developer to ensure you are both working with the correct styles and values]
[ ] Foundations are applied to elements (backgrounds, buttons, fields, icons, links, etc.)
[X] Size (Standard, Compact, Mini, etc.)
[ ] Orientations (horizontal or vertical)
[ ] Position in relation to trigger (top, right, bottom, left, etc.)
[ ] Hierarchy and decoration variants (Primary and Secondary CTAs, Earth and Wind variant Tabs, etc.)
[X] Decorations (borders, logos, UI icons, etc.)
[X] Desktop and mobile scale spacers (visit the Spacing and Typography pages for examples)
[X] Themes (light, dark, high-contrast, custom color, etc.)
[ ] Edge cases or limitations (accessibility, brand extensions, horizontal scrolling, missing images, etc.) [It is not required to include all of these specs, but keep them in mind]
[ ] Fallback (if a browser does not support the original design) [Consult with the assigned developer first to determine if this is necessary to design]

Page Layout

[ ] Location on page (navigation, hero, band, card, footer, etc.)
[ ] Grid (fixed width inside the grid, full-width or outside of the grid)
[ ] Position on page (inline, overlay, toast)
[ ] Stacking (space in between each instance if your component is meant to be repeatable)
[X] Responsive screen sizes (desktop, tablet, mobile, etc.)
[ ] Content degradation (becomes hidden, reduces in size, truncates due to length, etc.)
[ ] Scrolling behavior (fixed, sticky, content scrolls inside; visit this page for examples)

Behavior

[ ] Functionality (collapse, expand, navigate, play, submit, etc.)
[ ] Animation or motion (hover, jump, slide, stack, toggle, etc.)
[ ] Overflow (when content exceeds a defined boundary; visit the Tabs page for examples)
[ ] Other effects (blur, cover, shuffle, etc.)

States

[ ] Interaction (default, focus, hover, active, disabled, dragged, etc.)
[ ] Selected (if a user needs to distinguish between active or inactive content)
[ ] Steps (if a user needs to move through steps toward the completion of a task)
[ ] Error (if a user needs to complete a task or fix an issue before proceeding)
[ ] Severity (if a range of status options need to be communicated to a user)
[ ] Boolean (if on or off are the only actions available to a user, literally or semantically)
[ ] Skeleton loading (if a component might load slower for a user than expected)
[ ] Empty (if data cannot be displayed without user input; visit this page for examples)
[ ] Fallback (if JavaScript is disabled or it fails to load) [Consult with the assigned developer first to determine if this is necessary to design]

Content

[X] Alignment options (left, center, or both)
[ ] Character counts (minimum and maximum)
[ ] Links (which links are inline, external, redirects, etc.)
[ ] Translations (German, Japanese, Hebrew, etc.)
[X] Edge cases or limitations (overflow, truncate, wrap, etc.) [It is not required to include all of these specs, but keep them in mind]

@brianferry, the XD link now also shows two screens at the end with examples of the stats in context. They look the same as the screenshots under the Purpose section, but spacing has been updated. You're also able to check sizing, colors, etc. by clicking the </> icon on the right.

@brianferry, icons used with  should be #151515 for light theme and #fff for dark theme.

@marionnegp - Do we have an expectation that we will be implementing an icon library in rhds or are we primarily expecting users to put in pfe-icons? I don't think it would matter too much to the styling of the app but just double checking before I include pfe-icons in my demo files.

Also, should we include a loading state for this component in case the data that is being pulled for the statistic is not ready yet?

@markcaron, what do you think about implementing an icon library in rhds?
@brianferry, for the loading state, are you talking about a live stat component needing to pull a number from a data source?

Yeah, basically if the user was going to pull the stats for something based on data coming back from an API rather than static content I could see them also wanting the ability to put the stat component as loading until they have their data back.  This can also be something we add later on if we'd like to though if it's not a current use case.

It doesn't look any stats are using an API, but it's a good thought. <rh-spinner> might be good for something like this, since the stat should load fairly quickly. Can we add this later?

Yup, no problem, just wanted to throw that out there in case it should be a consideration.  Thanks @marionnegp

@bennypowers @heyMP @zeroedin
Been taking a look at this and wanted to get some feedback from something I was thinking about.  So the way it's outlined it looks like the main things that we would like the user to be able to do is input the own text / icons into the rh-stat component with the four outlined sections:
rh-stat-title
rh-stat-description
rh-stat-statistic
rh-stat-icon
Given that we are likely not expecting the user to be putting their own HTML into the element I am thinking it makes more sense to make the expected markup something like this so they will just need to add the text and the elements will handle their own styling.
<rh-stat>
  <rh-stat-icon></rh-stat-icon>
  <rh-stat-title></rh-stat-title>
  <rh-stat-statistic></rh-stat-statistic>
  <rh-stat-description></rh-stat-description>
</rh-stat>

Though we could also go with slots and do something like this which would be more flexible
<rh-stat>

</rh-stat>

Wanted to get some feedback on this and see which we think is better for our use-case here.

I think we are leaning toward using slots and fallback slot content as much as possible over creating new components for everything.  So in the case of icon, we could have a slot for icon AND having an icon @property or @state.
render() {
  return html`
    ...
    <slot name="icon">
    </slot>
    ...
  `
}

@marionnegp - Just double checking, from the UX documents it looks like we will either have the title or the icon present in a rh-stat component but not both at the same time, is that correct?

Hm, I hadn't considered that variation. I think we can offer it just in case and use the same 16px margin below the icon.
CC: @coreyvickery

@brianferry def slots > mandatory custom children, in this case.
you can use hasSlotted and classMap or ?hidden to hide one or the other, say if title is meant to take precedence over icon

@bennypowers yeah that's what I was thinking, if we have an order of precedence it won't be hard to implement that order of operations.  We can see how it looks both ways and see what we think

@brianferry, I wanted to follow up on the icons. We'll be moving icons into an RHDS library, so icons in the demo will have to be updated then.

Update on this ticket, got approval for the rh-stat component and the PR has been merged.  The branch is out there along with the docs page I had set up for the demo (docs page is not live on ux.redhat.com, just in our files) so that is available whenever anyone would like to take a look at those. Not sure if this should be moved to done at this point and create another issue for the docs or not


New endpoint /credentials/distribute to manage entire wallet exchange for issuer

As things stand with sign-and-verify, we leave it up to the issuer (i.e, a school that wants to use sign-and-verify) to manage:
at setup time:

confirming their OIDC system works with LCW, including adding OIDC endpoints, etc. to DCC config file
setup of Mongo DB
installation and configure of sign-and-verify including adding DB config details

and at issuance time:

adding credential data to Mongo (via CSV upload, or however issuer wants to add it)
managing how a holder requests a specific credential (e.g., from course page or from a degree download page)
generating a challenge (although we don't currently have any way to pass that challenge to sign-and-verify to later use when validating the DID-auth - see #66)
construct the deep link (or CHAPI request)
making the deeplink or CHAPI request available somehow (email, web page) - including the CHAPI poly fills

I think we could handle a few of the tricky things here for the issuer by providing a new endpoint in sign-and-verify (called something like /credentials/distribute).
The issuer will redirect to this new endpoint (after the holder has clicked some button on some campus page asking for a credential), passing along the data for a specific credential (e.g., degree details for James Chartrand).  The endpoint will take care of the rest including: the challenge generation/management, deeplink/chapi request, request endpoint that receives DID Auth, validation of challenge, VC construction, signing, revocation position allocation, logging, etc.
The endpoint would likely first show a web page that explained to the holder that they are about to download a credential (and maybe show them some of the passed in details), and that they need to install a wallet, be looking at the current page in a web browser on their phone, etc.   The page would also provide them with various different links (options) including:

deeplink if using LCW (or any other wallet that we support that requires a deep link)
CHAPI 'get' request (and the CHAPI polyfill)
possibly an option to get a PDF copy with a QR
maybe just a QR they could scan right then and there from a wallet like LCW
any other options we want to provide (direct storage via WebVerifierPlus?)

The holder would choose an option, e.g, clicking the LCW deeplink, which would open the wallet and pass in the deeplink, which the wallet parses, generates a DID Auth, and submits back to the request end point.  The endpoint then receives DID Auth, checks it, including the challenge, constructs the credential (using data it stored with the challenge), signs it, allocates revocation position, logs the credential, and returns it.
This would lessen the burden on the issuer.  The issuer would no longer have to:

generate a challenge or manage its expiration
construct a deeplink or chapi request (or have to include the chapi polyfill, including maintaining updates to that polyfill)
no longer have to make their OIDC system (or SAML) work with the wallet

They would still have to have an authenticated web page from which the student can choose the credential they want, and they'd have to retrieve the credential data from somewhere, either at the moment of request, or by adding it to the MongoDB at some point (although I suspect many issuers will not want to have to maintain yet another DB and would prefer to just use their existing campus or course DB). Both these things though - retrieving credential data and making an authenticated web page - are almost certainly things the university is already very comfortable doing.
Note that this endpoint could also make it much easier to provide this as a hosted service.  No longer would the issuer have to upload data to a hosted Mongo instance, or worry about how authentication works, or how exchange with the wallet works (deeplink, etc.)  The issuer just posts the credential data to the server and it handles everything else.  It would become a lot more like the /credentials/issue endpoint which provides something like a simple hosted signing service, without requiring any back channel calls to sign-and-verify.
The data that would get posted to the new endpoint could be something like:
{
	type: 'degree'
	issuerName: 'Queen's University",
	holder: 'James Chartrand',
	degreeType: 'Bachelor of Science",
	program: "Computer Science",
	yearIssued: '1994'
	callback: 'http://locahost:3333/credentialIssuedCallback
}

The callback would be invoked after the credential has been issued, giving the issuer a way to record the issuance in their local systems if they wanted to.

Suggest we close since we are refactoring sign-and-verify


Implement widgets dashboard layouts

Implemented missing concepts to handle the dashboard layout. This is necessary to remove the temporary hack for time-series widget where the torque layer had to "taken out" of the normal rendering, to instead allow a layer to have multiple widgets but in different places (for the moment there's two; sidebar or below map).

_A torque layer having multiple widgets in various locations, here a time-series widget + category of twitter usernames (actual names redacted)._
I've tried to minimize the changes of existing "vis" code and since the dashboard really "wraps" it, it fit nicely to be added at the top-level in createVis method.
Also, while widgets are related to layers, having individual widgets collections on the layers created of unnecessary code (e.g. numerous collections, methods re-triggers), so by removing that the layouts and widget code could be simplified quite a bit (e.g. removing the widget_layers_view completely), KISS.
@alonsogarciapablo can you review please?

retest this please

retest this please

I left some minor comments. Great job @viddo!
My only concern with this PR is that cartodb.createVis will never work as before (we probably "broke" it some PRs ago). Also, there was some discussion the other day about wether all this "layout" has to be part of CartoDB.js...


Unable to draw image over face detection landmarks via canvas.drawBitmap

Step 1: Describe your environment

Android device: Google Pixel
Android OS version: 9
Google Play Services version: 14.7.99
Firebase/Play Services SDK version: exactly as the ones from the latest sample app:

// ML Kit dependencies
    implementation 'com.google.firebase:firebase-ml-vision:19.0.0'
    implementation 'com.google.firebase:firebase-ml-vision-image-label-model:17.0.2'
    implementation 'com.google.firebase:firebase-ml-vision-face-model:17.0.2'
    implementation 'com.google.firebase:firebase-ml-model-interpreter:17.0.1'

classpath 'com.google.gms:google-services:4.2.0'

Step 2: Describe the problem:
I got the latest sample app from here and modified it so that it draws an image over some detected landmarks. This worked fine initially by using canvas.drawBitmap but about one month ago it didn't work anymore. I am not sure if this was related to Android OS upgrade or firebase sdk upgrade.
Steps to reproduce:
The things that I changed (from the initial sample code) are:

modified constructor of FaceDetectionProcessor from here so that it tracks all landmarks:

new FirebaseVisionFaceDetectorOptions.Builder()
                        .setLandmarkMode(FirebaseVisionFaceDetectorOptions.ALL_LANDMARKS)
                        .build();

modified code from drawLandmarkPosition method of FaceGraphic from here so that it draws a bitmap instead of a circle (bitmap is passed to the FaceGraphic in its constructor):

private void drawLandmarkPosition(Canvas canvas, FirebaseVisionFace face, int landmarkID) {
        FirebaseVisionFaceLandmark landmark = face.getLandmark(landmarkID);
        if (landmark != null) {
            FirebaseVisionPoint point = landmark.getPosition();

            Rect dest = new Rect((int) translateX(point.getX() - 5),
                    (int) translateY(point.getY() - 5),
                    (int) translateX(point.getX() + 5),
                    (int) translateY(point.getY() + 5));

            Log.d("MY_LOGS", "Preparing to call drawBitmap with params myBitmap: " + myBitmap + " and dest: " + dest);

            canvas.drawBitmap(myBitmap, null, dest, null);
        }
    }

started the app
selected Java -> LivePreviewActivity
switched from "Face Contour" to "Face Detection
changed camera to front

Observed Results:
The overlayed bitmap does not appear at all, but it is however shown for a split second if I switch the camera (from front to back or back to front).
Should I draw the bitmap in a different way? If so, how? Again, as I mentioned above, this worked fine with no problems until about one month ago. I was not able to figure out what exactly changed in the library or to find a way to fix it.
FYI: the bitmap used is properly decoded and it is a valid image.
Example of log result:
2019-02-04 15:08:36.395 6298-6298/com.google.firebase.samples.apps.mlkit D/MY_LOGS: Preparing to call drawBitmap with params myBitmap: android.graphics.Bitmap@4ab4cf6 and dest: Rect(915, 80 - 945, 110)
Expected Results:
Expecting the bitmap to be overlayed properly on top of the desired landmark.
Relevant Code:
mentioned above
Any help or suggestion is highly appreciated ;)
Thanks in advance!
Cheers,
Marian

Hey @samtstern, thanks for the reply!
The overlays in the sample app work fine, but they are using simple shapes like canvas.drawCircle(). Didn't see one that's using drawBitmap.
My first thought was also that this might be Android Canvas API related, but it's still weird that the bitmap appears for a split second when switching cameras. Because of this, I thought that it might be related to clearing and redrawing the overlay. It's also weird that this worked perfectly fine a month ago.
By the way, I tried downgrading to an older mlkit version but this didn't help. Could this be related to Android OS upgrade, from 8.1 to 9? (it's a funky guess, I know :-) )

Hi again @samtstern,
I have modified the googly-eyes android vision sample from here, updated all the libs to the latest ones and modified the code so that it uses canvas.drawbitmap and it works fine there. I can fork the code tomorrow if needed.
This would probably mean that the reported issue might not be canvas api related.

@MarianIacob I think you're right, it's probably something to do with the overlays in this sample app and how we're displaying them.  Remember that this sample app is not meant to show off the best practices for a production Android app, we're just trying to show the capabilities of Firebase in a simple setting.
Since you were able to solve your issue with the android vision sample, is it safe to close this here?  Or do you have a further question about MLKit?

Hey @samtstern,
I was able to properly display bitmap overlays with android vision, but as far as I could see, the ears landmarks are not detected there the same way as they are on ml-kit, because of this I am dependent on firebase face detection (our app needs to properly identify the ears).
I know that the sample app is not showing the best practices, but considering that it worked fine and, from my point of view, after an OS and play services upgrade it failed to work properly, I assumed that the sdk itself has some issues. However, considering that the landmark points are properly updated, then it's just a problem with the sample app :-/
I will try to check again today for differences between how the android vision sample displays/invalidates/updates the overlay images and how this is done on the ml-kit sample.
From my point of view, even if the sample app is not showing the best practices, it should still cover this feature... as it's probably very common (image overlay over live camera face detection).
I will post my findings here (hopefully I will spot something)... and then, if successful, create a pull request ;)

Hey @samtstern ,
Good news! Managed to make it work by changing the code:
FirebaseVisionFaceLandmark landmark = face.getLandmark(landmarkID);
        if (landmark != null) {
            FirebaseVisionPoint point = landmark.getPosition();

            Rect dest = new Rect((int) translateX(point.getX() - 5),
                    (int) translateY(point.getY() - 5),
                    (int) translateX(point.getX() + 5),
                    (int) translateY(point.getY() + 5));

            canvas.drawBitmap(myBitmap, null, dest, null);
        }

... to:
FirebaseVisionFaceLandmark landmark = face.getLandmark(landmarkID);
        if (landmark != null) {
            FirebaseVisionPoint point = landmark.getPosition();

            PointF pointPosition =
                        new PointF(translateX(point.getX()), translateY(point.getY()));
            int left = (int) (pointPosition.x - 5);
            int top = (int) (pointPosition.y - 5);
            int right = (int) (pointPosition.x + 5);
            int bottom = (int) (pointPosition.y + 5);

            canvas.drawBitmap(myBitmap, null, new Rect(left, top, right, bottom), null);
        }

To be honest I am not really sure why this works, but this was the last thing I could narrow down my ml-kit sample / android-vision sample comparison :) Any idea? Also, I have no idea how the previous code worked one month ago...
I will prepare tomorrow a PR with a bitmap overlay in the sample app. What do you think would be ok to draw? Maybe a clown nose over the NOSE_BASE landmark?
Cheers,
Marian.

@MarianIacob thanks for the follow up!  We will gladly take a PR.  Something simple like a clown nose sounds great.

Cool! I will take care of it and get back with a PR ;)

Hey @samtstern
I added a pull request here.
Please check it out when you have some time and let me know if some additional adaptations are needed ;)
Cheers,
Marian.

Closed via #808


pkg/csource: remove calls instead of skipping them

Currently csource skips calls at the very last moment, which has an
unpleasant consequence - if we make choice of enabled defines depend on
the individual calls or call properties, we may end up with defined yet
unused functions.
The perfect solution would be to untie
syz_emit_ethernet/syz_extract_tcp_res and NetInjection, and also to
untie VhciInjection and syz_emit_vhci.
For the time being, move these checks to the very beginning of csource
processing, so that these calls could be removed before we construct our
defines.
Adjust pkg/csource/csource_test.go to better cover fault injection
generation problems.

@dvyukov PTAL


Test helpers don't work on the Rails main branch (8.0.0.alpha)

Environment

Ruby 3.3.2
Rails main (8.0.0.alpha)
Devise 4.9.4

Current behavior
When using the sign_in Devise test helper method in a controller or integration test, I get the following error:
Error:
HelloControllerTest#test_index:
RuntimeError: Could not find a valid mapping for #<User id: nil, email: nil, created_at: nil, updated_at: nil>
    c/tmp/devise/lib/devise/mapping.rb:46:in `find_scope!'
    c/tmp/devise/lib/devise/test/integration_helpers.rb:38:in `sign_in'
    repro.rb:59:in `test_index'

Here is a minimal reproduction of the issue (run this with ruby repro.rb):
# repro.rb
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'rails', github: 'rails/rails', branch: 'main'
  gem 'devise', '~> 4.9.4'
  gem 'sqlite3', '~> 1.4'
end

require 'rails'
require 'action_controller/railtie'
require 'active_record'
require 'minitest/autorun'
ENV['RAILS_ENV'] = 'test'

ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Schema.define do
  create_table :users do |t|
    t.string :email, null: false
    t.string :encrypted_password, null: true
    t.timestamps null: false
  end
end

Devise.setup do |config|
  require 'devise/orm/active_record'
end

class MyApp < Rails::Application
  config.eager_load = false

  routes.append do
    root to: 'hello#index'
    devise_for :users
  end
end

class User < ActiveRecord::Base
  devise :database_authenticatable
end

MyApp.initialize!

class ApplicationController < ActionController::Base
end

class HelloController < ApplicationController
  before_action :authenticate_user!

  def index
    render plain: 'Hello'
  end
end

class HelloControllerTest < ActionDispatch::IntegrationTest
  include Devise::Test::IntegrationHelpers

  def test_index
    sign_in User.new

    get '/'

    assert_response :success
  end
end

Expected behavior
Tests should pass:
.

Finished in 0.023595s, 42.3819 runs/s, 42.3819 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips

Additional information
Last week deferred route drawing was merged into Rails master to improve boot times for larger apps with lots of routes. Routes are now lazy loaded for Rails environments that have config.eager_load disabled, which is the case by default for the development and test environments.
Basically by default for the test environment, whenever a route is visited, routes get lazy loaded. Devise's mappings aren't loaded when the test starts, they are only loaded when the test visits a route, because Devise's entry point is defined in the route files with devise_for or devise_scope.
But in integration and controller tests you typically call the sign_in helper before visiting the route. At this point Devise mappings and scopes aren't loaded yet, so Devise will error out.
cc @gmcgibbon
Potential fix: https://github.com/heartcombo/devise/pull/5695

FYI deferred routes have been reverted on Rails main, so this is not an active issue any more. At least for now.

I am seeing this behavior in a test Rails 8.0.0 application right now. Is there a different configuration required for Rails 8 applications?
Failures:

  1) LinksController#update updates the specified link
     Failure/Error: sign_in(user)

     RuntimeError:
       Could not find a valid mapping for #<User id: 357, email: [FILTERED], first_name: "Yukiko", last_name: "Christiansen", notes: "Et nam aut nihil et omnis veritatis molestias beat...", created_at: "2024-11-20 05:50:07.792905000 +0000", updated_at: "2024-11-20 05:50:07.792905000 +0000", archived_at: nil>
     # ./spec/controllers/links_controller_spec.rb:11:in `block (3 levels) in <top (required)>'

I am seeing this behavior in a test Rails 8.0.0 application right now. Is there a different configuration required for Rails 8 applications?
Failures:

  1) LinksController#update updates the specified link
     Failure/Error: sign_in(user)

     RuntimeError:
       Could not find a valid mapping for #<User id: 357, email: [FILTERED], first_name: "Yukiko", last_name: "Christiansen", notes: "Et nam aut nihil et omnis veritatis molestias beat...", created_at: "2024-11-20 05:50:07.792905000 +0000", updated_at: "2024-11-20 05:50:07.792905000 +0000", archived_at: nil>
     # ./spec/controllers/links_controller_spec.rb:11:in `block (3 levels) in <top (required)>'

Edit
Found temp solution on this issue thread:
https://github.com/heartcombo/devise/issues/5705#issuecomment-2442370072


Improve division code generation.

Some improvements to divide code, such as handling 64 bit versions, and multiply/shift cases.

This PR introduced a regression: https://issues.dlang.org/show_bug.cgi?id=13969


make_inspector() throws object of type 'NoneType' has no len() when I retrieve TF DF RF model layer in the hybrid model

I am developing the hybrid model using the time series and tabular data on CNN and TF DF random forest model on WSL + ubuntu 20.04. I also used a Keras tuner on the hybrid model to get the best hyperparameters.
import tensorflow_decision_forests as tfdf
import tensorflow as tf
import tf_keras
Define fixed hyperparameters
fixed_hyperparameters = {
'rf_num_trees': 100,
'rf_max_depth': 6,
'min_examples': 10,
}
This is the model:
Build the combined model
cnn_input = tf.keras.Input(shape=(12, 301, 1))
rf_input = tf.keras.Input(shape=(60,))
cnn_output = tf.keras.layers.Conv2D(filters=16, kernel_size=(12, 125), activation='relu')(cnn_input)
cnn_output = tf.keras.layers.Conv2D(filters=32, kernel_size=(1, 40), activation='relu')(cnn_output)
cnn_output = tf.keras.layers.Flatten()(cnn_output)
rf_output = tfdf.keras.RandomForestModel(
num_trees=fixed_hyperparameters['rf_num_trees'],
max_depth=fixed_hyperparameters['rf_max_depth'],
min_examples=fixed_hyperparameters['min_examples']
)(rf_input)
combined_output = tf.keras.layers.concatenate([cnn_output, rf_output])
fc_output = tf.keras.layers.Dense(32, activation='relu')(combined_output)
output = tf.keras.layers.Dense(1, activation='relu')(fc_output)
model = tf.keras.Model(inputs=[cnn_input, rf_input], outputs=output)
Here's my model summary :
                                           Layer (type)                Output Shape                 Param #   Connected to

==================================================================================================
input_1 (InputLayer)        [(None, 12, 301, 1)]         0         []
conv2d (Conv2D)             (None, 1, 177, 16)           24016     ['input_1[0][0]']
conv2d_1 (Conv2D)           (None, 1, 138, 32)           20512     ['conv2d[0][0]']
input_2 (InputLayer)        [(None, 60)]                 0         []
flatten (Flatten)           (None, 4416)                 0         ['conv2d_1[0][0]']
random_forest_model (Rando  (None, 1)                    1         ['input_2[0][0]']
mForestModel)
concatenate (Concatenate)   (None, 4417)                 0         ['flatten[0][0]',
'random_forest_model[0][0]']
dense (Dense)               (None, 32)                   141376    ['concatenate[0][0]']
dense_1 (Dense)             (None, 1)                    33        ['dense[0][0]']
==================================================================================================
Total params: 185938 (726.32 KB)
Trainable params: 185937 (726.32 KB)
Non-trainable params: 1 (1.00 Byte)

I would like to retrieve the feature importance from the RF model for the tabular data alone. When I try the following steps, I get an error.
Calculate feature importance for the random forest model using the test data
rf_model_layer = model.layers[5]  # Assuming the random forest model is the 5th layer
inspector = rf_model_layer.make_inspector()
feature_importances = inspector.variable_importances(test_data=dataTestRF)
Error :
Traceback (most recent call last):
Cell In[6], line 1
inspector = rf_model_layer.make_inspector()
File ~/anaconda3/lib/python3.11/site-packages/tensorflow_decision_forests/keras/core_inference.py:411 in make_inspector
path = self.yggdrasil_model_path_tensor().numpy().decode("utf-8")
File ~/anaconda3/lib/python3.11/site-packages/tensorflow/python/util/traceback_utils.py:153 in error_handler
raise e.with_traceback(filtered_tb) from None
File /tmp/autograph_generated_fileriaxrjs2.py:38 in tf__yggdrasil_model_path_tensor
ag.if_stmt(ag__.ld(multitask_model_index) >= ag__.converted_call(ag__.ld(len), (ag__.ld(self)._models,), None, fscope), if_body, else_body, get_state, set_state, (), 0)
TypeError: in user code:
File "/home/hybrid/anaconda3/lib/python3.11/site-packages/tensorflow_decision_forests/keras/core_inference.py", line 436, in yggdrasil_model_path_tensor  *
    if multitask_model_index >= len(self._models):

TypeError: object of type 'NoneType' has no len()

Any suggestions would be appreciated.
Thank you.

Hi, thank you for reporting this.
The error message given by TF-DF is unfortunately not very clear, but I believe that the Random Forest model has not been trained. Note that Random Forests cannot be trained with backpropagation the way Neural Networks are trained. As a consequence, the Random Forest model must be trained separately. Our Model composition tutorial shows in detail how this is done with a few more lines of code.
One more thing: Variable importances in TF-DF arestructural variable importances, i.e. based on the model structure alone (e.g. number of times a variable is root). They are not computed with a test dataset, so the argument to inspector.variable_importances(test_data=dataTestRF) is not valid. Advanced variable importance computation is possible with YDF. In your case, you would have to save the TF-DF model, import it in YDF and run the analysis as explained in this tutorial. Let me know if you want to know more about this.

Thank you very much for your prompt response and suggestions.
I try to find the best hyperparameters on the combined model (that uses different input data on CNN and RF) using the Keras tuner.  Here's the sample code:
class CombinedModel(HyperModel):
            def __init__(self, cnn_input_shape, rf_input_shape):
                self.cnn_input_shape = cnn_input_shape
                self.rf_input_shape = rf_input_shape

            def build(self, hp):
                            # CNN part
                    cnn_input = Input(shape=self.cnn_input_shape)
                    RawInputECG = Input(shape=(12,301,1))
                    cnn_output = tf.keras.layers.Conv2D(filters=16, kernel_size=(12, 125), activation='relu')(cnn_input)
                    cnn_output = tf.keras.layers.Conv2D(filters=32, kernel_size=(1, 40), activation='relu')(cnn_output)
                    cnn_output = tf.keras.layers.Flatten()(cnn_output) # here the parameters are fixed to test the model.
                   # RF part
                   rf_output = tfdf.keras.RandomForestModel(
                                      num_trees=fixed_hyperparameters['rf_num_trees'],
                                      max_depth=fixed_hyperparameters['rf_max_depth'],
                                      min_examples=fixed_hyperparameters['min_examples']
                                      )(rf_input)

                  # Combine CNN and RF outputs
                  combined_layer = concatenate([cnn_output,  rf_output])
                  # Fully Connected layer
                  fc_activation = hp.Choice('fc_activation', values=['relu', 'sigmoid'])
                  fc_layer = Dense(32, activation=fc_activation)(combined_layer)
                  # Output layer
                  output_layer = Dense(1, activation='relu')(fc_layer)
                  model = Model(inputs=[cnn_input, rf_input], outputs=output_layer)
                  model.compile(optimizer=optimizer, loss='mse',      metrics=[tf.keras.metrics.RootMeanSquaredError(), mae_error])
                  return model
  if __name__ == '__main__':
      cnn_input_shape = (12, 301, 1)
      rf_input_shape = ( 60,)
      combined_model = CombinedModel(cnn_input_shape, rf_input_shape)
   # loading the data for CNN and RF
  # loading the tuner
      tuner_bo = RandomSearch(
          combined_model,
          objective=keras_tuner.Objective("val_loss", direction="min"),
          max_trials=50,
          seed=16,
          executions_per_trial=1,
          overwrite=False,
          project_name="Hybrid_model")
      es = EarlyStopping(monitor='val_loss', mode='min', verbose=1, patience=20)
      mc = ModelCheckpoint(saveFN, monitor='val_loss', mode='min', verbose=1, save_best_only=True)
      tuner_bo.search([dataTrain,dataTrainRF], labelsTrain,
                            validation_data = ([dataVal, dataValRF], labelsVal))

I understood, that in the above code RF model is not trained, only the CNN part is trained. Can I combine the Keras tuner and tfdf tuner to find the best hyperparameters for the combined model rather than training separately? Also, they stack both neural networks and RF models together in the model composition tutorial link. Is it possible to do the tuner search in the stacked model to find the best hyperparameters for CNN and RF together?
Does the YDF library run both on Windows and WSL + Ubuntu?
Any suggestions would be appreciated.
Thank you very much

I don't think the Keras tuner or the TF-DF tuner support tuning CNN  and RF at the same time - @achoum can you please confirm?
YDF runs on Windows and Ubuntu - I haven' tried on WSL but I do not expect any issues, please report them if you find any. We provide Pip packages for Windows, Linux and Mac (Arm CPU).

I am trying to implement the [https://www.tensorflow.org/decision_forests/tutorials/model_composition_colab] tutorial you have suggested. I have two different inputs one to CNN (input shape : (12,301,1) and tabular to RF(input shape=60,). I doubt two steps:

I didn't preprocess the features, can I pass tabular data instead of preprocess_features to the RF model in the below steps?

# Model #3: DF
# Input features.
raw_features = tf_keras.layers.Input(shape=(num_features,))

# Stage 1
# =======

# Common learnable pre-processing
preprocessor = tf_keras.layers.Dense(10, activation=tf.nn.relu6)
preprocess_features = preprocessor(raw_features)
model_3 = tfdf.keras.RandomForestModel(num_trees=1000, random_seed=1234)
m3_pred = model_3(preprocess_features)
``

3. How do I call the stacked model like the below step
`ensemble_nn_and_df = tf_keras.models.Model(raw_features, mean_nn_and_df)`

I have two inputs, how do I pass it to the model?
Thank you very much


Ability to set auto deployment to UAT site at a certain time each day

This could be after 6pm or early in the morning or even at lunch time just to keep an environment always up to date

Would this be required if #72 was implemented?
I feel like if the intention is to always have it up to date, #72 is a better alternative. That said, #72 will require a lot more work than this will...

I think it's quite a nice improvement, currently I've used a CI server and using the deploynaut API to support these cases. It sort of turns deploynaut into a CI server. If someone gives this a stab, I would rather have deployed as a supporting module instead too minimize the features the basic deploynaut provides.


ioreg under cargo

baby steps toward building with cargo. @farcaller any advice on how to integrate cargo build/cargo test into the current rakefile infrastructure?

@farcaller just rebased this - running into issues with the task syntax you suggested:
Gumby:zinc tamird$ rake PLATFORM=k20 -T
rake aborted!
Missing rule ioreg_crate
/Users/tamird/src/zinc/support/build/helpers.rb:33:in `block in resolve_deps!'
/Users/tamird/src/zinc/support/build/helpers.rb:31:in `map'
/Users/tamird/src/zinc/support/build/helpers.rb:31:in `resolve_deps!'
support/rake.rb:26:in `compile_rust'
support/rake.rb:141:in `rust_tests'
/Users/tamird/src/zinc/Rakefile:68:in `<top (required)>'
(See full trace by running task with --trace)

Any ideas on how to satisfy the dependency resolution?

I'm actually working on the same problem from different point of view. Most of zinc can be built with cargo as is, only the actual application build process is different and will require additional handling. I'm trying to figure the proper extent of the linking issues, as some of them do belong to rustc, while others are really cargo's job. The point is, we'll hopefully get rid of ruby build toolchain.

@farcaller alright, awesome. I'll close this PR and let you take it from here.


Fixed call to print the spreadsheet ID

The get request was pointing to the wrong variable.

Sorry, but I don't understand why you're changing this. This looks like it breaks the snippet by referencing an undefined 'sheet' variable.

Yeah I am confused myself. For some reason I thought the older version of the code was initializing the newly created file to the sheet variable, so I changed it. Will withdraw my PR


Remove CloseQuietly and migrate its usages to other methods.

CloseQuietly.close is a method that closes something. It suppresses and logs any
IOExceptions it gets, but re-throws any non-IOExceptions. It is used extensively and it
seems likely to me that most usages did not intend to have these specific behaviors.
So this patch gets rid of the method and migrates call sites to various more sanely
behaving methods.
These other methods include:

New method CloseableUtils.closeAndWrapExceptions, which wraps IOExceptions
in RuntimeExceptions for callers that just want to avoid dealing with
checked exceptions. Most usages were migrated to this method, because it
looks like they were mainly attempts to avoid declaring a throws clause,
and perhaps were unintentionally suppressing IOExceptions.
New method CloseableUtils.closeInCatch, designed to properly close something
in a catch block without losing exceptions. Some usages from catch blocks
were migrated here, when it seemed that they were intended to avoid checked
exception handling, and did not really intend to also suppress IOExceptions.
New method CloseableUtils.closeAndSuppressExceptions, which sends all
exceptions to a "chomper" that consumes them. Nothing is thrown or returned.
The behavior is slightly different: with this method, all exceptions are
suppressed, not just IOExceptions. Calls that seemed like they had good
reason to suppress exceptions were migrated here.
Some calls were migrated to try-with-resources, in cases where it appeared
that CloseQuietly was being used to avoid throwing an exception in a finally
block.

🎵 You don't have to go home, but you can't stay here... 🎵

nice try, stalebot

nice try, stalebot

Fixed up some merge conflicts.

Fixed up some merge conflicts.

Fixed up some more merge conflicts.


Voucher logs: display name for who's logged a voucher

It only displays the name of who's been logged for, not who logged it (can be exploited).

Table header updated. Log page UI has been updated for better mobile experience.


Clean less files

replace tabs with spaces
remove unit from 0 values
add empty lines between selectors
split important with a space in all occurrences
combine margin: 0 with margin-top, -bottom, left, right to one line.

(And maybe add a linter afterwards, new code is more unified, easier to understand)

I think some of the empty lines were removed in a recent PR by @lafriks

@techknowlogick this is most common usage. easy to find a selector.
No empty lines if no selector/ attribute is in between. eg.
  }
}

i try to get an linter into lessc - it has an plugin (i mostly use sass and a gulp build pipeline). Source map is the next goal. Is only loaded if Development console is open

Codecov Report

Merging #6921 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6921      +/-   ##
==========================================
+ Coverage   41.42%   41.42%   +<.01%
==========================================
  Files         440      440
  Lines       59744    59744
==========================================
+ Hits        24746    24747       +1
+ Misses      31761    31758       -3
- Partials     3237     3239       +2

Impacted Files
Coverage Δ

modules/log/log.go
68.9% <0%> (-2.53%)
:arrow_down:

models/repo_list.go
67.89% <0%> (+1.05%)
:arrow_up:

models/unit.go
67.56% <0%> (+5.4%)
:arrow_up:

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 5ffc965...8e47ec5. Read the comment docs.

Sounds good. If you could get that linter in here as well that'd be awesome.
Thanks for all your contributions recently.

@techknowlogick nope, I also added some newlines :) But only in one file that I was changing

@lafriks ah ok. I just remembered something about empty lines. Thanks for clarification.


how does axial-attention support multi-scale training/testing?

It seems that the number of parameters of axial-attention module depends on the input feature size (because of the kernel_size should equal to H/W).  Then how does it support variable input sizes?

For panoptic segmentation, we use a fixed span (or kernel size) of 65x65 as mentioned in the paper. This repo was for ImageNet classification only, so we did not implement the local span version.

For panoptic segmentation, we use a fixed span (or kernel size) of 65x65 as mentioned in the paper. This repo was for ImageNet classification only, so we did not implement the local span version.


HMGeneric.setValue: STATE Exception: <Fault -1: 'Generic error (TIMEOUT)'>

Make sure you are running the latest version of pyhomematic (and Home Assistant) before reporting an issue.
If you encounter the problem when using Home Assistant, please fill out the following information
Home Assistant version (if applicable):
2021.9.7
Problem-relevant configuration.yaml entries and steps to reproduce:

HOMEMATIC INTEGRATION

homematic:
interfaces:
HomeMatic Funk:
host: <IP_ADDRESS>
port: 2001
resolvenames: "json"
username: !secret homematic_username
password: !secret homematic_password
HomeMatic IP:
host: <IP_ADDRESS>
port: 2010
resolvenames: "json"
username: !secret homematic_username
password: !secret homematic_password
#    HomeMatic Wired:
#      host: <IP_ADDRESS>
#      port: 2000
#      resolvenames: json
#      username: !secret homematic_username
#      password: !secret homematic_password
groups:
host: <IP_ADDRESS>
port: 9292
resolvenames: "json"
username: !secret homematic_username
password: !secret homematic_password
path: /groups
hosts:
ccu3-webui:
host: <IP_ADDRESS>
username: !secret homematic_username
password: !secret homematic_password
Use the following configuration for debug-output of the related components:
logs:
  homeassistant.components.homematic: debug
  pyhomematic: debug

Logger: pyhomematic.devicetypes.generic
Source: /usr/local/lib/python3.9/site-packages/pyhomematic/devicetypes/generic.py:198
First occurred: 12:12:53 (2 occurrences)
Last logged: 12:15:23
HMGeneric.setValue: STATE on 00085A49A4A57E:4 Exception: <Fault -1: 'Generic error (TIMEOUT)'>
HMGeneric.setValue: STATE on 00085A49A4B411:4 Exception: <Fault -1: 'Generic error (TIMEOUT)'>
Logger: homeassistant
Source: core.py:901
First occurred: 13:24:56 (7 occurrences)
Last logged: 13:48:26

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 451, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 578, in _async_write_ha_state
    self.hass.states.async_set(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1219, in async_set
    state = State(
  File "/usr/src/homeassistant/homeassistant/core.py", line 901, in __init__
    raise InvalidEntityFormatError(
homeassistant.exceptions.InvalidEntityFormatError: Invalid entity id encountered: homematic.ccu3-webui. Format should be <domain>.<object_id>

Describe the bug
The Homematic BSM Wall Switches render status unavailable and are not controllable via HA anymore.
Expected behavior
No Timeout and full control over the switch.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here

.

Does the switch work within the CCU? Such errors typically indicate, that the device isn't working at all. Hence Home Assistant can't do anything with it either.

Hi Daniel,
you were totally right. Nothing worked in the CCU as well. I shutted it down and putted the fuse out for the Homematic BSM Wall switches to restart and everything seems to work again.
Thanks for pointing me in the right direction.


Swap out find_spec for importmodule inside a try/except block

Hey @mscheltienne ,
I copied the import_optional_dependency code into an environment where I don't have the template-python deps installed, and ran into what I think is a bug in importlib. TL;DR in python 3.10.11+ I don't think you normally can do importlib.util.find_spec (see this comment from a Cpython developer).
I am not 100% sure about exactly what is going on, but here is what I've found out so far:
mamba create -n "importlib_test" python=3.10.13

# python

import importlib

importlib.util.find_spec  # raises error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'importlib' has no attribute 'util'

But I can work around this with:
# python
from importlib.util import find_spec

# Now I can also do
import importlib
importlib.util.find_spec

So my current best guess is that one of the template-python dependencies does something like from importlib.util import ... which exposes the importlib.util module, allowing template-python to call it without issue?

Anyways, if your tests are passing on python 3.10.11+ then this might not be an actual issue. But if it is, then the PR here swaps out importlib.util.find_spec (which I actually really liked!) for a try....except block.
Up to you on whether you want to incorporate this to main.

Interesting.. maybe from import lob. until import find_spec would be safer and avoid the try/except, I'll have to test it.

Or actually now that I am thinking about it more...
We can just do

import importlib.util

....

if importlib.util.find_spec

So basically my updated understanding is that at least in python 3.10.11+, the supported API of importlib is to import submodules directly (i.e. don't rely on importlib to import submodules for you when doing import importlib)

Yes, reading through the rest of that post, import importlib.util should be safe too.

@mscheltienne WDYT Is it weird to import importlib twice like this?

I would replace it with 2 (very) explicit imports:
from importlib import import_module
from importlib.util import find_spec

(might have made a typo, I'm on my phone)

Thanks @scott-huberty


Minimal export version

Add experimental export for minimal import
First pass at package improvements
5.2.2-beta4
Fix type packaging

Closing as a failure for now


Implementing CYK Algorithm

I have implemented the CYK Algorithm from the book as faithfully as I could.
The CYK Algorithm runs in RunCYK.java on a simple Chomsky Normal Form Grammar, if you would like to see a demonstration.
The Wumpus Grammar from the textbook has also been included as an example grammar, but note that it is a ContextFree Grammar and not a Chomsky Normal Form Grammar. In order to use the Wumpus Grammar with CYK some conversion needs to be performed.  My goal is to review and merge before end of September, hopefully sooner.
Thanks
Ciaran

@ctjoreilly. absolutely fine. done deal

Manually applied patch (trivial addition to include tests in unit test suite).


Bitbucket and helm utilities

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


REQUEST: Organization Chengdu Union Big Data that provides commercial support to Karmada New Commercial Support

Org or company name
Chengdu Union Big Data Technology Incorporated
Org or company description
Chengdu Union Big Data Technology Incorporated is a provider of big data and artificial intelligence products and solutions, with a core focus on computer vision technology, multidimensional data analysis and mining technology, and natural language processing technology.
The company focuses on two key areas: "intelligent manufacturing and smart cities". Relying on an "integrated cloud-native digital intelligence service platform", it provides digital intelligence technology services to governments, businesses, and defense units. These services include data governance, data visualization analysis, and data mining for various platforms and scenarios, aiming to help customers reduce costs, improve efficiency, and enhance quality.
Org or company Website
https://www.unionbigdata.com/
Org or company logo

Contact me
<EMAIL_ADDRESS>

Thanks @pandaoknight, Thank you for your support.
We are working on the request, here is a quick update about what we are going to do:

Building the first page on the Karmada website:  see the progress in this PR.

Publishing your case study on the website.

/closed
All tasks have been addressed. Thanks.
The partnership can be found at https://karmada.io/partners.

/close


Cadence queue for domain replication

Coverage increased (+0.3%) to 69.715% when pulling f49ca30b550cf0f23c9df7fd2f8d65ae708e4b7f on cadence-queue into ff8a5d46c3ef58d8d68f6d612caee5523f307f62 on master.

#2393


Adding Pydantic v2 @computed_field decorator prevents class creation with dependencies

psygnal version: 0.11.1
Python version: 3.10
Operating System: MacOS

Description
(First of all, thank you for building this excellent library! It's been super useful and a much nicer alternative to param, traitlets, etc!)
If we add the @computed_field decorator (https://docs.pydantic.dev/latest/concepts/fields/#the-computed_field-decorator) to any property which we want to be an evented Psygnal @property field that is part of field_dependencies, it raises an error and prevents definition of the class.
@computed_field is useful, since it ensures the field appears in Pydantic's model serialization, and I would expect it to work with EventedModels as well (esp since Psygnal docs refer to supporting "computed fields" for this sort of use-case).
Side note/ask: It would be nice if the @computed_field could be added to the model.events SignalGroup even without a setter, so that at least we could manually model.events.my_computed_field.emit() too.
What I Did
Following the example similar to the docs (https://psygnal.readthedocs.io/en/stable/API/model/), adding @comptued_field to the c property, as follows:
from psygnal import EventedModel
from pydantic import computed_field

class MyModel(EventedModel):
    a: int = 1
    b: int = 1

    @computed_field
    @property
    def c(self) -> List[int]:
        return [self.a, self.b]

    @c.setter
    def c(self, val: Sequence[int]) -> None:
        self.a, self.b = val

    class Config:
        allow_property_setters = True
        field_dependencies = {"c": ["a", "b"]}

This leads to an error:
----> 3 class MyModel(EventedModel):
      4     a: int = 1
      5     b: int = 1

File /path/to/lib/python3.10/site-packages/psygnal/_evented_model.py:280, in EventedMetaclass.__new__(mcs, name, bases, namespace, **kwargs)
    274             if conf and conf.get(ALLOW_PROPERTY_SETTERS, False):
    275                 raise ValueError(
    276                     "Cannot set 'allow_property_setters' to 'False' when base "
    277                     f"class {b} sets it to True"
    278                 )
--> 280 cls.__field_dependents__ = _get_field_dependents(
    281     cls, model_config, model_fields
    282 )
    283 cls.__signal_group__ = type(f"{name}SignalGroup", (SignalGroup,), signals)
    284 if not cls.__field_dependents__ and hasattr(cls, "_setattr_no_dependants"):

File /path/to/lib/python3.10/site-packages/psygnal/_evented_model.py:337, in _get_field_dependents(cls, model_config, model_fields)
    335 for prop, fields in cfg_deps.items():
    336     if prop not in {*model_fields, *cls.__property_setters__}:
--> 337         raise ValueError(
    338             "Fields with dependencies must be fields or property.setters."
    339             f"{prop!r} is not."
    340         )
    341     for field in fields:
    342         if field not in model_fields:

ValueError: Fields with dependencies must be fields or property.setters.'c' is not.

Thanks for opening this.
Good catch, that's definitely a bug and thank you for the easily reproducible example.

Side note/ask: It would be nice if the @computed_field could be added to the model.events SignalGroup even without a setter, so that at least we could manually model.events.my_computed_field.emit() too.

Yeah, since the introduction of computed_field in pydantic v2, I've very much wanted to revisit this pattern.  (all of the property setter stuff in here was added out of needs we had in napari, before pydantic allowed property setters).  One side note I'll mention, I tried to get the concept of "dependencies" explicitly recognized in pydantic (https://github.com/pydantic/pydantic/issues/9893) but it was considered too specific of an application, and the hope is that someday computed_field will take a metadata field that we could use for this purpose...
In any case, your request here should be easy as well.  I'll have a look at that while I'm in there fixing this

ok, part one is fixed in #336 ...
but I'm thinking about the second one:

It would be nice if the @computed_field could be added to the model.events SignalGroup even without a setter, so that at least we could manually model.events.my_computed_field.emit() too.

One hesitation i think i have is that, if I have a model like:
class MyModel(EventedModel):
    a: int = 1

    @computed_field
    @property
    def a_squared(self) -> int:
        return self.a * 2

then if I create an event for MyModel.a_squared, it kinda gives the impression that that event will be emitted whenever a_squared is changed, which of course is not true here unless the end user manually implements it.
I think I'd be more ok with creating an event for a_squared provided someone told me when it should be emitted?
class MyModel(EventedModel):
    a: int = 1

    @computed_field
    @property
    def a_squared(self) -> int:
        return self.a * 2

    class Config:
        field_dependencies = {"a_squared": ["a"]}

what do you think?  still prefer to have an event even in the first case?

@tlambert03 Wow, that was fast, thank you so much! 🎉
Agreed that the dependencies/metadata for computed_fields being part of Pydantic would be great. Thanks for suggesting it to them, and maybe some formalized/standardized approach will come about later.

then if I create an event for MyModel.a_squared, it kinda gives the impression that that event will be emitted whenever a_squared is changed, which of course is not true here unless the end user manually implements it.
I think I'd be more ok with creating an event for a_squared provided someone told me when it should be emitted?

I was just thinking about this as well. In my case, the @computed_field does have a dependency, specifically on a PrivateAttr and not a Field. (That private attribute is not mutated directly by users, hence being private, but instead via other higher-level methods on my Pydantic model class.) So as long field_dependencies work with PrivateAttrs in the dependency array, that would work for me, and would mean no "manual" emit() calls would be needed.

As for PrivateAttr, a quick test seems to show that it doesn't work currently. Using:
from pydantic import computed_field, PrivateAttr

class MyModel(EventedModel):
    a: int = 1
    _b: int = PrivateAttr(1)

    @property
    def c(self) -> list[int]:
        return [self.a, self._b]

    @c.setter
    def c(self, val: list[int]) -> None:
        self.a, self._b = val

    class Config:
        allow_property_setters = True
        field_dependencies = {"c": ["a", "_b"]}

leads to this warning:
/path/to/lib/python3.10/site-packages/psygnal/_evented_model.py:280: UserWarning: Unrecognized field dependency: '_b'
  cls.__field_dependents__ = _get_field_dependents(

hmm, yeah. I think I dislike having evented fields depend on PrivateAttr even more than I dislike create event objects for computed_fields that may or may not ever be emitted.  I'll keep thinking about this, might break it out into a new issue so we can close the original issue with #336.  Thanks for your feedback!  I'm sure we can get something that works for your use case

Sounds good, thanks again!


No OpenJDK 11 LTS Windows installers

Is there a reason for Windows installers not being available for OpenJDK 11 HotSpot?
I am looking for Windows installers for LTS versions 8 and 11. I'm glad to see an installer is available for 8, and I see there is one available for 12, but I do not see one for 11.
Using 12 is not desirable because long term support is exactly what I want. This must include a Windows installer that makes it simple to install and update a JDK 11 installation over time.

We have installers in the nightlies and the next 11.0.3 release will have a windows installer.
For support expectations (including Commercial) please see https://www.adoptopenjdk.net/support.html


is this the title

third time lucky my experience of Git Hub so far sucks!

is this where i need to be

;lkhmo


share message working for ios but not on android

let shareOptions = {
title: "SHared via app",
message: shared via app ,
subject: "Shared via app", //  for email
};
When i actually try to share this on facebook via the share menu, i works perfectly on ios, i get a nice facebook share post pop-up with the message,
The issue is when i try to share the same with android....
There are no popups for facebook in android , it actually opens the app on share , so maybe that's why the message is ignored..??
"react-native-share": "^1.1.3",
"react-native": "0.58.4",

I did some research and apparently facebook changed their policy on sharing via their sharer api(That's what we are using right now). Is there gonna be any update on this. I can update it for android if someone can point me in the right direction...thx

@bakaa99 we did a new release, can you try it? v1.2.0.
Thank you.

same issue in 1.2.1 version


ci: remove last "secrets" usage and migrate to from_secret

address https://ci.woodpecker-ci.org/repos/3780/pipeline/22590/errors

-> #4407


Inhibit line breaks on non-breaking spaces

As long as SILE is starting to respect assorted Unicode conventions, it would be nice if it respected and refused to break lines on non-breaking space characters such as \U+00A0. There are whole categories of breaking vs. non-breaking whitespace characters and the tokenizer could be made aware of them.

Looks like the non-ICU thingy makes a nonbreaking space, but the ICU one inserts a penalty because it's seeing the NBS as a word break. Bah.


[HELP] jQuery UI is conflicting with laravel-admin

Laravel Version: 5.8.*
PHP Version: 7.1.3
Laravel-admin: ^1.7

Description:
We are trying to connect jQuery UI to the project.
To do this, make changes to the file app/Admin/Bootstrap.php:
Encore\Admin\Form::forget(['map', 'editor']);

Admin::css('/admin/css/jquery-ui.css');
Admin::js('/admin/js/jquery-ui.js');

Admin::css('/admin/css/app.css');
Admin::js('/admin/js/app.js');

jquery-ui.js needs to be loaded before bootstrap.min.js, you can use Admin::headerJs('/admin/js/jquery-ui.js'); to put it in header section.


[Feature] Light/Dark Mode for ExposureDetectionViewController

This PR update the ExposureDetectionViewController to the latest color scheme and improves dark mode appearance.
Please limit your review to the following screens:

Thanks @i336616
Yes, whilst replacing the assets in the other PR all template rendering options were lost. We may see some more of that in the coming days I guess.


Labels appear when mousing over non-button areas

Not exactly helpful.

This is an issue with ClothConfig, not FarLands. You could make a feature request there.


Signatures will randomly return as invalid.

Hello. I believe that I have found a bug with how signatures (and possibly keys) are validated.
I have devised a test where the signature validation will fail 50% on average. I have also confirmed this behavior in two other projects, which caused me to write this test case to figure out what was going on.
Here is the code I am using to reproduce the bug:
import * as Noble from '@noble/secp256k1'
import { webcrypto as crypto } from 'crypto'

let rounds = 10, passed = 0

for (let i = 0; i < rounds; i++) {

  const randomBytes = getRandBytes(32)
  const randomData  = getRandBytes(32)

  const isValidPrivateKey = Noble.utils.isValidPrivateKey(randomBytes)
  const pubKey = Noble.getPublicKey(randomBytes)

  const signature = await Noble.schnorr.sign(randomData, randomBytes)
  const isValid = await Noble.schnorr.verify(signature, randomData, pubKey)

  if (!(isValidPrivateKey && isValid)) {
    console.log('Failed validation!')
    console.log('  message:', Noble.utils.bytesToHex(randomData))
    console.log('  Valid Key:', isValidPrivateKey, Noble.utils.bytesToHex(randomBytes))
    console.log('  Valid Sig:', isValid, Noble.utils.bytesToHex(signature))
    console.log('')
  } else { passed++ }
}

console.log(`Passed: ${passed}\nFailed: ${rounds - passed}\nTotal: ${rounds}`)

function getRandBytes(size = 32) {
  return crypto.getRandomValues(new Uint8Array(size))
}

For the above code, there are no dependencies besides the built-in webcrypto module and (version 1.7.0) the @noble/secp256k1 library.
I haven't run into this issue until recently, and I suspect it may have something to do with the random data being used for signing, but honestly I'm not sure. The random data will pass the isValidPrivateKey check 100% of the time, but the signature will fail 50% of the time on average.

const pubKey = Noble.getPublicKey(randomBytes)
=>
const pubKey = Noble.schnorr.getPublicKey(randomBytes)


I cant test my songs for my mod :(

What needs to be documented?

this should go in help wanted not documentation!

-normal shouldn't normally be there. make sure you typed in Normal (case sensitive) correctly in the week's json.

THANKS

close the issue


Shrink acceptance test data - PR3

A component of #1804
To reduce the data volume of the acceptance test data repository, work has been done to coarsen the resolution of test data relating to the following CLIs:

combine
wind-gust-diagnostic
resolve-wind-components
temporal-interpolate
generate-percentiles

This PR updates the checksums.
The relevant acceptance test data can be found in branch shrink_atd_3
Plotting of the original and modified data can be seen here.

@MoseleyS I've reset the broadcast test data back to the original state. I've updated the plotting, this PR, and the acceptance test data branch.


Remove the projectile-rails text on the SPC m r

When using projectile-rails, we got the full text:

The ideal is:

Partial fix:
;; on .doom.d/config
(after! which-key
  (push '((nil . "projectile-rails-\\(.+\\)") . (nil . "\\1"))
         which-key-replacement-alist))

Seems to address the same issue as #2664, which was closed...


add icu4c on mingw

Before adding new features and new modules, please go to issues to submit the relevant feature description first.
Write good commit messages and use the same coding conventions as the rest of the project.
Please commit code to dev branch and we will merge into master branch in feature
Ensure your edited codes with four spaces instead of TAB.

增加新特性和新模块之前，请先到issues提交相关特性说明，经过讨论评估确认后，再进行相应的代码提交，避免做无用工作。
编写友好可读的提交信息，并使用与工程代码相同的代码规范，代码请用4个空格字符代替tab缩进。
请提交代码到dev分支，如果通过，我们会在特定时间合并到master分支上。
为了规范化提交日志的格式，commit消息，不要用中文，请用英文描述。

why mingw ci cannot unzip tgz file?

why mingw ci cannot unzip tgz file?

I have fixed it on xmake/dev

This commit uses patch from https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-icu/

configure: WARNING: using cross tools not prefixed with host triplet
configure: error: Error! Cross compiling but no --with-cross-build option specified - please supply the path to an executable ICU's build root

About mingw/macos, may we need add more patches for configure.
remove --with-cross-build detect in configure or see https://github.com/microsoft/vcpkg/blob/master/ports/icu/fix-win-build.patch

It's build script only seems to support msys/mingw, you can set on_install("mingw@msys") to disable macos/mingw.
If you want to support macos/mingw you may have to do a lot of patches, or you can use xmake.lua to port it.