From commits-return-11730-archive-asf-public=cust-asf.ponee.io@poi.apache.org Thu Oct 18 16:39:12 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9E39418064E for ; Thu, 18 Oct 2018 16:39:11 +0200 (CEST) Received: (qmail 79326 invoked by uid 500); 18 Oct 2018 14:39:10 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 79317 invoked by uid 99); 18 Oct 2018 14:39:10 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2018 14:39:10 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 0BE7F3A006D for ; Thu, 18 Oct 2018 14:39:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1844249 - in /poi/site: README.txt src/documentation/content/xdocs/status.copy_module_from_bugzilla.py Date: Thu, 18 Oct 2018 14:39:09 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20181018143910.0BE7F3A006D@svn01-us-west.apache.org> Author: nick Date: Thu Oct 18 14:39:09 2018 New Revision: 1844249 URL: http://svn.apache.org/viewvc?rev=1844249&view=rev Log: Have the status generator say more what it is doing, and more in the readme on how (I think...) to use it Modified: poi/site/README.txt poi/site/src/documentation/content/xdocs/status.copy_module_from_bugzilla.py Modified: poi/site/README.txt URL: http://svn.apache.org/viewvc/poi/site/README.txt?rev=1844249&r1=1844248&r2=1844249&view=diff ============================================================================== --- poi/site/README.txt (original) +++ poi/site/README.txt Thu Oct 18 14:39:09 2018 @@ -18,8 +18,10 @@ To generate the site for POI: 4. modify documentation files in ./src -5. fetch the changelog from Bugzilla - TODO More details on how to do this! +5. fetch the changelog from Bugzilla, and merge this with the changes file + cd src/documentation/content/xdocs + python3 status.copy_module_from_bugzilla.py changes.xml status.xml + TODO Is this fully correct? 6. run "ant site" - it will generate the complete web site To build only javadocs run "ant javadocs" Modified: poi/site/src/documentation/content/xdocs/status.copy_module_from_bugzilla.py URL: http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.copy_module_from_bugzilla.py?rev=1844249&r1=1844248&r2=1844249&view=diff ============================================================================== --- poi/site/src/documentation/content/xdocs/status.copy_module_from_bugzilla.py (original) +++ poi/site/src/documentation/content/xdocs/status.copy_module_from_bugzilla.py Thu Oct 18 14:39:09 2018 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more @@ -23,7 +23,8 @@ It'd be far better to have Forrest look Hopefully this is a one time effort If a closed bug's component is changed in Bugzilla, this script could be used to keep the changelog in sync. -requires Python 2.7 or 3.1+ +requires Python 3.1+ +(Python 2.x doesn't do Unicode in CSVs nicely) """ import csv, io @@ -36,6 +37,7 @@ def get_fixesbug_attr(line): return bugs def get_bugzilla_bug_to_component(): + print("Fetching details of POI bugs, please wait...") bugzilla_bug_to_component = {} r = requests.get('https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__all__&limit=0&no_redirect=1&product=POI&query_format=advanced&ctype=csv&human=1') with io.StringIO(r.text) as f: @@ -58,7 +60,9 @@ def add_module_frombugzilla_attr(line): line is a string, containing the opening tag """ global bugzilla_bug_to_component - assert 'module' not in line + assert 'module' not in line, \ + "Invalid action line, should not already contain module: %s" % line + bugs = [x.strip() for x in get_fixesbug_attr(line).split(',')] modules = filter(bool, [bugzilla_bug_to_component.get(bug) for bug in bugs]) module_frombugzilla = ','.join(unique(modules)) @@ -66,6 +70,7 @@ def add_module_frombugzilla_attr(line): return line_with_module_frombugzilla def add_module_attribute(inputfile, outputfile): + print("Generating %s from %s and Bugzilla details"%(outputfile,inputfile)) with open(inputfile, 'r') as infile, open(outputfile, 'w') as outfile: for line in infile: if '