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

Sphinx apidocs: fix crosslink issues, polish rx.Observable #419

Merged
merged 5 commits into from Jun 7, 2019

Conversation

erikkemperman
Copy link
Collaborator

So finally, after much annoyance and dead ends, I think I have figured out why the cross-links in the sphinx-generated apidocs were not working

  • It obviously only works for classes / methods and so on which we document -- so for instance everything in rx.core.typing would never be linked because we weren't refering this module in any rst file.
  • There is an issue with re-exporting modules, like is being done for the Observable class -- this lives in rx.Observable, and is referred to as such in e.g. the docstrings in rx/__init__.py, but actually it has a fully qualified name of rx.core.observable.observable.Observable. This confuses the sphinx typehints plugin.

The bad news is that this is a bit hackish (only in docs/conf.py, not in the main code!) but the good news is that if I read this issue correctly some future version will support what I am doing here manually:

https://github.com/agronholm/sphinx-autodoc-typehints/issues/38

I've polished the Observable section a bit, and am planning to do the same for Observable Factory next.

@coveralls
Copy link

coveralls commented Jun 5, 2019

Coverage Status

Coverage increased (+0.001%) to 92.608% when pulling 0d3c3ed on erikkemperman:docs-polish into 862f3cb on ReactiveX:master.

.bumpversion.cfg Outdated Show resolved Hide resolved
@erikkemperman erikkemperman merged commit 26d9a3d into ReactiveX:master Jun 7, 2019
@erikkemperman erikkemperman deleted the docs-polish branch June 7, 2019 10:22
@erikkemperman
Copy link
Collaborator Author

Thanks for review!

I think the Observables page is in reasonably good shape, but if you have some time please take a look -- the more eyes go over it the less likely it'll be that imperfections fall through the cracks. In particular, it would be helpful if you could be on the lookout for parameter and return value types which are not properly linked internally.

(Just rebased to resolve a conflict, the "copyright" I removed was now in a different file. Otherwise no changes).

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 this pull request may close these issues.

None yet

4 participants