Basic zoom functionality for the cutting view

Based off of the subtitle view. Implements a very basic zoom functionality, hoping that it's better than nothing. Includes:

A Slider to control the zoom level
A horizontal scrollbar to move the timeline
Drag n' Drop to move the timeline

Known issues:

The scrubber/playhead is cut off if placed either at 0 or at the maximum duration. I might have css'd myself into a corner here.

Possible future feature extensions:

Hotkeys
Centering the zoom on the scrubber/playhead while zooming in (difficult to do without jittering)
Configuration

Resolves #107.

@Arnei could you rebase and fix the conflicts? I'd like to test this.

Thank you @Arnei! :)

Works as described. I only have one small visual bug to report. The slider should probably live in its own div like the other controls around it. At the moment it almost overlaps the control to the left of it. See the screenshot for reference.

Works now (mostly). 🎉
I found some funny bugs, though:

WHEN I scroll/move the timeline,
THEN the scrubber does not move together with it.
WHEN I zoom the timeline
AND the scrubber moves out of the viewport
AND I scroll/move the timeline afterwards,
THEN the scrubber stays gone, even if it should be back in the viewport.
WHEN I zoom the timeline
AND I then scroll/move the timeline a bit so that the scrubber still remains in the viewport
AND then click on the timeline,
THEN the scrubber moves with a certain offset.

Looks better now!

Scrolling the timeline also moves the scrubber ✅
Zooming the timeline with the scrubber going off-screen does not make it disappear when scrolling it back into the viewport ✅
The scrubber gets placed correctly when zooming and then scrolling the timeline. ✅

Features nice to have:

Centering the zoom on the scrubber/play-head while zooming in
Scrolling the timeline with the mouse wheel while being zoomed in
Having hotkeys for zooming in/out and scrolling left/right while being zoomed in

Scrolling the timeline with the mouse wheel while being zoomed in

