-
Notifications
You must be signed in to change notification settings - Fork 263
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
Refactor the static methods to functions in fingerprint #974
Comments
i've got the tests 1/2 written. so i'll be happy to do it. |
👍 Thanks :D |
i'll have this done in a day or so, but these tests might be worth revisiting once #885 is completed. as they rely on str(player). |
exactly! |
I'm just finishing something off and then I'll submit a PR for #885. Shouldn't take me long (famous last words). |
do you prefer the pulled out functions to be above or below the main class? if below, should create_points be pulled down below the main class too? |
I'd like to add |
I have no indication as to whether or not there's a best practice. I think if I was doing it I'd put it above...
Sounds sensible 👍 |
also will do typehinting as per #808 |
if it really is 6 of one, half a dozen of the other, i'll submit in a top-down style (main class, then supporting functions) and if it looks bad, it's just a matter of cut and paste |
any issue with removing the progress bar from
even on my god-awful, painfully slow, terrible linux machine a million points take 2 and 1 seconds. respectively. and that thing is slower than my 6-year-old samsung phone. |
I would like them to stay. They can always be turned off by a user. Let's keep this issue about simply moving the static methods out in to private functions and not change any functionality. |
@eric-s-s I think I caught a few of them in #972 (which is now in) but in general run the tests with |
btw - i move these lines out into a function to be able to explicitly test them. (and found a warning on unclosed file in the process.)
|
Nice! 👍 |
Although I wonder if that file needs to stay open? I expect that warning didn't happen when that file was being used directly in the test when it was part of the other method that actually wrote to it. If you are going to take that function out I think it needs a better name than |
Yes indeed (just checked) it's being closed properly by the tournament when used by it. Make sense that the warning would trigger when it's pulled out though. Let's try to stick to moving those static methods for this issue please. |
Closed by #984 |
There are 4 static methods in the fingerprint class. As they are methods they cannot be tested in isolation (you need to create the class first):
create_jossann
create_edges
generate_data
reshape_data
This issue would be to pull those methods out in to their own functions and adjust/isolate their tests.
The text was updated successfully, but these errors were encountered: