Skip to content

Update authors/contributors spec #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions building/configlet/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,15 @@ The `config.json` file should have the following checks:
- The file must be valid JSON
- The JSON root must be an object
- The `"authors"` key is required
- The `"authors"` value must be an non-empty array
- The `"authors[].github_username"` key is required
- The `"authors[].github_username"` key must be a non-empty, non-blank string
- The `"authors[].github_username"` value is treated case-insensitively
- The `"authors[].exercism_username"` key is optional
- The `"authors[].exercism_username"` key must be a non-empty, non-blank string
- The `"authors[].github_username"` value is treated case-insensitively
- The `"authors"` value must be a non-empty array
- The `"authors"` values must be non-empty, non-blank strings
- The `"authors"` values must not have duplicates
- The `"authors"` values are treated case-insensitively
- The `"contributors"` key is optional
- The `"contributors"` value must be an array
- The `"contributors[].github_username"` key is required
- The `"contributors[].github_username"` key must be a non-empty, non-blank string
- The `"contributors[].github_username"` value is treated case-insensitively
- The `"contributors[].exercism_username"` key is optional
- The `"contributors[].exercism_username"` key must be a non-empty, non-blank string
- The `"contributors[].exercism_username"` value is treated case-insensitively
- The `"contributors"` value must be a non-empty array
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requiring that contributors is non-empty is a new requirement in this PR, and it's not obvious that this was intended.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it should not have been. This is wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- The `"contributors"` values must be non-empty, non-blank strings
- The `"contributors"` values must not have duplicates
- The `"contributors"` values are treated case-insensitively
- Users can only be listed in either the `"authors"` or `"contributors"` array (no overlap)
- The `"files.solution"` key is required
- The `"files.solution"` value must be a non-empty array
Expand Down
33 changes: 9 additions & 24 deletions building/tracks/concept-exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,7 @@ If someone is both an author _and_ a contributor, only list that person as an au

```json
{
"authors": [
{
"github_username": "FSharpForever",
"exercism_username": "FSharpForever"
}
],
"authors": ["FSharpForever"],
"files": {
"solution": ["Lasagna.fs"],
"test": ["LasagnaTests.fs"],
Expand All @@ -318,33 +313,23 @@ If someone is both an author _and_ a contributor, only list that person as an au

#### Full Example

Assume that the user FSharpForever has written an exercise called `basics` for the F# track. PythonProfessor adapts the exercise for the Python track. Later on, the user PythonPerfection improves the exercise.
Assume that the user `FSharpForever` has written an exercise called `log-levels` for the F# track. `PythonProfessor` adapts the exercise for the Python track. Later on, the user `GladToHelp` improves the exercise.

```json
{
"contributors": [
{
"github_username": "PythonPerfection",
"exercism_username": "PythonPerfection"
}
],
"authors": [
{
"github_username": "PythonProfessor",
"exercism_username": "PythonProfessor"
}
],
"authors": ["PythonProfessor"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change this second example so it's more visibly different to the first pls?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like this (pushed change)?

"contributors": ["GladToHelp"],
"files": {
"solution": ["lasagna.py"],
"test": ["lasagna_test.py"],
"solution": ["log_levels.py"],
"test": ["log_levels_test.py"],
"exemplar": [".meta/exemplar.py"],
"editor": ["test_helper.py"]
},
"forked_from": ["fsharp/basics"],
"forked_from": ["fsharp/log-levels"],
"language_versions": ">=3.7",
"blurb": "Learn the basics of Python by cooking Guido's Gorgeous Lasagna",
"blurb": "Learn how to work with strings by processing log lines.",
"source": "Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Lasagne"
"source_url": "https://en.wikipedia.org/wiki/Log_file"
}
```

Expand Down
13 changes: 4 additions & 9 deletions building/tracks/practice-exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,13 @@ If someone is both an author _and_ a contributor, only list that person as an au

```json
{
"authors": [
{
"github_username": "FSharpForever",
"exercism_username": "FSharpForever"
}
],
"authors": ["FSharpForever"],
"files": {
"solution": ["Lasagna.fs"],
"test": ["LasagnaTests.fs"],
"solution": ["Bob.fs"],
"test": ["BobTests.fs"],
"example": [".meta/Example.fs"]
},
"blurb": "Learn the basics of F# by cooking Lucian's Luscious Lasagna"
"blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited"
}
```

Expand Down