You can do this using Shift + mouse wheel (courtesy of the react-indiana-drag-scroll library, which I'm inclined to rely on, as properly implementing this is a pain). Not sure how to inform users about that though.

Centering the zoom on the scrubber/play-head while zooming in

I would skip this for now, seems to be more difficult to get to work properly than I anticipated.

Scrolling the timeline with the mouse wheel while being zoomed in

You can do this using Shift + mouse wheel (courtesy of the react-indiana-drag-scroll library, which I'm inclined to rely on, as properly implementing this is a pain). Not sure how to inform users about that though.

How about a pop over when hovering on the timeline?

Centering the zoom on the scrubber/play-head while zooming in

I would skip this for now, seems to be more difficult to get to work properly than I anticipated.

I think that's fair, but we should add an issue to not forget about that. It's a rather big UX annoyance / it's un-intuitive that it doesn't zoom centered on the scrubber.

Centering the zoom on the scrubber/play-head while zooming in

I would skip this for now, seems to be more difficult to get to work properly than I anticipated.

I think that's fair, but we should add an issue to not forget about that. It's a rather big UX annoyance / it's un-intuitive that it doesn't zoom centered on the scrubber.

Definitely. I'd add the an issue for that after this is merged, creating an issue for a feature that is not even merged yet feels weird.

Also, it would be nice if you could zoom using the scroll wheel. In that case, the zoom would focus on the cursor. This is only a nice to have feature, and I guess it could be confusing if you just accidentally touch the scroll whel and suddenly you're zoomed in. But maybe someone has a good idea on how to implement such a function.

But maybe someone has a good idea on how to implement such a function.

Maybe use Alt+Scroll, like we already do in Paella? (Which in turn is inspired by Google Maps, IIRC.) Try scrolling while hovering over the video here for example: https://tobira.opencast.org/v/Ijpj-vfg1TH
Would that be acceptable? 🤔

Currently, when using the zoom, you automatically zoom in on the beginning of the waveform. This is highly confusing, the zoom should focus on the current position of the postion marker, so you automatically zoom in to where you currently are in the video.

I strongly agree to focus on the current position of the playhead when zooming. The current behavior is particularly confusing when I zoom in or out again after having zoomed in and having moved the horizontal scrollbar (e.g. to the position of the playhead). I actually like the behavior of the old editor. There the zoomed-in section also gets moved when the playhead would run out of it. That would be nice to have also in the new editor, too.

I have fixed the zoom center problem in https://github.com/luniki/opencast-editor/commits/bugfix/zoom-center/
The zooming logic is like this:
If the scrubber is visible just before zooming, the timeline centers the scrubber while zooming.
If the scrubber is not visible just before zooming, the timeline zooms to the centers of the currently visible timeline.

Weiter oben wurde als Nice-to-have genannt, dass auch mit dem Mausrad gezoomt werden kann. Soll das auch noch ergänzt werden?

Applied lunikis patch.

I have fixed the zoom center problem in https://github.com/luniki/opencast-editor/commits/bugfix/zoom-center/

Looks good to me, works as you described.
But I've found a few small issues:

When I've zoomed in on the timeline and want to drag and drop a cut-marker, I can only move the cut-marker a few pixels. Then the whole timeline moves.
The zoom tooltip is missing.
I'd prefer a larger zoom range. We sometimes have recordings for special events that are up to 4h long.

Already told this luniki in private chat, but for posterities sake: When changing the zoom level, the playhead jumps (jitters?) back and forth. This seems to be a purely visual issue:
Bildschirmaufzeichnung vom 2024-05-17, 14-09-59.webm

Thanks for your comments.

* When I've zoomed in on the timeline and want to drag and drop a cut-marker, I can only move the cut-marker a few pixels. Then the whole timeline moves.

This is quite difficult! It almost works in Firefox, but it's so slow in Chromium. The problem is the constant updating of the currentlyAt position while dragging, which updates the currently dragged elements. Removing the onControlledDrag handler makes it usable again, but we lose the UI feedback of the changed scrubber position.
I have debounced the onControlledDrag handler, which delays calling the handler until 200 milliseconds have passed since the last time the handler was called.
IMHO this is a good compromise:
0002-Debounce-drag-handler-of-the-scrubber.patch.txt

* The zoom tooltip is missing.

I have added the tooltip:
0001-Add-zoom-tooltip.patch.txt

* I'd prefer a larger zoom range. We sometimes have recordings for special events that are up to 4h long.

What is the maximum zoom factor we should support?

I have fixed the zoom center problem in https://github.com/luniki/opencast-editor/commits/bugfix/zoom-center/
The zooming logic is like this:
If the scrubber is visible just before zooming, the timeline centers the scrubber while zooming. If the scrubber is not visible just before zooming, the timeline zooms to the centers of the currently visible timeline.

There is a bug in computing the zoom center. This patch fixes it:
0003-Fix-fast-zooming-bug.patch.txt

Already told this luniki in private chat, but for posterities sake: When changing the zoom level, the playhead jumps (jitters?) back and forth. This seems to be a purely visual issue:
Bildschirmaufzeichnung.vom.2024-05-17.14-09-59.webm

The jumping of the scrubber is a result of the asynchronous update of:

scrollLeft of the ScrollContainer
width of the div that contains the Waveforms
controlledPosition of the Scrubber

When we zoom in, the scrollLeft updates before the width and the controlledPosition.
I do not have a clue on how to synchronize all of this.

What is the maximum zoom factor we should support?

I'd prefer not to have a fixed zoom factor, but to always have the same time span, e.g. 20 sec., in the view when the zoom is at maximum (regardless of the video duration). Zoom slider on far left: full waveform in view, zoom slider on far right: always 20 sec in view.
It would also be nice if the slider was wider to give more precise control over the zoom level.

If you set the maximum zoom factor in this way, the width of the browser will play a role. Which lead me to an interesting bug in the current implementation: If you change the window width, the timeline shifts in an unexpected way.

It would also be nice if the slider was wider to give more precise control over the zoom level.
Fixed:
0004-Increase-the-width-of-the-zoom-slider.patch.txt

Already told this luniki in private chat, but for posterities sake: When changing the zoom level, the playhead jumps (jitters?) back and forth. This seems to be a purely visual issue:
Bildschirmaufzeichnung.vom.2024-05-17.14-09-59.webm

The jumping of the scrubber is a result of the asynchronous update of:
1. `scrollLeft` of the `ScrollContainer`

2. `width` of the `div` that contains the `Waveforms`

3. `controlledPosition` of the `Scrubber`

When we zoom in, the scrollLeft updates before the width and the controlledPosition.
I do not have a clue on how to synchronize all of this.

I will try to position the scrubber by using a percentage instead of a changing px value.

Nope, this does not work. The only way I can imagine removing the flickering of the scrubber is separating the elements of the scrollable waveform and the scrubber. The scrubber would have to be positioned separately in a different element.

If you set the maximum zoom factor in this way, the width of the browser will play a role. Which lead me to an interesting bug in the current implementation: If you change the window width, the timeline shifts in an unexpected way.

@luniki is this a new bug that we already have now or will this bug be added by changing the way we set the max zoom factor? And what do you mean by "shifts in an unexpected way"?

I have tested the latest changes. Here are the results of my tests for the various open issues:

[ ] Drag and drop of cut marker when zoomed in
Does still not work for me.

[ ] Always 20 sec of waveform in view when max. zoom
Still 10x max zoom factor.

[x] Increased width of zoom slider
implemented

[ ] jumping of the scrubber when zooming
still the same behavior

[x] Zoom slider tooltip
implemented

Late to the game with a question: Do the shortcuts work for you? Both me and my colleague failed to activate them.

Late to the game with a question: Do the shortcuts work for you? Both me and my colleague failed to activate them.

The shortcuts for zooming in and out (Shift + Option + z/t or "+"/"-") don't work for me either. However, if I first activate the zoom slider by clicking on it, I can use the "left"/"right" keys to change the zoom level.

I've tested Shift + Alt/Option + z/t with the latest Chrome, Firefox and Safari, and it worked in all three.  +/- did not work in Safari, but is also not expected to work in every browser, which is the reason for the alternative shortcut.
Any further information like Browser version, System or detailed description/video of what you are doing would be appreciated.

My observations for Windows 11 with Firefox and Chrome:

SHIFT+ALT+z seems to work "once", but if you interact with UI afterwards, the hotkey doesn't work anymore.
SHIFT+ALT+t seems to trigger a screen recording here, but maybe that's my Lenovo or the Snipping tool interfering.
Also, I find the syntax of the hotkey description confusing, what do the additional + and - stand for?

Any further information like Browser version, System or detailed description/video of what you are doing would be appreciated.

I tested it on a MacBook Pro (Sonoma 14.5) and Shift + Option + z/t or "+"/"-" didn't work at all in Firefox, Safari, Chrome and Opera Browsers ().

Oh, so that's an alternative to z/t? They don't work at all at my end.

I have tested the latest changes. Here are the results of my tests for the various open issues:
* [ ]  **Drag and drop of cut marker when zoomed in**
  Does still not work for me.

* [ ]  **Always 20 sec of waveform in view when max. zoom**
  Still 10x max zoom factor.

* [x]  **Increased width of zoom slider**
  implemented

* [ ]  **jumping of the scrubber when zooming**
  still the same behavior

* [x]  **Zoom slider tooltip**
  implemented

I have fixed the drag and drop of the cut marks and changed the timeline zoom maximum depending on the video length in these patches:
0002-Enable-drag-and-drop-of-cut-markers-when-zoomed-in.patch.txt
0001-Compute-maximum-zoom-factor-depending-on-the-length-.patch.txt
I cannot find a solution for the jumping of the scrubber. I would like to work on a proof of concept for using another library specialized in this. For a first version I would estimate about 2-3h to get an idea on how (and if) this could work.

[x]  Drag and drop of cut marker when zoomed in
Does still not work for me.
[x]  Always 20 sec of waveform in view when max. zoom
Still 10x max zoom factor.
[x]  Increased width of zoom slider
implemented
[ ]  jumping of the scrubber when zooming
still the same behavior
[x]  Zoom slider tooltip
implemented

Also regarding the hotkey issue. Is it only the zoom hotkeys that are not working, or are you having this problem with other hotkeys as well? If it is the latter, I suggest we discuss it in a separate issue.

As already elaborated, fixing "jumping of the scrubber when zooming" will require a lot more work and as such we should consider if want to merge this even with this bug present.

We can live with this behaviour for now. I would suggest that we open a separate issue for this cosmetic problem.

Also if you try to test "Always 20 sec of waveform in view when max. zoom" with the default "Dual Stream Demo" video, you will notice that the max zoom will not be at 20 seconds. That is because the video is relatively short with only about a minute of playtime, for which 20 seconds don't really make sense. For longer videos "Always 20 sec of waveform in view when max. zoom" will work.

I agree with you, it makes sense and is fine for us.

Also regarding the hotkey issue. Is it only the zoom hotkeys that are not working, or are you having this problem with other hotkeys as well? If it is the latter, I suggest we discuss it in a separate issue.

Some of the shortcuts for the timeline don't work for me either (Shift + Option + i, Shift + Option + k, Up, Down). So, I'll create a separate issue for that.


feat(@angular/cli): add flags to the process title

Closes #8772
Fixes #6888
Special thanks to @tomastrajan for original PR.

@hansl ah great! Looking forward to seeing it live in CLI! Thanks and have a great day!


Refactor arrays

The arrays package has two interfaces that can really be simplified to one
It is also missing a custom to string method for both static and dynamic array.
This needs to be fixed ASAP since it can be used as an underlying data structure for some of the new data structure
in the future.

After reviewing both interfaces can be kept but a to string is needed for both dynamic and static arrays.


fix wrong field type for a TEXT column

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.huaqing seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Add restock_level field to Inventory Entries

As a Inventory Manager
I need a restock_level field for Inventory Entries
So that I can keep track of the quantity below which an Inventory Item need to be restocked
Details and Assumptions

We will store the inventory details in a database

Acceptance Criteria
Given the service is running and an Inventory Entry is created properly in the database
When I access an Inventory Entry
Then there exists a `restock_level` field indicating the quantity below which that item need to be restocked

Note: this issue is closed because restock_level has been added to the db schema of an inventory entry.


No function names in cpu profiling output, OSX

I'm having the exact same problem in #589 & #899 .
My program is built with the flags below
clang++
"-std=c++17",
"-g",
"-O2",
"...includes...",
"...cpp files...",
"-o",
"~/cpp/hmiss/hmiss",
"/usr/local/Cellar/gperftools/2.7/lib/libprofiler.dylib",

I'm enabling and running CPU profiling with the following line,
DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib CPUPROFILE=hmiss.prof ./hmiss
After running the profiling I run pprof and get the following output.
s979258ca% pprof --text ./hmiss hmiss.prof
Using local file ./hmiss.
Using local file hmiss.prof.
Total: 444 samples
     154  34.7%  34.7%      154  34.7% 0x0000000105c4ad65
      49  11.0%  45.7%       49  11.0% 0x0000000105c6708a
      40   9.0%  54.7%       40   9.0% 0x0000000105c4a385
      37   8.3%  63.1%       37   8.3% 0x0000000105c4a391
      30   6.8%  69.8%       30   6.8% 0x0000000105c4a37a
      10   2.3%  72.1%       10   2.3% 0x00007fff63f409da
      ...
       0   0.0% 100.0%        2   0.5% _NC3__enddef
       0   0.0% 100.0%        2   0.5% _NC3_inq_var_fill
       0   0.0% 100.0%      366  82.4% __mh_execute_header
       0   0.0% 100.0%        2   0.5% _ex__leavedef
       0   0.0% 100.0%        2   0.5% _ex_put_block
       0   0.0% 100.0%        2   0.5% _ex_put_block_param
       0   0.0% 100.0%        2   0.5% _ex_put_block_params
       0   0.0% 100.0%        2   0.5% _nc_enddef
       0   0.0% 100.0%        2   0.5% _ncio_move
       0   0.0% 100.0%        2   0.5% _posixio_open

Weirdly, I'm getting function names for linked libraries, just not my program.
I've seen people include the -lprofiler flag in the build process, but it doesn't change anything for me.
Is there something else I need to do here to get the function names in the profiling data?
Thanks for any help,
Max

I got the same problem. Can anyone give some help? Thanks.

Please try using golang pprof tool. More more feature-ful and is actually supported. Then report whatever issues you find there. gperftools-bundled (perl-based) pprof is dead horse basically.


Enable CI for unit tests in test plugin.

I needed to change the annotations on the test classes to a newer style (which is used by current Xtext DSL examples), otherwise the tycho-surefire-plugin does not find them. Another insight was is that these tests are part of Maven's integration-test phase, and won't be run with test only.

@atomcrafty FYI


Can we support more units in SVG ?

I parse a svg file, but I get error: SVG parsing error. Unit ex not supported. Can we support more units?

Hi, @wjling, unfortunately, we don't support ex for now, but extending SVG parser - it is a high priority task for Macaw team, we will try to cover all possible units. You always can help us by sending PR, thanks.

Ok, I see. Thank you for your excellent work


Bug 2034484: feat: library-go bump

Bumping the library-go dependency to latest, this should take advantage of leader election changes for SNO clusters proposed in this library-go PR and performance improvements in this PR.
Changes:

updated library-go to latest
updated build images to go 1.17

Signed-off-by: ehila<EMAIL_ADDRESS>

/assign @mfojtik

/retest-required

/retitle Bug 2034484: feat: library-go bump
This PR bumps to latest library-go to utilize changes for performance gains on SNO DU clusters

/approve
/lgtm


Enablement of recent version of HIP-VS plugin in vcxproj files:

Enablement of recent version of HIP-VS plugin in vcxproj files
The current version of the HIP-VS extension introduce support of the nvcc compiler.
The formerly called "HIP toolchain" is then renamed as "HIP_clang" and the "HIP_nvcc" toolchain  has been introduced.
All 48 vcxproj files are updated accordingly:

Applications/floyd_warshall/floyd_warshall_vs2019.vcxproj
HIP-Basic/assembly_to_executable/assembly_to_executable_vs2019.vcxproj
HIP-Basic/bandwidth/bandwidth_vs2019.vcxproj
HIP-Basic/bit_extract/bit_extract_vs2019.vcxproj
HIP-Basic/cooperative_groups/cooperative_groups_vs2019.vcxproj
HIP-Basic/device_globals/device_globals_vs2019.vcxproj
HIP-Basic/device_query/device_query_vs2019.vcxproj
HIP-Basic/dynamic_shared/dynamic_shared_vs2019.vcxproj
HIP-Basic/events/events_vs2019.vcxproj
HIP-Basic/gpu_arch/gpu_arch_vs2019.vcxproj
HIP-Basic/inline_assembly/inline_assembly_vs2019.vcxproj
HIP-Basic/llvm_ir_to_executable/llvm_ir_to_executable_vs2019.vcxproj
HIP-Basic/matrix_multiplication/matrix_multiplication_vs2019.vcxproj
HIP-Basic/module_api/module_api_vs2019.vcxproj
HIP-Basic/moving_average/moving_average_vs2019.vcxproj
HIP-Basic/multi_gpu_data_transfer/multi_gpu_data_transfer_vs2019.vcxproj
HIP-Basic/occupancy/occupancy_vs2019.vcxproj
HIP-Basic/opengl_interop/opengl_interop_vs2019.vcxproj
HIP-Basic/runtime_compilation/runtime_compilation_vs2019.vcxproj
HIP-Basic/saxpy/saxpy_vs2019.vcxproj
HIP-Basic/shared_memory/shared_memory_vs2019.vcxproj
HIP-Basic/static_host_library/library/libhip_static_host_vs2019.vcxproj
HIP-Basic/static_host_library/static_host_library_vs2019.vcxproj
HIP-Basic/streams/streams_vs2019.vcxproj
HIP-Basic/texture_management/texture_management_vs2019.vcxproj
HIP-Basic/vulkan_interop/vulkan_interop_vs2019.vcxproj
HIP-Basic/warp_shuffle/warp_shuffle_vs2019.vcxproj
Libraries/hipCUB/device_radix_sort/device_radix_sort_vs2019.vcxproj
Libraries/hipCUB/device_sum/device_sum_vs2019.vcxproj
Libraries/rocBLAS/level_1/axpy/axpy_vs2019.vcxproj
Libraries/rocBLAS/level_1/dot/dot_vs2019.vcxproj
Libraries/rocBLAS/level_1/nrm2/nrm2_vs2019.vcxproj
Libraries/rocBLAS/level_1/scal/scal_vs2019.vcxproj
Libraries/rocBLAS/level_1/swap/swap_vs2019.vcxproj
Libraries/rocBLAS/level_2/gemv/gemv_vs2019.vcxproj
Libraries/rocBLAS/level_2/her/her_vs2019.vcxproj
Libraries/rocBLAS/level_3/gemm/gemm_vs2019.vcxproj
Libraries/rocBLAS/level_3/gemm_strided_batched/gemm_strided_batched_vs2019.vcxproj
Libraries/rocPRIM/block_sum/block_sum_vs2019.vcxproj
Libraries/rocPRIM/device_sum/device_sum_vs2019.vcxproj
Libraries/rocRAND/simple_distributions_cpp/simple_distributions_cpp_vs2019.vcxproj
Libraries/rocThrust/device_ptr/device_ptr_vs2019.vcxproj
Libraries/rocThrust/norm/norm_vs2019.vcxproj
Libraries/rocThrust/reduce_sum/reduce_sum_vs2019.vcxproj
Libraries/rocThrust/remove_points/remove_points_vs2019.vcxproj
Libraries/rocThrust/saxpy/saxpy_vs2019.vcxproj
Libraries/rocThrust/vectors/vectors_vs2019.vcxproj

I still the think the toolchains should be called HIP_COMPILER_CLANG and HIP_COMPILER_NVCC. That way it corresponds to the Linux definitions. In Linux, we use HIP_COMPILER to distinguish this functionality.

@Snektron Why did you close this?

@saadrahim excuses. I used the github web UI to merge this MR: https://github.com/amd/rocm-examples/pull/18, and after that i deleted its associated branch. Somehow, that also deleted this branch...

Hello Colleagues,
Are we going to merge the above vcxproj changes finally or are we going to continue discussing the naming?
Without those changes, nothing won't work in VS.
Btw, why VS 2022 is not supported in rocm-examples?
Regards,
Evgeny


Multi-column layout doesn't keep columns from breaking when first column is longer?

See https://hsmusic.wiki/preview-en/list/artists/by-contribs/ - the two column divs are kept on totally separate visual columns in release but not preview, even though the CSS and layout structure haven't changed at all. The only difference is that in preview there are more track contributors than art/flash contributors (and when I delete a bunch of the <li>s in the first column it goes back to working as expected).

This appears to no longer be an issue (can't repro in latest Safari, Firefox, or Chromium).


Create Playwright crawler based on Browser crawler

The new playwright crawler should extend Browser Crawler. It should be only a matter of passing a different plugin to the Browser pool.

Added in v1.0.0

Added in v1.0.0


Handle update check error when without internet connection

I was coding while on a plane and hit this error.  I temporarily worked around it by editing the last_check times, but it looks like this should fix it.
amp@AMP-MBP-home:~/Dropbox/Arduino/ObjectLights/platformio/SoundUnit [master]$ platformio run
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/platformio-0.11.0_dev-py2.7.egg/platformio/main.py", line 53, in main
cli(None)
File "/Library/Python/2.7/site-packages/click/core.py", line 610, in call
return self.main(*args, **kwargs)
File "/Library/Python/2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click/core.py", line 933, in invoke
Command.invoke(self, ctx)
File "/Library/Python/2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Python/2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/Library/Python/2.7/site-packages/platformio-0.11.0_dev-py2.7.egg/platformio/main.py", line 42, in cli
maintenance.on_platformio_start(ctx)
File "/Library/Python/2.7/site-packages/platformio-0.11.0_dev-py2.7.egg/platformio/maintenance.py", line 26, in on_platformio_start
check_platformio_upgrade()
File "/Library/Python/2.7/site-packages/platformio-0.11.0_dev-py2.7.egg/platformio/maintenance.py", line 138, in check_platformio_upgrade
latest_version = get_latest_version()
File "/Library/Python/2.7/site-packages/platformio-0.11.0_dev-py2.7.egg/platformio/commands/upgrade.py", line 43, in get_latest_version
"https://pypi.python.org/pypi/platformio/json").json()
File "/Library/Python/2.7/site-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/api.py", line 49, in request
response = session.request(method=method, url=url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Library/Python/2.7/site-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', gaierror(8, 'nodename nor servname provided, or not known'))

@aphelps Thanks a lot! :+1: I've just improved PlatformIO upgrading logic.


az ad user has no update functionality

ad az user has no update functionality at the moment. I envision adding the following:
az ad user update --upn-or-object-id<EMAIL_ADDRESS>
The following parameters would be supported (same as for az ad update):
--display-name
--immutable-id
--password
--force-change-password-next-login

Addition of other parameters in the User entity would be a separate issue.

Cleaning u old issues, reopen if this is still active.


qbit doesn't support service created by guice with method interceptor module.

I have warning in my log.
ServiceBuilder: QBit does not support method overloading methods in Service Queues problem name check is overloaded [CGLIB$findMethodProxy, longPollingBuilder,  CGLIB$check$5, react, handleRuntimeException, CGLIB$SET_THREAD_CALLBACKS, check, CGLIB$SET_STATIC_CALLBACKS] from class com.stedify.core.util.test.ThrowHandlerEndpoint$$EnhancerByGuice$$40f5be55

should be fine. annoying warning but the generated guice methods should not hurt QBit.

I investigated this problem.
I had error "Unable to find body" in  StandardRequestTransformer. Seems somewhere thinks that request should pass json or post param but I call http get method with request params.
@RequestMapping("/changeState")
public void changeState(
final Callback callback,
@RequestParam("id") final String pubId,
@RequestParam("state") final String state
) {
I found that MethodAccess class return same name for CGLIB$changeState$5 and changeState method and  in this code in ServiceMetaBuilder.
requestMetaBuilder.addParameters(rootPath, servicePath, path, methodAccess)
calculates request types  by CGLIB$changeState$5 but it doesn't have any  RequestParam annotations.

hmm.. not sure how it does that. Can you add sample code somewhere in github so I can take a look? If I can reproduce it, I can likely fix it.

I've created PR with broken test. If you delete @Auth annotation from UserEndpoint class then guice method interceptor module  will be  disable and GuiceTest passes.

I've added brute fix for it.... Maybe you like it.

you patch fixed this.. so can I close this now?


Fix Postprocessing for r163

Needed to bump the postprocessing version to keep up with the removal of deprecated encodings in Three.js. However, now we have a new problem:
postprocessing.js:274 Uncaught TypeError: Cannot read properties of undefined (reading 'Camera')

At this example: https://modelviewer.dev/examples/postprocessing/index.html#custom-effects
@Beilinson would you mind taking a look? I'm guessing this is related to your comment, which might not be true anymore:

// The camera is set automatically when added to the <effect-composer>

Sure, I'll look into it

seems at some point three.js stopped putting a global window.THREE variable, which postprocessing still expects when imported using a non-esm build. solutions:

import from<EMAIL_ADDRESS>instead (which is esm built so it runs import ... from "three" as expected), however it isn't minified and is about 2x as large as postprocessing.min.js
set the global THREE variable manually before the postprocessing import:

import * as THREE from "three";
window.THREE = THREE;

however this seems to cause all sorts of other problems, mainly that the minified file doesn't seem to export anything anymore...

import from<EMAIL_ADDRESS>instead (which is esm built so it runs import ... from "three" as expected), however it isn't minified and is about 2x as large as postprocessing.min.js

This sounds good to me - I'm not concerned about the library size for the example, as someone using it for real would likely make their own bundle anyway. I'll update next week. Thanks!


Governance Proposal - Errors submitting proposals using max deadlines

Description
Seeing this issue similar to the previous min/max deadline bug but only seeing it on max deadlines.
Steps to reproduce

Go to update asset proposal form
Fill in with valid fields
Click 'Use Maximum' for both vote and enactment deadline
Click submit
PROPOSAL_ERROR_ENACT_TIME_TOO_LATE Error seen

Go to new asset proposal
Fill in with valid fields
Click on use maximum for all fields - Vote deadline, asset validation deadline and enactment deadline
proposal_submission.terms.validation_timestamp: cannot be after or equal to closing time
Change validation deadline to under the max
PROPOSAL_ERROR_ENACT_TIME_TOO_LATE Error seen

This appears to not be a frontend issue, these proposal types have the same enactment max deadlines and use the same deadline-deriving frontend methods as others that are working correctly. I'll raise this with core.


[AutoPR applicationinsights/resource-manager] migrate from apis in private repo to preview (new pricing model api and migration apis)

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/2618

(message created by the CI based on PR content)
Installation instruction
Package azure-mgmt-applicationinsights
You can install the package azure-mgmt-applicationinsights of this PR using the following command:
pip install "git+https://github.com/Azure/azure-sdk-for-python@restapi_auto_2618#egg=azure-mgmt-applicationinsights&subdirectory=azure-mgmt-applicationinsights"
You can build a wheel to distribute for test using the following command:
pip wheel --no-deps "git+https://github.com/Azure/azure-sdk-for-python@restapi_auto_2618#egg=azure-mgmt-applicationinsights&subdirectory=azure-mgmt-applicationinsights"
If you have a local clone of this repository, you can also do:

git checkout restapi_auto_2618
pip install -e ./azure-mgmt-applicationinsights

Or build a wheel file to distribute for testing:

git checkout restapi_auto_2618
pip wheel --no-deps ./azure-mgmt-applicationinsights

Direct download
Your files can be directly downloaded here:

azure-mgmt-applicationinsights-0.1.0.zip
azure_mgmt_applicationinsights-0.1.0-py2.py3-none-any.whl

Codecov Report

Merging #2218 into restapi_auto_applicationinsights/resource-manager will increase coverage by 2.24%.
The diff coverage is 23.52%.

@@                                  Coverage Diff                                  @@
##           restapi_auto_applicationinsights/resource-manager    #2218      +/-   ##
=====================================================================================
+ Coverage                                              50.71%   52.96%   +2.24%
=====================================================================================
  Files                                                   5595     4798     -797
  Lines                                                 143017   120243   -22774
=====================================================================================
- Hits                                                   72537    63685    -8852
+ Misses                                                 70480    56558   -13922

Impacted Files
Coverage Δ

...cationinsights/operations/components_operations.py
13.9% <23.52%> (+0.45%)
:arrow_up:

...ork/azure/mgmt/network/v2017_10_01/models/probe.py
33.33% <0%> (-8.78%)
:arrow_down:

...etwork/v2017_10_01/models/packet_capture_result.py
31.25% <0%> (-8.75%)
:arrow_down:

...etwork/v2017_11_01/models/packet_capture_result.py
31.25% <0%> (-8.75%)
:arrow_down:

...re/mgmt/network/v2017_10_01/models/ipsec_policy.py
35.71% <0%> (-8.74%)
:arrow_down:

...17_10_01/models/verification_ip_flow_parameters.py
35.71% <0%> (-8.74%)
:arrow_down:

...re/mgmt/network/v2017_11_01/models/ipsec_policy.py
35.71% <0%> (-8.74%)
:arrow_down:

...17_11_01/models/verification_ip_flow_parameters.py
35.71% <0%> (-8.74%)
:arrow_down:

...rk/v2017_11_01/models/connection_monitor_result.py
26.31% <0%> (-8.47%)
:arrow_down:

...rk/v2017_10_01/models/connection_monitor_result.py
26.31% <0%> (-8.47%)
:arrow_down:

... and 1001 more

Continue to review full report at Codecov.

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

This PR has been merged into https://github.com/Azure/azure-sdk-for-python/pull/2022


Update docs for SHA256 verification support

I don't think this requires any code changes, just vendoring an Ignition release containing https://github.com/coreos/ignition/pull/965 and updating the 1.1.0-exp spec.
cc @sohankunkerkar

Fixed by #97.


Adding extra white line before video in DMA assessment page.

@jeroenterheerdt : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


Fix variable substitution

Fixes #173
stage in Universal is not called by packageX in Universal

great thanks to you!


LT starting IPython process but not running the code on it

I'm running a fresh download (no extra pluggins) of LT 0.7.2 on Debian 8 Jessie. I have a python 2.7.8 interpreter in the system dir /usr/bin/ and some extra modules including IPython 3.0.0 in /home/username/.local/lib/python2.7/site-packages/ and the IPython executable in /home/username/.local/bin/.
Also, I have the $PATH variable updated both in the .bashrc and in the .profile files to include the directory where the IPython executable is located, so that it should be correctly defined both in the bash shell and in GUI applications. $PYTHONPATH is also updated. As suggested here, I start LT from the command line
When executing a python script from LT, I can see that an IPython process is started but the code is run in a plain python interpreter (tested as suggested here). In fact, the IPython process still exists after stopping LT, which I'd say is not the expected behavior...
(also described here and here)
Following these instructions I added the following lines to the user.behaviors config file without noticing any effect:
[:app :lt.plugins.python/python-exe "/usr/bin/python"]
[:app :lt.plugins.python/ipython-exe "/home/username/.local/bin/ipython"]

Interestingly, the PYTHONPATH seems to be correctly used, and I can import all packages in the user directory, including IPython...
I've seen some issues here and discussions in the google groups discussing similar behaviors, but could not find a solution (I'm sorry if I missed it!!). Also, none of is from recent versions (LT 0.6 with IPython 1.2 and older)...
Any idea of what to try?

+1 but on windows
LT 0.7.2
can't connect to IPython kernel using any method from various docs, discussions and questions on lighttable website, google groups and so

changing user.behavior

[:app :lt.plugins.python/python-exe "C:/Python27/python.exe"]
[:app :lt.plugins.python/ipython-exe "C:/Python27/Scripts/ipython.exe"]

set python to ipython

[:app :lt.plugins.python/python-exe "C:/Python27/Scripts/ipython.exe"]
[:app :lt.plugins.python/ipython-exe "C:/Python27/Scripts/ipython.exe"]

with pylab

from pylab import *
plot([1,2,3], [1,4,9])  # [<matplotlib.lines 2D line at blah>]

with pyplot

import matplotlib.pyplot as plt
plt.plot([1,2,3], [1,4,9])  # [<matplotlib.lines 2D line at blah>]

with pyplot.ion()

import matplotlib.pyplot as plt
plt.ion()  # None
plt.plot([1,2,3], [1,4,9])  # [<matplotlib.lines 2D line at blah>]

with pyplot.show()

import matplotlib.pyplot as plt
plt.plot([1,2,3], [1,4,9])  # [<matplotlib.lines 2D line at blah>]
plt.show() # None

in a function

import matplotlib.pyplot as plt
def MyPlot():
plt.plot([1,2,3], [1,4,9])  # [<matplotlib.lines 2D line at blah>]
plt.show() # None
if name == "main:
MyPlot()
various combinations, but the only thing ever embedded is the pointer to the plot.

The same happens on my OSX 10.8

Closing as we'll be tracking iPython support in https://github.com/LightTable/Python/issues/35


enable improved loop execution modeling

More details can be found here:
https://summerofcode.withgoogle.com/archive/2017/projects/6071606019358720/
https://reviews.llvm.org/D12358

Since clang 10 (I did not check previous versions) there are some new flags which could be used, maybe it is easier to configure clang analyzer like this:

 -funroll-loops          Turn on loop unroller
-freroll-loops          Turn on loop reroller

I'm closing this @martong please create a new PR if there will be a decision if the loop related analyzer features should be enabled or disabled by default.


Users can download their citations in RIS file format that has only one date listed as the official publication date.

The date in the citation is the official date of publication. MIV can only import one date, so this is necessary to ensure proper publication metadata transfer to MIV.
Priority: H
Value: H
Risk: L
Effort: L

[ ] #31
[ ] ...

@Vensberg can you explain how to test/verify this?

I import the file into their sandbox and see if any imports fail and any errors are returned.


Allow language word ('w') lookup by gloss item

Currently, if I want to use word-level alignment in Gloss and Language lines, it seems necessary to iterate through morpheme tier in a case like kor-ex.xml. I.e., I first need to find all the morphemes that correspond to a word, then all the gloss items that correspond to these morphemes. It would be convenient to be able to look up a word-level gloss item by word item id, and vice versa.

Thanks for requesting this. But to clarify, do you want to get a list of gloss items from a word, or a list of words from a gloss? Both should be possible. I'm working on a good interface for this. Perhaps something like:
>>> list(ancestors(gloss_item, refattrs=('alignment', 'segmentation')))
(<Tier object (id: m type: morphemes) at ...>, 'alignment', [<Item object (id: m1) at ... >])
(<Tier object (id: w type: words) at ...>, 'segmentation', [<Item object (id: w1) at ... >])
(<Tier object (id: p type: phrases) at ...>, 'segmentation', [<Item object (id: p1) at ... >])

That is, you give it an item (like a gloss) and a list of reference attributes it can follow (first match in the list; ('alignment', 'segmentation') is the default list), and it will traverse the references. It returns a triple of (tier, refattr, [items]) where tier is the referred tier, refattr is the reference attribute it followed to get there, and [items] is a list of items referred by the items in the previous level (usually this is only 1, but for converging structures (like syntax trees) you'll get multiple).
In order to find the level you want, just iterate and stop at the desired type:
>>> for (reftier, refattr, items) in ancestors(gloss_item):
...    if reftier.type == 'words':
...        print('found {} matching word(s)'.format(len(items)))
found 1 matching word(s)

Going the other way, I can have a descendants() function similarly defined, but you're more likely to get more than one result. When this happens, each matching tier has all collected results (e.g. you might get 2 morpheme descendants for a word, and 2 gloss descendants for each morpheme, so the result of morphemes has an items list with 4 items. This should be fine as long as the list of refattrs is mutually exclusive (e.g. a tier can refer to another by alignment or by segmentation, not by both).
Does such a proposal seem like it would work for you?

Thanks for looking into this!
Yes, it sounds like the descendants() function is exactly what I am looking for. Right now in my user scenario, I start from words in the sentence (which originally come from a Xigt document's words tier), and I need to find the items in the glosses tier that correspond to this word. So I end up iterating through the morphemes first, finding all that have this word as their alignment attribute, then find all the glosses that have these morphemes as their alignment attribute, etc. Having a function that would retrieve all the glosses for me, given a word id, would be very convenient. In fact, am I right to iterate through morphemes in the first place? Maybe there is already a function which would give me the morphemes that correspond to a word? It is possible that I didn't find something.
But, basically, my scenario is: given a word, find things that are aligned to it in other tiers.

Since alignments go "upward", it is easy to find, e.g., what words align to which morphs, but there is no reverse index for the other direction. Maybe I should consider that as well..

Both ancestors() and descendants() are implemented in a feature branch. The difference from what I wrote before is that they yield 4-tuples: (sourcetier, refattr, reftier, refitems). The sourcetier is the new part, and it was necessary particularly for descendants() since more than one tier can refer to another with the same reference attribute, unlike for ancestors().


[Feature suggestion] qemu-system-ppc with audio using qemu-screamer fork?

I have a QEMU 5.1.0 build I got from homebrew, and a qemu-system-ppc binary I compiled myself from qemu-screamer fork, which enables audio for macOS 9 and works well on my Intel Mac (macOS Big Sur). I managed to replace the homebrews qemu-system-ppc binary with the fork version, so I don't need to mantain a separate version, use a link or a shortcut for that. Can we use the same approach so UTM users who want to run macOS 9 or later (it also enables sound for OS X 10.5 Leopard, for example) can benefit from this? I don't know how it affects other operating systems like PowerPC linux distros (who still does it?) but I suppose it also enables sound for them since vanilla qemu-system-ppc audio never really worked well at all before I found this fork. Why QEMU devs never pushed it to vanilla is beyond my thoughts.
If the UTM dev decide not to do that I would like to hear some info on how to replace the binary by myself or compile my own version for UTM?

Duplicate of #312


Prevent Execution from tmp / log folders : Exploit Public facing applications

Protecting system folder; /tmp; this should take care of most of the attacks as the attack binaries are loaded into these folders
Do not allow binary execution from a list of folders.
The intent is implemented by the KubeArmor adapter

Reference:
https://github.com/kubearmor/policy-templates/issues/1049
https://www.tenable.com/audits/items/search?q=noexec&sort=&page=1


global: tests and config refactoring

tests refactoring
entrypoints removal for events, aggregations, queries
custom config removal (close #86)

@ChiaraBi I made some extra changes on top of yours:

Simplifications in terms of naming (e.g. aggregation config doesn't need to prefix all its variables with aggregation_).
I'm a bit hesitant on keeping the registrations.py file... Maybe it's better to move these guys into invenio_stats/contrib/config.py since now they're basically plain dictionaries with no need to be lazily loaded via register_xyz() functions...

Of course docs our out of date, but that's a separate issue


Team Off-board endpoint does not exists

Describe the bug
There currently is no end points to off-board a team from the platform. Inactive teams are also being returned on the /workflows/teams end point.
To Reproduce
Removing a service in core doesn't deactivate the the team.
Expected behavior
An end point is available to delete a team by the end point DEL /workflows/teams/{teamId} which will change the active status, inactive teams shouldn't appear on the workflow screen and cannot be ran.
Add any other context about the problem here.

Hi @amhudson thanks. FYI, we wont close the issue until its verified as part of a release. So typically we stick in To Verify. Unless this is verified and then 👍


Update to golang 1.6

remove Godeps folder
migrate to vendor
using Glide instead Godep
add Dockerfile to test build

@w-vi can you check if upgrade is ok?

@w-vi failed test:
GIN-debug] POST   /                         --> github.com/apiaryio/heroku-datadog-drain-golang.(*ServerCtx).(github.com/apiaryio/heroku-datadog-drain-golang.processLogs)-fm (2 handlers)
--- FAIL: TestFull (1.00s)
	server_test.go:180: Expected: app.metric.request.length:541.000000|h|#source:web.1,route:/parser,request.id:11747467-f4ce-4b06-8c99-92be968a02e3. Actual: app.metric.request.length:541.000000|h|#source:web.1,request.id:11747467-f4ce-4b06-8c99-92be968a02e3,route:/parser
	server_test.go:180: Expected: app.metric.response.length:5163.000000|h|#source:web.1,route:/parser,request.id:11747467-f4ce-4b06-8c99-92be968a02e3. Actual: app.metric.response.length:5163.000000|h|#source:web.1,request.id:11747467-f4ce-4b06-8c99-92be968a02e3,route:/parser
	server_test.go:180: Expected: app.metric.parser.time:5.000000|h|#source:web.1,route:/parser,request.id:11747467-f4ce-4b06-8c99-92be968a02e3. Actual: app.metric.parser.time:5.000000|h|#source:web.1,request.id:11747467-f4ce-4b06-8c99-92be968a02e3,route:/parser
FAIL
exit status 1

it's problem with order to compare tests. Suggestion how fix this?

@abtris I knew that this will blow to our face one day, it was relying on the hash table implementation. I will fix it, have to figure out how though.

@w-vi can be possible using https://golang.org/pkg/reflect/#DeepEqual for compare arrays?

I make more debugging and find problem not only order in testing but order in processing request isn't for tests ideal.
MESSAGE_: app.metric.parser.time:5.000000|h|#source:web.1,request.id:11747467-f4ce-4b06-8c99-92be968a02e3,route:/parser
TESTED__: app.metric.request.length:541.000000|h|#source:web.1,route:/parser,request.id:11747467-f4ce-4b06-8c99-92be968a02e3
TESTED__: app.metric.response.length:5163.000000|h|#source:web.1,route:/parser,request.id:11747467-f4ce-4b06-8c99-92be968a02e3
TESTED__: app.metric.parser.time:5.000000|h|#source:web.1,route:/parser,request.id:11747467-f4ce-4b06-8c99-92be968a02e3

but I'm not sure if is real problem. For statsd isn't problem changing parameters order problem is only string equality in tests.

Cool, I was going to do this, because order doesn't matter. So all is good again :)


Backport "Make order of renames and missing imports deterministic" to LTS

Backports #19468 to the LTS branch.
PR submitted by the release tooling.
[skip ci]

No regressions detected in the community build up to lts-19520.
Reference


add weekly rundown links to weekly posts

It would be nice to link each weeks "rundown" to the appropriate post

Many times the weekly rundowns are not polished or helpful without the presentation that goes with them, and it's an unnecessary complication to the website right now. For those truly interested the rundowns are public repos that can be found under the organization.


Build out contributing guidelines

In an effort to encourage involvement, and standardize contributions we should make a concerted effort to build thorough docs on how to contribute for each sub-package (layers, crf, etc.)
For example:
Building from #19 dicussion. We should create standards for adding custom keras Layers. Some things to include:

Testing with the Keras layer test
Registering the Layer so a Model can be serialized / deserialized

Initial pass of this is complete. We'll continue to iterate on the docs though.


using Microsoft.Extensions.Caching.StackExchangeRedis not exist on .net core 3.0

There is only avaliable two namespace:

Microsoft.Extensions.Caching.Distributed;
Microsoft.Extensions.Caching.Memory;

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

ID: 0d01025d-86b2-bb2d-86c1-ef0695bc98e3
Version Independent ID: 5b9a6572-3671-0d54-b2ef-83d04f8b3e96
Content: Distributed caching in ASP.NET Core
Content Source: aspnetcore/performance/caching/distributed.md
Product: aspnet-core
Technology: aspnetcore-performance
GitHub Login: @guardrex
Microsoft Alias: riande

The app requires the package reference with an app restore.


Test: Complete Egress default-deny test

In Egress default-deny tested that the endpoint has policy enabled but
connectivity was not tested. This changes make sure that the changes are
updated correctly.
Also, some refactoring in the test to use BeforeAll,AfterAll and make
things a bit faster.
Signed-off-by: Eloy Coto<EMAIL_ADDRESS>

test-me-please

test-me-please


Add int_in_range_checked

Adds a function Unstructured::int_in_range_checked that returns Error::NotEnoughData if there is not enough underlying data.
See #139.

The intent behind this particular PR was simply to provide the things I suggested in #139 rather than just leave it as a suggestion. I see what you mean about the other functions and I understand not wanting to add "checked" variants for every one. I'll solve my use case with an extension trait.


Implemented on and off functionality for i2c

Did you push bad code, jospeh gerbeR???? :triumph: :eyes:


Missing wheels for macosx-cp38 for release 1.1.1

Since the new release of cftime, we found that our CI (github actions) is failing the python 3.8 macosx tests, when trying to install cftime.
Collecting cftime
  Downloading cftime-1.1.1.tar.gz (48 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/runner/hostedtoolcache/Python/3.8.2/x64/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-wakqznyj/cftime/setup.py'"'"'; __file__='"'"'/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-wakqznyj/cftime/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-wakqznyj/cftime/pip-egg-info
         cwd: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-wakqznyj/cftime/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-wakqznyj/cftime/setup.py", line 5, in <module>
        import numpy
    ModuleNotFoundError: No module named 'numpy'

My guess is that this is due to the missing wheels for  macosx-cp38.
Thanks in advance 😄

This was fixed in #149 BTW. We need a new release.
(Wheels would also help.)

Oh I didn't see #149 since it was already closed.
Thanks for the info 😄

wheel macos x 3.8 wheel for 1.1.1 is now uploaded to pypi.
A new release (<IP_ADDRESS>) with PR #149 will be up later today.

Great - thanks.

New release is up

Our CI tests pass again!
Thanks a lot ❤


Parameters utility type doesn't evaluate optional function parameters as optional tuple members

Bug Report
🔎 Search Terms
parameters utility type optional
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about Functions, Type System Behavior

I'm pretty sure this existed ever since the introduction of optional tuple elements. Checked in TS Playground from v3.3 to Nightly.
⏯ Playground Link
Playground link with relevant code
💻 Code
export enum ToastIcon {
    added = 'added',
    success = 'success',
    question = 'question',
    explanation = 'explanation',
}

interface ToastCustomOptions {
    timeout: number;
}

class ToastService {
    popToast(toastIcon: ToastIcon, body: string, customOptions?: ToastCustomOptions): void;
    popToast(
        toastIcon: ToastIcon,
        body: string,
        customOptions: ToastCustomOptions,
        actionButtonText: string,
    ): Promise<boolean>;
    popToast(
        toastIcon: ToastIcon,
        body: string,
        customOptions: ToastCustomOptions = { timeout: 3200 },
        actionButtonText?: string,
    ): Promise<boolean> | undefined {
        // Implementation
    }
}

const popToastParams: Parameters<ToastService['popToast']> = [ToastIcon.success, 'this is a toast'];
      ~~~~~~~~~~~~~~ <- Error!

🙁 Actual behavior
The assignment to popToastParams in line 30 fails with the error 2322 as following:

Type '[ToastIcon.success, string]' is not assignable to type '[toastIcon: ToastIcon, body: string, customOptions: ToastCustomOptions, actionButtonText: string]'.
Source has 2 element(s) but target requires 4.(2322)

🙂 Expected behavior
I would expect Parameters<ToastService['popToast']> to evaluate to [toastIcon: ToastIcon, body: string, customOptions?: ToastCustomOptions, actionButtonText?: string], since the popToast function's customOptions and actionButtonText are both optional.

Conditional types (such as Parameters<T>) and overloads don't play well together.
Type inference in conditional types

When inferring from a type with multiple call signatures (such as the type of an overloaded function), inferences are made from the last signature (which, presumably, is the most permissive catch-all case). It is not possible to perform overload resolution based on a list of argument types.

Conditional types (such as Parameters<T>) and overloads don't play well together.
Type inference in conditional types

When inferring from a type with multiple call signatures (such as the type of an overloaded function), inferences are made from the last signature (which, presumably, is the most permissive catch-all case). It is not possible to perform overload resolution based on a list of argument types.

Conditional types (such as Parameters<T>) and overloads don't play well together. It's a design limitation.
Type inference in conditional types

When inferring from a type with multiple call signatures (such as the type of an overloaded function), inferences are made from the last signature (which, presumably, is the most permissive catch-all case). It is not possible to perform overload resolution based on a list of argument types.

Conditional types (such as Parameters<T>) and overloads don't play well together. It's a design limitation.
Type inference in conditional types

When inferring from a type with multiple call signatures (such as the type of an overloaded function), inferences are made from the last signature (which, presumably, is the most permissive catch-all case). It is not possible to perform overload resolution based on a list of argument types.

@MartinJohns so if I understand correctly, there's no escape from having to cast to unknown and then back to the desired type in this case?

@MartinJohns so if I understand correctly, there's no escape from having to cast to unknown and then back to the desired type in this case?

You can add a proper last signature to your method to cover all your cases:
popToast(toastIcon: ToastIcon, body: string, customOptions?: ToastCustomOptions): void;
popToast(toastIcon: ToastIcon, body: string, customOptions: ToastCustomOptions, actionButtonText: string): Promise<boolean>;
popToast(toastIcon: ToastIcon, body: string, customOptions?: ToastCustomOptions, actionButtonText?: string): Promise<boolean> | undefined;
popToast(toastIcon: ToastIcon, body: string, customOptions: ToastCustomOptions = { timeout: 3200 }, actionButtonText?: string): Promise<boolean> | undefined { /* Implementation */ }

You can add a proper last signature to your method to cover all your cases:
popToast(toastIcon: ToastIcon, body: string, customOptions?: ToastCustomOptions): void;
popToast(toastIcon: ToastIcon, body: string, customOptions: ToastCustomOptions, actionButtonText: string): Promise<boolean>;
popToast(toastIcon: ToastIcon, body: string, customOptions?: ToastCustomOptions, actionButtonText?: string): Promise<boolean> | undefined;
popToast(toastIcon: ToastIcon, body: string, customOptions: ToastCustomOptions = { timeout: 3200 }, actionButtonText?: string): Promise<boolean> | undefined { /* Implementation */ }

@MartinJohns the 3rd signature fixed this. Thanks!

@MartinJohns the 3rd signature fixed this. Thanks!

The last signature already defines the last 2 parameters as optional.

The last one is not considered when it comes to overloads.
Overloads

Note that the function pickCard(x): any piece is not part of the overload list, so it only has two overloads: one that takes an object and one that takes a number. Calling pickCard with any other parameter types would cause an error.

The last signature already defines the last 2 parameters as optional.

The last one is not considered when it comes to overloads.
Overloads

Note that the function pickCard(x): any piece is not part of the overload list, so it only has two overloads: one that takes an object and one that takes a number. Calling pickCard with any other parameter types would cause an error.

The last signature already defines the last 2 parameters as optional.

The last one is not considered when it comes to overloads.
Overloads

Note that the function pickCard(x): any piece is not part of the overload list, so it only has two overloads: one that takes an object and one that takes a number. Calling pickCard with any other parameter types would cause an error.

That last one is not visible from the callsite either. It must be a "visible" overload.

@MartinJohns That makes sense. Thanks again!

The last signature already defines the last 2 parameters as optional.

The last one is not considered when it comes to overloads.
Overloads

Note that the function pickCard(x): any piece is not part of the overload list, so it only has two overloads: one that takes an object and one that takes a number. Calling pickCard with any other parameter types would cause an error.

That last one is not visible from the callsite either. It must be a "visible" overload.

@MartinJohns That makes sense. Thanks again!


Fix the install scripts for the vscode extension

These were not fetching the golang.org/x/xerrors package, which are a dependency.
Also fix the .exe executable extension on windows.

Apparently this still doesn't work with a clean install of a recent go toolchain. Will rework.


Add SKonsole Configuration Provider and Update Program.cs

Summary:
This pull request adds a new file, ConfigurationProvider.cs, to the SKonsole application. The ConfigurationProvider class is responsible for managing the application's configuration settings. It reads the configuration from a file named ".skonsole" in the user's profile directory, and provides methods to get and set configuration values. The configuration is stored as a dictionary of key-value pairs, and is loaded into an IConfiguration object for easy access.
In addition to adding the ConfigurationProvider, this pull request also updates the Program.cs file. It adds a new command, "config", to the root command, which allows users to interact with the configuration settings. The "config" command has two subcommands: "set" and "get". The "set" subcommand allows users to set a configuration value by providing a key and a value. The "get" subcommand allows users to retrieve the value of a configuration key.
Detailed Changes:

Added ConfigurationProvider.cs file, which implements the ConfigurationProvider class responsible for managing the application's configuration settings.
The ConfigurationProvider class reads the configuration from a file named ".skonsole" in the user's profile directory.
The configuration is stored as a dictionary of key-value pairs and is loaded into an IConfiguration object for easy access.
The ConfigurationProvider class provides methods to get and set configuration values.
Added a new command, "config", to the root command in Program.cs.
The "config" command has two subcommands: "set" and "get".
The "set" subcommand allows users to set a configuration value by providing a key and a value.
The "get" subcommand allows users to retrieve the value of a configuration key.

Context:
This pull request introduces a ConfigurationProvider class to manage the application's configuration settings in the SKonsole application. It also adds a new command, "config", to the root command, allowing users to interact with the configuration settings. These changes improve the flexibility and user experience of the application by providing a way to store and retrieve configuration values.
Note:
The changes made in this pull request are intended to enhance the functionality and usability of the SKonsole application.

I want to use Spectre.Console to beautify the configuration process, so I will close the PR for now.


[Event Request] Extension deployment on BC online tenant

For BC online tenant administration and supervision we should need event on tenant when any kind of new extension is deployed (published/installed) or unpublished/unistalled.

Hi! We have it in our backlog to add telemetry to AppInsights for these type of events. We plan to complete the work in the following months.
For other ideas around administration events, please log them through Collaborate or BCIdeas. I will close this issue as it is outside the scope of this repository.


refactor: drop position listeners in favor of enter listeners

This drops the undocumented position listener which can cause perf issues by overloading the bridge in favor of a enter listener which can be used for lazy loading

Is it actually needed and has a big performance impact?

@osdnk After throttling there shouldn't be much issues with perf, but:

As you pointed out, throttling isn't great for all use cases, you might still want non-throttled updates
The enter listener makes the lazy load experience faster (similar to how it was with no throttling)

I think for the use cases where someone needs position updates, maybe it's better to accept an Animated.Value as a prop which we update, so they can use a native animated value instead of JS based listener. And in the cases where they do need a JS based listener, they can add a listener to the animated value they are passing.


LLAMALEND: As a user, I want to leverage EzETH against crvUSD with Llamalend

As a user, I want to be able to use EzETH for leverage collateral with LLlamalend so that I am able to take leverage positions on Renzo's EzETH as a Curve Leverage Bot and Palomabot.
Acceptance Criteria

Use new Llamalend contracts to create leverage position on EZETH
Use the borrow_more_extended functionality to allow user to increase leverage on the position, if profits exists
Use all the curve leverage bot features

Notion: https://www.notion.so/volumefi/EPIC-3-1-24-LLAMALEND-ezETH-leverage-bot-92d10b971f344ceb89642c5b5fa62d09?pvs=4

redeployment logs: https://github.com/curvefi/curve-stablecoin/commit/1c817319f53631f97a9a88a5578d13ca90aed780

As per @wc117: Time to completion:

1 day. At most 2 days? I hope it will be ready by tomorrow, 03/26/24


add repo form

#337

The UI is designed, however. I will need to created a function to create a goal for the repo.
I may also think no longer letting someone view the issues without adding the repo first. My thought here is there are too many ways to get to the repo screen and I am story data weirdly in the url to do this.
I am also thinking to have a recommend repo list, which will add an element of discovery.  https://github.com/bdougie/open-sauced/issues/344


www/caddy: Add option to disable TLS in domain

Fixes: https://github.com/opnsense/plugins/issues/4074

Still thinking about this. I might invert the logic of it since I dislike "enable to deactivate something" fields.

Still thinking about this. I might invert the logic of it since I dislike "enable to deactivate something" fields.

Since this is a checkbox it's not that big of a deal, but with other option types "keeping everything empty" should be the sensible default as this minimizes the chance of people forgetting what they added/removed and can simply go back to a clean state without much trouble. Just my 2 cents really :)

@swhite2 That makes sense, I have changed the logic back to my original plan and it looks much cleaner and easier to read that way.

LGTM


Icon does not display in the published package.

The ANFPad icon should be displayed correctly, but for some reason it does not work as expected.

Fixed, icon will now work on new builds.


Bootloop

When the following script is configured, the esp will Bootloop.
!+s1 = Serial(26,27,115200,1)
!+s2 = Serial(13,4,115200,2)
!+can = Can(32,33,1000000)

When the can is initialized before the Serial, the esp will not Bootloop.
!+can = Can(32,33,1000000)
!+s1 = Serial(26,27,115200,1)
!+s2 = Serial(13,4,115200,2)

Before the the Bootloop follwing error is thrown:
ESP_ERROR_CHECK failed: esp_err_t 0x105 (ESP_ERR_NOT_FOUND) at 0x40093110
file: "IDF/components/driver/twai.c" line 465
func: twai_driver_install
expression: esp_intr_alloc(ETS_TWAI_INTR_SOURCE, g_config->intr_flags, twai_intr_handler_main, NULL, &p_twai_obj->isr_handle)
abort() was called at PC 0x40093113 on core 0

@Johannes-Thiel Do you, by any chance, see a stack trace when abort() is called?

I tested this issue again. Our update tho ESP IDF 5.3.1 has fixed this issue. The ESP does not bootloop with both configs.


Scaffold global store to handle shared state across franklin-dashboard

That feature would be an improvement to handle global parameters in a shared state via a global store.

Closing as merged as solved with its own PR


Terminal scrolls content to the left without a reliable way of recovering

OS: Windows

open the built-in terminal
run command that produces a bunch of output such as 'npm list' or cat a file
try to scroll up to reveal text that was already scrolled out of sight
-> content is scrolled to the left (and then gets stuck)
-> there is no reliable way to get the terminal back into a 'normal' state; sometime Enter works, sometimes not

Here is a screen recording.

Duplicate of #6738


custom_class does not work

Hi All, first post so be gentle.
I have been using frappe Gantt for a while now and its been good. I've come to the point where I need to add different coloured bars in for baselines and forecast dates. However the custom_class is not working, I have tried most of the work arounds I have seen on here but  nothing has worked.
Following the standard of add "custom_class:'bar-milestone" and update the css file does literally nothing.
Using the inspect tool I can see the CSS field is being read but the colour doesn't change.
Any help gratefully received .

Part time paste you code in here so we can have a look.


change upload parameters for renter

Instead of accepting a readerseeker, I think it should accept a filepath. This allows it to look at the file later, and potentially upload the file later. It does mean that you'll need siad and that you can't use a web browser interface.
But we've got atom-shell now, which solves that problem. I think that the advantages of having the original filepath when trying to do things like repairs are greater than the disadvantages of not having the more general solution.

agreed. ReaderSeeker was a nice solution for the problem we had, but it's no longer necessary. This should go hand-in-hand with formally removing the multipart ("datastream") upload API call.

I'm going to close this issue as premature.


value_or for optional<T&> can return lvalue reference

Why do we always return a T in value_or for optional<T&>?
https://github.com/beman-project/optional26/blob/4c5cd80a337decdbeaaba26ee1b2b65359c8316c/include/beman/optional26/optional.hpp#L1117
If the provided default value is also a lvalue ref, can't we then safely return a T&?

This direction was vetoed in P2988R4.

Thanks for this hint. We have implemented our own optional type, but made the distinction when the provided value is a lvalue or not. So far we have no issues with this decission.


GHC LLVM Backend

One of the interesting comparisons you can do with haskell is comparing the backends. As of right now the native generator -fasm and the ancient C generator -fvia-C are supported. There needs to be an instance of llvm available (see https://godbolt.org/z/E6tA9y) for the llvm backend to work. This will allow -fllvm so you can compare the llvm and the native generators.

Hi @cwfitzgerald . Thanks for the suggestion.
I've looked around and we will, most probably, be able to add the required llvm machinery to the PATH for the GHC enviroment.
BUT, that might take a while, so in the meantime, you might want to use -pgmlo & -pgmlc as seen here https://godbolt.org/z/LdsJrn, which allows you to pass llc and opt to GHC directly :)

Ha awesome! Thanks for the workaround!


  Most of them were from dependencies, but at least I could shut up (vs. simply ignore!) most of the ones actually from the app....

Having no space between heads of same function looks crowded to me when they get that long, but if that's the convention, okay, will do.
Will try the _tags trick; just didn't know if that was somehow being accessed by that name from somewhere else.  Tried to check on whether that var was really needed at all, but couldn't find good docs on difference between setup/1 and setup/2 and found some things implying we had to use /2.  (Otherwise I'd just take it out.)
Web. does seem to be needed before ErrorHelpers; I don't see it anywhere without that, and it seems to have shut up the warning.  Why it compiled before, I am not sure; maybe the & references don't get checked until actually run?

Thanks man!


ci(c/driver_manager,c/driver/postgres): add macOS wheels

Fix some Linux-specific assumptions in the postgres driver
Add config to build wheels on macOS
Consolidate the macOS and Linux wheel build scripts

Test run here: https://github.com/lidavidm/arrow-adbc/actions/runs/3423120088

One follow-up is that I think we're still building the debug vcpkg libs, we should make sure the custom triplet is actually applying.


Add assignment 5 IPython Notebook

It is Sungwoo Noh's pull request. forgot to put my name on the file.:(


WebCodec demo doesn't seem to work

Hey Matt! Just tried this out and the WebCodec.html page doesn't seem to work correctly. No errors, but the final video output doesn't run and the downloaded file seems corrupt. Something going on with the muxer?

Are you in chrome canary with web codecs enabled in about config ? If so, perhaps they changed some API recently and I need to update.

In chrome stable, but with flag enabled. it doesn’t seem to be throwing any errors in the encoding however, but I guess it could be an api change

Just digging into this @mattdesl. This seems to be happening on Windows. OSX seems to be fine. still unsure if this is somehting to to with the WebCodec api or the muxing though.

Finally coming back around to this, the latest version should in fact support both annexb (default) or avc (though you have to specify { format: 'avc' } when creating the MP4 encoder).
Here's a test case:
https://codepen.io/mattdesl/pen/LYWvmyp?editors=1010
^ This actually runs in latest Chrome now (I'm on 91.0.4472.106, no need for Canary). You still need to enable Experimental Web Platform Features in Chrome flags.

Finally coming back around to this, the latest version should in fact support both annexb (default) or avc (though you have to specify { format: 'avc' } when creating the MP4 encoder).
Here's a test case:
https://codepen.io/mattdesl/pen/LYWvmyp?editors=1010
^ This actually runs in latest Chrome now (I'm on 91.0.4472.106, no need for Canary). You still need to enable Experimental Web Platform Features in Chrome flags.

this test case does not generate mp4 in chrome dev（ 95.0.4628.3）

I met this problem in Chrome Beta (94.0.4606.41) too.
In my case, it was because the absence of data property in EncodedVideoChunk, which is internal according to the WebCodecs Spec. So I tried to copy it out using copyTo() and it worked.
See PR.

I have the same problem.

I've just pushed a new build, let me know if 1.0.5 is working (also updated the demo https://codepen.io/mattdesl/pen/LYWvmyp?editors=1010).
Thanks!

Can confirm this is not working under windows Chrome 96, with experimental web platform features enabled. Stepping through the frame data is being passed to mp4-wasm, but the resulting buffer after closing the encoder only has 152bytes in it.

Did a little more digging today.
Can't seem to get annexb to work at all, but switching the example back to avc and fixing the decoderConfig opts which have changed got me a working avc recording!
diff --git a/src/extern-post.js b/src/extern-post.js
index a028d01..f2d0abe 100644
--- a/src/extern-post.js
+++ b/src/extern-post.js
@@ -155,17 +155,17 @@ export function createWebCodecsEncoderWithModule(MP4, opts = {}) {
   }

   function write_nal(uint8) {
-    const p = MP4._malloc(uint8.byteLength);
+    const p = MP4.create_buffer(uint8.byteLength);
     MP4.HEAPU8.set(uint8, p);
     MP4.mux_nal(mux, p, uint8.byteLength);
-    MP4._free(p);
+    MP4.free_buffer(p);
   }

   function writeAVC(chunk, opts) {
     let avccConfig = null;
-    if (opts.description) {
+    if (opts && opts.decoderConfig && opts.decoderConfig.description) {
       try {
-        avccConfig = parseAVCC(opts.description);
+        avccConfig = parseAVCC(opts.decoderConfig.description);
       } catch (err) {
         error(err);
         return;

I tried the solution @benjamind gives above, and it finally works on Windows Chrome 96 (and also on MacOS with avc encoding).
However the file generated on Windows seems to have a wrong duration, which is exactly the double of normal one. I feed it to ffmpeg and see lot of warnings:
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fb8fa00b000] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fb8fa00bc00] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fb8fa00c800] no frame!
...

I guess that it may populates malformed frames when parsing avcc data. This is the file I generated on Windows, which has a duration of 20s, and should be 10s instead (300fr / 30fps).
https://user-images.githubusercontent.com/7821581/144732849-4d47d3f7-7dc7-4e6b-9325-a0a646b18be2.mp4

Hello, I tried in Chrome 98.0.4758.101 on Android.
DOMException: Encoder creation error.
he @ mp4.js:1043
Kr @ mp4.js:1106
t.createWebCodecsEncoder @ mp4.js:21
start @ webcodecs.js:62
await in start (asynchronní)
(anonymní) @ webcodecs.js:105
Uncaught (in promise) DOMException: Failed to execute 'encode' on 'VideoEncoder': Cannot call 'encode' on a closed codec.


Implement getDefaultState in Entity

Current coverage is 69.18%

Merging #103 into master will increase coverage by +0.03% as of 587b1ae

@@            master    #103   diff @@
======================================
  Files           80      80
  Stmts         2266    2275     +9
  Branches       269     269
  Methods
======================================
+ Hit           1567    1574     +7
  Partial         99      99
- Missed         600     602     +2

Review entire Coverage Diff as of 587b1ae

Powered by Codecov. Updated on successful CI builds.

@alexander-yevsyukov, PTAL.

LGTM


Broken Slash Command - /confessbanuser (misc.py)

Fix the slash command for the command to ban a user from submitting confessions based on username (different from #18), as it does not execute nor show up in the slash command menu. It is visible in the code that the line exists, and has been commented out, as it does not work.
You are free to update the discord-py-slash-command library from 3.0.3, provided you explain why.

Can i get this

@Keshav1105 done. Get on your bus and take a look at this


fix(foundationdb): make the db_run non capturing

Hello 👋
I would like to introduce a modification in the Database::run parameters signature.
The function is great, but there is a little flaw with the maybe_committed closure parameter. As this one is a boolean which is "copiable".
Therefore, if you want to use this parameter, you have to make the closure capturing.
db.run(|trx, maybe_committed| async move {
    if maybe_committed {
        // treatment
    }
    Ok(())
})
.await

But sometimes this behavior is not desired. For example, when, your closure uses an immutable reference of a variable in the outer environment.
#[derive(Debug)]
struct Data;
let data = Data;

db.run(|trx, maybe_committed| async move {
    if maybe_committed {
        // treatment
    }
    dbg!(&data)
    Ok(())
})
.await

With the error:
cannot move out of `data`, a captured variable in an `Fn` closure

There are two ways to making it functional
By using an Arc
#[derive(Debug)]
struct Data;

let data = Arc::new(Data);

db.run(|trx, maybe_committed| {
    let data = data.clone();

    async move {
        if maybe_committed {
            // treatment
        }
        dbg!(&data);
        Ok(())
    }
})
.await

Which wraps the variable in an immutable state.
Or by forcing the move of the boolean instead of its copy. This is done by wrapping the boolean into a non-copy structure.
The boolean can be recovered through the into() call
#[derive(Debug)]
struct Data;

let data = Data;

db.run(|trx, maybe_committed| {
    struct Wrapper(bool);
    impl From<Wrapper> for bool {
        fn from(value: Wrapper) -> Self {
            value.0
        }
    }

    let maybe_committed = Wrapper(maybe_committed);

    async {
        if maybe_committed.into() {
            // treatment
        }
        dbg!(&data);
        Ok(())
    }
})
.await

This way the data keeps its type.
As I prefer the second solution, but because the boilerplate is a bit heavy. I would like to modify the boolean type of mayby_committed into a wrapped boolean implementing Into.
This way the API becomes:
db.run(|trx, maybe_committed| async {
    if maybe_committed.into() {
        // treatment
    }
    dbg!(&data);
    Ok(())
})
.await

Leaving the closure non-capturing.

Codecov Report
Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (a19d710) 82.37% compared to head (5554f18) 83.04%.

Files
Patch %
Lines

foundationdb/src/database.rs
0.00%
6 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
+ Coverage   82.37%   83.04%   +0.66%
==========================================
  Files          23       23
  Lines        4909     4914       +5
==========================================
+ Hits         4044     4081      +37
+ Misses        865      833      -32

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Is there a reason why token introspection was not supported in this library?

I see the token introspection was not included in wellknown configuration and also not implemented. Is there a specific reason for this?
I would like to contribute if there are no specific reason for not implementing this.

I'd say it's similar to #103 - since we do not need the endpoint in our use cases, we did not implement it. If it helps with your use case I'd be happy to accept your contribution.


INFO macro isn't compiled with types from std

Description
The compilation error occurs in the INFO macro with some type from std namespace. It seems that operator << overload for std::ostream doesn't work properly for a types from std namespace in the INFO macro.
Steps to reproduce
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include <chrono>

using SomeStdType = std::chrono::system_clock::time_point;

std::ostream& operator << ( std::ostream& os, SomeStdType const& std_value )
{
    os << "std type convertion"; // << std_value
    return os;
}

TEST_CASE( "INFO of SomeStdType" )
{
    SomeStdType std_value;
    INFO( "std_value = " << std_value );
    CHECK( std_value == SomeStdType() );
}

catch.hpp:1970: error: no match for 'operator<<' (operand types are 'std::ostringstream {aka std::__cxx11::basic_ostringstream<char>}' and 'const std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long long int, std::ratio<1ll,<PHONE_NUMBER>ll> > >')
             m_stream << value;
             ~~~~~~~~~^~~~~~~~

Extra information

Catch version: v1.8.2
Operating System: Windows 7 x64
Compiler+version: mingw 5.3.0 32bit, mingw 6.3.0 32bit, msvc 2015 32bit

Looks very similar (in effect) to #757 .
Name lookup starts with namespace Catch, ADL adds namespace std because the first argument is std::ostream and std::chrono because the second is std::chrono::system_clock::time_point. It yields a bunch of overloads, none of which matches. Global namespace is not searched.
Put the overload into namespace Catch. It's a bit weird, but the C++ standard doesn't allow adding overloads into namespace std.

Ok, let's see the next code:
// other_catch.hpp
#ifndef OTHER_CATCH_HPP_INCLUDED
#define OTHER_CATCH_HPP_INCLUDED

#include <sstream>

namespace OtherCatch
{
struct MessageBuilder
{
    MessageBuilder() {}

    template<typename T>
    MessageBuilder& operator << ( T const& value ) {
        m_stream << value;
        return *this;
    }

    std::ostringstream m_stream;
};
}

#endif // OTHER_CATCH_HPP_INCLUDED

// main.cpp
#include <ostream>
#include <chrono>

using SomeStdType = ::std::chrono::system_clock::time_point;

::std::ostream& operator << ( ::std::ostream& os, SomeStdType const& )
{
    os << "std type convertion"; // << std_value
    return os;
}

#include "catch.hpp"
#include "other_catch.hpp"

int main (int, char * [])
{
    SomeStdType std_value;

    // Error
    Catch::MessageBuilder( "INFO", CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << std_value;
    // Ok
    OtherCatch::MessageBuilder() << std_value;

    return 0;
}

What's the difference between Catch::MessageBuilder and OtherCatch::MessageBuilder?

Maybe operator<< overloads ( such as  std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); ) must be outside of the Catch namespace?

What's the difference between Catch::MessageBuilder and OtherCatch::MessageBuilder?

The difference is that namespace OtherCatch doesn't contain any operator<< overloads, so lookup continues in its enclosing (global) namespace.
But Catch contains some operator << overloads, so lookup stops there.

Maybe operator<< overloads must be outside of the Catch namespace?

Yes and no. Operator overloads should be in the namespace where one of their argument types is defined, so that ADL can find them. So to remove them from the Catch namespace, the streamable classes (SourceLineInfo et al) should be moved into Catch::Detail along with their operators.

Operator overloads should be in the namespace where one of their argument types is defined, so that ADL can find them.

Why "should"? What's wrong with operator overloads in the global namespace?
// catch.hpp
namespace Catch
{
struct SourceLineInfo {};
}

std::ostream& operator << ( std::ostream& os, Catch::SourceLineInfo const& )
{
    ...
    return os;
}

// main()
    ...
    Catch::SourceLineInfo info;
    Catch::MessageBuilder( "INFO", Catch::SourceLineInfo(), Catch::ResultWas::Info ) << info;
    ...

Why "should"? What's wrong with operator overloads in the global namespace?

Because if an operator is not defined in the same namespace as one of its argument types, it won't be found from within another namespace that also overloads that operator, even for completely unrelated types:
#include <ostream>

namespace Good
{
    struct Foo {};

    std::ostream& operator << (std::ostream& os, Foo);
}

namespace Wrong
{
    struct Bar {};
}

std::ostream& operator << (std::ostream& os, Wrong::Bar);

namespace User
{
    struct Zan {};

    std::ostream& operator << (std::ostream& os, Zan);

    void dump(std::ostream& os)
    {
        // name lookup in all three statements below finds
        //  User::operator<<(std::ostream&, User::Zan)
        // and a set of standard overloads for fundamental types
        // (brought via ADL because of std::ostream)
        //  std::operator<<(std::ostream&, **fundamental type**)

        os << Zan() << std::endl;

        os << Good::Foo() << std::endl; // OK
        // in addition to overloads from namespaces User and std,
        // ADL brings Good::operator<<(std::ostream&, Good::Foo)

        os << Wrong::Bar() << std::endl; // ERROR
        // ::operator<<(ostream&, Wrong::Bar) won't be found
    }
}

@lightmare, thank you for a good explanation!
I guess that a name lookup for an operator overloads  should start from the global namespace, not from the Catch namespace. So a streaming operations in a template methods ( StringMakerBase::convert(), MessageBuilder::operator<<(), IsStreamInsertable::value, and others) should be moved into function in the global namespace. Somehow like this.

I guess that a name lookup for an operator overloads should start from the global namespace, not from the Catch namespace.

I think it's better when name lookup works the same for operator and non-operator functions.
namespace A
{
    struct X { int value; };
}

A::X foo(A::X x, int i) { return { x.value + i }; }

namespace B
{
    using A::X;
    struct Y { double value; };

    Y foo(X x, double d) { return { x.value + d }; }

    void see() {
        X x = { 3 };
        Y y = foo(x, 5); // calls B::foo(X, double)
        // lookup stops when a name is found,
        // in other words B::foo shadows ::foo
    }
}

// now replace `foo` with `operator+`
// same rules apply

TEST_CASE( "INFO of SomeStdType" )
{
    SomeStdType std_value;
    INFO( "std_value = " << std_value );
    CAPTURE( std_value );
    CHECK( std_value == SomeStdType() );
}

For a normal operation, should name lookup for operator<< in the INFO macro (CAPTURE, CHECK and so on) start from the Catch namespace or from the global namespace? My last commit and fix is exactly about this case with Catch. What's wrong with this solution?

@KVic I misunderstood you last time. I thought you were questioning how name lookup works, as per standard (I've read [basic.lookup] a few times and am still not 100% sure I got it right, it's pretty dense). Now I agree with you that forcing lookup in the global namespace might actually be better, less surprising to users, and only a small change in Catch. Another option would be to remove all operator<< overloads from the Catch namespace, which would likely require more changes.

I haven't had time to keep up properly and the exact ADL rules tend to make me cross-eyed :smile:
Anyway, I think that explicitly pulling in global operator<< before performing the ADL lookup is preferable to poluting global namespace with weirdly named function, and should have the same results.
There would still be issues in Catch with ADL calls, IIRC toString is usually called qualified as Catch::toString, even in places where it is supposed to be a customization point, but that can be solved later.

I spent some time digging through various stringification issues and I believe that they need to be fixed in Catch 2, with larger rework of the stringification layer.

This will now work in Catch2, if you declare the operator<< overload before including catch header. Theoretically it would be possible to make it work even when the overload is declared after including catch header, but not while supporting MSVC (or at least I was unable to find a workaround, that compiles).

Tested this against the released Catch 2, and the results are as above. It works, but operator<< overload needs to be declared before including catch.hpp.


WIP: Add GitHub actions to test build

By submitting this pull request, I confirm the following:
Please fill in any appropriate check-boxes, e.g: [X]

[x]   I have read and understood the contributors guide, as well as this entire template.
[x]   I have made only one major change in my proposed changes.
[ ]   I have commented my proposed changes within the code.
[ ]   I have tested my proposed changes, and have included unit tests where possible.
[ ]   I am willing to help maintain this change if there are issues with it later.
[ ]   I give this submission freely and claim no ownership.

What does this PR aim to accomplish?:
A detailed description, screenshots (if necessary), as well as links to any relevant GitHub issues
How does this PR accomplish the above?:
A detailed description (such as a changelog) and screenshots (if necessary) of the implemented fix
What documentation changes (if any) are needed to support this PR?:
A detailed list of any necessary changes

You must follow the template instructions. Failure to do so will result in your pull request being closed.
Please respect that Tronitor is developed by volunteers, IE: me, who can only reply in their spare time.

What exactly is this trying to accomplish? You didn't put any information other than the title. I'm already using Travis CI to test and build.

Oh, ok, that makes sense to me know. I like the concept and appreciate the time you're putting into it.

PR ready :-)
You can see the results here: https://github.com/jkoan/Docker-Nagios/runs/6554860687
Currently it has no upload included, but this can easily be added.
Just tell me if you want me to add this as well.
If you wane use GitHub Actions you probably need to enable it on this repo as well.


mongo auditview test case

Description
test case for @auditview mongo for view and core update

You did it @sandeepmantha!
Thank you for signing the Anthem Opensource Software CLA.


[Benchmark] Reduce the number of benchmarks

Since we advise to run benchmarks multiple times anyway, there's no need in making them long-running, hence let's run less stuff. Plus, let's not run something that finishes way too quickly, since it's likely that those results are noise.

/benchmark lists

Also, if you run a set benchmarks locally and then look at plutus-benchmark/report.html there's a lot of information about how long the benchmarks took to run and what the distribution of times was like.  Unfortunately we don't have access to that for benchmarks run on the benchmarking machine (although maybe that could be arranged...).

/benchmark lists

Of course that won't work properly.  I'll try in a new PR.

I found some lists results here.  The slowest benchmark was about 200ms, which would be about 75 runs with the 15 second limit.  That's already quite low, so reducing the time might not be such a good idea. Cutting down the number of tests is probably more effective.

I don't think using 3x3 instead of 5x5 will speed things up. Criterion works by executing your program repeatedly until a time limit (by default 5 seconds) is exceeded and then it analyses the times that it's collected

I'd totally forgotten about that! Thank you for spotting. I've restored the original alignment of the benchmarks and simply removed a few of them from nofib and a lot of them from lists. Please rereview and if you're fine with these changes, merge the PR.

I ran this on my laptop and the time for nofib went down from 25 minutes to 22 minutes, which is about what you'd expect given that the nofib benchmarks run for 60 seconds each and you've removed three of them. I think we could safely reduce the time limit to 30s and halve the total time (and remember that when we  run the benchmarks from GitHub they all get run twice).  I might try that in a separate PR.
The lists benchmarks took 19 minutes,  which is a lot less than usual (I think it's about an hour).  Each case runs for 15 seconds, and the faster benchmarks got run tens of thousands of times each; the slowest running ones still got run 153 times, so we might be able to reduce the time limit to 10 seconds without losing too much accuracy.


Bug: Pipelines Pre/Post Task > three dot menu does not close on clicking outside

📜 Description
We can’t disable the toggle in pre post CI (remove and move to pre post) while we adding the plugin
👟 Reproduction steps
1- Create an app
2- Add any plugin in pre CI
3- Add another plugin in pre CI
4- go first plug in to remove (Note:- do not remove)
5- Now try to work any think on this page
👍 Expected behavior
We can able to hide the toggle in pre post CI (remove and move to pre post) while we adding the plugin
👎 Actual Behavior
We can’t disable the toggle in pre post CI (remove and move to pre post) while we adding the plugin
☸ Kubernetes version
AKS : 1.26
Cloud provider
Azure
🌍 Browser
Chrome
🧱 Your Environment
QA
✅ Proposed Solution
No response
👀 Have you spent some time to check if this issue has been raised before?

[X] I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

AB#10128

Fix merge in main


Update credit-card purchase PNL docs

As a developer I want to see updated information about credit-card payments in PNL report document. Currently it says that transactions must be entered manually. However, Binance has opened an API for it.

This was fixed in the last commit.


type object got multiple values for keyword argument 'loss'

🐛 Bug
The error appears when TrainReport has minimize param set and loss log added at the same time with prog_bar=True
Code sample
def training_step(self, batch, batch_idx):
        loss = self(batch)
        result = pl.TrainResult(minimize=loss)
        result.log("loss", loss, prog_bar=True)

        return result

Where the problem is
I followed the code and it comes to the problem with the ProgressBar callback inside progress.py line 339 -> trainer.py line 884 (return dict(**ref_model.get_progress_bar_dict(), **self.progress_bar_metrics)) which returns
ref_model.get_progress_bar_dict()
Out[4]: {'loss': '0.692', 'v_num': 9}
self.progress_bar_metrics
Out[5]: {'loss': 0.6924866437911987}

Expected behavior
Not sure. At least the error message should be a bit clearer since a user does not create two loss logs but just one.
Environment

CUDA:

GPU:
available:         False
version:           None

Packages:

numpy:             1.19.1
pyTorch_debug:     False
pyTorch_version:   1.6.0
pytorch-lightning: 0.9.0
tqdm:              4.49.0

System:

OS:                Windows
architecture:

64bit
WindowsPE

processor:         Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
python:            3.8.5
version:           10.0.18362

I believe TrainResult always shows the value passed to the minimize argument in the progress bar. So, you probably don't need to use result.log to show the loss in the progress bar.

That's true but I think the problem is the error's message.
As I said, a user may not realise why the error appears since they created just one log loss nor that it comes from prog_bar=True. Just saying.
The only idea that I have would be to remove showing minimize loss in progress bar by default and let users set loss log to be shown with prog_bar. That would eliminate the problem. Don't know that's something others would want though.

Thank you for your feedback.
Lightning believes almost all of users may want to show the training loss in the progress bar to be able to check/iterate the model quickly (like in the situation of overfitting the small batch) without the need to use loggers or something extra, so it is done by default and let the users use result.log or self.log for the other metrics or the various losses to show in the progress bar or in the loggers by epoch or step level.
NOTE: self.log is feature from the master branch.
Docs:

https://pytorch-lightning.readthedocs.io/en/latest/new-project.html#logging
https://pytorch-lightning.readthedocs.io/en/latest/lightning_module.html#logging-methods

Got it. I'll close the issue. It'll be for other's people reference if they have the same problem.


Integration tests for this package

Since this package provides a standard test, I suggest to add it to the two tests that we offer to GAP package authors to test development versions of their packages for compatibility with GAP stable and master branches:

https://github.com/gap-packages/gap-docker-pkg-tests-master-devel
https://github.com/gap-packages/gap-docker-pkg-tests-stable-4.10-devel

The first of these two repositories has a README file with further details. To add your package to the test, please submit a pull request to add a line to the .travis.yml file.

@alex-konovalov the orgs in this links are wrong, should be gap-infra -- of course they still "work" due to redirects, but I wonder if they were copy-pasted from a source that still has old links? In that case, mght be a good idea to update that source? Also, let's not forget https://github.com/gap-infra/gap-docker-pkg-tests-stable-4.11-devel
I've written a script which performs these updates automatically, I'll use it to create PRs for these repos.

See here:

https://github.com/gap-infra/gap-docker-pkg-tests-master-devel/pull/20
https://github.com/gap-infra/gap-docker-pkg-tests-stable-4.11-devel/pull/2
https://github.com/gap-infra/gap-docker-pkg-tests-stable-4.10-devel/pull/3

Yes, @fingolfin that was a saved comment. I will update that in my Github profile, thanks for reminding this.

Since @alex-konovalov merged my PRs, this is resolved.