Update Z2JH to 4.0.0

Z2JH changelog: https://z2jh.jupyter.org/en/4.0.0/changelog.html

The test failure is due to https://github.com/jupyterhub/binderhub/issues/1886
(though we're only showing a max of two failures so there may be more)

Ckan resolved, next error is now in binderhub/tests/test_eventlog.py::test_emit_event

https://github.com/jupyterhub/binderhub/pull/1884/commits/ba490a751ab9511ea4b69b10e367a96c2233f3cd
deletes the taskName attribute.
This is a new logging attribute in Python 3.13:
https://docs.python.org/3.13/library/logging.html#logrecord-attributes
I don't understand how the EventLog works though. It only removes the message attribute
https://github.com/jupyterhub/binderhub/blob/58bb7dba89baf739c4015a6afc59d6ec3c8d59d7/binderhub/events.py#L15-L104
but https://docs.python.org/3.13/library/logging.html#logrecord-attributes lists many more attributes.

Makes sense to me given what i get about this, which isnt much, but i dont see how kt would be breaking or similar to do this change now that python 3.12 is used. (Note it was in 3.12 the taskname thing got introduced)

Thank you @manics!!!


CRASH on start  with SIGSEGV

Please provide a brief summary of the bug
(Studio 3T:1221916): Gtk-WARNING **: 09:45:26.809: Negative content width -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
EGLDisplay Initialization failed: EGL_BAD_ACCESS
EGLDisplay Initialization failed: EGL_NOT_INITIALIZED
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007be1321ae072, pid=1221916, tid=1221992

JRE version: OpenJDK Runtime Environment Temurin-17.0.9+9 (17.0.9+9) (build 17.0.9+9)
Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (17.0.9+9, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
Problematic frame:
C  [libwebkit2gtk-4.1.so.0+0x2bae072]

Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E"
hs_err_pid1221916.log
Did you test with the latest update version?

[ ] Yes

Please provide steps to reproduce where possible
start Studio-3t on  ubuntu 22.04
Expected Results
working app
Actual Results
crashing app
What Java Version are you using?
openjdk 21.0.3 2024-04-16
What is your operating system and platform?
ubuntu 22.04
How did you install Java?
standard  ubuntu openjdk pack
Did it work before?
yes

Did you test with other Java versions?
no

Relevant log output
#
#  SIGSEGV (0xb) at pc=0x00007be1321ae072, pid=1221916, tid=1221992
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.9+9 (17.0.9+9) (build 17.0.9+9)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (17.0.9+9, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libwebkit2gtk-4.1.so.0+0x2bae072]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/kitru/studio3t/core.1221916)
#
# An error report file with more information is saved as:
# /home/kitru/studio3t/hs_err_pid1221916.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[1]    1221916 IOT instruction (core dumped)  /home/kitru/studio3t/Studio-3T

See #1060 - suspect you'll find help there.


Issue-add examples folder

Automated Review Comments
Issues in examples/barChartExample/.babelrc:

(3, 'Hardcoded string found')
(4, 'Hardcoded string found')
(5, 'Hardcoded string found')
(6, 'Hardcoded string found')
Issues in examples/barChartExample/.eslintrc.json:
(3, 'Hardcoded string found')
(4, 'Hardcoded string found')
(5, 'Hardcoded string found')
(8, 'Hardcoded string found')
(9, 'Hardcoded string found')
(11, 'Hardcoded string found')
(12, 'Hardcoded string found')
(13, 'Hardcoded string found')
(14, 'Hardcoded string found')
(15, 'Hardcoded string found')
(16, 'Hardcoded string found')
(19, 'Hardcoded string found')
(20, 'Hardcoded string found')
(21, 'Hardcoded string found')
(22, 'Hardcoded string found')
(23, 'Hardcoded string found')
(33, 'Hardcoded string found')
(34, 'Hardcoded string found')
(35, 'Hardcoded string found')
(36, 'Hardcoded string found')
(38, 'Hardcoded string found')
(41, 'Hardcoded string found')
Issues in examples/barChartExample/components/Picker.js:
(2, 'Hardcoded string found')
Issues in examples/barChartExample/components/Posts.js:
(2, 'Hardcoded string found')
Issues in examples/barChartExample/containers/App.js:
(2, 'Hardcoded string found')
(4, 'Line exceeds 80 characters')
(46, 'Hardcoded string found')
(51, 'Hardcoded string found')
Issues in examples/barChartExample/index.html:
(7, 'Hardcoded string found')
(9, 'Line exceeds 80 characters')
(9, 'Hardcoded string found')
(13, 'Hardcoded string found')
(22, 'Hardcoded string found')
Issues in examples/barChartExample/index.js:
(3, 'Hardcoded string found')
(15, 'Hardcoded string found')
Issues in examples/barChartExample/package.json:
(3, 'Hardcoded string found')
(4, 'Hardcoded string found')
(5, 'Hardcoded string found')
(7, 'Hardcoded string found')
(8, 'Hardcoded string found')
(10, 'Hardcoded string found')
(12, 'Hardcoded string found')
(15, 'Hardcoded string found')
(19, 'Hardcoded string found')
(26, 'Hardcoded string found')
(28, 'Hardcoded string found')
(30, 'Hardcoded string found')
Issues in examples/barChartExample/reducers/index.js:
(2, 'Hardcoded string found')
(8, 'Hardcoded string found')
Issues in examples/barChartExample/server.js:
(3, 'Hardcoded string found')
(8, 'Hardcoded string found')
(12, 'Line exceeds 80 characters')
(23, 'Line exceeds 80 characters')
Issues in examples/barChartExample/store/configureStore.js:
(2, 'Hardcoded string found')
Issues in examples/barChartExample/webpack.config.js:
(3, 'Hardcoded string found')
(4, 'Hardcoded string found')
(10, 'Hardcoded string found')
(22, 'Hardcoded string found')

I got it.


feat: extend eslint core's quote-props rule

Description

Implemented https://github.com/typescript-eslint/typescript-eslint/issues/3301
Linked Issues
resolves #274
Additional context

I had to update unrelated fixtures 🥺

The fixture changes seem ok. Can you add a few more tests to keep up the coverage rate? Thanks

Sure, since eslint itself doesn't apply this rule to methods, I'll add valid cases only.


[DO NOT MERGE] Try out authy-devise gem for multifactor authentication

I rule and have completed some work on Case Manager that's ready for review!
Ran through gem setup of authy-devise as far as I could without setting up an actual twilio account. More TK.
This pull request makes the following changes:

Run through authy-devise setup documentation
(another change here)
(etc)

(If there are changes to the views, please include a screenshot so we know what to look for!)
It relates to the following issue #s:

Fixes #2003

For reviewer:

Adjust the title to explain what it does for the notification email to the listserv.
Tag this PR:

feature if it contains a feature, fix, or similar. This is anything that contains a user-facing fix in some way, such as frontend changes, alterations to backend behavior, or bug fixes.
dependencies if it contains library upgrades or similar. This is anything that upgrades any dependency, such as a Gemfile update or npm package upgrade.

If it contains neither, no need to tag this PR.

TD going to handle, so dropping this (rip)


Panel icon style

In Firefox stable if you provide a white icon it gets flipped to black by the devtools CSS when needed (light theme, inactive tab).
Nightly seems to have given up on this technique, so now there is no way to have an icon that is either black or white depending on the theme and status (active tab or not).
Somewhat related:
https://bugzilla.mozilla.org/show_bug.cgi?id=1391980
Looks like the only solution for this and for Chrome compatibility is to have an icon with a solid background (e.g. like the React Devtools). -__-

@bgrins might be able to help you on this.

Is the issue that the Web Extensions API for adding panels doesn't provide options like panelDefinition.invertIconForLightTheme / panelDefinition.invertIconForDarkTheme?

The SVG filter itself seems to still be working in Nightly - it's used for the built-in tool icons

The filter effect might still be there in Nightly but it's not applied to panels added by WebExtensions anymore. I guess it was having unintended effects (I think I remember seeing a red React Devtools icon in the past, instead of the expected blue).
I was wondering if there was an API to declare different icons, i.e. a light one and a dark one. Looking at MDN, it seems there is no declarative API but I can try using a programmatic one:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/devtools.panels/themeName
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/devtools.panels/onThemeChanged
That will have to do. :)


Heavy CPU loading and termination in moose V3.0

I've been testing version 3.0 for a few days now, and I'm quite satisfied with the significantly improved processing speed compared to v2. However, when running certain modules, the system tends to overheat and the program suddenly terminates, likely due to increased CPU load, which was never an issue with v2.
I’m processing around 4,000 CT scans, and while the "body_composition" prediction runs smoothly and completes in one go, the "clin_ct_organs" module crashes after processing just a few hundred scans. In the resource monitor, CPU peaks are densely packed in v3, while they are relatively loose in v2, which I think accounts for difference in speed.
The main reason I switched to v3 is its larger training dataset, but the issues mentioned above make it difficult to fully benefit from the improved speed. Any comments or advice on resolving this would be greatly appreciated. Alternatively, is there a way to use the new prediction models with v2?
Thanks!
*System
Windows 11 /  14900K / 128GB RAM / RTX 4090 / SSD

@Keyn34

For now, I keep program running by refraining max CPU process status to 97% in power plan option.

Hi there, many thanks for notifying this. Frankly, we haven’t seen this so far. I mean we haven’t run 4k cases. Our largest run was 1.2k. But we do quite a bit of repeated runs on this large sample and we had no issues. Since we can't reproduce this, It’s hard for me to tell why this happens. I have copied in @Keyn34 as he is the main guy for this version.
I just spoke to @Keyn34 and he pointed out to the heating issues that are notoriously prevalent in 14900k. This could be an issue. We adopted dask to enable out of core computing, which relieves memory and pushes the cores to the limit. Therefore, you get speed and as well as efficiency.

For now, I keep program running by refraining max CPU process status to 97% in power plan option.

And does this help now? To avoid crashes?
How's the CPU temperature BTW?

Hi @alfab8ta, I'm glad you like it so far. I'm sorry you ran into these troubles. Since you provided your system spec (thanks for that!), I assume that your problems are related to the CPU you are using. As @LalithShiyam mentioned, 13th—and 14th-generation Intel processors are notorious overheaters.
You could try confirming this by using a different system (if available) with a different CPU.

For now, I keep program running by refraining max CPU process status to 97% in power plan option.

Do you notice performance differences? If we see this more often, we might need a safeguard for the 13th and 14th generations.

