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

Make sure both class and __init__ docstring are included #418

Merged
merged 1 commit into from
Jun 5, 2019

Conversation

erikkemperman
Copy link
Collaborator

As mentioned in #270 (comment).

By the way, I'm getting warnings about the guzzle theme, it appears they're using an outdated means of injecting script. I've created an issue.

Also, as part of the "final pass" of the docs, I think it would be good to change references to classes and methods using the appropriate markup, this will render them properly and link where possible.

And speaking about links, I will see if I can get the cross-links to work for function parameter types, today. I think that would be a great improvement, but maybe that's just me...

@coveralls
Copy link

coveralls commented Jun 4, 2019

Coverage Status

Coverage remained the same at 92.607% when pulling f48c6c9 on erikkemperman:docstring-init into 7edf352 on ReactiveX:master.

@MainRo
Copy link
Collaborator

MainRo commented Jun 4, 2019

Also, as part of the "final pass" of the docs, I think it would be good to change references to classes and methods using the appropriate markup, this will render them properly and link where possible.

Sure. I thought I used the correct syntax (I did not find another way to do it). If this is not correct let's fix it.

@erikkemperman
Copy link
Collaborator Author

erikkemperman commented Jun 4, 2019

I thought I used the correct syntax

It's something like :class:`MyClass` I think, although it would sometimes need package prefix as well. I'm not saying it was done incorrectly, by the way, just that I notice some class names and functions which are not yet annotated this way.

I tried again to make the cross-linking work for function arguments and return types, but I guess I simply don't understand why the sphinx-apidoc-generated .rst files work and the manual ones that we have currently don't work.

So, I don't know how to resolve this... Well, I'm assuming that we don't want to throw away all the manually organized rst files in favour of a boring tree like this:

Screenshot from 2019-06-04 13-02-35

@erikkemperman
Copy link
Collaborator Author

Actually, on second thought... In addition to __init__, perhaps all dunderscore methods ought to be included, if docstrings are provided?

# Include a separate entry for special methods, like __init__, where provided.
autodoc_default_options = {
    'member-order': 'bysource',
    'special-members': True,
    'exclude-members': '__dict__,__weakref__'
}

@erikkemperman
Copy link
Collaborator Author

erikkemperman commented Jun 4, 2019

@MainRo Yes I guess I would like all dunderscore methods, when docstrings are provided, to be included by sphinx. I've amended this PR, but since it changed after you approved it, maybe you want to reconsider or reaffirm?

@erikkemperman
Copy link
Collaborator Author

Thanks!

@erikkemperman erikkemperman merged commit 1e8c170 into ReactiveX:master Jun 5, 2019
@erikkemperman erikkemperman deleted the docstring-init branch June 5, 2019 08:28
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.

4 participants