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

Refactor KMedoids #140

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

chkoar
Copy link
Member

@chkoar chkoar commented Apr 9, 2022

I tried to reduce the cyclomatic complexity in k medoids.
During refactoring I realized that we are testing private methods. Why is that?

So, the tests in the private methods are failing. What should we do?
Make the methods public, document and test them or just remove the tests by replace them with behavior testing on public methods?

I think that tests could be improved in general.

@chkoar chkoar requested review from rth and TimotheeMathieu April 9, 2022 16:50
@chkoar chkoar changed the title Refactor KMedoids [WIP] Refactor KMedoids Apr 9, 2022
@chkoar chkoar marked this pull request as draft April 9, 2022 16:51
@chkoar chkoar changed the title [WIP] Refactor KMedoids Refactor KMedoids Apr 9, 2022
Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the tests in the private methods are failing. What should we do?

That's quite normal. We should be testing everything in the library, and sometimes it's easier to test smaller parts of the code which sometimes happen to be private.

rev: 20.8b1
rev: 22.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this change, but it should be a separate PR :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True.

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

Successfully merging this pull request may close these issues.

2 participants