[IGSTK-Developers] Extracting requirements from the bug tracker to latex file
David Gobbi
dgobbi at atamai.com
Thu Jun 23 20:59:09 EDT 2005
Hi Andy,
The latex requirement document was discussed at the IGSTK t-con, and we
decided to move ahead with it. The python script just needs to be
completed so that it produces a complete latex document (see attached),
and so that it runs pdflatex to produce a .pdf file and then posts that
file somewhere on the web.
The pdf file could go into the nightly doxygen documentation, into the
nightly dashboard directory, or somewhere on the wiki.
If you can dedicate the time, there was also an interest in adding
section headings according to the attached taxonomy document. These
were not considered to be absolutely necessary, but would be a very nice
feature.
- David
Andy Cedilnik wrote:
>Hi All,
>
>Here is script that I can run every night. It produces the attached
>file. Let me know if the format is ok.
>
>Current problems:
>
>* Handle special characters
>* Do something with NEW_REQ_TEXT
>
>#!/usr/bin/env python
>
>import MySQLdb
>import sys
>
>HOST = '****'
>DATABASE = '****'
>USER = '****'
>PASSWORD = '****'
>
>
>sql = MySQLdb.connect(db=DATABASE, host=HOST, user=USER, passwd=PASSWORD)
>cursor = sql.cursor()
>cursor.execute("SELECT bug_id, title, description FROM phpbt_bug WHERE
>project_id = 10;")
>
>bugs = {}
>comments = {}
>
>while 1:
> res = cursor.fetchone()
> if not res:
> break
> if not bugs.has_key(res[1]):
> bugs[res[1]] = res
> else:
> print "Problem!! Found two bugs with the same requirement:\n%s\n%s"
>% (`res`, `bugs[res[1]]`)
> sys.exit(1)
> comments[res[1]] = []
>
>ks = bugs.keys()
>ks.sort()
>
>for a in ks:
> if a.startswith("REQ"):
> bug = bugs[a]
> print "\section{%s - %d}" % (a, bug[0])
> print "%s" % bug[2]
> print ""
> cursor.execute("SELECT comment_text FROM phpbt_comment WHERE bug_id
>= %d;" % bug[0])
> while 1:
> res = cursor.fetchone()
> if not res:
> break
> print res[0]
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: igstkRequirements2.tex
Type: application/x-tex
Size: 8397 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20050623/ee1be674/attachment.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: igstkRequirements2.pdf
Type: application/pdf
Size: 29018 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20050623/ee1be674/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: REQ-Taxonomy.pdf
Type: application/pdf
Size: 24189 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20050623/ee1be674/attachment-0001.pdf>
More information about the IGSTK-Developers
mailing list