-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Improvements to developer documentation #23551
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
Conversation
Added Windows case in virtualenv activation
Added a check recommendation in the build project command
Added reference to github ssh key association. That is necessary to run git@github:YourLogin commands.
Since I forgot to run the
Should I run the |
Your changes mostly make sense but they may need some tweaking. To suggest more precise changes I may need to have a closer look at the documentation to remind myself how it is organised:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
Be sure to be in the folder of the scikit-learn repository before run the above command, | ||
otherwise you will face errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few steps above this one, we have:
scikit-learn/doc/developers/advanced_installation.rst
Lines 50 to 51 in a4a53ea
git clone git://github.com/scikit-learn/scikit-learn.git # add --depth 1 if your connection is slow | |
cd scikit-learn |
which says to go into the directory. Do you think users will run into this issue here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be. Actually, after I first cloned the repository I went directly to the next step and didn't notice that there was also to do the cd after the clone (that it's also obvious after all). I think that a friendly reminder here it's well accepted :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I prefer have another step after cloning that says "navigate to the scikit-learn directory". Would that help you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that will be clearer and less prone to missing the passage
In order to run the above clone command you should have an SSH key to connect to your GitHub account. | ||
Please refer to `this guide <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent>`_ if you hadn't set it yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think cloning public repos require any authentication. But to push to a fork, it does require authentication. I think this is point big enough to be it's own item.
Not that at one point I was thinking of changing the instructions to use git clone with https.
@lesteve I think following: https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git with https is easier to follow compare to setting up ssh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the command we currently have in our doc, you do need SSH keys setup for cloning a public repo. For example this fails for me since I don't have SSH keys setup:
git clone git@github.com:scikit-learn/scikit-learn.git
Which one of the two sections would you advise, the gh
CLI or the Git Credential Manager one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed now that there's also a mismatch in the two documents here discussed. In contributing.rst
the clone is performed using ssh, as pointed out by @lesteve:
scikit-learn/doc/developers/contributing.rst
Lines 247 to 248 in 559533e
git clone git@github.com:YourLogin/scikit-learn.git # add --depth 1 if your connection is slow | |
cd scikit-learn |
while in advanced_installation.rst
, is made using git protocol:
scikit-learn/doc/developers/advanced_installation.rst
Lines 50 to 51 in a4a53ea
git clone git://github.com/scikit-learn/scikit-learn.git # add --depth 1 if your connection is slow | |
cd scikit-learn |
That also could run into issues if you are in a network restricted by a firewall. I think that it's better to rethink the documentation using the https connection, which is easier to manage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To move this PR forward, lets revert this line about ssh keys so we can move forward with the other improvements.
We can work on authentication in a follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since when git clone
was first introduced in the advanced_installation.rst
through #10698 , it was included as it is now via the git protocol. So I will add a commit soon changing it to ssh in order to have consistency throughout these docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I will add a commit soon changing it to ssh in order to have consistency throughout these docs.
I prefer not block this PR with the discussion around git+ssh. The Windows specific information and the changing directories is already an improvement to the instructions.
To clarify, I am suggesting to work on git+ssh instructions in a separate PR after this one gets merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, got it
Just a guess: I think those problems were fixed in other PRs, because at least in the two recent PRs about documentation for developers to contribute ( #31202 and #31173) I did not find this problem. @Eschivo, @thomasjpfan , @lesteve could you give a look if this Issue is still open or these modifications are still needed? |
Thanks @vitorpohlenz let's close this one since unfortunately it hasn't been inactive for a while and it has conflicts. Quickly looking at it using I would not recommend working on the |
@lesteve, about In this tutorial they have examples for Windows, Unix, and MacOs |
Improvements to developer documentation:
advanced_installation.rst
:contributing.rst
: