DOC Improvements to developer documentation#23551
DOC Improvements to developer documentation#23551Eschivo wants to merge 3 commits intoscikit-learn:mainfrom
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:
|
| 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.
A few steps above this one, we have:
scikit-learn/doc/developers/advanced_installation.rst
Lines 50 to 51 in a4a53ea
which says to go into the directory. Do you think users will run into this issue here?
There was a problem hiding this comment.
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.
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.
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 10000 ://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.
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.
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.
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
while in advanced_installation.rst, is made using git protocol:
scikit-learn/doc/developers/advanced_installation.rst
Lines 50 to 51 in a4a53ea
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.
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.
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.
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.
|
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: