@@ -6,14 +6,15 @@ We are using [Conventional Commit messages](https://www.conventionalcommits.org/
6
6
7
7
The most important prefixes you should have in mind are:
8
8
9
- * ` fix: ` which represents bug fixes, and correlates to a [ SemVer] ( https://semver.org/ )
9
+ - ` fix: ` which represents bug fixes, and correlates to a [ SemVer] ( https://semver.org/ )
10
10
patch.
11
- * ` feat: ` which represents a new feature, and correlates to a SemVer minor.
12
- * ` feat!: ` , or ` fix!: ` , ` refactor!: ` , etc., which represent a breaking change
11
+ - ` feat: ` which represents a new feature, and correlates to a SemVer minor.
12
+ - ` feat!: ` , or ` fix!: ` , ` refactor!: ` , etc., which represent a breaking change
13
13
(indicated by the ` ! ` ) and will result in a SemVer major.
14
14
15
15
This is the complete list of what is defined and if it is visible in the
16
16
changelog:
17
+
17
18
- 'feat' -> section: 'Features'
18
19
- 'feature' -> section: 'Features'
19
20
- 'fix' -> section: 'Bug Fixes'
@@ -26,10 +27,10 @@ changelog:
26
27
- 'test' -> section: 'Tests', hidden: true
27
28
- 'build' -> section: 'Build System', hidden: true
28
29
- 'ci' -> section: 'Continuous Integration', hidden: true
29
- ```
30
30
31
31
## 1 Usage
32
32
33
+ ```
33
34
Flags:
34
35
- `-h, --help`
35
36
- `-v, --verbose`
@@ -38,26 +39,25 @@ Sub-commands:
38
39
- `dsp-meta verify [file]`
39
40
- [file]: provide the path to the `.toml` file
40
41
- `dsp-meta convert`
41
-
42
-
43
-
44
-
42
+ ```
45
43
46
44
## HCL (HashiCorp Configuration Language) General Syntax
45
+
47
46
The Metadata Domain Specific Configuration syntax is based on the HCL (HashiCorp Configuration Language) syntax,
48
47
with a number of predefined domain specific named blocks. The following is a short introduction to the general syntax.
49
48
50
-
51
49
### Comments
50
+
52
51
Comments in HCL begin with the "#" symbol and can be placed on their own line or at the end of a line. They are used to
53
52
provide explanations or add context to the configuration.
54
-
53
+
55
54
``` hcl
56
55
# This is a comment in HCL
57
56
key = "value" # This is another comment
58
57
```
59
58
60
59
### Blocks
60
+
61
61
HCL organizes configuration into blocks. Each block starts with the block type followed by a set of braces ({}) that
62
62
enclose the block's contents. Blocks can be nested to represent hierarchical structures.
63
63
@@ -71,6 +71,7 @@ block_type {
71
71
```
72
72
73
73
### Multiple Blocks
74
+
74
75
HCL allows you to define multiple blocks of the same type within a configuration. Each block instance is separated by a newline.
75
76
76
77
``` hcl
@@ -84,6 +85,7 @@ block_type {
84
85
```
85
86
86
87
### Block Labels
88
+
87
89
A block has a type (` resource ` in this example). Each block type defines how many labels must follow the type keyword.
88
90
The resource block type expects two labels, which are ` aws_instance ` and ` example ` in the example below. A particular
89
91
block type may have any number of required labels, or it may require none as with the nested network_interface block
@@ -100,7 +102,8 @@ resource "aws_instance" "example" {
100
102
```
101
103
102
104
### Attributes
103
- Inside a block, you define attributes using the key-value syntax. The key and value are separated by an equal sign (=).
105
+
106
+ Inside a block, you define attributes using the key-value syntax. The key and value are separated by an equal sign (` = ` ).
104
107
Attributes define the properties or settings associated with the block.
105
108
106
109
``` hcl
@@ -110,8 +113,9 @@ block_type {
110
113
```
111
114
112
115
### Strings
116
+
113
117
HCL supports string values, which are enclosed in double quotes ("). Strings can contain alphanumeric characters,
114
- symbols, and spaces. To include a double quote within a string, you can escape it with a backslash (\ ) .
118
+ symbols, and spaces. To include a double quote within a string, you can escape it with a backslash (` \ ` ).
115
119
116
120
``` hcl
117
121
message = "Hello, World!"
@@ -120,6 +124,7 @@ escaped_string = "This string contains \"quotes\"."
120
124
```
121
125
122
126
### Numbers
127
+
123
128
HCL supports both integers and floating-point numbers. Numeric values are written without quotes.
124
129
125
130
``` hcl
@@ -128,6 +133,7 @@ pi = 3.14159
128
133
```
129
134
130
135
### Booleans
136
+
131
137
Boolean values are represented as either "true" or "false". They are not enclosed in quotes.
132
138
133
139
``` hcl
@@ -136,6 +142,7 @@ debug = false
136
142
```
137
143
138
144
### Lists
145
+
139
146
HCL supports lists, which are represented by square brackets ([ ] ). Elements in a list are separated by commas. Lists
140
147
can contain values of different types.
141
148
@@ -145,6 +152,7 @@ numbers = [1, 2, 3, 4, 5]
145
152
```
146
153
147
154
### Heredoc Syntax
155
+
148
156
HCL supports heredoc syntax for multiline strings. It is enclosed in triple double quotes ("""). Heredocs preserve
149
157
leading indentation and line breaks.
150
158
@@ -154,15 +162,16 @@ This is a multiline string.
154
162
It can span multiple lines.
155
163
"""
156
164
```
165
+
157
166
## Metadata HCL: Domain Specific Configuration Language for DSP Metadata
158
167
159
168
### Style Conventions
169
+
160
170
- All block types are lowercase
161
171
- Indent two spaces for each level of nesting
162
172
- When multiple arguments with single-line values appear on consecutive lines, align their equals signs (=)
163
173
- When both arguments and blocks appear together inside a block body, place all of the arguments together at the top
164
- and then place nested blocks below them. Use one blank line to separate the arguments from the blocks.
165
-
174
+ and then place nested blocks below them. Use one blank line to separate the arguments from the blocks.
166
175
167
176
### Project
168
177
@@ -218,7 +227,7 @@ project {
218
227
description = "Bern"
219
228
url = "https://www.geonames.org/2661552"
220
229
}
221
-
230
+
222
231
temporal_coverage periodo {
223
232
ref_id = "https://n2t.net/ark:/99152/p06c6g3pvr5"
224
233
description = "Under Mediation act, 1803-1814"
@@ -249,7 +258,6 @@ dataset {
249
258
}
250
259
```
251
260
252
-
253
261
### Person
254
262
255
263
``` hcl
0 commit comments