Skip to content

DOC Link in warning about doc build with Sphinx versions outdated #26598

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

Closed
lucyleeow opened this issue Jun 18, 2023 · 11 comments · Fixed by #26610
Closed

DOC Link in warning about doc build with Sphinx versions outdated #26598

lucyleeow opened this issue Jun 18, 2023 · 11 comments · Fixed by #26610
Labels
Documentation Needs Triage Issue requires triage

Comments

@lucyleeow
Copy link
Member

lucyleeow commented Jun 18, 2023

Describe the issue linked to the documentation

The link in the warning about sphinx versions at the end of 'Building the documentation' is to a Github search that uses a now unrecognised qualifier. Also I think there has been a change in how dependencies in CI are dealt with now (original PR, #10685, adding this section is 6 years old) and even when the qualifier syntax is updated, that search no longer shows the circle CI sphinx version.

Suggest a potential alternative/fix

Could this link just be to the file build_tools/circle/doc_environment.yml ? Or link to github search for 'sphinx' within this file?

@lucyleeow lucyleeow added Documentation Needs Triage Issue requires triage labels Jun 18, 2023
@sqali
Copy link
Contributor

sqali commented Jun 18, 2023

Hi @lucyleeow ,

I would love to fix the issue. I am new to open source and looking for contributions. Kindly guide me so I can resolve this.

@rand0wn
Copy link
Contributor

rand0wn commented Jun 18, 2023

I was checking the script:

https://github.com/scikit-learn/scikit-learn/blob/20be4dfb50e015ca62c11bc3f4c73ffe4d74c36f/build_tools/update_environments_and_lock_files.py

Which says "Environments are conda environment.yml", also in

https://github.com/scikit-learn/scikit-learn/blob/20be4dfb50e015ca62c11bc3f4c73ffe4d74c36f/build_tools/circle/push_doc.sh

Says

#!/bin/bash
# This script is meant to be called in the "deploy" step defined in
# circle.yml. See https://circleci.com/docs/ for more details.
# The behavior of the script is controlled by environment variable defined
# in the circle.yml in the top level folder of the project.

"circle.yml", Which also does not exist

So this could have been changed to the whole new file update_environments_and_lock_files.py

In that case both documentation should be changed.

Thoughts @glemaitre @adrinjalali

@Charlie-XIAO
Copy link
Contributor

Could this link just be to the file build_tools/circle/doc_environment.yml ? Or link to github search for 'sphinx' within this file?

From what I've seen, SPHINX_VERSION is "min", so that we should look up in sklearn/_min_dependencies.py. I suppose that the search can be like this, which gives

image

@lucyleeow lucyleeow changed the title DOC Link in warning about outdated DOC Link in warning about doc build with Sphinx versions outdated Jun 19, 2023
@lucyleeow
Copy link
Member Author

Thanks for all the interest.

@Charlie-XIAO the warning reads:

While we do our best to have the documentation build under as many versions of Sphinx as possible, the different versions tend to behave slightly differently. To get the best results, you should use the same version as the one we used on CircleCI. Look at this github search to know the exact version.

We do not want the min dependency version of Sphinx, we want the version of Sphinx used by CircleCI to build the documentation for scikit-learn (this is also the documentation that can be viewed in doc PRs, see: https://scikit-learn.org/dev/developers/contributing.html#generated-documentation-on-github-actions and for more info on CI see: https://scikit-learn.org/dev/developers/contributing.html#continuous-integration-ci)

It's probably best to wait for a core-dev to suggest the best alternative link.

@Charlie-XIAO
Copy link
Contributor

Charlie-XIAO commented Jun 19, 2023

@lucyleeow My bad, thanks for reminding me. I was looking back a few commits when the CircleCI build was still using get_dep sphinx min which looks for the min version specified in _min_dependencies.py. For the current version, I think we should look up in this GitHub search link, which shows

image

@lucyleeow
Copy link
Member Author

This search can be confusing because it shows both the min dependency (not what we want) and the version of sphinx that is used to build docs.

I would suggest either:

Could this link just be to the file build_tools/circle/doc_environment.yml ? Or link to github search for 'sphinx' within this file?

Making it a link directly to the file seems cleaner but the search gives you what you are looking for quicker.

Again, probably best to wait for a core-dev to chime in, thank you for your patience.

@Charlie-XIAO
Copy link
Contributor

Charlie-XIAO commented Jun 19, 2023

Sorry about that @lucyleeow, I didn't see that you have already found that file. I will close my PR in favor of your earlier investigation.

@lucyleeow
Copy link
Member Author

I think the issue @rand0wn raised is different from this one, and they did not open a PR. I will open another issue about this.

I think you can keep your PR open and just amend when we know the best alternative link.

@Charlie-XIAO
Copy link
Contributor

Charlie-XIAO commented Jun 19, 2023

@lucyleeow I @ the wrong person previously 😂 (now fixed), it should be in favor of your earlier investigation. Sorry for the confusion.

@lucyleeow
Copy link
Member Author

No problem, happy for you to take this issue.

@betatim
Copy link
Member

betatim commented Jun 19, 2023

Thanks for spotting this!

I like the suggestion of using https://github.com/search?q=repo%3Ascikit-learn%2Fscikit-learn+sphinx+path%3Abuild_tools%2Fcircle%2Fdoc_environment.yml&type=code (a search for "sphinx" inside the specific file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Needs Triage Issue requires triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants