[ 
https://issues.apache.org/jira/browse/HADOOP-12277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14733816#comment-14733816
 ] 

Kengo Seki commented on HADOOP-12277:
-------------------------------------

Small nits:

* 02.patch introduces 4 new pylint warnings. The first two should be fixed. I 
think the last two are ignorable because the source looks simple enough.

{code}
[sekikn@mobile hadoop]$ cat 
/private/tmp/test-patch-yetus/10595/diff-patch-pylint.txt
dev-support/releasedocmaker.py:106: [C0326(bad-whitespace), ] Exactly one space 
required after comma
    versions.sort(key=LooseVersion,reverse=True)
                                  ^
dev-support/releasedocmaker.py:119: [C0326(bad-whitespace), ] Exactly one space 
required after comma
    versions.sort(key=LooseVersion,reverse=True)
                                  ^
dev-support/releasedocmaker.py:117: [C0111(missing-docstring), buildreadme] 
Missing function docstring
dev-support/releasedocmaker.py:395: [R0915(too-many-statements), main] Too many 
statements (146/50)
{code}

* {{indexfile.close()}} after with statement is probably omittable.

{code}
104 def buildindex(title, asf_license):
105     versions = glob("[0-9]*.[0-9]*.[0-9]*")
106     versions.sort(key=LooseVersion,reverse=True)
107     with open("index.md", "w") as indexfile:
108         if asf_license is True:
109             indexfile.write(ASF_LICENSE)
110         for version in versions:
111             indexfile.write("* %s v%s\n" % (title, version))
112             for k in ("Changes", "Release Notes"):
113                 indexfile.write("    * [%s](%s/%s.%s.html)\n" \
114                     % (k, version, k.upper().replace(" ", ""), version))
115     indexfile.close()
116 
117 def buildreadme(title, asf_license):
118     versions = glob("[0-9]*.[0-9]*.[0-9]*")
119     versions.sort(key=LooseVersion,reverse=True)
120     with open("README.md", "w") as indexfile:
121         if asf_license is True:
122             indexfile.write(ASF_LICENSE)
123         for version in versions:
124             indexfile.write("* %s v%s\n" % (title, version))
125             for k in ("Changes", "Release Notes"):
126                 indexfile.write("    * [%s](%s/%s.%s.md)\n" \
127                     % (k, version, k.upper().replace(" ", ""), version))
128     indexfile.close()
{code}

Otherwise, +1 non-binding.

> releasedocmaker index mode should create a readme.md in addition to a index.md
> ------------------------------------------------------------------------------
>
>                 Key: HADOOP-12277
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12277
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: yetus
>    Affects Versions: HADOOP-12111
>            Reporter: Allen Wittenauer
>            Assignee: Allen Wittenauer
>            Priority: Minor
>         Attachments: HADOOP-12277.HADOOP-12111.00.patch, 
> HADOOP-12277.HADOOP-12111.01.patch, HADOOP-12277.HADOOP-12111.02.patch
>
>
> The content should be the same, however, rather than a mvn site-compatible 
> links, it should be github-compatible markdown links.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to