ehrapy icon indicating copy to clipboard operation
ehrapy copied to clipboard

Some docstrings have typos or interfere with Sphinx

Open eroell opened this issue 1 year ago • 4 comments

Description of feature

Hey!

Some minor adjustments in the Docstrings might enhance user friendliness. As a word of caution, it appears that a : in the first line of the Return field might interfere with Sphinx formatting the Return Type. (See e.g. the doc for PCA and the probably guilty : at its Docstring)

As a general thought: might be possible to harmonize the Return field a bit.

A PR with some initial readability enhancements is on the way (opened this issue mainly to have an anchor for it to refer to), for a wider harmonization I'll get back to this issue soon :)

eroell avatar Oct 09 '23 15:10 eroell

Cool, thank you so much!

Oct 9, 2023 4:53:57 PM Eljas Roellin @.***>:

Description of feature

Hey!

Some minor adjustments in the Docstrings might enhance user friendliness. As a word of caution, it appears that a : in the first line of the Return field might interfere with Sphinx formatting the Return Type. (See e.g. the doc for PCA[https://ehrapy.readthedocs.io/en/latest/usage/preprocessing/ehrapy.preprocessing.pca.html#ehrapy.preprocessing.pca] and the probably guilty :[https://github.com/theislab/ehrapy/blob/ec54deddbe0bc5b2f8f7d1cb15fac8c2709124ee/ehrapy/preprocessing/_scanpy_pp_api.py#L56] at its Docstring)

As a general thought: might be possible to harmonize the Return field a bit.

A PR with some initial readability enhancements is on the way (opened this issue mainly to have an anchor for it to refer to), for a wider harmonization I'll get back to this issue soon :)

— Reply to this email directly, view it on GitHub[https://github.com/theislab/ehrapy/issues/598], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AFHQA2B3IOPCKE6ARHDNBUTX6QMZHAVCNFSM6AAAAAA5ZAPZ2OVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTGMZXGM4TMMY]. You are receiving this because you are subscribed to this thread. [Tracking image][https://github.com/notifications/beacon/AFHQA2GOOJNT6UHZOPQAILTX6QMZHA5CNFSM6AAAAAA5ZAPZ2OWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHGPHSBM.gif]

Zethson avatar Oct 09 '23 15:10 Zethson

As a general thought: might be possible to harmonize the Return field a bit.

What are your thoughts on this style? https://github.com/scverse/scanpy/issues/2741

Basically first a sentence prose, then within the prose a list describing which fields of the data object (AnnData) are updated in a somewhat ~consistent/readable (guess this can be a tradeoff sometimes) manner.

Some details about that style we discuss in the PR there.

eroell avatar Nov 16 '23 21:11 eroell

This would be excellent. I'd be very happy about this

Zethson avatar Nov 16 '23 22:11 Zethson

Will do - might take a bit (got quite some functions here 👍) & get back here with a PR :)

eroell avatar Nov 16 '23 22:11 eroell