You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Carlos Valiente (JIRA)" <ji...@apache.org> on 2009/01/20 21:03:02 UTC

[jira] Created: (THRIFT-282) Emit Python docstrings

Emit Python docstrings
----------------------

                 Key: THRIFT-282
                 URL: https://issues.apache.org/jira/browse/THRIFT-282
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (Python)
    Affects Versions: 0.1
            Reporter: Carlos Valiente
            Priority: Trivial
             Fix For: 0.1


This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-282) Emit Python docstrings

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss updated THRIFT-282:
-------------------------------

    Attachment: 0002-THRIFT-282.-Generate-doccstrings-for-Python-classes.patch
                0001-THRIFT-282.-Move-generate_docstring_comment-to-t_gen.patch

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-282.-Move-generate_docstring_comment-to-t_gen.patch, 0002-THRIFT-282.-Generate-doccstrings-for-Python-classes.patch, THRIFT-282.diff, THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-282) Emit Python docstrings

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss resolved THRIFT-282.
--------------------------------

    Resolution: Fixed
      Assignee: Carlos Valiente

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Assignee: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-282.-Move-generate_docstring_comment-to-t_gen.patch, 0002-THRIFT-282.-Generate-doccstrings-for-Python-classes.patch, THRIFT-282.diff, THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-282) Emit Python docstrings

Posted by "Carlos Valiente (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689390#action_12689390 ] 

Carlos Valiente commented on THRIFT-282:
----------------------------------------

bq.What do you think of this version?

Much better than mine, David. Perhaps we could emit the function docstrings in the interface *and* in the client --- they do belong in the interface, and it's the client class what users will be using.

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-282.-Move-generate_docstring_comment-to-t_gen.patch, 0002-THRIFT-282.-Generate-doccstrings-for-Python-classes.patch, THRIFT-282.diff, THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-282) Emit Python docstrings

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689305#action_12689305 ] 

David Reiss commented on THRIFT-282:
------------------------------------

What do you think of this version?  I broke it into two patches, eliminated some copy/paste code, and moved the function docs from the client to the interface.

Oh, by the way, awesome patch.

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-282.-Move-generate_docstring_comment-to-t_gen.patch, 0002-THRIFT-282.-Generate-doccstrings-for-Python-classes.patch, THRIFT-282.diff, THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-282) Emit Python docstrings

Posted by "Carlos Valiente (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlos Valiente updated THRIFT-282:
-----------------------------------

    Attachment: THRIFT-282.diff

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-282) Emit Python docstrings

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674376#action_12674376 ] 

David Reiss commented on THRIFT-282:
------------------------------------

It looks like you're not putting newlines between each attribute if they don't have doc text.  There is at least one other similar bug (for functions).

Also, it looks like you don't generate a doctext for structures if individual fields have doctext, but the structure does not.  Is this intentional?

Why do you sort the fields by key instead of leaving them in IDL order?

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-282) Emit Python docstrings

Posted by "Carlos Valiente (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlos Valiente updated THRIFT-282:
-----------------------------------

    Attachment: THRIFT-282.diff

bq.It looks like you're not putting newlines between each attribute if they don't have doc text. There is at least one other similar bug (for functions).

Fixed.

bq.Also, it looks like you don't generate a doctext for structures if individual fields have doctext, but the structure does not. Is this intentional?

Fixed (both for structures and functions).

bq.Why do you sort the fields by key instead of leaving them in IDL order?

I thought it made it easier to read the documentation. I've reverted that in the new patch: After all, there are probably not that many fields in an average struct definition.

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: THRIFT-282.diff, THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-282) Emit Python docstrings

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689397#action_12689397 ] 

David Reiss commented on THRIFT-282:
------------------------------------

I'm not thrilled about the duplication, but I guess it is not a big deal.

> Emit Python docstrings
> ----------------------
>
>                 Key: THRIFT-282
>                 URL: https://issues.apache.org/jira/browse/THRIFT-282
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python)
>    Affects Versions: 0.1
>            Reporter: Carlos Valiente
>            Priority: Trivial
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-282.-Move-generate_docstring_comment-to-t_gen.patch, 0002-THRIFT-282.-Generate-doccstrings-for-Python-classes.patch, THRIFT-282.diff, THRIFT-282.diff
>
>
> This patch makes the Python compiler emit docstrings for Thrift structs, enums, services and service methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.