From 866b0b6348dc6a052f41c76319e8b62b61cf915a Mon Sep 17 00:00:00 2001 From: Ben Parsons Date: Thu, 10 May 2018 16:02:55 +0100 Subject: [PATCH] I mostly play with ascii art --- scripts/proposals.py | 15 +++++--- specification/proposals_intro.rst | 64 ++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/scripts/proposals.py b/scripts/proposals.py index 62a94dba..075e3118 100644 --- a/scripts/proposals.py +++ b/scripts/proposals.py @@ -33,10 +33,10 @@ def getbylabel(label): return json # new status labels: -# labels = ['proposal-wip', 'proposal-ready-for-review', -# 'proposal-in-review', 'proposal-passed-review', -# 'spec-pr-ready-for-review', 'spec-pr-in-review', 'merged', 'stalled', 'rejected' ] -labels = ['p1', 'p2', 'p3', 'p4', 'p5'] +labels = ['proposal-wip', 'proposal-ready-for-review', + 'proposal-in-review', 'proposal-passed-review', + 'spec-pr-ready-for-review', 'spec-pr-in-review', 'merged', 'abandoned', 'rejected', 'blocked' ] +#labels = ['p1', 'p2', 'p3', 'p4', 'p5'] issues = {} for label in labels: @@ -49,6 +49,9 @@ text_file.write("Tables\n------------------\n\n") for label in labels: + if (len(issues[label]) == 0): + continue + text_file.write(label + "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n") text_file.write(".. list-table::\n :header-rows: 1\n :widths: auto\n :stub-columns: 1\n\n") text_file.write(" * - MSC\n") @@ -68,10 +71,10 @@ for label in labels: text_file.write(" - " + created.strftime('%Y-%m-%d') + "\n") updated = datetime.strptime(item['updated_at'], "%Y-%m-%dT%XZ") text_file.write(" - " + updated.strftime('%Y-%m-%d') + "\n") - maindoc = re.search('Documentation: (.+?)\n', str(item['body'])) + maindoc = re.search('^Documentation: (.+?)\n', str(item['body'])) if maindoc is not None: maindoc = maindoc.group(1) text_file.write(" - " + str(maindoc) + "\n") - author = re.search('Author: (.+?)\n', str(item['body'])) + author = re.search('^Author: (.+?)\n', str(item['body']), flags=re.MULTILINE) if author is not None: author = author.group(1) #if author is None: author = item['user']['login'] text_file.write(" - " + str(author) + "\n") diff --git a/specification/proposals_intro.rst b/specification/proposals_intro.rst index ebc43b9a..3f3f5caa 100644 --- a/specification/proposals_intro.rst +++ b/specification/proposals_intro.rst @@ -21,26 +21,44 @@ We use labels and some metadata in the issue text to generate this page. When ad :: - +----------+ +-------------------+ +-----------+ +---------------+ - | | | | | | | | - | Proposal +-----> Proposal +-----> Proposal +-----> Proposal +------+ - | WIP | | Ready for Review | | In Review | | Passed Review | | - | | | | | | | | | - +----------+ +-------------------+ +-----------+ +---------------+ | - | - +---------------------------------------------------------------------------------------+ - | - | +---------------------+ +-----------+ +-----------+ - | | | | | |-----------| - +--> Spec +-----> Spec PR | || || - | PR Ready for Review | | In Review +-----------------------> Merged || - | | | | || || - +---------------------+ +-+-------+-+ |-----------| - | | +-----------+ - +-------+ +--------+ - | | - +-----v----+ +-----v----+ - | | | | - | Stalled | | Rejected | - | | | | - +----------+ +----------+ + + + + Proposals | Spec PRs | Other States + +-------+ | +------+ | +----------+ + | | + | | + +----------+ | +------------------+ | +---------+ + | | | | | | | | + | Proposal | | +-> Spec PR | | | Blocked | + | WIP | | | | Ready for Review | | | | + | | | | | | | +---------+ + +----+-----+ | | +---------+--------+ | + | | | | | + | | | | | +-----------+ + +--------v----------+ | | +-----v-----+ | | | + | | | | | | | | Abandoned | + | Proposal | | | | Spec PR | | | | + | Ready for Review | | | | In Review | | +-----------+ + | | | | | | | + +----------+--------+ | | +-----+-----+ | +-----------+ + | | | | | | | + | | | | | | Obsolete | + +------v----+ | | | | | | + | | | | +-----------+ | +-----------+ + | Proposal | | | |-----v-----| | + | In Review | | | || || | + | | | | || Merged || | +----------+ + +----+------+ | | || || | | | + | | | |-----------| | | Rejected | + | | | +-----------+ | | | + +------v--------+ | | | +----------+ + | | | | | + | Proposal | | | | + | Passed Review | | | | + | | | | | + +-------+-------+ | | | + | | | | + | | | | + +---------------+ | + | | + + + +