8000 DOC add docstring example for clear_data_home and fetch_covtype by Dutta-SD · Pull Request #28027 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC add docstring example for clear_data_home and fetch_covtype #28027

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 8 commits into from
Jan 12, 2024

Conversation

Dutta-SD
Copy link
Contributor

Reference Issues/PRs

#27982

What does this implement/fix? Explain your changes.

  • Added Usage example in Docstring for sklearn.datasets.clear_data_home()
  • Added Usage example in Docstring for sklearn.datasets.fetch_covtype()

Any other comments?

  • Formatted with Black
  • Tested with PyTest

Copy link
github-actions bot commented Dec 27, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 18ee950. Link to the linter CI: here

@Dutta-SD Dutta-SD changed the title Feat: DocString Examples for sklearn/datasets DOC Examples for 2 sklearn/datasets functions Dec 27, 2023
@glemaitre glemaitre self-requested a review January 12, 2024 10:50
Copy link
Member
@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

Documenting the fetcher is a bit tricky: if we don't have access to internet then we don't want to run the test.

I modified the conftest to have the right behaviour. I also skip the testing of the clear_data_home because we don't want to run it (it will remove the cache when we test and I don't want to make a complex example with temporary directory).

@glemaitre glemaitre changed the title DOC Examples for 2 sklearn/datasets functions DOC add docstring example for clear_data_home and fetch_covtype Jan 12, 2024
@Dutta-SD
Copy link
Contributor Author

Hi Thank you for your time! I am new and not sure what should I do now? Is this PR approved and will it be merged? Should I make some further changes?

@Charlie-XIAO
Copy link
Contributor
Charlie-XIAO commented Jan 12, 2024

@Dutta-SD CI is green now and you've already got one approval. I think for now you just need to wait for one more approval from maintainers before the PR can be merged.

@glemaitre
Copy link
Member

Yep, everything is good here. We will enable auto-merge. Since it was tricky regarding the network skipping, we pushed into your PR. Usually, we instead request changes in which case, you need to address and push the changes into your remote branch.

Thanks @Dutta-SD for contributing.

@glemaitre glemaitre enabled auto-merge (squash) January 12, 2024 14:59
@glemaitre glemaitre merged commit b05b509 into scikit-learn:main Jan 12, 2024
@Dutta-SD
Copy link
Contributor Author

Hey, thank you so much for guiding me!

@@ -85,6 +85,11 @@ def clear_data_home(data_home=None):
data_home : str or path-like, default=None
The path to scikit-learn data directory. If `None`, the default path
is `~/scikit_learn_data`.

Examples
----------
Copy link
Contributor

Choose a reason for hiding this comment

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

Though the PR has already been merged I think it's worth mentioning that the underline length is wrong, causing numpydoc to raise warning during doc build.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch. I will make a quick PR. Thanks.

jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jan 17, 2024
…it-learn#28027)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
jeremiedbb pushed a commit that referenced this pull request Jan 17, 2024
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Feb 10, 2024
…it-learn#28027)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
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.

4 participants
0