Skip to content

Commit

Permalink
Clean up the "draft note" statuses. (#3002)
Browse files Browse the repository at this point in the history
* Clean up the "draft note" statuses.

And update the documentation for WG-NOTE and IG-NOTE, which are flagged by the code.

* Pubrules insists that the current version uses "DNOTE" for draft notes.

* Use the pubrules name for the draft note status.
  • Loading branch information
jyasskin authored Jan 10, 2025
1 parent 91ab8a9 commit 44b770a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions bikeshed/doctypes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,7 @@ def validateW3CStatus(status: Status) -> None:
m.die(
f"Under Process2021, {status.name} is no longer a valid status. Use NOTE (or one of its variants NOTE-ED, NOTE-FPWD, NOTE-WD) instead.",
)
if status.name == "NOTE-FPWD":
m.die(
"Under Process2021, Notes no longer have a 'first public' draft stage. Use NOTE-WD instead.",
)
5 changes: 4 additions & 1 deletion bikeshed/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,11 @@ def fillTextMacros(self, macros: t.DefaultDict[str, str], doc: t.SpecT) -> None:
macros["deadline"] = self.deadline.strftime(f"{self.deadline.day} %B %Y")
macros["isodeadline"] = self.deadline.strftime("%Y-%m-%d")
if doc.doctype.org.name == "W3C" and "Date" in doc.doctype.status.requires:
status_name = doc.doctype.status.name
if status_name == "NOTE-WD":
status_name = "DNOTE"
macros["version"] = (
f"https://www.w3.org/TR/{macros['year']}/{doc.doctype.status.name}-{macros['vshortname']}-{macros['cdate']}/"
f"https://www.w3.org/TR/{macros['year']}/{status_name}-{macros['vshortname']}-{macros['cdate']}/"
)
macros["history"] = f"https://www.w3.org/standards/history/{self.displayVshortname}/"
elif self.ED:
Expand Down
4 changes: 2 additions & 2 deletions bikeshed/spec-data/readonly/boilerplate/doctypes.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ org "w3c" {
requires "ED"
group-types "wg" "ig" "tag"
}
status "NOTE-WD" "W3C Working Draft" {
status "NOTE-WD" "W3C Group Draft Note" {
requires "ED" "TR" "Issue Tracking" "Date"
group-types "wg" "ig" "tag"
}
status "NOTE-FPWD" "W3C First Public Working Draft" {
status "NOTE-FPWD" "W3C First Public Group Draft Note" {
requires "ED" "TR" "Issue Tracking" "Date"
group-types "wg" "ig" "tag"
}
Expand Down
10 changes: 5 additions & 5 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1080,12 +1080,12 @@ Several keys are required information, and will cause the processor to flag an e
* PR: "W3C Proposed Recommendation"
* REC: "W3C Recommendation"
* PER: "W3C Proposed Edited Recommendation"
* WG-NOTE: "W3C Working Group Note"
* IG-NOTE: "W3C Interest Group Note"
* NOTE: "W3C Note" ([unclear what this is used for](https://github.com/w3c/tr-design/issues/124))
* WG-NOTE: "W3C Working Group Note" (removed by Process 2021)
* IG-NOTE: "W3C Interest Group Note" (removed by Process 2021)
* NOTE: "W3C Group Note"
* NOTE-ED: "Editor's Draft" of a Group Note
* NOTE-WD: "W3C Working Draft" of a Group Note
* NOTE-FPWD: "W3C First Public Working Draft" of a Group Note
* NOTE-WD: "W3C Draft Note"
* NOTE-FPWD: "W3C First Public Working Draft" of a Group Note (removed by Process 2021)
* MO: "W3C Member-only Draft"
* UD: "Unofficial Proposal Draft"
* CG-DRAFT: "Draft Community Group Report"
Expand Down

0 comments on commit 44b770a

Please sign in to comment.