1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
|
# Copyright 2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Enumerations used in the lp/blueprints modules."""
__metaclass__ = type
__all__ = [
'NewSpecificationDefinitionStatus',
'SpecificationDefinitionStatus',
'SpecificationFilter',
'SpecificationGoalStatus',
'SpecificationImplementationStatus',
'SpecificationLifecycleStatus',
'SpecificationPriority',
'SpecificationSort',
'SprintSpecificationStatus',
]
from lazr.enum import (
DBEnumeratedType,
DBItem,
EnumeratedType,
Item,
use_template,
)
class SpecificationImplementationStatus(DBEnumeratedType):
"""The Specification Delivery Status
This tracks the implementation or delivery of the feature being
specified. The status values indicate the progress that is being made
in the actual coding or configuration that is needed to realise the
feature.
Note that some of the states associated with this schema correlate
to a "not started" definition. See Specification.started_clause for
further information, and make sure that it is updated (together with
the relevant database checks) if additional states are added that
are also "not started".
"""
# The `UNKNOWN` state is considered "not started"
UNKNOWN = DBItem(0, """
Unknown
We have no information on the implementation of this feature.
""")
# The `NOTSTARTED` state is considered "not started"
NOTSTARTED = DBItem(5, """
Not started
No work has yet been done on the implementation of this feature.
""")
# The `DEFERRED` state is considered "not started"
DEFERRED = DBItem(10, """
Deferred
There is no chance that this feature will actually be delivered in
the targeted release. The specification has effectively been
deferred to a later date of implementation.
""")
NEEDSINFRASTRUCTURE = DBItem(40, """
Needs Infrastructure
Work cannot proceed, because the feature depends on
infrastructure (servers, databases, connectivity, system
administration work) that has not been supplied.
""")
BLOCKED = DBItem(50, """
Blocked
Work cannot proceed on this specification because it depends on
a separate feature that has not yet been implemented.
(The specification for that feature should be listed as a blocker of
this one.)
""")
STARTED = DBItem(60, """
Started
Work has begun, but has not yet been published
except as informal branches or patches. No indication is given as to
whether or not this work will be completed for the targeted release.
""")
SLOW = DBItem(65, """
Slow progress
Work has been slow on this item, and it has a high risk of not being
delivered on time. Help is wanted with the implementation.
""")
GOOD = DBItem(70, """
Good progress
The feature is considered on track for delivery in the targeted
release.
""")
BETA = DBItem(75, """
Beta Available
A beta version, implementing substantially all of the feature,
has been published for widespread testing in personal package
archives or a personal release. The code is not yet in the
main archive or mainline branch. Testing and feedback are solicited.
""")
NEEDSREVIEW = DBItem(80, """
Needs Code Review
The developer is satisfied that the feature has been well
implemented. It is now ready for review and final sign-off,
after which it will be marked implemented or deployed.
""")
AWAITINGDEPLOYMENT = DBItem(85, """
Deployment
The implementation has been done, and can be deployed in the
production environment, but this has not yet been done by the system
administrators. (This status is typically used for Web services where
code is not released but instead is pushed into production.
""")
IMPLEMENTED = DBItem(90, """
Implemented
This functionality has been delivered for the targeted release, the
code has been uploaded to the main archives or committed to the
targeted product series, and no further work is necessary.
""")
INFORMATIONAL = DBItem(95, """
Informational
This specification is informational, and does not require
any implementation.
""")
class SpecificationLifecycleStatus(DBEnumeratedType):
"""The current "lifecycle" status of a specification.
Specs go from NOTSTARTED, to STARTED, to COMPLETE.
"""
NOTSTARTED = DBItem(10, """
Not started
No work has yet been done on this feature.
""")
STARTED = DBItem(20, """
Started
This feature is under active development.
""")
COMPLETE = DBItem(30, """
Complete
This feature has been marked "complete" because no further work is
expected. Either the feature is done, or it has been abandoned.
""")
class SpecificationPriority(DBEnumeratedType):
"""The Priority with a Specification must be implemented.
This enum is used to prioritize work.
"""
NOTFORUS = DBItem(0, """
Not
This feature has been proposed but the project leaders have decided
that it is not appropriate for inclusion in the mainline codebase.
See the status whiteboard or the
specification itself for the rationale for this decision. Of course,
you are welcome to implement it in any event and publish that work
for consideration by the community and end users, but it is unlikely
to be accepted by the mainline developers.
""")
UNDEFINED = DBItem(5, """
Undefined
This feature has recently been proposed and has not yet been
evaluated and prioritized by the project leaders.
""")
LOW = DBItem(10, """
Low
We would like to have it in the
code, but it's not on any critical path and is likely to get bumped
in favour of higher-priority work. The idea behind the specification
is sound and the project leaders would incorporate this
functionality if the work was done. In general, "low" priority
specifications will not get core resources assigned to them.
""")
MEDIUM = DBItem(50, """
Medium
The project developers will definitely get to this feature,
but perhaps not in the next major release or two.
""")
HIGH = DBItem(70, """
High
Strongly desired by the project leaders.
The feature will definitely get review time, and contributions would
be most effective if directed at a feature with this priority.
""")
ESSENTIAL = DBItem(90, """
Essential
The specification is essential for the next release, and should be
the focus of current development. Use this state only for the most
important of all features.
""")
class SpecificationFilter(DBEnumeratedType):
"""The kinds of specifications that a listing should include.
This is used by browser classes that are generating a list of
specifications for a person, or product, or project, to indicate what
kinds of specs they want returned. The different filters can be OR'ed so
that multiple pieces of information can be used for the filter.
"""
ALL = DBItem(0, """
All
This indicates that the list should simply include ALL
specifications for the underlying object (person, product etc).
""")
COMPLETE = DBItem(5, """
Complete
This indicates that the list should include only the complete
specifications for this object.
""")
INCOMPLETE = DBItem(10, """
Incomplete
This indicates that the list should include the incomplete items
only. The rules for determining if a specification is incomplete are
complex, depending on whether or not the spec is informational.
""")
INFORMATIONAL = DBItem(20, """
Informational
This indicates that the list should include only the informational
specifications.
""")
PROPOSED = DBItem(30, """
Proposed
This indicates that the list should include specifications that have
been proposed as goals for the underlying objects, but not yet
accepted or declined.
""")
DECLINED = DBItem(40, """
Declined
This indicates that the list should include specifications that were
declined as goals for the underlying productseries or distroseries.
""")
ACCEPTED = DBItem(50, """
Accepted
This indicates that the list should include specifications that were
accepted as goals for the underlying productseries or distroseries.
""")
VALID = DBItem(55, """
Valid
This indicates that the list should include specifications that are
not obsolete or superseded.
""")
CREATOR = DBItem(60, """
Creator
This indicates that the list should include specifications that the
person registered in Launchpad.
""")
ASSIGNEE = DBItem(70, """
Assignee
This indicates that the list should include specifications that the
person has been assigned to implement.
""")
APPROVER = DBItem(80, """
Approver
This indicates that the list should include specifications that the
person is supposed to review and approve.
""")
DRAFTER = DBItem(90, """
Drafter
This indicates that the list should include specifications that the
person is supposed to draft. The drafter is usually only needed
during spec sprints when there's a bottleneck on guys who are
assignees for many specs.
""")
SUBSCRIBER = DBItem(100, """
Subscriber
This indicates that the list should include all the specifications
to which the person has subscribed.
""")
FEEDBACK = DBItem(110, """
Feedback
This indicates that the list should include all the specifications
which the person has been asked to provide specific feedback on.
""")
class SpecificationSort(EnumeratedType):
"""The scheme to sort the results of a specifications query.
This is usually used in interfaces which ask for a filtered list of
specifications, so that you can tell which specifications you would
expect to see first.
"""
DATE = Item("""
Date
This indicates a preferred sort order of date of creation, newest
first.
""")
PRIORITY = Item("""
Priority
This indicates a preferred sort order of priority (highest first)
followed by status. This is the default sort order when retrieving
specifications from the system.
""")
class SpecificationDefinitionStatus(DBEnumeratedType):
"""The current status of a Specification.
This enum tells us whether or not a specification is approved, or still
being drafted, or implemented, or obsolete in some way. The ordinality
of the values is important, it's the order (lowest to highest) in which
we probably want them displayed by default.
"""
APPROVED = DBItem(10, """
Approved
The project team believe that the specification is ready to be
implemented, without substantial issues being encountered.
""")
PENDINGAPPROVAL = DBItem(15, """
Pending Approval
Reviewed and considered ready for final approval.
The reviewer believes the specification is clearly written,
and adequately addresses all important issues that will
be raised during implementation.
""")
PENDINGREVIEW = DBItem(20, """
Review
Has been put in a reviewer's queue. The reviewer will
assess it for clarity and comprehensiveness, and decide
whether further work is needed before the spec can be considered for
actual approval.
""")
DRAFT = DBItem(30, """
Drafting
The specification is actively being drafted, with a drafter in place
and frequent revision occurring.
Do not park specs in the "drafting" state indefinitely.
""")
DISCUSSION = DBItem(35, """
Discussion
Still needs active discussion, at a sprint for example.
""")
NEW = DBItem(40, """
New
No thought has yet been given to implementation strategy,
dependencies, or presentation/UI issues.
""")
SUPERSEDED = DBItem(60, """
Superseded
Still interesting, but superseded by a newer spec or set of specs that
clarify or describe a newer way to implement the desired feature.
Please use the newer specs and not this one.
""")
OBSOLETE = DBItem(70, """
Obsolete
The specification has been obsoleted, probably because it was decided
against. People should not put any effort into implementing it.
""")
class NewSpecificationDefinitionStatus(DBEnumeratedType):
"""The Initial status of a Specification.
The initial status to define the feature and get approval for the
implementation plan.
"""
use_template(SpecificationDefinitionStatus, include=(
'NEW',
'DISCUSSION',
'DRAFT',
'PENDINGREVIEW',
'PENDINGAPPROVAL',
'APPROVED',
))
class SpecificationGoalStatus(DBEnumeratedType):
"""The target status for this specification.
This enum allows us to show whether or not the specification has been
approved or declined as a target for the given productseries or
distroseries.
"""
ACCEPTED = DBItem(10, """
Accepted
The drivers have confirmed that this specification is targeted to
the stated distribution release or product series.
""")
DECLINED = DBItem(20, """
Declined
The drivers have decided not to accept this specification as a goal
for the stated distribution release or product series.
""")
PROPOSED = DBItem(30, """
Proposed
This spec has been submitted as a potential goal for the stated
product series or distribution release, but the drivers have not yet
accepted or declined that goal.
""")
class SprintSpecificationStatus(DBEnumeratedType):
"""The current approval status of the spec on this sprint's agenda.
This enum allows us to know whether or not the meeting admin team has
agreed to discuss an item.
"""
ACCEPTED = DBItem(10, """
Accepted
The meeting organisers have confirmed this topic for the meeting
agenda.
""")
DECLINED = DBItem(20, """
Declined
This spec has been declined from the meeting agenda
because of a lack of available resources, or uncertainty over
the specific requirements or outcome desired.
""")
PROPOSED = DBItem(30, """
Proposed
This spec has been submitted for consideration by the meeting
organisers. It has not yet been accepted or declined for the
agenda.
""")
|