Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# port of Ebisu #8

Open
nikhildpardasani opened this issue Jul 4, 2020 · 3 comments
Open

C# port of Ebisu #8

nikhildpardasani opened this issue Jul 4, 2020 · 3 comments

Comments

@nikhildpardasani
Copy link

Hi,

I have ported the Ebisu in C# from your repo which is in Java.
Here is the link to my repo :- https://github.com/nikhildpardasani/Ebisu-CSharp
Kindly go through the code, I have maintained good code. Do let me know if you feel any changes required in any part of the code.
This repo contains all three maximise golden function, gamma function and Ebisu.
Can you please verify this code if it works fine and if you approve that it is correct can you make a note in the Ebisu Readme with a link to the repo.

Thanks!

@fasiha
Copy link
Owner

fasiha commented Jul 5, 2020

Wow super! Thank you for this!

A couple of questions: I am a total compete newbie at C# and .NET 😇, how can I run the test suite on macOS or Linux? Is there a single command I can run? Alternatively, I could download a Windows VirtualBox image from Microsoft, could you describe how to get the project to run in Windows?

I'm looking at your test script, any reason this one assertion is commented out? https://github.com/nikhildpardasani/Ebisu-CSharp/blob/af7b3c6c7fb2ca24b2f3b319a3668bfefcfe01a6/Ebisu/EbisuTest.cs#L87 If I recall, that assertion relies on the minimize function throwing an exception when it cannot meet the tolerance requirement, does that not happen? If I can get the tests to run, then I'll be happy to help debug how to enable that assertion 😊.

Thank you for your hard work! As soon as I resolve the above questions, I'll add a link to the Ebisu README.

@nikhildpardasani
Copy link
Author

Hi,

You can run the code on Mac using Visual Studio for Mac or Visual Studio Code. Visual Studio Code will be the easiest.
Here is the link for how to run Console App on Visual Studio Code here.

Regarding the assertion that is commented out. You are correct, minimise function throws an exception when it cannot meet the tolerance, but when I run the program that exception breaks the code and hence I have commented it. You can uncomment it and try, it will throw an exception at the right place. If you want me to add any comments there I can do that for the same.
Let me know for more queries.

Thanks,
Nikhil

@fasiha
Copy link
Owner

fasiha commented Jul 22, 2020

Many apologies for the delay.

Regarding the assertion that is commented out. You are correct, minimise function throws an exception when it cannot meet the tolerance, but when I run the program that exception breaks the code and hence I have commented it

So JUnit has a method assertThrows that takes a lambda and assets that it throws, which is how I test it in (link), is there an equivalent in NUnit? It looks like that's what you're doing in with Assert.Throws in the line that's commented out in https://github.com/nikhildpardasani/Ebisu-CSharp/blob/af7b3c6c7fb2ca24b2f3b319a3668bfefcfe01a6/Ebisu/EbisuTest.cs#L87?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants