Merge lp:~thumper/launchpad/blueprint-enums into lp:launchpad
- blueprint-enums
- Merge into devel
Proposed by
Tim Penhey
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11827 |
Proposed branch: | lp:~thumper/launchpad/blueprint-enums |
Merge into: | lp:launchpad |
Diff against target: |
1609 lines (+564/-566) 36 files modified
lib/lp/blueprints/browser/specification.py (+1/-1) lib/lp/blueprints/browser/specificationgoal.py (+1/-1) lib/lp/blueprints/browser/specificationtarget.py (+1/-1) lib/lp/blueprints/browser/sprint.py (+1/-1) lib/lp/blueprints/doc/specification.txt (+3/-2) lib/lp/blueprints/doc/sprint.txt (+2/-3) lib/lp/blueprints/enums.py (+495/-0) lib/lp/blueprints/interfaces/specification.py (+6/-453) lib/lp/blueprints/interfaces/sprintspecification.py (+4/-47) lib/lp/blueprints/model/specification.py (+5/-3) lib/lp/blueprints/model/sprint.py (+2/-4) lib/lp/blueprints/model/sprintspecification.py (+2/-4) lib/lp/blueprints/subscribers.py (+1/-1) lib/lp/blueprints/vocabularies/specificationdependency.py (+1/-1) lib/lp/code/model/tests/test_branch.py (+2/-4) lib/lp/registry/browser/person.py (+1/-1) lib/lp/registry/browser/productseries.py (+2/-4) lib/lp/registry/browser/tests/milestone-views.txt (+1/-2) lib/lp/registry/browser/tests/person-views.txt (+2/-2) lib/lp/registry/doc/distribution.txt (+2/-2) lib/lp/registry/doc/distroseries.txt (+1/-1) lib/lp/registry/doc/mentoringoffer.txt (+1/-1) lib/lp/registry/doc/person.txt (+1/-1) lib/lp/registry/doc/product.txt (+1/-1) lib/lp/registry/doc/productseries.txt (+2/-2) lib/lp/registry/doc/projectgroup.txt (+1/-1) lib/lp/registry/model/distribution.py (+1/-1) lib/lp/registry/model/distroseries.py (+1/-1) lib/lp/registry/model/person.py (+1/-1) lib/lp/registry/model/product.py (+1/-1) lib/lp/registry/model/productseries.py (+1/-1) lib/lp/registry/model/projectgroup.py (+1/-3) lib/lp/registry/stories/person/xx-person-working-on.txt (+1/-2) lib/lp/registry/tests/test_project_milestone.py (+2/-2) lib/lp/testing/factory.py (+2/-4) scripts/import-zope-specs.py (+11/-6) |
To merge this branch: | bzr merge lp:~thumper/launchpad/blueprint-enums |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Tim Penhey (community) | unreviewed | Approve | |
Review via email: mp+39726@code.launchpad.net |
Commit message
Description of the change
Move specification enums into lp.blueprints.
To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) : | # |
review:
Approve
(unreviewed)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/lp/blueprints/browser/specification.py' |
2 | --- lib/lp/blueprints/browser/specification.py 2010-08-24 10:45:57 +0000 |
3 | +++ lib/lp/blueprints/browser/specification.py 2010-11-02 04:02:45 +0000 |
4 | @@ -84,6 +84,7 @@ |
5 | NavigationMenu, |
6 | ) |
7 | from lp.blueprints.browser.specificationtarget import HasSpecificationsView |
8 | +from lp.blueprints.enums import SpecificationDefinitionStatus |
9 | from lp.blueprints.interfaces.specification import ( |
10 | INewSpecification, |
11 | INewSpecificationProjectTarget, |
12 | @@ -92,7 +93,6 @@ |
13 | INewSpecificationTarget, |
14 | ISpecification, |
15 | ISpecificationSet, |
16 | - SpecificationDefinitionStatus, |
17 | ) |
18 | from lp.blueprints.interfaces.specificationbranch import ISpecificationBranch |
19 | from lp.blueprints.interfaces.sprintspecification import ISprintSpecification |
20 | |
21 | === modified file 'lib/lp/blueprints/browser/specificationgoal.py' |
22 | --- lib/lp/blueprints/browser/specificationgoal.py 2010-08-24 10:45:57 +0000 |
23 | +++ lib/lp/blueprints/browser/specificationgoal.py 2010-11-02 04:02:45 +0000 |
24 | @@ -18,7 +18,7 @@ |
25 | ) |
26 | from canonical.launchpad.webapp.interfaces import ILaunchBag |
27 | from lp.blueprints.browser.specificationtarget import HasSpecificationsView |
28 | -from lp.blueprints.interfaces.specification import SpecificationFilter |
29 | +from lp.blueprints.enums import SpecificationFilter |
30 | from lp.services.propertycache import cachedproperty |
31 | |
32 | |
33 | |
34 | === modified file 'lib/lp/blueprints/browser/specificationtarget.py' |
35 | --- lib/lp/blueprints/browser/specificationtarget.py 2010-09-17 14:04:29 +0000 |
36 | +++ lib/lp/blueprints/browser/specificationtarget.py 2010-11-02 04:02:45 +0000 |
37 | @@ -42,7 +42,7 @@ |
38 | ) |
39 | from lp.app.enums import service_uses_launchpad |
40 | from lp.app.interfaces.launchpad import IServiceUsage |
41 | -from lp.blueprints.interfaces.specification import ( |
42 | +from lp.blueprints.enums import ( |
43 | SpecificationFilter, |
44 | SpecificationSort, |
45 | ) |
46 | |
47 | === modified file 'lib/lp/blueprints/browser/sprint.py' |
48 | --- lib/lp/blueprints/browser/sprint.py 2010-08-24 10:45:57 +0000 |
49 | +++ lib/lp/blueprints/browser/sprint.py 2010-11-02 04:02:45 +0000 |
50 | @@ -55,7 +55,7 @@ |
51 | HasSpecificationsMenuMixin, |
52 | HasSpecificationsView, |
53 | ) |
54 | -from lp.blueprints.interfaces.specification import ( |
55 | +from lp.blueprints.enums import ( |
56 | SpecificationDefinitionStatus, |
57 | SpecificationFilter, |
58 | SpecificationPriority, |
59 | |
60 | === modified file 'lib/lp/blueprints/doc/specification.txt' |
61 | --- lib/lp/blueprints/doc/specification.txt 2010-10-18 22:24:59 +0000 |
62 | +++ lib/lp/blueprints/doc/specification.txt 2010-11-02 04:02:45 +0000 |
63 | @@ -10,9 +10,10 @@ |
64 | IMilestoneSet can be accessed as a utility. |
65 | |
66 | >>> from zope.component import getUtility |
67 | - >>> from lp.blueprints.interfaces.specification import ( |
68 | - ... ISpecificationSet, SpecificationDefinitionStatus, |
69 | + >>> from lp.blueprints.enums import ( |
70 | + ... SpecificationDefinitionStatus, |
71 | ... SpecificationImplementationStatus, SpecificationPriority) |
72 | + >>> from lp.blueprints.interfaces.specification import ISpecificationSet |
73 | >>> specset = getUtility(ISpecificationSet) |
74 | |
75 | To create a new Specification, use ISpecificationSet.new: |
76 | |
77 | === modified file 'lib/lp/blueprints/doc/sprint.txt' |
78 | --- lib/lp/blueprints/doc/sprint.txt 2010-10-18 22:24:59 +0000 |
79 | +++ lib/lp/blueprints/doc/sprint.txt 2010-11-02 04:02:45 +0000 |
80 | @@ -77,8 +77,7 @@ |
81 | the specs related to the Ubuntu "futurista" sprint to "proposed", and |
82 | then check the coming sprints and all sprints. |
83 | |
84 | - >>> from lp.blueprints.interfaces.sprintspecification import ( |
85 | - ... SprintSpecificationStatus) |
86 | + >>> from lp.blueprints.enums import SprintSpecificationStatus |
87 | |
88 | We're directly using the database classes here, bypassing the security |
89 | proxies because this is just set-up for the next step, it's not the |
90 | @@ -114,7 +113,7 @@ |
91 | |
92 | >>> ubz = sprintset["ubz"] |
93 | |
94 | - >>> from lp.blueprints.interfaces.specification import SpecificationFilter |
95 | + >>> from lp.blueprints.enums import SpecificationFilter |
96 | |
97 | First, there should be no informational specs for ubz: |
98 | |
99 | |
100 | === added file 'lib/lp/blueprints/enums.py' |
101 | --- lib/lp/blueprints/enums.py 1970-01-01 00:00:00 +0000 |
102 | +++ lib/lp/blueprints/enums.py 2010-11-02 04:02:45 +0000 |
103 | @@ -0,0 +1,495 @@ |
104 | +# Copyright 2010 Canonical Ltd. This software is licensed under the |
105 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
106 | + |
107 | +"""Enumerations used in the lp/blueprints modules.""" |
108 | + |
109 | +__metaclass__ = type |
110 | +__all__ = [ |
111 | + 'SpecificationDefinitionStatus', |
112 | + 'SpecificationFilter', |
113 | + 'SpecificationGoalStatus', |
114 | + 'SpecificationImplementationStatus', |
115 | + 'SpecificationLifecycleStatus', |
116 | + 'SpecificationPriority', |
117 | + 'SpecificationSort', |
118 | + 'SprintSpecificationStatus', |
119 | + ] |
120 | + |
121 | + |
122 | +from lazr.enum import ( |
123 | + DBEnumeratedType, |
124 | + DBItem, |
125 | + EnumeratedType, |
126 | + Item, |
127 | + ) |
128 | + |
129 | + |
130 | +class SpecificationImplementationStatus(DBEnumeratedType): |
131 | + """The Specification Delivery Status |
132 | + |
133 | + This tracks the implementation or delivery of the feature being |
134 | + specified. The status values indicate the progress that is being made |
135 | + in the actual coding or configuration that is needed to realise the |
136 | + feature. |
137 | + |
138 | + Note that some of the states associated with this schema correlate |
139 | + to a "not started" definition. See Specification.started_clause for |
140 | + further information, and make sure that it is updated (together with |
141 | + the relevant database checks) if additional states are added that |
142 | + are also "not started". |
143 | + """ |
144 | + # The `UNKNOWN` state is considered "not started" |
145 | + UNKNOWN = DBItem(0, """ |
146 | + Unknown |
147 | + |
148 | + We have no information on the implementation of this feature. |
149 | + """) |
150 | + |
151 | + # The `NOTSTARTED` state is considered "not started" |
152 | + NOTSTARTED = DBItem(5, """ |
153 | + Not started |
154 | + |
155 | + No work has yet been done on the implementation of this feature. |
156 | + """) |
157 | + |
158 | + # The `DEFERRED` state is considered "not started" |
159 | + DEFERRED = DBItem(10, """ |
160 | + Deferred |
161 | + |
162 | + There is no chance that this feature will actually be delivered in |
163 | + the targeted release. The specification has effectively been |
164 | + deferred to a later date of implementation. |
165 | + """) |
166 | + |
167 | + NEEDSINFRASTRUCTURE = DBItem(40, """ |
168 | + Needs Infrastructure |
169 | + |
170 | + Work cannot proceed, because the feature depends on |
171 | + infrastructure (servers, databases, connectivity, system |
172 | + administration work) that has not been supplied. |
173 | + """) |
174 | + |
175 | + BLOCKED = DBItem(50, """ |
176 | + Blocked |
177 | + |
178 | + Work cannot proceed on this specification because it depends on |
179 | + a separate feature that has not yet been implemented. |
180 | + (The specification for that feature should be listed as a blocker of |
181 | + this one.) |
182 | + """) |
183 | + |
184 | + STARTED = DBItem(60, """ |
185 | + Started |
186 | + |
187 | + Work has begun, but has not yet been published |
188 | + except as informal branches or patches. No indication is given as to |
189 | + whether or not this work will be completed for the targeted release. |
190 | + """) |
191 | + |
192 | + SLOW = DBItem(65, """ |
193 | + Slow progress |
194 | + |
195 | + Work has been slow on this item, and it has a high risk of not being |
196 | + delivered on time. Help is wanted with the implementation. |
197 | + """) |
198 | + |
199 | + GOOD = DBItem(70, """ |
200 | + Good progress |
201 | + |
202 | + The feature is considered on track for delivery in the targeted |
203 | + release. |
204 | + """) |
205 | + |
206 | + BETA = DBItem(75, """ |
207 | + Beta Available |
208 | + |
209 | + A beta version, implementing substantially all of the feature, |
210 | + has been published for widespread testing in personal package |
211 | + archives or a personal release. The code is not yet in the |
212 | + main archive or mainline branch. Testing and feedback are solicited. |
213 | + """) |
214 | + |
215 | + NEEDSREVIEW = DBItem(80, """ |
216 | + Needs Code Review |
217 | + |
218 | + The developer is satisfied that the feature has been well |
219 | + implemented. It is now ready for review and final sign-off, |
220 | + after which it will be marked implemented or deployed. |
221 | + """) |
222 | + |
223 | + AWAITINGDEPLOYMENT = DBItem(85, """ |
224 | + Deployment |
225 | + |
226 | + The implementation has been done, and can be deployed in the |
227 | + production environment, but this has not yet been done by the system |
228 | + administrators. (This status is typically used for Web services where |
229 | + code is not released but instead is pushed into production. |
230 | + """) |
231 | + |
232 | + IMPLEMENTED = DBItem(90, """ |
233 | + Implemented |
234 | + |
235 | + This functionality has been delivered for the targeted release, the |
236 | + code has been uploaded to the main archives or committed to the |
237 | + targeted product series, and no further work is necessary. |
238 | + """) |
239 | + |
240 | + INFORMATIONAL = DBItem(95, """ |
241 | + Informational |
242 | + |
243 | + This specification is informational, and does not require |
244 | + any implementation. |
245 | + """) |
246 | + |
247 | + |
248 | +class SpecificationLifecycleStatus(DBEnumeratedType): |
249 | + """The current "lifecycle" status of a specification. |
250 | + |
251 | + Specs go from NOTSTARTED, to STARTED, to COMPLETE. |
252 | + """ |
253 | + |
254 | + NOTSTARTED = DBItem(10, """ |
255 | + Not started |
256 | + |
257 | + No work has yet been done on this feature. |
258 | + """) |
259 | + |
260 | + STARTED = DBItem(20, """ |
261 | + Started |
262 | + |
263 | + This feature is under active development. |
264 | + """) |
265 | + |
266 | + COMPLETE = DBItem(30, """ |
267 | + Complete |
268 | + |
269 | + This feature has been marked "complete" because no further work is |
270 | + expected. Either the feature is done, or it has been abandoned. |
271 | + """) |
272 | + |
273 | + |
274 | +class SpecificationPriority(DBEnumeratedType): |
275 | + """The Priority with a Specification must be implemented. |
276 | + |
277 | + This enum is used to prioritize work. |
278 | + """ |
279 | + |
280 | + NOTFORUS = DBItem(0, """ |
281 | + Not |
282 | + |
283 | + This feature has been proposed but the project leaders have decided |
284 | + that it is not appropriate for inclusion in the mainline codebase. |
285 | + See the status whiteboard or the |
286 | + specification itself for the rationale for this decision. Of course, |
287 | + you are welcome to implement it in any event and publish that work |
288 | + for consideration by the community and end users, but it is unlikely |
289 | + to be accepted by the mainline developers. |
290 | + """) |
291 | + |
292 | + UNDEFINED = DBItem(5, """ |
293 | + Undefined |
294 | + |
295 | + This feature has recently been proposed and has not yet been |
296 | + evaluated and prioritized by the project leaders. |
297 | + """) |
298 | + |
299 | + LOW = DBItem(10, """ |
300 | + Low |
301 | + |
302 | + We would like to have it in the |
303 | + code, but it's not on any critical path and is likely to get bumped |
304 | + in favour of higher-priority work. The idea behind the specification |
305 | + is sound and the project leaders would incorporate this |
306 | + functionality if the work was done. In general, "low" priority |
307 | + specifications will not get core resources assigned to them. |
308 | + """) |
309 | + |
310 | + MEDIUM = DBItem(50, """ |
311 | + Medium |
312 | + |
313 | + The project developers will definitely get to this feature, |
314 | + but perhaps not in the next major release or two. |
315 | + """) |
316 | + |
317 | + HIGH = DBItem(70, """ |
318 | + High |
319 | + |
320 | + Strongly desired by the project leaders. |
321 | + The feature will definitely get review time, and contributions would |
322 | + be most effective if directed at a feature with this priority. |
323 | + """) |
324 | + |
325 | + ESSENTIAL = DBItem(90, """ |
326 | + Essential |
327 | + |
328 | + The specification is essential for the next release, and should be |
329 | + the focus of current development. Use this state only for the most |
330 | + important of all features. |
331 | + """) |
332 | + |
333 | + |
334 | +class SpecificationFilter(DBEnumeratedType): |
335 | + """The kinds of specifications that a listing should include. |
336 | + |
337 | + This is used by browser classes that are generating a list of |
338 | + specifications for a person, or product, or project, to indicate what |
339 | + kinds of specs they want returned. The different filters can be OR'ed so |
340 | + that multiple pieces of information can be used for the filter. |
341 | + """ |
342 | + ALL = DBItem(0, """ |
343 | + All |
344 | + |
345 | + This indicates that the list should simply include ALL |
346 | + specifications for the underlying object (person, product etc). |
347 | + """) |
348 | + |
349 | + COMPLETE = DBItem(5, """ |
350 | + Complete |
351 | + |
352 | + This indicates that the list should include only the complete |
353 | + specifications for this object. |
354 | + """) |
355 | + |
356 | + INCOMPLETE = DBItem(10, """ |
357 | + Incomplete |
358 | + |
359 | + This indicates that the list should include the incomplete items |
360 | + only. The rules for determining if a specification is incomplete are |
361 | + complex, depending on whether or not the spec is informational. |
362 | + """) |
363 | + |
364 | + INFORMATIONAL = DBItem(20, """ |
365 | + Informational |
366 | + |
367 | + This indicates that the list should include only the informational |
368 | + specifications. |
369 | + """) |
370 | + |
371 | + PROPOSED = DBItem(30, """ |
372 | + Proposed |
373 | + |
374 | + This indicates that the list should include specifications that have |
375 | + been proposed as goals for the underlying objects, but not yet |
376 | + accepted or declined. |
377 | + """) |
378 | + |
379 | + DECLINED = DBItem(40, """ |
380 | + Declined |
381 | + |
382 | + This indicates that the list should include specifications that were |
383 | + declined as goals for the underlying productseries or distroseries. |
384 | + """) |
385 | + |
386 | + ACCEPTED = DBItem(50, """ |
387 | + Accepted |
388 | + |
389 | + This indicates that the list should include specifications that were |
390 | + accepted as goals for the underlying productseries or distroseries. |
391 | + """) |
392 | + |
393 | + VALID = DBItem(55, """ |
394 | + Valid |
395 | + |
396 | + This indicates that the list should include specifications that are |
397 | + not obsolete or superseded. |
398 | + """) |
399 | + |
400 | + CREATOR = DBItem(60, """ |
401 | + Creator |
402 | + |
403 | + This indicates that the list should include specifications that the |
404 | + person registered in Launchpad. |
405 | + """) |
406 | + |
407 | + ASSIGNEE = DBItem(70, """ |
408 | + Assignee |
409 | + |
410 | + This indicates that the list should include specifications that the |
411 | + person has been assigned to implement. |
412 | + """) |
413 | + |
414 | + APPROVER = DBItem(80, """ |
415 | + Approver |
416 | + |
417 | + This indicates that the list should include specifications that the |
418 | + person is supposed to review and approve. |
419 | + """) |
420 | + |
421 | + DRAFTER = DBItem(90, """ |
422 | + Drafter |
423 | + |
424 | + This indicates that the list should include specifications that the |
425 | + person is supposed to draft. The drafter is usually only needed |
426 | + during spec sprints when there's a bottleneck on guys who are |
427 | + assignees for many specs. |
428 | + """) |
429 | + |
430 | + SUBSCRIBER = DBItem(100, """ |
431 | + Subscriber |
432 | + |
433 | + This indicates that the list should include all the specifications |
434 | + to which the person has subscribed. |
435 | + """) |
436 | + |
437 | + FEEDBACK = DBItem(110, """ |
438 | + Feedback |
439 | + |
440 | + This indicates that the list should include all the specifications |
441 | + which the person has been asked to provide specific feedback on. |
442 | + """) |
443 | + |
444 | + |
445 | +class SpecificationSort(EnumeratedType): |
446 | + """The scheme to sort the results of a specifications query. |
447 | + |
448 | + This is usually used in interfaces which ask for a filtered list of |
449 | + specifications, so that you can tell which specifications you would |
450 | + expect to see first. |
451 | + """ |
452 | + DATE = Item(""" |
453 | + Date |
454 | + |
455 | + This indicates a preferred sort order of date of creation, newest |
456 | + first. |
457 | + """) |
458 | + |
459 | + PRIORITY = Item(""" |
460 | + Priority |
461 | + |
462 | + This indicates a preferred sort order of priority (highest first) |
463 | + followed by status. This is the default sort order when retrieving |
464 | + specifications from the system. |
465 | + """) |
466 | + |
467 | + |
468 | +class SpecificationDefinitionStatus(DBEnumeratedType): |
469 | + """The current status of a Specification. |
470 | + |
471 | + This enum tells us whether or not a specification is approved, or still |
472 | + being drafted, or implemented, or obsolete in some way. The ordinality |
473 | + of the values is important, it's the order (lowest to highest) in which |
474 | + we probably want them displayed by default. |
475 | + """ |
476 | + |
477 | + APPROVED = DBItem(10, """ |
478 | + Approved |
479 | + |
480 | + The project team believe that the specification is ready to be |
481 | + implemented, without substantial issues being encountered. |
482 | + """) |
483 | + |
484 | + PENDINGAPPROVAL = DBItem(15, """ |
485 | + Pending Approval |
486 | + |
487 | + Reviewed and considered ready for final approval. |
488 | + The reviewer believes the specification is clearly written, |
489 | + and adequately addresses all important issues that will |
490 | + be raised during implementation. |
491 | + """) |
492 | + |
493 | + PENDINGREVIEW = DBItem(20, """ |
494 | + Review |
495 | + |
496 | + Has been put in a reviewer's queue. The reviewer will |
497 | + assess it for clarity and comprehensiveness, and decide |
498 | + whether further work is needed before the spec can be considered for |
499 | + actual approval. |
500 | + """) |
501 | + |
502 | + DRAFT = DBItem(30, """ |
503 | + Drafting |
504 | + |
505 | + The specification is actively being drafted, with a drafter in place |
506 | + and frequent revision occurring. |
507 | + Do not park specs in the "drafting" state indefinitely. |
508 | + """) |
509 | + |
510 | + DISCUSSION = DBItem(35, """ |
511 | + Discussion |
512 | + |
513 | + Still needs active discussion, at a sprint for example. |
514 | + """) |
515 | + |
516 | + NEW = DBItem(40, """ |
517 | + New |
518 | + |
519 | + No thought has yet been given to implementation strategy, |
520 | + dependencies, or presentation/UI issues. |
521 | + """) |
522 | + |
523 | + SUPERSEDED = DBItem(60, """ |
524 | + Superseded |
525 | + |
526 | + Still interesting, but superseded by a newer spec or set of specs that |
527 | + clarify or describe a newer way to implement the desired feature. |
528 | + Please use the newer specs and not this one. |
529 | + """) |
530 | + |
531 | + OBSOLETE = DBItem(70, """ |
532 | + Obsolete |
533 | + |
534 | + The specification has been obsoleted, probably because it was decided |
535 | + against. People should not put any effort into implementing it. |
536 | + """) |
537 | + |
538 | + |
539 | +class SpecificationGoalStatus(DBEnumeratedType): |
540 | + """The target status for this specification. |
541 | + |
542 | + This enum allows us to show whether or not the specification has been |
543 | + approved or declined as a target for the given productseries or |
544 | + distroseries. |
545 | + """ |
546 | + |
547 | + ACCEPTED = DBItem(10, """ |
548 | + Accepted |
549 | + |
550 | + The drivers have confirmed that this specification is targeted to |
551 | + the stated distribution release or product series. |
552 | + """) |
553 | + |
554 | + DECLINED = DBItem(20, """ |
555 | + Declined |
556 | + |
557 | + The drivers have decided not to accept this specification as a goal |
558 | + for the stated distribution release or product series. |
559 | + """) |
560 | + |
561 | + PROPOSED = DBItem(30, """ |
562 | + Proposed |
563 | + |
564 | + This spec has been submitted as a potential goal for the stated |
565 | + product series or distribution release, but the drivers have not yet |
566 | + accepted or declined that goal. |
567 | + """) |
568 | + |
569 | + |
570 | +class SprintSpecificationStatus(DBEnumeratedType): |
571 | + """The current approval status of the spec on this sprint's agenda. |
572 | + |
573 | + This enum allows us to know whether or not the meeting admin team has |
574 | + agreed to discuss an item. |
575 | + """ |
576 | + |
577 | + ACCEPTED = DBItem(10, """ |
578 | + Accepted |
579 | + |
580 | + The meeting organisers have confirmed this topic for the meeting |
581 | + agenda. |
582 | + """) |
583 | + |
584 | + DECLINED = DBItem(20, """ |
585 | + Declined |
586 | + |
587 | + This spec has been declined from the meeting agenda |
588 | + because of a lack of available resources, or uncertainty over |
589 | + the specific requirements or outcome desired. |
590 | + """) |
591 | + |
592 | + PROPOSED = DBItem(30, """ |
593 | + Proposed |
594 | + |
595 | + This spec has been submitted for consideration by the meeting |
596 | + organisers. It has not yet been accepted or declined for the |
597 | + agenda. |
598 | + """) |
599 | |
600 | === modified file 'lib/lp/blueprints/interfaces/specification.py' |
601 | --- lib/lp/blueprints/interfaces/specification.py 2010-10-03 15:30:06 +0000 |
602 | +++ lib/lp/blueprints/interfaces/specification.py 2010-11-02 04:02:45 +0000 |
603 | @@ -16,22 +16,9 @@ |
604 | 'ISpecification', |
605 | 'ISpecificationSet', |
606 | 'ISpecificationDelta', |
607 | - 'SpecificationDefinitionStatus', |
608 | - 'SpecificationFilter', |
609 | - 'SpecificationGoalStatus', |
610 | - 'SpecificationImplementationStatus', |
611 | - 'SpecificationLifecycleStatus', |
612 | - 'SpecificationPriority', |
613 | - 'SpecificationSort', |
614 | ] |
615 | |
616 | |
617 | -from lazr.enum import ( |
618 | - DBEnumeratedType, |
619 | - DBItem, |
620 | - EnumeratedType, |
621 | - Item, |
622 | - ) |
623 | from lazr.restful.declarations import export_as_webservice_entry |
624 | from zope.component import getUtility |
625 | from zope.interface import ( |
626 | @@ -50,6 +37,12 @@ |
627 | from canonical.launchpad import _ |
628 | from canonical.launchpad.interfaces.validation import valid_webref |
629 | from canonical.launchpad.validators import LaunchpadValidationError |
630 | +from lp.blueprints.enums import ( |
631 | + SpecificationDefinitionStatus, |
632 | + SpecificationGoalStatus, |
633 | + SpecificationImplementationStatus, |
634 | + SpecificationPriority, |
635 | + ) |
636 | from lp.blueprints.interfaces.specificationtarget import IHasSpecifications |
637 | from lp.blueprints.interfaces.sprint import ISprint |
638 | from lp.code.interfaces.branchlink import IHasLinkedBranches |
639 | @@ -64,446 +57,6 @@ |
640 | ) |
641 | |
642 | |
643 | -class SpecificationImplementationStatus(DBEnumeratedType): |
644 | - """The Specification Delivery Status |
645 | - |
646 | - This tracks the implementation or delivery of the feature being |
647 | - specified. The status values indicate the progress that is being made |
648 | - in the actual coding or configuration that is needed to realise the |
649 | - feature. |
650 | - |
651 | - Note that some of the states associated with this schema correlate |
652 | - to a "not started" definition. See Specification.started_clause for |
653 | - further information, and make sure that it is updated (together with |
654 | - the relevant database checks) if additional states are added that |
655 | - are also "not started". |
656 | - """ |
657 | - # The `UNKNOWN` state is considered "not started" |
658 | - UNKNOWN = DBItem(0, """ |
659 | - Unknown |
660 | - |
661 | - We have no information on the implementation of this feature. |
662 | - """) |
663 | - |
664 | - # The `NOTSTARTED` state is considered "not started" |
665 | - NOTSTARTED = DBItem(5, """ |
666 | - Not started |
667 | - |
668 | - No work has yet been done on the implementation of this feature. |
669 | - """) |
670 | - |
671 | - # The `DEFERRED` state is considered "not started" |
672 | - DEFERRED = DBItem(10, """ |
673 | - Deferred |
674 | - |
675 | - There is no chance that this feature will actually be delivered in |
676 | - the targeted release. The specification has effectively been |
677 | - deferred to a later date of implementation. |
678 | - """) |
679 | - |
680 | - NEEDSINFRASTRUCTURE = DBItem(40, """ |
681 | - Needs Infrastructure |
682 | - |
683 | - Work cannot proceed, because the feature depends on |
684 | - infrastructure (servers, databases, connectivity, system |
685 | - administration work) that has not been supplied. |
686 | - """) |
687 | - |
688 | - BLOCKED = DBItem(50, """ |
689 | - Blocked |
690 | - |
691 | - Work cannot proceed on this specification because it depends on |
692 | - a separate feature that has not yet been implemented. |
693 | - (The specification for that feature should be listed as a blocker of |
694 | - this one.) |
695 | - """) |
696 | - |
697 | - STARTED = DBItem(60, """ |
698 | - Started |
699 | - |
700 | - Work has begun, but has not yet been published |
701 | - except as informal branches or patches. No indication is given as to |
702 | - whether or not this work will be completed for the targeted release. |
703 | - """) |
704 | - |
705 | - SLOW = DBItem(65, """ |
706 | - Slow progress |
707 | - |
708 | - Work has been slow on this item, and it has a high risk of not being |
709 | - delivered on time. Help is wanted with the implementation. |
710 | - """) |
711 | - |
712 | - GOOD = DBItem(70, """ |
713 | - Good progress |
714 | - |
715 | - The feature is considered on track for delivery in the targeted |
716 | - release. |
717 | - """) |
718 | - |
719 | - BETA = DBItem(75, """ |
720 | - Beta Available |
721 | - |
722 | - A beta version, implementing substantially all of the feature, |
723 | - has been published for widespread testing in personal package |
724 | - archives or a personal release. The code is not yet in the |
725 | - main archive or mainline branch. Testing and feedback are solicited. |
726 | - """) |
727 | - |
728 | - NEEDSREVIEW = DBItem(80, """ |
729 | - Needs Code Review |
730 | - |
731 | - The developer is satisfied that the feature has been well |
732 | - implemented. It is now ready for review and final sign-off, |
733 | - after which it will be marked implemented or deployed. |
734 | - """) |
735 | - |
736 | - AWAITINGDEPLOYMENT = DBItem(85, """ |
737 | - Deployment |
738 | - |
739 | - The implementation has been done, and can be deployed in the |
740 | - production environment, but this has not yet been done by the system |
741 | - administrators. (This status is typically used for Web services where |
742 | - code is not released but instead is pushed into production. |
743 | - """) |
744 | - |
745 | - IMPLEMENTED = DBItem(90, """ |
746 | - Implemented |
747 | - |
748 | - This functionality has been delivered for the targeted release, the |
749 | - code has been uploaded to the main archives or committed to the |
750 | - targeted product series, and no further work is necessary. |
751 | - """) |
752 | - |
753 | - INFORMATIONAL = DBItem(95, """ |
754 | - Informational |
755 | - |
756 | - This specification is informational, and does not require |
757 | - any implementation. |
758 | - """) |
759 | - |
760 | - |
761 | -class SpecificationLifecycleStatus(DBEnumeratedType): |
762 | - """The current "lifecycle" status of a specification. |
763 | - |
764 | - Specs go from NOTSTARTED, to STARTED, to COMPLETE. |
765 | - """ |
766 | - |
767 | - NOTSTARTED = DBItem(10, """ |
768 | - Not started |
769 | - |
770 | - No work has yet been done on this feature. |
771 | - """) |
772 | - |
773 | - STARTED = DBItem(20, """ |
774 | - Started |
775 | - |
776 | - This feature is under active development. |
777 | - """) |
778 | - |
779 | - COMPLETE = DBItem(30, """ |
780 | - Complete |
781 | - |
782 | - This feature has been marked "complete" because no further work is |
783 | - expected. Either the feature is done, or it has been abandoned. |
784 | - """) |
785 | - |
786 | - |
787 | -class SpecificationPriority(DBEnumeratedType): |
788 | - """The Priority with a Specification must be implemented. |
789 | - |
790 | - This enum is used to prioritize work. |
791 | - """ |
792 | - |
793 | - NOTFORUS = DBItem(0, """ |
794 | - Not |
795 | - |
796 | - This feature has been proposed but the project leaders have decided |
797 | - that it is not appropriate for inclusion in the mainline codebase. |
798 | - See the status whiteboard or the |
799 | - specification itself for the rationale for this decision. Of course, |
800 | - you are welcome to implement it in any event and publish that work |
801 | - for consideration by the community and end users, but it is unlikely |
802 | - to be accepted by the mainline developers. |
803 | - """) |
804 | - |
805 | - UNDEFINED = DBItem(5, """ |
806 | - Undefined |
807 | - |
808 | - This feature has recently been proposed and has not yet been |
809 | - evaluated and prioritized by the project leaders. |
810 | - """) |
811 | - |
812 | - LOW = DBItem(10, """ |
813 | - Low |
814 | - |
815 | - We would like to have it in the |
816 | - code, but it's not on any critical path and is likely to get bumped |
817 | - in favour of higher-priority work. The idea behind the specification |
818 | - is sound and the project leaders would incorporate this |
819 | - functionality if the work was done. In general, "low" priority |
820 | - specifications will not get core resources assigned to them. |
821 | - """) |
822 | - |
823 | - MEDIUM = DBItem(50, """ |
824 | - Medium |
825 | - |
826 | - The project developers will definitely get to this feature, |
827 | - but perhaps not in the next major release or two. |
828 | - """) |
829 | - |
830 | - HIGH = DBItem(70, """ |
831 | - High |
832 | - |
833 | - Strongly desired by the project leaders. |
834 | - The feature will definitely get review time, and contributions would |
835 | - be most effective if directed at a feature with this priority. |
836 | - """) |
837 | - |
838 | - ESSENTIAL = DBItem(90, """ |
839 | - Essential |
840 | - |
841 | - The specification is essential for the next release, and should be |
842 | - the focus of current development. Use this state only for the most |
843 | - important of all features. |
844 | - """) |
845 | - |
846 | - |
847 | -class SpecificationFilter(DBEnumeratedType): |
848 | - """The kinds of specifications that a listing should include. |
849 | - |
850 | - This is used by browser classes that are generating a list of |
851 | - specifications for a person, or product, or project, to indicate what |
852 | - kinds of specs they want returned. The different filters can be OR'ed so |
853 | - that multiple pieces of information can be used for the filter. |
854 | - """ |
855 | - ALL = DBItem(0, """ |
856 | - All |
857 | - |
858 | - This indicates that the list should simply include ALL |
859 | - specifications for the underlying object (person, product etc). |
860 | - """) |
861 | - |
862 | - COMPLETE = DBItem(5, """ |
863 | - Complete |
864 | - |
865 | - This indicates that the list should include only the complete |
866 | - specifications for this object. |
867 | - """) |
868 | - |
869 | - INCOMPLETE = DBItem(10, """ |
870 | - Incomplete |
871 | - |
872 | - This indicates that the list should include the incomplete items |
873 | - only. The rules for determining if a specification is incomplete are |
874 | - complex, depending on whether or not the spec is informational. |
875 | - """) |
876 | - |
877 | - INFORMATIONAL = DBItem(20, """ |
878 | - Informational |
879 | - |
880 | - This indicates that the list should include only the informational |
881 | - specifications. |
882 | - """) |
883 | - |
884 | - PROPOSED = DBItem(30, """ |
885 | - Proposed |
886 | - |
887 | - This indicates that the list should include specifications that have |
888 | - been proposed as goals for the underlying objects, but not yet |
889 | - accepted or declined. |
890 | - """) |
891 | - |
892 | - DECLINED = DBItem(40, """ |
893 | - Declined |
894 | - |
895 | - This indicates that the list should include specifications that were |
896 | - declined as goals for the underlying productseries or distroseries. |
897 | - """) |
898 | - |
899 | - ACCEPTED = DBItem(50, """ |
900 | - Accepted |
901 | - |
902 | - This indicates that the list should include specifications that were |
903 | - accepted as goals for the underlying productseries or distroseries. |
904 | - """) |
905 | - |
906 | - VALID = DBItem(55, """ |
907 | - Valid |
908 | - |
909 | - This indicates that the list should include specifications that are |
910 | - not obsolete or superseded. |
911 | - """) |
912 | - |
913 | - CREATOR = DBItem(60, """ |
914 | - Creator |
915 | - |
916 | - This indicates that the list should include specifications that the |
917 | - person registered in Launchpad. |
918 | - """) |
919 | - |
920 | - ASSIGNEE = DBItem(70, """ |
921 | - Assignee |
922 | - |
923 | - This indicates that the list should include specifications that the |
924 | - person has been assigned to implement. |
925 | - """) |
926 | - |
927 | - APPROVER = DBItem(80, """ |
928 | - Approver |
929 | - |
930 | - This indicates that the list should include specifications that the |
931 | - person is supposed to review and approve. |
932 | - """) |
933 | - |
934 | - DRAFTER = DBItem(90, """ |
935 | - Drafter |
936 | - |
937 | - This indicates that the list should include specifications that the |
938 | - person is supposed to draft. The drafter is usually only needed |
939 | - during spec sprints when there's a bottleneck on guys who are |
940 | - assignees for many specs. |
941 | - """) |
942 | - |
943 | - SUBSCRIBER = DBItem(100, """ |
944 | - Subscriber |
945 | - |
946 | - This indicates that the list should include all the specifications |
947 | - to which the person has subscribed. |
948 | - """) |
949 | - |
950 | - FEEDBACK = DBItem(110, """ |
951 | - Feedback |
952 | - |
953 | - This indicates that the list should include all the specifications |
954 | - which the person has been asked to provide specific feedback on. |
955 | - """) |
956 | - |
957 | - |
958 | -class SpecificationSort(EnumeratedType): |
959 | - """The scheme to sort the results of a specifications query. |
960 | - |
961 | - This is usually used in interfaces which ask for a filtered list of |
962 | - specifications, so that you can tell which specifications you would |
963 | - expect to see first. |
964 | - """ |
965 | - DATE = Item(""" |
966 | - Date |
967 | - |
968 | - This indicates a preferred sort order of date of creation, newest |
969 | - first. |
970 | - """) |
971 | - |
972 | - PRIORITY = Item(""" |
973 | - Priority |
974 | - |
975 | - This indicates a preferred sort order of priority (highest first) |
976 | - followed by status. This is the default sort order when retrieving |
977 | - specifications from the system. |
978 | - """) |
979 | - |
980 | - |
981 | -class SpecificationDefinitionStatus(DBEnumeratedType): |
982 | - """The current status of a Specification. |
983 | - |
984 | - This enum tells us whether or not a specification is approved, or still |
985 | - being drafted, or implemented, or obsolete in some way. The ordinality |
986 | - of the values is important, it's the order (lowest to highest) in which |
987 | - we probably want them displayed by default. |
988 | - """ |
989 | - |
990 | - APPROVED = DBItem(10, """ |
991 | - Approved |
992 | - |
993 | - The project team believe that the specification is ready to be |
994 | - implemented, without substantial issues being encountered. |
995 | - """) |
996 | - |
997 | - PENDINGAPPROVAL = DBItem(15, """ |
998 | - Pending Approval |
999 | - |
1000 | - Reviewed and considered ready for final approval. |
1001 | - The reviewer believes the specification is clearly written, |
1002 | - and adequately addresses all important issues that will |
1003 | - be raised during implementation. |
1004 | - """) |
1005 | - |
1006 | - PENDINGREVIEW = DBItem(20, """ |
1007 | - Review |
1008 | - |
1009 | - Has been put in a reviewer's queue. The reviewer will |
1010 | - assess it for clarity and comprehensiveness, and decide |
1011 | - whether further work is needed before the spec can be considered for |
1012 | - actual approval. |
1013 | - """) |
1014 | - |
1015 | - DRAFT = DBItem(30, """ |
1016 | - Drafting |
1017 | - |
1018 | - The specification is actively being drafted, with a drafter in place |
1019 | - and frequent revision occurring. |
1020 | - Do not park specs in the "drafting" state indefinitely. |
1021 | - """) |
1022 | - |
1023 | - DISCUSSION = DBItem(35, """ |
1024 | - Discussion |
1025 | - |
1026 | - Still needs active discussion, at a sprint for example. |
1027 | - """) |
1028 | - |
1029 | - NEW = DBItem(40, """ |
1030 | - New |
1031 | - |
1032 | - No thought has yet been given to implementation strategy, |
1033 | - dependencies, or presentation/UI issues. |
1034 | - """) |
1035 | - |
1036 | - SUPERSEDED = DBItem(60, """ |
1037 | - Superseded |
1038 | - |
1039 | - Still interesting, but superseded by a newer spec or set of specs that |
1040 | - clarify or describe a newer way to implement the desired feature. |
1041 | - Please use the newer specs and not this one. |
1042 | - """) |
1043 | - |
1044 | - OBSOLETE = DBItem(70, """ |
1045 | - Obsolete |
1046 | - |
1047 | - The specification has been obsoleted, probably because it was decided |
1048 | - against. People should not put any effort into implementing it. |
1049 | - """) |
1050 | - |
1051 | - |
1052 | -class SpecificationGoalStatus(DBEnumeratedType): |
1053 | - """The target status for this specification. |
1054 | - |
1055 | - This enum allows us to show whether or not the specification has been |
1056 | - approved or declined as a target for the given productseries or |
1057 | - distroseries. |
1058 | - """ |
1059 | - |
1060 | - ACCEPTED = DBItem(10, """ |
1061 | - Accepted |
1062 | - |
1063 | - The drivers have confirmed that this specification is targeted to |
1064 | - the stated distribution release or product series. |
1065 | - """) |
1066 | - |
1067 | - DECLINED = DBItem(20, """ |
1068 | - Declined |
1069 | - |
1070 | - The drivers have decided not to accept this specification as a goal |
1071 | - for the stated distribution release or product series. |
1072 | - """) |
1073 | - |
1074 | - PROPOSED = DBItem(30, """ |
1075 | - Proposed |
1076 | - |
1077 | - This spec has been submitted as a potential goal for the stated |
1078 | - product series or distribution release, but the drivers have not yet |
1079 | - accepted or declined that goal. |
1080 | - """) |
1081 | - |
1082 | - |
1083 | class SpecNameField(ContentNameField): |
1084 | |
1085 | errormessage = _("%s is already in use by another blueprint.") |
1086 | |
1087 | === modified file 'lib/lp/blueprints/interfaces/sprintspecification.py' |
1088 | --- lib/lp/blueprints/interfaces/sprintspecification.py 2010-08-20 20:31:18 +0000 |
1089 | +++ lib/lp/blueprints/interfaces/sprintspecification.py 2010-11-02 04:02:45 +0000 |
1090 | @@ -9,25 +9,13 @@ |
1091 | |
1092 | __all__ = [ |
1093 | 'ISprintSpecification', |
1094 | - 'SprintSpecificationStatus' |
1095 | ] |
1096 | |
1097 | -from lazr.enum import ( |
1098 | - DBEnumeratedType, |
1099 | - DBItem, |
1100 | - ) |
1101 | -from zope.interface import ( |
1102 | - Attribute, |
1103 | - Interface, |
1104 | - ) |
1105 | -from zope.schema import ( |
1106 | - Choice, |
1107 | - Datetime, |
1108 | - Int, |
1109 | - Text, |
1110 | - ) |
1111 | +from zope.interface import Attribute, Interface |
1112 | +from zope.schema import Choice, Datetime, Int, Text |
1113 | |
1114 | from canonical.launchpad import _ |
1115 | +from lp.blueprints.enums import SprintSpecificationStatus |
1116 | from lp.services.fields import PublicPersonChoice |
1117 | |
1118 | |
1119 | @@ -50,7 +38,7 @@ |
1120 | title=_('Specification'), required=True, readonly=True) |
1121 | status = Choice( |
1122 | title=_('Agenda Status'), required=True, |
1123 | - vocabulary='SprintSpecificationStatus') |
1124 | + vocabulary=SprintSpecificationStatus) |
1125 | whiteboard = Text( |
1126 | title=_('Whiteboard'), required=False, |
1127 | description=_( |
1128 | @@ -85,34 +73,3 @@ |
1129 | |
1130 | def declineBy(decider): |
1131 | """Flag the sprint as being declined by the decider.""" |
1132 | - |
1133 | - |
1134 | -class SprintSpecificationStatus(DBEnumeratedType): |
1135 | - """The current approval status of the spec on this sprint's agenda. |
1136 | - |
1137 | - This enum allows us to know whether or not the meeting admin team has |
1138 | - agreed to discuss an item. |
1139 | - """ |
1140 | - |
1141 | - ACCEPTED = DBItem(10, """ |
1142 | - Accepted |
1143 | - |
1144 | - The meeting organisers have confirmed this topic for the meeting |
1145 | - agenda. |
1146 | - """) |
1147 | - |
1148 | - DECLINED = DBItem(20, """ |
1149 | - Declined |
1150 | - |
1151 | - This spec has been declined from the meeting agenda |
1152 | - because of a lack of available resources, or uncertainty over |
1153 | - the specific requirements or outcome desired. |
1154 | - """) |
1155 | - |
1156 | - PROPOSED = DBItem(30, """ |
1157 | - Proposed |
1158 | - |
1159 | - This spec has been submitted for consideration by the meeting |
1160 | - organisers. It has not yet been accepted or declined for the |
1161 | - agenda. |
1162 | - """) |
1163 | |
1164 | === modified file 'lib/lp/blueprints/model/specification.py' |
1165 | --- lib/lp/blueprints/model/specification.py 2010-10-03 15:30:06 +0000 |
1166 | +++ lib/lp/blueprints/model/specification.py 2010-11-02 04:02:45 +0000 |
1167 | @@ -56,9 +56,7 @@ |
1168 | shortlist, |
1169 | ) |
1170 | from lp.blueprints.adapters import SpecificationDelta |
1171 | -from lp.blueprints.interfaces.specification import ( |
1172 | - ISpecification, |
1173 | - ISpecificationSet, |
1174 | +from lp.blueprints.enums import ( |
1175 | SpecificationDefinitionStatus, |
1176 | SpecificationFilter, |
1177 | SpecificationGoalStatus, |
1178 | @@ -67,6 +65,10 @@ |
1179 | SpecificationPriority, |
1180 | SpecificationSort, |
1181 | ) |
1182 | +from lp.blueprints.interfaces.specification import ( |
1183 | + ISpecification, |
1184 | + ISpecificationSet, |
1185 | + ) |
1186 | from lp.blueprints.model.specificationbranch import SpecificationBranch |
1187 | from lp.blueprints.model.specificationbug import SpecificationBug |
1188 | from lp.blueprints.model.specificationdependency import ( |
1189 | |
1190 | === modified file 'lib/lp/blueprints/model/sprint.py' |
1191 | --- lib/lp/blueprints/model/sprint.py 2010-08-20 20:31:18 +0000 |
1192 | +++ lib/lp/blueprints/model/sprint.py 2010-11-02 04:02:45 +0000 |
1193 | @@ -32,18 +32,16 @@ |
1194 | IHasMugshot, |
1195 | ILaunchpadCelebrities, |
1196 | ) |
1197 | -from lp.blueprints.interfaces.specification import ( |
1198 | +from lp.blueprints.enums import ( |
1199 | SpecificationFilter, |
1200 | SpecificationImplementationStatus, |
1201 | SpecificationSort, |
1202 | + SprintSpecificationStatus, |
1203 | ) |
1204 | from lp.blueprints.interfaces.sprint import ( |
1205 | ISprint, |
1206 | ISprintSet, |
1207 | ) |
1208 | -from lp.blueprints.interfaces.sprintspecification import ( |
1209 | - SprintSpecificationStatus, |
1210 | - ) |
1211 | from lp.blueprints.model.sprintattendance import SprintAttendance |
1212 | from lp.blueprints.model.sprintspecification import SprintSpecification |
1213 | from lp.registry.interfaces.person import validate_public_person |
1214 | |
1215 | === modified file 'lib/lp/blueprints/model/sprintspecification.py' |
1216 | --- lib/lp/blueprints/model/sprintspecification.py 2010-08-20 20:31:18 +0000 |
1217 | +++ lib/lp/blueprints/model/sprintspecification.py 2010-11-02 04:02:45 +0000 |
1218 | @@ -20,10 +20,8 @@ |
1219 | from canonical.database.datetimecol import UtcDateTimeCol |
1220 | from canonical.database.enumcol import EnumCol |
1221 | from canonical.database.sqlbase import SQLBase |
1222 | -from lp.blueprints.interfaces.sprintspecification import ( |
1223 | - ISprintSpecification, |
1224 | - SprintSpecificationStatus, |
1225 | - ) |
1226 | +from lp.blueprints.enums import SprintSpecificationStatus |
1227 | +from lp.blueprints.interfaces.sprintspecification import ISprintSpecification |
1228 | from lp.registry.interfaces.person import validate_public_person |
1229 | |
1230 | |
1231 | |
1232 | === modified file 'lib/lp/blueprints/subscribers.py' |
1233 | --- lib/lp/blueprints/subscribers.py 2010-08-20 20:31:18 +0000 |
1234 | +++ lib/lp/blueprints/subscribers.py 2010-11-02 04:02:45 +0000 |
1235 | @@ -5,7 +5,7 @@ |
1236 | |
1237 | |
1238 | from canonical.database.sqlbase import block_implicit_flushes |
1239 | -from lp.blueprints.interfaces.specification import SpecificationGoalStatus |
1240 | +from lp.blueprints.enums import SpecificationGoalStatus |
1241 | from lp.registry.interfaces.person import IPerson |
1242 | |
1243 | |
1244 | |
1245 | === modified file 'lib/lp/blueprints/vocabularies/specificationdependency.py' |
1246 | --- lib/lp/blueprints/vocabularies/specificationdependency.py 2010-10-24 21:00:11 +0000 |
1247 | +++ lib/lp/blueprints/vocabularies/specificationdependency.py 2010-11-02 04:02:45 +0000 |
1248 | @@ -28,7 +28,7 @@ |
1249 | SQLObjectVocabularyBase, |
1250 | ) |
1251 | |
1252 | -from lp.blueprints.interfaces.specification import SpecificationFilter |
1253 | +from lp.blueprints.enums import SpecificationFilter |
1254 | from lp.blueprints.model.specification import Specification |
1255 | from lp.registry.interfaces.pillar import IPillarNameSet |
1256 | |
1257 | |
1258 | === modified file 'lib/lp/code/model/tests/test_branch.py' |
1259 | --- lib/lp/code/model/tests/test_branch.py 2010-10-26 15:47:24 +0000 |
1260 | +++ lib/lp/code/model/tests/test_branch.py 2010-11-02 04:02:45 +0000 |
1261 | @@ -33,10 +33,8 @@ |
1262 | DatabaseFunctionalLayer, |
1263 | LaunchpadZopelessLayer, |
1264 | ) |
1265 | -from lp.blueprints.interfaces.specification import ( |
1266 | - ISpecificationSet, |
1267 | - SpecificationDefinitionStatus, |
1268 | - ) |
1269 | +from lp.blueprints.enums import SpecificationDefinitionStatus |
1270 | +from lp.blueprints.interfaces.specification import ISpecificationSet |
1271 | from lp.blueprints.model.specificationbranch import SpecificationBranch |
1272 | from lp.bugs.interfaces.bug import ( |
1273 | CreateBugParams, |
1274 | |
1275 | === modified file 'lib/lp/registry/browser/person.py' |
1276 | --- lib/lp/registry/browser/person.py 2010-10-24 13:02:07 +0000 |
1277 | +++ lib/lp/registry/browser/person.py 2010-11-02 04:02:45 +0000 |
1278 | @@ -231,7 +231,7 @@ |
1279 | UnexpectedFormData, |
1280 | ) |
1281 | from lp.blueprints.browser.specificationtarget import HasSpecificationsView |
1282 | -from lp.blueprints.interfaces.specification import SpecificationFilter |
1283 | +from lp.blueprints.enums import SpecificationFilter |
1284 | from lp.bugs.browser.bugtask import BugTaskSearchListingView |
1285 | from lp.bugs.interfaces.bugtask import ( |
1286 | BugTaskSearchParams, |
1287 | |
1288 | === modified file 'lib/lp/registry/browser/productseries.py' |
1289 | --- lib/lp/registry/browser/productseries.py 2010-09-27 14:19:29 +0000 |
1290 | +++ lib/lp/registry/browser/productseries.py 2010-11-02 04:02:45 +0000 |
1291 | @@ -92,10 +92,8 @@ |
1292 | from lp.blueprints.browser.specificationtarget import ( |
1293 | HasSpecificationsMenuMixin, |
1294 | ) |
1295 | -from lp.blueprints.interfaces.specification import ( |
1296 | - ISpecificationSet, |
1297 | - SpecificationImplementationStatus, |
1298 | - ) |
1299 | +from lp.blueprints.enums import SpecificationImplementationStatus |
1300 | +from lp.blueprints.interfaces.specification import ISpecificationSet |
1301 | from lp.bugs.browser.bugtask import BugTargetTraversalMixin |
1302 | from lp.bugs.interfaces.bugtask import ( |
1303 | BugTaskStatus, |
1304 | |
1305 | === modified file 'lib/lp/registry/browser/tests/milestone-views.txt' |
1306 | --- lib/lp/registry/browser/tests/milestone-views.txt 2010-10-18 22:24:59 +0000 |
1307 | +++ lib/lp/registry/browser/tests/milestone-views.txt 2010-11-02 04:02:45 +0000 |
1308 | @@ -171,8 +171,7 @@ |
1309 | The view provides a list of StatusCounts that summarise the targeted |
1310 | specifications and bugtasks. |
1311 | |
1312 | - >>> from lp.blueprints.interfaces.specification import ( |
1313 | - ... SpecificationImplementationStatus) |
1314 | + >>> from lp.blueprints.enums import SpecificationImplementationStatus |
1315 | |
1316 | >>> bugtask.transitionToAssignee(person) |
1317 | >>> engineer = factory.makePerson(name='engineer') |
1318 | |
1319 | === modified file 'lib/lp/registry/browser/tests/person-views.txt' |
1320 | --- lib/lp/registry/browser/tests/person-views.txt 2010-10-17 15:44:08 +0000 |
1321 | +++ lib/lp/registry/browser/tests/person-views.txt 2010-11-02 04:02:45 +0000 |
1322 | @@ -330,7 +330,7 @@ |
1323 | Assigned specifications that do not display when they are not in an in |
1324 | progress state. |
1325 | |
1326 | - >>> from lp.blueprints.interfaces.specification import SpecificationImplementationStatus |
1327 | + >>> from lp.blueprints.enums import SpecificationImplementationStatus |
1328 | |
1329 | >>> login(user.preferredemail.email) |
1330 | >>> product = factory.makeProduct(name="tool", owner=user) |
1331 | @@ -351,7 +351,7 @@ |
1332 | specifications is a link to show all the specifications that the user is |
1333 | working on. |
1334 | |
1335 | - >>> from lp.blueprints.interfaces.specification import SpecificationDefinitionStatus |
1336 | + >>> from lp.blueprints.enums import SpecificationDefinitionStatus |
1337 | |
1338 | >>> spec.definition_status = SpecificationDefinitionStatus.APPROVED |
1339 | >>> newstate = spec.updateLifecycleStatus(user) |
1340 | |
1341 | === modified file 'lib/lp/registry/doc/distribution.txt' |
1342 | --- lib/lp/registry/doc/distribution.txt 2010-10-17 15:44:08 +0000 |
1343 | +++ lib/lp/registry/doc/distribution.txt 2010-11-02 04:02:45 +0000 |
1344 | @@ -506,7 +506,7 @@ |
1345 | |
1346 | >>> kubuntu = distroset.getByName("kubuntu") |
1347 | |
1348 | - >>> from lp.blueprints.interfaces.specification import SpecificationFilter |
1349 | + >>> from lp.blueprints.enums import SpecificationFilter |
1350 | |
1351 | First, there should be one informational spec for kubuntu, but it is |
1352 | complete so it will not show up unless we explicitly ask for complete specs: |
1353 | @@ -570,7 +570,7 @@ |
1354 | |
1355 | We can get only valid specs (those that are not obsolete or superseded): |
1356 | |
1357 | - >>> from lp.blueprints.interfaces.specification import SpecificationDefinitionStatus |
1358 | + >>> from lp.blueprints.enums import SpecificationDefinitionStatus |
1359 | >>> login('mark@example.com') |
1360 | >>> for spec in kubuntu.specifications(): |
1361 | ... # Do this here, otherwise, the change will be flush before |
1362 | |
1363 | === modified file 'lib/lp/registry/doc/distroseries.txt' |
1364 | --- lib/lp/registry/doc/distroseries.txt 2010-10-19 18:44:31 +0000 |
1365 | +++ lib/lp/registry/doc/distroseries.txt 2010-11-02 04:02:45 +0000 |
1366 | @@ -903,7 +903,7 @@ |
1367 | >>> distroset = getUtility(IDistributionSet) |
1368 | >>> kubuntu = distroset.getByName("kubuntu") |
1369 | >>> krunch = kubuntu.getSeries("krunch") |
1370 | - >>> from lp.blueprints.interfaces.specification import SpecificationFilter |
1371 | + >>> from lp.blueprints.enums import SpecificationFilter |
1372 | |
1373 | First, there should be one informational specs for krunch: |
1374 | |
1375 | |
1376 | === modified file 'lib/lp/registry/doc/mentoringoffer.txt' |
1377 | --- lib/lp/registry/doc/mentoringoffer.txt 2010-10-19 18:44:31 +0000 |
1378 | +++ lib/lp/registry/doc/mentoringoffer.txt 2010-11-02 04:02:45 +0000 |
1379 | @@ -204,7 +204,7 @@ |
1380 | |
1381 | When a spec or a bug is completed, it drops off the mentoring lists. |
1382 | |
1383 | - >>> from lp.blueprints.interfaces.specification import SpecificationImplementationStatus |
1384 | + >>> from lp.blueprints.enums import SpecificationImplementationStatus |
1385 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
1386 | >>> bug2.is_complete |
1387 | False |
1388 | |
1389 | === modified file 'lib/lp/registry/doc/person.txt' |
1390 | --- lib/lp/registry/doc/person.txt 2010-10-19 18:44:31 +0000 |
1391 | +++ lib/lp/registry/doc/person.txt 2010-11-02 04:02:45 +0000 |
1392 | @@ -1194,7 +1194,7 @@ |
1393 | First, Carlos does not have any completed specifications assigned to |
1394 | him: |
1395 | |
1396 | - >>> from lp.blueprints.interfaces.specification import SpecificationFilter |
1397 | + >>> from lp.blueprints.enums import SpecificationFilter |
1398 | >>> carlos.specifications(filter=[ |
1399 | ... SpecificationFilter.ASSIGNEE, |
1400 | ... SpecificationFilter.COMPLETE]).count() |
1401 | |
1402 | === modified file 'lib/lp/registry/doc/product.txt' |
1403 | --- lib/lp/registry/doc/product.txt 2010-10-19 18:44:31 +0000 |
1404 | +++ lib/lp/registry/doc/product.txt 2010-11-02 04:02:45 +0000 |
1405 | @@ -410,7 +410,7 @@ |
1406 | informational. |
1407 | |
1408 | >>> firefox = productset.getByName('firefox') |
1409 | - >>> from lp.blueprints.interfaces.specification import SpecificationFilter |
1410 | + >>> from lp.blueprints.enums import SpecificationFilter |
1411 | |
1412 | First, there should be only one informational spec for firefox: |
1413 | |
1414 | |
1415 | === modified file 'lib/lp/registry/doc/productseries.txt' |
1416 | --- lib/lp/registry/doc/productseries.txt 2010-10-19 18:44:31 +0000 |
1417 | +++ lib/lp/registry/doc/productseries.txt 2010-11-02 04:02:45 +0000 |
1418 | @@ -191,7 +191,7 @@ |
1419 | is informational. |
1420 | |
1421 | >>> onezero = firefox.getSeries("1.0") |
1422 | - >>> from lp.blueprints.interfaces.specification import SpecificationFilter |
1423 | + >>> from lp.blueprints.enums import SpecificationFilter |
1424 | |
1425 | We will create two specs for onezero and use them to demonstrate the |
1426 | filtering. |
1427 | @@ -211,7 +211,7 @@ |
1428 | Now, we will make one of them accepted, the other declined, and both of |
1429 | them informational. |
1430 | |
1431 | - >>> from lp.blueprints.interfaces.specification import ( |
1432 | + >>> from lp.blueprints.enums import ( |
1433 | ... SpecificationDefinitionStatus, |
1434 | ... SpecificationImplementationStatus, |
1435 | ... ) |
1436 | |
1437 | === modified file 'lib/lp/registry/doc/projectgroup.txt' |
1438 | --- lib/lp/registry/doc/projectgroup.txt 2010-10-19 18:44:31 +0000 |
1439 | +++ lib/lp/registry/doc/projectgroup.txt 2010-11-02 04:02:45 +0000 |
1440 | @@ -134,7 +134,7 @@ |
1441 | We should be able to generate filtered lists of specs on a project. |
1442 | |
1443 | >>> mozilla = getUtility(IProjectGroupSet).getByName('mozilla') |
1444 | - >>> from lp.blueprints.interfaces.specification import SpecificationFilter |
1445 | + >>> from lp.blueprints.enums import SpecificationFilter |
1446 | |
1447 | First, there should be only one informational spec for mozilla: |
1448 | |
1449 | |
1450 | === modified file 'lib/lp/registry/model/distribution.py' |
1451 | --- lib/lp/registry/model/distribution.py 2010-10-24 12:46:23 +0000 |
1452 | +++ lib/lp/registry/model/distribution.py 2010-11-02 04:02:45 +0000 |
1453 | @@ -84,7 +84,7 @@ |
1454 | IServiceUsage, |
1455 | ) |
1456 | from lp.archivepublisher.debversion import Version |
1457 | -from lp.blueprints.interfaces.specification import ( |
1458 | +from lp.blueprints.enums import ( |
1459 | SpecificationDefinitionStatus, |
1460 | SpecificationFilter, |
1461 | SpecificationImplementationStatus, |
1462 | |
1463 | === modified file 'lib/lp/registry/model/distroseries.py' |
1464 | --- lib/lp/registry/model/distroseries.py 2010-10-18 04:19:10 +0000 |
1465 | +++ lib/lp/registry/model/distroseries.py 2010-11-02 04:02:45 +0000 |
1466 | @@ -68,7 +68,7 @@ |
1467 | ServiceUsage, |
1468 | service_uses_launchpad) |
1469 | from lp.app.interfaces.launchpad import IServiceUsage |
1470 | -from lp.blueprints.interfaces.specification import ( |
1471 | +from lp.blueprints.enums import ( |
1472 | SpecificationFilter, |
1473 | SpecificationGoalStatus, |
1474 | SpecificationImplementationStatus, |
1475 | |
1476 | === modified file 'lib/lp/registry/model/person.py' |
1477 | --- lib/lp/registry/model/person.py 2010-10-29 22:52:42 +0000 |
1478 | +++ lib/lp/registry/model/person.py 2010-11-02 04:02:45 +0000 |
1479 | @@ -163,7 +163,7 @@ |
1480 | from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy |
1481 | from canonical.launchpad.webapp.interfaces import ILaunchBag |
1482 | from canonical.lazr.utils import get_current_browser_request |
1483 | -from lp.blueprints.interfaces.specification import ( |
1484 | +from lp.blueprints.enums import ( |
1485 | SpecificationDefinitionStatus, |
1486 | SpecificationFilter, |
1487 | SpecificationImplementationStatus, |
1488 | |
1489 | === modified file 'lib/lp/registry/model/product.py' |
1490 | --- lib/lp/registry/model/product.py 2010-10-24 13:02:07 +0000 |
1491 | +++ lib/lp/registry/model/product.py 2010-11-02 04:02:45 +0000 |
1492 | @@ -90,7 +90,7 @@ |
1493 | ILaunchpadUsage, |
1494 | IServiceUsage, |
1495 | ) |
1496 | -from lp.blueprints.interfaces.specification import ( |
1497 | +from lp.blueprints.enums import ( |
1498 | SpecificationDefinitionStatus, |
1499 | SpecificationFilter, |
1500 | SpecificationImplementationStatus, |
1501 | |
1502 | === modified file 'lib/lp/registry/model/productseries.py' |
1503 | --- lib/lp/registry/model/productseries.py 2010-10-18 20:40:05 +0000 |
1504 | +++ lib/lp/registry/model/productseries.py 2010-11-02 04:02:45 +0000 |
1505 | @@ -47,7 +47,7 @@ |
1506 | ServiceUsage, |
1507 | service_uses_launchpad) |
1508 | from lp.app.interfaces.launchpad import IServiceUsage |
1509 | -from lp.blueprints.interfaces.specification import ( |
1510 | +from lp.blueprints.enums import ( |
1511 | SpecificationDefinitionStatus, |
1512 | SpecificationFilter, |
1513 | SpecificationGoalStatus, |
1514 | |
1515 | === modified file 'lib/lp/registry/model/projectgroup.py' |
1516 | --- lib/lp/registry/model/projectgroup.py 2010-10-18 13:04:50 +0000 |
1517 | +++ lib/lp/registry/model/projectgroup.py 2010-11-02 04:02:45 +0000 |
1518 | @@ -55,12 +55,10 @@ |
1519 | from lp.answers.model.question import QuestionTargetSearch |
1520 | from lp.app.enums import ServiceUsage |
1521 | from lp.app.errors import NotFoundError |
1522 | -from lp.blueprints.interfaces.specification import ( |
1523 | +from lp.blueprints.enums import ( |
1524 | SpecificationFilter, |
1525 | SpecificationImplementationStatus, |
1526 | SpecificationSort, |
1527 | - ) |
1528 | -from lp.blueprints.interfaces.sprintspecification import ( |
1529 | SprintSpecificationStatus, |
1530 | ) |
1531 | from lp.blueprints.model.specification import ( |
1532 | |
1533 | === modified file 'lib/lp/registry/stories/person/xx-person-working-on.txt' |
1534 | --- lib/lp/registry/stories/person/xx-person-working-on.txt 2009-10-09 21:07:32 +0000 |
1535 | +++ lib/lp/registry/stories/person/xx-person-working-on.txt 2010-11-02 04:02:45 +0000 |
1536 | @@ -19,8 +19,7 @@ |
1537 | >>> login('foo.bar@canonical.com') |
1538 | >>> from canonical.launchpad.webapp import canonical_url |
1539 | >>> from lp.bugs.interfaces.bugtask import BugTaskStatus |
1540 | - >>> from lp.blueprints.interfaces.specification import ( |
1541 | - ... SpecificationImplementationStatus) |
1542 | + >>> from lp.blueprints.enums import SpecificationImplementationStatus |
1543 | >>> spec = factory.makeSpecification() |
1544 | >>> spec.assignee = spec.owner |
1545 | >>> spec.implementation_status = SpecificationImplementationStatus.STARTED |
1546 | |
1547 | === modified file 'lib/lp/registry/tests/test_project_milestone.py' |
1548 | --- lib/lp/registry/tests/test_project_milestone.py 2010-10-04 19:50:45 +0000 |
1549 | +++ lib/lp/registry/tests/test_project_milestone.py 2010-11-02 04:02:45 +0000 |
1550 | @@ -23,11 +23,11 @@ |
1551 | ) |
1552 | from lazr.restfulclient.errors import ClientError |
1553 | |
1554 | -from lp.blueprints.interfaces.specification import ( |
1555 | - ISpecificationSet, |
1556 | +from lp.blueprints.enums import ( |
1557 | SpecificationDefinitionStatus, |
1558 | SpecificationPriority, |
1559 | ) |
1560 | +from lp.blueprints.interfaces.specification import ISpecificationSet |
1561 | from lp.bugs.interfaces.bug import CreateBugParams |
1562 | from lp.bugs.interfaces.bugtask import ( |
1563 | BugTaskSearchParams, |
1564 | |
1565 | === modified file 'lib/lp/testing/factory.py' |
1566 | --- lib/lp/testing/factory.py 2010-10-27 22:33:01 +0000 |
1567 | +++ lib/lp/testing/factory.py 2010-11-02 04:02:45 +0000 |
1568 | @@ -98,10 +98,8 @@ |
1569 | from lp.app.enums import ServiceUsage |
1570 | from lp.archiveuploader.dscfile import DSCFile |
1571 | from lp.archiveuploader.uploadpolicy import BuildDaemonUploadPolicy |
1572 | -from lp.blueprints.interfaces.specification import ( |
1573 | - ISpecificationSet, |
1574 | - SpecificationDefinitionStatus, |
1575 | - ) |
1576 | +from lp.blueprints.enums import SpecificationDefinitionStatus |
1577 | +from lp.blueprints.interfaces.specification import ISpecificationSet |
1578 | from lp.blueprints.interfaces.sprint import ISprintSet |
1579 | from lp.bugs.interfaces.bug import ( |
1580 | CreateBugParams, |
1581 | |
1582 | === modified file 'scripts/import-zope-specs.py' |
1583 | --- scripts/import-zope-specs.py 2010-10-03 15:30:06 +0000 |
1584 | +++ scripts/import-zope-specs.py 2010-11-02 04:02:45 +0000 |
1585 | @@ -16,13 +16,18 @@ |
1586 | from zope.component import getUtility |
1587 | from BeautifulSoup import BeautifulSoup |
1588 | |
1589 | +from canonical.launchpad.scripts import execute_zcml_for_scripts |
1590 | from canonical.lp import initZopeless |
1591 | -from canonical.lp.dbschema import ( |
1592 | - SpecificationStatus, SpecificationGoalStatus, SpecificationDelivery, |
1593 | - SpecificationPriority) |
1594 | -from canonical.launchpad.scripts import execute_zcml_for_scripts |
1595 | -from canonical.launchpad.interfaces import ( |
1596 | - IPersonSet, IProductSet, ISpecificationSet) |
1597 | +from lp.blueprints.enums import ( |
1598 | + SpecificationStatus, |
1599 | + SpecificationGoalStatus, |
1600 | + SpecificationDelivery, |
1601 | + SpecificationPriority, |
1602 | + ) |
1603 | +from lp.blueprints.interfaces.specification import ISpecificationSet |
1604 | +from lp.registry.interfaces.person import IPersonSet |
1605 | +from lp.registry.interfaces.product import IProductSet |
1606 | + |
1607 | |
1608 | WIKI_BASE = 'http://wiki.zope.org/zope3/' |
1609 | PROPOSAL_LISTS = ['Zope3Proposals', 'OldProposals', 'DraftProposals'] |
Post-review: looks good, a review would have been a time waste. Thanks for doing this.