Sympy Document

97 views
Skip to first unread message

Mohit Shah

unread,
Jun 1, 2020, 4:34:33 PM6/1/20
to sympy
Hello everyone,
In Sympy Documentation, There is a section named "DocString sections".
I think there must be some changes. Like parameters must be before Examples section and after parameter section, we can add a section for returned value and then there should be example.

sympy.png

Any suggestion will be appreciated.
Thanks.

Aaron Meurer

unread,
Jun 1, 2020, 4:51:35 PM6/1/20
to sympy
I believe the order of the sections in the style guide was decided as part of last year's GSoD project, so before we make any changes we should reference those discussions.

Aaron Meurer

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/8559a780-caf1-4942-8ec8-23d8d811a84c%40googlegroups.com.
Message has been deleted

Mohit Shah

unread,
Jun 1, 2020, 5:49:43 PM6/1/20
to sympy
Sorry, But I didn't get you.
If we have to refer the older discussion, then can you provide link?

On Tuesday, June 2, 2020 at 2:21:35 AM UTC+5:30, Aaron Meurer wrote:
I believe the order of the sections in the style guide was decided as part of last year's GSoD project, so before we make any changes we should reference those discussions.

Aaron Meurer

On Mon, Jun 1, 2020 at 2:34 PM Mohit Shah <mohitsha...@gmail.com> wrote:
Hello everyone,
In Sympy Documentation, There is a section named "DocString sections".
I think there must be some changes. Like parameters must be before Examples section and after parameter section, we can add a section for returned value and then there should be example.

sympy.png

Any suggestion will be appreciated.
Thanks.

--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sy...@googlegroups.com.

Aaron Meurer

unread,
Jun 1, 2020, 7:47:22 PM6/1/20
to sympy
Here is the pull request that added the style guide, with lots of discussion https://github.com/sympy/sympy/pull/17715. There was also some discussion that happened on the mailing list https://groups.google.com/d/msg/sympy/JvcbdzbMN4g/981wq8B-BwAJ.

Aaron Meurer

To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/07e282a2-3903-4f9b-a4d5-17e0d7a48db7%40googlegroups.com.

Mohit Shah

unread,
Jun 2, 2020, 4:25:59 PM6/2/20
to sympy
Thanks for the link,
Can you tell me where we can put the "error" and "return" section in the docstring?

Aaron Meurer

unread,
Jun 2, 2020, 7:29:42 PM6/2/20
to sympy
I think the order you showed in your diagram is correct. They should go right after the parameters section.

Aaron Meurer

To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/09c51180-a3c6-47d7-9960-19ff10495e93%40googlegroups.com.

Mohit Shah

unread,
Jun 6, 2020, 11:58:58 AM6/6/20
to sympy
Hello,
how to format return statement in docstring.
In my previous PR which was merged, I make it as:

return-type :
    Brief explanation of what it is returning.

will it be okay or should I make some changes to this?

Nikhil Maan

unread,
Jun 6, 2020, 3:45:35 PM6/6/20
to sympy
We closely follow the Numpy docstring standard. You can check https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard for sections that are missing from our style guide. Although, we should add those sections to the style guide then.

It can be like you showed or it can be:

name : type
    Description

Regards,
Nikhil Maan

Mohit Shah

unread,
Jun 7, 2020, 3:30:02 AM6/7/20
to sympy
Thanks for the clearification.

Soumi7

unread,
Jun 19, 2020, 1:52:37 AM6/19/20
to sympy
Please provide a link to your PR that was merged.


On Saturday, June 6, 2020 at 9:28:58 PM UTC+5:30, Mohit Shah wrote:
Reply all
Reply to author
Forward
0 new messages