Skip to content

Commit aa4f9e0

Browse files
committed
Staging Commit for Workflow
Upgrading to Workflow involves many changes. These few are basicially non-invasive and set the stage for what is to come. Introduced: workflow.html - a help page for the new idea of Workflow CommitFest.STATUS_PARKED New Workflow Model to implement Workflow rules and functionality Enforcement of the Following Constraints: - "At most one" non-Closed Commitfest Status Presence - "At most one" non-Moved POC Status Presence - Closed POC status include leavedate, otherwise it is absent Also, added a convenience Make target for restoring test environment Also, added *.inc to the .editorconfig for html fragments Workflow Highlights: Commitfests are now just Future-In Progress-Closed Yearly Close/Create at v18 Feature Freeze: Drafts v19, Bugs v18
1 parent 309d9f7 commit aa4f9e0

File tree

11 files changed

+667
-1
lines changed

11 files changed

+667
-1
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ trim_trailing_whitespace = true
1212
indent_style = space
1313
indent_size = 4
1414

15-
[*.html]
15+
[*.{html,inc}]
1616
indent_style = space
1717
indent_size = 1

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ lint-fix-unsafe:
1616
npx @biomejs/biome check --fix --unsafe
1717

1818
fix: format lint-fix-unsafe
19+
20+
init-dev:
21+
dropdb --if-exists pgcommitfest
22+
createdb pgcommitfest
23+
./manage.py migrate
24+
./manage.py loaddata auth_data.json
25+
./manage.py loaddata commitfest_data.json

pgcommitfest/commitfest/fixtures/auth_data.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,41 @@
8888
"groups": [],
8989
"user_permissions": []
9090
}
91+
},
92+
{
93+
"model": "auth.user",
94+
"pk": 6,
95+
"fields": {
96+
"password": "",
97+
"last_login": null,
98+
"is_superuser": false,
99+
"username": "prolific-author",
100+
"first_name": "Prolific",
101+
"last_name": "Author",
102+
"email": "",
103+
"is_staff": false,
104+
"is_active": true,
105+
"date_joined": "2025-01-01T00:00:00",
106+
"groups": [],
107+
"user_permissions": []
108+
}
109+
},
110+
{
111+
"model": "auth.user",
112+
"pk": 7,
113+
"fields": {
114+
"password": "",
115+
"last_login": null,
116+
"is_superuser": false,
117+
"username": "prolific-reviewer",
118+
"first_name": "Prolific",
119+
"last_name": "Reviewer",
120+
"email": "",
121+
"is_staff": false,
122+
"is_active": true,
123+
"date_joined": "2025-01-01T00:00:00",
124+
"groups": [],
125+
"user_permissions": []
126+
}
91127
}
92128
]

pgcommitfest/commitfest/fixtures/commitfest_data.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@
6060
"enddate": "2025-05-31"
6161
}
6262
},
63+
{
64+
"model": "commitfest.commitfest",
65+
"pk": 5,
66+
"fields": {
67+
"name": "Drafts v18",
68+
"status": 5,
69+
"startdate": "2024-09-01",
70+
"enddate": "2025-08-31"
71+
}
72+
},
6373
{
6474
"model": "commitfest.topic",
6575
"pk": 1,
@@ -237,6 +247,25 @@
237247
]
238248
}
239249
},
250+
{
251+
"model": "commitfest.patch",
252+
"pk": 8,
253+
"fields": {
254+
"name": "Test DGJ Multi-Author and Reviewer",
255+
"topic": 3,
256+
"wikilink": "",
257+
"gitlink": "",
258+
"targetversion": 1,
259+
"committer": 4,
260+
"created": "2025-02-01T00:00",
261+
"modified": "2025-02-01T00:00",
262+
"lastmail": null,
263+
"authors": [6,3],
264+
"reviewers": [7,1],
265+
"subscribers": [],
266+
"mailthread_set": []
267+
}
268+
},
240269
{
241270
"model": "commitfest.patchoncommitfest",
242271
"pk": 1,
@@ -325,6 +354,17 @@
325354
"status": 1
326355
}
327356
},
357+
{
358+
"model": "commitfest.patchoncommitfest",
359+
"pk": 9,
360+
"fields": {
361+
"patch": 8,
362+
"commitfest": 5,
363+
"enterdate": "2025-02-01T00:00:00",
364+
"leavedate": null,
365+
"status": 1
366+
}
367+
},
328368
{
329369
"model": "commitfest.patchhistory",
330370
"pk": 1,
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
from django.db import migrations
2+
3+
class Migration(migrations.Migration):
4+
dependencies = [
5+
("commitfest", "0010_add_failing_since_column"),
6+
]
7+
operations = [
8+
migrations.RunSQL("""
9+
CREATE UNIQUE INDEX cf_enforce_maxoneopen_idx
10+
ON commitfest_commitfest (status)
11+
WHERE status not in (4);
12+
"""),
13+
14+
migrations.RunSQL("""
15+
CREATE UNIQUE INDEX poc_enforce_maxoneoutcome_idx
16+
ON commitfest_patchoncommitfest (patch_id)
17+
WHERE status not in (5);
18+
"""),
19+
20+
migrations.RunSQL("""
21+
ALTER TABLE commitfest_patchoncommitfest
22+
ADD CONSTRAINT status_and_leavedate_correlation
23+
CHECK ((status IN (4,5,6,7,8)) = (leavedate IS NOT NULL));
24+
"""),
25+
26+
migrations.RunSQL("""
27+
COMMENT ON COLUMN commitfest_patchoncommitfest.leavedate IS
28+
$$A leave date is recorded in two situations, both of which
29+
means this particular patch-cf combination became inactive
30+
on the corresponding date. For status 5 the patch was moved
31+
to some other cf. For 4,6,7, and 8, this was the final cf.
32+
$$
33+
"""),
34+
35+
migrations.RunSQL("""
36+
COMMENT ON TABLE commitfest_patchoncommitfest IS
37+
$$This is a re-entrant table: patches may become associated
38+
with a given cf multiple times, resetting the entrydate and clearing
39+
the leavedate each time. Non-final statuses never have a leavedate
40+
while final statuses always do. The final status of 5 (moved) is
41+
special in that all but one of the rows a patch has in this table
42+
must have it as the status.
43+
$$
44+
"""),
45+
]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from django.db import migrations, models
2+
3+
class Migration(migrations.Migration):
4+
dependencies = [
5+
("commitfest", "0011_add_status_related_constraints"),
6+
]
7+
operations = [
8+
migrations.AlterField(
9+
model_name="commitfest",
10+
name="status",
11+
field=models.IntegerField(
12+
choices=[
13+
(1, "Future"),
14+
(2, "Open"),
15+
(3, "In Progress"),
16+
(4, "Closed"),
17+
(5, "Parked"),
18+
],
19+
default=1,
20+
),
21+
)
22+
]

0 commit comments

Comments
 (0)