Extended release goals info in YAML
Hi,
Inspired by #647258 I am proposing that YAMLize our current goals.txt[1]
and extend it a bit. I have attached a sample file of how the revised
file would look, the "API" of the file and a little prototype python
script that can extract the BTS information from this format.
If there are already tools parsing the current goals.txt, then I suggest
we (read: I) write a script to generate goals.txt from goals.yaml. This
should save us from manually having to keep the two files in sync.
~Niels
[1] http://release.debian.org/wheezy/goals.txt
#!/usr/bin/python
import sys
import yaml
def main(argv):
stream = open(argv[0])
data = yaml.safe_load(stream)
for goal in data['release-goals']:
if not 'state' in goal or goal['state'] != 'accepted':
continue
if 'bugs' in goal and 'user' in goal['bugs']:
user = goal['bugs']['user']
tags = goal['bugs']['usertags']
print "%s || %s || %s" % (goal['name'], user, ' '.join(tags))
if __name__ == "__main__":
main(sys.argv[1:])
##
# This file lists the current release goals for Wheezy and additional candidates
# which may become a release goal in the future.
#
# The criteria for release goals are described at:
# http://wiki.debian.org/ReleaseGoals
#
# The file has been in YAML to make is both human readable and
# machine-parsable. The (machine) API for the document is described
# in goals.yaml.api.
#
# NB: This is a *SUBSET* of the current goals
##
codename: Wheezy
last-updated: 2011-11-01 21:00:00 +0000
release-goals:
- name: Multi-arch
advocates: [Steve Langasek]
state: accepted
wiki: http://wiki.debian.org/ReleaseGoals/MultiArch
- name: kFreeBSD
advocates: [Aurelien Jarno, Cyril Brulebois]
state: accepted
wiki: http://wiki.debian.org/ReleaseGoals/kFreeBSD
- name: LA File Removal
advocates: [Andreas Barth]
state: accepted
wiki: http://wiki.debian.org/ReleaseGoals/LAFileRemoval
bugs:
user: codehelp@debian.org
usertags: [la-file-removal]
- name: "/run directory"
advocates: [Roger Leigh]
state: accepted
wiki: http://wiki.debian.org/ReleaseGoals/RunDirectory
bugs:
user: rleigh@debian.org
usertags: [run-transition]
# * perl * (actually pod)
=head1 NAME
goals.yaml - Release goal data
=head1 SYNOPSIS
This document describes the format of the machine parsable release
goals file, "goals.yaml".
=head1 DESCRIPTION
The goals.yaml file describes release goals and consists of one "YAML
document". Extra documents I<may> be added at the end in a later
version of this API, implementations should handle this.
The YAML document is an associative array with the fields listed
below. Unknown fields should be ignored by implementations.
=over 4
=item codename
The codename of the Debian release the goals.yaml file is describing.
=item last-updated
Time of last modification. Format is the based on the date format
described in RFC-822.
=item release-goals
This is a sequence of release goals. See L</Release goals> below.
=back
=head2 Release goals
The order of the elements in this sequence is not significant nor is
it guaranteed to be stable. Each element is a goal and represented as
an associative array. The accepted fields are listed below.
Implementations should ignore unknown fields.
=over 4
=item name
This is the "Human Readable" name for the goal.
=item advocates
List of the names of advocates (order not significant).
=item state
The state of the release goal.
=over 4
=item completed
The release goal is declared as completed.
=item accepted
The release goal is valid and has been accepted for the current
release.
=item proposed
The release goal has been proposed, but has not neither been rejected
nor accepted at this point.
=item withdrawn
The release goal was withdrawn by the proposers.
=item rejected
The release goal has been rejected (or recalled) by the release team.
=back
=item wiki
URL to the wiki page describing the goal.
=item bugs
If present, this is an associative array. The contents can be used to
locate usertagged bugs associated with this release goal.
=over 4
=item user
The contents for the "user" field for the Debian BTS.
=item usertags
List of usertags.
=back
=back
Reply to: