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

__init__.py files not included in documentation #46

Closed
kohr-h opened this issue Nov 18, 2015 · 9 comments
Closed

__init__.py files not included in documentation #46

kohr-h opened this issue Nov 18, 2015 · 9 comments
Assignees

Comments

@kohr-h
Copy link
Member

kohr-h commented Nov 18, 2015

The docstrings in the __init__.py files do not end up in the Sphinx documentation. I think they should, since they are a good place to put an introduction to the subpackage contents.

In contrast, I'd argue that one only writes a minimal docstring at the top of a module so that one does not have to scroll all the way down to see the code.

@adler-j
Copy link
Member

adler-j commented Nov 19, 2015

Added in above commit, is that OK?

@adler-j adler-j added the close? label Nov 19, 2015
@kohr-h
Copy link
Member Author

kohr-h commented Nov 19, 2015

The result looks correct, but what is it that makes __init__.py to be included?

@kohr-h
Copy link
Member Author

kohr-h commented Nov 19, 2015

Oh wait, now the private call() and _apply() are listed, too, see e.g. in the LinCombOperator.

@adler-j
Copy link
Member

adler-j commented Nov 19, 2015

The result looks correct, but what is it that makes __init__.py to be included?

The lines .. automodule:: odl.operator in the odl.operator style files

Oh wait, now the private call() and _apply() are listed, too, see e.g. in the LinCombOperator.

This has been the case for quite a while, its regulated here.

Thats because users tend to put some doc in there.

@kohr-h
Copy link
Member Author

kohr-h commented Nov 19, 2015

Alright. We should then probably add a line like

Do not use this method directly. Call ``operator(x)`` to evaluate the operator.

to the _call() methods of our operators, and similarly for _apply().

@adler-j
Copy link
Member

adler-j commented Nov 19, 2015

The best would be if the documentation of _call and _apply was somehow moved into the documentation of __call__ and the _call/_apply doc simply changed to

Do not use this method directly. Call ``operator(x)`` to evaluate the operator.

Maybe this could be done programmatically with some post processing script?

@kohr-h
Copy link
Member Author

kohr-h commented Nov 19, 2015

Interesting. I'll make a new issue so we can close this.

@kohr-h kohr-h closed this as completed Nov 19, 2015
@kohr-h kohr-h removed the close? label Nov 19, 2015
@adler-j
Copy link
Member

adler-j commented Nov 19, 2015

New issue on _call and _apply is #48.

@kohr-h
Copy link
Member Author

kohr-h commented Nov 19, 2015

Yeah, forgot to link back...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants