8000 MNT refactor tests for datasets by glemaitre · Pull Request #17599 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

MNT refactor tests for datasets #17599

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

Merged
merged 3 commits into from
Jun 16, 2020

Conversation

glemaitre
Copy link
Member

refactor tests for the datasets module to:

  • parametrize the load_* functions
  • create common tests for: as_frame and return_X_y support.

@glemaitre
Copy link
Member Author

This is coming in support of PR implementing support for as_frame and ensuring basic type checking for the fetcher then.

@glemaitre
Copy link
Member Author

ping @thomasjpfan @rth @adrinjalali Since you were involved in those.

@glemaitre
Copy link
Member Author

@amueller was also involved :)

Copy link
Member
@TomDLT TomDLT left a comment

Choose a reason for hiding this comment

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

LGTM

)
def test_common_check_as_frame(name, dataset_func):
bunch = dataset_func()
check_as_frame(bunch, partial(dataset_func))
Copy link
Member

Choose a reason for hiding this comment

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

I am curious, what is the use of partial here ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right it does not seem to be useful. I'll remove it

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.

Nice!



def _has_network():
return bool(os.environ.get("SKLEARN_SKIP_NETWORK_TESTS", False))
Copy link
Member

Choose a reason for hiding this comment

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

related: #17553 by @thomasjpfan

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if you wanna merge as is or take that PR into account.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally, I would have like to merge it quickly to avoid redundant tests in the fetch_* PRs that are coming. I also want the PR of @thomasjpfan to get in because this is really useful but I think that the fix will be easy to handle even once merged.

@adrinjalali adrinjalali merged commit 129588c into scikit-learn:master Jun 16, 2020
rubywerman pushed a commit to MLH-Fellowship/scikit-learn that referenced this pull request Jun 24, 2020
* MNT refactor tests for datasets

* PEP8

* remove partial
viclafargue pushed a commit to viclafargue/scikit-learn that referenced this pull request Jun 26, 2020
* MNT refactor tests for datasets

* PEP8

* remove partial
jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
* MNT refactor tests for datasets

* PEP8

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

Successfully merging this pull request may close these issues.

3 participants
0