Skip to content

Commit 1c959f9

Browse files
Document .meta/config.json file for concepts (#96)
1 parent f7d5ec6 commit 1c959f9

File tree

3 files changed

+73
-18
lines changed

3 files changed

+73
-18
lines changed

building/configlet/lint.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ The `config.json` file should have the following checks:
137137
- The `"concepts[].slug"` value must be a non-empty, non-blank, lowercased string using kebab-case
138138
- The `"concepts[].name"` key is required
139139
- The `"concepts[].name"` value must be a non-empty, non-blank, titleized string
140-
- The `"concepts[].blurb"` key is required
141-
- The `"concepts[].blurb"` value must be a non-empty, non-blank string with length <= 350
142140
- Each `"concepts"` value must have a `concept/<concepts.slug>/about.md` file. Linting rules for this file are specified below.
143141
- Each `"concepts"` value must have a `concept/<concepts.slug>/introduction.md` file. Linting rules for this file are specified below.
144142
- Each `"concepts"` value must have a `concept/<concepts.slug>/links.json` file. Linting rules for this file are specified below.
@@ -271,3 +269,21 @@ The `config.json` file should have the following checks:
271269
- The `"[].description"` value must be a non-empty, non-blank string
272270
- The `"[].icon_url"` property is optional
273271
- The `"[].icon_url"` value must be an URL
272+
273+
### Rule: concept/&lt;slug&gt;/.meta/config.json is valid
274+
275+
- The file must be valid JSON
276+
- The JSON root must be an object
277+
- The `"blurb"` key is required
278+
- The `"blurb"` value must be a non-empty, non-blank string with length <= 350
279+
- The `"authors"` key is required
280+
- The `"authors"` value must be an array
281+
- The `"authors"` values must be non-empty, non-blank strings
282+
- The `"authors"` values must not have duplicates
283+
- The `"authors"` values are treated case-insensitively
284+
- The `"contributors"` key is optional
285+
- The `"contributors"` value must be an array
286+
- The `"contributors"` values must be non-empty, non-blank strings
287+
- The `"contributors"` values must not have duplicates
288+
- The `"contributors"` values are treated case-insensitively
289+
- Users can only be listed in either the `"authors"` or `"contributors"` array (no overlap)

building/tracks/concepts.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,39 @@ Concept metadata is defined in the `concepts` key in the [config.json file](./co
1414
{
1515
"uuid": "b9a421b2-c5ff-4213-bd6d-b886da31ea0d",
1616
"slug": "numbers",
17-
"name": "Numbers",
18-
"blurb": "C# has two types of numbers: integers and floating-point numbers."
17+
"name": "Numbers"
1918
}
2019
]
2120
}
2221
```
2322

2423
## Files
2524

26-
Each concept has its own directory within the track's `concepts` directory. The name of the concept's directory must match the `slug` property of the concept, as defined in the [config.json file](./config-json.md#concept). Each concept directory must contain the following files:
25+
Each concept has its own directory within the track's `concepts` directory. The name of the concept's directory must match the `slug` property of the concept, as defined in the [config.json file](./config-json.md#concept).
26+
27+
A Concept has two types of files:
28+
29+
### Documentation files
30+
31+
These files are presented to the student to help explain the concept.
2732

2833
- `about.md`: provide information about the concept for a student who has completed the corresponding concept exercise to learn from and refer back to (required)
2934
- `introduction.md`: provide a brief introduction to a student who has not yet completed the corresponding concept exercise (required)
3035
- `links.json`: provide helpful links that provide more reading or information about a concept (required)
3136

37+
### Metadata files
38+
39+
These files are _not_ presented to the student, but used to define metadata of the concept.
40+
41+
- `.meta/config.json`: contains meta information on the concept (required)
42+
3243
### Example
3344

3445
<pre>
3546
concepts
3647
└── numbers
48+
├── .meta
49+
| └── config.json
3750
├── about.md
3851
├── introduction.md
3952
└── links.json
@@ -168,3 +181,35 @@ Links can also optionally have an `icon_url` field, which can be used to customi
168181
}
169182
]
170183
```
184+
185+
---
186+
187+
### File: `.meta/config.json`
188+
189+
**Purpose:** Contains meta information on the exercise.
190+
191+
**Presence:** Required
192+
193+
This file contains meta information on the exercise:
194+
195+
- `authors`: The GitHub username(s) of the exercise's author(s) (required)
196+
- Including reviewers if their reviews substantially change the exercise (to the extent where it feels like "you got there together")
197+
- `contributors`: The GitHub username(s) of the exercise's contributor(s) (optional)
198+
- Including reviewers if their reviews are meaningful/actionable/actioned.
199+
- `blurb`: A short description of this exercise. Its length must be <= 350. Markdown is _not_ supported (required)
200+
201+
If someone is both an author _and_ a contributor, only list that person as an author.
202+
203+
#### Example
204+
205+
```json
206+
{
207+
"authors": ["FSharpForever"],
208+
"contributors": ["IWantToHelp"],
209+
"blurb": "F# has two types of numbers: integers and floating-point numbers."
210+
}
211+
```
212+
213+
Note that:
214+
215+
- The order of authors and contributors is not significant and has no meaning.

building/tracks/config-json.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ Each concept is an entry in the top-level `concepts` array. The following fields
214214
- `uuid`: a V4 UUID that uniquely identifies the concept across all tracks
215215
- `slug`: the concept's slug, which is a lowercased, kebab-case string. The slug must be unique across all concepts within the track
216216
- `name`: the concept's name
217-
- `blurb`: a short description of the concept. Markdown is _not_ supported.
218217

219218
### Example
220219

@@ -224,17 +223,16 @@ Each concept is an entry in the top-level `concepts` array. The following fields
224223
{
225224
"uuid": "b9a421b2-c5ff-4213-bd6d-b886da31ea0d",
226225
"slug": "numbers",
227-
"name": "Numbers",
228-
"blurb": "C# has two types of numbers: integers and floating-point numbers."
226+
"name": "Numbers"
229227
}
230228
]
231229
}
232230
```
233231

234232
## Key features
235233

236-
The language's key features succinctly describe what the most important features of the language are.
237-
They are intended to upsell the more interesting features of a language to potential students.
234+
The language's key features succinctly describe what the most important features of the language are.
235+
They are intended to upsell the more interesting features of a language to potential students.
238236
Titles should strive to use as little technical jargon as possible, bearing in mind that students might not be familiar with what language-specific jargon means before learning that language.
239237

240238
The key features are specified in the top-level `key_features` field which is defined as an array of objects with the following fields:
@@ -404,26 +402,22 @@ This is an example of what a valid `config.json` file can look like:
404402
{
405403
"uuid": "2eb4a463-355f-46ef-ac55-a75ec5afdf86",
406404
"slug": "basics",
407-
"name": "Basics",
408-
"blurb": "C# is a statically-typed language, which means that everything has a type at compile-time"
405+
"name": "Basics"
409406
},
410407
{
411408
"uuid": "4466e33e-dcd2-4b1f-9d9d-2c4315bf5188",
412409
"slug": "if-statements",
413-
"name": "If Statements",
414-
"blurb": "An `if` statement can be used to conditionally execute code."
410+
"name": "If Statements"
415411
},
416412
{
417413
"uuid": "b9a421b2-c5ff-4213-bd6d-b886da31ea0d",
418414
"slug": "numbers",
419-
"name": "Numbers",
420-
"blurb": "C# has two types of numbers: integers and floating-point numbers."
415+
"name": "Numbers"
421416
},
422417
{
423418
"uuid": "7a86561d-173b-45c0-a53c-1ffd7b9ff259",
424419
"slug": "strings",
425-
"name": "Strings",
426-
"blurb": "C# strings are immutable sequences of Unicode characters."
420+
"name": "Strings"
427421
}
428422
],
429423
"key_features": [

0 commit comments

Comments
 (0)