Skip to content

Commit d634f24

Browse files
stevenjneil-iohk
andauthored
feat(docs): Improve cddl definitions (#294)
* fix(docs): Updated TODO place holder text with context * fix(docs): Render docs with better placeholder * docs(docs): Add more detail to proposal document specification * docs(docs): Add details to the Proposal Comment document * docs(docs): Add more proposal submission actions specifications * docs(docs): random cleanups * docs(docs): fix markdown lint issues * docs(docs): Use a CID for the document hash * docs(docs): Add document revocations to proposals and comments * docs(docs): turn hash into a map for better future proofing * docs(docs): Use defined cbor tag and binary format for IPLD Content Identifiers (CID) * docs(docs): Removed obsolete cddl definition * docs(docs): WIP cleanup and validaetg cddl defintions * docs(docs): Prep work to make it easier to generate CDDL files from specification * docs(docs): WIP cleanup of CDDL generation * docs(docs): Remove empty protected headers, as they can't be empty * feat(docs): Use latest draft cat-ci which supports relative file includes in mkdocs * fix(docs): cddl generation improvements * fix(docs): misc bug fixes * feat(Python): Make sure all python in the repo is properly formatted and linted. * fix(docs): spelling * docs(docs): Properly generalize document, signature and metadata headers * feat(docs): Make types.md generate under the new framework * feat(docs): Improve metadata docs, and generate individual cddl files for metadata definitions. * fix(docs): lint issue * fix(docs): cleanup spec deserialization to make accessing data easier for individual page documentation. * fix(docs): Make individual pages with the new spec generation framework * fix: remove now unused files * docs(docs): Add all the new docs generation stuff * docs(docs): Fix lint issues * fix(docs): one sentence mper link markdown fix * fix(docs): spell checking for dummys * fix(docs): remove dev file * fix(docs): Fix spec generation validation * fix(docs): Use latest cat-ci version * fix(docs): remove duplicated status on spec generation/validation * fix(docs): rename iana_media_types to just media_type * feat(docs): Also support CoAP encoded media types. * fix(docs): Properly constrain CoAP types to the known media types. --------- Co-authored-by: neil-iohk <neil.mcauliffe@iohk.io>
1 parent b552d17 commit d634f24

File tree

107 files changed

+7115
-2991
lines changed

Some content is hidden

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

107 files changed

+7115
-2991
lines changed

.config/dictionaries/project.dic

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ blosc
2323
bmac
2424
bootstrapper
2525
BROTLI
26+
Cabe
2627
cantopen
2728
cardano
2829
carryforward
2930
CBOR
3031
cbork
3132
cddlc
3233
cdylib
34+
CELLBORDER
3335
CEST
3436
chacha
3537
CHAINCODE
@@ -60,10 +62,13 @@ dbsync
6062
dcbor
6163
decompressor
6264
delegators
65+
direnv
6366
displaydoc
6467
dleq
6568
dlog
6669
dockerhub
70+
docstrings
71+
doctests
6772
Dominik
6873
dotenv
6974
dotenvy
@@ -76,6 +81,7 @@ encryptor
7681
Errno
7782
Eternl
7883
excalidraw
84+
explicitely
7985
extn
8086
fadvise
8187
fcntl
@@ -90,6 +96,7 @@ fmmap
9096
fmtchk
9197
fmtfix
9298
fontawesome
99+
fontname
93100
fromfiledate
94101
fsgr
95102
fstat
@@ -102,10 +109,12 @@ getres
102109
giantstep
103110
gmtime
104111
gossipsub
112+
graphviz
105113
happ
106114
hardano
107115
Hardlink
108116
hasher
117+
headlabel
109118
heaptrack
110119
hexdigit
111120
highwater
@@ -120,13 +129,16 @@ ioerr
120129
iohk
121130
ipfs
122131
ipld
132+
ipynb
133+
isort
123134
jetbrains
124135
jorm
125136
jormungandr
126137
Jörmungandr
127138
jsonschema
128139
Justfile
129140
kiduri
141+
labelloc
130142
lcov
131143
Leay
132144
Leshiy
@@ -168,6 +180,7 @@ MPMC
168180
msvc
169181
Multiaddr
170182
multiera
183+
mypy
171184
nanos
172185
netkey
173186
nextest
@@ -185,6 +198,7 @@ outlen
185198
Outparam
186199
outpubkey
187200
parameterises
201+
penwidth
188202
permissioned
189203
permissionless
190204
pg_isready
@@ -205,9 +219,17 @@ pubkey
205219
publickey
206220
pubspec
207221
pwrite
222+
pycodestyle
223+
pydantic
224+
pydot
225+
pyenv
226+
Pyflakes
227+
pypackages
208228
pytest
229+
pytype
209230
qpsg
210231
quic
232+
rankdir
211233
rapidoc
212234
readlinkat
213235
redoc
@@ -251,6 +273,7 @@ subsec
251273
symlinkat
252274
syscall
253275
tacho
276+
taillabel
254277
testcase
255278
testcov
256279
testdocs
@@ -267,6 +290,7 @@ tofiledate
267290
toobig
268291
toolsets
269292
Traceback
293+
tstr
270294
txmonitor
271295
txns
272296
typenum
@@ -282,6 +306,7 @@ utimensat
282306
UTXO
283307
uuidv4
284308
uuidv7
309+
venv
285310
vitss
286311
Vkey
287312
vkeywitness

Earthfile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.4.0 AS mdlint-ci
4-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.4.0 AS cspell-ci
5-
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.4.1 AS mdlint-ci
4+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.4.1 AS cspell-ci
5+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.4.1 AS python-ci
6+
IMPORT github.com/input-output-hk/catalyst-ci:v3.4.1 AS cat-ci
67

78
FROM debian:stable-slim
89

@@ -42,9 +43,22 @@ repo-docs:
4243
COPY --dir *.md LICENSE-APACHE LICENSE-MIT .
4344

4445
SAVE ARTIFACT /repo repo
46+
47+
# We lint python globally in repos, so that all scripts and programs
48+
# are linted equally.
49+
# Its also fast.
50+
check-python:
51+
DO python-ci+LINT_PYTHON
52+
53+
# Sync standard configs.
54+
sync-config:
55+
FROM scratch
56+
COPY --dir cat-ci+repo-config/repo .
57+
58+
SAVE ARTIFACT /repo/ruff.toml AS LOCAL ruff.toml
4559

4660
# copy-specs : Copy the specs source folder.
4761
copy-specs:
4862
FROM scratch
4963
COPY --dir specs ./specs
50-
SAVE ARTIFACT /specs specs
64+
SAVE ARTIFACT /specs specs

Justfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ format-python-code:
2121
ruff format .
2222

2323
# Fix and Check Markdown files
24-
lint-python:
24+
lint-python: format-python-code
25+
ruff check --fix .
2526
ruff check .
2627

2728
# generates specifications data

docs/Earthfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.4.0 AS docs-ci
4-
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.4.1 AS docs-ci
54

65
IMPORT .. AS repo
76

docs/src/appendix/important/license.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ icon: material/license
99
??? note "Apache 2 License"
1010

1111
```text
12-
{{ include_file('includes/repo/LICENSE-APACHE', 0, -1, 8) }}
12+
{{ include_file('includes/repo/LICENSE-APACHE', indent=8) }}
1313
```
1414

1515
??? note "MIT License"
1616

1717
```text
18-
{{ include_file('includes/repo/LICENSE-MIT', 0, -1, 8) }}
18+
{{ include_file('includes/repo/LICENSE-MIT', indent=8) }}
1919
```

docs/src/appendix/tags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ icon: fontawesome/solid/tags
44

55
# Tag Index
66

7-
[TAGS]
7+
<!-- material/tags -->

docs/src/architecture/08_concepts/catalyst_voting/cddl/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION 0.8
22

3-
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cddl:v3.4.0 AS cddl-ci
3+
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cddl:v3.4.1 AS cddl-ci
44

55
check-cddl:
66
FROM cddl-ci+cddl-base

docs/src/architecture/08_concepts/catalyst_voting/gen_vote_tx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Project "Catalyst" requires a structure to keep people vote's data in the secure
2727
??? note "vote transaction definition: `gen_vote_tx.cddl`"
2828

2929
```CDDL
30-
{{ include_file('src/architecture/08_concepts/catalyst_voting/cddl/gen_vote_tx.cddl', indent=4) }}
30+
{{ include_file('./cddl/gen_vote_tx.cddl', indent=4) }}
3131
```
3232
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
3333

docs/src/architecture/08_concepts/catalyst_voting/v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ An original Jörmungandr blockchain's `VoteCast` transaction structure.
2929
??? note "V1 transaction definition: `jorm.abnf`"
3030

3131
```abnf
32-
{{ include_file('src/architecture/08_concepts/catalyst_voting/abnf/jorm.abnf', indent=4) }}
32+
{{ include_file('./abnf/jorm.abnf', indent=4) }}
3333
```
3434
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
3535

docs/src/architecture/08_concepts/catalyst_voting/v2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Following that spec need to define a `choice`, `proof` and `prop-id`.
6060
??? note "Public vote transaction v2 definition: `vote_tx_v2_public.cddl`"
6161

6262
```CDDL
63-
{{ include_file('src/architecture/08_concepts/catalyst_voting/cddl/vote_tx_v2_public.cddl', indent=4) }}
63+
{{ include_file('./cddl/vote_tx_v2_public.cddl', indent=4) }}
6464
```
6565
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
6666

@@ -84,7 +84,7 @@ Following that spec need to define a `choice`, `proof` and `prop-id`.
8484
??? note "Private vote transaction v2 definition: `vote_tx_v2_private.cddl`"
8585

8686
```CDDL
87-
{{ include_file('src/architecture/08_concepts/catalyst_voting/cddl/vote_tx_v2_private.cddl', indent=4) }}
87+
{{ include_file('./cddl/vote_tx_v2_private.cddl', indent=4) }}
8888
```
8989
<!-- markdownlint-enable max-one-sentence-per-line code-block-style -->
9090

0 commit comments

Comments
 (0)