The Wayback Machine - https://web.archive.org/web/20220305073036/https://github.com/scikit-learn/scikit-learn/pull/22603
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

Use :doi: and :arxiv: directives for references in the documentation (Issue #21088) #22603

Merged
merged 41 commits into from Mar 2, 2022

Conversation

JSchuerz
Copy link
Contributor

@JSchuerz JSchuerz commented Feb 24, 2022

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Towards #21088 I changed " https://arxiv.org/... " to " :arxiv:... " and " https://doi.org/... " to " :doi:... in the remaining files, wherethis has not yet been fixed.

Any other comments?

Copy link
Member

@cmarmo cmarmo left a comment

Thank you @JSchuerz for your pull request.
There is a lint error that should be fixed in order to allow the checks to run.

sklearn/semi_supervised/_self_training.py:122:89: E501 line too long (90 > 88 characters)

sklearn/decomposition/_pca.py Outdated Show resolved Hide resolved
sklearn/metrics/_classification.py Outdated Show resolved Hide resolved
sklearn/metrics/_classification.py Outdated Show resolved Hide resolved
doc/modules/semi_supervised.rst Show resolved Hide resolved
doc/modules/semi_supervised.rst Show resolved Hide resolved
sklearn/decomposition/_pca.py Outdated Show resolved Hide resolved
@cmarmo
Copy link
Member

@cmarmo cmarmo commented Feb 27, 2022

Thanks @JSchuerz, all checks are green now.
For consistency with the previous introduced arxiv directives you might want to write:

doi:`My title, year, and authors. <doi-number-and-ref>`

without underscore at the end.

Copy link
Member

@cmarmo cmarmo left a comment

Thanks @JSchuerz! I have some last comments.
Also, do you mind fixing the three DOI links in SpectralEmbedding?

- A Tutorial on Spectral Clustering, 2007
Ulrike von Luxburg
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.165.9323
- On Spectral Clustering: Analysis and an algorithm, 2001
Andrew Y. Ng, Michael I. Jordan, Yair Weiss
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.8100
- Normalized cuts and image segmentation, 2000
Jianbo Shi, Jitendra Malik
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.2324

Almost done!

sklearn/manifold/_spectral_embedding.py Outdated Show resolved Hide resolved
examples/inspection/plot_permutation_importance.py Outdated Show resolved Hide resolved
doc/modules/clustering.rst Outdated Show resolved Hide resolved
Copy link
Member

@cmarmo cmarmo left a comment

Hi @JSchuerz, please do not add too much files to this PR as this makes hard to review it.
I have made some comments, but a number of links are not working now because apparently some reviews use the parameter DOI but they are not really registering it in the standardized system, so the explicit links works, but not the sphinx DOI directive.
May I ask you to choose only some submodules to fix and check their rendering to verify if the links are correct? Then reduce your PR to them? Thank you very much for your understanding.

benchmarks/bench_covertype.py Show resolved Hide resolved
doc/modules/biclustering.rst Outdated Show resolved Hide resolved
doc/modules/biclustering.rst Outdated Show resolved Hide resolved
doc/modules/clustering.rst Outdated Show resolved Hide resolved
doc/modules/manifold.rst Outdated Show resolved Hide resolved
doc/modules/manifold.rst Outdated Show resolved Hide resolved
Copy link
Member

@cmarmo cmarmo left a comment

Thanks a lot @JSchuerz for your work. Indeed looking for Digital Identification Numbers on line is less straigthforward than I thought! :)
For your information you can check the DOIs at the official DOI page using the DOI resolver.

Please revert the following files, where no :doi: directive has been added

  • sklearn/manifold/_locally_linear.py
  • doc/modules/naive_bayes.rst

To do that you can run the command:

git checkout main <file-to-revert>

doc/modules/clustering.rst Outdated Show resolved Hide resolved
doc/modules/clustering.rst Outdated Show resolved Hide resolved
sklearn/metrics/_classification.py Outdated Show resolved Hide resolved
sklearn/manifold/_spectral_embedding.py Outdated Show resolved Hide resolved
doc/modules/sgd.rst Outdated Show resolved Hide resolved
doc/modules/sgd.rst Outdated Show resolved Hide resolved
@JSchuerz
Copy link
Contributor Author

@JSchuerz JSchuerz commented Mar 1, 2022

Thank you for referring me to the official DOI page. I checked all doi's and fixed them where necessary.
I also checked the rst files and made sure that the part of the reference which belongs to the link is consistent with the rest on the page.
If it is ok with you, I will not separate the PR?

@@ -563,7 +563,7 @@ graph, and SpectralClustering is initialized with `affinity='precomputed'`::

* :arxiv:`"Preconditioned Spectral Clustering for Stochastic
Block Partition Streaming Graph Challenge"
<1309.0238>`
<1708.07481>`
Copy link
Contributor Author

@JSchuerz JSchuerz Mar 1, 2022

Choose a reason for hiding this comment

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

The arxiv number was indeed wrong.

cmarmo
cmarmo approved these changes Mar 1, 2022
Copy link
Member

@cmarmo cmarmo left a comment

If it is ok with you, I will not separate the PR?

After all your work (and mine! ;) ) let's keep it in one PR.

There is one check failing. You can fix it in synchronizing with main, as described here

Thanks for your work!

@JSchuerz
Copy link
Contributor Author

@JSchuerz JSchuerz commented Mar 1, 2022

All done! Thank you for reviewing my work!!!!! :)
I found two more working doi's and fixed them.

Interestingly for http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.8100 and http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.70.382 'official' doi's can be found here https://dl.acm.org/doi/10.5555/2980539.2980649 and here https://dl.acm.org/doi/10.5555/2976456.2976656 respectively. However, they do not work for the doi resolver. Any ideas how to proceed here?

If not I believe Issue #21088 is now completely fixed.

@cmarmo
Copy link
Member

@cmarmo cmarmo commented Mar 1, 2022

Interestingly for http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.8100 and http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.70.382 'official' doi's can be found here https://dl.acm.org/doi/10.5555/2980539.2980649 and here https://dl.acm.org/doi/10.5555/2976456.2976656 respectively. However, they do not work for the doi resolver. Any ideas how to proceed here?

If the DOIs are not resolved by doi.org they will not be linked by the :doi: directive, so please, keep the current links as is.

Thanks for your work, now we have to wait for a core-dev approval. Please be patient. Thanks!

Copy link
Member

@jeremiedbb jeremiedbb left a comment

just a couple remarks, otherwise LGTM. Thanks @JSchuerz and @cmarmo !

Computational Linguistics, Stroudsburg, PA, USA, 189-196.
:doi:`doi:10.3115/981658.981684 <10.3115/981658.981684>`
Copy link
Member

@jeremiedbb jeremiedbb Mar 2, 2022

Choose a reason for hiding this comment

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

It would be nicer to put the link on the title of the paper

    .. [1] :doi:`"Unsupervised word sense disambiguation rivaling supervised methods"
       <10.3115/981658.981684>`
       David Yarowsky, Proceedings of the 33rd annual meeting on Association for
       Computational Linguistics (ACL '95). Association for Computational Linguistics,
       Stroudsburg, PA, USA, 189-196.

examples/inspection/plot_permutation_importance.py Outdated Show resolved Hide resolved
@JSchuerz
Copy link
Contributor Author

@JSchuerz JSchuerz commented Mar 2, 2022

All done!

@glemaitre glemaitre merged commit 4a52eb6 into scikit-learn:main Mar 2, 2022
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants