Introduce a performance builder

Add a builder to run the performance regression
suite. Use an EC2 d2.xlarge instance type since
that has 3 hard drives we can utilize. The new
builder creates a partition on the front portion
of the drive to ensure that the test runs in a
reasonable amount of time.
Signed-off-by: Giuseppe Di Natale<EMAIL_ADDRESS>

Still TODO:

Move partition creation to bb-test-prepare.sh
Possibly, zero out the partitions in bb-test-prepare.sh

There is also an issue when bb-test-zfstests.sh attempts to perform a module unload in its cleanup routine upon exit that doesn't appear to be related, but definitely needs looking into.

Updated. Moved the partition creation to bb-test-prepare.sh.

Updated. Attempting to zero out the partitions created in bb-test-prepare.sh. Also, generalized the logic for partitioning and zeroing.

Updated. I think everything is all set for a performance builder. I need to look into the cleanup hang, but I'm sure that's not the fault of this pull request. We could wait until that is resolved to pull this in if you'd like.

One last update, when running dd, use bs=1M for better performance.

Merged!


Versioned release package for MCScanX

Hi.
I'm working to make MCScanX available on Bioconda.
Please refer. -> https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release
I need your help creating a versioned release to use for the Bioconda recipe. Once Phamb is added to Bioconda, it'll also be made available as a Docker container from Biocontainers, and as a Singularity image from the Galaxy Project. The Bioconda bot will also recognize future releases and automatically update the recipe.
Please let me know
Thanks
Jay

A container for MCScanX would indeed be a great addition!

@tanghaibao Could you please help here ?
We need a Github release / Git tag to be able to make a BioConda recipe.
Thank you!

I've created a Bioconda recipe with https://github.com/bioconda/bioconda-recipes/pull/52854
For the moment I use Git commit instead of a version (i.e. Git tag).

@martin-g
Made a new release (actually the first release of this package).

Thank you, @tanghaibao !
https://github.com/bioconda/bioconda-recipes/pull/52930


Problem on loading map on demo pages

Hi community, The demo has a problem with map loading.

Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.

Any update on this issue?

any update for this issue?


feat: add brotli 0.14.2, brotli 0.14.1 releases

update brotli with release 0.14.2
update brotli with release 0.14.1

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


Have the PublishBuildArtifacts task fail (optionally) if no artfacts found

Required Information
Type: Feature request
Task Name: PublishBuildArtifacts
Environment

Azure Pipelines - Hosted Agent -

Issue Description
If there are no artifacts, only a warning is given.
It'd be nice to set it to get an error, with errorOnNoArtifacts: true or a similar flag,.
https://github.com/MicrosoftDocs/vsts-docs/issues/5542#issuecomment-530019219
Task logs
Starting: Archive
==============================================================================
Task         : Publish build artifacts
Description  : Publish build artifacts to Azure Pipelines or a Windows file share
Version      : 1.151.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/publish-build-artifacts
==============================================================================
##[warning]Directory '/home/vsts/work/1/a' is empty. Nothing will be added to build artifact 'My-Artfact-Name'.
Finishing: Archive

It fails if the folder doesn't exist (which happens for cypress screenshots) so having this configurable either way would actually be quite nice.

I have the same issue, sometimes my artifact folder doesn't exist but it is normal in my process.
@marcussonestedtbarium did solve this since ?


Causing NullPointerException in integration test on Grails 2.4.4

Whenever I add the Build annotation in my integration tests, my service calls suddenly throws NullPointerException.
Is this because of spock?
It is working well on unit tests.

the @Build annotation is only used in unit tests.  In integration tests, all domain objects get build automatically.  It causes problems (as you've seen) if you have @Build annotations on domain objects in integration tests.  Take it off and you should still be able to build and have things work.
It should also work fine with Spock tests.


add a github icon at the footer to navigate open source devs to the github repository

can I work on this for GSSOC 21 ?

Sure but do add minimal icons from https://feathericons.com/ or https://useanimations.com/ to implement it.

can I work on this for GSSOC 21 ?

Make it as simplistic as possible. Assigned for 2 days

Surely 😀

@anushbhatia @smaranjitghose Can you add the gssoc label to the issue? So that it would count for the GSSOC programme?

Also should I add it to the footer or to the header component?

As requested, I have kept it simple, and used icons from https://feathericons.com/  shall I create a Pull Request.
@anushbhatia @smaranjitghose


Exception in pilight.py on starting receiver thread

Home Assistant release with the issue:
0.103.4
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):
HA Docker image on QNAP, Pilight on Raspberrypi
Integration:
[Pilight](https://www.home-assistant.io/integrations/pilight/)
Description of problem:
Not all pilight receiver-objects return a 'repeats'-key, e.g. datetime.
Because of this error the receiver thread is never started.
This error is only visible in console output during HA startup, it is not logged in home-assisant.log (is that intentionally or a bug?).

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
pilight:
  host: raspberrypi
  port: 7007
  send_delay: 0.2
  whitelist:
    protocol:
      - kaku_switch
      - generic_switch
      - arctech_switch

Traceback (if applicable):
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run()
  File "/usr/local/lib/python3.7/site-packages/pilight/pilight.py", line 151, in run handle_messages(messages)
  File "/usr/local/lib/python3.7/site-packages/pilight/pilight.py", line 138, in handle_messages
    if message_dict['repeats'] == 1:
KeyError: 'repeats'

Additional information:
Fixed it with a minor change in pilight.py, lines138 (/usr/local/lib/python3.7/site-packages/pilight)
            """Call callback on each receive message."""
            for message in messages:  # Loop over received  messages
                if message:  # Can be empty due to splitlines
                    message_dict = json.loads(message.decode())
                    if self.recv_codes_only:
                        # Filter: Only use receiver messages
                        if 'receiver' in message_dict['origin']:
                            if self.veto_repeats:
                                # fix for not existing 'repeats' in message_dict
                                # this triggers error which prevents receiver thread starting
                                # added "'repeats' in message_dict and " in next line
                                if 'repeats' in message_dict and message_dict['repeats'] == 1:
                                # end of fix
                                    self.callback(message_dict)
                            else:
                                self.callback(message_dict)
                    else:
                        self.callback(message_dict)

Where can I find pilight.py in this repository? It is not in components/pilight. I am new to HA and its eco system.

That is the pilight package on PyPi.

Thanks, found this commit (https://github.com/DavidLP/pilight/commit/a52fa6c3fb6e87aa534f0e6e60bc50bcd2a32738) (of Jan 4, 2017) which fixes this same bug. Apparently this never made it to a new version (current is 0.1.1 of Oct 16, 2016).


feat: import_map function config

What kind of change does this PR introduce?
feature
What is the new behavior?
Add import_map function config, as per https://github.com/supabase/cli/pull/786#pullrequestreview-1245150608.
Not sure how to test this, since the flag is just passed to the deno binary.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

10 of 20 (50.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.08%) to 62.925%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/functions/deploy/deploy.go
8
13
61.54%

internal/functions/serve/serve.go
1
6
16.67%

Totals

Change from base Build<PHONE_NUMBER>:
-0.08%

Covered Lines:
3593

Relevant Lines:
5710

💛  - Coveralls


Error when importing pointnet2_utils

Hi,
Thanks for the great work! I try to run the code, and get this error:
CUDA error: the provided PTX was compiled with an unsupported toolchain.
This error only happens when I import as from pointnet2_ops import pointnet2_utils (commenting related to this code has no error). And the error also only happens when I use Nvidia Ampere arc, specifically, Nvidia A5000. Here is my other setting:

Python: ver 3.9
Pytorch: ver 1.9, with cuda 11.1
Cuda driver in my Ubuntu machine: 11.3

Note: the installation goes well, without any error message
Thanks!

Thanks to this PyTorch forum here, I added “8.6” in the TORCH_CUDA_ARCH_LIST here, and it solved the issue.


<IP_ADDRESS>.0

This PR updates the partner version to <IP_ADDRESS>.0 for release.

This is not a proper BidMachine version. Closing.


Request: Add schematics

First of all: Great Work! This is awesome!
I'd like to make a version with USB C.
Could you upload the schematic in EasyEDA format? Currently the schematic is only available as PDF. (Or I am just dumb)
It would save quite some not not having to reverse draw the schematic.

Have a look in /BoardVersions/70mmby50mmVer2.4/BoardFiles/EasyEDA
There should be a .json that you can import?
Let me know if it works as I've never done an import/export of EasyEDA before
Good luck with the USB C version by the way!! I had planned to do one myself in a few months. Will be interested to see how you get on

I think this is only the PCB. At least I did not get any schematic out of it.

Righto, sorted it.
Downloading the project only gave me a Readme.txt file annoyingly.
However, I have exported the schematic in .json form and uploaded under /BoardVersions/70mmby50mm/BoardFiles/EasyEDA
Have a look, you should see both Schematic and PCB there now
Ta


Add proposed API to specify workspace-specific EnvironmentVariableCollection mutators

Closes https://github.com/microsoft/vscode/issues/171173

Need some help with passing workspace folder to MergedEnvironmentVariableCollection here:
https://github.com/microsoft/vscode/blob/aa0a7926066b02c8ccb8a7a3e5b20300cd7583fa/src/vs/platform/terminal/node/terminalEnvironment.ts#L255-L259

Reverting fix for remote terminals which is leading to smoke tests timing out, will be tackled separately.


main: Added nix shell script to make building the binaries easy on…

… NixOS.

Motivation
The Makefile is currently specific to Ubuntu. This change adds a NixOS script which pulls in all the deps required to build the codebase.
Test Plan
Run nix-shell in the root on NixOS then run:
cargo build -p diem-node -p tower -p backup-cli -p ol -p txs -p onboard --release

If running for the first time run rustup update prior to the cargo build command.
Related PRs
None?

Just tried it on a new host, for some reason had to run rustup install 1.52.1 from the rust-toolchain after rustup update.

Super helpful. If you don't need it in the root of the project,  I would move it to ol/util where we have some .sh helpers.


move sealer cert command

Describe what this PR does / why we need it
move sealer cert command to cluster module
Does this pull request fix one issue?

Describe how you did it
Describe how to verify it
Special notes for reviews

Codecov Report
Base: 21.55% // Head: 21.55% // No change to project coverage :thumbsup:

Coverage data is based on head (7179f14) compared to base (dc7c336).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1809   +/-   ##
=======================================
  Coverage   21.55%   21.55%
=======================================
  Files          72       72
  Lines        6554     6554
=======================================
  Hits         1413     1413
  Misses       4958     4958
  Partials      183      183

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


feat: add Mac OS and Windows support for deeplinks

This PR uses app_links package instead of uni_links to support all platforms except linux. For linux support, there is an open issue here.
This PR should be merged after this.
Related https://github.com/supabase-community/supabase-flutter/issues/106

@bdlukaa
Thanks finding all the details that I missed! I have edited and pushed my updates!

Looking forward to this!
Great work @dshukertjr


make sqljs error: INLINING_LIMITexpectsboolbut gotint`

I tried running make sqljs on macOS (x86) - after first running brew install emscripten
I got this error:
sqlite-lines % make sqljs
emcc -O2 -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_JSON1 -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_NORMALIZE -DSQLITE_LINES_DATE="\"2022-08-03T18:13:44Z-0700\"" -DSQLITE_LINES_VERSION="\"v0.1.1\"" -DSQLITE_LINES_SOURCE="\"cfd99ea3b3fa21471f34d9571049ef0b5c0b61d2\"" -DSQLITE_LINES_DISABLE_FILESYSTEM -DSQLITE_EXTRA_INIT=core_init --memory-init-file 0 -s RESERVED_FUNCTION_POINTERS=64 -s ALLOW_TABLE_GROWTH=1 -s<EMAIL_ADDRESS>-s<EMAIL_ADDRESS>-s SINGLE_FILE=0 -s NODEJS_CATCH_EXIT=0 -s NODEJS_CATCH_REJECTION=0 -s LLD_REPORT_UNDEFINED -s INLINING_LIMIT=10 -s ASSERTIONS=1 -O1 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 \
		-I./sqlite -I./ sqlite-lines.c dist/sqlite3-extra.c \
		--pre-js wasm/api.js \
		-o dist/sqljs.js
shared:INFO: (Emscripten: Running sanity checks)
emcc: error: setting `INLINING_LIMIT` expects `bool` but got `int`
make: *** [dist/sqljs.js] Error 1

Can you run emcc --version?
$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.5-git
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The release action also pins to 3.1.5, though I don't remember why... emcc isn't very fun to work with

% emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.17-git
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I thought I'd try installing that specific version, but there's a hilarious decade-long StackOverflow thread which documents every historic method for installing previous versions of software and at what point Homebrew deprecated it: https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula

@simonw this process worked for me:

git clone https://github.com/emscripten-core/emsdk.git && cd emsdk
./emsdk install 3.1.5

that ran and succeeded and installed the tools to ./upstream/emscripten/ and ./node

source ./emsdk_env.sh

this adds the directories above to the path

$ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.5 (d33328b22db1aa62a51c50731e9645951a2038bc)

then the sqlite-lines build succeeded

Looking into the actual error a bit, INLINING_LIMIT is a boolean because all it does is turn on -fno-inline-functions; so presumably changing 50 to 1 here and 10 to 1 here would get things compiling with recent emscriptens


feat: Live Story app initial commit

Purpose

Initial commit for Live Story app release.
Approach

The first integration functionality involves pushing Live Story contents directly via Contentful Management API to create contentful content type and entries directly from inside Live Story console.
https://github.com/user-attachments/assets/94b3a6ea-1270-45c5-9033-edb12174d29f
The second step on our side is to make an app available on Contentful marketplace, to permit users to install it and link Live Story experiences by using app in a few clicks, in a even faster way
https://github.com/user-attachments/assets/6b80d6da-b8e0-4cab-a6ec-d7cbe7190eaa
Some screenshots of the integration process, by using app
https://mediacdn.livestory.io/v1/livestorywebsite/posts/r2500/66bb5727f85974b79e1eb4e7.png.webp
https://mediacdn.livestory.io/v1/livestorywebsite/posts/r2500/66bb62e67d2699222fb87f6f.png.webp
https://mediacdn.livestory.io/v1/livestorywebsite/posts/r2500/66bb63dab414e33cd2b17389.png.webp
https://mediacdn.livestory.io/v1/livestorywebsite/posts/r2500/66bb6ac3b414e33cd2b179ad.png.webp
Testing steps

Install app
Create a new Live Story content type or link an existing compatible content type
Link an experience by selecting type and id (you can use experience ID: 63dbc154839f11000922a622 and type: wallgroup)
Preview the linked Live Story experience

Breaking Changes

Dependencies and/or References

Following dependencies are required for our app to work:

jQuery (v3)
Live Story main script

Please refer to this link for explanation: https://livestory.nyc/documentation/articles/basic-client-side-integration/#main-script
These dependencies are listed inside head tag  of the index.html file of the folder app.
Deployment

App looks great! Thanks for the contribution, I'll start getting things merged in and set up on our end and will be in contact if I have any questions


compara con master

Hi @juanpablosimarro, looking at the title, it seems that the objective of this PR is comparing two branches, right? Or do you plan to add a contribution from this PR in the future?

Sorry Andrés
I was trying to compare the code I did with the original one. I'm not sure
what I did in github.
Carlos Velasco is adding my contribution to the main version of pysteps.
This is the objective.
I'm not sure if this answer your question.
Best regards
Juan
El dl., 14 d’oct. 2019, 16:30, Andres Perez Hortal<EMAIL_ADDRESS>va escriure:

Hi @juanpablosimarro https://github.com/juanpablosimarro, looking at
the title, it seems that the objective of this PR is comparing two
branches, right? Or do you plan to add a contribution from this PR in the
future?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pySTEPS/pysteps/pull/126?email_source=notifications&email_token=AMTXTEUQSCTQUKU4JTY4ERLQOR7AHA5CNFSM4JANWFN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBE6FJY#issuecomment-541713063,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMTXTERS3RLI6JG7M63YJMDQOR7AHANCNFSM4JANWFNQ
.

No worries! I was asking just to know if I could close the PR.


Aug 17 - 21: Getting started with HTML & CSS

Event Information

Category
Details

Reactor Topic
Coding, Languages, and Frameworks

Monthly Topic (if applicable)
API

Weekly Topic (if applicable)

Stream Date
Aug 17 - 21, 2020

Stream Duration
90 min

Title
The Building Blocks of HTML and CSS

Description
If you’re interested in the idea of developing your own website, the most logical first step is to learn the core components used to display information in a browser. In this hands-on workshop, we’ll use HTML tags to identify sections of a page and allow users to enter information. Then, we’ll experiment with CSS to showcase how it can format page content and layout. In this workshop, we will write code using VS Code. If you plan to follow along, you can download VS Code at: https://codepen.io/.

Content
https://github.com/microsoft/Reactors/tree/main/Web_Fundamentals_1/2_HTML

Workshop details

Date
Local Start Time
Location
Speaker
SharePoint ID

Aug 17
4:00 PM GMT+4
Abu Dhabi
Devendra Rawat
7894

Aug 17
6:00 PM  GMT+3
Tel Aviv
Devendra Rawat
7895

Aug 18
8:00 PM  GMT+10
Sydney

7896

Aug 18
6:30 PM GMT+5:30
Bangalore
Devendra Rawat
7897

Aug 19
3:30 PM GMT-3
Sao Paulo

7898

Aug 19
7:30 PM GMT+8
Shanghai

7899

Aug 19
6:00 PM GMT+1
London

7900

Aug 19
4:00 PM PDT
US/Canada

7901

Event Checklist
10 Weeks Prior

[X] Reactor Content Team (RCT) opens a new issue for an upcoming local workshop filling in the Event Information and Workshop details tables. RCT member who owns content (content owner) this week will be the assignee.
[X] RCT and content owner discuss details of the event in the comments of this issue. RCT adds a confirmed-event label and local-digital-event tag to the issue and adds event to the Local Digital Events project. Issue will appear in the Upcoming Streams column
[X] RCT adds a ready-for-marketing-edit label so the RCT can review title and description

8 Weeks Prior

[x] RCT does a review of title and description and removes the ready-for-marketing-edit label
[x] RCT moves the issue to the Ready for SharePoint column
[x] RCT informs the Reactor Marketing Team of the new event information
[ ] RCT confirms the speaker
[ ] RCT provides speaker with assets (e.g. slides, overlays) and the survey data for the event
[ ] RCT moves the issue to the Content Preparation In Progress column

5 weeks Prior

[ ] Content owner opens a PR with the new content for the workshop on the customer-facing Reactor repository and adds the content-development and local-digital-event tag to the PR.
[ ] Content owner adds to the same PR modification to the Streaming README
[ ] RCT reviews, approves, and merges the changes
[ ] RCT shares content with the vendor/instructor
[ ] RCT provides vendor/instructor with assets (e.g. slides, overlays) and the survey data for the event
[ ] RCT ensures that instructors have received an invite to the workshops and that PM team works with instructors to get setup in the platform (e.g. Teams, Teams Live Event)

1 Week Prior

[ ] Connect vendor/instructor with the PM(s) for the locations where this event has been marketed
[ ] Check-in with vendor/instructor that they are prepared for the workshop
[ ] RCT moves the issue to the Ready to Stream column

During and After Stream

[ ] Instructor (and optional moderator) run the stream
[ ] _(Optional)_RCT submits recording to be uploaded to the Reactor YouTube and to be made available on LearnTV
[ ] RCT moves issue to the Stream Complete column

Abu Dhabi, Tel Aviv, &  Bangalore published

Sydney, London/Stockholm, US/Canada all published without speaker details. (7/6)

Workshops have been delivered!


HWKALERTS-149 Prepare alerts to use embedded C* for itests

please @jshaughn , take a look on it, to be on sync with the latests commons.
Thanks

@jshaughn this one is ready for merge from my side.
Could you take a look to see if there is something strange ?
Thanks,


Scaling of Data

Hi,
I've noticed is the scaling of the data can have an effect on the result, but I am not sure why it would  and can't find any reason for it in the code or references. Below I have the CP probabilities for the same data with or without a constant factor, which are somewhat different.
Are there some assumptions about the input data I am missing?
Thanks

The student T likelihood scales with the squared mean distance, which is non-linear w.r.t. to data scaling.
https://github.com/hildensia/bayesian_changepoint_detection/blob/2dd95f5c1d028116899a842ccb3baa173f9d5be9/bayesian_changepoint_detection/offline_likelihoods.py#L138

Thanks for quick reply. Confusion for me is that often the scale is arbitrary, such as if there are multiple ways to make some data dimensionless, yet that could yield vastly different results; my assumption before was that I should always just always normalize over the entire time series. Is there some prior used here in calculating the student T likelihood that I should keep in mind with how I scale my data, or any other way to decide the scale?

Good question. I would believe that mean centering your data is probably a good idea. But w.r.t. scaling I have to think a bit more. It has probably to do with an implicit prior somewhere, but I cannot pinpoint it right now.


Gray border around png shapes

Hi guys, thanks u for such a great lib!
This is kinda duplicate of
https://github.com/itgalaxy/favicons/issues/253
as far as this issue is still opened there from 1 Jan 2019 , is it possible to rollback dependency of this package and lock it no last working version?

I think we can do better, Favicons might have already been fixed on the latest master, do you think you can verify that?


feat: add support to use a different KMS key for backup encryption

Description
Issue : https://github.com/terraform-ibm-modules/terraform-ibm-icd-postgresql/issues/509

Release required?

[ ] No release
[ ] Patch release (x.x.X)
[x] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content

Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

/run pipeline

/run pipeline

Need to wait for https://github.com/terraform-ibm-modules/terraform-ibm-icd-postgresql/pull/513 to be merged to unblock pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

@Aashiq-J Hold off running pipeline - I'm reviewing..

/run pipeline

/run pipeline

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

GitHub release
v3.18.0

Your semantic-release bot :package::rocket:


Size optimization: Do not include unreachable routines & functions

Same, but different as #2:
Sub routines that are unreachable (based on static code analysis) are currently part of the compiler output.
Please consider this code:
CONST ASSERTS = $00

SUB assert (condition AS BYTE, message AS STRING * 20) STATIC
END SUB

IF ASSERTS THEN
  CALL assert(1 = 2, "")
END IF

Sub routine assert() is unreachable because the condition of the preceding IF statement statically evaluates to false. However the currently resulting program segments look like this:
+---------------+-------+-------+
|    Segment    | Start |  End  |
+---------------+-------+-------+
|BASIC Loader   | $0401 | $040C |
|Program code   | $040D | $0459 |
|Library        | $045A | $049F |
|Data & Strings | $04A0 | $04A0 |
|Variables*     | $04A1 | $04B7 |
+---------------+-------+-------+

Not only is the sub routine part of the program code segment, but there is also code for a jump to this (empty) sub routine:
                    lda #$00    ; constant ASSERTS
                    bne L0429   ; process parameters for sub routine
                                ; and call sub routine [S0459]
                    jmp L0456   ; jump to end of program (and back to BASIC)
L0429               […]         ; parameter processing
                    jsr S0459
                    […]
S0459               rts         ; (empty) sub routine assert()

Further optimization might include evaluation of constant values like 1 = 2 from the example above.
Currently this results in this assembler code:
L0429               lda #$01
                    cmp #$02
                    beq L0433
                    lda #$00   ; FALSE
                    beq L0435
L0433               lda #$ff   ; TRUE
L0435               […]

Hi there.
Unreferenced subs/functions are not included in the final binary. The sub in your example is referenced, this is why it is compiled.
Preprocessor directives would solve this problem (note the # before IF and END IF):
#IF ASSERTS THEN
  CALL assert(1 = 2, "")
#END IF

XC=BASIC doesn't provide a preprocessor yet. It is planned for a future version.

XC=BASIC doesn't provide a preprocessor yet. It is planned for a future version.

That would be a valuable feature!

Further optimization might include evaluation of constant values like 1 = 2 from the example above.

Is there any approach to this? This applies to DIM variables as well:
DIM n AS WORD
n = 8 * 4 * 25

This example will produce Assembler/ML code that is calculating the [constant] result of 800 while a simple assignment would save memory space and significantly improve performance.
Another improvement would be to allow calling functions without assigning the returned value if we don't care for it. As of now the compiler throws syntax errors:
FUNCTION write_log(msg AS STRING * 40)
  […]
  RETURN success   ' $FF if successful; $00 if failed to write log
END FUNCTION

write_log("5349 MODE COMPLETE")   ' compiler output: "ERROR: Syntax error"

As for compile time expression evaluation, see my comment here: https://github.com/neilsf/xc-basic3/issues/240#issuecomment-1704027864
Unfortunately, the design decision has not been yet made. Any input/opinion is welcome.

Another improvement would be to allow calling functions without assigning the returned value if we don't care for it.

I think in this case you should define a SUB instead of a FUNCTION.

As for compile time expression evaluation, see my comment here: #240 (comment)
Unfortunately, the design decision has not been yet made. Any input/opinion is welcome.

Very good point indeed! I did not consider the different behavior of host and target platform.


zephyr: Comply with rtc driver refactor

Files adjustments to comply with new rtc driver implementation

@LucasTambor Is this ready?


Testint the Linter Ruff by implementing Indentation Errors in code.py

This is the second test, since the first test did not fail as expected

It seems, that testing the workflows is not possible for me, since they are awwainting approval from the maintainer to start testing.


couldn't suport macro?

println! and assert!...without code complement.
what's wrong with me ？

If I understand you correctly, you have problem with autocompletion of macros. It's not bug, right now racer (tool Rusty Code using to provide autocompletion) doesn't support macros.


Android Studio and possibly other applications can't access WSL filesytem

Your Windows build number:  (Type ver at a Windows Command Prompt)
Microsoft Windows [Version 10.0.18936.1000]

What you're doing and what's happening:
I used git for Linux to check out a repo on Linux filesystem. If I run explorer.exe . in this directory, Windows file explorer opens fine and I can access files from explorer. However, when I try to create project in Android Studio, it can't access this path. Even when I give exact path using \\wsl$\Ubuntu\home\user\path\to\repo, Android Studio doesn't recognize it. Interestingly, Ubuntu doesn't show up under Network in file explorer, so, everytime I have to open explorer from command line.

What's wrong / what should be happening instead:
\\wsl$\... path should work in any Windows program including Android Studio. Explorer should also display distributions under Network resources.

Try to mount/map that network drive (e.g. Z:\).

That doesn't work. Get network name cannot be found error.

Oh that worked. Thanks a lot.
However, \\wsl$ is a valid path. Do you know just using this path doesn't work?

Do you have any simple program instead of Android Studio?

No I haven't tried anything else yet. I just assumed that any program which has it's own file explorer would face this issue. I tried Visual Studio but that uses Windows file explorer so it didn't have the same problem.
Do WSL distros show up for you under Network in explorer by default?

Do WSL distros show up for you under Network in explorer by default?

I do not allow Windows to do that hence I made a Shell Link (.lnk) to automate that.

Interestingly, Ubuntu doesn't show up under Network in file explorer

There wasn't enough to go on here to determine why Ubuntu isn't showing up under Network in file explorer.
If I had to guess either (a) The problem is related to that path not appearing in the Network Neighborhood, or, (b) Android Studio itself isn't happy with \\wsl$\Ubuntu\home\user\path\to\repo paths due to some gap in their code. The Z:\ work-around would suggest it's the latter, but that's a WAG. Either way, ran course because not actionable.
Appreciate the submission though. Maybe some me2s will appear on the mysteriously missing 'Ubuntu' in the net hood.


Asking for a simple script to get text and video features

First of all - Amazing work on this one.
I'm a bit getting lost with the repo, may I request a simple few line script that does something like the following:
model = CLIPViP("pretrain_clipvip_base_32.pt")
text_features = model.encode_text("This is a very cute cat")
video_features = model.encode_video("vid_file.mp4")
cosine(text_features, video_features)

[Extra] Preferably I wish to get the video features for a batch of mp4 files with different lengths
Thank you

Getting video features from Video-LLaMA sounds great.
For text features, I don't think it is a good choice. The reason is because our Video-LLaMA is trained to better understand visual and audio content instead of better aligning LLMs with visual/audio representations. Actually, the language decoder is kept frozen during pre-trainin/fine-tuning and there is no difference between the text features from Video-LLaMA and those from the used language decoder.
We will consider the suggestion that getting video features from Video-LLaMA but it may need some time to do this :sweat_smile:


IncludeGraph=true within TransactionScope throws 'An ambient transaction has been detected. The ambient transaction needs to be completed before beginning a transaction on this connection.'

Hi
We are having an issue with the IncludeGraph=true option within a TransactionScope throwing 'An ambient transaction has been detected. The ambient transaction needs to be completed before beginning a transaction on this connection.'
We are in the process of moving from .Net Framework 4.7.1/EF6.2 to .Net Core3.1/.Net Standard 2.0 and EFCore 3.1.13. I have installed version 3.6.1 of your Bulk Extensions as that is most recent version that targets .Net Standard 2.0.
Our repositories use a Unit of Work so that multiple operations can be looped through and committed in one transaction across different DataContexts and if there are any errors it rolls back everything to a known state
I can replicate the issue in simple terms by doing something like
using (var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() { IsolationLevel = IsolationLevel.ReadCommitted },
                TransactionScopeAsyncFlowOption.Enabled))
{
    using (var dataContext = new DataContext(connectionString))
    {
        var bulkConfig = new BulkConfig()
        {
            IncludeGraph = true
        };

        dataContext.BulkInsert(parents, bulkConfig);
    }

}

I believe it is related to DbContextBulkTransactionGraphUtil.cs and line:
var transaction = context.Database.CurrentTransaction ?? (isAsync ? await context.Database.BeginTransactionAsync() : context.Database.BeginTransaction());

I am not sure if there is a way round it currently to get it to work within a TransactionScope? I dont know if it is possible to have a BulkConfig option to not start a transaction when using IncludeGraph=true and let the TransactionScope handle it?

Not sure, IncludeGraph feature was PR, maybe @maitlandmarshall can give more info.
Meanwhile try using BulkOps directly without IncludeGraph.

Thanks. I downloaded the version and changed it to check for if there is a TransactionScope and then didnt start a new Transaction. This got past the AmbientTransaction issue.
However it then threw an exception "This platform does not support distributed transactions.". Turns out that .Net Core doesnt support distributed transactions, it is a feature they plan to add in the future. https://github.com/dotnet/runtime/issues/715
We only use the bulk insert for a couple of things so I might have to look into getting it to work outside of our unit of work in this instance

Good idea also.

The problem is that the Transaction.Current is not checked, which is then used by RelationalConnection.EnsureNoTransaction() to verify that no ambient transaction is present. I'd like to see this issue reopened so that at it can be a known issue.

I humbly submit https://github.com/borisdj/EFCore.BulkExtensions/pull/988 to deal with this.


fix: give adapter section a unique scrollToId

Description
Fixed the Adapter section of the settings to have a unique scrollToId, confirmed that the get started button scrolls to this section.
Task Item
fixes #6116

Coverage remained the same at 53.422% when pulling 51187f0702065b4078b4c6f1452ea9b19ca2550f on benbrown/fixmanagebutton into 72d0066411828068346b9d5f8c7b1a8c9f2d21c1 on main.


Unable to log into Gas fees demo

Steps to repro:

Open link https://moralis-gas-demo.netlify.app/
Click Moralis Login
Authenticate via MetaMask

State of doesn't change, but should presumably log me in and show gas fees.

It seems like the demo is unable to connect to the Parse API


Cant pickup the Advanced Inscribers

Breaking the Inscriber with a pickaxe or with a wrench doesn't work. The block breaks and no item is dropped.

commit f57985f108f7912201e8042534a481e5fee5e0b0 fixes issue


Tags

There are many tags for cc-cedict, like: slang, accounting, sports, etc.
Here is example: CC-CEDICT 汉英词典 2019.06.19
shbf's css so good, can be refrence.

@shawkynasr
Unfortunately, the CC-CEDICT source data does not include such TAGs, which are added by users when they contribute their own interpretations, and there are no specific rules to match these contents.
This feature is easy to implement, but it is very time-consuming to organize all the TAGs and may be missed, and it is also necessary to follow the latest translation in real time.
https://cc-cedict.org/editor/editor.php?handler=QueryDictionary&querydictionary_search=中央直轄市

Yes, I see.
Here some of tags according to shbf file.
tags.txt


travis + android w/ emulator timeout

The Travis Android toolchain (w/ emulator tests) frequently times out.  This requires 3-4 restarts (or more) before a PR gets a green light.  This is after: removing LTO processing to save link time; consolidating tests; and removing non-essential executable targets.  I believe a fair amount of time is lost to the Android installation, but I haven't timed it closely.
This following article mentions the Travis cache feature: http://panavtec.me/continous-integration-on-android-with-travis-ci, which might be helpful.

Travis can cache directories that you need to speedup the following builds, to do that you have to pay or you can use the new container infrastructure, by specifing “sudo: false”. To enable cache, you have to specify which directories you want to cache, in this case I’m caching some .gradle folders with:

In practice, this is the biggest bottleneck in the development workflow.

compare cache w/ current SDK + NDK installation
are there opportunities to parallelize?

Old benchmark: https://github.com/elucideye/drishti/issues/13#issuecomment-243860301

log-android-timeout.txt

I've added travis_wait 200 to the build+test script:
https://github.com/elucideye/drishti/blob/0bcb0b66a6b560735bf76ae787cf936ef682c4a4/.travis.yml#L79

This following article mentions the Travis cache feature: http://panavtec.me/continous-integration-on-android-with-travis-ci, which might be helpful

No new ideas. Basically it's Travis cache feature that already was tested.

compare cache w/ current SDK + NDK installation

Old benchmark is here: https://github.com/elucideye/drishti/issues/13#issuecomment-243860301. I can run it again but I doubt it will have any effect.
From Travis docs:
If you store archives larger than a few hundred megabytes in the cache, it’s
unlikely that you’ll see a big speed improvement

For Android NDK/Android SDK we are talking about gigabytes.

Here is a log of the most recent timeout

Checking...

Some date commands could be added for timing the initial setup steps

Polly prints times of all stages at the end. So actually successful build will be more informative.

Configure stage takes about 16+ minutes. Most heavy parts was about huge Android-SDK package which consists of a lot of components.
Download/install Android SDK components: 25 + 57 + 19 + 18 ~ 2 minutes
These components are not needed in fact because there are already integrated into Android SDK package on cache hit. They can be optimized out by introducing PRIVATE package in Hunter. PRIVATE will signal the whole system that we depend on package but we don't need it after install. Another example of such package is Sugar modules.
Android SDK download (3+ minutes):
-- [hunter *** DEBUG *** 2017-10-18T12:39:28] Downloading file (try #0 of 10):
-- [hunter *** DEBUG *** 2017-10-18T12:39:28]   https://github.com/elucideye/hunter-cache/releases/download/cache/add02227c4114c29ce34923329f05c1764ada74e.tar.bz2
-- [hunter *** DEBUG *** 2017-10-18T12:39:28]   -> /Users/travis/.hunter/_Base/Cache/raw/add02227c4114c29ce34923329f05c1764ada74e.tar.bz2
-- [download 0% complete]
...
-- [download 100% complete]
-- [hunter *** DEBUG *** 2017-10-18T12:42:53] Locking directory: /Users/travis/.hunter/_Base/Cellar/add02227c4114c29ce34923329f05c1764ada74e/add0222

Android SDK unpacking to cellar (4+ minutes):
-- [hunter *** DEBUG *** 2017-10-18T12:42:53] Unpacking to cellar:
-- [hunter *** DEBUG *** 2017-10-18T12:42:53]   /Users/travis/.hunter/_Base/Cache/raw/add02227c4114c29ce34923329f05c1764ada74e.tar.bz2
-- [hunter *** DEBUG *** 2017-10-18T12:42:53]   -> /Users/travis/.hunter/_Base/Cellar/add02227c4114c29ce34923329f05c1764ada74e/add0222/raw
-- [hunter *** DEBUG *** 2017-10-18T12:46:56] Unpacked successfully

Creating link script (CMake globbing) for Android SDK (2+ minutes):
-- [hunter *** DEBUG *** 2017-10-18T12:46:56] Creating list of files and directories
-- [hunter *** DEBUG *** 2017-10-18T12:49:11] Creating directories

This part can be optimized out if we create such script on packing stage instead of after unpack done.
Next interesting parts I want to check:

Creating AVD
Starting emulator

Will try to catch successful build to see the time for:

Compiling all Drishti C++ components
Running tests time

Ok, thanks for the breakdown.  A few of the exhaustive tests (repeating regression for a list of resolutions) can be scaled back for HW limited CI environments.

Parallel testing (non-GPU) might save a little time.  I'm sure this is at the bottom of the list, but it can't hurt to add the notes for the record:

ctest: https://stackoverflow.com/a/33964978
gtest: https://github.com/google/googletest/blob/master/googletest/docs/FAQ.md#does-google-test-support-running-tests-in-parallel

This android build (prior to test refactoring) finished in 36 minutes

~12 minutes for C++ compiling
9+ minutes for testing on Android emulator

These two loops can be reduced or removed as optimizations for slow emulator tests (the fitting usually takes a few milliseconds per iteration on normal HW):
https://github.com/elucideye/drishti/blob/b81bcd80eea997ad4cf47631208c0b90a709952c/src/lib/drishti/eye/ut/test-drishti-eye.cpp#L251
https://github.com/elucideye/drishti/blob/b81bcd80eea997ad4cf47631208c0b90a709952c/src/lib/drishti/drishti/ut/test-EyeSegmenter.cpp#L332

The circleci.com #295 issue may provide another option for CI optimization.  As suggested by @ruslo, if circleci.com open source timeouts are generous enough for end-to-end drishti builds, we can ditch drishti-upload and rely on the hunter build time cache updates.  That would be a huge win in overall project design/simplicity/maintenance.

Is there an open issue for the hunter upload feature (design notes, etc)?

https://github.com/ruslo/hunter/issues/1097

The OS X jobs in PR #594 have not started yet after: 5 hrs 56 min 20.   One can't complain about a free service...

I meant: One can't complain about a free service, but that isn't really workable.

Last pull request: https://github.com/elucideye/drishti/pull/595
Android build: https://travis-ci.org/elucideye/drishti/jobs/290753601
Detailed:

New Hunter feature PRIVATE will give -94 sec optimization (~4% of total)
Create link script while packing instead of unpacking will optimize -87 sec (~4% of total)

Note that it looks like this build was using more powerfull hardware. Comparing with old times:

Android SDK download 57 sec vs 180 sec
Android SDK unpack 163 sec vs 240 sec
Android SDK GLOB 87 sec vs 120 sec
Android SDK PRIVATE components 94 sec vs 120 sec

Continuing the CI thread...
Interesting points: https://hackernoon.com/continuous-integration-circleci-vs-travis-ci-vs-jenkins-41a1c2bd95f5

CircleCI (CON): supports only 2 versions of Ubuntu for free (12.04 и 14.04) and MacOS as a paid part [MacOS doesn't come for free]
TravisCI (PRO): Option to run tests on Linux and Mac OS X at same time [I guess this means OS X and Linux images can't be supported as part of the same config?]

Detailed:

Very informative.  How did you generate this, btw?
The HW emulator adds a lot of overhead:

The full set of tests run in Total Test time (real) =  11.43 sec on my laptop.  I'll add a PR to scale these back when GAUZE_ANDROID_USE_EMULATOR=YES.

This one ran in 30 minutes:

Very informative. How did you generate this, btw?

It's not generated, I've made it with http://www.yworks.com/products/yed

I guess this means OS X and Linux images can't be supported as part of the same config?

You mean Toolchain-ID that will conflict on upload?

I guess this means OS X and Linux images can't be supported as part of the same config?

You mean Toolchain-ID that will conflict on upload?

Okay, reading an article. I think it means that on Circle CI you can write YAML config only for Linux or only for OSX, not both simultaneously. E.g. you can't have:
- os: linux
  env: PROJECT_DIR=examples/drishti TOOLCHAIN=gcc

- os: osx
  env: PROJECT_DIR=examples/drishti TOOLCHAIN=osx-10-11

like Travis.

Okay, reading an article. I think it means that on Circle CI you can write YAML config only for Linux or only for OSX, not both simultaneously. E.g. you can't have:

That was my understanding as well.  I don't know if there are any workarounds to achieve the same, such as: circleci.osx.yml and circleci.linux.yml.  Actually, the Linux image time are fairly consistent on Travis (I'm assuming this is due to Apple HW cost).  I suppose one option would be to configure builds for:

Appveyor = Windows
Travis = Linux
Circle = OS X

The build times have been pretty good on Travis for the last couple of days, but I think that might be due to off peak (weekend) usage.

Some day: https://github.com/ldionne/metabench +  http://www.yworks.com/products/yed 😄

Goals:

[ ] Circle CI free OSX (?)
[ ] PRIVATE packages feature: https://github.com/elucideye/drishti/issues/599
[ ] Optimize GLOB https://github.com/elucideye/drishti/issues/589#issuecomment-338407043


[Enhancement] Add extension methods for to convert to IActionResult (mvc) IResult (minimal API)

First of all, I love this extension.
I would like to see extension methods to convert an ErrorOr (domain result) to an IActionResult or IResult.
The conversion should send 200OK or 204NoContent if the operation is successfull.
If the result is an Error the conversion would take the type of error and return an appropriate ProblemDetails with the correct status Code.
This enhancement was inspired by this repository https://github.com/AKlaus/DomainResult

Maybe as a workaround (if this won't get implemented) you could use the really convenient Match method.
e.g
 private async Task<IResult> GetBookByIdlong id, IBookRepo bookRepo)
    {
        var book = await bookRepo.GetBookByIdAsync(id);

        return book.Match(
            success => Results.Ok(success),
            failure => Results.Problem()
        );
    }

where the IBookRepo returns ErrorOr<Book>. Just a quick demo, you should process the list of errors (failure) and return matching results. 500 UnexpectedError, 400 BadRequest, ...

I'm not opposed to a adding a feature like this.
I have two follow up questions:

Do you think this is something that should be part of the ErrorOr NuGet? Perhaps another NuGet like ErrorOr.AspNetCore?
The problem with this type of static conversion, is bypassing the problem details factory that may be used to add custom error details to the response. From the repo you gave as an example, you can see the problem details factory isn't used:

That's the reson I usually have a base controller that has the logic of converting the error or list to an error response.
This is what I usually go with:
[ApiController]
public class ApiController : ControllerBase
{
    protected ActionResult Problem(List<Error> errors)
    {
        if (errors.Count is 0)
        {
            return Problem();
        }

        if (errors.All(error => error.Type == ErrorType.Validation))
        {
            return ValidationProblem(errors);
        }

        return Problem(errors[0]);
    }

    private ObjectResult Problem(Error error)
    {
        var statusCode = error.Type switch
        {
            ErrorType.Conflict => StatusCodes.Status409Conflict,
            ErrorType.Validation => StatusCodes.Status400BadRequest,
            ErrorType.NotFound => StatusCodes.Status404NotFound,
            ErrorType.Unauthorized => StatusCodes.Status403Forbidden,
            _ => StatusCodes.Status500InternalServerError,
        };

        return Problem(statusCode: statusCode, title: error.Description);
    }

    private ActionResult ValidationProblem(List<Error> errors)
    {
        var modelStateDictionary = new ModelStateDictionary();

        errors.ForEach(error => modelStateDictionary.AddModelError(error.Code, error.Description));

        return ValidationProblem(modelStateDictionary);
    }
}

Perhaps if we introduce ErrorOr.AspNetCore, it's possible to have something similar to the base controller above available for devs to derive from

Hello @amantinband thanks for your great package.
talking about having a separate nuget called 'ErrorOr.AspNetCore', what are your thoughts on the following extension methods 👇
public static partial class ErrorOrAspNetCoreExtensions
{
    public static IActionResult ToActionResult(this Error error) => error switch
    {
        { Type: not(ErrorType.Failure or ErrorType.Unexpected) } => MatchCommonErrorResults(error),
        _ => new StatusCodeResult((int)HttpStatusCode.InternalServerError)
    };

    public static IActionResult ToActionResult(
        this Error error,
        int? statusCode = null,
        string? title = null,
        string? detail = null,
        string? instance = null,
        string? type = null) => error switch
        {
            { Type: not(ErrorType.Failure or ErrorType.Unexpected) } => MatchCommonErrorResults(error),
            _ => MatchProblemResult(
                statusCode,
                title,
                detail,
                instance,
                type),
        };

    public static OkObjectResult ToOk<TValue>(this ErrorOr<TValue> errorOr)
    {
        EnsureStateIsNotError(errorOr, nameof(OkObjectResult));

        return new(errorOr.Value);
    }

    public static CreatedResult ToCreated<TValue>(
        this ErrorOr<TValue> errorOr,
        string uri)
    {
        EnsureStateIsNotError(errorOr, nameof(CreatedResult));

        return new(uri, errorOr.Value);
    }

    public static CreatedResult ToCreated<TValue>(
        this ErrorOr<TValue> errorOr,
        Uri uri)
    {
        EnsureStateIsNotError(errorOr, nameof(CreatedResult));

        return new(uri, errorOr);
    }

    public static CreatedAtActionResult ToCreatedAtAction<TValue>(
        this ErrorOr<TValue> errorOr,
        string actionName,
        string controllerName,
        object routeValues)
    {
        EnsureStateIsNotError(errorOr, nameof(CreatedAtActionResult));

        return new(actionName, controllerName, routeValues, errorOr);
    }

    public static CreatedAtRouteResult ToCreatedAtRoute<TValue>(
        this ErrorOr<TValue> errorOr,
        object routeValues)
    {
        EnsureStateIsNotError(errorOr, nameof(CreatedAtRouteResult));

        return new(routeValues, errorOr);
    }

    public static CreatedAtRouteResult ToCreatedAtRoute<TValue>(
        this ErrorOr<TValue> errorOr,
        string routeName,
        object routeValues)
    {
        EnsureStateIsNotError(errorOr, nameof(CreatedAtRouteResult));

        return new(routeName, routeValues, errorOr);
    }

    public static AcceptedResult ToAccepted<TValue>(this ErrorOr<TValue> errorOr)
    {
        EnsureStateIsNotError(errorOr, nameof(AcceptedResult));

        return new(location: null, errorOr);
    }

    public static AcceptedResult ToAccepted<TValue>(
        this ErrorOr<TValue> errorOr,
        string uri)
    {
        EnsureStateIsNotError(errorOr, nameof(AcceptedResult));

        return new(uri, errorOr);
    }

    public static AcceptedResult ToAccepted<TValue>(
        this ErrorOr<TValue> errorOr,
        Uri uri)
    {
        EnsureStateIsNotError(errorOr, nameof(AcceptedResult));

        return new(uri, errorOr);
    }

    private static void EnsureStateIsNotError<TValue>(
        ErrorOr<TValue> errorOr,
        string targetTypeName)
    {
        if (errorOr.IsError)
        {
            string message = $"Cannot convert to '{targetTypeName}' because the state is error";

            throw new ArgumentException(message);
        }
    }

    private static IActionResult MatchCommonErrorResults(Error error) => error switch
    {
        { Type: ErrorType.NotFound } => new NotFoundResult(),
        { Type: ErrorType.Validation } => new BadRequestResult(),
        { Type: ErrorType.Unauthorized } => new UnauthorizedResult(),
        { Type: ErrorType.Conflict } => new ConflictResult(),
        _ => throw new ArgumentException("Invalid error state!"),
    };

    private static ObjectResult MatchProblemResult(
    int? statusCode,
    string? title = null,
    string? detail = null,
    string? instance = null,
    string? type = null)
    {
        ProblemDetails problem = new()
        {
            Status = statusCode ?? (int)HttpStatusCode.InternalServerError,
            Instance = instance,
            Detail = detail,
            Title = title,
            Type = type,
        };

        return new(problem);
    }
}

By the way, I was thinking about having extension methods for minimal APIs. but there is a problem
we will have methods like below👇
    public static IActionResult ToOk<TValue>(this ErrorOr<TValue> errorOr)
    {
        return new OkObjectResult(errorOr.Value);
    }

    public static IResult ToOk<TValue>(this ErrorOr<TValue> errorOr)
    {
        return Results.Ok(errorOr.value);
    }

we can't have methods like this (with same name and parameters but with different return types).
how can we work this around ? @amantinband

This is how I solved it.
https://github.com/xavierjohn/FunctionalDDD/tree/main/Asp

The method I've settled on is to create an Error extension method ToActionResult that sits in the API layer.
Love the library!
  [Authorize(Roles = AuthConstants.Roles.Jobs.Read)]
  [HttpGet(ApiEndpoints.Jobs.GetJobByCode.Url)]
  public async Task<IActionResult> GetJobByCode(string? jobCode, CancellationToken token)
  {
      var getJobResult =
          await _mediator.Send(new GetJobQuery(HttpContext.ToExecutionContext(), string.Empty, jobCode), token);
      if (getJobResult.IsError) return getJobResult.FirstError.ToActionResult();
      var job = getJobResult.Value;
      var jobResponse = job.ToJobResponse();
      return Ok(jobResponse);
  }

public static class ActionResultMapper
{
    public static IActionResult ToActionResult(this Error error)
    {
        var problemDetails = new ProblemDetails
        {
            Title = error.Type.ToString(),
            Extensions = { ["code"] = error.Code },
            Detail = error.Description
        };

        return error.Type switch
        {
            ErrorType.Validation => new ObjectResult(problemDetails) { StatusCode = StatusCodes.Status400BadRequest },
            ErrorType.NotFound => new ObjectResult(problemDetails) { StatusCode = StatusCodes.Status404NotFound },
            ErrorType.Unauthorized => new ObjectResult(problemDetails)
                { StatusCode = StatusCodes.Status401Unauthorized },
            ErrorType.Forbidden => new ObjectResult(problemDetails) { StatusCode = StatusCodes.Status403Forbidden },
            _ => GenerateGeneric500Error()
        };
    }

    private static IActionResult GenerateGeneric500Error()
    {
        var genericProblemDetails = new ProblemDetails
        {
            Title = "Internal Server Error",
            Detail = "An unexpected error occurred.",
            Status = StatusCodes.Status500InternalServerError
        };

        return new ObjectResult(genericProblemDetails) { StatusCode = StatusCodes.Status500InternalServerError };
    }
}

Thanks for the suggestions everyone.
I started looking into implementing this feature, as I think it can be very useful for ASP.NET apps.
For minimal APIs the solution is simple and would look something like this:
public static class ErrorExtensions
{
    public static IResult ToProblemResult(this List<Error> errors)
    {
        if (errors.Count is 0)
        {
            return TypedResults.Problem();
        }

        if (errors.All(error => error.Type == ErrorType.Validation))
        {
            return errors.ToValidationProblemResult();
        }

        return errors[0].ToProblemResult();
    }

    private static ProblemHttpResult ToProblemResult(this Error error)
    {
        var statusCode = error.Type switch
        {
            ErrorType.Conflict => StatusCodes.Status409Conflict,
            ErrorType.Validation => StatusCodes.Status400BadRequest,
            ErrorType.NotFound => StatusCodes.Status404NotFound,
            ErrorType.Unauthorized => StatusCodes.Status403Forbidden,
            _ => StatusCodes.Status500InternalServerError,
        };

        return TypedResults.Problem(statusCode: statusCode, title: error.Description);
    }

    private static ValidationProblem ToValidationProblemResult(this List<Error> errors)
    {
        Dictionary<string, string[]> validationErrors = errors
            .GroupBy(error => error.Code)
            .ToDictionary(
                group => group.Key,
                group => group.Select(error => error.Description).ToArray());

        return TypedResults.ValidationProblem(validationErrors);
    }
}

Which takes into account any custom extensions or configurations defined for the problem details:
    builder.Services.AddProblemDetails(options =>
    {
        options.CustomizeProblemDetails = (context) =>
        {
            context.ProblemDetails.Extensions.Add("foo", "asdfasdfasdf");
        };
    });

The problem still remains for controllers, since the problem details customizations are applied via the ProblemDetailsFactory. The only way to get around this issue is calling the method Problem in the ControllerBase, or somehow getting hold of the factory.
One option is doing what @xavierjohn did, which is passing the controller base to the ToProblemResult method:

which doesn't sit right with me. A better option in this case IMO is passing the HttpContext (which we would then use to get hold of the problem details factory/service)
Here are the options I'm thinking about
Options 1: Making an extension method that turns the errors into a ProblemDetails. The caller would then use it however they wish
[HttpGet]
public IActionResult Foo()
{
    var problemDetails = errors.ToProblemDetails();
    return Problem(problemDetails.Title, ...);
}

app.MapGet("foo", () => Results.Problem(errors.ToProblemDetails()))

Options 2: Creating 2 methods, one for Minimal APIs and one for MVC Controllers
[HttpGet]
public IActionResult Foo()
{
    return result.Match(movie => Ok(movie), errors => errors.ToProblemResult(HttpContext))
}

app.MapGet("foo", () => result.Match(movie => Results.Ok(movie), errors => errors.ToProblemResult())

Feedback would be appreciated
What option above would you prefer?

[ ] Option 1
[ ] Options 2

If we go with option 2 (which I would personally prefer as the consumer of the ErrorOr package), what naming would you prefer?
Notice the method can have the same name since there would be two overloads, one that takes the http context and one that doesn't.

[ ] ToResult (minimal apis), ToActionResult (MVC controllers)
[ ] ToProblemResult (minimal apis), ToProblemActionResult (MVC controllers)
[ ] ToResult (for both)
[ ] ToProblemResult (for both)
[ ] ToHttpError (for both)
[ ] something else

Here is a full working implementation for both MVC controllers and minimal APIs:
public static class ErrorExtensions
{
    public static IActionResult ToProblemResult(this List<Error> errors, HttpContext httpContext)
    {
        ProblemDetails problemDetails = errors.ToProblemDetails();

        if (httpContext.RequestServices.GetService<ProblemDetailsFactory>() is ProblemDetailsFactory factory)
        {
            problemDetails = factory.CreateProblemDetails(
                httpContext,
                problemDetails.Status,
                problemDetails.Title,
                problemDetails.Type,
                problemDetails.Detail,
                problemDetails.Instance);
        }

        return new ObjectResult(problemDetails) { StatusCode = problemDetails.Status };
    }

    public static IResult ToProblemResult(this List<Error> errors)
    {
        return Results.Problem(errors.ToProblemDetails());
    }

    public static ProblemDetails ToProblemDetails(this List<Error> errors)
    {
        if (errors.Count is 0)
        {
            return TypedResults.Problem().ProblemDetails;
        }

        if (errors.All(error => error.Type == ErrorType.Validation))
        {
            return errors.ToValidationProblemResult().ProblemDetails;
        }

        return errors[0].ToProblemResult().ProblemDetails;
    }

    private static ProblemHttpResult ToProblemResult(this Error error)
    {
        var statusCode = error.Type switch
        {
            ErrorType.Conflict => StatusCodes.Status409Conflict,
            ErrorType.Validation => StatusCodes.Status400BadRequest,
            ErrorType.NotFound => StatusCodes.Status404NotFound,
            ErrorType.Unauthorized => StatusCodes.Status403Forbidden,
            _ => StatusCodes.Status500InternalServerError,
        };

        return TypedResults.Problem(statusCode: statusCode, title: error.Description);
    }

    private static ValidationProblem ToValidationProblemResult(this List<Error> errors)
    {
        Dictionary<string, string[]> validationErrors = errors
            .GroupBy(error => error.Code)
            .ToDictionary(
                group => group.Key,
                group => group.Select(error => error.Description).ToArray());

        return TypedResults.ValidationProblem(validationErrors);
    }
}

Waiting to hear some feedback before I move forward with this 🙂

@amantinband I think that looks great :+1:
In regards to your earlier question about this being in a separate ErrorOr.AspNetCore package, I think that makes a lot of sense and will avoid AspNetCore references in either domain/application projects. This new package can just be installed in the AspNetCore projects.

@amantinband
For me option 2, and ToProblemResult (for both)
For context I should mention that I haven't used ErrorOr yet, but have used the Ardalis Result library.

@amantinband looks good. I wonder, maybe this is a bigger question.
In my scenario for conflicts and bad requests I need for each error three properties.

Error code
Error message, and
Property name
This is so we can inform our customers what is wrong, and each consumer of the API can choose what error message to display. They don't have to parse the error message to understand what the issue is.

So to my question:
Can we have the ability to change the structure of the errors. and or introduce each error in your system to include a 'code' property?

ErrorOr.AspNetCore

Yes, this package would be great!

@amantinband looks great!
IMO, ErrorOr.AspNetCore should also use the Metadata property of Error and add the key/values to ProblemDetails as extensions.

Hey guys, here's an early draft for the new APIs I'm thinking of adding as part of ErrorOr.AspNetCore:
Convert an Error or List<Error> to IActionResult
error.ToActionResult(httpContext);
errors.ToActionResult(httpContext);

Convert an Error or List<Error> to IResult
error.ToResult();
errors.ToResult();

Convert an Error or List<Error> to ProblemDetails
error.ToProblemDetails();
errors.ToProblemDetails();

Convert an Error or List<Error> to an http status code
error.ToHttpStatusCode();
errors.ToHttpStatusCode();

Configurations
serviceCollection.AddErrorOr(options =>
{
    options.IncludeMetadataInProblemDetails = true; // default is false
    options.ErrorsToProblemDetailsMapper.Add(errors =>
    {
        if (someCheck)
        {
            return null; // will use default mapping
        }

        return new ProblemDetails(..); // will not use default mapping, will respect IncludeMetadataInProblemDetails
    });
});

Thoughts?

initial draft #107

I see that the PR is barely readable (will fix it up), so here's a tl;dr of the planned changes and the APIs that will be available as part of ErrorOr.AspNetCore:
ErrorOr configurations
Small example
builder.Services.AddErrorOr(options =>
{
    options.IncludeMetadataInProblemDetails = true;

    options.ErrorToResultMapper.Add(error =>
    {
        return error.NumericType == 421
            ? Results.Ok("this is actually not an error")
            : null;
    });

    options.ErrorToStatusCodeMapper.Add(error =>
    {
        return error.NumericType switch
        {
            421 => StatusCodes.Status307TemporaryRedirect,
            68 => StatusCodes.Status202Accepted,
            _ => null,
        };
    });
});

All options
public class ErrorOrOptions
{
    public bool IncludeMetadataInProblemDetails { get; set; } = false; // whether error's metadata will be included in the problem details response
    public List<Func<List<Error>, IResult?>> ErrorListToResultMapper { get; set; } = [];
    public List<Func<Error, IResult?>> ErrorToResultMapper { get; set; } = [];
    public List<Func<List<Error>, IActionResult?>> ErrorListToActionResultMapper { get; set; } = [];
    public List<Func<Error, IActionResult?>> ErrorToActionResultMapper { get; set; } = [];
    public List<Func<List<Error>, ProblemDetails?>> ErrorListToProblemDetailsMapper { get; set; } = [];
    public List<Func<Error, ProblemDetails?>> ErrorToProblemDetailsMapper { get; set; } = [];
    public List<Func<Error, int?>> ErrorToStatusCodeMapper { get; set; } = [];
    public List<Func<Error, string?>> ErrorToTitleMapper { get; set; } = [];
}

Error conversions (imagine the equivalent for List<Error> in the examples below)
error.ToActionResult();
error.ToResult();
error.ToHttpStatusCode();
error.ToProblemDetails();
error.ToTitle();

Where basically the heuristics will be

custom mapper? use it
use default

for example:
    public static int ToHttpStatsCode(this Error error)
    {
        foreach (var mapping in ErrorOrOptions.Instance.ErrorToStatusCodeMapper)
        {
            if (mapping(error) is int statusCode)
            {
                return statusCode;
            }
        }

        return error.Type switch
        {
            ErrorType.Conflict => StatusCodes.Status409Conflict,
            ErrorType.Validation => StatusCodes.Status400BadRequest,
            ErrorType.NotFound => StatusCodes.Status404NotFound,
            ErrorType.Unauthorized => StatusCodes.Status403Forbidden,
            _ => StatusCodes.Status500InternalServerError,
        };
    }

That's more or less it. More implementation details in the spaghetti PR above.
Would love to hear some feedback before moving forward with this 🙏

Dear Amichai,
I had a quick look at your implementation yesterday evening and I would like to put some implementation details up for discussion.
First of all, having this ASP.NET Core integration will be a huge win! We should also strife for other frameworks like GRPC's RpcException integration or some MassTransit integration - but we can discuss this in other issues.
About the current implementation:

The options are referenced via a static property. In my opinion, we should have an optional option parameter in the corresponding ToProblemResult, ToActionResult, etc. so that callers are not coupled to a singleton that cannot be circumvented.
In my opinion, the properties on the options object are not intuitive and easy to comprehend. The first time I read the source code yesterday evening, it took me about 10 minutes to really grasp what each property is exactly for. Especially that there is a distinction between converting a single error and a list of errors was irritating at first glance to me. If we keep this design, we should carefully document it.
Personally, I would drastically reduce the properties on the options. Let's just have one delegate for MVC and one for Minimal APIs which converts a list of errors to the corresponding IActionResult or IResult. This would be easy to grasp. Surely, passing a delegate would mean that we circumvent our default implementation completely, but this mapping logic shouldn't be too complicated anyway and we would avoid having all these foreach loops to pick a matching delegate before before or default implementation kicks in.
Speaking of the default implementation: it should be so good that users wouldn't want to switch anyway. For this, we should increase the number of ErrorTypes to better map to HTTP 400 - 599 codes. I would consider adding 415 Unsupported Media Type, 451 Unavailable for Legal Reasons, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout (and yes, I know they are niche response status codes).

Now I'm really interested in your opinion on that!

Fantastic feedback, thanks for taking the time.

Yes, that's part of the plan as well. If you have a different approach all together, feel free to suggest.
2, 3. I feel you. Both on the naming and the over-configurability.
The reason why implementing this is a bit cumbersome is because problem details can be configured on a service level, and ASP.NET's underlying implementation is quite different between minimal APIs and MVC. I want to continue respecting the service-wide problem details configuration if possible.
That's a good idea.

Let me play around with the syntax and naming a bit. A major selling point of ErrorOr is the intuitive naming, we don't want to be out of character 🤙
Please drop any suggestions you may have. Thanks!

I will soon provide a PR to you and then we can discuss the details.

After further inspecting the source code and the ProblemDetailsFactory functionality, I think I found an issue with the current implementation. Here's the ProblemDetailsFactory definition:
public abstract class ProblemDetailsFactory
{
    public abstract ProblemDetails CreateProblemDetails(
        HttpContext httpContext,
        int? statusCode = null,
        string? title = null,
        string? type = null,
        string? detail = null,
        string? instance = null
    );

    public abstract ValidationProblemDetails CreateValidationProblemDetails(
        HttpContext httpContext,
        ModelStateDictionary modelStateDictionary,
        int? statusCode = null,
        string? title = null,
        string? type = null,
        string? detail = null,
        string? instance = null
    );
}

The only out-of-the-box implementation is DefaultProblemDetailsFactory:
internal sealed class DefaultProblemDetailsFactory : ProblemDetailsFactory
{
    private readonly ApiBehaviorOptions _options;
    private readonly Action<ProblemDetailsContext>? _configure;

    public DefaultProblemDetailsFactory(
        IOptions<ApiBehaviorOptions> options,
        IOptions<ProblemDetailsOptions>? problemDetailsOptions = null)
    {
        _options = options?.Value ?? throw new ArgumentNullException(nameof(options));
        _configure = problemDetailsOptions?.Value?.CustomizeProblemDetails;
    }

    public override ProblemDetails CreateProblemDetails(
        HttpContext httpContext,
        int? statusCode = null,
        string? title = null,
        string? type = null,
        string? detail = null,
        string? instance = null)
    {
        statusCode ??= 500;

        var problemDetails = new ProblemDetails
        {
            Status = statusCode,
            Title = title,
            Type = type,
            Detail = detail,
            Instance = instance,
        };

        ApplyProblemDetailsDefaults(httpContext, problemDetails, statusCode.Value);

        return problemDetails;
    }

    public override ValidationProblemDetails CreateValidationProblemDetails(
        HttpContext httpContext,
        ModelStateDictionary modelStateDictionary,
        int? statusCode = null,
        string? title = null,
        string? type = null,
        string? detail = null,
        string? instance = null)
    {
        ArgumentNullException.ThrowIfNull(modelStateDictionary);

        statusCode ??= 400;

        var problemDetails = new ValidationProblemDetails(modelStateDictionary)
        {
            Status = statusCode,
            Type = type,
            Detail = detail,
            Instance = instance,
        };

        if (title != null)
        {
            // For validation problem details, don't overwrite the default title with null.
            problemDetails.Title = title;
        }

        ApplyProblemDetailsDefaults(httpContext, problemDetails, statusCode.Value);

        return problemDetails;
    }

    private void ApplyProblemDetailsDefaults(HttpContext httpContext, ProblemDetails problemDetails, int statusCode)
    {
        problemDetails.Status ??= statusCode;

        if (_options.ClientErrorMapping.TryGetValue(statusCode, out var clientErrorData))
        {
            problemDetails.Title ??= clientErrorData.Title;
            problemDetails.Type ??= clientErrorData.Link;
        }

        var traceId = Activity.Current?.Id ?? httpContext?.TraceIdentifier;
        if (traceId != null)
        {
            problemDetails.Extensions["traceId"] = traceId;
        }

        _configure?.Invoke(new() { HttpContext = httpContext!, ProblemDetails = problemDetails });
    }
}

As we can see, a ProblemDetails instance is created in CreateProblemDetails. In CreateValidationProblemDetails, a ValidationProblemDetails instance is created and the main difference is that there is a ModelStateDictionary which is converted to a Dictionary<string, string[]> for the validation problems.
Our ToActionResult is currently implemented in the following way:
public static IActionResult ToActionResult(this List<Error> errors, HttpContext? httpContext = null)
{
    foreach (var mapping in ErrorOrOptions.Instance.ErrorListToActionResultMapper)
    {
        if (mapping(errors) is IActionResult actionResult)
        {
            return actionResult;
        }
    }

    ProblemDetails problemDetails = errors.ToProblemDetails();

    if (httpContext?.RequestServices.GetService<ProblemDetailsFactory>() is ProblemDetailsFactory factory)
    {
        problemDetails = factory.CreateProblemDetails(
            httpContext,
            problemDetails.Status,
            problemDetails.Title,
            problemDetails.Type,
            problemDetails.Detail,
            problemDetails.Instance);
    }

    return new ObjectResult(problemDetails)
    {
        StatusCode = problemDetails.Status,
    };
}

If errors.ToProblemDetails() returns an HttpValidationProblemDetails instance, and we have access to a ProblemDetailsFactory via HttpContext, the instance will be replaced with a ProblemDetails instance, causing loss of errors previously appended to HttpValidationProblemDetails. This is a clear bug.
The more important thing is: if we want to incorporate ProblemDetailsFactory correctly, we need to call it when we instantiate the problem details instances. **For validation errors, this would imply that our List<Error> would need to be projected to a ModelStateDictionary because ProblemDetailsFactory.CreateValidationProblemDetails is tightly coupled to the latter. My performance heart is bleeding: we go from List<Error> to ModelStateDictionary to Dictionary<string, string[] which is a lot unnecessary conversion. ModelStateDictionary is not as optimized as Dictionary<TKey, TValue> as it is tree of single-linked nodes.
I strongly suggest that our default implementation does not go this route. In MVC, I would only do this if we have access to such a factory via a provided HttpContext. In Minimal APIs, I would not use ProblemDetailsFactory at all, especially because Results and TypedResults do not use them under the covers either. If our clients want to, they can opt-in via their own customization. I have worked on many ASP.NET Core MVC-based backends and almonst none of them actually customized ProblemDetailsFactory.  Of course, we should make it easy for clients to opt-in but also warn them about potential performance issues.
I'm currently working on a PR - I hope I can finish it today.

Hey guys,
I created an alternate implementation of this feature, you can see it here: https://github.com/amantinband/error-or/pull/110
I'm interested in your feedback - I will try to enhance this PR in the upcoming days with more tests.

After further inspecting the source code and the ProblemDetailsFactory functionality, I think I found an issue with the current implementation. Here's the ProblemDetailsFactory definition:

just to be clear - the PR was more of a POC to get some feedback, it's still missing many features and safe checks.
Thanks for creating the PR, will take a look now! 🫶

@amantinband I am really looking forward to using this library and the ASPNet extensions, will they be available soon?


Entering a URL as LoL or WoW user name (with any realm/region) will be accepted as valid account

Entering any URL ("https://" + any string) with any realm/region for either LoL or WoW will be accepted as a valid user name. See screenshot for example (URL about SQL inject is just an example. It is not an SQL inject).

@skiano @jwalsh @jotajunior : I'm not sure if this issue is related to integration, frontend or backend. Where should this be caught?

I don't think this is an integration issue but if it can't be reproduced locally by @jotajunior I'll take a deeper look.

I think this needs to be caught by the scrapers. If we prevented it on the front-end we would still need to prevent it on the backend (for manual requests)

what are your thoughts, @jotajunior ?

Fixed


Wrong Loss function in MNIST-ACGAN example

The original paper of AC-Gan claims that it optimizes the Generator by maximizing the L_c - L_s, different from the function, which is L_c + L_s, to optimize the Discriminator by maximizing that function.
However, in the source code of AC-Gan in Keras repository, the author optimizes both Generator and Discriminator by maximizing L_c + L_s.
Is that a mistake or are they doing this on purpose?

In the paper L_s is the same for the Discriminator and Generator L_s = ln(1-p), while in the example L_s for the generator is different: L_s = -ln(p), which works better.


cdnjs hosting

Hi,
As you already know we would like to host your lib on cdnjs.
There are some questions that we would like to get answers from you
Could you help us with them?
Thanks

Due to the way the Workbox service worker libraries are loaded, with workbox-sw being referenced via importScripts(), which in turn will (by default) load in all the other dependencies via the Google Storage CDN URL, I don't think this is going to work out as intended just by ingesting Workbox's packages.
You'd need to instruct all users to follow this method of loading the dependencies via an alternate URL, or alternatively, hardcode a different default URL in a custom workbox-sw bundle.


Improve error handling

In addition to addressing #340 (and superseding #341) to address the merge conflict:
This PR:

Improves attnCert property validation and eliminates extra dictionary lookups
Moves more error messages to Fido2ErrorMessages
Eliminates unneeded LINQ casts [.NET added strongly typed enumerators]
[BREAKING] Makes AttestationVerifier{attStmt,authenticatorData,clientDataHash} private protected.  If needed by consumers, we should expose over public properties.

@abergs @aseigler Ready for review / feedback.
Please note the field visibility changes made in AttestationVerifier and thoughts on whether we should expose new public properties.

Codecov Report

Merging #344 (5752c1d) into master (9823ec0) will increase coverage by 0.07%.
The diff coverage is 94.31%.

@@            Coverage Diff             @@
##           master     #344      +/-   ##
==========================================
+ Coverage   77.87%   77.95%   +0.07%
==========================================
  Files          88       88
  Lines        2495     2513      +18
  Branches      415      421       +6
==========================================
+ Hits         1943     1959      +16
  Misses        439      439
- Partials      113      115       +2

Impacted Files
Coverage Δ

Src/Fido2/CryptoUtils.cs
88.17% <ø> (-0.13%)
:arrow_down:

Src/Fido2/AttestationFormat/AndroidKey.cs
95.23% <77.77%> (-0.06%)
:arrow_down:

Src/Fido2/AttestationFormat/AttestationVerifier.cs
85.41% <88.46%> (ø)

Src/Fido2/AttestationFormat/AndroidSafetyNet.cs
98.79% <100.00%> (-0.02%)
:arrow_down:

Src/Fido2/AttestationFormat/Apple.cs
93.54% <100.00%> (ø)

Src/Fido2/AttestationFormat/AppleAppAttest.cs
70.83% <100.00%> (ø)

Src/Fido2/AttestationFormat/FidoU2f.cs
91.42% <100.00%> (ø)

Src/Fido2/AttestationFormat/None.cs
100.00% <100.00%> (ø)

Src/Fido2/AttestationFormat/Packed.cs
100.00% <100.00%> (+1.85%)
:arrow_up:

Src/Fido2/AttestationFormat/Tpm.cs
99.64% <100.00%> (-0.01%)
:arrow_down:

... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aseigler I went ahead and moved the logic for creating AttestationVerifier instances up. Much nicer.

@aseigler I went ahead and moved the logic for creating AttestationVerifier instances up. Much nicer.

So glad you like it.  I have been staring at that area for the past....I want to say, 4 years, and keep thinking "there's got to be a better way!" but didn't really see it until the DPK work.  I will try my best to get this merged early this weekend.


Allow to define destination for each get

.dest() method define the location of all the downloads, and if you call it several times the last one wins. In that case, it would be better to download to that location only the ones defined after calling to .dest(), being by default the current dir. It's said, that internally each download store the location where it must be downloaded.

Having back that dest parameter would be great :-)

Any update on this?

Fixed by https://github.com/kevva/download/commit/1d11b913b3b845cfa2e2cb853a16454bd0165a04.

Great, thanks! :-D


Cannot change word tokenizer by set_config

Changing default value on default.ini and tokenizer_context works for changing tokenizer configuration. But there still seems to be an issue with set_config. @askarbozcan ran into same issue as well.
In [1]: from sadedegel.config import set_config

In [2]: from sadedegel import Doc

In [3]: set_config("word_tokenizer", "simple")

In [4]: d = Doc("çekoslovakyalılaştıramadıklarmızdan mısnız?")
2021-01-05 15:25:40.621 | INFO     | sadedegel.ml.sbd:predict:22 - Loading sbd model from /Users/dorukhanafacan/sadedegel/sadedegel/ml/model/sbd.pickle

In [5]: d.tokens
Out[5]:
['çek',
 '##os',
 '##lovak',
 '##yalı',
 '##laştır',
 '##amadı',
 '##k',
 '##larm',
 '##ızdan',
 'mıs',
 '##nı',
 '##z',
 '?']

Replicated the case in both.

Replicated the case in both.

Please provide proper details for us to resolve your cases. I believe this is a machine generated spam issue.
Closing ...

Please provide proper details for us to resolve your cases. I believe this is a machine generated spam issue.
Closing ...

Please do provide commit ID on develop branch
Specific version you have the issue

Please do provide commit ID on develop branch
Specific version you have the issue

Issue occurs in release 0.16.2 and develop branch c8b2262.

Issue occurs in release 0.16.2 and develop branch c8b2262.

We have reproduced the case and seems that some depreciated features haven't marked properly as so. Hotfix <IP_ADDRESS> will resolve the issue hopefully.

We have reproduced the case and seems that some depreciated features haven't marked properly as so. Hotfix <IP_ADDRESS> will resolve the issue hopefully.

Please try using
from sadedegel.config import config_context

with config_context(tokenizer="simple") as Doc:
  d = Doc("çekoslovakyalılaştıramadıklarmızdan mısnız?")

Please try using
from sadedegel.config import config_context

with config_context(tokenizer="simple") as Doc:
  d = Doc("çekoslovakyalılaştıramadıklarmızdan mısnız?")

Can u confirm that we have resolved this issue?

Can u confirm that we have resolved this issue?

Updated to <IP_ADDRESS> and also used develop at e0bda4c. I can confirm it is resolved. Thanks.

Updated to <IP_ADDRESS> and also used develop at e0bda4c. I can confirm it is resolved. Thanks.

e0bda4cf9198330ea2d7f36b5ecd3bc550f78fd5 resolves issue

e0bda4cf9198330ea2d7f36b5ecd3bc550f78fd5 resolves issue


Run Serverpod generate tests on both Unix and Windows.

Is your feature request related to a problem? Please describe.
Currently, our automated test environment only supports the Ubuntu operating system. This limits our ability to catch issues on the windows platform in our test environment.
Describe the solution you'd like
Replace the GitHub action serverpod_generate with something that runs Serverpod generate tests on both Unix and Windows.

This is now implemented in the boostrap tests.


Improve css-tools

use const
use arrow functions
use for...of
stop using bitwise operators
group exports

The non-whitespace diff is better: https://github.com/svg/svgo/pull/1600/files?diff=unified&w=1

All css-tools usages was removed in https://github.com/svg/svgo/pull/1601. No need to touch it as well.


Fixes playlist accumulating duplicate entries after refresh

Simple fix that clears the playlist menu prior to adding buttons to it after a refresh.

Thanks for the fix!


fix: fails to publish due to empty migrations

The Durable Objects migrations will no longer show in the auto generated config file.

Oops the Date needs to be mocked.


4337: Adding confirmations for SafeOperations for not deployed Safes is not working

It was a problem during testing, all looks good now

This was an error on the SDK side. Thanks @Uxio0 for the support !!


Feature/stopwords

adds the following parameters to FULLTEXT LUCENE METADATA:

stopwords: an array of words that are excluded from the Index (stopwords)
mergeDefaultStopwords: a (boolean) switch to define whether the analyzer's default stopwords (e.g. "and", "for", "if"...) should be merged with the user defined stopwords array
stemExclude: an array of words that should be skipped by the stemmer

Example:
CREATE INDEX Data.text ON Data (text) FULLTEXT ENGINE LUCENE METADATA {
  analyzer":"org.apache.lucene.analysis.en.EnglishAnalyzer",
  "stopwords": ["every", "because", "until"],
  "mergeDefaultStopwords": true,
  "stemExclude": ["alpha"]
}

Hi @micha-nerdlichter thanks for this PR. Before to evaluate it, could you please sign the CLAHUB Apache license? Then, could you please send PR to "develop" branch? We use "master" only for releasing.


$grid->disableCreation() still allows create through URL

Laravel Version: 5.5
PHP Version: 7.0
Laravel-admin: Last

Description:
I want to disable creation on specific model. I just tried with $grid->disableCreation() and it removes create button from crud. But if I go through example.com/admin/model/create I can access to creation form of that model, so creation is not disabled.
Thanks.

@NickCoolii I also have such use case. Could you tell me where to add this code?

@ebsinori maybe this can help you:
http://take.ms/puKDM

@NickCoolii Thanks!


metric(read_num_fs_layers): add more buckets

currently we are seeing (dashboard) way too many 100+ counts, at least some of them caused by find_lsn_for_timestamp. add more buckets to understand the problem better.

I had done the same thing here https://github.com/neondatabase/neon/pull/7464

Oki good, I'll close this.


Using orchard from the Orchard CMS bundle no longer works

Create a new Web Application
Add Nuget feed to Orchard feed
Install CMS Bundle
add code points, and hit F5
Error

Dupe of https://github.com/OrchardCMS/Orchard2/issues/857


Request::secure() not returning true though sever is set to https

As because not having control to set up ssl certificate, client has used https://www.cloudflare.com/ssl for ssl cerificate. My local xamp installation working fine with Request::secure(). while debugging I found locally i have set $_SERVER['HTTPS'] = on while there is no such key set on server though its https instead $_SERVER['HTTP_X_FORWARDED_PROTO'] = https. I have gone in to Illuminate\Http\Request library and landed in Symfony\Component\HttpFoundation\Request where I came to know isSecure() method by default using $_SERVER['HTTP_X_FORWARDED_PROTO'] = https. The whole game is setting up setTrustedProxies() and setTrustedHeaderName() . I have tried
Request::setTrustedHeaderName('client_proto', 'X_FORWARDED_PROTO'); though its returning false. Can you bit explore here what can be done to get Request::secure() return true if  $_SERVER['HTTP_X_FORWARDED_PROTO'] = https is set. I found some solutions over here
https://github.com/dmikusa-pivotal/cf-php-apache-buildpack/issues/6 but want to know if other way available with laravel. Thanks!

You need to use setTrustedProxies. isSecure() condition first check that only. otherwise it wont work. for example
$could_flare_ips = array(
       '<IP_ADDRESS>/21',
       '<IP_ADDRESS>/20'
);
Request::setTrustedProxies($could_flare_ips);

For laravel you can add this code in App::before() filter

Example of doing this: https://github.com/StyleCI/StyleCI/commit/b8df8773089b4436aeb1ebc3a8bb16e4f1d9d99b.


Added extra parameter of type LocalDateTime to showcase its encoding-decoding

Added extra parameter of type LocalDateTime to showcase its encoding-decoding

Nice, thanks! Maybe it would make sense to use the java.time instances already defined in circe-java8, though?
If we're making this example Java 8-specific (which I'm on board with), we should also add a note making that clear, since circe in general still supports Java 7.

Current coverage is 80.10%

Merging #268 into master will increase coverage by +0.21% as of 33fbf29

Powered by Codecov. Updated on successful CI builds.

Thanks again, @rahulsinghai! This is included in #276.


Show debugger config matching default local port 5858

Signed-off-by: Scott Kurz<EMAIL_ADDRESS>What type of PR is this?
/kind documentation
What does does this PR do / why we need it:
Since the local port default of 5858 is hard-coded into odo it seemed fitting to include it in the same VS Code debugger config for emphasis.
Also the 'debugrun' id doesn't really match anything or have meaning.
Sorry, I missed the "[skip ci]" in the commit message the first time so force pushed over to add it.
Which issue(s) this PR fixes:  Seemed too small to open an issue.
Fixes #?
PR acceptance criteria:

[ ] Unit test

[ ] Integration test

[X] Documentation

[X ] I have read the test guidelines

How to test changes / Special notes to the reviewer:

/retest


Make TypeRefInner pub

Previously I made a PR where I made another type in this file pub. The reason was I have some code that builds GraphQL values dynamically rather than building a schema and querying it. I need this to be public for the same reason.
This is an example of the code that needs the type to be public: https://gist.github.com/banool/e4cf4397fa24dca6a9214a33ef991295.

This PR might provide more context on why I need this: https://github.com/aptos-labs/aptos-core/pull/9405.
Thanks!!

In version 6.0.1 I removed TypeRefInner.

Great, I just confirmed that 6.0.1 works for my purposes, thanks!


Cannot checkout project because of drum kit folder

Hi , i am trying to follow the instructions but I get this issue on Windows.
$ git restore --source=HEAD :/
error: invalid path 'Drum kit /background.jpg'
error: invalid path 'Drum kit /demo/demo.gif'
error: invalid path 'Drum kit /index.html'
error: invalid path 'Drum kit /script.js'
error: invalid path 'Drum kit /sounds/boom.wav'
error: invalid path 'Drum kit /sounds/clap.wav'
error: invalid path 'Drum kit /sounds/hihat.wav'
error: invalid path 'Drum kit /sounds/kick.wav'
error: invalid path 'Drum kit /sounds/openhat.wav'
error: invalid path 'Drum kit /sounds/ride.wav'
error: invalid path 'Drum kit /sounds/snare.wav'
error: invalid path 'Drum kit /sounds/tink.wav'
error: invalid path 'Drum kit /sounds/tom.wav'
error: invalid path 'Drum kit /style.css'

Hi , i am trying to follow the instructions but I get this issue on Windows.
$ git restore --source=HEAD :/
error: invalid path 'Drum kit /background.jpg'
error: invalid path 'Drum kit /demo/demo.gif'
error: invalid path 'Drum kit /index.html'
error: invalid path 'Drum kit /script.js'
error: invalid path 'Drum kit /sounds/boom.wav'
error: invalid path 'Drum kit /sounds/clap.wav'
error: invalid path 'Drum kit /sounds/hihat.wav'
error: invalid path 'Drum kit /sounds/kick.wav'
error: invalid path 'Drum kit /sounds/openhat.wav'
error: invalid path 'Drum kit /sounds/ride.wav'
error: invalid path 'Drum kit /sounds/snare.wav'
error: invalid path 'Drum kit /sounds/tink.wav'
error: invalid path 'Drum kit /sounds/tom.wav'
error: invalid path 'Drum kit /style.css'

I don't see the point of running the git restore command here, why are you restoring?

hey! it is a Windows limitation when there's a space in the file name it doesn't allow for the file to be checked out. the git restore was not going to do anything for me, i realised afterwards😅so figured i could inform you, so you could remove the space after Drum kit for us that use Windows. Im a beginner so idk if i explained it correcctly. This issue on Stack overflow is what I experienced too with the drum kit file!

ohhh you are right, just removed the trailing space from 'Drum kit' you can clone it now, Thanks for reporting the issue 🤗