Added support for Laravel 7

Added support for Laravel 7 in Composer, and already changed the readme for (what I think is going to be) the next tag.

Codecov Report

Merging #2043 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #2043   +/-   ##
=========================================
  Coverage     87.15%   87.15%
  Complexity      672      672
=========================================
  Files            31       31
  Lines          1541     1541
=========================================
  Hits           1343     1343
  Misses          198      198

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 4a7f5c1...6f33a23. Read the comment docs.

@luisdalmolin, see https://github.com/jenssegers/laravel-mongodb/releases/tag/4.0.0-alpha.1


Fix link on schedule page

Close #270. Tests added to prevent future errors. :)

[Current coverage][cc-pull] is 82.57%

Merging [#271][cc-pull] into [master][cc-base-branch] will increase coverage by 0.33%

2 files (not in diff) in src were modified. more

Misses -6
Hits +6

@@             master       #271   diff @@
==========================================
  Files            56         56
  Lines          1807       1807
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           1486       1492     +6
+ Misses          321        315     -6
  Partials          0          0

Powered by Codecov. Last updated by [79f2ace...e688835][cc-compare]
[cc-base-branch]: https://codecov.io/gh/pycontw/pycontw2016/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/pycontw/pycontw2016/compare/79f2aceadc8142c410c7baeef5d882484f8af030...e6888353d1acba59ebddf58ecaa4717ffe49c8b4
[cc-pull]: https://codecov.io/gh/pycontw/pycontw2016/pull/271?src=pr


Update with the new help command

In addition to #3286 #3159

Update the README.md in the blueprints
Remove the invalid completions

LGTM. Thanks!


Append to existing links

This PR:

makes sure we append to the links of content items rather than overriding them;
changes the namespace of 2 service classes, making it more obviously where they are being used.

More details in the commit messages below.

Looks good to me, let me know when it gets merged so I can pull master to resolve a possible conflict.
Thanks 👍


Development

Real voltage export constructor parameter type changed.
Behavior factories are now static. They are indexed by their type by the Entity class.
Behavior factories expect the entity that wishes to create the behavior. This allows differentiation between different types of entities when necessary.
Circuits can now enumerate entities even when an ordered entity list is not built. May be necessary when copying/cloning circuits or other operations that do not involve simulation.

Codecov Report

Merging #69 into master will increase coverage by 4.89%.
The diff coverage is 96.77%.

@@            Coverage Diff            @@
##           master     #69      +/-   ##
=========================================
+ Coverage    72.5%   77.4%   +4.89%
=========================================
  Files         290     290
  Lines       14589   14700     +111
=========================================
+ Hits        10578   11378     +800
+ Misses       4011    3322     -689

Impacted Files
Coverage Δ

SpiceSharp/Components/RLC/CAP/CapacitorModel.cs
100% <ø> (ø)
:arrow_up:

...piceSharp/Simulations/Exports/RealVoltageExport.cs
61.53% <ø> (ø)
:arrow_up:

...eSharp/Simulations/Exports/ComplexVoltageExport.cs
47.05% <ø> (ø)
:arrow_up:

...rentsources/VCCS/VoltageControlledCurrentSource.cs
100% <100%> (+46.15%)
:arrow_up:

SpiceSharp/Circuits/Validator.cs
94.07% <100%> (+94.07%)
:arrow_up:

SpiceSharp/Components/Semiconductors/DIO/Diode.cs
100% <100%> (+33.33%)
:arrow_up:

...mponents/Semiconductors/MOS/Level2/Mosfet2Model.cs
100% <100%> (ø)
:arrow_up:

...oslessTransmissionLine/LosslessTransmissionLine.cs
83.33% <100%> (+4.38%)
:arrow_up:

...rp/Components/Semiconductors/MOS/Level3/Mosfet3.cs
100% <100%> (ø)
:arrow_up:

...rentsources/CCCS/CurrentControlledCurrentSource.cs
93.1% <100%> (+1.43%)
:arrow_up:

... and 59 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 b9b1231...aa66158. Read the comment docs.


Moya update with Carthage cannot found Alamofire with param --user-xcframework

I am using Carthage at version 0.38.0, Moya version: 15.0.3 to build project on Intel chip.
But it failed when i use the shell script:
set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.

CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1300__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig

echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1300 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1300__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
/usr/local/bin/carthage "$@"

build script:
./carthage.sh update --platform iOS --no-use-binaries --use-netrc --use-xcframeworks

The error message is that:
"Cannot found Alamofire in Moya file."

I solved this problem by manually re-adding the AlamoFire and ReactiveSwift dependencies to the build phase for the moya project, and then using the build command to solve the problem.
···
./carthage.sh build --platform iOS --no-use-binaries --use-netrc --use-xcframeworks
···


Use Coda_base.Account for ledger testing

As a step to integrating the Merkle mask with Coda_base.Ledger, the tests for Merkle_ledger_tests and Syncable_ledger use Coda_base.Account module, instead of the Account that was in Merkle_ledger_tests.Test_stubs. The main targets for this change were Merkle_ledger.Database and Merkle_mask.Masking_merkle_tree and their tests, but the change also propagated to the tests in Syncable_ledger.
The new Account module uses real public keys, instead of strings. That means that Quickcheck-generation of keys is slower, to the point where I commented out a couple of tests in Syncable_ledger, indicating that those tests should run elsewhere. I added issue #1088 on this topic. Also, for some of the tests in Merkle_ledger_tests, I introduced a ~trials parameter, or lowered the existing value of that parameter, to allow the inline tests to run in a reasonable time.
While testing the new code, I noticed that the Quickcheck generator for public keys generates duplicates fairly easily, causing test failures that weren't seen when keys were strings. See issue #1078. There's a workaround in Test_stubs.Key.gen_keys, which is used in several places.
Also, I added a location-allocation mechanism for masks, similar to the one used in Merkle_ledger.Database.Account_location. The type t for (attached) masks has a new table mapping public keys to locations, and a mutable field for the last location allocated. That change enables the get_or_create_account functions for the mask not to delegate to the parent (which was the wrong thing).
Checklist:

[x] Tests were added for the new behavior
[x] All tests pass (CI will check this if you didn't)
[ ] Does this close issues? No.

@johnwu93 suggests maybe it's better to have the tests parametric in the Account and Key modules, rather than committing to public keys. The old test code committed to using strings as keys. I'll look again at the code in this PR, and see if I can confirm there's no commitment to public keys.

I agree, we shouldn't use the old stub.


Support transparent FBOs

Setting the background to full alpha for FBOs is not necessary. This avoids state changes is also less code.
Can be tested with MiniMap.

Hooray Jenkins reported success with all tests good!

I'm pretty sure that this didn't work half a year ago. I wonder what changed so that grass is no longer semi-transparent in minimaps.

I have no idea but pinging @emanuele3d and @tdgunes just in case they'd have any clues :-)
@msteiger can you find any old related issues/forum threads? Anything that might remind us of past details? If actually needed/useful, unsure if.
Main thing that came to mind for me was http://forum.terasology.org/threads/bug-with-the-transparent-mesh.1058/ which in turn led to the closed PR #1591 but that could be entirely unrelated.

Sorry, as far as I know the modified class is used only in the context of the UI and I know nothing of that side of things! =(
So, I trust msteiger that he knows what he's doing... =)

Went ahead and did a TeraMath release for v1.3.0, updated engine to use that, then merged latest Minimap which uses it, and finally tested this with all that in place and everything seemed well :-)
Editing title here real quick to have it also count as bumping the TeraMath dependency.


rsync of local copy doesn't fail, but doesn't copy the file

create src/f1.txt and dst empty directories under /tmp, then issue:
rsync -vvvv /tmp/src/f1.txt /tmp/dst/
cmd=<NULL> machine=<NULL> user=<NULL> path=/tmp/dst/
cmd[0]=. cmd[1]=/tmp/dst/
msg checking charset: ISO8859-1
(Server) Protocol versions: remote=31, negotiated=31
(Client) Protocol versions: remote=31, negotiated=31
[sender] make_file(f1.txt,*,0)
[sender] flist start=0, used=1, low=0, high=0
[sender] i=0   mode=0300000644 len=10 flags=0
send_file_list done
[sender] flist_eof=1
file list sent
send_files starting
server_recv(2) starting pid=33554771
recv_file_name(<NULL>)
received 1 names
[Receiver] flist_eof=1
[Receiver] flist start=0, used=1, low=0, high=0
[Receiver] i=0   mode=0300000644 len=10 flags=0
recv_file_list done
get_local_name count=1 /tmp/dst/
generator starting pid=33554771
delta-transmission disabled for local transfer or --whole-file
generate_files phase=1
send_files phase=1
recv_files(1) starting
recv_files phase=1
generate_files phase=2
send_files phase=2
send files finished
total: matches=0  hash_hits=0  false_alarms=0 data=0
recv_files phase=2
recv_files finished
generate_files phase=3
generate_files finished
client_run waiting on 33554771

sent 30 bytes  received 500 bytes  1,060.00 bytes/sec
total size is 10  speedup is 0.02
[sender] _exit_cleanup(code=0, file=main.c, line=1327): entered
[sender] _exit_cleanup(code=0, file=./main.c, line=1327): about to call exit(0)

says 'total size 10 bytes' (which is right for me) but:
ls src dst
dst:

src:
f1.txt

On My Mac:
rsync -vvvv /tmp/src/f1.txt /tmp/dst/
cmd= machine= user= path=/tmp/dst/
cmd[0]=. cmd[1]=/tmp/dst/
(Server) Protocol versions: remote=29, negotiated=29
(Client) Protocol versions: remote=29, negotiated=29
[sender] make_file(f1.txt,*,2)
server_recv(2) starting pid=32942
[sender] i=0 /tmp/src f1.txt mode=0100644 len=10 flags=0
send_file_list done
file list sent
send_files starting
recv_file_name(f1.txt)
received 1 names
[receiver] i=0 1 f1.txt mode=0100644 len=10 flags=0
recv_file_list done
get_local_name count=1 /tmp/dst/
generator starting pid=32942 count=1
delta-transmission disabled for local transfer or --whole-file
recv_generator(f1.txt,0)
send_files(0, /tmp/src/f1.txt)
count=0 n=0 rem=0
send_files mapped /tmp/src/f1.txt of size 10
calling match_sums /tmp/src/f1.txt
f1.txt
sending file_sum
false_alarms=0 hash_hits=0 matches=0
sender finished /tmp/src/f1.txt
generate_files phase=1
send_files phase=1
recv_files(1) starting
recv_files(f1.txt)
data recv 10 at 0
got file_sum
renaming .f1.txt.lq8077 to f1.txt
recv_files phase=1
generate_files phase=2
send_files phase=2
send files finished
total: matches=0  hash_hits=0  false_alarms=0 data=10
recv_files phase=2
recv_files finished
generate_files phase=3
generate_files finished
client_run waiting on 32942

sent 97 bytes  received 42 bytes  278.00 bytes/sec
total size is 10  speedup is 0.07
_exit_cleanup(code=0, file=/AppleInternal/Library/BuildRoots/20d6c351-ee94-11ec-bcaf-7247572f23b4/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c, line=996): entered
_exit_cleanup(code=0, file=/AppleInternal/Library/BuildRoots/20d6c351-ee94-11ec-bcaf-7247572f23b4/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c, line=996): about to call exit(0)
fultonm@ca.ibm.com@mikes-MBP /tmp % ls src dst
dst:
f1.txt

src:
f1.txt

Problem: [sender] i=0   mode=0300000644 len=10 flags=0

So there are 2 issues:

when I made the mode 32-bits instead of 16 bits, the file name seems to have got 'lost'. Either I rebuilt things wrong or there are structural layout assumptions being made in the code somewhere
if I am connecting z/OS <-> z/OS, this mapping difference for mode_t is not a problem, but it would cause problems if I was to sync with another platform. One idea: right at the spot where the code writes to the wire, e.g. write_int(to_wire_mode(mode)) in flist.c, we can map from a z/OS 'mode' to a Linux 'mode' and send that over the wire if we are on z/OS. Similarly, right at the spot where the code reads from the wire, e.g. from_wire_mode(read_int(f)), we can map from a Linux 'mode' back to a z/OS 'mode'.

I got the first problem fixed by packing the struct being copied (have to figure out why that matters still). Here is the output of something a little more complex - copying a directory to a directory. Note that the files are not tagged on copy because extended attributes are not copied as part of rsync:
rsync -vvvv -r ./src/ ./dst/
cmd=<NULL> machine=<NULL> user=<NULL> path=./dst/
cmd[0]=. cmd[1]=./dst/
msg checking charset: ISO8859-1
(Server) Protocol versions: remote=31, negotiated=31
(Client) Protocol versions: remote=31, negotiated=31
sending incremental file list
[sender] make_file(.,*,0)
[sender] pushing local filters for /u/fultonm/src/
[sender] make_file(f2.txt,*,2)
[sender] make_file(f1.txt,*,2)
[sender] flist start=1, used=3, low=0, high=2
[sender] i=1 ./src ./ mode=0100000755 len=8,192 flags=5
[sender] i=2 ./src f1.txt mode=0300000644 len=12 flags=0
[sender] i=3 ./src f2.txt mode=0300000644 len=8 flags=0
send_file_list done
[sender] flist_eof=1
file list sent
send_files starting
server_recv(2) starting pid=429
recv_file_name(.)
recv_file_name(f2.txt)
recv_file_name(f1.txt)
received 3 names
[Receiver] flist start=1, used=3, low=0, high=2
[Receiver] i=1 0 ./ mode=0100000755 len=8,192 flags=5
[Receiver] i=2 1 f1.txt mode=0300000644 len=12 flags=0
[Receiver] i=3 1 f2.txt mode=0300000644 len=8 flags=0
recv_file_list done
get_local_name count=3 ./dst/
generator starting pid=429
delta-transmission disabled for local transfer or --whole-file
recv_generator(.,0)
recv_generator(.,1)
recv_generator(f1.txt,2)
recv_generator(f2.txt,3)
send_files(0, ./src/.)
send_files(2, ./src/f1.txt)
count=0 n=0 rem=0
send_files mapped ./src/f1.txt of size 12
calling match_sums ./src/f1.txt
f1.txt
sending file_sum
false_alarms=0 hash_hits=0 matches=0
sender finished ./src/f1.txt
send_files(3, ./src/f2.txt)
count=0 n=0 rem=0
send_files mapped ./src/f2.txt of size 8
calling match_sums ./src/f2.txt
f2.txt
sending file_sum
false_alarms=0 hash_hits=0 matches=0
sender finished ./src/f2.txt
recv_files(3) starting
[receiver] flist_eof=1
recv_files(.)
recv_files(f1.txt)
recv mapped f1.txt of size 12
data recv 12 at 0
got file_sum
renaming .f1.txt.HgahxQ to f1.txt
recv_files(f2.txt)
recv mapped f2.txt of size 8
data recv 8 at 0
got file_sum
renaming .f2.txt.DcFHxQ to f2.txt
[generator] flist_eof=1
generate_files phase=1
touch_up_dirs: . (0)
send_files phase=1
recv_files phase=1
generate_files phase=2
send_files phase=2
send files finished
total: matches=0  hash_hits=0  false_alarms=0 data=20
recv_files phase=2
recv_files finished
generate_files phase=3
generate_files finished
client_run waiting on 429

sent 180 bytes  received 1,147 bytes  2,654.00 bytes/sec
total size is 20  speedup is 0.02
[sender] _exit_cleanup(code=0, file=main.c, line=1327): entered
[sender] _exit_cleanup(code=0, file=./main.c, line=1327): about to call exit(0)
FULTONM@zopen bash ~ >chtag -p src/* dst/*
t ISO8859-1   T=on  src/f1.txt
t ISO8859-1   T=on  src/f2.txt
- untagged    T=off dst/f1.txt
- untagged    T=off dst/f2.txt
FULTONM@zopen bash ~ >ls -rtl src/* dst/*
-rw-r--r--   1 FULTONM  ZOTGRP        12 Sep  8 19:34 src/f1.txt
-rw-r--r--   1 FULTONM  ZOTGRP         8 Sep  8 22:28 src/f2.txt
-rw-r--r--   1 FULTONM  ZOTGRP         8 Sep  8 23:41 dst/f2.txt
-rw-r--r--   1 FULTONM  ZOTGRP        12 Sep  8 23:41 dst/f1.txt


Feat/access token two unit tests

Proposed changes
What changed
2nd part of #85 - this adds in unit tests and additional code features.
Note: Merge #89 first as that sets up the scaffolding
Note: The pre-merge acceptance tests are being work on in #90 so the single commit with the feature file changes can be dropped before merging.

Why did it change

Issue tracking

OJ-XXXX

Checklists
Environment variables or secrets

[ ] No environment variables or secrets were added or changed

[ ] Documented in the README
[ ] Added to deployment repository
[ ] Added to local startup repository

Other considerations

[ ] Update README with any new instructions or tasks

Closing as this is better done in the original PR


[New port Request] ncurses

I made a search about ncurse library but I can't find it in vcpkg, I think we need to add it to packages

If you wish to add this port in the future, you can reopen this issue, but we're closing it for now.


Doc: VS code remove deleted remote branches (GitHub)

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Description
remove github deleted branches from VSCode
(Ctrl+Shift+P)select Git: Fetch (Prune).
Self-service

[ ] I'd be willing to address this documentation request myself.

Not important enough.

Don't misunderstand, we have nothing against said documentation, however this is not important enough for us to work on if someone has the time to write the docu please go ahead. Say yes and we will reopen the issue or you can also start a new one.


Predict undefined parameters' properties after first run in nodejs

Somewhere in my code i define a function with an object parameter that can be anything ,
somewhere else i call that function with a specific object from a nodejs module ,
now i wan't to add some code to the function , and i wan't visual studio code to know what's gonna used as function parameter.
is it possible ? is it already implemented in vs code or will you add it ?

So what you're looking for is inference about the type of a parameter based off of having run your code once? Don't think that's planned, but we'll keep it in mind! cc @weinand, @roblourens, @isidorn

I think @jd1378 is asking for static type inference like Flow based on what type is passed to the function, right?

right , i want to run and use the function once and then when i'm not running i want Intellisense to show suggestions about the parameter based on what it was in the last run .

Ok nvm I guess you are asking for what @mousetraps describes.

This feature request will not be considered in the next 6-12 months roadmap and as such will be closed to keep the number of issues we have to maintain actionable.
Thanks for understanding and happy coding!


[game] Store config in user config directory

As per the documentation, this would store the usc folder with the config data in one of the following:

Platform
Value
Example

Linux
$XDG_CONFIG_HOME or $HOME/.config
/home/alice/.config

macOS
$HOME/Library/Application Support
/Users/Alice/Library/Application Support

Windows
{FOLDERID_RoamingAppData}
C:\Users\Alice\AppData\Roaming

This won't copy any data, so you'll have to move the folder to the new expected location (unless it successfully generates a blank folder for you, which it doesn't for me), and also delete maps.db.

I'll leave this open because I'm undecided on this. Since that folder is also used (for now at least) for skins and songs (default) I would like to have it at a more "top level" location.
I think Linux ~/.config is ok. I don't know how finder shows ~/Library/Application Support. I don't like using AppData\Roaming on windows

I'd much rather have all game related data remain in the game directory to keep it portable. AppData is a pain.
Giving users choice is always an option too.

There is a windows build that behaves in the "portable" way now and I think a build like that is less important on the other platforms. I think a "open game folder" button would be nice.
Closing this as it's a bit stale and the best solution might be something else.


add CMIP6 cleanup service

We need to create a service to clean up raw CMIP6 files.
The service should:

ingest CMIP6 raw models (as they are chunked from the Pangeo archive, in time) as zarr stores
remove additional unneeded dimensions, e.g. height, member_id, time_bnds
if leap days are present in the climate model, remove leap days and update the calendar to noleap
compute with an optional pre-existing regridding weights file
save the cleaned up model as a zarr store

@dgergel Spitballing while I'm thinking about this: If we put this logic into dodola rather than it's own script single, this sounds like it might be multiple services and not a single "cleaning" service. By this I mean "data cleanup" is more of a workflow rather than a single step. In contrast, "removing leapyears" is a step within that workflow that dodola might be able to provide as a general service.

I thought about whether removing leap days should be its own service, but because we're doing it for some models and not others and need to check the time dimension to figure out what calendar the GCM is on, I was thinking it makes sense to have leap day removal not be on its own as a service.
As for the cleanup being multiple services, I was thinking of starting off with having it as one service, and if it becomes too clunky like that, then we could split it out into multiple.


Bump identity-apps console version to 2.9.45

$subject

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/7077303118

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/7077303118
Status: success


Deps update

The dependencies that were not updated require a bit more work, I think we should create tickets to update each one of them, including getting rid of the forks if possible.
@josephbaylon had to disable a couple of tests cause I did not find the proper way to mock react-native-permissions can you please take a look?
Pending deps:

@react-native-community/netinfo -> requires changes in redux-offline
redux-offline -> update to make it work with latest netinfo
react-intl -> there is a ticket for this one
react-native-calendars -> should be updated, patched and remove the fork
react-native-cookies -> this has been moved to react-native-community we should use that one and remove the fork
react-native-device-info -> we should use the library as it comes and remove whatever we have added, including the timezone change detection that can be ported to its own module
react-native-doc-viewer -> update with latest, patch and remove fork
react-native-image-picker  -> update with latest and patch if needed
react-native-keyboard-tracking-view -> update with latest, patch and remove fork
react-native-local-auth -> use upstream, patch and remove fork
react-native-navigation -> update and patch if needed
react-native-notifications -> update and patch if needed
react-native-webview -> Use upstream and patch (if not possible keep update and keep fork)
rn-placeholder -> use upstream, patch and remove fork

Do not update:

redux-persist -> too many breaking changes
react-navigation-stack -> only used for the Android share extension and is introducing too many peer dependencies that we do not need
react-native-image-gallery -> up  to date -> we should remove it and re-do the gallery (another ticket)

@migbot if for some reason (I hope not) hermes does not make it (definitely hope that does not happen) then we also need to update the modulesNames and modulePaths files.

Yes, Icons are dead code

@chuttam although I share your preferences everything on this PR was related to the dep updates, a few deps required code changes not only bumping the version, this will probably be true for every dep update.
The fix for the Android sharing issue escaped.
The one thing that I did add was the deletion of unneeded code


docs: How does Sirenia work?

Hi,
assuming I would want to write a memcached Sirenia appliance, how would I do it? What is the idea and architecture behind Sirenia?

Flynn is unmaintained and our infrastructure will shut down on June 1, 2021. See the README for details.


parsing json

Hello, i want to parse a json i get from a website, however Im not sure how to get the data into events to use this on the peak detector agent.
{
  "body": "{\"evacuacion\":5.3,\"alerta\":5,\"datos\":\"[[1.479222E+12,3.48],[1.4791788E+12,3.48],[1.4791356E+12,3.48],[1.4790924E+12,3.48],[1.4790492E+12,3.48],[1.479006E+12,3.47],[1.4789628E+12,3.47],[1.4789196E+12,3.46],[1.4788764E+12,3.46],[1.4788332E+12,3.44],[1.47879E+12,3.44],[1.4787468E+12,3.41],[1.4787036E+12,3.41],[1.4786604E+12,3.41]]\",\"max\":5.35,\"min\":3.36,\"puerto\":\"ROSARIO\"}",

  "headers": {
    "Date": "Tue, 15 Nov 2016 15:33:50 GMT",
    "Server": "Apache",
    "X-Powered-By": "PHP/5.4.45",
    "Content-Length": "372",
    "Content-Type": "text/html"
  },
  "status": 200
}

i need to get an event for every number in "datos" field, also the one with the exponential number is a date
as if now i have defined a PostAgent
{
  "post_url": "http://www.site.com/param.php",
  "expected_receive_period_in_days": "1",
  "content_type": "form",
  "method": "post",
  "payload": {
    "var1": "ar",
    "var2": "7"
  },
  "headers": {},
  "emit_events": "true",
  "no_merge": "false"
}

and then a website agent
{
  "expected_update_period_in_days": "2",
  "type": "json",
  "mode": "all",
  "data_from_event": "{{body}}",
  "extract": {
    "description": {
      "path": "datos"
    }
  }
}

Hi @luismanson,
you can parse the JSON using a JsonParseAgent, configure data with {{ body }} and then feed the parsed event to the PeakDetector.

i think its not working:
Json Parse Agent:
{
  "data": "{{ body }}",
  "data_key": "datos"
}

the source is my postAgent

How does the event of the JsonParseAgent look?

this is the payload:
{
  "datos": {
    "evacuacion": 5.3,
    "alerta": 5,
    "datos": "[[1.479222E+12,3.48],[1.4791788E+12,3.48],[1.4791356E+12,3.48],[1.4790924E+12,3.48],[1.4790492E+12,3.48],[1.479006E+12,3.47],[1.4789628E+12,3.47],[1.4789196E+12,3.46],[1.4788764E+12,3.46],[1.4788332E+12,3.44],[1.47879E+12,3.44],[1.4787468E+12,3.41],[1.4787036E+12,3.41],[1.4786604E+12,3.41]]",
    "max": 5.35,
    "min": 3.36,
    "var": "value"
  }
}

It looks like the data in datos.datos is escaped in JSON again which is a bit odd. The PeakDetector is designed to looks for peaks in values send to it over time, setting it's value_path to $.datos.max should work if you are looking for peaks in the time series.

thanks dsander, i endedup scrapping the HTML, it was a lot easier :+1:


Client can not decode Event list with release event included

The current client can not decode the event list that includes an release event. It throws an error at this line:
https://github.com/Polkadex-Substrate/polkadexTEE-worker/blob/develop/client/src/main.rs#L889
whenever an release event is included within the block.

There is a need to preregister the types of the event to be able to decode it, like is done here:
https://github.com/integritee-network/worker/blob/e2619abfff07a2fd9054fcbd4e23879cc0d0eba3/client/src/main.rs#L554-L558
In this case the missing type is most probably the AssetId. But AssetId is an enum, hence of variable type length.. which the EventDecode does not seem to be able to handle:
https://github.com/scs/substrate-api-client/blob/master/src/events.rs#L111
Still, it's worth a try .. if it does not work, we will see about this.

Hey @haerdib, by release event you mean this (https://github.com/Polkadex-Substrate/Polkadex/blob/main/pallets/ocex/src/lib.rs#L97) ?

@haerdib, if error is coming because its not able to decode AssetId. So cant we add AssetId here (https://github.com/scs/substrate-api-client/blob/master/src/events.rs#L84-L104)?

For now we put this issue on hold - we do not depend on events within the enclave. Leaving it open however because it's not yet solved - in case we will work with event due to whatever reason this issue needs to be solved.


fresh mvn clean install fails

It appears there is an issue with the default configuration for this project. If you do a fresh clone, and try mvn clean install there will be errors.
The issue appears to be in ValidatorTest.java:158. The bundle will most likely never equal null. Instead changing this line to:
if(bundle != null && bundle.getId().getIdPartAsLong() != null ) {
appears to work.
Also for the project to build without issue the Config.java should also have "http://ontoserver.csiro.au/stu3-latest/" added to VALIDATOR_TERMINOLOGY_SERVER_URLS.

Thanks. I have updated the terminology server list and relevant error handling in case of no access. We cannot use STU3 terminology servers for DSTU2 resources, the HL7 Validator does not work with them.


Bitcode

Hi. Great work. Really easy to use. Do you have plans for bitcode support?

Sorry it was my Carthage setup to blame.


fromNow and toNow

If I understand this right then one of these fromNow and toNow functions should be used for dates in the past and the other for dates in the future? Could there be a new function like relative or something that determines which to use based on if the date provided is in the past or future? Would simplify the application logic.

No, the two functions just express opposite relationships:fromNow tells you the date relative to now whereas toNow tells you how to express now relative to the date. IOW, what you're calling relative is just fromNow:
> moment("2016-05-25").fromNow()
'in 6 months'
> moment("2015-10-14").fromNow()
'a month ago'

I suspect toNow is rarely used...


useRangeLabels() doesn't seam to work

I can't get this feature to work. I can simply see no difference in my GUI.
With useRangeLabels():

The field should contain "Letzten 7 Tage" and not "25.07.2024 - 31.07.2024", shouldn't it?
Without useRangeLabels():

Could you share your code?

Sure. The code is pretty basic:
DateRangeFilter::make('valued_at')
  ->label('Wertstellung am')
  ->timezone(config('app.display_timezone'))
  ->displayFormat('DD.MM.YYYY')
  ->format('d.m.Y')
  ->withIndicator()
  ->useRangeLabels(),

Did I describe the intention of the feature correctly?

DateRangeFilter::make('valued_at')
  ->label('Wertstellung am')
  ->timezone(config('app.display_timezone'))
  ->displayFormat('DD.MM.YYYY')
  ->format('d.m.Y')
  ->withIndicator()
  ->useRangeLabels(),

It works fine at my end, could you share a reproduction repo

I found the cause of the issue. I am using Date::use(CarbonImmutable::class); in my AppServiceProvider. So all my dates are immutable. When I comment that out, it works perfectly fine. But I'm not sure why this is an issue.

Thanks for reporting

Do you have any idea why using immutables influences this feature?

The package is not using immutable Carbon and might have made a mismatch when comparing dates


Issue #63 add VCN (subnets) Logging

Proposed change

How has these changes been tested?
Automated testing
If you're running automated testing for this module, we would love to hear from you, and potentially integrate it to the module standard workflow.

Manual testing
If no automated testing is run, please ensure that at least the three steps below are passing without any error.

[ ] Running terraform apply on each example provided with this module provisions the intended resource(s) without any errors.
[ ] Modifying module's Input Variables after initial provisioning behaves as intended, i.e: any updateable properties are ameneded without recreation of the resource(s).
[ ] Running terraform destroy on each example provided with this module destroys all the resources created by this module and only the resources created by this module.

Checklist before submitting your PR

[ ] My code follows the style guidelines of this project
[ ] these changes provision new resources:

[ ] I have updated the README introduction section (README.adoc)
[ ] I have updated the README introduction section (README.md)

[ ] these changes adds any new variables:

[ ] I have updated docs/terraformoptions.adoc to include each variable

[ ] I have updated the changelog to include an entry for these changes
[ ] I have updated all provided examples, including each README file and all applicable code blocks
[ ] these changes generates no new warnings
[ ] Any dependent changes have been merged and published in upstream modules

Note: If you are not an Oracle employee, to contribute to an Oracle-sponsored open-source project, you need to sign the Oracle Contributor Agreement (OCA).

@hyder  - This PR is the solution for the issue https://github.com/oracle-terraform-modules/terraform-oci-vcn/issues/63 - https://github.com/oracle-terraform-modules/terraform-oci-vcn/issues/63

Why did you close it?


Page Properties

Please use the form below, leaving the prefilled data to help us. Thank you.
Page link: Page Properties
Document link: page-properties.md
My Issue/Suggestion

add screenshot for better understanding

Hi @daeyoungWie, thank you for your feedback!
Do you mean to update the current screenshot to show where the Properties pane is located? Since we have the layout describe in the Studio Pro Overview and since users can change the layout of panes, we were aiming at showing only the properties on this screenshot. We have the same standard for widgets, for example, Data View.
If you mean adding the screenshot somewhere else in the document, could you please specify where?
Best regards,
Maria

@daeyoungWie, as I could not find a problem I will close this issue. If you run into any other issue that the Documentation team can help with, please let us know. You can also try the Mendix Forum or Support if you run into other kinds of errors.
Best regards,
Maria


Refactor/rating extension

PR Type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:
What Is the Current Behavior?
On product detail page product reviews are not display.
The number behind the rating stars of a product displays the average rating (bug).

Issue Number: Closes #
What Is the New Behavior?
On product detail page the user can click a reviews tab to see the review comments of other users. Creating a review comment is still pending and will be done soon.
The number behind the rating stars displays the number of ratings.
The rating feature is implemented in an extension.
Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No
Other Information

There is still an issue left: If the user opens the reviews tab the reviews are fetched from the server twice. This has to be solved before the PR can be merged.

There is still an issue left: If the user opens the reviews tab the reviews are fetched from the server twice. This has to be solved before the PR can be merged.

Issue was fixed by removing doubled productReviews$ | async  pipe.


feat(s9 6v6): Remove OW2 support passive while keeping global regen passive

submitting as draft SO DON'T MERGE

Import regen passive logic from dev branch
add bonus HPS depending on player max health

Looks like mercy sympathetic recovery doesn't work because this code removes all self healing and tries to recreate it.

We won't plan to support Spilo's S9 HP branch in the future, and even if we decide to revisit S9 HP we'll be doing much more to maintain the game feel of 7HSKW. Closing for now.


Publish Image to Docker

I tried this on my fork and it is working to publish to Github Packages in the repo.
name: my-project

services:
  mysql:
    image: mysql:latest
    command: ["--max_connections=1000"]
    environment:
      MYSQL_DATABASE: "${MYSQL_DATABASE:-myproject}"
      MYSQL_USER: "${MYSQL_USER:-myproject}"
      MYSQL_PASSWORD: "${MYSQL_PASSWORD:-myproject}"
      MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD:-myproject}"
    volumes:
      - mysql-data:/var/lib/mysql
  ps-http:
    image: ghcr.io/vinlock/ps-http-sim:latest
    command: ["-mysql-dbname=myproject", "-mysql-addr=mysql"]
    ports:
      - "8080:8080"

volumes:
  mysql-data: {}

I am able to load my app with the @planetscale/database NPM package via Drizzle.
import { drizzle } from 'drizzle-orm/planetscale-serverless'
import { connect } from '@planetscale/database'

import * as schema from './schema'

const connection = connect({
  url: 'http://root:myproject@<IP_ADDRESS>:8080',
})

export const db = drizzle(connection, {
  schema,
})

I kinda feel like I should leverage goreleaser's support here? https://goreleaser.com/customization/docker/
Considering I already use this to build and push the release, and I assume, this would gain actual tags, rather than only latest?

Ok, cool, I got it all going in 3df11532e69ec8fa278cde8d96f9b8e34c861fef and v0.0.3 published through this.
Thanks for giving me the jumpstart I needed. :)


Hi @sagemintblue,
I have contacted some tests in local mode with the following version of pig
pig-0.11.0+46-1.cdh4.7.1.p0.10.el6.noarch
and seems that this commit brakes the compatibility for that version and generally for pig-0.11 I suppose. Particularly the "org/apache/pig/tools/pigstats/mapreduce/* " classes are missing. However the README.md indicates that Pig 0.11 is actually supported.
Thanks


Use module: node12 in tsconfig.json

cli-table and is-installed-globally will fail to compile because they do not provide an ESM. There is nothing I can do...
> yarn run lint:tsc:src
yarn run v1.22.15
$ tsc -p tsconfig.src.json --noEmit
src/formatter/format-by-rules.ts:2:19 - error TS2307: Cannot find module 'cli-table' or its corresponding type declarations.

2 import Table from 'cli-table';
                    ~~~~~~~~~~~

src/index.ts:2:33 - error TS2307: Cannot find module 'is-installed-globally' or its corresponding type declarations.

2 import isInstalledGlobally from 'is-installed-globally';
                                  ~~~~~~~~~~~~~~~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  /Users/mizdra/src/github.com/mizdra/eslint-interactive/src/formatter/format-by-rules.ts:2
     1  /Users/mizdra/src/github.com/mizdra/eslint-interactive/src/index.ts:2
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

some actions (disablePerLine, disablePerFile, applySuggestions) is failed because dist/rules/transform.cjs is ignored by this codes...


Fixed BlockChangePacket after last changes

It's important to follow read/write order.
java.lang.AssertionError: Received incorrect X position
Expected :1
Actual   :259

Whoops, thanks. Totally missed that. I was a little rushed at the time due to time constraints.

Maybe i can help with something else? I am interested in keeping this library in good quality


[Coverity CID :203528]Integer handling issues in /tests/lib/fdtable/src/main.c

Static code scan issues seen in File: /tests/lib/fdtable/src/main.c
Category: Integer handling issues
Function: test_z_alloc_fd
Component: Tests
CID: 203528
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

f1afb4c24d0
 82void test_z_alloc_fd(void)
 83{
 84        const struct fd_op_vtable *vtable = NULL;
 85        int *obj = NULL;
 86
   	1. negative_return_fn: Function z_alloc_fd(obj, vtable) returns a negative number. [show details]
   	2. assign: Assigning: fd = z_alloc_fd(obj, vtable).
 87        int fd = z_alloc_fd(obj, vtable); /* function being tested */
 88
 89        obj = z_get_fd_obj_and_vtable(fd, &vtable);
 90
   	3. Condition (void *)obj == NULL, taking true branch.
   	4. Condition (void *)obj == NULL, taking true branch.
   	5. Condition "obj is different after allocating", taking true branch.
   	6. Condition "obj is different after allocating", taking true branch.
 91        zassert_equal_ptr(obj, NULL, "obj is different after allocating");
   	7. Condition (void *)vtable == NULL, taking true branch.
   	8. Condition (void *)vtable == NULL, taking true branch.
   	9. Condition "vtable is different after allocating", taking true branch.
   	10. Condition "vtable is different after allocating", taking true branch.
 92        zassert_equal_ptr(vtable, NULL, "vtable is different after allocating");
 93

CID 203528 (#1 of 1): Improper use of negative value (NEGATIVE_RETURNS)
11. negative_returns: fd is passed to a parameter that cannot be negative. [show details]
 94        z_free_fd(fd);
 95}

@nashif Who in Intel takes this one?


[BUG] TwigComment: Adding white space on opening comment tag after every run

On multiline comments, it will always add an extra white space after opening a comment tag.

Resolved


Reject empty or too long labels.

This PR rejects null or empty labels, and limits label length to 128 chars

Looks good to me. My main concern is if 128 chars is too restrictive. I've seen many clients using long step labels...

(also noted on the espresso PR) - maybe we should add some thorough param validation in the Event constructor as well? Now that we are shaking things up here anyway...

@kamstrup please re-review


Sync Look With Main Site

Sync the look of the Cupcake Physics blog with the main site.

Nick is currently taking care of this.

Pushed the updated site out on the morning of May 12. Looks good.


Is possible don't checked children?

Hi,
I have a case where I need select parent item and I don't want to check its children.
Is possible do this in this plugin? Or when can I change specific part of code when it is cheched all children.
Thank you.

The easiest thing to do is to use a regular checkbox instead of the one provided by this directive in your template and just bind to the selected property of your node: http://jsbin.com/tokeso/2/edit?html,js,output

@jtrussell I required the same functionality. But, I needed an option for turning the hierarchical selection off. I did think of using the template but there were too many trees where I would have to change this.
Please let me know if I can submit a PR for this.


Resolve indent formatting in visitors.rs

Adds formatting for the function parameters, should resolve #1035!

Ha - this is not quite enough. The formatting of rustfmt code is done by rustfmt itself! This is actually part of the our test suite. We will see that the test will fail because rustfmt will put things back into the former state.
We will actually need to dive into the chain formatting logic itself to fix this. Not exactly a beginner task, but I am willing to provide pointers if you're willing to give it a try.

@marcusklaas Sounds good, I'd be up for giving it a try, are you on IRC at all?
Happy to close this and pick up discussion back in the issues thread or on IRC.


GPU memory on training and prediction

Hi, LP team:
with the same config as follows, if I run 100 epochs, it works. but when I tried to run 300 epoch, it gave the error as follows:
the GPU RTX3090 24g. Any suggestion? Thank you.
here is my config file:
data:
  image_orig_dims:
    height: 2160
    width: 2160
  image_resize_dims:
    height: 256
    width: 256
  data_dir: /root/autodl-tmp/DLC_LP
  video_dir: /root/autodl-tmp/DLC_LP/videos
  csv_file: CollectedData.csv
  downsample_factor: 2
  num_keypoints: 6
  keypoint_names:
  - snout
  - forepaw_L
  - forefaw_R
  - hindpaw_L
  - hindpaw_R
  - base
  mirrored_column_matches: null
  columns_for_singleview_pca:
  - 0
  - 1
  - 2
  - 3
  - 4
  - 5
training:
  imgaug: dlc
  train_batch_size: 16
  val_batch_size: 32
  test_batch_size: 32
  train_prob: 0.95
  val_prob: 0.05
  train_frames: 1
  num_gpus: 1
  num_workers: 16
  early_stop_patience: 3
  unfreezing_epoch: 20
  min_epochs: 0
  max_epochs: 300
  log_every_n_steps: 10
  check_val_every_n_epoch: 5
  gpu_id: 0
  rng_seed_data_pt: 0
  rng_seed_model_pt: 0
  lr_scheduler: multisteplr
  lr_scheduler_params:
    multisteplr:
      milestones:
      - 150
      - 200
      - 250
      gamma: 0.5
model:
  losses_to_use:
  - pca_singleview
  - temporal
  backbone: resnet50_animal_ap10k
  model_type: heatmap_mhcrnn
  heatmap_loss_type: mse
  model_name: DLC_LP
dali:
  general:
    seed: 123456
  base:
    train:
      sequence_length: 32
    predict:
      sequence_length: 96
  context:
    train:
      batch_size: 16
    predict:
      sequence_length: 96
losses:
  pca_multiview:
    log_weight: 5.0
    components_to_keep: 3
    epsilon: null
  pca_singleview:
    log_weight: 5.0
    components_to_keep: 0.99
    epsilon: 10
  temporal:
    log_weight: 5.0
    epsilon: 10
    prob_threshold: 0.05
eval:
  hydra_paths:
  - 2024-06-12/23-44-52/
  predict_vids_after_training: true
  save_vids_after_training: false
  fiftyone:
    dataset_name: test
    model_display_names:
    - test_model
    launch_app_from_script: false
    remote: true
    address: <IP_ADDRESS>
    port: 5151
  test_videos_directory: /root/autodl-tmp/DLC_LP/videos
  saved_vid_preds_dir: null
  confidence_thresh_for_vid: 0.9
  video_file_to_plot: null
  pred_csv_files_to_plot:
  - ' '
callbacks:
  anneal_weight:
    attr_name: total_unsupervised_importance
    init_val: 0.0
    increase_factor: 0.01
    final_val: 1.0
    freeze_until_epoch: 0
hydra:
  run:
    dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
  sweep:
    dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
    subdir: ${hydra.job.num}

and I got the error:
Warning: the argument `seed` shadows a Pipeline constructor argument of the same name.
Error executing job with overrides: []
Traceback (most recent call last):
  File "train_hydra.py", line 165, in train
    export_predictions_and_labeled_video(
  File "/root/miniconda3/lib/python3.8/site-packages/lightning_pose/utils/scripts.py", line 581, in export_predictions_and_labeled_video
    preds_df = predict_single_video(
  File "/root/miniconda3/lib/python3.8/site-packages/lightning_pose/utils/predictions.py", line 390, in predict_single_video
    predict_loader = vid_pred_class()
  File "/root/miniconda3/lib/python3.8/site-packages/lightning_pose/data/dali.py", line 397, in __call__
    return LitDaliWrapper(pipe, **args[self.train_stage][self.model_type])
  File "/root/miniconda3/lib/python3.8/site-packages/lightning_pose/data/dali.py", line 154, in __init__
    super().__init__(*args, **kwargs)
  File "/root/miniconda3/lib/python3.8/site-packages/nvidia/dali/plugin/pytorch/__init__.py", line 224, in __init__
    self._first_batch = DALIGenericIterator.__next__(self)
  File "/root/miniconda3/lib/python3.8/site-packages/nvidia/dali/plugin/pytorch/__init__.py", line 239, in __next__
    outputs = self._get_outputs()
  File "/root/miniconda3/lib/python3.8/site-packages/nvidia/dali/plugin/base_iterator.py", line 385, in _get_outputs
    outputs.append(p.share_outputs())
  File "/root/miniconda3/lib/python3.8/site-packages/nvidia/dali/pipeline.py", line 1160, in share_outputs
    return self._pipe.ShareOutputs()
RuntimeError: Critical error in pipeline:
Error in GPU operator `nvidia.dali.fn.readers.video`,
which was used in the pipeline definition with the following traceback:

  File "/root/miniconda3/lib/python3.8/site-packages/lightning_pose/data/dali.py", line 76, in video_pipe
    video = fn.readers.video(

encountered:

Can't allocate<PHONE_NUMBER> bytes on device 0.
Current pipeline object is no longer valid.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Hi, @themattinthehatt
I run the train_hydra.py. My train_hydra.py is like:
"""Example model training script."""

import os

import hydra
import lightning.pytorch as pl
from omegaconf import DictConfig

from lightning_pose.utils import pretty_print_cfg, pretty_print_str
from lightning_pose.utils.io import (
    check_video_paths,
    return_absolute_data_paths,
    return_absolute_path,
)
from lightning_pose.utils.predictions import predict_dataset
from lightning_pose.utils.scripts import (
    calculate_train_batches,
    compute_metrics,
    export_predictions_and_labeled_video,
    get_callbacks,
    get_data_module,
    get_dataset,
    get_imgaug_transform,
    get_loss_factories,
    get_model,
)

@hydra.main(config_path="configs", config_name="config_mirror-mouse-example")
def train(cfg: DictConfig):
    """Main fitting function, accessed from command line."""

    print("Our Hydra config file:")
    pretty_print_cfg(cfg)

    # path handling for toy data
    data_dir, video_dir = return_absolute_data_paths(data_cfg=cfg.data)

    # ----------------------------------------------------------------------------------
    # Set up data/model objects
    # ----------------------------------------------------------------------------------

    # imgaug transform
    imgaug_transform = get_imgaug_transform(cfg=cfg)

    # dataset
    dataset = get_dataset(cfg=cfg, data_dir=data_dir, imgaug_transform=imgaug_transform)

    # datamodule; breaks up dataset into train/val/test
    data_module = get_data_module(cfg=cfg, dataset=dataset, video_dir=video_dir)

    # build loss factory which orchestrates different losses
    loss_factories = get_loss_factories(cfg=cfg, data_module=data_module)

    # model
    model = get_model(cfg=cfg, data_module=data_module, loss_factories=loss_factories)

    # ----------------------------------------------------------------------------------
    # Set up and run training
    # ----------------------------------------------------------------------------------

    # logger
    logger = pl.loggers.TensorBoardLogger("tb_logs", name=cfg.model.model_name)

    # early stopping, learning rate monitoring, model checkpointing, backbone unfreezing
    callbacks = get_callbacks(cfg, early_stopping=False)

    # calculate number of batches for both labeled and unlabeled data per epoch
    limit_train_batches = calculate_train_batches(cfg, dataset)

    # set up trainer
    trainer = pl.Trainer(  # TODO: be careful with devices when scaling to multiple gpus
        accelerator="gpu",  # TODO: control from outside
        devices=1,  # TODO: control from outside
        max_epochs=cfg.training.max_epochs,
        min_epochs=cfg.training.min_epochs,
        check_val_every_n_epoch=cfg.training.check_val_every_n_epoch,
        log_every_n_steps=cfg.training.log_every_n_steps,
        callbacks=callbacks,
        logger=logger,
        limit_train_batches=limit_train_batches,
        accumulate_grad_batches=cfg.training.get("accumulate_grad_batches", 1),
        profiler=cfg.training.get("profiler", None),
    )

    # train model!
    trainer.fit(model=model, datamodule=data_module)

    # ----------------------------------------------------------------------------------
    # Post-training analysis
    # ----------------------------------------------------------------------------------
    hydra_output_directory = os.getcwd()
    print("Hydra output directory: {}".format(hydra_output_directory))
    # get best ckpt
    best_ckpt = os.path.abspath(trainer.checkpoint_callback.best_model_path)
    # check if best_ckpt is a file
    if not os.path.isfile(best_ckpt):
        raise FileNotFoundError("Cannot find checkpoint. Have you trained for too few epochs?")

    # make unaugmented data_loader if necessary
    if cfg.training.imgaug != "default":
        cfg_pred = cfg.copy()
        cfg_pred.training.imgaug = "default"
        imgaug_transform_pred = get_imgaug_transform(cfg=cfg_pred)
        dataset_pred = get_dataset(
            cfg=cfg_pred, data_dir=data_dir, imgaug_transform=imgaug_transform_pred
        )
        data_module_pred = get_data_module(cfg=cfg_pred, dataset=dataset_pred, video_dir=video_dir)
        data_module_pred.setup()
    else:
        data_module_pred = data_module

    # ----------------------------------------------------------------------------------
    # predict on all labeled frames (train/val/test)
    # ----------------------------------------------------------------------------------
    pretty_print_str("Predicting train/val/test images...")
    # compute and save frame-wise predictions
    preds_file = os.path.join(hydra_output_directory, "predictions.csv")
    predict_dataset(
        cfg=cfg,
        trainer=trainer,
        model=model,
        data_module=data_module_pred,
        ckpt_file=best_ckpt,
        preds_file=preds_file,
    )
    # compute and save various metrics
    try:
        compute_metrics(cfg=cfg, preds_file=preds_file, data_module=data_module_pred)
    except Exception as e:
        print(f"Error computing metrics\n{e}")

    # ----------------------------------------------------------------------------------
    # predict folder of videos
    # ----------------------------------------------------------------------------------
    if cfg.eval.predict_vids_after_training:
        pretty_print_str("Predicting videos...")
        if cfg.eval.test_videos_directory is None:
            filenames = []
        else:
            filenames = check_video_paths(
                return_absolute_path(cfg.eval.test_videos_directory)
            )
            vidstr = "video" if (len(filenames) == 1) else "videos"
            pretty_print_str(
                f"Found {len(filenames)} {vidstr} to predict on (in cfg.eval.test_videos_directory)"
            )

        for video_file in filenames:
            assert os.path.isfile(video_file)
            pretty_print_str(f"Predicting video: {video_file}...")
            # get save name for prediction csv file
            video_pred_dir = os.path.join(hydra_output_directory, "video_preds")
            video_pred_name = os.path.splitext(os.path.basename(video_file))[0]
            prediction_csv_file = os.path.join(video_pred_dir, video_pred_name + ".csv")
            # get save name labeled video csv
            if cfg.eval.save_vids_after_training:
                labeled_vid_dir = os.path.join(video_pred_dir, "labeled_videos")
                labeled_mp4_file = os.path.join(
                    labeled_vid_dir, video_pred_name + "_labeled.mp4"
                )
            else:
                labeled_mp4_file = None
            # predict on video
            export_predictions_and_labeled_video(
                video_file=video_file,
                cfg=cfg,
                ckpt_file=best_ckpt,
                prediction_csv_file=prediction_csv_file,
                labeled_mp4_file=labeled_mp4_file,
                trainer=trainer,
                model=model,
                data_module=data_module_pred,
                save_heatmaps=cfg.eval.get(
                    "predict_vids_after_training_save_heatmaps", False
                ),
            )
            # compute and save various metrics
            try:
                compute_metrics(
                    cfg=cfg,
                    preds_file=prediction_csv_file,
                    data_module=data_module_pred,
                )
            except Exception as e:
                print(f"Error predicting on video {video_file}:\n{e}")
                continue

    # ----------------------------------------------------------------------------------
    # predict on OOD frames
    # ----------------------------------------------------------------------------------
    # update config file to point to OOD data
    csv_file_ood = os.path.join(cfg.data.data_dir, cfg.data.csv_file).replace(
        ".csv", "_new.csv"
    )
    if os.path.exists(csv_file_ood):
        cfg_ood = cfg.copy()
        cfg_ood.data.csv_file = csv_file_ood
        cfg_ood.training.imgaug = "default"
        cfg_ood.training.train_prob = 1
        cfg_ood.training.val_prob = 0
        cfg_ood.training.train_frames = 1
        # build dataset/datamodule
        imgaug_transform_ood = get_imgaug_transform(cfg=cfg_ood)
        dataset_ood = get_dataset(
            cfg=cfg_ood, data_dir=data_dir, imgaug_transform=imgaug_transform_ood
        )
        data_module_ood = get_data_module(cfg=cfg_ood, dataset=dataset_ood, video_dir=video_dir)
        data_module_ood.setup()
        pretty_print_str("Predicting OOD images...")
        # compute and save frame-wise predictions
        preds_file_ood = os.path.join(hydra_output_directory, "predictions_new.csv")
        predict_dataset(
            cfg=cfg_ood,
            trainer=trainer,
            model=model,
            data_module=data_module_ood,
            ckpt_file=best_ckpt,
            preds_file=preds_file_ood,
        )
        # compute and save various metrics
        try:
            compute_metrics(
                cfg=cfg_ood, preds_file=preds_file_ood, data_module=data_module_ood
            )
        except Exception as e:
            print(f"Error computing metrics\n{e}")

It seemed that the training is good. but the step after the training is the problem.
my videos are 2 mp4 with 30fps*10min, about 18000 frames per video.

They are both basically the same, we just refactored the original script to be a function. So no need to worry about that. But if you want you can pull the latest updates by running git pull from inside the lightning-pose repo.
Those videos aren't huge, so I'm not exactly sure why there should be memory issues. You can run inference on those videos (or any other videos) separately after model training using this script here. Can you try that and let me know if it works for you? Note that you'll need to set cfg.eval.hydra_paths in the config file to point to the model you want to run inference with, and set cfg.eval.test_videos_directory in the config file to point to the video directory.

Hi, @themattinthehatt
I think I found the answer.
in the config file, cfg.eval.predict_vids_after_trainin=True is set by default. that means when the training is finished, the prediction would move on automatically. However, the problem is that: the  training and the prediction would consume different amount of GPU memory.
1.Usually the training would only focus on activated part of the data and its derivatives like the parameters/files...would be deactivated and saved into disk. In my case, the training consumed only about 18G GPU memory, that is why 24G GPU is already enough.
2.However, the prediction would load the whole model into GPU, that might consume more GPU memory than the training. In my case, the model loading before prediction is about 29g, that is why it gave the error that about 5g memory cannot be allocated(29-24=5). Now I switched to a 32g GPU, and everything went well.
3.So the conclusion is that: if a big memory GPU is accessible, we can do the training and prediction in the same GPU; If we are renting a GPU server and want to save some fee, we can do the training in a GPU with less memory but do the prediction in a bigger one.

@Wulin-Tan glad you were able to find a workaround. The model itself should be the exact same size during training and inference. Training will also generally lead to a larger memory footprint (given the same batch size) since gradients will also be created.
I believe I found the source of your issue; in your config file, this part here:
dali:
  context:
    train:
      batch_size: 16
    predict:
      sequence_length: 96

the field dali.context.train.batch_size means you're using a batch size of 16 during training; but dali.context.predict.sequence_length means you're using a batch size of 96 during inference. If you lower this number (maybe start at 32 or 48) then you should be able to run inference without a larger GPU (and also automatically after training). I'd recommend testing this by training a model for 10 epochs or so and do the automatic inference afterwards; if that works without memory issues then you can delete the model and change the epochs back to their default.

@Wulin-Tan glad you were able to find a workaround. The model itself should be the exact same size during training and inference. Training will also generally lead to a larger memory footprint (given the same batch size) since gradients will also be created.
I believe I found the source of your issue; in your config file, this part here:
dali:
  context:
    train:
      batch_size: 16
    predict:
      sequence_length: 96

the field dali.context.train.batch_size means you're using a batch size of 16 during training; but dali.context.predict.sequence_length means you're using a batch size of 96 during inference. If you lower this number (maybe start at 32 or 48) then you should be able to run inference without a larger GPU (and also automatically after training). I'd recommend testing this by training a model for 10 epochs or so and do the automatic inference afterwards; if that works without memory issues then you can delete the model and change the epochs back to their default.

Hi, @themattinthehatt
I tried and it worked perfectly! Exactly what you said!
Since there are some many important parameters in the config file, can you give more details about each parameter's setting / recommendation / your lab's experience... in the tutorial?

@Wulin-Tan glad it worked!
Regarding the documentation, are there any parameters not covered in the docs here, or parameters that are mentioned but you think could be explained more clearly?

@Wulin-Tan glad it worked!
Regarding the documentation, are there any parameters not covered in the docs here, or parameters that are mentioned but you think could be explained more clearly?

Hi, @themattinthehatt
Yes, your explanation is very clear!


How to get all pods that use the same PVC?

I have a ReadWriteMany PVC used in multiple pods and when I do "kubectl describe pvc xyz" under "Mounted by" I get all pods using it. I want to do  the same in Go.
I tried to get pods with field selector spec.volumes.persistentVolumeClaim.claimName:
	pods, err := c.CoreV1().Pods("").List(ctx, metav1.ListOptions{
		FieldSelector: fields.Set{"spec.volumes.persistentVolumeClaim.claimName": "xyz"}.AsSelector().String(),
	})

but this reports the following error:
field label not supported: spec.volumes.persistentVolumeClaim.claimName

Is there any other way to achieve this except to loop over all pods and filter the "right" ones?

No, looping and filtering is the only way to locate pods using a specific PVC


Fix: allow external cloud resources to be kept when Application is deleted

Provide an option for users whether to keep provisioned cloud resources when Terraform-typed Application is deleted.
Fix #2697
Description of your changes

Fixes #
I have:

[ ] Read and followed KubeVela's contribution process.
[ ] Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
[ ] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

/backport 1.1


SQL Server Data-Tier Application Framework latest upgrade.

Description
Improvement
I have changed link for DACFx installation which is pointing to actual version.
Related issue:
https://github.com/actions/virtual-environments/issues/850
Check list

[+] Related issue / work item is attached
[ ] Changes are tested and related VM images are successfully generated

/azp run windows2016, windows2019


Add deprecation warning for public methods on components.

In practice, we've yet to find a legitimate reason to allow
public methods to be defined on components. Furthermore,
allowing them enables them to be tested in place of the HTML
output of the component, which we consider to be an anti-
pattern in our experience with the library so far. This
has been a common trap for developers new to components
to fall into, so I feel it makes sense to have the library
enforce this rule.
This deprecation warning will change to an exception
in release v2.0.0.

I'm concerned about the direction of this PR. Please don't read what follows (and it will likely be long) as a rant. Instead very much intended as a discussion of the pros and cons of enforcing best practices vs leaving the flexibility for consumers to make their own decisions.
My concern is along three broad directions:

IMO anti pattern here is that private properties work in the views at all
Philosophically Ruby/Rails doesn't and shouldn't warn about anti patterns let alone prevent them with exceptions.
There are some patterns where public methods are convenient

1. The anti pattern is the private methods work in views at all

IMO its super weird that it works. (In fact I didn't know it did).
That private methods are accessible in views unexpected and asymmetric compared to working with public/private methods in Ruby objects. That it works is a quirky side effect of the implementation detail of compiling templates into methods on the component.
If we were starting from scratch I'd argue for an API design that would more Ruby/Rails like:

We provide a magic component "local" to the view. Only public properties would work.
View Component have a helper to declare which properties are available to the view. Much like Rails Controllers helper_method
For syntactic sugar make public methods available to the view.

In practice for the Components we've written we explicitly make that distinction/convention of using public/private methods to delineate the component API. Public properties we expect to be used in the view vs private properties that represent implementation details.

2. Philosophically Ruby/Rails doesn't and shouldn't warn about anti patterns let alone prevent them with exceptions.
High level - let consumers of this gem make their own decisions rather than restricting the way it can be used. Yes we should "test what we see" an not the implementation details. The documentation and examples should drive that point home. But sometimes its just not that easy. Sometimes testing the public property is "faster" or "simpler". For a complicated property used in the view we might write one test of the html that property results in. Then exhaustive tests directly of the complexity of the property. We don't do it all the time but sometimes it's the 80/20 we choose. We've made a calculated decision, the framework shouldn't get in our way.
3. There are some patterns where public methods are convenient
Perhaps its a slightly weird pattern but we fell across this example recently and liked the simplicity. Rendering some Nav dom to link to a list of rendered components:
class ChartComponent < ActionView::Component
  attr_reader :name

  def initialize(name:)
    @name = name
  end

  def id
    SecureRandom.uuid
  end
end

chart_component.html.haml
.chart{id: id}
  %h1=name
  .some_chart
    ......

with an Array<ChartComponent> chart_components:
some_view.html.haml
%nav
  - chart_components.each do |chart|
    %a{href: "##{chart.id}"}=chart.name

.charts
  - chart_components.each do |chart|
    render(chart)

You could argue that we should have some other structure for the id-name pairs that we render the nav with and instantiate the ChartComponents with. Maybe we should have a higher level component that composes the above but thats awkward too (there is lots more DOM between the nav and charts in our actual use case). Either way that extra object is just noise when we already have a nice 'view-model' in the form of a ViewComponent that encapsulates that logic.
phew
Overall IMO there are compelling reasons to leave as is. If we do add this change my suggestion would be it should be configurable. I'd argue that the default should be for it to be off.

@jonspalmer thanks for the thorough response ❤
I was mostly curious when I opened this PR 😄 . It's helpful to hear how public methods are useful for you. Aren't using components as view models in that way, but I can see how it makes sense in that case.
I don't see any reason to proceed with this change. Closing!


Complete Password Generator UI

Description
I designed the password generator ui and it works fine without bug but when i updated my folked repository and pull it into my mechine i get this error aside that my implementation is working great

Fixes # (issue)
Type of change

[x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Description
I designed the password generator ui and it works fine without bug but when i updated my folked repository and pull it into my mechine i get this error aside that my implementation is working great
Fixes # (issue)
Type of change

[x]  New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:

[x]  I have performed a self-review of my own code
[x]  I have commented my code, particularly in hard-to-understand areas
[ ]  I have made corresponding changes to the documentation
[ ]  My changes generate no new warnings
[ ]  I have added tests that prove my fix is effective or that my feature works
[x]  New and existing unit tests pass locally with my changes
[ ]  Any dependent changes have been merged and published in downstream modules

Description
I designed the password generator ui and it works fine without bug but when i updated my folked repository and pull it into my mechine i get this error aside that my implementation is working great
Fixes # (issue)
Type of change

[x]  New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:

[x]  I have performed a self-review of my own code
[x]  I have commented my code, particularly in hard-to-understand areas
[ ]  I have made corresponding changes to the documentation
[ ]  My changes generate no new warnings
[ ]  I have added tests that prove my fix is effective or that my feature works
[x]  New and existing unit tests pass locally with my changes
[ ]  Any dependent changes have been merged and published in downstream modules

@vasantisuthar could you please help?

@Asterisk-z
You need to do npm install or yarn again as the incoming changes may introduce the latest dependencies.
So please stop the local server, install/update and rerun it. That should solve it.

@Asterisk-z
You need to do npm install or yarn again as the incoming changes may introduce the latest dependencies.
So please stop the local server, install/update and rerun it. That should solve it.

Okay i will try that

@atapas It works fine now

Hello @Asterisk-z
We will be moving the react-play project from the atapas account to an organization to help manage the project in a better way. The new organization URL is: https://github.com/reactplay.

The movement will take place between 12:30 - 14:00 hrs IST(7:00 am - 8:30 am GMT), 30th May 2022. Please refrain from pushing any changes between this time.

We will inform you when the movement is complete. You need to make a few minimal configuration changes after that. We will let you know.

Hello @Asterisk-z
We will be moving the react-play project from the atapas account to an organization to help manage the project in a better way. The new organization URL is: https://github.com/reactplay.

The movement will take place between 12:30 - 14:00 hrs IST(7:00 am - 8:30 am GMT), 30th May 2022. Please refrain from pushing any changes between this time.

We will inform you when the movement is complete. You need to make a few minimal configuration changes after that. We will let you know.

The migration is complete. You can find the project here: https://github.com/reactplay
You no need to reclone the project. You just need to set the correct upstream. Here is the link: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork

@Asterisk-z is it ready for review?

@Angryman18
Could you please review this PR as well as the code was originated by you, it will be helpful. Thanks!

@Angryman18
Could you please review this PR as well as the code was originated by you, it will be helpful. Thanks!

yes. sure.

@atapas @Asterisk-z its good now. i see an issue is not resolved yet. anyway we can omit it since the code works fine.

@Asterisk-z are you resolving it?

@Angryman18 Please approve the PR if you are good. That helps me to merge it.

@all-contributors please add @Asterisk-z  for Code


head() is slower than take()

We aren't pushing the limit down enough in the plan. We should either do that or just convert head into take when appropriate.

what is the head() and take() referred to?
Is it API in this code?
def test_get_fragments(tmp_path: Path):
    table = pa.Table.from_pydict({"a": range(100), "b": range(100)})
    base_dir = tmp_path / "test"
    lance.write_dataset(table, base_dir)

    dataset = lance.dataset(base_dir)
    fragment = dataset.get_fragments()[0]
    assert fragment.count_rows() == 100
    assert fragment.physical_rows == 100
    assert fragment.num_deletions == 0

    assert fragment.metadata.id == 0

    head = fragment.head(10)
    tm.assert_frame_equal(head.to_pandas(), table.to_pandas()[0:10])

    assert fragment.to_table() == table

    taken = fragment.take([18, 20, 33, 53])
    assert taken == pa.Table.from_pydict({"a": [18, 20, 33, 53], "b": [18, 20, 33, 53]})

And, we would like to replace head(n) with take([0, .., n -1])?

And, we would like to replace head(n) with take([0, .., n -1])?

Yes, basically what we want. This should happen at the rust level. Right now it uses ScanExec to get the head, but that does too much readahead. In the Scanner::create_plan() method we should use some other exec node instead of ScanExec when we are just doing head. TakeExec might not be exactly what we want, since it expects an input. Could create another node that wraps Dataset::take().

I'm thinking of replacing LanceScanExec in scan_fragments with a new ExecutionPlan that wraps Dataset::take(). Does this make sense?

Does this make sense?

Sure, that's a good place to start.


class-signature is in the experimental section of the website, but it is reported as standard

The class-signature docs are in experimental, not standard.

All rules provided by ktlint are provided by the standard rule set. Some of those rules are however flagged as experimental. The class-signature is a standard rule which currently is still experimental.
As documented:


Update haskell-language-server to HEAD

Currently it fails near the end, looks like noExtField is only defined if the GHC version is >=8.10
src/Ide/Plugin/Tactic/GHC.hs:95:5: error:
    • The constructor 'VarPat' should have 1 argument, but has been given 2
    • In the pattern: VarPat _ x
      In a case alternative: VarPat _ x -> Just $ occName $ unLoc x
      In the expression:
        case p0 of
          VarPat _ x -> Just $ occName $ unLoc x
          LazyPat _ p -> getPatName p
          AsPat _ x _ -> Just $ occName $ unLoc x
          ParPat _ p -> getPatName p
          BangPat _ p -> getPatName p
          ViewPat _ _ p -> getPatName p
          _ -> Nothing
   |
95 |     VarPat  _ x   -> Just $ occName $ unLoc x
   |     ^^^^^^^^^^^
[ 3 of 15] Compiling Ide.Plugin.Tactic.Naming ( src/Ide/Plugin/Tactic/Naming.hs, dist/build/Ide/Plugin/Tactic/Naming.o )
[ 4 of 15] Compiling Ide.Plugin.Tactic.Range ( src/Ide/Plugin/Tactic/Range.hs, dist/build/Ide/Plugin/Tactic/Range.o )
[ 5 of 15] Compiling Ide.Plugin.Tactic.TestTypes ( src/Ide/Plugin/Tactic/TestTypes.hs, dist/build/Ide/Plugin/Tactic/TestTypes.o )
[ 6 of 15] Compiling Ide.Plugin.Tactic.Types ( src/Ide/Plugin/Tactic/Types.hs, dist/build/Ide/Plugin/Tactic/Types.o )
src/Ide/Plugin/Tactic/Types.hs:127:38: error:
    Variable not in scope: noExtField :: NoExt
    |
127 |   hole = pure (mempty, noLoc $ HsVar noExtField $ noLoc $ Unqual $ mkVarOcc "_")
    |                                      ^^^^^^^^^^
[14 of 15] Compiling Ide.TreeTransform ( src/Ide/TreeTransform.hs, dist/build/Ide/TreeTransform.o )

Thank you for the PR, I added some comments. Keep in mind that I specifically targeted v8.6.5 in this repository.
There are better references where you can get support for multiple GHC versions though.

Right, I want to also get it to build on v8.6.5. I'll take a look at the suggestions and see if it helps.

I have synced the master to the latest 0.5.1


Improved reusing of schemas with class inheritance

This is a nice library and these features would make it ever nicer.
Ability to add new fields when reusing schema. Here, the EmailAddress::Schema::Create class is reused in another schema with the addition of a new :email_address_id to the nested hash.
class EmailAddress::Create < ApplicationSchema
  define! do
    required(:email_address, Types::Email).value(:str?)
    optional(:email_label, Types::String).maybe(:str?)
    optional(:email_primary, Types::Bool).value(:bool?)
  end
end

class EmailAddress::Update < ApplicationSchema
  define! do
    required(:email_address).schema(EmailAddress::Create) do
      required(:email_address_id, Types::String).value(:str?)
    end
  end
end

The above would be equivalent to
class EmailAddress::Update < ApplicationSchema
  define! do
    required(:email_address).schema do
      required(:email_address, Types::Email).value(:str?)
      optional(:email_label, Types::String).maybe(:str?)
      optional(:email_primary, Types::Bool).value(:bool?)
      required(:email_address_id, Types::String).value(:str?)
    end
  end
end

The ability to reuse a schema in a flat / non-nested manner (issue #204) following conventions already established, like so:
schema(EmailAddress::Schema::Create)
required(:email_address_id, Types::String).value(:str?)

The above would be equivalent to adding:
required(:email_address, Types::Email).value(:str?)
optional(:email_label, Types::String).maybe(:str?)
optional(:email_primary, Types::Bool).value(:bool?)
required(:email_address_id, Types::String).value(:str?)

When using class inheritance to define a schema class, the ability to override inherited schema methods in a child class. Like so
class EmailAddress::Schema::Base < ApplicationSchema
  configure
    def valid_primaries?(email_addresses)
      true # < -- change
    end
  end

  define! do
    required(:email_address, Types::Email).value(:valid_primaries?)
    optional(:email_label, Types::String).maybe(:str?)
    optional(:email_primary, Types::Bool).value(:bool?)
  end
end

class EmailAddress::Schema::Create < EmailAddress::Schema::Base
  configure do
    def valid_primaries?(email_addresses)
      false # < -- change
    end
  end

  define! do
    required(:email_addresses, Types::Array).filled.each do
      schema(EmailAddress::Schema::Create)
    end
  end
end

In the above, it'd be awesome if EmailAddress::Schema::Create's updated "valid_primaries?" function was used for the inherited required(:email_address, Types::Email).value(:valid_primaries?). When I tried to do something like this, Dry-validation generated an error.
Thanks! Great library!

This now just works:
require 'dry/schema'

module EmailAddress
  class Schema < Dry::Schema::Params
    define do
      required(:email_address).filled(:string)
      optional(:email_label).maybe(:string)
      optional(:email_primary).value(:bool)
    end
  end

  class UpdateSchema < Schema
    define do
      required(:email_address_id).filled(:string)
    end
  end
end

update_schema = EmailAddress::UpdateSchema.new

puts update_schema.(email_address<EMAIL_ADDRESS>email_address_id: "").errors.to_h.inspect
# {:email_address_id=>["must be filled"]}


Inline calendar shifts months when a date is selected

Expected behavior
We are displaying an inline calendar that spans 12 months from Jan through Dec for a particular year. Our application is meant to allow a user to toggle the state of a business process for a specific date. When a user clicks on a date we update the background color to indicate its is now "active". I expect the calendar to remain static meaning the same full year calendar will be displayed regardless of how many dates are clicked on by the user.
Actual behavior
If you click any date, the display seems to jump by that many number of months ahead or back depending on how many months away from January you click.
Steps to reproduce
So to explain in more detail, suppose we are displaying an inline calendar for Jan through Dec 2019. If I click any date in January, after the updates execute and the component is rendered, I still see a calendar from Jan 2019 - Dec 2019. If I click a date in February 2019 the calendar shifts back one month to display Dec 2018 through Nov 2019. If I click a date in March 2019, the shift is 2 months back (Oct 2018 - Oct 2019). If you now click any day in Dec 2018, the calendar shifts one month in the other direction. You can repeat this until you are once again viewing Jan 2019 - Dec 2019. I have confirmed the values for startDate and openToDate are 2019-01-01 and monthsShown = 12. Are these not the values that determine the calendar dates which are visible?

Sorry forgot the mention we are using version 2.2.0

+1

With "inlineFocusSelectedMonth={true}" the jumping does not occur. Which seems strange, I would expect the opposite (see: https://github.com/Hacker0x01/react-datepicker/pull/1541).
However "inlineFocusSelectedMonth={true}" works for me now and prevents the jumping.

Thank you! We will try this

Adding property "inlineFocusSelectedMonth={true}" seems to stop the calendar from jumping to month selected when using the the inline calendar


Fix: Add EmailMessageDataSet to doctree

Added EmailMessageDataSet to docs
Description
Added EmailMessageDataSet to docs and reoredered Matplotlib to correct alphabetical order
Development notes
Added EmailMessageDataSet to docs and reordered Matplotlib to correct alphabetical order
Checklist

[x] Read the contributing guidelines
[x] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[x] Updated the documentation to reflect the code changes
[x] Added a description of this change and added my name to the list of supporting contributions in the RELEASE.md file
[ ] Added tests to cover my changes

Notice

[x] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

Quick question, is there a perhaps specific reason why sending was not added to this dataset? Would it be conceivable to add say a send: True with default False parameter to this  dataset or are there obvious drawbacks/ problems with this?

Quick question, is there a perhaps specific reason why sending was not added to this dataset? Would it be conceivable to add say a send: True with default False parameter to this dataset or are there obvious drawbacks/ problems with this?

I'll defer this question to @deepyaman who might have more insight here. 🙂


Get next Autoincrement

Sometime you need the next Auto increment id from a table

+1

+1
Please add this!


Allow disabling element

This PR makes it so <clipboard-copy aria-disabled="true"> doesn't copy anything when clicked. Because of the way the tests are written, I introduced a new custom event, clipboard-copy-nothing, that fires whenever a disabled element is clicked. Definitely open to suggestions around how to avoid a second event 😅 I tried waiting for the promise to time out, but that seems awful.

:wave: Hello and thanks for pinging us! This issue or PR has been added to our inbox and a Primer first responder will review it soon.

:art: If this is a PR that includes a visual change, please make sure to add screenshots in the description or deploy this code to a lab machine with instructions for how to test.
:fast_forward: If this is a PR that includes changes to an interaction, please include a video recording in the description.
:warning: If this is urgent, please visit us in #primer on Slack and tag the first responders listed in the channel topic.


Sidebar text does not render correctly

Describe the bug
The NT tables and sources have some kind of visual bug in the text rendering. Looks like it may be multiple layers of text.
To Reproduce
Happens with any NT connection.
Screenshots

Version (required):
Version: 3.0.0-beta-3
Distributor: FRC 6328
Platform: linux-x64
Build Date: 10/20/2023, 19:45:59 UTC
Electron 26.2.1
Chromium: 116.0.5845.188
Node: 18.16.1
Additional context
I'm not aware of any changes or significant updates to my desktop environment (wayland) recently, and have not experienced this before with the 2023 version of AdvantageScope.
I'm happy to install an older release to test if that would be helpful.

Based on #77, it seems like Wayland and Electron haven't been cooperating very well. I don't know for sure if that's the root cause, but it's a strong possibility. I'll try to recreate it on my end with a Wayland desktop; it's possible I'll just need to switch Electron versions to fix it.

Any update on this or #77? I'm on the latest version now and still the same issue. If there's anything I can do to help diagnose and fix the issue let me know.

I haven't been able to recreate this thus far, though I still suspect it's related to Chromium rendering on Wayland. I was experimenting with a Chromium flag for #77 which may be applicable here, and I believe Electron and Chromium have been improving their Wayland support. It would be helpful if you could try running one of the dev builds here, which use the Wayland Chromium flag and the latest version of Electron/Chromium. I'll also dig more into trying to recreate this locally.

Figured out the source of it. Chromium doesn't play nice with the linux i915 intel gpu driver. Found reports of the issue popping up periodically and being patched only to come back again later. I'm not sure there's anything that can be done about in this project. I'll try that build and might try upgrading to Ubuntu 23.10 but I don't have a whole ton of hope.

Just tested the dev build and still same problem. The only workaround I can find is to run the app with --disable-gpu which seems to run fine with the exception of the 3d field view being basically unusable.

Wow, thanks for tracking that down. If it's helpful, I could probably add a hidden preference to disable the GPU so you don't need the CLI option. Otherwise it sounds like there's not much else to be done on our side.

Nah it doesn't bother me. I'm going to close this issue but if I can find the motivation to do some research about chromium and the Mesa library or to test some old versions of AdvantageScope I might try and isolate the exact change that broke stuff and open an issue with chromium.

Looks like an intel driver update or something fixed this properly.


Don't increase the DPI when compressing an image

I see https://github.com/Donaldcwl/browser-image-compression/issues/197 was closed because changing the DPI is not the purpose of this library.
What we are seeing is that this library is actually increasing the DPI to 96 when images are compressed. This behavior seems like it is working against the maximum compression that can be achieved. If we can maintain the source DPI when it is less than 96 as part of the compression process, won't that make the corresponding file size smaller with no change in image quality?

Possible to get an answer or some sort of status on this? Thanks in advance!


Uploading wave example fails

I am trying to set up the wave example. I set the variables in config.h, and am using the latest version of the library from the repo. It compiles fine, but I get an issue when uploading to my paperd classic - error below. Some other relevant information - I'm on an M1 Mac and have the board set to ESP32 Dev Module and the port set to the USB device for the paperd. The screen flashes on and off but after about 20 seconds it fails and then reboots.
Sketch uses 1048222 bytes (79%) of program storage space. Maximum is 1310720 bytes.
Global variables use 55888 bytes (17%) of dynamic memory, leaving 271792 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port /dev/cu.usbserial-01BFAC0E
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Failed uploading: uploading error: exit status 2

I ran into the same issue today. Also a M1 Mac. I installed the CP210x libs too.

Ha! Fixed it. When you see 'Connecting .....' in the terminal output press the 'Reset' button on the back of the Paperd once. The upload will then commence.

I'm unable to reproduce it! It worked precisely once.

You need to time it just right. My method is to start pressing the reset button just as the last . in a ........_____ series appears and to stop pressing it just as the first _ appears. Usually it uploads fine then, sometimes it needs a few tries.
esptool.py does try to restart the ESP32 automatically, but it looks like the paperd.ink didn't set up the circuitry correctly for that method to work, so unfortunately the manual method is all that seems to work.

I was able to get it! As the ... appear I'll press, and then try to release right before the first _ - by holding to a count of a quick 1-2-3. Each ..._ series is another attempt to try.

This seems to be an issue with macbook M1 devices.
See below similar issues:
https://github.com/espressif/esptool/issues/806
https://github.com/espressif/esptool/issues/712
There is a possible solution here which you can try:
https://github.com/espressif/esptool/issues/712#issuecomment-1003069098

I was able to resolve this issue by connecting my Paperd using a Type A to Type C cable via a Type C hub.
I ran across the same issue on my MacBook Pro with M1 chipset. I was using a Type C to Type C cable when this error was occurring.
I have tried this multiple times now, I think it has something to do with the USB C drivers for Mac M1. On windows, USB C to USB C works fine.

I can confirm the 'Type A to Type C cable via a Type C hub' solution works. This is one of the crazier things I've run into lately.

@stijnstijn Paperd.Ink does implement the automatic reset circuitry correctly as it works fine on Windows and Linux systems. This problem seems to occur on macbook M1 devices.

I have this issue on both an M1 Mac and Windows 10. I've tried different versions of the USB-to-serial driver, different USB ports, and different cables and it still persists.
Would it be useful to open a separate issue about this, or is this really a general ESP32 problem that can't be addressed by the Paperd.ink team?

@stijnstijn Do you mean Windows 10 on an M1 Macbook or Windows 10 on x86?

@adeshchopade @haarts a possible solution for this was recently implemented in https://github.com/espressif/esptool/commit/353cefc85d7011d8d26d38861e8c736160df2ce6. Have you tried the most recent esptool? The latest development version containing this fix can be installed with pip install esptool==4.5.dev1.

@stijnstijn Do you mean Windows 10 on an M1 Macbook or Windows 10 on x86?

Windows 10 on x86 (x64).

I can confirm the problem exists in my M1 mac. However,a s reported by @radimkarnis the latest esptool seems to work fine.
The steps I followed to fix it where:

Install esptool using a proper python version

python3 -m pip3 install esptool==4.5.dev1

Make arduino output verbose, so you can easily copy the "almost" correct command

Copy the failing command, because Arduino will use the esptool version they ship with (I hate this tool, seriously) and replace it with your proper esptool command. For example, instead of doing:

# Incorrect, not working, wrong, wrong 🛑

/Users/your_user/Library/Arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /Users/your_user/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/partitions/boot_app0.bin 0x1000 /Users/your_user/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 /var/folders/8s/5v_sh3wx79d__9_75rbfxrxc0000gn/T/arduino_build_495/hello_world.ino.bin 0x8000 /var/folders/8s/5v_sh3wx79d__9_75rbfxrxc0000gn/T/arduino_build_495/hello_world.ino.partitions.bin

You will be doing this
python3 -m esptool --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /Users/your_user/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/partitions/boot_app0.bin 0x1000 /Users/your_user/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 /var/folders/8s/5v_sh3wx79d__9_75rbfxrxc0000gn/T/arduino_build_495/hello_world.ino.bin 0x8000 /var/folders/8s/5v_sh3wx79d__9_75rbfxrxc0000gn/T/arduino_build_495/hello_world.ino.partitions.bin

Great job @danielo515! Unfortunately, Arduino isn't very flexible and sometimes you have to resort to hacks like this... FIY, I wrote a documentation article about this process here.

Great job @danielo515! Unfortunately, Arduino isn't very flexible and sometimes you have to resort to hacks like this... FIY, I wrote a documentation article about this process here.

Thanks for the link and the docs.
What I would love to see is a way to configure Arduino to use the right version. So far, my attempts of setting it to use the command that I manually use have failed. I tried editing the file /Users/$USER/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/platform.txt to use the same esptool that I do:
vim /Users/$USER/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/platform.txt

but it always fails.


update plugin locator

This PR updates the plugin locator (in list) due to this in the CDAP-UI code.

I think this PR can be closed now, right???

yes, forgot to close it, thought you pushed your changes on top of mine


Update Header.tsx

@nikohoffren enhanced the alignment of the header and nav

Pull request merged

This is an automated message from Fork, Commit, Merge - web [BOT].

Thank you for your contribution! Your pull request has been merged and your name has been added to the List of Contributors in README.md.
Please leave a star if you enjoyed working on this project.
What's next?
If you're looking for more ways to contribute, I invite you to check out my other projects here.


ACDCs should inherit performance info and mergedLFNBase

We should make ACDCs inherit some performance parameters, like:
maxRSS, maxVSize, softTimeout and hardTimeout.

Just updated because it should also contain mergedLFNBase from the original request.
@vlimant feel free to add anything else that you consider missing there.
Aiming at the next cmsweb cycle (this one is basically finished)

Will this appear in the worklfow dictionnary even before assignment, for ACDC ?

@amaltaro a lot of things should be hardwired in the ACDC making, leaving only very few things to the liberty of the operator to change. All outputs, lfn, and all should be already wired and unmutable

Probably not completely fixed yet (in ReqMgr2, won't happen for ReqMgr), but #7254 and #7241 should do the work

Possible fixed by #7676