Thanks, @Keyn34 and @LalithShiyam.
I agree that my issue is mainly due to the 14th gen CPU, and I overworked my system too much at a time. The CPU temperature peaks at 100 degrees at full loading, stays around 85% under thermal throttling, and went down to 56 degrees. I haven't tried many options, but refining the max power to 95% significantly decreased the max temperature of the CPU with doubled processing time. However, 96% to 99% didn't seem to make much difference. Anyway, I restored the power option to default because the modification didn't seem to be very effective, and the MOOSE has been fine for an hour so far. Probably giving it some break time would be the best solution.
Best,

Do keep us posted. And considering this is a cpu issue, may I close this issue? As we can't do much about it?

Do keep us posted. And considering this is a cpu issue, may I close this issue? As we can't do much about it?

Will do. And, plsease close this issue.

Hi there @alfab8ta are you content with the segmentations so far?

Thank you, @alfab8ta, I am looking forward to your insights.

@alfab8ta fantastic, I am curious about the accuracy of the actual results.


Screen context buttons on uberfire docks

Merged https://github.com/uberfire/uberfire/commit/4916d00a5


Behaviour of the Search-Box

Type: Feature Request
Dear Sirs
As an older Developer using a lot of Editors during Time i find VS really, really good - so thanks a lot.
There is one Issue with the Search-Box, i often found crazy while in 'my Workflow':
Simply searching while working with 'Ctrl-F', so focusing the Search-Box, all Functions for moving in the Code are disrupted.
So, no Page-Up, no Page-Down, no 'Home'/'End' and, and , and are'nt working as long as the Search-Box is focused - after years i cant get used to - perhaps too old and to much experience while decades with other Editors...
Ok, sorry for my poor English, perhaps somebody will think about changing...
Eckart Bechler, Dortmund, Germany
VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:22:07.651Z)
OS version: Windows_NT x64 10.0.19045
Modes:

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


use winapi on windows, update windows build instructions

After updating to 0.7.0 i encountered no more segfaults, so you might want this upstream.
Adds the dependency to winapi for target_os = "windows", and uses its sockaddr. I also took the liberty and corrected the windows build instructions for MSVC.
fixes #70, fixes #73

@ebfull until the end of october the Hacktoberfest is on, do you want more bugfixes?
If so, it would be great if you could have a look at the pending PRs since PRs that have to depend on other PRs are cumbersome to create and submit :)

@ebfull can we get this merged please

Hi guys - This is awesome but what's the status? It seems to build fine on stable.

@mlh-csis you can just add a dependency to our git repo: https://github.com/ENOFLAG/pcap as long as ebfull is busy


Remove german word for lap (Runde) from german msgstr for estimated…

…time (not estimated lap time).

Seems to see a copy and paste error.
Additionally: I personally think the translation "Voraus." (Voraussichtlich) does not fit really well here - from my point of view "Geschätzte" is a better translation here. "Vorrausichtlich" is used for "predicted time" and used when traveling by plane or train for your arrival time. But that might be a subtle difference not neccessarily considered to be wrong.


User annoyance provoked by images embedded in webpages source code

When one visits a webpage like this one, the following dialog appears each time the page loads / reloads.

May be related to #265 ?

Yes, this has fixed #265 for data:text too.


Bug: completely white window content

[V] I have read the FAQ.
[V ] I have searched in existing issues.

Environment

OS: [e.g. Debian, Windows, macOS...]
Windows
scrcpy version: [e.g. 1.12.1]
scrcpy v1.16
installation method: [e.g. manual build, apt, snap, brew, Windows release...]
Zipped file (64bit)
device model:
Pixel 4 (Android 11 beta 3) and Galaxy Note 8 (Android 8)
Android version: [e.g. 10]
Written above.
Describe the bug
I launch it, and I see a white window. It does support controlling, but it keeps being white:

I tried to restart the PC, I tried to restart the device. I tried to connect via Wifi (adb connect).
Also tried to disable developer options and re-enable it (with USB debugging).
If you know of a workaround, please let me know. :(

If you record, is it white?
scrcpy -r file.mkv

@rom1v No idea if it should be this way, but this video might have some glitches (maybe because now I'm on Wifi and not USB), and works only on VLC for me, and not on MPC (on MPC it is shown as complete black).
Other than that, seems to be fine.
Example video:
file.zip
I also tried to take a screenshot using Android Studio. Works fine. However, when trying to take a video, it produces something similar to ScrCpy: a file that can be opened via VLC but not via MPC:
device-2020-09-06-135825.zip
Could it be a codec issue on Windows OS ?

OK I think I know when this occurs, just don't know why.
It also occurs for the emulator, BTW.
I have a remote control of the laptop that has ScrCpy running on. I use "NoMachine" app for it.
And, since I don't need the laptop to have its lid opened (because of remote control), I close it.
When this occurs, I see white content on the emulator and on ScrCpy. When I open the lid, it works fine.
Might be an issue with Windows or NoMachine, no?

Seems so. Reported here:
https://issuetracker.google.com/issues/167880509
And closing here.
Sorry for the false report. Seems this affects both ScrCpy and emulator.


TypeError: Value passed to parameter 'shape' has DataType float32

Hi,
I am new to object detection. I believe I installed all dependencies and generated anchors. I am using 416x416 images. I started with 5 images as a trial, but when I start training I get the following error.
Using TensorFlow backend.
Seen labels:     {'num_plate': 5}
Given labels:    ['num_plate']
Overlap labels:  {'num_plate'}
2018-03-22 12:36:49.980078: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
(13, 13)
Traceback (most recent call last):
File "train.py", line 143, in
main(args)
File "train.py", line 112, in main
anchors             = config['model']['anchors'])
File "C:\Users\My book\Desktop\Project\basic-yolo-keras-master\frontend.py", line 67, in init
kernel_initializer='lecun_normal')(features)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\keras\engine\topology.py", line 592, in call
self.build(input_shapes[0])
File "C:\ProgramFiles\Anaconda3\lib\site-packages\keras\layers\convolutional.py", line 138, in build
constraint=self.kernel_constraint)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\keras\engine\topology.py", line 413, in add_weight
weight = K.variable(initializer(shape),
File "C:\ProgramFiles\Anaconda3\lib\site-packages\keras\initializers.py", line 213, in call
dtype=dtype, seed=self.seed)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 3878, in truncated_normal
return tf.truncated_normal(shape, mean, stddev, dtype=dtype, seed=seed)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\tensorflow\python\ops\random_ops.py", line 175, in truncated_normal
shape_tensor, dtype, seed=seed1, seed2=seed2)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_random_ops.py", line 594, in _truncated_normal
name=name)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 609, in _apply_op_helper
param_name=input_name)
File "C:\ProgramFiles\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'shape' has DataType float32 not in list of allowed values: int32, int64
Please somebody help.

I got the same error as you using Python 3. I found that I didn't get the error if I used Python 2.7. I'm not sure why.

I am using Python 2.7. I uninstalled my Python 3.6 and reinstalled Python 2.7

That's what happened to me too. I made sure that everything was a fresh install using VirtualEnv and it worked. Maybe worth a try?

Thank you for the reply. I did as you said. Uninstalled everything and started fresh. But now I cannot install tensorflow using pip or conda. It shows the following error.
UnsatisfiableError: The following specifications were found to be in conflict:

python 2.7*
tensorflow -> python 3.5*
On searching they say tensorflow is available for python>=3.5. Did this happen to you? What did you do about this?

Guys, anyway to solve it without switching to 2.7?

Excuse me AndyTsangChun, but line 27 of which file? And is that the only change required for this project to work in 3.5??

@HariP1234
Line 27 of Train.py
And u have to change all of the print to print()
I don't remember anymore changes rn, but just a few of stuff had to change.

Hi,
I couldn't find that line in Train.py. So I used notepad++ Find in file option. The line was in frontend.py.
I changed that and the print statements. Now getting the IndexError: tuple index out of range error.

Thats ok. I was able to fix it.

@HariP1234
Oh yes my mistake, it should be frontend.py.

But which frontend.py file. I am running a python 2.7 file on python 3 version in conda.


Upload images in mobile doesn't working

Hello Scotth, the upload images in modal bootsrap mobile doesn't appear images, please really help this issue !


Reuse of base class code

Coverage decreased (-0.001%) to 98.053% when pulling ea113d2114a06d42207d6cd57f10520303a97cbd on mapogolions:code_reuse into 95c967ac18a9bc55c456150b8f6753d821599d9d on slimphp:3.x.


fix(Layout): Fix Input Time input width being cut off

Gents, a quick fix with this one, a well-shot photo will speak more words than I ever could type in here, so here are the screenshots
The problem

The solution

🙇🏼

Thanks :)


exit

Manager+
Just quits the bot.
The bot should automatically restart anyway, so this can be used as a restart feature.

Fixed some time ago, command: .kill


LINK-1223 | Refactor admin list pages

Description :sparkles:

Common AdminSearchRow component to get rid of duplicated search input styling
useCommonListProps view to unify props in different list views

Issues :bug:
Closes :no_good_woman:
LINK-1223

Codecov Report

Merging #157 (4c002ba) into develop (cc1b4ae) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #157      +/-   ##
===========================================
- Coverage    99.70%   99.70%   -0.01%
===========================================
  Files          496      498       +2
  Lines         9203     9111      -92
  Branches      1985     1967      -18
===========================================
- Hits          9176     9084      -92
  Misses          27       27

Impacted Files
Coverage Δ

src/domain/images/utils.ts
100.00% <ø> (ø)

src/domain/keywordSets/utils.ts
100.00% <ø> (ø)

src/domain/keywords/utils.ts
100.00% <ø> (ø)

src/domain/organizations/utils.ts
100.00% <ø> (ø)

src/domain/places/utils.ts
100.00% <ø> (ø)

...ain/admin/layout/adminSearchRow/AdminSearchRow.tsx
100.00% <100.00%> (ø)

...ain/enrolments/enrolmentsTable/EnrolmentsTable.tsx
100.00% <100.00%> (ø)

src/domain/events/eventList/EventList.tsx
100.00% <100.00%> (ø)

src/domain/images/imageList/ImageList.tsx
100.00% <100.00%> (ø)

...main/keywordSets/keywordSetList/KeywordSetList.tsx
100.00% <100.00%> (ø)

... and 5 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Nice work 👍 Looks like the review job is failing ATM 🤔

