Skip to content

Commit 37f7644

Browse files
authored
feat(docs): Formal Schemas for Signed Docs (#208)
* docs(docs): Add wip files for formal signed document schemas * docs: wip * feat: wip * feat: Signed Docs formal specs WIP * feat: Add draft7 jsonschema to meta templates schema definitions * feat: Add CI actions to check generated data matches schema * fix: try and fix project name for CI * fix: remove obsolete files * fix: fix markdown * fix: spelling * fix: Make sure json version of document specifications is sorted to make change tracking easier. * feat: Add base types information to the json version of the document specifications * fix: add recommended justfile extension for vscode * feat: Example of building docs directly from specification data * fix: spelling * fix: Spelling and Markdown * feat: Add documentation auto generation for new signed documents * feat: Add status which allows a reference to define one or multiple references. * feat: Add three states to document submission and change the names to more align with intent vs business logic behaviour. * feat: Rationalize ref/ref_hash and collation into a single `ref` metadata field. * feat: Fix validation issues * feat: Signed Doc defintion improvements WIP * feat: Signed docs Docs generation WIP * feat(docs): Formal signed doc specs auto markdown generation WIP * feat(docs): Add start of individual documentation pages for each signed document defined * feat: individual document specifications now generated * feat: Add generation of document realtionship diagram * fix: Relationship diagram generation * fix: Build signed doc specs into the architecture documentation * fix: remove unused link * fix: spelling * fix: spec index needs sub documents * fix: Put all metadata in doc diafram. Add doc diagram to pages * fix: Remove single doc diagram untilwe fix links * fix: Add individual document relationship images to each page
1 parent db44fa1 commit 37f7644

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+8196
-340
lines changed

.config/dictionaries/project.dic

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ crontabs
5151
crontagged
5252
csprng
5353
cstring
54+
cuelang
5455
dalek
5556
dashmap
5657
Datelike
@@ -123,6 +124,7 @@ jorm
123124
jormungandr
124125
Jörmungandr
125126
jsonschema
127+
Justfile
126128
kiduri
127129
lcov
128130
Leay
@@ -141,6 +143,7 @@ logcall
141143
lookaside
142144
maindbname
143145
mapref
146+
markdownlint
144147
mdlint
145148
mdns
146149
MEMMAP
@@ -200,6 +203,7 @@ pubkey
200203
publickey
201204
pubspec
202205
pwrite
206+
pytest
203207
qpsg
204208
quic
205209
rapidoc

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,7 @@ $RECYCLE.BIN/
8484
# Dart stuff
8585
/pubspec.lock
8686
/.dart_tool/**/*
87+
88+
# Python stuff
89+
.pytest_cache
90+
__pycache__

.markdownlint-cli2.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"ignores": [
1111
".config/dictionaries/**",
1212
"**/target/**",
13-
"**/.dart_tool/**"
13+
"**/.dart_tool/**",
14+
"**/.pytest_cache/**"
1415
],
1516
// Set standard config options in `/.markdownlint.jsonc`
1617
"config": {

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@
2424
"dtsvet.vscode-wasm",
2525
"terrastruct.d2",
2626
"fill-labs.dependi",
27+
"nefrob.vscode-just-syntax",
28+
"charliermarsh.ruff",
29+
"ms-python.python",
2730
]
2831
}

Justfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ check-spelling:
1515
earthly +check-spelling
1616

1717

18+
# Fix and Check Markdown files
19+
format-python-code:
20+
ruff check --select I --fix .
21+
ruff format .
22+
23+
# Fix and Check Markdown files
24+
lint-python:
25+
ruff check .
26+
27+
# generates specifications data
28+
gen_specs:
29+
just specs/pre-push
30+
1831
# Pre Push Checks - intended to be run by a git pre-push hook.
19-
pre-push: check-markdown check-spelling
32+
pre-push: gen_specs check-markdown check-spelling format-python-code lint-python
2033
just rust/pre-push

docs/Earthfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.3.0 AS docs-ci
44

55

66
IMPORT .. AS repo
7+
IMPORT ../specs AS specs
78

89
# Copy all the source we need to build the docs
910
src:
@@ -13,6 +14,9 @@ src:
1314
# Now copy into that any artifacts we pull from the builds.
1415
COPY --dir repo+repo-docs/repo /docs/includes
1516

17+
# Copy our generated Signed Document Specification data.
18+
COPY specs+src/signed_doc.json /docs/includes
19+
1620

