8000 Sphinx issue with autosummary · Issue #17771 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Sphinx issue with autosummary #17771

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
glemaitre opened this issue Jun 29, 2020 · 3 comments · Fixed by #17780
Closed

Sphinx issue with autosummary #17771

glemaitre opened this issue Jun 29, 2020 · 3 comments · Fixed by #17780

Comments

@glemaitre
Copy link
Member

@thomasjpfan By building the documentation from scratch I have the following issue:

ARNING: the custom_autosummary_new_suffix extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicit
WARNING: doing serial read
/home/glemaitre/Documents/packages/scikit-learn/doc/modules/classes.rst.rst:115: WARNING: autosummary: stub file not found 'sklearn.cluster.dbscan'. Check your autosummary_generate setting.
/home/glemaitre/Documents/packages/scikit-learn/doc/modules/classes.rst.rst:184: WARNING: autosummary: stub file not found 'sklearn.covariance.oas'. Check your autosummary_generate setting.
/home/glemaitre/Documents/packages/scikit-learn/doc/modules/classes.rst.rst:325: WARNING: autosummary: stub file not found 'sklearn.decomposition.fastica'. Check your autosummary_generate setting.
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/glemaitre/Documents/packages/scikit-learn/doc/modules/generated/sklearn.cluster.dbscan-lowercase.rst: WARNING: document isn't included in any toctree
/home/glemaitre/Documents/packages/scikit-learn/doc/modules/generated/sklearn.covariance.oas-lowercase.rst: WARNING: document isn't included in any toctree
/home/glemaitre/Documents/packages/scikit-learn/doc/modules/generated/sklearn.decomposition.fastica-lowercase.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
/home/glemaitre/Documents/packages/scikit-learn/doc/glossary.rst:502: WARNING: term Unlabeled data not found in case sensitive match.made a reference to unlabeled data instead.
/home/glemaitre/Documents/packages/scikit-learn/doc/glossary.rst:975: WARNING: term Estimator not found in case sensitive match.made a reference to estimator instead.
/home/glemaitre/Documents/packages/scikit-learn/doc/glossary.rst:1201: WARNING: term Transductive not found in case sensitive match.made a reference to transductive instead.
/home/glemaitre/Documents/packages/scikit-learn/doc/glossary.rst:1297: WARNING: term Multilabel not found in case sensitive match.made a reference to multilabel instead.

Since we are only reporting diff of change file, not all PRs are failing but the following is an example: #17743

In the PR there are no changes regarding fastica/oas.

@thomasjpfan
Copy link
Member

The glossary warnings is fixed in #13022

The autosummary issue is a little harder. We may need to revert #13022

Maybe #17564 would be okay if the files are generated on linux and it was possible to view it correctly on OSX.

@jnothman
Copy link
Member

I'd have thought the extension was parallel read safe... It does not rely on stored state across documents being processed. Its use of monkeypatching would not be safe, if os.path.join was shared across parallel jobs. But since the parallelism in Sphinx uses multiprocessing, shouldn't the monkeypatching be isolated within each process?

@thomasjpfan
Copy link
Member

I think it is still thread safe. It is still using the file system as the store of state. The monkeypatch to os.path.join changes the file it outputs by appending -lowercase to the end of the file only during the file generation process.

The error we are getting is that the -lowercase version is not begin explicit referenced in the docs, and autosummary itself is noticing that some of the files that it expected was not generated.

While developing the patch, I haven't figured out why the linking still worked. For example :func:cluster.dbscan is able to link to the dbscan-lowercase path.

@rth rth closed this as completed in #17780 Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0