text:
If a download is cancelled and is re-tried upon exactly after 2 minutes, the download fails!

Describe the bug
If a download is cancelled and is re-tried upon exactly after 2 minutes, the download fails!

What operating system and which version - MacOS Monterrey Version 12.5 (21G72)
Which version of Rocket.Chat (Server) - 5.0.2
Which version of Rocket.Chat.Electron (Electron/Desktop) - 3.8.8

To Reproduce
Steps to reproduce the behavior:

Start downloading a file
Go to the Download View using the sidebar
Cancel the download
Retry the download after 2 minutes(120seconds)
We can see that the download fails!

The bug
On starting a new download, when we cancel the download and retry it after 2 mins, the S3 download URL seems to be expired and instead a *.xml file is downloaded
Expected behaviour
On starting a new download, when we cancel the download and retry it after 2 mins, a notification stating that "the download has expired, try downloading again from the source" could appear!
Demonstration of the error
https://user-images.githubusercontent.com/72302948/186968809-d3444a94-fca6-4bcc-a50a-ec05cad74a15.mp4

@henit-chobisa  This is an Electron issue? I think that this is a server thing and its because of security of the assets.

@henit-chobisa  This is an Electron issue? I think that this is a server thing and its because of security of the assets.

Hey there @jeanfbrito! We do understand that the expiry time in the S3 download url is set in the server for security purposes.
But on the electron side of things, we've realised that on clicking on the retry button, the initial download url is just reused hence it would be needful to handle the download url expired case (which right now shows an invalid xml file download) on the Electron App and notify the user about it!
It would be awesome if you could go through the issue and the PR we've made in order to get a better context of our thought process 😄

Already replied to the PR. Take a look there.
Em sex., 26 de ago. de 2022 às 16:35, Henit Chobisa <
@.***> escreveu:

@henit-chobisa https://github.com/henit-chobisa This is an Electron
issue? I think that this is a server thing and its because of security of
the assets.
Hey there @jeanfbrito https://github.com/jeanfbrito! We do understand
that the expiry time in the S3 download url is set in the server for
security purposes.
But on the electron side of things, we've realised that on clicking on the
retry button, the initial download url is just reused hence it would be
needful to handle the download url expired case (which right now shows an
invalid xml file download) on the Electron App and notify the user about it!
It would be awesome if you could go through the issue and the PR we've
made in order to get a better context of our thought process 😄
—
Reply to this email directly, view it on GitHub
https://github.com/RocketChat/Rocket.Chat.Electron/issues/2487#issuecomment-1228846652,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI7PCTCYBTQFWS6ZKCBH3TV3EMANANCNFSM57XT5XMA
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Atenciosamente,
Jean Brito.

authors: henit-chobisa jeanfbrito


text:
Update docker to the new adpater v2

Following the rocketchat/hubot-rocketchat-boilerplate, I've update the Dockerfile to use only the necessary packages. Also, the .travis.yml is now running the eslint, that is why the build is failing, and it pushes the docker image to docker hub on success. In order to make this work you need to configure at travis two env variables DOCKER_PASSWORD and DOCKER_USERNAME.
I've used the standard .eslintrc.js file, probably we should update it based on the community feedback.
Two things that I'm sending but I'm not sure:

I've deleted the pakage-lock.json, because otherwise the docker build was getting stuck on the npm install step. Since we have the docker version, I don't know if we have to maintain the lock in the repository.
I've removed the coffescript dependency, assuming that we don't need it anymore

Awesome @MatheusFaria! Thks for this.
I'll take a look this weekend and try to merge it.
About the package-lock, we need it to keep track of all dependencies, and have github helping us checking if anyone of those has any security problem. It doesn't need to be copied to the Docker image, but it have to be in the repository root.

Got it, I'll update the PR later with the lock.

source: gharchive/pull-request

authors: MatheusFaria diegodorgam

repo: RocketChat/hubot-natural

license: MIT

license_type: permissive

license_source: github-api


text:
PictureUploadWidget is constant

Can we make PictureUploadWidget.settings not be a constant ?
This way an app can dynamically set upload directories. For example, different users may have different non-constant profile paths.

Most of the parameters are non-constant in firebase_picture_uploader version 1.2.0, now. Thanks for the hint.

Awesome!!!
Many thanks.

source: gharchive/issue


text:
灯 | RogerDTZ

https://rogerdtz.github.io/2019/03/15/灯/
Description有$n$盏灯排成一排，每一盏灯有一个$[1,m]$的颜色 初始时，所有灯都是灭的。接下来有$q$次操作，每次操作会改变某一种灯的颜色。你需要在每次操作之后，回答有多少个极长的开着的灯的连续段 $n,m \le 10^5$

authors: RogerDTZ jefflyy


text:
Alteração de método que lida com imagens

Descrição
Alterações de funcionalidades de acordo com issues relacionadas.
Issue relacionado
#131
#131
Motivação e Contexto
Implementa e faz deploy de correções importantes para o funcionamento do APP.
Como foi testado?
Coverage.Py
Imagens:
Tipo de modificações
<! --- Que tipo de modificações ->

[X] _ correção de bug_
[ ] Nova feature

Lista de controle:

[X] Meu código segue a folha de estilos implementada
[X] Meu commits segue a política de commits do repo.
[X] Minhas modificações requerem modificações na documentação atual.
[] Atualizei a Documentação
[X] Adicionei testes para cobrir minhas modificações.
[X] Todos os testes foram aprovados.

Pull Request Test Coverage Report for Build 46

0 of 0   changed or added relevant lines in 0 files are covered.
7 unchanged lines in 2 files lost coverage.
Overall coverage increased (+0.02%) to 89.764%

Files with Coverage Reduction
New Missed Lines
%

votes/managers.py
2
63.1%

events/tests.py
5
89.06%

Totals

Change from base Build 43:
0.02%

Covered Lines:
456

Relevant Lines:
508

💛  - Coveralls

authors: Lcunha coveralls


text:
[HeroSystem6eHeroic] Fix for background color issue.

Added a div class to contain the 'tally bar' so it could be enclosed with an additional border.

Submission Checklist
Required

[X] The pull request title clearly contains the name of the sheet I am editing.
[X] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[X] The pull request makes changes to files in only one sub-folder.
[X] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

New Sheet Details

The name of this game is: <   >  (i.e. Dungeons & Dragons 5th Edition, The Dresden Files RPG)

The publisher of this game is: <   > (i.e. Wizards of the Coast, Evil Hat)

The name of this game system/family is: <   > (i.e. Dungeons & Dragons, FATE)

[ ] I have followed the Character Sheets Standards when building this sheet.

[ ] This sheet has been made on behalf of, or by, the game's publisher.
[ ] This game is not a traditionally published game, but a copy of the game rules can be purchased/downloaded/found at: <   >
[ ] This sheet is for an unofficial fan game, modification to an existing game, or a homebrew system.

Changes / Description

Character Sheet Info Roll20 Internal Use only.


text:
unpublished

Submission Checklist
Required

[ ] The pull request title clearly contains the name of the sheet I am editing.
[ ] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[ ] The pull request makes changes to files in only one sub-folder.
[ ] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

New Sheet Details

The name of this game is: <   >  (i.e. Dungeons & Dragons 5th Edition, The Dresden Files RPG)

The publisher of this game is: <   > (i.e. Wizards of the Coast, Evil Hat)

The name of this game system/family is: <   > (i.e. Dungeons & Dragons, FATE)

[ ] I have followed the Character Sheets Standards when building this sheet.

[ ] This sheet has been made on behalf of, or by, the game's publisher.
[ ] This game is not a traditionally published game, but a copy of the game rules can be purchased/downloaded/found at: <   >
[ ] This sheet is for an unofficial fan game, modification to an existing game, or a homebrew system.

Changes / Description

I am deleting the file to publish it individually because after 13 days it still does not appear in the roll20 character sheets.

Thanks
El mar, 31 may 2022 a las 19:48, Nic Bradley @.***>)
escribió:

[image: image]
https://user-images.githubusercontent.com/7937613/171252095-74cce710-5b00-45ad-a1a5-1e1de648d0fc.png
Resolved. Just send a help request next time.
—
Reply to this email directly, view it on GitHub
https://github.com/Roll20/roll20-character-sheets/pull/10635#issuecomment-1142433464,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJWFYRFS5GLV6VSXO5YLSMTVMZGIFANCNFSM5XLYK7YQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


text:
[ADnD_2E_Revised] Bugfix / Calculated empty fields

Submission Checklist
Required

[X] The pull request title clearly contains the name of the sheet I am editing.
[X] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[X] The pull request makes changes to files in only one sub-folder.
[X] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

Changes / Description
I was calculating an undefined value. This has been fixed

Character Sheet Info Roll20 Internal Use only.

Hey @nmbradley . Sorry for spamming, but I was hoping you would merge this bugfix? I made quite the blunder and would like to get it fixed before my game tonight.


text:
RolemasterUnified Official: Add bleed tracking; other updates.

Bonus midweek update

Split injury handling out
Handle breakage penalties in criticals correctly
Improve layout of rolltemplates; only show Apply when it's useful
Condition tracking:

Track current phase
Handle bleeds

AP Tracking for attacks: Melee & Spells
Add special page to apply injuries

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

New Sheet Details

The name of this game is: <   >  (i.e. Dungeons & Dragons 5th Edition, The Dresden Files RPG)

The publisher of this game is: <   > (i.e. Wizards of the Coast, Evil Hat)

The name of this game system/family is: <   > (i.e. Dungeons & Dragons, FATE)

[ ] I have followed the Character Sheets Standards when building this sheet.

[x] I have authorization from the game's publisher to make this an official sheet on Roll20 with their name attached.
[ ] This game is not a traditionally published game, but a copy of the game rules can be purchased/downloaded/found at: <   >
[ ] This sheet is for an unofficial fan game, modification to an existing game, or a homebrew system.

Changes / Description

Character Sheet Info Roll20 Internal Use only.


text:
Shadowrun sixth world v.46

Worked around roll20 issue with more than 10 rolls causing computed results to not be displayed for spells.
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[ Y ] Does the pull request title have the sheet name(s)? Include each sheet name.
[ Y ] Is this a bug fix?
[ N ] Does this add functional enhancements (new features or extending existing features) ?
[ N ] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ NA ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[ NA ] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Character Sheet Info Roll20 Internal Use only.

did you intentionally delete the Readme?

Yes it was causing the newline issues and is no longer needed so I wanted it gone.  The repo wouldn't let me delete it so I just wiped it's contents.

@jaculpiii appears that there is a conflict between this branch and the one you submitted prior to this.
Let me know when you've resolved them and I'll merge it in.

@jaculpiii appears that there is a conflict between this branch and the one you submitted prior to this.
Let me know when you've resolved them and I'll merge it in.

Fixed the conflict I believe.

Awesome, thanks! Merged.

authors: Anduh jaculpiii nmbradley roll20deploy


text:
Issue running as system

When running the install as system context with intune the logs show "winget not found"
if ran as user context the app attempts to install and requests admin permissions.
powershell.exe -Executionpolicy Bypass -File winget-install.ps1 -AppIDs "Google.Chrome --override "/qn""

The version is 1.3.1741
As for the quotes the script doesn’t appear to even make it to that step since it fails to find winget, the same commands also work when not run with Intune.
Terry Meyers
Systems Administrator
RBC Medical Innovation’s

On Jul 7, 2022, at 4:37 PM, Romain @.***> wrote:

Hi,
What is the winget version installed ?
Not sure your quotes are good as well.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.

When adding the win32 app should the script be run in user or system context ? When i run in user context the user is being prompted with admin credentials but works fine if credential's are given, when run as system it fails to locate winget

I appended your script to start-transcript to see what was going on and it appears that intune runs in 32 bit system context and fails to find the path as shown below, any advice ?
`PSVersion: 5.1.19041.1682
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.1682
BuildVersion: 10.0.19041.1682
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1

        888       888 d8b  .d8888b.           d8b
        888   o   888 Y8P d88P  Y88b          Y8P
        888  d8b  888     888    888
        888 d888b 888 888 888        888  888 888
        888d88888b888 888 888  88888 888  888 888
        88888P Y88888 888 888    888 888  888 888
        8888P   Y8888 888 Y88b  d88P Y88b 888 888
        888P     Y888 888  "Y8888P88  "Y88888 888
       https://github.com/Romanitho/Winget-Install
     https://github.com/Romanitho/Winget-Install-GUI
_________________________________________________________

18:29:24 - ###   7/7/2022 - NEW INSTALL REQUEST   ###
Resolve-Path : Cannot find path 'C:\Program Files (x86)\WindowsApps' because it does not exist.
At C:\Windows\IMECache\0a664599-7448-47db-a890-cd1dfe5c9240_4\winget-install.ps1:104 char:26

... ingetPath = Resolve-Path "$env:ProgramFiles\WindowsApps\Microsoft.Des ...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : ObjectNotFound: (C:\Program Files (x86)\WindowsApps:String) [Resolve-Path],
ItemNotFoundException
FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand
Resolve-Path : Cannot find path 'C:\Program Files (x86)\WindowsApps' because it does not exist.
At C:\Windows\IMECache\0a664599-7448-47db-a890-cd1dfe5c9240_4\winget-install.ps1:104 char:26

... ingetPath = Resolve-Path "$env:ProgramFiles\WindowsApps\Microsoft.Des ...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : ObjectNotFound: (C:\Program Files (x86)\WindowsApps:String) [Resolve-Path], ItemNotFound
Exception
FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand
18:29:25 - Winget not installed !
PS>TerminatingError(): "System error."

$global:?
True`

I modified this line from $env: and added a space to program files and this appears to have resolved the resolver issue.
$ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe"

Hi. It light be something similar to WAU when running win32 package. It calls 32 bits process and we want it to be 64. Here is the WAU explanation https://github.com/Romanitho/Winget-AutoUpdate/discussions/88#discussioncomment-2849475

Can you try to run it like this:
"%systemroot%\sysnative\WindowsPowerShell\v1.0\powershell.exe" -noprofile -executionpolicy bypass -file winget-install.ps1 -AppIDs Google.Chrome

Yessir that did it, sorry i didnt realize this i appreciate you !

authors: Romanitho temeyers

repo: Romanitho/Winget-Install


text:
Was fundamental data recently changed?

My code started breaking today. Is Float and Institutional Ownership no longer supported with AlphaVantage?

@mmoheeka, this seems to be a server-side (rather than library-specific) topic. Could you reach out to support@alphavantage.co? Thanks!

authors: AlphaVantageSupport mmoheeka

license: mit

license_source: bigquery


text:
Unable to open read/write files on Android 11 - targetSdkVersion 30

Hello guys,  I'm having problems using this library on Android 11, I can't read files in hidden folders. I'm trying acces '.../.Statuses' from Whatsapp path even with the necessary permissions and this dont work. Functions File access dont work. Any can solve this ?
ANDROID MANIFEST
<uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

"react-native": "0.66.3",
"react-native-blob-util": "^0.13.17",

I just hit this issue last week - add this to your android manifest file:
<queries>
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>
    <intent>
        <action android:name="android.intent.action.GET_CONTENT" />
        <data android:mimeType="image/*" />
    </intent>
    <intent>
        <action android:name="android.intent.action.PICK" />
        <data android:mimeType="image/*" />
    </intent>
    <intent>
        <action android:name="android.intent.action.CHOOSER" />
    </intent>
</queries>

Good luck!

I just hit this issue last week - @brunofariasd add this to your android manifest file:
<queries>
    <intent>
        <action android:name="android.media.action.IMAGE_CAPTURE" />
    </intent>
    <intent>
        <action android:name="android.intent.action.GET_CONTENT" />
        <data android:mimeType="image/*" />
    </intent>
    <intent>
        <action android:name="android.intent.action.PICK" />
        <data android:mimeType="image/*" />
    </intent>
    <intent>
        <action android:name="android.intent.action.CHOOSER" />
    </intent>
</queries>

Good luck!

Thx for reply, but this doesn't worked. I can't read files only in hidden folders, in another folders this working fine.
note: this problem is only on android 11

I have the same problem. Any solution guys?

Where is the file stored? Path?
And which version are you using?
If I remember correctly we had a fix for annissue there in 0.13.18

Where is the file stored? Path? And which version are you using? If I remember correctly we had a fix for annissue there in 0.13.18

Hello @RonRadtke , this issue only occurs in hidden folders. I'm already using the latest version of the package.
I'm trying access this PATH: '/storage/emulated/0/Android/media/com.whatsapp/Whatsapp/Media/.Statuses'
Thx for reply.

I think I found the solution:
https://stackoverflow.com/questions/70393591/cannot-access-hidden-folder-on-android-version-11-device-in-flutter
Maybe you can give it a try :)

I think I found the solution: https://stackoverflow.com/questions/70393591/cannot-access-hidden-folder-on-android-version-11-device-in-flutter
Maybe you can give it a try

I can use this permission, but i wouldn't be able to publish my app to play store. It is clearly stated in Google's policy unless you are a file manager app.
https://developer.android.com/training/data-storage/manage-all-files#all-files-access-google-play

I don't what your app is. But the whatsapp status folder is in the private (scoped) storage of whatsapp. It's not located in any media collection so you can't access it without that permission.
Android made the policy even strikter with API 30, so that you can't access any file in an others app private external storage. See: https://developer.android.com/about/versions/11/privacy/storage

authors: BrunoKarriqi RonRadtke benjaminharringtonrose brunofariasd

repo: RonRadtke/react-native-blob-util


text:
chore(main): release 1.1.2

:robot: I have created a release beep boop
1.1.2 (2023-06-27)
Bug Fixes

config selection improved logic (#54) (59f25dc)
git tests added - RK-19030 (#50) (7d011c7)
json yaml conflic umarshling template ref to DAG task - RK-19034 (#56) (68ab378)
makefile improvence - RK-19036 (#59) (017d653)
remove argo configuration requierments (#55) (3a8ed9c)
stop healthz logs spam (#57) (3f44edc)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/Rookout/piper/releases/tag/v1.1.2 :sunflower:

repo: Rookout/piper


text:
🛑 Helixcard WebPay is down

In 062d400, Helixcard WebPay (https://webpay.rosalindfranklin.edu/webdeposit/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Helixcard WebPay is back up in 45eb261 after 44 minutes.

repo: RosalindFranklinUniv/up


text:
dataset = np.load('../data/interim/earthquakes_jp.npz')

Hi, would it be possible to make the earthquake data folder available? Just want to try out the tutorial. Thanks

I think all you have to do is to share the google drive folder link. I would then make a hyperlink towards your folder. Thanks.

i have downloaded the data, but the format is different from the one you used for this set of code. Can you pls share the earthquake and covid data via google drive? thanks a lot.

The covid data still has issue.

can you share the google folder? just the covid data.

Can you please kindly share the data in either S3 or Google Drive?
Many thanks!

authors: BaiLiping madziejm

repo: Rose-STL-Lab/DeepSTPP


text:
Add Guang-Yi to Contributors List

👍

Felt wonderful knowing the process. I feel motivated to contribute to more projects in the future

I’d urge you to continue contributing to other open source projects.
We also have a slack team to help/mentor people trying to contribute to open source projects.
You can join the team by going to https://goo.gl/PM1Jdh

authors: Guang-yi Roshanjossey

repo: Roshanjossey/first-contributions


text:
Sample Experiences with Link Handling

Description
Add sample experience with deep link and universal link handling

+1 approved

Can’t find approve button on mobile lol

authors: orospakr samwoodall

repo: RoverPlatform/rover-android


text:
🛑 Website (rubenfixit.com) is down

In 91c3899, Website (rubenfixit.com) (https://rubenfixit.com) was down:

HTTP code: 403
Response time: 1971 ms

Resolved: Website (rubenfixit.com) is back up in dd51e1b.

repo: RubenFixit/upptime


text:
Sample Dataset for usage #2

Hi @Rudrabha ,
Amazing work.
I was working on generating video from image+audio and it would be very helpful if you could post a sample image and audio file. I've been getting different errors every time I'm using a random image.
Thanks!

Thank you very much for your interest.
Could you please some of the errors? If it is a mistake in the code, then we can fix it for everyone.

Hey, I did a setup of the same on local(mac) and it worked fine.
On remote (gpus) there was the following tensorflow error

The input size must be 96x96. Please ensure this.
If it doesn't get solved with this, please report the tensorflow and keras version you have.

The input size must be 96x96. Please ensure this.

Have updated the repo code as well to not receive img_size as a variable input parameter.

Oh okay, thanks for the help !

hey @prajwalkr , another thing.
For training the model could you please specify the dataset structure, would be helpfull for a lot of people, the way its mentioned here https://github.com/Hangz-nju-cuhk/Talking-Face-Generation-DAVS#preparing-training-data

Done.

Hi @Rudrabha finally completed the end to end setup and more importantly everything is working now.
Just a few nit bugs in preprocess.py. Pointing out so that future users don't have to spend extra time.
The split in line 116 & 118 should probably be args.split https://github.com/Rudrabha/LipGAN/blob/16ca935aa0689723fbf4bae9d85ce061b925c2cc/preprocess.py#L116-L118
Also, sr here, the sampling rate, is undefined again. Is there any specific value to be used ? (as of now I've set it to None, to preserve the native sampling rate of the file).
https://github.com/Rudrabha/LipGAN/blob/16ca935aa0689723fbf4bae9d85ce061b925c2cc/preprocess.py#L87
Will let you know if I come across any others. Thanks again for the work!

Please use sr=16000, I will correct these two in preprocess.py right away. Thank you very much.

authors: prajwalkr shikhar-scs

repo: Rudrabha/LipGAN


text:
sx

ccc

merge


text:
Thanks for your valueable works. And my questions is "Is this repo implement the OpenPCDet version SESSD?"

In your preprint paper, I see that you have compared your work with 'SESSD'.  And I also try to re-implement the 'SESSD' based on OpenPCDet. But there seem many problems in my re-implement versions, so I could not re-produce its result.  Therefore, I am very interested in the SESSD you repo have implemented, and I hope the code can be open-sourced as soon as possible

Hi @EmiyaNing,
Thanks for your comments. We are happy to release the codes as soon as possible after the reviewing process is done.
Regarding the great previous work 'SESSD', I suppose you may encounter complicated problems like bugs with OpenPCDet. I suggest you try to contact OpenPCDet or the authors of 'SESSD' for a solution.

authors: EmiyaNing RunpeiDong

repo: RunpeiDong/PointDistiller


text:
Add LGTM code quality badges

Hi there!
I thought you might be interested in adding these LGTM code quality badges to your project. They indicate how you care about code quality and encourage your future contributors to do the same.
To get an idea of the analyses reflected by these grades, check the alerts discovered by LGTM.
N.B.: I am on the team behind LGTM.com, I'd appreciate your feedback on this initiative, whether you're interested or not, if you find time to drop me a line. Thanks.

Codecov Report

Merging #557 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #557      +/-   ##
==========================================
- Coverage   57.08%   57.04%   -0.04%
==========================================
  Files          44       44
  Lines        2810     2810
==========================================
- Hits         1604     1603       -1
- Misses       1206     1207       +1

Impacted Files
Coverage Δ

headless_zip.js
73.33% <0%> (-2.23%)
:arrow_down:

Continue to review full report at Codecov.

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

authors: codecov-io xcorail

repo: RuntimeTools/appmetrics


text:
I need some help (not really an issue)

I love your mod, but I need some help with the Grafana dashboard setup. How do I separate two Minecraft servers into different dashboards?

Adding multiple servers is not supported now. I'll try to add this in the near future.

Well, it would be possible to run 2 separate instances of Prometheus (and maybe also Grafana), but it's kind of a hassle, and I'm sure it can be done in Grafana, I just don't know how, because I never worked with it. I'll continue using it, It'll just take a bit more until I figure out which line is which in the graphs.

I've updated a Grafana dashboard so it now supports selecting servers. In order to use this, you should reimport dashboard.

How do I separate two Minecraft servers into different dashboards?

If you want to use different dashboards, you can just import FabricExporter's dashboard twice, but it's ID and name must be changed. In this case you should have multiple instances of Prometheus, as I think. With current version of dashboard you can just hardcode values for variables in dashboard settings. Anyway, I don't see any reasons to do this, because you can use variables in a single dashboard.

And few words on prometheus config. It should look like this for multiple servers:
- job_name: 'fabric'
  static_configs:
    - targets: ['127.0.0.1:25585']
    - targets: ['127.0.0.1:25586']
    - ...

Grafana with latest version of my dashboard doesn't require any additional configuration.

It works beautifully. Thank you.

repo: RuscalWorld/FabricExporter


text:
Fix pss sign/verify when key length is multiple of 8 + 1 bits.

In the unusual case of having a key of length k*8 + 1 bits, em_len will be 1 byte shorter than key_len. The call to raw_encryption_primitive requires a buffer key_len bytes long.
Vice versa, we would be generating a one-byte too-long salt in generate_salt.
Finally, emsa_pss_verify_pre would fail by shifting 1 byte left by 8 bits.

is there an actual use case for keys of that size, or should we just restrict the sizes?

I personally do not remember encountering any special use case of this type. I've generally seen multiples of 512. On the other hand, OpenSSL, for instance, seems to support all key lengths (within whichever range they allow).
In the end, it is a design decision. I personally would rather support this case, but it is just my opinion. Alternatively, one can restrict and see if anyone ever raises a request for this. Then, we learn in which context would one have such a need :)

@tarcieri any thoughts on this?

@tarcieri agreed, merging this, as this in all cases improves the status quo
thanks for catching and fixing @dfabregat

Always glad to contribute. And thank you guys for your feedback :smiley:

authors: dfabregat dignifiedquire

repo: RustCrypto/RSA


text:
list += operator generates Error

Feature

a = [3]
a += a
print(a)

The code above generates the following error:
(list += operator)
actual
Hyeockz:RustPython hyeockjinkim$ cargo run b.py
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `target/debug/rustpython b.py`
thread 'main' panicked at 'already mutably borrowed: BorrowError', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

expected
[3, 3]

If this is issue is valid, can I take this issue?

Sure thing!

repo: RustPython/RustPython


text:
Generate SyntaxError at integer starting with 0

Generate syntaxError at integer starting with 0,
not zero
Fixes #1422

Nicely implemented! I'm still a bit clueless why a leading zero is not allowed. Do you have any ideas?

I think it's ambiguous/not explicit to whether the person writing it intended it to be a decimal literal or octal literal, as some languages take a leading 0 to mean octal, so they decided to ban it altogether.

authors: HyeockJinKim coolreader18 windelbouwman


text:
Update exception tests from CPython v3.10.5

Update
Lib/test/test_exceptions.py
Lib/test/test_cmd_line_script.py
Lib/test/test_syntax.py

nope, it looks perfect to me. Thank you for contributing!


text:
TableView Reloading the entire cells

Why is reloadRowsAtIndexPaths not available ? I see tableview.reload in RxTableViewSectionedReloadDataSource. What if i want to change only specific index. Am i using the wrong data source ?

This is not an issue.
Please find some help inside http://rxswift-slack.herokuapp.com/.

authors: SanjithKanagavel kzaher

repo: RxSwiftCommunity/RxDataSources


text:
Unable to build xmlsec - dev team says to notify this package's dev team for solution

Hi python3-saml dev team - have been unable to pip install python3-saml due to (from my not-great understanding) an incompatibility with xmlsec/libxmlsec1.
When I raised the issue with xmlsec (https://github.com/lsh123/xmlsec/pull/427), they advised to report issue to this dev team.
Can you help?
I'm on an M1 with python 3.11.2 and attempting pip install of python3-saml which is failing to build a wheel for xmlsec.

Also refer to https://github.com/xmlsec/python-xmlsec/issues/254#issuecomment-1511135314

@sourcematters, Sorry but it seems there is some confusion.
python3-saml uses the xmlsec library, and its repository on github is:
https://github.com/xmlsec/python-xmlsec
not:
https://github.com/lsh123/xmlsec
@garma83  provided you a link to the right thread and it seems some collaborators provided ways to install it properly.

python-xmlsec depends on libxmlsec1.  libxmlsec1 >= 1.3 no longer supports SOAP, the SOAP functionality has been removed.  Versions of libxmlsec1 that do support SOAP are no longer maintained.  I think the OP was raising the issue because as Linux distros begin to package the later libxmlsec1, python3-saml will not be installable.  The libxmlsec1 author stated that SOAP support was added "as part of an abandoned project to support SAML" (see https://github.com/lsh123/xmlsec/pull/427#issuecomment-1587567310).  The authors of python-xmlsec are approaching this by removing SOAP support in their package, but this is proving to be challenging (https://github.com/xmlsec/python-xmlsec/issues/252).  If python3-saml uses the deprecated SOAP functionality we will either have to pin environments to libxmlsec1<1.3 or find another way to parse the SOAP.
Maybe a comment in this project's README might help future users?

@sourcematters, Sorry but it seems there is some confusion.
python3-saml uses the xmlsec library, and its repository on github is: https://github.com/xmlsec/python-xmlsec not: https://github.com/lsh123/xmlsec
@garma83 provided you a link to the right thread and it seems some collaborators provided ways to install it properly.

@pitbulk While there are workarounds in that thread, they are by no means sustainable and they don't address the underlying incompatibility with libxmlsec1 1.3. A closer look reveals that https://github.com/xmlsec/python-xmlsec appears to be abandoned by the sole maintainer. The readme shows numerous builds failing, several threads have comments requesting that the issue get fixed with no acknowledgement from the maintainer, its not clear that there are any plans to continue maintaining that project. Does the python3-saml project have plans to mitigate this dependency in the future? Or perhaps to fork and maintain a new version? Thanks.

No plans for now to migrate from python-xmlsec, but the easiest approach I see is to reuse the xmlsec library that was used in python-saml, dm.xmlsec.binding, but not sure if Dieter Maurer is actively maintaining it, so we could be in a similar situation, I don't see recent releases, but a comment from him on a forum

authors: cro garma83 mdgreenwald pitbulk sourcematters


text:
Benchmark page improvements.

I'm curious; are you aware of Syntax? I ask because I'm curious how well it would do on your JSON benchmark :)

Library
Ops/sec
Relative Speed ?

Chevrotain
990.07 ±1.77%
100%

Parsimmon
564.24 ±0.92%
56.99%

ANTLR4
425.20 ±1.00%
42.95%

PEG.js
292.93 ±1.89%
29.59%

syntax-js
89.16   ±0.69%
9.01%

Jison
62.01   ±2.66%
6.26%

Nearley
37.43   ±1.81%
3.78%

you can see the code here:
https://github.com/SAP/chevrotain/tree/syntax_cli_perf/performance/jsonParsers/syntax
I can't easily introduce it to the benchmark because

It generates ES6 code so I need to setup a babel compilation to support it on all browsers.
It generates commonjs code so I need to setup browserify/webpack to support it without manual modification.

So the branch linked above is just a hack to be able to run it locally (did not push to gh-pages).

I can't easily introduce it to the benchmark

Ah, that's a shame.

On an unrelated note, I notice that the benchmarks  state the following:

All the parsers have no output(build no AST), they only parse the text (without errors).

Nearley does not actually have such a mode; if you have no postprocessors, then nearley will build its default AST (a tree made of Arrays). This adds significant overhead; by removing the AST-related code entirely I saw a 4x improvement! :)

That is a very good point.
It is hard to get the benchmark to be "apples to apples".

The nearley parser is the only one using an hand-built lexer, which provides a two order of magnitude speed boost, but that is unfair towards other frameworks which may be using less optimized generated lexers.

Once you introduce all the performance Improvements to Nearley I plan to remove the hand-built lexer to make it fairer, The only reason the hand-built lexer exists is because without it Nearley's performance was too low to quickly benchmark on large inputs and/or slow devices (mobile).

Chevrotain also builds some internal arrays even if they are not used, but in Chevrotain's case I doubt it has any large impact.
It is also possible that other parsing libraries also built some intermediate data structures.
Particularity those that support semantics which are completely separate from the grammar like Ohm
and Antlr4 (I'm currently implementing such a capability in Chevrotain too).

On the short-term I can fix that comment in the benchmark page to be more accurate.
On the longer term perhaps a better approach is to benchmark the whole flow of parsing + building a data structure.
The question is how much does the AST building itself take (not the logic which invokes the actions in the parser toolkit, but just the assembly of the AST). As long as the AST building itself does not take long the results would still be relevant..

https://github.com/SAP/chevrotain/commit/768d88b62db70338243601bc98d5941af828d97c

I plan to remove the hand-built lexer to make it fairer

It would be better to replace it with an off-the-shelf lexer. Not using a tokenizer biases the benchmarks to favour the other parsers (which are not scannerless).

The question is how much does the AST building itself take

Currently nearley's AST building adds a lot of overhead. This is partly because we do a lot of work to support ambiguous parses, that may not end up being used in the final parse. The rest I'm working on improving (see 7fc11d4).
I too suspect Ohm is doing extra work during the parse :)

It would be better to replace it with an off-the-shelf lexer. Not using a tokenizer biases the benchmarks to favour the other parsers (which are not scannerless).

I'm not sure this is accurate:
There are other parsers in this benchmark which are
either completely scanner-less and perform well (Peg.js), while there are those that
have a distinct scanner phase and perform weakly (Jison).
Not having a distinct Scanner phase can actually be more efficient because the grammar context
can be used to reduce the options which must be examined at each point. While a separate Lexer
that runs before the parser must check all possible options for each point in the input.
I actually did some experimental work on running Chevrotain in lexerless mode.
While it did not reach productive quality I did see a nice performance improvement
in a JSON benchmark (10%+).
I still think that to make the benchmark the most fair, a full End to End must be implemented
without any external hand built logic in any of the toolkits.
I also think that the output structure should be as simple as possible so the tests
will focus on the parser performance and less on the fixed cost of creating a complex data structure.

You have opened an issue on Nearley for a built-in tokenizer.
https://github.com/Hardmath123/nearley/issues/166
And you have also been doing a lot of work to optimize Nearley's performance recently. 👍
I suggest we attack the root problem of Nearley not having a fast built-in tokenizer.
This would increase performance by at least an order of magnitude if not more.
Suggestion
If you are interested and can build some POC which uses the Lexer parts of Chevrotain
In a productive flow with Nearley. preferably in a way that would be easy to use
by nearley end users.
Than I can do the work required for releasing "Chevrotain-Lex" a separate npm package.
This package will only include Lexer related parts.
This is quite a bit of dev-ops work.

Split up tests related code.
Split up related grunt tasks.
Create d.ts definitions for the separated lexer part.
Create a separate travis voter with a deploy hook on git tag event.
Ensure 100% code coverage for the lexer tests after split up.
Create browser packaging for the Lexer package.
Documentation.

So I won't be rushing to implement this unless there is an actual need/requirement first...

will follow up on this in #382

repo: SAP/chevrotain


text:
Translation Delivery

Translation Delivery

This pull request is for translation delivery. Please review and approve them.

repo: SAP/cloud-sdk-ios-cai


text:
Test archetypes

BLI: https://github.com/SAP/cloud-sdk-java-backlog/issues/283

It seems like your last commit (d2b4620) broke the pipeline.
This is because the jakarta archetype is no longer declared as a module in the archetype-parent, so it won't be installed locally during the build step.
I see that we are currently actually not releasing that archetype... But I'm not exactly sure why.
I'll reach out to the team via Slack.

authors: Johannes-Schneider daniel-kurzynski

repo: SAP/cloud-sdk-java


text:
Install nltk stopwords

To address issue #14 for users unaware of nltk stopwords.
Included (optional) image nltk_downloader.jpg to "hand-hold" first-time users,
but the image can be linked in tutorials/README.md only after it's merged in master branch

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@seansaito, @wangjin1024  any idea what the Travis CI is waiting for?

@seansaito, @wangjin1024 any idea what the Travis CI is waiting for?

found the solution - https://travis-ci.community/t/known-issue-travis-ci-reports-expected-waiting-for-status-to-be-reported-on-the-github-status-api-but-the-status-never-arrives/1154

@ngpgn the check is passed, added reviewer, thanks

authors: CLAassistant ngpgn postalC

repo: SAP/contextual-ai


text:
Prepend feature for render manager

Dear developers,
Here is the new feature I would like to suggest you to implement.
As we all know renderManager is a very base object that is rendering almost everything in UI5.
In fact what it does it finally calls jQuery.append() function ot .html(). Thus, when rendering a line ite into the list it always appending into the end.
Now we speak about an option to revert the order and to insert it not to the end end but to the beginning.
In this case jQuery.prepend() function is what we actually need. However currently it's not possible to do. We have to rerender the whole list again.
If we extend the chain .render() -> .flush() -> .()_fPutIntoDom() with new parameter bPrepend for example we can handle not just appending but prepending as well.
Best regards,
Petr.

As I see we can use vInsert = 0 parameter for the flush method. However it's not recommended to be called directly.
Render method just ignores it

Hi,
The render manager's flush function normally gets called automatically during a rerendering.
Globally using append will be very problematic. Do you want to use this in a single control?
Then changing the renderer to call the write method at the correct place is the way to go.
Or are you creating a new render manager yourself?
For prepending a list you could iterate over the items in a reverse order in the renderer.
Best regard,
Tobias

Hi Tobias,
I'm glad to have your reply.
Look - in fact there is a certain control I have to create: this is a chat dialog window.
In this chat dialog every new message should be appended to the end(bottom). We had a problem with rendering issue ( all list items( messages ) were rerender every single update ). That's why we decided to use own rendering over Rm.renderControl function.
However now we have a new requirement.
We need to implement treshhold in the opposite way. We always scroll from the bottom to the top to see previous messages.
Standard functionality supports only top to bottom scenario.
This problem can be easily solved just by adding a special parameter to the RenderControl function to say render manager that we need to insert it in the beginning.
This will not brake the current logoc as this parameter will stay by default  as append.

I wonder why SAP didn't do this yet.
As I see Fiori 2.0 concept provides chat option. All modern messengers including iOs have the same guideline with input field and the last message in the bottom.
When scrolling up the app loads history and renders the content in the top. The easiest way I see how to do this is to use prepend function. We'll just insert every previous message in the beggining extending the list.

Are you looking for something like this? https://openui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.ListGrowingUpwards/preview

Wow! I see it's already in 1.40. Thanks
However if the library does this every time rerendering the list entirely ( and when using Item Factory it does every time) just by appending items to the end in every treshhold change - that's not good also.
When having a long list of messages - let's say thousand.. They don't take much memory for keeping all of them. Every single scroll will fire a new rerendering process for the whole list.
That significantly decreases the overall performance.
I created previously an issue about this but it was rejected: https://github.com/SAP/openui5/issues/1097
Meanwhile - what we expect from prepend feature is more than list treshhold.
It can be used in different layouts giving us opportunity to add elements from the start and the end of the container without using reverse flex option.
What's more intersting - it's already in!
jQuery has prepend. Flush has the parameter.
What's needed is just to enhance render method with it.
We really wish to have this feature.
Thanks!
Petr.

@ThePlenkov can u refer me a jsbin that shows "factory" forces growing list to rerender from scratch.

@aborjinik Do you mean sap.m.GrowingList or just List?
We use an own control that is inherited from sap.m.List. sap.m.Growing list is depreciated and we didn't even try to use it.
We use FeedListItem where items aggreagtion is defined like "{ path: path, factory: .factory}"
However it doesn't matter which control.. As this is list is a type of ManagedObject - we have this part of code run every time:

https://cloud.githubusercontent.com/assets/6381507/17481943/28da33b0-5d88-11e6-84c4-acce9d99439e.png
As you can see - every single JSONupdate triggers the whole list rerendering including all items in the case when factory is used.
I will try to find the time to reproduce the case in the public project.
Best regards,
Petr

@ThePlenkov i am talking about the growing property of the sap.m.List.
It actually matters. FOL, what u need is already available in the framework with growing=true and growingDirection="Upwards". Also growing property enables the extended change detection of the list binding which creates "diff" from the binding updates. Since growing overwrites the default ManagedObject#updateAggregation method, it only deletes or inserts necessary items and does not rerender the list completely
Because of the compatibility reasons ManagedObject#enableExtendedChangeDetection is private at the moment and only implemented for growing list.

@aborjinik  Wow! That's a new thing for me. Could you please describe which version is it available from?
Thanks!
Petr,

I mean not only upwards - it's 1.40 as I understand. I mean updateAggreagation function. We have 1.38 and as we see 1.40 is not yet stable one and out of maintenance:
https://sapui5.hana.ondemand.com/versionoverview.html

growing feature was always supporting extended change detection of the binding. ~ so probably since  1.16.

HI
I've a question about this.bUseExtendedChangeDetection.
I'm binding an array of pages to the json model. and i can add, reorder and remove pages.
The workflow is this:

add a page  -> JSONModel.protocol.setProperty("/pages", [{id: "page1"}])
dom looks like

/* page1*/
2. add another page -> setProperty("/pages", [{id: "page1"}, [{id: "page2"}])
dom looks like
">/* page1*/
">/* page2*/
3. reorder the page -> setProperty("/pages", [{id: "page2"}, [{id: "page1"}])
dom looks like
">/* page2*/
">/* page1*/
4. delete page2 that has been moved to index 0 -> setProperty("/pages", [{id: "page1"}])
dom looks like
">/* page1 -- somehow the index is changed!*/
5. add another page ->
And then this gives me an error when trying to clone the object during updateAggregation.
bUseExtendedChangeDetection is false in my case, and in getIdSuffix, it's giving an index of 1 and it's trying to clone an object with "page-1" again, causing the duplicate id exception.
i'm not sure if bUseExtendedChangeDetection  is supposed to be false in my case?  How to enable it?  these all seem to be internal to me as i'm just calling JSONModel.setProperty.
thanks for any advice!

authors: ThePlenkov TobiasOetzel aborjinik mcshellwong thomaskoetter


text:
using scoped npm package in openui5

OpenUI5 version:1.96
Browser/version (+device/version): Chrome 99.0.4844.51
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible): https://blogs.sap.com/2020/07/30/project-shims-using-npm-modules-with-ui5/
The above url provide guidance to use npm packages as project shim in an openui5 project, the examples are lodash.js and moment.js are public packages. we need to use a scoped npm package like "@ibm/motion" - (https://www.npmjs.com/package/@ibm/motion) in our project. when we tried to configure the ui5.yaml file as described in the blog, the package is not served in the "resources/project-shim-name/.." folder. Normally we import this package in vue like this
import getCurve from '@ibm/motion/getCurve.js';

here is the project shim configuration in the ui5.yaml file.
---
specVersion: '2.2'
kind: extension
type: project-shim
metadata:
  name: ibm # this can be your project shim name
shims:
  configurations:
    @ibm/motion: # name as defined in package.json
      specVersion: '2.2'
      type: module # Use module type
      metadata:
        name: @ibm/motion
      resources:
        configuration:
          paths:
            /resources/ibm/motion/: ''  # location where modules are stored

The yarn start command pops an error stating 'wrong indentation at the @ibm/motion'.  i think, specifying the configuration name as defined in package.json might be the problem. how should we configure the scoped npm packages?

I believe I had similar issue, I solved my case by using alias for the npm package.
The adjustment is done in the package.json with the following syntax:
... dependencies:{ ..., 'new-name-alphaonly': 'npm:@ibm/motion', ... }, ...
Then you can refer to this package with the new name in ui5.yaml

@dfenerski Thank you so much. it worked! also i think we might have to install at terminal as npm i customname@npm:@ibm/motion.
then specify the configuration in the package.json in the dependencies section!
thanks again!

authors: dfenerski subralog


text:
Enable check constraint reflection

Check constraint tests work perfectly now, due to changes in SQLAlchemy tests to minimize syntax differences in databases

Updated

repo: SAP/sqlalchemy-hana


text:
component for running XSLT in the browser using SaxonJS - [merged]

Merges transform-sef -> rest-transformer-components
The branch contains a new web component <seed-transform-sef> like ordered in issue #9.
There is a workaround to a bug in SaxonJS, which prevents SaxonJS being loaded like a regular module. See https://saxonica.plan.io/issues/6233
This is closes #9

mentioned in commit 724902f566bc6223f7581a5da7f698382d4cf3a2

repo: SCDH/seed-frontend-components


text:
Easy Issue: Changing Homepage Picture to Updated Picture from Officers 2021

Change with this picture: https://drive.google.com/file/d/1QGsO7WkfNKPhsXeNz-fH9SmcrLDg8AZg/view?usp=sharing

Consider using WebP format for the images, since it loads 2x faster than png/jpeg

Anyone working on this? I'd like to do this.

All yours

authors: Logan-Dang neelp03 seemavora


text:
Add tests for ab.data.calc_gps_week

Follow-up for #41

Datoer hapset tilfældigt fra https://www.gnsscalendar.com. Det ligner der er en off-by et-eller-andet fejl i funktionen. Ellers også har jeg været virkelig dårlig til at taste datoer og gps-uger ind...

Ah! Dumme mig -  https://stackoverflow.com/questions/45422739/gps-time-in-weeks-since-epoch-in-python#comment109275199_45423380

Hvordan er det nu den går?

"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors."

Kan du ikke pushe et fiks til den her branch?

Jeg kan ikke umiddelbart clone den, nej.

Jeg har merget fixet med flooring division.

Du kan pushe direkte til min fork. Noget i stil med:
git remote add kbevers git@github.com:kbevers/AutoBernese.git
git fetch kbevers
git checkout -t kbevers/gpsweek_tests
...
git commit
push kbevers gpsweek_tests

Det er et tip til en anden gang, du fandt en anden vej

Super. Tests fejler stadig, så det må jeg se på.

Ja, det ser ud til at være samme problem. Der findes ikke et bibliotek der kan det her i forvejen?

Jo, gnsscal. Men deres funktion ser fuldstændig ligedan ud : https://github.com/purpleskyfall/gnsscal/blob/f7bdfe6b5d8ba0d076c2ecfb4a9433b81ff4a450/gnsscal.py#L24

Altså der er faktisk en forskel: det ene eksempel beregner ugetallet som heltalsdivision med 7 af differencen mellem to mandage, den anden direkte mellem de to dage. gnsscal er ligeglad med mandagene, men rammer rigtigt - så det kan jeg da også bare gøre?

Sikkert. Husk også at gps-uger er amerikanske og derfor starter om søndagen.

authors: kbevers larsnaesbye

repo: SDFIdk/AutoBernese


text:
Remove a User's ability to "cancel" their RSVP

@mathetos @JasonTheAdams Please remove the option for a user to cancel their RSVP. It actually does not work anyway and it just confuses the User.
We are trying to promote more conversation between a Volunteer (User) and SDRT staff regarding their once-a-week commitment, and the ability for a user to cancel their own RSVP gets in the way of this.
I literally fielded maybe 6 emails today from people saying they tried to cancel on the website but they couldn't so they emailed instead. We don't want people cancelling on the website, we want people to email. And we had 1 email from someone who received a confirmation email for tutoring but thought they had cancelled their RSVP online. VERY CONFUSING.

@JasonTheAdams To clarify, after a user has RSVP'd, they'll see the below message:

The "Cancel Here" is what is not working currently. This is output here:
https://github.com/SDRefugeeTutoring/sdrt-custom-functions/blob/c4519cdc22b7f59bed74ac22dc7ccd1ae2001995/plugin_customizations/tribe_events/tribe_events_customizations.php#L231-L236
Let's just change the wording to:

Need to cancel? Please email our Volunteer Coordinator at info@sdrefugeetutoring.com

Hi @mathetos and @dreazee!
Per Matt's direction, this is all set:

While I was in there I did find why the cancel button wasn't working. In fact, all users, regardless of whether they were marked as attending, would see the message intended for users marked to attend. This bug has been resolved. It still sounded like the new intent is to have users email instead of doing it themselves, so that's how it works now.
Since this was such a minor change I didn't bother to write up a PR and just pushed this straight to production. 🎉

@JasonTheAdams @mathetos  SO AWESOME. Thanks!!

authors: JasonTheAdams dreazee mathetos

repo: SDRefugeeTutoring/sdrt-custom-functions

license: Unlicense


text:
v2 Specification

Having this feature will be very useful for us. We are planning on building the regex matching to conform with the v2 spec gist.

How is this going? Happy to help out.

@kevmee I have done a small PoC, however nothing concrete. I am currently working on finalising the v1 release with getting the test output nice to use. That would be great if you want to help out.

Sweet. Send me over what you have. I'll start looking at the source code today. I'm hoping to roll out PactNet here and I believe this feature would be awesome.

Nice!
The details can be found on the branch "feature/regex-response-matching". It's pretty stale, and we haven't fleshed out much, we were just trying to ascertain what the DSL part may look like. It's best to pretty much start again.
I would start with rolling out Pact and seeing if you actually need regex support. You can actually get pretty far with just using the provider state support and inserting deterministic test data (on the provider side). The only reason we haven't built regex support is that we actually don't need it at the moment.
Are you able to share where you are rolling it out?

Some more discussion about spec v2 and regex matching.
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/pact-dev/KIL2IjeS7RY/MaGi_t7i_gMJ

I'm working at an insurance company, we're heading down the micro services path so want to get this set up asap.
As you suggested I will be rolling it out, but do see this as a limitation - unless of course I'm missing something that caters for the following scenario:
Consumer -> POST request
Service -> returns 201 with {id=XYZ}
I need to know id exists in the body but have no idea what the value will be. I would prefer not to use a provider to insert an expected id as I would not be testing the real API. I would be changing the API behavior when the tests are run, which cheapens the value of the tests.

Yeah the id scenario is a good example.
The only reason you wouldn't know what the id was, is if you could not make the data at the time the test is run, deterministic. Having deterministic state makes integrated testing much easier and way less fragile.
We are not changing the behaviour of the API in this instance, we are making the state the API uses deterministic. This is generally a sign of a good test.

I understand the benefit of deterministic state when mocking an external service for the sake of an integration test however I'm unsure about altering the internal state of the service that is actually under test, in this case the API.
Anyway I will be doing some work to roll this out over the next week or so. I hope to take a look at this feature at the end of next week.

This is where it gets confusing, the purpose of Pact is to validate the contract between the consumer and provider using a consumer driven approach, not to necessarily provide a testing tool for the provider itself. However as you mention, it is actually testing the provider code to some extent as well. You should still test the provider using normal unit style approaches etc.
The Ruby Pact GitHub wiki is worth checking out as well, as it has more info about these kind of things.
https://github.com/realestate-com-au/pact/wiki/FAQ
https://github.com/realestate-com-au/pact/wiki/Best-practices
@bethesque What are your thoughts on this? Any specific related doco you can point to?

@kevmee But yeah, I do agree that regex matching is an awesomely useful feature.

Yes, I agree @neilcampbell, the purpose is to validate the contract, not to be a functional test of the provider, and agree @kevmee that regular expressions are required. An intermediate step is to do "type based" matching, where you can say, this should be a String, this should be an Integer, but I don't care what the value is.
What's the roadmap for types/regexp looking like @neilcampbell?

@bethesque Nothing in the works at the moment, however @kevmee has offered to start implementing it, which is awesome!

Yay @kevmee! Welcome to team pact. If you haven't already, please read: https://github.com/bethesque/pact-specification/
You're going to need the v2 spec to work from: https://github.com/bethesque/pact-specification/tree/version-2
Specifically, the regular expression specs: https://github.com/bethesque/pact-specification/blob/version-2/testcases/request/body/matches with regex.json
Be aware that this spec is still in flux! View this as extra incentive to decouple the implementation from the serialisation format ;)

Thanks @bethesque, for the welcome and the links :)
@neilcampbell I'm hoping to start looking at this next week, so expect to hear a bit more from me then :) As @bethesque mentioned I will look at type based matching as an intermediate step.
Cheers

@kevmee Awesome stuff!

Here's a type based matching example: https://github.com/bethesque/pact-specification/blob/version-2/testcases/request/body/matches with type.json

The idea is that the match type specified for a node is supposed to then carry down for all children, however, that example does not show it well.

@abhayachauhan Just thought I would include you in this conversation about regex matching as I know you guys were also keen to help out with this.

I've been nagging @neilcampbell about this!
Excellent to see some movement on it - we would really love this feature included - but we've worked around it for the moment.
I will be looking into this in the coming fortnight as we need it fairly soon!

@uglyog and I implemented type based matching for arrays on Friday for the JVM and Ruby impls.

Hey folks, I'll be working on setting up pact here before getting around to this. Will keep you posted when I get a chance to get started.

@kevmee :+1:

@neilcampbell @bethesque started working on this (type matching only)
consumer side json updated:
https://github.com/abhayachauhan/pact-net/blob/type-matching/Samples/EventApi/Consumer.Tests/pacts/consumer-event_api.json
have I missed anything? on the right track?

Not quite there. "requestMatchingRules" is now just "matchingRules". "match" : "true" isn't a thing, I think you mean "match" : "type"? Check this example out. https://github.com/bethesque/pact-specification/blob/version-2/testcases/request/body/matches with type.json

Hey @abhayachauhan!
On top of what @bethesque we want to have a DSL on the consumer for generating the matching expressions. @bethesque has a nice gist with what the ruby DSL may look like, we could do something similar (however we cant use functions in the same way). We did a small PoC in the feature/regex-response-matching branch (it is way behind and very stale, so only use it as a rough guide) https://github.com/SEEK-Jobs/pact-net/blob/feature/regex-response-matching/Samples/EventApi/Consumer.Tests/EventsApiConsumerTests.cs#L248 (highlighted line). You guys may be able to come up with a nicer approach though.
Also I just noticed that your fork is behind by 44 commits, so please patching your changes on top of the current upstream master. I have done a lot of refactoring whilst getting v1 ready, so it is worth syncing before continuing.
Shout if you need anything else!

Thanks @neilcampbell and @bethesque
I was offline when working so I didn't have your example with me, working from memory.
I've realigned my fork and done some refactoring. I have had a good look at your spike and it seems like a great starting point. I've refactored , I'll touch base as I progress.

@neilcampbell @bethesque I've refactored the consumer side. Neil let me know what you think - it ended up fairly similar to your spike.
Here is the pact - https://gist.github.com/abhayachauhan/68e802898b3d566f8acb
I'm looking at the provider side - I'm starting to see a lot of areas which will need refactoring... especially getting matchers into comparers.
Its all a bit rough at the moment, and will be ironed out once its working - let me know if I've missed anything.

Awesome stuff, looking pretty good! I will take a closer look on the weekend at the branch in your fork.
@bethesque With regards to the spec part, should we be following https://gist.github.com/bethesque/5a35a3c1cb9fdab6dce7 or https://github.com/bethesque/pact-specification/blob/version-2/example.json (I just noticed this one)?
Yeah the provider side is likely where the bulk of the work is. The body comparer is particularly ugly and needs a good refactor as you mention.

Finished the regex and type matching support end to end.
Working well I believe.
Just need to go through and refactor (mainly the provider side as discussed).
Here is an example of the pact:
https://gist.github.com/abhayachauhan/70c14395e9f1f8a6d819
Let me know what you think @bethesque @neilcampbell
I've made some assumptions on the type matching side of things. Strings/Ints/Booleans are all straight forward.
For example an expected Object matches an actual Object = pass. Properties are not evaluated at all.
Same with arrays. We can discuss further if required.

@neilcampbell Neither example. Those were just pseudo code, thinking on a gist. You should be using the pact-specification version 2 tests https://github.com/bethesque/pact-specification/tree/version-2/testcases. For example, the ruby code has a dynamic test that loops through each test case an checks that it agrees with the 'match' element in the fixture. https://github.com/bethesque/pact-support/blob/master/spec/pact_specification/compliance-2.0.rb
I think you already had one of these tests for version 1?
Btw, the node "responseMatchingRules" should be "matchingRules".
I'm not sure what you mean by "Object matches an actual Object", properties not evaluated @abhayachauhan. I'm don't think I understand what you mean by "properties", maybe it's a .net term. Can you give a JSON example?

Sounds like I've been working off pseudo code :P Back to the drawing board!
@neilcampbell I'm assuming we don't have any data driven tests which run all these test cases seeing we're not v2 compliant. Do we have any data driven tests like these?
Looking through the tests, it seems to have a lot more functionality than I expected. Need to get my head around some of these...

Matching Rules for request and response (Response I understand, but Request?)
Wildcards in the path (Eg: https://github.com/bethesque/pact-specification/blob/version-2/testcases/request/body/array with nested array that matches.json) - may need some clarification on how these wildcards work?
Min matching for arrays

Any examples of a v2 pact?

@abhayachauhan Yep we have the specification data driven tests setup and ready to go. You will just need to update the Git submodule that references the spec repo to point to the version-2 branch on your fork/branch. See https://github.com/SEEK-Jobs/pact-net/tree/master/PactNet.Tests/IntegrationTests/Specification

@abhayachauhan And yep there is a fair number of rules to the matching. Took me a while to get it right :) The readme's on the specification repo are worth have a good read through.

@bethesque Yep we already have those tests setup. There is a git submodule linked into the pact-net repo.

@abhayachauhan

Matching Rules for request

Flexible request matching is more useful when Pact is used for higher level tests (eg. driven from the UI). If the matching is exact, the tests are brittle, and the number of interactions you end up needing to verify explodes. Have a read of this:  https://github.com/realestate-com-au/pact/wiki/Best-practices#use-pact-for-isolated-unit-tests-think-carefully-about-how-you-use-it-for-integrated-tests

Wildcards in the path

"*" means "match every element in the array", as distinct from [n] which is, match the nth element.
The test cases are examples of pacts (or at least, parts of the pact).

Even the ruby version is not completely v2 compliant, but starting with the regular expressions and type based matching will get you a long way.

@neilcampbell I've implemented regex/type matching for responses so far.
Doesn't handle wildcards yet, nor request matching.
Done some refactoring, probably needs another look once all the matching functionality is complete.
Could become a very large PR if I try to take the whole thing on.
Thoughts?

@abhayachauhan Awesome! Going to hopefully take a look at this today, and will get back to you.

@abhayachauhan I had a look tonight and it's starting to look pretty good. I think it's probably worth teeing up a skype chat/code review session/brainstorm some ideas. Thoughts?

Yeah it is worth doing that - there are a lot of rough edges. It would be good to chat about it.
I've also started looking at the wildcard matching, I'm finding the JSONPath interpretation seems a little different - having to manipulate JSON paths which is not fun.
Once I check that in (next day or two), I'll drop you a line.
Min matching isn't too far off either.

@abhayachauhan Sounds good, looking forward to the chat.

@neilcampbell Having some trouble coming up with a nice dsl for wildcards.
When are you free to chat? Prefer office hours or after?

@abhayachauhan Sorry we have a hackathon on today and tomorrow, so things are a bit crazy. Are you free on Sat for a chat?

I'm usually free 8:30pm onwards - after the kids are asleep. Saturday should be fine.

@abhayachauhan Can't do tonight or Sunday night. Let's move this to twitter DMs.

@neilcampbell Another interesting case that I've encountered with matching -
https://github.com/bethesque/pact-specification/blob/version-2/testcases/response/body/array at top level with matchers.json
dob field has a regex match - where JsonNet converts to datetime automatically - this will obviously fail. If we switch Datetime parsing off, we lose the ability to do type matching for dates on this.
Probably should turn it off and treat it as a string...

@abhayachauhan Yeah I think it should just be treated as a string.

Hey @abhayachauhan.
I did a big refactoring of the comparers over the weekend and extracted out the concept of matchers.
So far it is looking pretty good.
I also started working on parsing the interaction body to resolve the matchers, then cleansing the body of the matchers (including nested matcher functions). So far so good and will hopefully complete that tonight or tomorrow.
From there we can start building the different types of matchers (which we can probably extract them from the stuff you have been working on), setup the rules for composing them (with weighting/ specificity), start serialising in the pact file and the consumer side is pretty well be sorted.

Hey guys, don't know if it's just the terms you're using, but you'll find life a whole lot easier down the track if you're working on the concept of a "differ", not a "matcher". The algorithm should take two structures, and return the difference, rather than returning a boolean. This is so that you can then display the differences in a meaningful way to the user. A massive proportion of the usability of the Pact implementations depends on the readability of the diffs.

@bethesque Yep it's the terminology we are using. We are actually returning a list of all paths checked in the object graph and if each check was a pass or fail (which will include the diff). That way we can actually override a pass/fail result from a composed matcher if another result is more specific/has a higher weight. Hopefully that makes sense?

Nope, not sure what that means at all! How would a match have a different weight?

Maybe I am thinking up things that don't exist :) Take the below example, where we have a type matcher and a regex matcher nested inside the type matcher. This is a pretty bad example, but hopefully I highlights what I am getting at.
response.Body = new
{
  test = MatcherBuilder.Type(new
  {
    temp = MatcherBuilder.Regex("te", "A regex exp")
  })
}

The body returned from the mock provider
{
  "test": {
    "temp": "te"
  }
}

If both those matchers are testing something about the $.test.temp path (one via a wildcard on the type matcher and one via the direct path on the regex matcher) and we get conflicting results from each of those matchers (type fails, regex passes for example), is it a pass or failure? Does any failure on that path always result in an overall failure?

In that case, the type match is not performed, only the regexp match is performed.

I'd expect a structure like this to be returned:
{
  test: {
    temp: new RegularExpressionDifference(expected: "a regexp exp", actual: "te")
  }
}

I think this one is easier to talk through, however I think we are both on the same page.

@neilcampbell excellent work dude - lets tee up a chat when your done

@abhayachauhan I pushed the changes I have been working on to the version-2 branch https://github.com/SEEK-Jobs/pact-net/tree/version-2. It's still a WIP (so there are some obvious things to cleanup), however would love some feedback with regards to the approach and how it fits with the stuff you are working on.

@neilcampbell awesome..  Shall check it out in in the next day.

@neilcampbell looking really good! :+1:
Noticed some things -
ProviderServiceResponseComparer should use expected.MatchingRules rather than actual?
TypeMatcher.Type points to Regex Type
Let me know when you'd like help.

@abhayachauhan Yep good finds!
You can start patching the matching rules you are working on in and wiring the rest of the bits up. I would start with 1 matching rule and get that working all the way, then add the next etc. Happy to help with any of this stuff. May even be worth another chat.

Hi there - great work on the .net version of pact!
I'm looking at using pact in some projects but lack of regex or type support will make things tricky. How close are things to working? I'm happy to pick some stuff up if that'd help move things closer to the v2 spec.

@finnnewick-justgiving Sorry I have taken a little while to respond.
To be honest, I can't see myself getting any free time soon to get this implemented. So yeah it could be a little while off, as I have quite a few other things that need my attention at the moment.
Happy for you to take a look and see what you think? It's definitely something that you could work on, even if it's just the regex piece. I did some work a while back to make this easier (hopefully) to implement.

OK, cool. I can't commit to anything yet but I'll start talking about it with my team and see if we can get something working.

Awesome, sounds great! The version-2 branch of the specification project is worth look at to help give you some context about the change. https://github.com/pact-foundation/pact-specification/tree/version-2

Hi Neil,
Sorry it's taken so long to get back to this. We've had to prioritize sprint work over this. We've also found that hard value dependencies in our Provider tests haven't been such a big problem.
Ideally we would like to see type based pacts in our system. Our Scala consumers currently use a DSL to build up type based pacts. Our .NET code currently uses the automatic object serialization in Pact.net. The object serialization is great in some aspects as it provides a 1 to 1 mapping between the pact and our actual request and response objects.
We've seen with the DSL's in Scala that it's too easy to add a field to your response object, and thus a dependency on the server, without updating the pact with the DSL.
Therefore I feel the best approach to take would be something like the Ruby library does:
will_respond_with(
    status: 200,
    headers: {"Content-Type" => "application/json"},
    body: {
      Pact.like(
        name: "Mary",
        age: 73
      )
    })

@robertfall Sorry I am not 100% sure what you mean? When you mention not a fan of describing the pacts using a DSL, are you talking about using a dynamic object to express the Request/Response body?
We've seen with the DSL's in Scala that it's too easy to add a field to your response object, and thus a dependency on the server, without updating the pact with the DSL.
In response to the above, I would imagine that if the added field was critical in processing the response, then the consumer should throw some kind of validation error and the consumer test would break.

@neilcampbell that would indeed by great but it means the developer has to remember to update the consumer test every time they add use a new field on the response.
We've seen the following happen in our codebase:
The consumer code deserializes JSON into the response class:
case class Response(name: string, isActive: bool)

The consumer test body DSL looks as follows:
val body = new PactDslJsonBody()
      .`stringType`("name")
        .booleanType("isActive")
      .closeObject()

The developer then added a new field to the API isArchived. The user updated the response class:
case class Response(name: string, isActive: bool, isArchived: bool)

The developer proceeded to use the Response class and depend on isArchived. The consumer and provider tests were never updated and never failed.
The consumer test deserialized the json generated by the DSL statement (which didn't contain the isArchived field) into an instance of the response class leaving the isArchived field empty. The provider test didn't fail as all that happened was a new field was added to the provider which doesn't break a contract. I think we can probably explicitly mark all the fields on the response objects as required in some manner which would prevent this from happening but it hasn't been done in the code base so far. In effect this makes the contracts useless for determining what fields are actually required.
In our .NET codebase however, when a developer adds a field to the response class the consumer test is automatically updated as the mock provider serializes an instance of the response class. I have just realised though that if the mock response in the .NET consumer test doesn't set fields of certain types (Objects for example) that they too won't serialize correctly.
In the end I guess it comes down to discipline when changing request and response objects, thought I do personally feel that generating pact JSON using real request and response objects is more robust and accurate than relying purely on a DSL.
A Pact.Like(response); wrapper seems to be the best of both worlds and is something that exists in the ruby version.
Sorry for rambling here. I do still intend to spend some time on adding type-based matchers. I've had to push that back during our current sprint though.

@robertfall Thanks heaps for the additional detail!
Ok, so my personal opinion is that we should all get into the mindset of changing the test first, then updating the consumer to match. I can however understand your point of view.
In the .NET version you can change the JSON serializer settings when calling PactBuilder.MockService(). So you should be able to force the default values to be serialised into the Pact, should they be omitted in consumer test.
In regards to Pact.Like(response), I do like the idea of that one, but I do think we should have support for both use cases. I personally like to use dynamic objects.
The tricky part is going to be composing all the different rules to make the matching work like you want.

Hi Guys,
I have a JSON pact file with href links that is part of the response body from the consumer. Which looks something like this:
"links": [
{
"rel": [
"self",
"paymentDetail"
],
"href": "/api/uk/account/12345/payment-detail"**
}
]
},
However the provider  responds with the full resource as below:
"href": "http://localhost:12345/api/uk/customeraccount/123456/payment-detail"
Therefore when I run the provider test and it compares the actual to expected it fails. I am using Pact. Net version 1.1.0 which does not support partial matching as of yet. Is there a work around that anyone knows off that could assist me in which the consumer can ignore the server name?
Regards,
Newbiee

How's it going with this? I'm new to Pact and it seems like this is needed to test services where you can't define the provider state. I'm willing to help

Hi @scottcowan!
Thanks for getting in touch. At the moment there is still nothing happening on v2/3 flexible matching.
I'm interested in hearing more about your specific use case and why provider states cannot be defined?

Hi Neil,
I've used pact net with the pact broker so

on build the pact is published

on deploy of a consumer the pact is tagged per environment

on deploy of the provider the pacts a gathered from the broker by the tag

pact-provider-verifier runs each

I did skip over provider states as we're using this throughout our environments

I was looking at type matching or regex to identify which fields a consumer is using without explicitly checking the content of the response.

I could use provider states but I'm using this throughout the deployment pipeline (which may be wrong) and I can rely on the Ids of requests to be valid over time.

Usually Pact verification is done before deployment as it let's you know if the consumer/provider pair are compatible and therefore prevents you from deploying an incompatible configuration. The trick to successful provider verification is being able to control the application state (especially with v1 of Pact).
With the request id example you mention, is that an important piece of the contract from a consumer PoV? If it's not you can completely omit that from the Pact and the verification process will just ignore that field.

Scott,
Since we currently are using pact for messaging and not http calls we are looking into just implementing that support right now.
Jerry
Sent from my iPhone

On Oct 26, 2016, at 9:53 AM, Scott Cowan notifications@github.com wrote:
How's it going with this? I'm new to Pact and it seems like this is needed to test services where you can't define the provider state. I'm willing to help
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@baguaJerry Cool, i'm interested in hearing more.

Hi all,
What is the current state of the v2 progress? I'm interested in using it and am willing to help contribute.

Hi @iamdavidfrancis
Thanks for getting in touch.
Nothing has really changed on this front yet. I am going to sit down on the weekend and work out a path forward. Hopefully I will update this thread on the weekend with some more details on how you can help out 😄

Yay @iamdavidfrancis!

Really interested in having a v2 implementation in .net too. I can help if needed!

I would also like to help. I'm particularly interested in at least getting the provider verification implemented for version 2. We have another team generating pact interactions through the Swift implementation and would like to verify them on our .NET web service.
Has anyone thought of a strategy for handling the "matchingRules" part of the spec? We need to apply the matching rules, but default back to simple equality comparisons for all other paths not included. Json.NET allows us to select tokens given a path expression but there is no way to check if a path would be matched by a path expression. I was thinking maybe we apply all matching rules, keeping track of which paths were matched. Then traverse the Json, checking if the current path was already checked from a matchingRule and if it has been checked already, skip the equality comparison.

@baguaJerry and I put a good bit of work to support the V2 matchingRules and messaging for V3, but have not fully added support for V2 in the current codebase. It's pretty close, but still needs some work to integrate the new matching logic into interactions. I'm hoping to jump back onto this at some point, but if you're interested please have a look at #79

I have been thinking this through a bit and chatting with with some of the others in the pact foundation group. Our goal is to eventually have a language agnostic "core" and then simpler language bindings into the core. This will allow us to add new features across the board at lot faster and is why the Rust https://github.com/pact-foundation/pact-reference implementation is being written.
With this in mind, I am playing with idea of doing something similar to what the Pact JS project does and wrap the Ruby implementation. This will give us v2 matching, align the .NET project more towards that goal, and also should make adding .NET core support easier.
What does everyone think of this idea?

I think it is a great idea. One of the challenges moving forward was always going to be keeping all these independent language libraries aligned and moving forward. The tests provided some sort of sanity but the feature parity was always an issue.
The fastest and future proof way to keep aligned.
Although I'm not sure why Rust was selected; regardless, +1 from me.

@abhayachauhan Rust was a good candidate because it works cross platform and has a very lightweight runtime (like C, C++) and can be embedded and called easily from other languages using FFI.

Aye, I think the premise definitely has merit.  I looked at a similar approach last year but with the JVM version.  I tried a couple of things like using the JVM Pact Server with .NET and even converting the Java code to C# using tools like IKVM and Sharpen.  It certainly wasn't trivial.  Perhaps the Rust version will play out a bit nicer.

I like the idea. I was/am considering to contribute to implementing new spec versions, so anything that can help speed things up in this regard is great news as far as I'm concerned.

I like this idea of wrapping a "core" library for other languages. If we can build out a dll from the Rust implementation, we can extern it easily in C# and have feature parity.

For those interested in this idea but unfamiliar with FFI/embedding/wrapping (like me):
FFI stands for Foreign Function Interface
A good place to start an exploration of this space might be here Stack Overflow Understanding FFI
If this can work, It's hard for me to express how great an idea I think this is.

If you use the same technique as the javascript library has, you don't even need to use FFI. You just need a .net HTTP client for the mock service, and a nice way to run some provider setup hooks with the pact-provider-verifier on the other end.

Yeah totally @bethesque, that is where I am heading to start with. But in my head the FFI piece is in relation to using the Rust integration with other protocols and messaging patterns (V3 spec). We need to get v2 first 😄

Also hoping to have a PoC done by the end of the weekend, so fingers crossed!

Awesome.
On 24 May 2017 11:29 pm, "Neil Campbell" notifications@github.com wrote:

Also hoping to have a PoC done by the end of the weekend, so fingers
crossed!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SEEK-Jobs/pact-net/issues/9#issuecomment-303723668,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbPFPyx--y9FFcsrxvGa_WlgLcGsr_sks5r9DCogaJpZM4CP5W9
.

@neilcampbell how did the PoC go? Can contributors help in some way?

@ma499 PoC went well. It all works pretty well with a few small trade offs. There will be some breaking changes on the verification side (nothing we can't fix with some doco).
Currently cleaning up a few things, then will push the branch (hopefully in the next couple of days). From there I will compile a list of things to do, and hopefully some of you can help out with them/test the changes in your projects etc.
Then we can release v2 :)

I have updated the version-2 branch (https://github.com/SEEK-Jobs/pact-net/tree/version-2) with a new working version that uses the ruby standalone core engine. Inside the repo there is a TODO.txt file which has most of things I think we need to consider before shipping the official version 2 package.
If you are interested in helping out take a look at the list, pick an item, and let me know which one you are working on in this thread.
It would also be great if some people could test the current package and let me know if it all works ok for them. The current nuget build artefact is available at https://ci.appveyor.com/project/SEEKJobs/pact-net/build/175/artifacts

@neilcampbell  Thanks ! I will try to use the MatchingRules as soon as possible. Do you have some sample to look from Consumer and Provider perspective. Or any document to follow for the same ?

@bikashbehuria The sample in the repo have been updated, so that's the best place to start.

@neilcampbell Thanks again. I can see the sample.

The version-2 branch has now been completed and merged into master. I have also created a beta nuget package which can be installed from nuget.org by running Install-Package PactNet -Version 2.0.0-beta -Pre.
Before officially releasing this, I would love to get some people to install/test and make sure you are happy/provide feedback. Let me know if you can help out!

I have made an additional tweak so latest is now 2.0.1-beta, which can be installed using Install-Package PactNet -Version 2.0.1-beta -Pre

@neilcampbell . Thanks !
I have a question on how we are validating the response in provider side. In earlier version or (may be version 1) , we had ProviderServiceResponseComparer class which is being used for comparing two  i.e. actual and expected. Now there is no such class ? just curious to know , how are comparing now ?
Just FYI , i am in process to start V2 in my REST Provider and Consumer so thought of asking this quick question.

@bikashbehuria The ProviderServiceResponseComparer is an internal class in v1 so I am not 100% sure what you mean? Is there anything you can share in a gist which demonstrates this?
Basically the primary method was to pass a HttpClient, which talked to the provider. Unfortunately that had to be deprecated due to using the ruby core and additionally wanting to get .NET standard/core support.
Instead of passing a HttpClient, now you pass a HTTP URI which can be used to talk with the provider.

@neilcampbell . I was debugging v1 earlier and I could see below code , which was meant for to verify Actual vs Expected   public ComparisonResult Compare(ProviderServiceResponse expected, ProviderServiceResponse actual)
Where it compares the result coming from actual API call with the JSON PACT file produced by consumer.
So thought of debugging same and see in latest code V2  as I have some complex data model in my Http JSON response, which I want to verify each attributes. So when I run the current sample in Provider Test Method - EnsureEventApiHonoursPactWithConsumer()  , I am not been able to locate where we are comparing Actual (from API) vs Expected (from PACT file). Also I want to apply some matching rule as I have different consumers , using same API  but they have different matching type.

@bikashbehuria Thanks for providing a bit more context, I appreciate you sharing your experience!
Pact-Net is now making an interprocess call into the Ruby standalone shared core to do the actual verification, so you will not see a .NET stack trace for that part.
If you have different consumers calling the same API, they should be seperate Pacts, and as such they should have seperate consumer tests.

@neilcampbell Thanks for all the information. I will setup the tests and come back to you again for any question.

@neilcampbell thanks for the work on the v2 it's great to see this project moving forward! I have been playing a little bit with the beta version and I have 1 question and 1 issue.
It looks like the provider state can now only be a uri? It does require the setup of the middleware like in the readme example but could we use just a string like in v1?
I get an issue about encoding somewhere in the ruby code about my json pact file even though it was working fine with v1. Anything in particular that needs to be done to make it 'compatible' with v2?
(/bin/Debug/pact/lib/vendor/ruby/2.2.0/gems/json-1.8.6/lib/json/pure/parser.rb:242:in `rescue in parse_string': Caught Encoding::CompatibilityError at '∩╗┐{ (JSON::ParserError))

Are you using any unusual characters @cheesemacfly? It looks like '∩╗┐' is the thing that's making it blow up.
When you have a moment @neilcampbell could you set up an end to end example like https://github.com/pact-foundation/pact-ruby-e2e-example that can run on appveyor like https://github.com/pact-foundation/pact-ruby-standalone-windows-test ? It makes it really quick for people to give you an executable example of their problem.

@cheesemacfly could you please raise a separate issue, and include if possible an executable example, and at the very least, the steps to reproduce your issue.

@cheesemacfly To answer the question about about just using a string like in v1, unfortunately we cannot do that easily using the Ruby standalone core and also trying to target .NET standard.

@bethesque I actually got a more detailed error message that says:

incompatible encoding regexp match (ASCII-8BIT regexp with IBM437 string)

I'll create a seperate ticket with the file I'm using if you think that's worth it.
@neilcampbell Your answer actually triggered a new question: since the target is now .NET standard, I'm assuming the goal is to let people use .NET core and there own choice of os. How is the Ruby standalone going to play on unix systems? I have to admit I'm not a big fan of having such a big dependency on Ruby which reminds me of the mess I had in the past using sass...but I understand the choice was discussed in the messages above. (also I don't really like ruby so I'm definitely biased)

@cheesemacfly Yes that is correct. Ruby and travelling ruby (which is what we use for the standalone core) is cross platform. We have builds for all platforms, see https://github.com/pact-foundation/pact-ruby-standalone/releases.
The reason we are doing this is so we can have a common core across all language implementations. At the moment it's ruby, but we would like to potentially move to the rust core, which is much lighter weight. I'm hoping that for the most part the Ruby'isms will stay fairly well invisible.
Having a common core I think it a pretty big deal as it allows us to move quicker and add new features to all languages a lot easier.

@neilcampbell . Not sure , which forum to discuss about one issue I found  but I need some help in starting up my PACT test in consumer side. I am facing some issue in my test , while starting Mock service . Here are some detail , which may help.

Created a Test project using xUnit . I am following what is being created in Event API consumer sample and test.
The MockService port is being set as 9222
When I am executing the Event API sample , the Mock service is starting up but when I am using my test , its not starting up .
So i thought to debug PactNet with my test project and tried to compare with Event API sample project. Particularly on MockService start part.
I found that both are  sending same command to start the Ruby core process . However not able to find out why the first one below is failing to start.

-p 9222 -l "../../logs/distribution_api_mock_service.log" --pact-dir "../../pacts/" --pact-specification-version "2.0.0"
-p 9222 -l "../../logs/event_api_mock_service.log" --pact-dir "../../pacts/" --pact-specification-version "2.0.0"
I may be doing some silly mistake but any hint from you would be a great help
Thanks-Bikash

@bethesque . Thanks for your response.
They both ran in different time. I found the reason. Newtonsoft.Json library was not part of my test project . So I added the reference manually , it worked now.
Thanks !

Just a information to share.
PactNet which is build targeting framework 4  not compatible with Newtonsoft.Json 10.0.* .  I am using latest 10.0.* so I had to change the target build of PactNet to 4.5.2.

@bikashbehuria The latest version of PactNet (still beta) does not target .NET 4 any more, but requires min 4.5, see https://www.nuget.org/packages/PactNet/2.0.7-beta.

@neilcampbell  . Thanks . Now I am using latest from Nuget

The first official v2 spec release has been created (2.0.17).
To install use either:

PactNet.Windows (was previously PactNet-Windows)
PactNet.OSX (was previously PactNet-OSX)
PactNet.Linux.x86 (was previously PactNet-Linux-x86)
PactNet.Linux.x64 (was previously PactNet-Linux-x64)

authors: AnnejanBarelds VanessaDa abhayachauhan baguaJerry bethesque bikashbehuria cheesemacfly cnewham cwilcox-fl finnnewick-justgiving gruntster iamdavidfrancis kevmee lopes22 ma499 neilcampbell robertfall scottcowan

repo: SEEK-Jobs/pact-net


text:
meta-sensaas.py fails when sensaas.py fails

sensaas.py is called in meta-seensaas.py using os.system() and a failure in sensaas.py leads to early termination of the parent script meta-seensaas.py. This happens for example when performing virtual screening and no correspondence is found between the source and target point clouds:
RuntimeError: [Open3D Error] (virtual Eigen::Matrix4d open3d::pipelines::registration::TransformationEstimationForColoredICP::ComputeTransformation(const open3d::geometry::PointCloud&, const open3d::geometry::PointCloud&, const CorrespondenceSet&) const) /home/runner/work/Open3D/Open3D/cpp/open3d/pipelines/registration/ColoredICP.cpp:124: No correspondences found between source and target pointcloud.

Traceback (most recent call last):
  File "../../sensaas/meta-sensaas.py", line 592, in <module>
    if(bestgfithfit < float(scoregfithfit[k])):
ValueError: could not convert string to float: '0.157)'

I think it would be great if meta-sensaas.py could detect such failures and simply skip the system (with a score of zero or -np.Inf), so that the remaining systems in the SDF file can be screened as well.

Having experienced the problem, a new version of meta-sensaas.py has just been submitted. A problem with one molecule would no longer prevent the rest of the screening.

@douguet could you pleas point me to the commit where this issue has been fixed? It is still happening on my end and I can't see any related pull request fixing this.

Current version of meta-sensaas.py (dropped on 24 Aug 2021) contains a variable called sensaasfail which checks if sensaas.py fails

Thanks for the fast reply @douguet! I double checked and the fix is indeed present, but I still had a similar failure. However, I re-run the code over the weekend and was unable to reproduce the issue (due to the stochastic nature of the algorithm). I'll report here with (hopefully) more details if the same issue happens again.

authors: RMeli douguet

repo: SENSAAS/sensaas