sphinx-automodapi icon indicating copy to clipboard operation
sphinx-automodapi copied to clipboard

Add an option to emit warnings if public objects don't have a docstring

Open astrofrog opened this issue 7 years ago • 3 comments

As originally mentioned in https://github.com/astropy/astropy-helpers/issues/195, it might be useful to have a way to be strict about requiring public functions, methods, and classes to have docstrings, so that we don't end up with empty docstrings in the API docs generated by sphinx-automodapi.

astrofrog avatar Feb 21 '18 10:02 astrofrog

I think this can be easily resolved by adding a docstring checker run to the CI matrix. E.g. pydocstyle has error codes for missing public API docstrings.

We can start experimenting with it by allowing it to fail.

bsipocz avatar Feb 21 '18 12:02 bsipocz

@bsipocz - good idea - do you think it would still be worth checking this in this extension anyway? (it would only require a few lines of code to add such an option)

astrofrog avatar Feb 21 '18 12:02 astrofrog

I would rather use an established and widely(?) used external tool for this than maintaining out own (or at least try some of them before shipping our own). But it's your call as sphinx-automodapi maintainer.

bsipocz avatar Feb 21 '18 12:02 bsipocz