Some temporary glitch with GitHub action deploy stage. Re-running failing job fixed the problem


Handle sprintf custom messages for asserts

Todo handle all phpunit asserts that can have 'sprintf' function

We should handle sprintf when we refactor assertX(x sprintf('message'));
More info: https://github.com/rectorphp/rector-symfony/pull/314#issuecomment-1340810137 & https://github.com/rectorphp/rector-symfony/pull/314#issuecomment-1340859044

You may can use NodeTransformer to get extracted data, then next combine them as string value https://github.com/rectorphp/rector-src/blob/f35326d7010fa42458b44d3896b4791dcc22f78a/src/PhpParser/NodeTransformer.php

@samsonasik i added a check if function call and leave the argument as it is is that okay?

When i have latest composer package updates and run vendor/bin/rector i do not get any changes not sure why https://github.com/rectorphp/rector-symfony/actions/runs/3675860795/jobs/6215800640 is failing then

should be green after PR https://github.com/rectorphp/rector-symfony/pull/317 merged and you can rebase.

Thank you :clap:


fix: Add key parameters to the rest of the components

Description

Fixes #3169

Checklist

[x] I have followed the Contributor Guide when preparing my PR.
[ ] I have updated/added tests for ALL new/updated/fixed functionality.
[ ] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
[ ] I have updated/added relevant examples in examples or docs.

Breaking Change?

[ ] Yes, this PR is a breaking change.
[x] No, this PR is not a breaking change.

Related Issues

It would be great if you could add super.key to all the effects that are extending Effect too

Sure @spydon , I'll do that changes

@spydon Request you to close this pull request, Thank you ❤


Compat for Swiftmailer 6 but preserve compatibility with Swiftmailer 5.

This pr is the follow up for #237. Thanks for your review.

LGTM but let's not forgot to add tests.
For that I suggest to add one job with SwiftMailer version 6 on travis build.
Do you know enough about travis-ci to do that change or you need help?
PS: you can update the same PR by just push another commit to feature/swiftmailer-6-compat-2.

Thanks for your re-review. I've not done a project on travis so far and help would be much appreciated. At the moment we are installing swiftmailer 5 if the tests are running on PHP < 7 and if we are running on PHP >= 7, it is already installing swiftmailer 6. Any specific point to test or would that be sufficient?

Any specific point to test or would that be sufficient?

That's sufficient.
To execute the current test for each swift version
https://github.com/FriendsOfSymfony1/symfony1/blob/6185ffc7f31bfe68d37690b4d3533a5ab69279dd/test/unit/mailer/sfMailerTest.php

help would be much appreciated

I will try to tackle this this week-end.
A trade-off here is to install swift version 6 on before install then revert the commit when travis build is done.

help would be much appreciated

I will try to tackle this this week-end.

Thanks

A trade-off here is to install swift version 6 on before install then revert the commit when travis build is done.
The next step will be to add a dedicated job.

At the moment composer install during the build process already installs swift version 5 on PHP < 7 and swift version 6 on PHP >= 7. Or do you plan do somehow force swift version 5 on PHP > 7 as an additional test for version 6?

At the moment composer install during the build process already installs swift version 5 on PHP < 7 and swift version 6 on PHP >= 7. Or do you plan do somehow force swift version 5 on PHP > 7 as an additional test for version 6?

Ha, got it now (refreshing my memory => because composer install the latest possible version).
In that case I think that's enough except there is a bug on lowest versions.
Using composer update --prefer-lowest => :heavy_check_mark:

Thank you @thirsch , merged

Found out that lib/plugins/sfDoctrinePlugin/lib/mailer/Swift_DoctrineSpool.class.php class still references to Swift_Mime_Message, which is not around if the application installs SwiftMailer v6.
Any hints @thirsch ?

Good catch, @thePanz. We could do the same as in this pr by removing the type from the method signature and add both types to the phpdoc. I can create a pr for it, if you like.

Good catch, @thePanz. We could do the same as in this pr by removing the type from the method signature and add both types to the phpdoc. I can create a pr for it, if you like.

Yes, please go ahead :+1:
the tricky part: the interface is from the SwiftMailer itself, IIRC :)

Yes, please go ahead 👍 the tricky part: the interface is from the SwiftMailer itself, IIRC :)

Ok, got it. We might be able to fix it with the solution I had before just removing the type. The pr is still available, so please have a look at it: https://github.com/FriendsOfSymfony1/symfony1/pull/237/files#diff-ab78635a7285fe1eca9b5c7fad605d21d3f09ccd2737c0af6bbf7022f66f95a7
As I'm on vacation next week, it will take a few days to come up with a proposal.


Nuxt Island  fails to render inside teleport target

Environment

Operating System: Linux
Node Version:     v18.20.3
Nuxt Version:     ^3.13.2
CLI Version:      3.14.0
Nitro Version:    -
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      -
Runtime Modules:  -
Build Modules:    -

Reproduction
https://stackblitz.com/edit/github-qvc8ul?file=pages%2Findex.vue

Run the reproduction
Navigate to /other
Go back to /
Error is thrown:  Failed to locate Teleport target with selector "div[data-island-uid="1"][data-island-slot="default"]"

Describe the bug
Inside a NuxtIsland component, the <slot /> isn't being rendered when navigating to another page, then navigating back. The issue seems to stem from the fact that the ssrHTML ref remains empty upon navigation because the instance.vnode.el is still null, which prevents the SSR uid from being captured correctly:
https://github.com/nuxt/nuxt/blob/49242b25008d5593d1a279f030dac8936712cfe9/packages/nuxt/src/app/components/nuxt-island.ts#L129-L136
I've currently fixed the issue by simply setting the ssrHTML ref to be nuxtApp.payload.data[key]?.html || '' upon initialization. I'm happy to provide a PR if that seems like a viable solution to you.
Additional context
No response
Logs
No response

/relate https://github.com/nuxt/nuxt/issues/29354
/relate https://github.com/nuxt/nuxt/issues/29345


Sample HTML for every bridge?

Hi folks,
in connection with #187, I was wondering wether there should be a sample HTML file added to the repo. That file should contain:

the Facebook URL tested against
the HTML that was returned

This should hopefully lead to being able to diff changes in the HTML that have been made by the content provider (e.g. Facebook) to be discovered more easily and to fix the affected bridge faster.
What do you think?
Cheers
Thomas

The problem with using a sample HTML is the fact that it may change :
If you make a request for a user profile log, it will not be the same from day to day, regardless of the structure of the file.
But I was thinking about including a 'sampleValue' parameter in the new parameter system to allow testing the resulting datas. I have started porting rss-bridge-validator to use the new system.

recently I prefer Atom (or any other XML that's already there) plus XSLT like e.g. at https://drop.mro.name/galleries/demo/
So the focus remains on the Atom feed and the raw data while providing a more eye-pleasant visual appearance.


Feat/start

Starting Resend FastAPI Example.
This project shows you how to use Resend in your FastAPI project.

@pedroimpulcetto thanks for the contribution again ! im thinking of holding on on this merge til we release python sdk v2 so that we can use the "from" attribute normally.

Agree

hey @pedroimpulcetto v2.0.0 has been released earlier today, would you to update this PR with that latest version ?

Sure! I will update to be simple as the Flask example


Cannot submit job with id containing internal slashes

Tried to submit:
{
  "id":"/tools/docker/registry",
  "container":{ "type":"DOCKER", "docker":{ "image":"registry" }},
  "env":{
    "SETTINGS_FLAVOR":"local",
    "STORAGE_PATH":"/docker_storage"
  },
  "cpus":0.5,
  "mem":1024,
  "instances":1
}

And got:
$ dcos marathon app add registry.json
Error: '/tools/docker/registry' does not match '^/?(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$'
Path: id
Value: "/tools/docker/registry"

Thanks Marcus! We saw this with the dcos cli only - directly submitting with httpie works fine


MagenticOne section in AgentChat and Extension Documentation

We need a "Magentic One" section under the Extension documentation. It should include the followings:

How to install.
How to use the MagenticOneTeam, with a running example.
Information about the agents: File Surfer, Web Surfer, Code Executor, and Coding Assistant.
How to use the m1 command line tool.
Add references:

To AgentChat's MagentOneGroupChat doc (see below)
To AutoGen Studio's doc on MagenticOneTeam.
To paper and other relevant links.

Under the AgentChat documentation, we need a section either in Tutorial or a separate page to show how to use the ledger orchestrator only, i.e., use MagenticOneGroupChat. On this page reference the MagenticOneTeam documentation in the Extension.

Definitely need this one. Do you have the plan even a draft version? @ekzhu

@HakjunMIN  you can take a look at the Magentic One Team API Doc.
You need to install autogen-ext[magentic-one]==0.4.0.dev13.
For the orchestrator only, look at the Magentic One Group Chat API Doc


Can Azure Front Door load balance or route traffic within a virtual network?

Hi,
According to Can Azure Front Door load balance or route traffic within a virtual network?, it mentioned no AFD directly cannot route within a virtual network, and can only using Application Gateway or Azure Load Balancer in between will solve this scenario.
But I think it also can be solved by using Private Link in Azure Front Door Premium?

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

ID: f7be424c-f540-a753-6ecc-6ff3913368d5
Version Independent ID: dc80b25f-374d-8775-16e7-ae7d57b4b94f
Content: Azure Front Door - Frequently asked questions
Content Source: articles/frontdoor/front-door-faq.yml
Service: frontdoor
GitHub Login: @duongau
Microsoft Alias: duau

Hi @neallee2012, Thanks for your feedback. We shall review this and get back to you shortly

We have assigned the thread to the author for further review.
@duongau, please check the above suggestion and update the docs accordingly.

@KapilAnanth-MSFT Thank you for bringing this to my attention.
Hi @neallee2012, you're absolutely right. Since the release of AFD premium tier you can enable Private Link to route traffic to VMs behind an ILB over a private endpoint. I'll get this added in a bit and have it reflect later today in the FAQ. Thank you for you input to improve our documentations!
PR: https://github.com/MicrosoftDocs/azure-docs-pr/pull/207385
#please-close

#reassign:@duongau


AndroidAsync WebSocket closes with exception

When receiving a larger message from the JanusGateway (say, an OK message from Echo Test) androidSync websocket logic throws an exception.
The exception is that an Integer cannot be converted into BigInteger. This consequently closes the socket and makes the rest of the calls fail.
Trying to narrow down the source/reason for this error as no conversion of the actual text of the message should be happening in the socket logic and the JSON parsing is done withing its own try/catch...

Welp, this was on my end...ugh. I should have caught the exception.


please elaborate the readme.md!!!

not able to run showing these issues

What exactly is your question?


Nametags

New route: /:collectiveSlug/events/:eventSlug/nametags.pdf
Todo: add support for US format and different name tag sizes

checking with Gunner

We just want first name, no other participant data, in the largest possible font.
No last name, no title, no affiliation.
Fine and/or desirable to have event name/location/dates etc in small type at e.g. bottom of name tag.
Re-attaching our template as a reference, you can ignore the logo.
Thanks!
AspirationEventNametagTemplate.pdf

@xdamman good?

Yep. https://github.com/opencollective/frontend/pull/16

eg. https://opencollective.com/sustainoss/events/2017/nametags.pdf
with the marks: https://opencollective.com/sustainoss/events/2017/nametags.pdf?template=showMarks

These look great, thank you so much.
Only question to other organizers is do we want event name in the footer?

@xdamman Looks amazing
@alnermcgunn I would like the Event (SustainOSS) in the footer. I keep my badges for sentimental reasons (as others do).
@xdamman if it isn't too much trouble, that would be awesome. =)

Sure thing.
Right now the name of the event is simply "Sustain". Happy to change it to "SustainOSS"

Omg looks amazing. Good catch, it should just be Sustain. ❤


CI: CodeCov might be optimized

output:
28.97s$ bash <(curl -s https://codecov.io/bash)
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                                e2e0ba7
(url) https://codecov.io
(root) .
==> Travis CI detected.
  -> Swift in /Users/travis/Library/Developer/Xcode/DerivedData
  -> Speed up xcode processing by using use -J 'AppName'
    + Building reports for KakapoExample app
    + Building reports for Kakapo framework
    + Building reports for Kakapo framework
    + Building reports for Nimble framework
    + Building reports for Quick framework
    + Building reports for Nimble framework
    + Building reports for Pods_KakapoTests framework```

We should try to check `  -> Speed up xcode processing by using use -J 'AppName'`

Closed with aa913641c213442496f


VPN stack no longer stores session credentials in Credential Manager.

As of Windows 10 build 19044.1469 or a previous, recent update, the VPN stack does not appear to store a *Session credential in Credential Manager upon establishing a VPN connection.
This documentation should be updated to reflect the change, or if this change is not intentional, a link to any relevant patches/KB articles should be included.

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

ID: 8b4b43c7-e56a-f762-846f-51257983d3ab
Version Independent ID: fa5d8ebb-02ea-cbc1-9b29-69bb710643e3
Content: How to use Single Sign-On (SSO) over VPN and Wi-Fi connections (Windows 10 and Windows 11) - Windows security
Content Source: windows/security/identity-protection/vpn/how-to-use-single-sign-on-sso-over-vpn-and-wi-fi-connections.md
Product: m365-security
GitHub Login: @Dansimp
Microsoft Alias: dansimp

Hello @sivan-koren ,
the VPN stack does not appear to store a Session credential in Credential Manager upon establishing a VPN connection. - could you please provide an information source?
I tried to find it, but didn't succeed.
Thank you

On any fresh Windows 10 Pro or Windows 11 Pro installation, create a new
VPN connection and connect. Then open the credential manager and look to
see that there is no "*Session" entry, contrary to the documentation. See
attached screenshot to observe that this entry does not exist when
connected to a VPN.
If the "*Session" entry is only created under certain conditions, these
conditions should be documented.
On Wed, Mar 16, 2022, 6:10 AM MaratMussabekov @.***>
wrote:

Hello @sivan-koren https://github.com/sivan-koren ,
the VPN stack does not appear to store a Session credential in Credential
Manager upon establishing a VPN connection. - could you please provide
an information source?
I tried to find it, but didn't succeed.
Thank you
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/windows-itpro-docs/issues/10305#issuecomment-1069058098,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADGVZZMPZ6CTC7UEUVSBZ3LVAHFSVANCNFSM5MOFOEEQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

Hello, yes, confirmed.
On 21h1 and prior I see *session, on 21h2 - do not.
I will create a PR.
Thank you

I'm still confused here. The article now states that the credential is not visible in Credential Manager. Does that mean that there is in fact no credential or that it is simply not visible in the GUI? If the credential does exist, why does Windows prompt the user to enter individual credentials for each network resource? Doesn't that imply that the credential stored in the VPN stack is factually not passed for Windows to use against network resources contrary to the entirety of this article? Does this only work on domain attached versions of Windows (e.g. only Windows Pro/Enterprise and only when connected to a domain controller)? If so, the documentation should be revised to state so as this is a dramatically different behavior than previous versions of Windows.

Hello @sivan-koren
yes, you are correct, it asks for credential, so my PR may be wrong.
Does this only work on domain attached versions of Windows - no, as far as I tested, behavior is the same.
Dear @denisebmsft , can it be addressed to the production team? It looks like SSO for VPN doesn't work in 21h2, and I believe that "applies to" section need to be added to the article to show that article is for 21h1 and earlier, however I have some concerns:

I only tested PPTP VPN, for other types behavior could vary
it is not shown in 21h2 change log that this feature was removed
may be some other features were introduced for VPN SSO (still nothing in change log)

Dear @e0i , could you please re-open this issue?
Thank you

@.***
On Wed, Mar 23, 2022, 23:27 sivan-koren @.***> wrote:

I'm still confused here. The article now states that the credential is not
visible in Credential Manager. Does that mean that there is in fact no
credential or that it is simply not visible in the GUI? If the credential
does exist, why does Windows prompt the user to enter individual
credentials for each network resource? Doesn't that imply that the
credential stored in the VPN stack is factually not passed for Windows to
use against network resources contrary to the entirety of this article?
Does this only work on domain attached versions of Windows (e.g. only
Windows Pro/Enterprise and only when connected to a domain controller)? If
so, the documentation should be revised to state so as this is a
dramatically different behavior than previous versions of Windows.
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/windows-itpro-docs/issues/10305#issuecomment-1076571996,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVH2N5DKQMRN3JI7RXGIMBLVBNEO3ANCNFSM5MOFOEEQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

@paolomatarazzo Please help us in resolving this issue. Thanks

@v-stsavell, this is still incorrect. *Session isn't just "not visible in Credential Manager." Not visible, and doesn't exist are very different meanings. There is actually no credential based on mine and others' testing. If that's expected, then this entire portion of the article is factually false:
This article explains requirements to enable Single Sign-On (SSO) to on-premises domain resources over WiFi or VPN connections. The following scenarios are typically used:

Connecting to a network using Wi-Fi or VPN.
Use credentials for WiFi or VPN authentication to also authenticate requests to access a domain resource without being prompted for your domain credentials.
For example, you want to connect to a corporate network and access an internal website that requires Windows integrated authentication.

The credentials that are used for the connection authentication are placed in Credential Manager as the default credentials for the logon session. Credential Manager stores credentials that can be used for specific domain resources. These are based on the target name of the resource:

For VPN, the VPN stack saves its credential as the session default.
For WiFi, Extensible Authentication Protocol (EAP) provides support.

If no one can figure out how SSO works on these later versions, the least we should expect from Microsoft is to document that no documentation exists for SSO over VPN in 21H2 and later and that this entire article only applies to versions prior to that.

thank you for the feedback, @sivan-koren
Which VPN protocol are you using? Have you reviewed the following article? https://learn.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-known-issues

Paolo,
Thank you for your response. It appears that in a recent Windows update, this issue may have been quitly fixed. As of today, the VPN stack suddenly behaves as it did prior to 21H2.
I did check the article, and tested disabling and re-enabling Credential Guard had no effect on the issue. The *Session credential is now present, functional and visible.
I suspect at this point that there was in fact a bug in the 21H2 update that caused the VPN stack to stop storing credentials in Credential Manager. This bug was confirmed by @MaratMussabekov at the time. However, it appears that it was quietly fixed in a very recent Windows update.
I suggest at this point that this documentation should be reverted to how it read on Jan 20, 2022 before this issue was logged, because the *Session credential is in fact now visible in Credential Manager.
Cheers!

That's interesting, thank you for letting me know, @sivan-koren. I will check with the feature PM and determine how to adjust the documentation.


X11: map super to win key

see: https://askubuntu.com/questions/19558/what-are-the-meta-super-and-hyper-keys
relevant issue: https://github.com/yatli/fvim/issues/57

The key mappings are a bit weird. On my laptop the Win key is reported as KEY_LEFTMETA by evdev, but as Super_L by X11. Not sure how exactly we should name this key.

@kekekeks if you use a MacBook, there’s perhaps one layer of remapping somewhere, swapping alt(meta) and command(super)

On my machine Alt is reported as KEY_LEFTALT/Alt_L. It seems that Meta key is no longer in use on modern hardware.
Qt has even more weird modifier mappings:

On macOS, the ControlModifier value corresponds to the Command keys on the keyboard, and the MetaModifier value corresponds to the Control keys. The KeypadModifier value will also be set when an arrow key is pressed as the arrow keys are considered part of the keypad.
On Windows Keyboards, Qt::MetaModifier and Qt::Key_Meta are mapped to the Windows key.

GTK maps Command to Meta_L
https://github.com/GNOME/gtk/blob/7869ffbb49cf99fcf7c4a7f1b4925262991d1e5d/gdk/quartz/gdkkeys-quartz.c#L122

so it looks like the UI frameworks create enum entries for "Meta", but it's actually different from Meta_L defined in the X11 table.

From what I'm seeing, it's framework-specific and is a big mess in general.

I think it's wise that Avalonia simply use "LWin", "RWin" and avoid all that metaness.

...but anyway, X11 always report win keys as "Super" -- I'm pretty sure for that.


IAM scanner whitelisting without enumerating all roles

split out from https://github.com/GoogleCloudPlatform/forseti-security/issues/2055#issuecomment-425527856
Summary:
IAM scanner whitelisting only considers roles with rules.  If a role does not have a rule, it is automatically whitelisted.
The desire is to have an exact way of describing whitelist rules.  One way to do this is to reflect all GDM declarative role bindings, and any deviation from that would trigger violations.
Currently, this would require enumerating rules for all predefined roles, all custom roles, and all untracked (maliciously created or not) custom roles (and creating dummy users https://github.com/GoogleCloudPlatform/forseti-security/issues/1963).
This is hard to scale because:

there are > 200 predefined roles
custom roles can be large in number also.  the declaration of new custom roles is coupled with the need to add a new forseti rule
open to malicious agent that creates a custom role that does not have a corresponding iam rule.

@rllin-fathom There is a way to apply a rule to all the roles.  Here are a couple of examples:
rules:
  - name: Allow only members of my org to be in any role
    mode: whitelist
    resource:
      - type: organization
        applies_to: self_and_children
        resource_ids:
          - '*'
    inherit_from_parents: true
    bindings:
      - role: roles/*
        members:
          -<EMAIL_ADDRESS>          -<EMAIL_ADDRESS>
rules:
  - name: Don't allow gmail users to be in any role
    mode: blacklist
    resource:
      - type: organization
        applies_to: self_and_children
        resource_ids:
          - '*'
    inherit_from_parents: true
    bindings:
      - role: roles/*
        members:
          -<EMAIL_ADDRESS>


Added multiple SPI capability with minimal disruption to the existing code

Added a new constructor for changing the selected SPI port and changed all of the SPI class acesses to an SPIClass pointer.
Increased compatibility with other devices that has multiple SPI ports (Such as ESP32 or STM32 boards)
Example usage:
MFRC522 mfrc522(SS_PIN, RST_PIN, SPI); //Works the same as: MFRC522 mfrc522(SS_PIN, RST_PIN)
or
MFRC522 mfrc522(SS_PIN, RST_PIN, SPI2); //Given that you created another SPIClass named SPI2
Note:
You can still use it as before, like;
MFRC522 mfrc522(SS_PIN, RST_PIN);
or
MFRC522 mfrc522(RST_PIN);
Tested on Arduino UNO and STM32F103RB, works without a problem.

Q
A

Bug fix?
no

New feature?
yes

Doc update?
no

BC breaks?
no

Deprecations?
no

Fixed tickets
#497

Injectable SPI is available at the fork.


Allow 202 response code for commit

When using containerd, I noticed that I would get an unexpected status: 202 Accepted when pushing manifests to Quay.

Could you sign off the commit? https://github.com/containerd/project/blob/master/CONTRIBUTING.md#sign-your-work

@mxpv Done!

LGTM

@ecordell thanks for working on this.  Do you think we should cherry pick this commit into the release branches?


feat: reset-cursor supports geo-replicator's subsription.

Is your feature request related to a problem? Please describe.
I want to use geo-replicate to migrate data from existing Pulsar cluster to a new Pulsar cluster by:

Create geo-replicate rule between exising cluster and new empty cluster.
Reset replicator cusror to earliest then migrate data.

But i found that geo-replicator's subsription is an internal subs and cannot be reset by reset-cursor.
Describe the solution you'd like
I hope geo-replicator's subsription can be reset cursor by reset-cursor API.

Hi, @ericsyh  What about this PR?
https://github.com/apache/pulsar/pull/14887

The details please see #14887. closed.


How to add a special regexp for param?

I knew, the param will default to "([^/]+)".
How to change this and add special regexp for it.

+1 this would greatly ease life for all of us non-rails guys having non-railsy routes to support in Ember.js

UI-Router is a router to draw inspiration from here. It supports supplying a regex to override the default regex, as in
'/user/{id:[0-9a-fA-F]{1,8}}',
which would only match hex values.
UI-Router also provides named aliases for common regexes, like date.
Pros

Removes validation code out of the route itself

Cons

Could potentially increase complexity of the specificity matching algorithm

I'm working on a router inspired by Ember's router, and I'm thinking I'll include this feature. If you're interested in supporting it @machty / @wycats, lmk. I'd be happy to try to put together a PR.

I'm developing a DSL that supports this feature using an = as the operator.
books/:bookId=\d{1,4}
This wasn't my first choice for syntax – parentheses were – but most folks seem to prefer parentheses for optional segments. This feature doesn't affect capture groups, 'cause the general rule of thumb is to not use capture groups within the DSL as it messes with the generated regex.
I then thought to use [] or {}, but both of these conflict with RegExp features in ways I couldn't resolve. So I went with an equals sign.
Route recognizer doesn't support optional segments at the moment, so there's technically no conflict with using parentheses for this feature. But it should support optional parts, and it should use parentheses for it, I think.

Nice work!

Closing this in favor of https://github.com/emberjs/rfcs/pull/154.


bug in BERT-sepcific progress reporting

When I use the master branch updated with #126 to check my logs, it complains with RCP. The reason is that the new code parses the wrong converge epochs (or rather training samples). Given the log below:
... "key": "eval_accuracy", "value": 0.720, "metadata": {"file": "/home/work/run_pretrain.py", "lineno": 340, "train_samples": 123456789, "epoch_num": 20}}

A small fix makes it working well,
@@ -57,7 +57,7 @@ def get_submission_epochs(result_files, benchmark, bert_train_samples):
                         conv_epoch = json.loads(eval_accuracy_str)["metadata"]["epoch_num"]
                     if use_train_samples and "train_samples" in str:
                         eval_accuracy_str = str
-                        conv_epoch = json.loads(eval_accuracy_str)["value"]
+                        conv_epoch = json.loads(eval_accuracy_str)["metadata"]["train_samples"]
                     if "run_stop" in str:
                         # Epochs to converge is the the last epochs value on
                         # eval_accuracy line before run_stop
@@ -67,6 +67,7 @@ def get_submission_epochs(result_files, benchmark, bert_train_samples):
                         else:
                             subm_epochs.append(1e9)
                             not_converged = not_converged + 1
+                        break
     if (not_converged > 1 and benchmark != 'unet3d') or (not_converged > 4 and benchmark == 'unet3d'):
         subm_epochs = None
     return bs, subm_epochs

So I ran the package checker in your submission and it works fine, I think it passed because you added the training samples in the epoch_num field too. Is that your assumption too?

Yes, you are right. Since we could not change the official logging code, we changed our logs to pass the package checker.

we are closing this for now, if there is any further question please feel free to reopen it.


Automated project structure updation using github workflows, python scripts and action bot

Closes: #152
Screenshot:

PS: Added it in a new file called PROJECT_STRUCTURE.md as mentioned.

@J-B-Mugundh can you add a dummy file in your branch and share a screenshot of the changes
You can add a dummy.txt to the ARIMA directory, save a screenshot of the MARKDOWN file.
Then please remove dummy.txt and do the same.

@J-B-Mugundh great work !

Thank you 😊


dNSName lints should not be applied to iPAddress fields

https://crt.sh/?id=284927361&opt=zlint
"DNSNames must have a valid TLD"
I'm not sure if it's complaining about the IPv4 address in the Subject CN field or in the SAN iPAddress field.  Either way, it's a false positive.

Good point. It's complaining about the CN field. In fact, we should probably check that the CN field is NOT an IP address before we do any sort of DNS-related checks. I can submit a PR to this effect.

I believe this has been addressed by #190 and that this was added as a test case, which is passing As such, I'm going to close this issue.


FAQ still has old email

<EMAIL_ADDRESS>needs to be updated to an lkellar.org address

Fixed


feat(socketio): Add SocketEventName decorator

Fix documentation
Fix exportation of SocketMiddleware and SocketMiddlewareError

Closes: #282

Informations

Type
Status
Migration

Feature/Fix/Doc/Chore
Ready/In development/Hold
Yes/No

Description
A few sentences describing the overall goals of the pull request's commits.
Usage example
Example to use your feature and to improve the documentation after merging your PR:
import {} from "@tsed/common";

Todos

[ ] Tests
[ ] Coverage
[ ] Example
[ ] Documentation

:tada: This PR is included in version 5.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Conversion does not take special_price in Magento into account.

CAUTION: Do not attach any sensitive information or PII
Please be careful not to include sensitive information in the files because this is a public repository (for example, real customer names, emails and addresses).
Problem:
Describe the problem you are experiencing with the gem.
Special_price is ignored.
Steps to Reproduce:
List the steps we can take to reproduce the problem:

Import a product with both price and special price
Special price is ignored, price in Shopify matches price in Magento

Update: This is not as simple as we thought.
Turns out that there's a bunch more logic that determines what price actually gets displayed in Magento.
Most importantly, Ziyan discovered that configurable products can have special prices too, not just simple products.
The parent configurable product can override the child's price or special_price, which means we have to do a check against other records every time we want to decide what to import, and that we are sensitive to which of the parent and child we see first unless we add additional logic for that.
But then if the price we're actually displaying is the parent's special price, then what should we import as the compare at price in Shopify -- the child's price? the parent's price? the child's special price? Since these are all being overridden, it's not obvious what the user would want.
Also, turns out there's quite a bit of logic that governs what prices actually get displayed in Magento (there's actually an entire section of the admin devoted to price display rules) so it's impossible anyways to import prices into Shopify that exactly match how they're displayed in Magento.
We were adding this ticket to our Q4 plans because we thought it was very easy and unambiguous. Now that we know there's some ambiguity and some room for decision making, I think that this feature should be reprioritized and either moved down or left permanently in the realm of custom pipeline stages.


Poll: Dimensionless quantity (quantity of dimension one)

ISO 80000-1:2009(E)

Quantity for which all the exponents of the factors corresponding to the base quantities in its quantity dimension are zero.
The measurement units and values of quantities of dimension one are numbers, but such quantities convey more information than a number.
Some quantities of dimension one are defined as the ratios of two quantities of the same kind.

Assuming:
auto q1 = quantity<metre, double>() / quantity<metre, double>();
auto q2 = quantity<second, double>() / quantity<second, double>();

What the result should be?

(please vote only once by clicking on the correct bar above)

Option 1 (current library design)
static_assert(std::is_same_v<q1, double>);
static_assert(std::is_same_v<q2, double>);
auto q = q1 + q2;
static_assert(std::is_same_v<q, double>);

Option 2
static_assert(std::is_same_v<q1::dimension, dimension<>>);
static_assert(std::is_same_v<q2::dimension, dimension<>>);
auto q = q1 + q2;
static_assert(std::is_same_v<q::dimension, dimension<>>);

Option 3
static_assert(std::is_same_v<q1::dimension, dimension<exp<base_dim_length, 0>>>);
static_assert(std::is_same_v<q2::dimension, dimension<exp<base_dim_time, 0>>>);
// auto q = q1 + q2;  // does not compile

Please note that in such a case:
auto q1 = 10mps * 2s;     // length
auto q2 = q1 / 2m;        // dimensionless<length>
auto q = 10mps * 2s / 2m; // dimensionless<velocity>

@mpusz, would you be interested in reasoning behind the choice?

@i-ky Sure ;-)

I like Option 3 the least, because of the following. If instead of
auto q1 = quantity<metre, double>() / quantity<metre, double>();
auto q2 = quantity<second, double>() / quantity<second, double>();

you will be more explicit:
auto l1 = quantity<metre, double>();
auto l2 = quantity<metre, double>();
auto q1 = l1 / l2;
auto t1 = quantity<second, double>();
auto t2 = quantity<second, double>();
auto q2 = t1 / t2;

and rearrange the expression for q (mathematically speaking):
q = q1 + q2 = l1 / l2 + t1 / t2 = (l1 * t2 + l2 * t1) / l2 / t2

you will end up with a different expression for q and it will compile.
auto q = (l1 * t2 + l2 * t1) / l2 / t2;
static_assert(std::is_same_v<q2::dimension, dimension<exp<base_dim_time, 0>, exp<base_dim_length, 0>>>);

This feels wrong and counter-intuitive.
Option 1 and Option 2 are both good, but I would prefer Option 2 because

The measurement units and values of quantities of dimension one are numbers, but such quantities convey more information than a number.

"More information" means more type safety and better interfaces. A function taking double leaves a question whether it actually takes a dimensionless quantity or simply hasn't been converted to unit library yet. Sort of absence of const.
Functions like sin(), cos(), exp(), log() are used quite often in various formulas and should only take dimensionless quantities as a parameter. However, sometimes log() should be allowed to take in certain dimensional quantities to calculate pH and decibels.
Question. How will calculation of 1 + q1 / q2 and similar formulas (e.g. Lorentz factor) look in the context of Option 2? Will explicit casts of dimensionless quantity to double be required?

Thanks! I agree with your reasoning behind Option 3. However, I have a different opinion about Options 1 & 2 (I prefer Option 1):

option 2 is harder to specify and implement (it requires either a dedicated class template specialization which means whole class template interface rewrite, or quite a lot of SFINAE magic to allow implicit conversion from/to scalars)
besides being shorter and easier to implement and standardize, Option 1 also saves me from a rewrite of sin(), cos(), exp() for quantities as those already work for doubles ;-)
actually I do not agree that Option 2 provides "more type safety and better interfaces". In my opinion, it provides a false impression of safety.   If it is some strange quantity-ish type it is exactly the opposite. Also returning a pure Rep increases the interoperability with other libraries comparing to the other case if we choose to use explicit cast there. As you mentioned we do not have to rewrite trigonometric and other functions and algorithms.

Answering your question, I do not have a strong opinion yet. Some libraries provide an implicit cast while other require an explicit one. Do you have any preferences?

I wasn't taking implementation and standardization efforts into account. :)
I guess, if I was given Option 1 and no free choice I would still be very happy. I have my own doubts about Option 2. I'm afraid that explicit casts will make expressions very hard to read and render the library unusable for complex calculations... Perhaps, at this point I need to play a bit with the code. I'll let you know how it goes.

I would really love to see support for radian and degree (although I know that radian is technically unit-less) in your library :-)
Usage of these happens so often in user code that a support would be really helpful.
For example an angular rate ([rad/s]) is something different than a frequency in Hz [1/s] and one should not be assignable to the other. It is also convenient to define thresholds in deg and the convert to [rad]. If unitless quantities are the same as double, the distinction between [rad], deg and another unitless quantity is lost.

I would expect the following to work also.
   auto q2 = units::quantity<units::millimetre, double>{1000}
       / units::quantity<units::metre, double>{1};
   static_assert(std::is_same<decltype(q2),double>::value);

This is a really good expectation @kwikius ;-)
https://godbolt.org/z/pGkBa_
It is the current design of the library.

@mpusz
Unfortunately the link above doesn't appear to be working

Oh, it's looking like a really hard problem =(
I am working in petroleum industry and there is a bunch of dimensionless units there, often quite weird. For example, Gas Formation Volume Factor (rm3/sm3 in metric system and rb/stb in field system), Gas Liquid Ratio (sm3/sm3 in metric and scf/stb in field), Water Oil Ratio (sm3/sm3 in metric, but stb/stb in field) and many others. And on the one hand, they are supposed to have different unit types, but on the other can be used together in some big complex formula...
https://www.sciencedirect.com/topics/engineering/gas-formation-volume-factor
https://www.sciencedirect.com/topics/engineering/gas-liquid-ratio

I would prefer Options 2 and 3 over Option 1. I have not seen anything like Option 3 before, so I'm not sure if I would prefer it over Option 2 or not.
For me, dimensionless quantities need to know they are quantities so that they can still be converted. Radian, degree, and percent are all commonly used units for dimensionless quantites, and if I want to be able to convert between them, they must be strong types. In that sense, it does provide a safer interface because I can do something like
auto l1 = units::quantity<units::millimetre, double>{100};
auto l2 = units::quantity<units::metre, double>{2};
auto ratio = l1/l2;    // this is 50 mm/m, which is a strange, but valid dimensionslless unit.
auto perc = quantity_cast<units::percent,double>(ratio);  // value is 5
auto rad = quantity_cast<units::percent,double>(ratio); // value is 0.05
auto deg = quantity_cast<units::degree,double>(ratio); // value is 2.86

I understand that you con't want to implement all of the math functions, but you wouldn't have to rewrite them, just provide thin wrappers that convert the argument to radian, call the standard library versions with the value, and return the result in radian.
I use Boost.Units a lot, and they treat plane_angle as a seprate dimension, which is a pain for me. If you want to compute the apparent size of the Sun for example, you just divide its diameter by the distance to it. With boost, dividing two lengths gives me a dimensionless quantitiy that cannot be converted to radian or degree. You have to extract the value and create a new plane_angle quantity. But I also don't want dividing two lengths to give me a plane_angle because then it would be a pain to calculate percent differences.
Option 3 is interesting. One thing that is always a bit cloogy is angular kinematics calculations. If I multiply angular velocity (rad/s) by a length in meter, most libraries will give me a quantity in units of rad m / s, but it should really be just m/s. I wonder if Option 3 would allow for something like this, where if you have a dimensionless quantity with dimension dimension<exp<base_dim_length, 0>>> and you multiply it by a length, you just get a length back.
Anyways, thanks for the great work on this library. I am hoping I will get some time to test and give feedback. I agree that something like this is more important than most people realize, and it should be as easy to use as possible so that more people will use it and kill bugs before they even compile.

Oh, it looks like a really hard problem =(
I work in petroleum industry and there is a bunch of dimensionless units there, often quite weird. For example, Gas Formation Volume Factor (rm3/sm3 in metric system and rb/stb in field system), Water Oil Ratio (sm3/sm3 in metric and stb/stb in field), Gas Liquid Ratio (sm3/sm3 in metric, but scf/stb in field) and many others. And on the one hand, they are supposed to have different unit types (at least in GUI), but on the other hand can be used together in some big complex formula...
https://www.sciencedirect.com/topics/engineering/standing-correlation
https://www.sciencedirect.com/topics/engineering/gas-formation-volume-factor
https://www.sciencedirect.com/topics/engineering/gas-liquid-ratio

I think it is entirely possible.
template <Quantity Num, Quantity Den>
requires DimnesionlessQuantity<decltype( Num{}/ Den{})>
struct QuantityRatio{

   QuantityRatio( const Num & num_in, const Den & den_in)
   : nume_{num_in}, den_ (den_in) {};

 private:
   Num num_;
   Den den_;
};

see here for  DimensionlessQuantity
The semantics of operations need to be worked out , which depends partly on how it is used. Certainly a stream output function could be created quite easily, which might be sufficient initially

I strongly dislike Option 3 for the reasons already mentioned.
For the exact example given, I actually prefer Option 1 slightly above Option 2, because of the less verbose code. However, I would welcome the presence of scaled dimensionless quantities in the library, such as radians vs. degrees. Please forgive me if that is a long settled case, I'm just starting to use the library really. With those, I would like the result of decltype(1q_km / 1q_m) to be a scaled dimensionless quantity, so the compile-time pre-factor can be carried around a little longer (even if implicit casting rules allow it to be folded into the runtime value under some circumstances). In any case, my opinion is purely from a library user perspective, and between 1 and 2 it is weak enough that implementation constraints may be a good reason to choose either.

Oh, it looks like a really hard problem =(
I work in petroleum industry and there is a bunch of dimensionless units there, often quite weird. For example, Gas Formation Volume Factor (rm3/sm3 in metric system and rb/stb in field system), Water Oil Ratio (sm3/sm3 in metric and stb/stb in field), Gas Liquid Ratio (sm3/sm3 in metric, but scf/stb in field) and many others. And on the one hand, they are supposed to have different unit types (at least in GUI), but on the other hand can be used together in some big complex formula...
https://www.sciencedirect.com/topics/engineering/standing-correlation
https://www.sciencedirect.com/topics/engineering/gas-formation-volume-factor
https://www.sciencedirect.com/topics/engineering/gas-liquid-ratio

I think it is entirely possible.
EDIT: I added as an example on another branch
https://github.com/kwikius/units/blob/kwikius_scalar_vector_multiply/example/quantity_ratio.cpp
see here for DimensionlessQuantity
The semantics of operations (if any) need to be worked out , which depends partly on how it is used.

I added a version of this UDT dimensionless type at the godbolt compiler for any that want to experiment with it:
https://godbolt.org/z/67PmMe

@kwikius It is an interesting case but unfortunately not C++ standard compliant. As of C++20 a quantity type cannot be used as NTTP. The fact it works in gcc is just a bug (or vendor-specific extension). C++20 requires all data remembers to be public in a Structural Type. I hope that this requirement will be removed in C++23.

@kwikius It is an interesting case but unfortunately not C++ standard compliant. As of C++20 a quantity type cannot be used as NTTP. The fact it works in gcc is just a bug (or vendor-specific extension). C++20 requires all data remembers to be public in a Structural Type. I hope that this requirement will be removed in C++23.

I don't follow. I havent used any NTTP's in the examples?

Please find below a use case where Option 1 adds quite a lot of boilerplate (template specialization and SFINAE) in application code.
I'm using your library in embedded software running inside test & measurement instrument. The instrument captures time series of raw data which is then processed to get various series of final data.
Raw data is always the same and can be represented as something like this (I provide greatly simplified examples here and after):
struct RawData
{
    quantity<physical::si::time<physical::si::second, double>> timestamp;
    std::size_t eventCount;
};

While resulting series can be e.g. frequency, period, time interval, but it also can be some unitless value, e.g. duty cycle (which is result of division of 2 quantity<physical::si::time<physical::si::second, double>>).
Somewhere in the code I have a generic template structure, which holds final data plus something more:
template<typename Value> // could have been template<units::Quantity Value> if we had Option 2
struct Data
{
    Value value; //note: Value can be quantity or double (in case of dimensionless value)
    SomeData someData;
};

I also have some generic template code for calculations and processing for RawData and Data. Also, Data.value is converted for the use with quantity-agnostic interfaces (e.g. plotting library).
It would all work great if all various resulting data had units. But as some of result types are unitless (e.g. duty cycle), I had to specialize many template functions working with struct Data or use SFINAE, because I can't have unitless quantity naturally as a result of math over non-unitless quantities. Just as an example, depending on if my Data.value is unitless or not, I have to use either std::pow or units::pow (and this is not only math function I have to use).
Although I understand that Option 2 requires lots of additional boilerplate on library side, but currently (when we have only Option 1) all this boilerplate code have to be added on application side in use cases like mine (which I think is something unkommon). In my view, one of the goal of template library is to make application code cleaner, so I would greatly appreciate if Option 2 is finally chosen as the way to go.

I don't follow. I havent used any NTTP's in the examples?

@kwikius You are right, my bad, sorry...

I use Boost.Units a lot, and they treat plane_angle as a seprate dimension, which is a pain for me. If you want to compute the apparent size of the Sun for example, you just divide its diameter by the distance to it. With boost, dividing two lengths gives me a dimensionless quantitiy that cannot be converted to radian or degree. You have to extract the value and create a new plane_angle quantity.

@CD3 How do you define "apparent size of the Sun"? Assuming that experimentally now have angle dimension support as a library (#99), should the "recipe" for this quantity use angle dimension explicitly? If yes, then you will get the angle quantity as a result by default.

But I also don't want dividing two lengths to give me a plane_angle because then it would be a pain to calculate percent differences.

Is it the same "recipe" as above? I assume no. In this case, you care about ratio so you should not include angle dimension here, right?

depending on if my Data.value is unitless or not, I have to use either std::pow or units::pow (and this is not only math function I have to use).

I think that this is a really important point in this discussion. I never thought about this from such a point of view. Thanks, @timofey-babitskiy!
If we are about to change the current behavior and start returning a dimensionless quantity we have to do it right.

I would like the result of decltype(1q_km / 1q_m) to be a scaled dimensionless quantity, so the compile-time pre-factor can be carried around a little longer (even if implicit casting rules allow it to be folded into the runtime value under some circumstances).

@burnpanck, we can think about providing such support.
Here is what I ended up taking the above requirements into account:
namespace units {

struct unitless : unit<unitless> {};
struct dimensionless : derived_dimension<dimensionless, unitless> {};

template<Scalar Rep = double>
using unitless_quantity = quantity<dimensionless, unitless, Rep>;

}

With it:
constexpr auto q1 = 10q_km / 5q_m;
static_assert(std::is_same_v<decltype(q1), const quantity<dimensionless, scaled_unit<ratio(1, 1, 3), unitless>, std::int64_t>>);
static_assert(q1.count() == 2);

constexpr unitless_quantity<> q2 = q1;
static_assert(q2.count() == 2000);

static_assert(quantity_cast<unitless>(q1).count() == 2000);

Is it the expected behavior? Even though it is consistent with all the library, isn't it a bit surprising that q1.count() == 2?
Notice that I do not plan to provide any implicit casts to double or other representation types in such a case. So if you would like to use the scalar result of the computation in some formula you would need to call .count() on it explicitly.
What do you think about it?
Let's vote with 👍 👎.

Google search 10km / 5m results in 2000: https://www.google.com/search?q=10km+%2F+5m.
Considering that the ratio of 10km * 5m is the GCD of the operands' ratios, I'd expect q1.count() to be 2000. (10q_km / 5q_km).count() should be 2.

Suggested solution is also consistent with std::chrono. Consider this example:
auto t = GetTimeout();

t.count() would be meaningless in this context. You need something like duration_cast<milliseconds>(t).count() or similar.
But given how often people would need to quantity_cast<unitless>(...).count(), it would be nice to have a shortcut. Can we have a different count() that would return a value of quantity in base units (meters, kilograms, ones, ...)?

On the question of (10q_km/5q_m).count(): This expression involves two operations; the division between two quantities of the same dimension but different scale, and the application of .count():

count is a low-level tool that explicitly gets you out of the safety of computation with checked units, so don't even try to interpret it's result value without knowing the underlying unit. If count would now start to do anything magic for dimensionless quantities, that would be inconsistent and make generic programming very hard. And as a low-level tool its use should be confined to library parts, which often are generic programming.
So the only question really is what unit the result of 10q_km/5q_m should have. Is the result 2000 (1) or is it 2 (1000)? The former essentially performs automatic conversion to base units, while the latter strictly separates operations on values and on units. I believe the latter is the only sensible answer. Otherwise, we become very sensitive to range issues, especially when operating on integer types. E.g. anytime an integer value of 10q_percent gets automatically converted to base dimensions, it rounds to zero. In fact, I think this has nothing to do with dimensionless quantities, but is a generic question about automatic conversion to base units (1q_mm has the same problem).

Given those considerations, I believe that (10q_km/5q_m).count() == 2 might be surprising, but we should deal with that by teaching users that .count() is a low-level tool that requires knowing what you are doing.
@i-ky suggests to offer a .count_in_base_units() that has less surprises. However, I think that still bears some of the risks, as you still need to know the base units that you end in. What I would prefer (and what I usually wrap any units library in that I use) is: .count_in<some_unit>() and potentially a dedicated special method for the case of dimensionless quantities .dimless_count(). Since I claim that you always need to know the unit of the quantity when you call .count, why not explicitly state it in the code? To improve convenience, it should probably do an automatic conversion between compatible units, e.g. using the implicit conversion rules.

If 10q_km / 5q_m is 2, then what's happening is esentially (10q_km).count() / (5q_km).count(), which disregards units completely. Their ratio really is 1:2000. IIRC, https://github.com/nholthaus/units does it right.

Can we have a different count() that would return a value of quantity in base units (meters, kilograms, ones, ...)?

I think it is a good idea. Give me a good name and I will add it 😉

An alternative way to deal with working with builtin and quantity generically is to specify at a concept which both quantity and std::arithmetic must conform to. Since the aim is quantity compatibility :
template <typename T>
concept quantity_like = requires ( T t) {
   count(t)  ;
   pow<2>(t); // how to say pow<N> here ?
};

If 10q_km / 5q_m is 2, then what's happening is essentially (10q_km).count() / (5q_km).count(), which disregards units completely.

@johelegp, no, this is not what's happening. Library simply chooses to use thousands ("kilo-one", if you wish) as a unit. You missed ratio(1, 1, 3). The answer is 2 thousands, not just 2.

BTW I worked on a concept representing angle  here for compatibilty with S.I. idea of dimensionless radian and steradian:
https://github.com/kwikius/angle/blob/master/main.cpp
angle is a model of dimensionless_quantity concept but is not a number . Other model of dimensionless_quantity could be https://godbolt.org/z/67PmMe or the propsed quantity

In general terms what is being discussed here is choosing the semantic of a particular operation on quantities
In my latest version of PQS I opted to work in terms of concepts rather than types and to make operations customisable so the user can choose their preferred semantic rather than be limited to one provided for them.
In PQS, the quantity concept provides a get_measurement_system type function which is interrogated in an operation to choose the semantic, so the mechanism of customising the semantic is via the measurement_system that the quantity belongs to.
In case of division for example , the default divison operator function calls a static method of a structure  which can easily be customised.
For division of 2 quantities  there are 2 structures
dimensioned_out_semantic  for a dimensioned result
dimensionless_out_semantic  for a dimenionless result
I used the mechanism to implement the semantic I describe here for mpusz_units for the SI measurement system, while making the default same as mpusz units
Here is the customised version of dimensioned_out_semantic
The same mechanism can be used ( by customising dimnsionless_out_semantic to return a quantity<dimnsionless> or indeed a numeric type for a particular user measurement system while leaving most functionality in that system to use the provided default.
Incidentally the mechanism can also be used to remove the operator from the considered operator overloads by  customising provide_operator_divides<Q,Q> to false for those particular types where a type e.g chrono duration already provides the operation.
The same approach could be implemented in mpusz_units if the concepts were specified more tightly.
What's not to like:-)

@mpusz The example I gave was to illustrate that sometimes the result of dividing two quantities with the same dimensions is an angle, and some times it is not. For the apparent size of the Sun, dividing 865,370 mi (the diameter of the Sun) by 94,102,000 mi (the distance to the Sun) is 0.009 radian, or about 0.5 degree (the apparent size of the Sun). On the other hand, dividing the diameter of the Sun by the diameter of Earth is a ratio, and should not be interpreted as an angle.
So my preferences it to not treat angle special, but still represent dimensionless quantities as quantities, not plain doubles. I echo @burnpanck sentiment, calling .count() on a quantity removes all safety guarantees provided by the library and the user should have no expectations on the returned value. They should only call .count() after doing an explicit conversion. I think function template that takes a unit as a parameter and performs the conversion would be very useful. Perhaps .count() should require the user to specify a unit so that they are less likely to miss-use it.
There is a great units library in Python named Pint that I use almost everyday when school is in session. In their library, angles are not special. "radian" is simply a unit for dimensionless quantities. It can be converted to "degree" and "dimensionless". It can even be converted to km/m.

I wonder if a quantity_ratio type might be a good idea. Give this a count() that would perform division on numer and denom. But you get to keep the two quantities even if they have the same dimensions. I was thinking this would be useful for decibels. Typically, there are 'units'even though the argument of the log needs to be dimensionless. You need to recover the units so you don't create gibberish.
pseudo-code:
power has units of power. 1_mW is a literal
auto dB_mW = 10 log10(power/1_mW);
But then we could potentially prevent
dB_mW + dB_X where X has some other dimension.

If 10q_km / 5q_m is 2, then what's happening is essentially (10q_km).count() / (5q_km).count(), which disregards units completely.

@johelegp, no, this is not what's happening. Library simply chooses to use thousands ("kilo-one", if you wish) as a unit. You missed ratio(1, 1, 3). The answer is 2 thousands, not just 2.

You're right. I need to get myself more familiar with ratio's Exp. That said, why does it choose kilo and not 1? Note that I had a typo in the second code span, but the units of the operands are different. The first is kilometers, the second one meters. Their common quantity is meters, so I'd similarly expect the common quantity of dimensionless unit to be 1, such that dimensionless 10q_k / 5q_ is 2000q_.

There is a great units library in Python named Pint that I use almost everyday when school is in session. In their library, angles are not special. "radian" is simply a unit for dimensionless quantities. It can be converted to "degree" and "dimensionless". It can even be converted to km/m.

@CD3, this is really interesting. I will look into it. Thanks!

The first is kilometers, the second one meters. Their common quantity is meters, so I'd similarly expect the common quantity of dimensionless unit to be 1, such that dimensionless 10q_k / 5q_ is 2000q_.

@johelegp, scaling to the "common quantity" is used only in + and - operations to not lose precision. On the other hand for * or / we store the final ratio. 1q_km / 1q_s == 1q_km_per_s, right? We shouldn't change the exponents/prefixes of those operations if we are still in a quantity world. Otherwise, we can leave the status quo and just return double that will always be flat with no exponent attached.

Oh, right! That makes sense, thank you. I'm changing to a thumbs up.

Radian, degree, and percent are all commonly used units for dimensionless quantites, and if I want to be able to convert between them, they must be strong types. In that sense, it does provide a safer interface because I can do something like

auto l1 = units::quantity<units::millimetre, double>{100};
auto l2 = units::quantity<units::metre, double>{2};
auto ratio = l1/l2;    // this is 50 mm/m, which is a strange, but valid dimensionslless unit.
auto perc = quantity_castunits::percent,double(ratio);  // value is 5
auto rad = quantity_castunits::percent,double(ratio); // value is 0.05
auto deg = quantity_castunits::degree,double(ratio); // value is 2.86

@CD3, it turns out that degree is really tricky as we have to put pi into the ratio which is really suboptimal. It should be precise, but if we do so it will restrict us from raising it to some power (i.e. square will overflow ratio). See more here:

I understand that you con't want to implement all of the math functions, but you wouldn't have to rewrite them, just provide thin wrappers that convert the argument to radian, call the standard library versions with the value, and return the result in radian.

@CD3, well it is not that thin and easy when you consider that the quantity stores exponent separately from the value. Can you help me with maths here? For example, what is the best way to implement exp?

@mpusz I don't see a link. Are you saying that to support converting between radian and degree there would need to be a conversion ratio defined that contained pi, which has too many digits? I'm sorry, I don't know how conversions are implemented here, but that seems like a conversion that will have to be provided as it is very common. If I understand you correctly, then the same issue would arise any time a user wanted to convert between two systems where the conversion factor has many significant figures (pound to kilogram for example).
As a first cut at the math functions, I would use .count(). Here is an example I was able to add to the end of test/unit_test/runtime/math_test.cpp. It's obviously silly, but the same thing could be done with dim_dimensionless and radian.
namespace test {
template<UnitOf<dim_length> U, Scalar R>
quantity<dim_length,U,R> exp( const quantity<dim_length,U,R>& L )
{
  return quantity_cast<U>( quantity<dim_length,metre,R>( std::exp( quantity_cast<metre>( L ).count() ) ) );
}
}
TEST_CASE("exponential functions on dimensionless quantity return dimensionless quantity of the same unit", "[math][exp]")
{
  auto l1 = 5.q_m;
  auto l2 = 5.q_mm;

  auto el1 = test::exp(l1);
  auto el2 = test::exp(l2);

  std::cout << el1 << "\n";
  std::cout << el2 << "\n";
}

Output:
148.413 m
1005.01 mm

You could convert to radian, then extract the raw value, pass that to the standard library function, wrap the result in a radian quantity, convert back to the input unit, and return. You could also just return the result in radian and let the caller to the final conversion if they wanted to. This would at least give working implementations for all of the transcendental functions which could then be optimized if needed.

If I understand you correctly, then the same issue would arise any time a user wanted to convert between two systems where the conversion factor has many significant figures (pound to kilogram for example).

@CD3, unfortunately, yes, that is right. It was discussed a lot on this forum (#60, #55, #67, #71) but unfortunately, we couldn't find a better solution for now.
Thanks for a proposal of solving the problem of exp. It is a workaround until someone smart will help me do it in a more efficient and correct way (it can lose a lot of precision if someone works on really small or big values).

@mpusz I see. I know I have heard you say that precision is one of the top priorities and given as an example a library that converts everything to SI base units during conversions which is not good if you converting from femtometer to picometer for example. I am not an expert on floating point, so there are many such issues that I am simply not aware of.

Actually femtometer to picometer is not an issue at all because it is only a matter of changing the exponent (which is true for most of SI units). The problem comes with rations that have some strange numerator and denominator that do not divide/normalize. If you square or cube them you get problems of overflowing std::int64_t.
On the other hand we could try to use floating point NTTPs but if during dimensional analysis we end up with 2 floating point ratio values which differ only by one ULP we will end up with 2 different unit types rather than the same one :-(

A new design is described here:

https://mpusz.github.io/units/framework/quantities.html#dimensionless-quantities
https://mpusz.github.io/units/framework/conversions_and_casting.html#implicit-conversions-of-dimensionless-quantities

It works nice and even though I said there will be no implicit conversions I added a bit of those.
Please let me know if you like the new design and what could be improved.
Also, I really do not like the name unitless for the unit. If you have better ideas please let me know.

If there will be a discussion or new important design points here I will reopen this issue and we will continue until it is properly done 😉

@mpusz Great work, thank you! I'm with you on unitless, but I think it might actually be the correct term.Pint uses "dimensionless" for the unit, but that is mixing dimensions with units. Perhaps "pure_number"?

I think I remember nholthaus/units using dimensionless_unit.

Also, I really do not like the name unitless for the unit.

The first paragraph of Wikipedia article on dimensionless quantities gives a number of alternatives (bare, pure, ...) and also points out that SI unit for quantities of dimension one is one. There is also a mention of uno, but this idea didn't get traction.
I quite like one, it will look nicely in a potential family of dimensionless units (thousand, million, permille, part_per_million, ...).

Thanks @i-ky, I like your reasoning behind one. So we will have dim_one and one. I think this is fair as we already have a unit percent.


Apt key exists check

see JIRA issue https://tickets.puppetlabs.com/browse/MODULES-1862
currently the apt_key provider assumes a resource exists if it is going to be installed, as the create method does the right thing.
With this change the exists call additionally checks, if a key with the requested id is already installed. This makes the resource more declarative, since it does not try to install it in all cases.
We encountered this issue to support local-running puppet on an offline machine with a source parameter on apt_key. This always attempted to download the source and failed subsequently.

a comment to the failing tests:
The tests which check for invalid properties fail, because the tests are not isolated and the same key is always used. This key is existing even with invalid properties, so the invalid properties do not trigger an error as an existing key does not fail anymore, whereas in the old way it would fail due to errors re-importing it.
2 tests also fail without the change for me:

apt_key server => pgp.mit.edu works
apt_key server => hkp://pgp.mit.edu:80 works

I'm afraid that regardless of the tests failure we can't accept this as it is targeted against 1.7.x. The latest release is on 1.8.x but you should probably target this against 2.0.x which will hopefully be released this week.

@squiddle yes, you should definitely target this against 2.0.x. Thanks for your contribution!


Extension removes some Angular imports

It removes Inject and MAT_DIALOG_DATA that goes into constructor
import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
  template: '',
  styles: ['']
})
export class SomeComponent {
  constructor(
    @Inject(MAT_DIALOG_DATA)
    public dialogData
  ) { }
}

It's also happening to me

Yes I noticed too when imports are in the constructor, such as @Inject or forwardRef, imports are not recognized and removed for some reason. Happens to me as well. Hope it can be solved soon
public constructor(
private notificationRequestService: NotificationRequestService,
@Inject(forwardRef(() => TestRunService))
)

It happens to me too.
I'm using the tsyringe module, and despite using @inject() in the constructor parameter, the imported module is automatically deleted the moment I save.
I look forward to seeing this issue resolved.

This is what happens with all these:

Inject
Host
SkipSelf
Optional
Self

I don't think the list is complete though.

:tada: This issue has been resolved in version 1.2.4 :tada:
The release is available on:

Visual Studio Marketplace
GitHub release

Your semantic-release bot :package::rocket:


Fix empty predicate error message

require 'bundler/setup'
require 'dry-validation'

UserSchema = Dry::Validation.Schema do
  key(:sample) { empty? }
end

result = UserSchema.({
  sample: [23]
})

unless result.success?
  puts result.messages
end

# :sample=>["cannot be empty"]}

That reads bad: "Sample cannot be empty", but it should be "Sample must be empty".

thanks Luca, you made it just in time for 0.7.3 :laughing:


Consider relaxing peerDependency version

I'm in the process of upgrading all sentry packages in our application to:
    "@sentry/capacitor": "^0.11.1",
    "@sentry/node": "^7.36.0",
    "@sentry/react": "^7.36.0",
    "@sentry/tracing": "^7.36.0",

However I'm getting this error on npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/@sentry/react
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR! node_modules/@sentry/capacitor
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!
npm ERR! Conflicting peer dependency<EMAIL_ADDRESS>npm ERR! node_modules/@sentry/react
npm ERR!   peerOptional<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR!   node_modules/@sentry/capacitor
npm ERR<EMAIL_ADDRESS>from the root project

This is because there is a strict peerDependency on @sentry/react to version 7.31.1
Is it possible to specify a range instead?

Hi
could you please also exclude "@sentry/electron" from the sibling-check, because it does not have the same versions as the core sentry packages.
I had to disable the sibling-check in our Nx-Monorepo because the install would fail otherwise.

Thanks for the update @cgrabmann, This will be fixed soon :D
About the sibling, I am aware it's not ideal, but I'll double check the reasons why it should be used that way.

Hi @kenny-f, due to the complexity of the SDKs we'll keep the peerDependency strict to avoid adding extra maintenance burden of using the SDK with different types of dependencies.
About the electron issue it should be fixed on the latest version.

Hi @kenny-f, due to the complexity of the SDKs we'll keep the peerDependency strict to avoid adding extra maintenance burden of using the SDK with different types of dependencies.
About the electron issue it should be fixed on the latest version.