Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions scripts/schema/workstreams.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,16 @@ items:

workstream:
type: object
required: [id, kind, name, parent, people]
required: [id, name, parent, people]
additionalProperties: false
properties:
# Stable slug, unique across all workstreams.
id:
type: string
minLength: 1
kind:
type: string
enum:
# Permanent operational group with recurring meetings,
# a GC liaison, and a TC sponsor.
- sig
name:
type: string
minLength: 1
# Grouping category. Only valid on kind: sig. Absent means specification (the default).
# Enforcement of the kind constraint is in scripts/validate-workstreams.py.
sigCategory:
type: string
enum:
Expand Down
2 changes: 0 additions & 2 deletions scripts/update-sig-tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ def extract_row_data(ws):
localization_sigs = []

for ws in workstreams:
if ws.get("kind") != "sig":
continue
category = ws.get("sigCategory")
parent = ws.get("parent", "none")

Expand Down
22 changes: 4 additions & 18 deletions scripts/validate-workstreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@
TBD = "tbd"
NONE = "none"

KIND_REQUIRED_ROLES = {
"sig": {"gcLiaison", "tcSponsor"},
}

VALID_PARENT_KINDS = {
"sig": {"sig"},
REQUIRED_ROLES = {
"gcLiaison", "tcSponsor",
}

MEMBERSHIP_REQUIRED_ROLES = {"gcLiaison", "tcSponsor", "specSponsor"}
Expand Down Expand Up @@ -101,10 +97,6 @@ def validate_workstreams_semantics(workstreams: list[dict], people_data: dict) -
continue

parent_kind = id_to_workstream[parent_id].get("kind", "")
if parent_kind not in VALID_PARENT_KINDS.get(kind, set()):
errors.append(
f"[{wid}] kind '{kind}' cannot have a parent of kind '{parent_kind}'"
)

for w in workstreams:
wid = w.get("id", "(unknown)")
Expand All @@ -119,18 +111,12 @@ def validate_workstreams_semantics(workstreams: list[dict], people_data: dict) -

for w in workstreams:
wid = w.get("id", "(unknown)")
kind = w.get("kind", "")

if "sigCategory" in w and kind != "sig":
errors.append(
f"[{wid}] sigCategory is only valid on kind 'sig'"
)

person_roles = {next(iter(pr)) for pr in w.get("people", [])}
for required_role in KIND_REQUIRED_ROLES.get(kind, set()):
for required_role in REQUIRED_ROLES:
if required_role not in person_roles:
errors.append(
f"[{wid}] kind '{kind}' requires at least one '{required_role}'"
f"[{wid}] SIG requires at least one '{required_role}'"
)

teams = people_data.get("teams", {})
Expand Down
Loading
Loading