[v3] Update Practice Exercises to latest spec#950
Merged
Conversation
Practice Exercises in Exercism v3 will have a `.meta/config.json` file that contains exercise-specific information like the names of the solution, test and example file(s). The `.meta/config.json` file will also contain any source information as defined for the corresponding problem-specifications exercise (if any). See [the spec](https://github.com/exercism/docs/blob/main/anatomy/tracks/practice-exercises.md) for more information.
Practice Exercises in Exercism v3 will be structured differently. One such change is that there won't be a (generated) README.md file anymore. This file will be replaced by `.docs/instructions.md` and optionally a `.docs/introduction.md` files. These files are copies of the information defined for their corresponding problem-specifications exercise (if any). Exercism v3 will build the README.md file that is sent via the CLI from these files contents, along with some other files. See [this document](https://github.com/exercism/docs/blob/main/anatomy/tracks/presentation.md) for more information. To add track-specific contents to the instructions and/or introduction, exercises can define the (optional) `introduction.append.md` and `instructions.append.md` files. If present, the contents of these files will automatically be append to their corresponding file when generating the README.md See [the spec](https://github.com/exercism/docs/blob/main/anatomy/tracks/practice-exercises.md) for more information.
Practice Exercises in Exercism v3 will be structured differently. One such change is that there won't be a (generated) README.md file anymore. This file will be replaced by `.docs/instructions.md` and optionally a `.docs/introduction.md` files. These files are copies of the information defined for their corresponding problem-specifications exercise (if any). Exercism v3 will build the README.md file that is sent via the CLI from these files contents, along with some other files. See [this document](https://github.com/exercism/docs/blob/main/anatomy/tracks/presentation.md) for more information. See [the spec](https://github.com/exercism/docs/blob/main/anatomy/tracks/practice-exercises.md) for more information.
While working on adding prerequisites to the Practice Exercises, we found that we really need two keys for Practice Exercises: - `practices`: Concepts that the Practice Exercise is actively helping a student to practice. These show up in the UI as "Practice this Concept in: TwoFer, Leap, etc` - `prerequisites`: The actual Concepts that should have been learnt by a student in order for them be able to do that Exercise. There are lots of advantages to having the two keys instead of using one key for two purposes, not least that having them split out gives the maintainers a lot more control over the order a student should be exposed to exercises (via the prerequisites) and also where they encourage them to try concepts (via practices), which in reality are quite different things. We have updated [the docs](https://github.com/exercism/docs/blob/master/anatomy/tracks/practice-exercises.md#practices) with more details and explanation on this.
Practice Exercises in Exercism v3 will be structured differently. One such change is that there won't be a (generated) README.md file anymore. This file will be replaced by `.docs/instructions.md` and optionally a `.docs/introduction.md` files. These files are copies of the information defined for their corresponding problem-specifications exercise (if any). The `.docs/instructions.md` file is a copy of the `instructions.md` file of the problem-specifications exercise, or if that does not exists, its `description.md` file. The new [configlet](https://github.com/exercism/configlet) version will add support for doing this syncing automatically. See [the spec](https://github.com/exercism/docs/blob/main/anatomy/tracks/practice-exercises.md) for more information.
Source information for Practice Exercises will be stored in their `.meta/config.json` file, in the (optional) `source` and/or `source_url` properties. This commit adds the source information from the corresponding problem-specifications exercise to the `.meta/config.json` file. The new [configlet](https://github.com/exercism/configlet) version will add support for doing this syncing automatically. Exercism v3 will automatically include the source information in the README.md file that is sent via the CLI using the source properties in the `.meta/config.json` file. See [the spec](https://github.com/exercism/docs/blob/main/anatomy/tracks/practice-exercises.md) for more information.
iHiD
reviewed
Feb 12, 2021
iHiD
left a comment
Member
There was a problem hiding this comment.
We are now merging this PR automatically so that we can continue to script further bulk-PRs to help you. Merging this PR will also help prepare your track for Exercism v3 and fix some configlet lint errors.
petertseng
pushed a commit
that referenced
this pull request
Jun 10, 2021
Rename the script into ``` bin/ensure-practice-exercise-descriptions-are-synced.sh ``` since what was once exercises are now called practice exercises. That which is called concept exercises is not shared between tracks, and so syncing their descriptions is not well-defined. This commit preserves the `override_message`: ``` override_message="I have confirmed ... no README check ..." ``` (censored to avoid triggering CI) in order to not pick a new slogan. While exercism/configlet#179 is being resolved, the only thing we can test is that each practice exercise has an instructions.md, which is the only description file that is always present after #950.
petertseng
pushed a commit
that referenced
this pull request
Jun 10, 2021
Rename the script into ``` bin/ensure-practice-exercise-descriptions-are-synced.sh ``` since what was once exercises are now called practice exercises. That which is called concept exercises is not shared between tracks, and so syncing their descriptions is not well-defined. This commit preserves the `override_message`: ``` override_message="I have confirmed ... no README check ..." ``` (censored to avoid triggering CI) in order to not pick a new slogan. While exercism/configlet#179 is being resolved, the only thing we can test is that each practice exercise has an instructions.md, which is the only description file that is always present after #950.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This week we've defined what the file structure looks like for Practice Exercises. Please skim through this docs PR that gives an overview of the changes, and see the spec for more information.
This PR applies changes to the track to conform to the latest spec. Each change is made as a separate commit, to help with reviewing. When merging this PR, I would suggest to not squash this to preserve the individual commits.
As having this PR merged is essential to prepare this track for Exercism v3, we'll automatically merge this PR one week after it was opened (if it hasn't been merged already).
Here are the changes made:
Add practices field to Practice Exercises
While working on adding prerequisites to the Practice Exercises, we found that we really need two keys for Practice Exercises:
practices: Concepts that the Practice Exercise is actively helping a student to practice. These show up in the UI as "Practice this Concept in: TwoFer, Leap, etc`prerequisites: The actual Concepts that should have been learnt by a student in order for them be able to do that Exercise.There are lots of advantages to having the two keys instead of using one key for two purposes, not least that having them split out gives the maintainers a lot more control over the order a student should be exposed to exercises (via the prerequisites) and also where they encourage them to try concepts (via practices), which in reality are quite different things.
We have updated the docs with more details and explanation on this.
Remove README.md files
v3 Practice Exercises won't have a (generated) README.md file anymore. This file will be replaced by
.docs/instructions.mdand optionally a.docs/introduction.mdfiles. These files are copies of the information defined for their corresponding problem-specifications exercise (if any).Exercism v3 will build the README.md file that is sent via the CLI from these files contents, along with some other files.
See this document for more information.
This PR removes the
README.mdfiles.Create instruction from prob-specs descriptions
The
.docs/instructions.mdfile is a copy of theinstructions.mdfile of the problem-specifications exercise, or if that does not exists, itsdescription.mdfile.The new configlet version will add support for doing this syncing automatically.
This PR adds the
.docs/instructions.mdfile from the problem-specifications exercise'sdescription.mdfile.Move .meta/hints.md to .docs/instructions.append.md
As noted above, v3 Practice Exercises will have a
.docs/instructions.mdand optionally a.docs/introduction.mdfile.To add track-specific contents to the instructions and/or introduction, exercises can define the (optional)
introduction.append.mdandinstructions.append.mdfiles. If present, the contents of these files will automatically be append to their corresponding file when generating the README.mdThis PR renames any
.meta/hints.mdfiles to.docs/instructions.append.md.Create .meta/config.json files
Practice Exercises in Exercism v3 will have a
.meta/config.jsonfile that contains exercise-specific information like the names of the solution, test and example file(s).The
.meta/config.jsonfile will also contain any source information as defined for the corresponding problem-specifications exercise (if any).This PR adds the
.meta/config.jsonfile.The contents of this file are temporary, and we'll submit follow-up PRs to update their values:
config.jsonfile, and then use configlet to generate the contents of thefilesproperty in the exercise's.meta/config.jsonfile based on the track-defined pattern.Tracking
exercism/v3-launch#16