Skip to content

Commit 37e2f4b

Browse files
committed
wip
1 parent fba3b3f commit 37e2f4b

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

specs/definitions/signed_docs/signed_doc.cue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import (
1818

1919
// Individual Signed Document Definition
2020
#signedDocument: {
21-
// Is the document finalized or not.
22-
// `false` if document fully defined, `true` otherwise.
21+
// If `true` the document not fully defined and still under the active development
2322
draft: bool | *false
2423

2524
// The Document Type Identifier

specs/generators/packages/spec/src/spec/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Document(BaseModel):
5050
_all_refs: list[str] = PrivateAttr(default_factory=empty_string_list)
5151
_refed_by: list[str] = PrivateAttr(default_factory=empty_string_list)
5252

53-
doc_name: str | None = Field(default=None) # Set when wwe get a document
53+
doc_name: str | None = Field(default=None) # Set when we get a document
5454

5555
model_config = ConfigDict(extra="forbid")
5656

specs/generators/pages/signed_doc/docs/document_page.md.jinja

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# {{ doc.name() }}
22

3+
{% if doc.draft() %}
4+
> :warning: This section are still under development and may be updated or revised.
5+
> These details are not yet confirmed and should not be used as the basis for any implementation.
6+
> Proceeding with implementation based on this draft is at the implementer's own risk
7+
> and may lead to incompatibility with the completed version.
8+
{% endif %}
9+
310
## Description
411

512
{{ doc.description_or_todo(doc._doc.description) }}

specs/generators/src/docs/doc_generator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ def name(self) -> str:
105105
if self._document_name is None:
106106
return "Unnamed"
107107
return self._document_name
108+
109+
def draft(self) -> bool:
110+
"""Return is the document 'draft' or not."""
111+
return self._doc.draft
108112

109113
@staticmethod
110114
def doc_name_to_filename(doc_name: str, template: str, *, extension: str = "md") -> str:

0 commit comments

Comments
 (0)