1721
# Build the docs here.
1822
docs:
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
title: Catalyst Documents
2-
arrange:
3-
- proposal.md
4-
- review.md
5-
- comment.md

docs/src/architecture/08_concepts/catalyst_docs/comment.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ A list of used [Catalyst Signed Document protected header fields](./../signed_do
4646
"content-encoding" => "br"
4747
```
4848

49-
* [`ref`](./../signed_doc/meta.md#ref-document-reference).
49+
* [`ref`](./../signed_doc/metadata.md#ref-document-reference).
5050
Reference to a related [Proposal Document],
5151
which [`type`](./../signed_doc/spec.md#type) must be equal to
5252
[proposal document `type`][Proposal Document] field value.
5353

54-
* [`template`](./../signed_doc/meta.md#ref-document-reference).
54+
* [`template`](./../signed_doc/metadata.md#ref-document-reference).
5555
A reference to the comment template document,
5656
which [`type`](./../signed_doc/spec.md#type) must be equal to
5757
[comment template `type`](#comment-template) field value.
5858

59-
* [`reply`](./../signed_doc/meta.md#reply-reply-reference) (optional).
59+
* [`reply`](./../signed_doc/metadata.md#reply-reply-reference) (optional).
6060
A reference to another comment document,
6161
where the comment is in reply to the referenced comment.
6262
The [`type`](./../signed_doc/spec.md#type) of the replied document
@@ -65,7 +65,7 @@ A list of used [Catalyst Signed Document protected header fields](./../signed_do
6565
The referenced `comment` must be for the same proposal [`id`](./../signed_doc/spec.md#id),
6666
but can be for a different proposal [`ver`](./../signed_doc/spec.md#ver).
6767

68-
* [`section`](./../signed_doc/meta.md#section-section-reference) (optional).
68+
* [`section`](./../signed_doc/metadata.md#section-section-reference) (optional).
6969
Used when the comment only applies to a specific section to the document being commented upon,
7070
and not the entire document.
7171

@@ -106,7 +106,7 @@ A list of used [Catalyst Signed Document protected header fields](./../signed_do
106106
"content-encoding" => "br"
107107
```
108108

109-
* [`category_id`](./../signed_doc/meta.md#category_id) (optional).
109+
* [`category_id`](./../signed_doc/metadata.md#category_id) (optional).
110110
A reference to the category document,
111111
which [`type`](./../signed_doc/spec.md#type) must be equal to
112112
`48c20109-362a-4d32-9bba-e0a9cf8b45be` value.

docs/src/architecture/08_concepts/catalyst_docs/proposal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ A list of used [Catalyst Signed Document protected header fields](./../signed_do
5050
"content-encoding" => "br"
5151
```
5252

53-
* [`template`](./../signed_doc/meta.md#ref-document-reference).
53+
* [`template`](./../signed_doc/metadata.md#ref-document-reference).
5454
A reference to the proposal template document,
5555
which [`type`](./../signed_doc/spec.md#type) must be equal to
5656
[proposal template `type`](#proposal-template) field value.
5757

58-
* [`category_id`](./../signed_doc/meta.md#category_id) (optional).
58+
* [`category_id`](./../signed_doc/metadata.md#category_id) (optional).
5959
A reference to the category document,
6060
which [`type`](./../signed_doc/spec.md#type) must be equal to
6161
`48c20109-362a-4d32-9bba-e0a9cf8b45be` value.
@@ -112,7 +112,7 @@ A list of used [Catalyst Signed Document protected header fields](./../signed_do
112112
"content-encoding" => "br"
113113
```
114114

115-
* [`category_id`](./../signed_doc/meta.md#category_id) (optional).
115+
* [`category_id`](./../signed_doc/metadata.md#category_id) (optional).
116116
A reference to the category document,
117117
which [`type`](./../signed_doc/spec.md#type) must be equal to
118118
`48c20109-362a-4d32-9bba-e0a9cf8b45be` value.

docs/src/architecture/08_concepts/catalyst_docs/review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ A list of used [Catalyst Signed Document protected header fields](./../signed_do
4646
"content-encoding" => "br"
4747
```
4848

49-
* [`template`](./../signed_doc/meta.md#ref-document-reference).
49+
* [`template`](./../signed_doc/metadata.md#ref-document-reference).
5050
A reference to the review template document,
5151
which [`type`](./../signed_doc/spec.md#type) must be equal to
5252
[review template `type`](#review-template) field value.

0 commit comments

Comments
 (0)