Skip to content

Commit f7dc45f

Browse files
Update outdated docs (exercism#596)
1 parent 36505ba commit f7dc45f

File tree

3 files changed

+43
-46
lines changed

3 files changed

+43
-46
lines changed

CONTRIBUTING.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ Please keep the following in mind:
2929
exercise.
3030

3131
- Each problem should have a test suite, an example solution, and a template
32-
file for the real implementation. The example solution should be named
33-
`example.exs`.
32+
file for the real implementation. Read about [the anatomy of practice exercises][https://github.com/exercism/docs/blob/main/anatomy/tracks/practice-exercises.md] or [the anatomy of concept exercises][https://github.com/exercism/docs/blob/main/anatomy/tracks/concept-exercises.md], depending on to which type of exercise you want to contribute.
3433

35-
- Use typespecs in the example and template files as described [here](http://elixir-lang.org/getting-started/typespecs-and-behaviours.html).
34+
- For practice exercises, use typespecs in the example and template files as described [here](http://elixir-lang.org/getting-started/typespecs-and-behaviours.html).
3635

3736
- Each test file should have a `test_helper.exs` with code like the following
3837
at the top of the file. This allows the tests to be run on CI and configures

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ installation instructions can be found at
1414

1515
---
1616

17-
> It is recommended to test BEFORE submitting a PR. It will test your submission, ensure
17+
> It is recommended to test BEFORE submitting a PR. It will test your submission, ensure
1818
> that the repository builds as a whole, and help guard against unintentional, unrelated changes.
1919
2020
---
@@ -44,11 +44,13 @@ cd exercises/$EXERCISE_NAME
4444
mix test
4545
```
4646

47-
### Testing the Build
47+
### Dialyzer
4848

49-
TravisCI is used to test the build against different environments.
49+
To run dialyzer on all exercises, run `./bin/dialyzer_check.sh`. It might take a really long time the first time you run it. It will also be run for you by Github Actions as part of the PR check.
5050

51-
TravisCI's current testing routine can be found in [.travis.yml](https://github.com/exercism/elixir/blob/master/.travis.yml)
51+
### Code and document formatting
52+
53+
To check formatting of all exercises and all documents, run `./bin/check_formatting.sh`. It will also be run for you by Github Actions as part of the PR check.
5254

5355
## Contributing Guide
5456

reference/implementing-a-concept-exercise.md

+35-39
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ This document describes how to implement a Concept Exercise for the Elixir track
66

77
- [The features of v3][docs-features-of-v3].
88
- [Rationale for v3][docs-rationale-for-v3].
9-
- [What are concept exercise and how they are structured?][docs-concept-exercises]
9+
- [What are concepts and how they are structured?][anatomy-of-a-concept]
10+
- [What are concept exercise and how they are structured?][anatomy-of-a-concept-exercise]
1011

1112
Please also watch the following video:
1213

13-
- [The Anatomy of a Concept Exercise][anatomy-of-a-concept-exercise].
14+
- [The Anatomy of a Concept Exercise][anatomy-of-a-concept-exercise-video].
1415

1516
As this document is generic, the following placeholders are used:
1617

@@ -23,35 +24,35 @@ As this document is generic, the following placeholders are used:
2324
- `$first-and-last-name`: your first and last name (e.g. `Tim Austin`)
2425
- `$git-email`: the email address you use for git (e.g. `[email protected]`)
2526

26-
Before implementing the exercise, please make sure you have a good understanding of what the exercise should be teaching (and what not). This information can be found in the exercise's GitHub issue. Having done this, please read the [Elixir Concept exercises introduction][concept-exercises]. If you have come up with something completely new, create a new issue _first_ so we can discuss the Concept Exercise.
27+
Before implementing the exercise, please make sure you have a good understanding of what the exercise should be teaching (and what not). This information can be found in the exercise's GitHub issue. If you have come up with something completely new, create a new issue _first_ so we can discuss the Concept Exercise.
2728

2829
To implement a Concept Exercise, the following files must be added:
2930

3031
```text
31-
languages
32-
── elixir
33-
── concepts
34-
| ── $concept-1
35-
| ├── about.md
36-
| └── links.json
37-
└── exercises
38-
└── concept
39-
└── $slug
40-
├── .docs
41-
│ ├── instructions.md
42-
│ ├── introduction.md
43-
│ └── hints.md
44-
├── .meta
45-
│ ├── config.json
46-
│   ├── design.md
47-
│ └── exemplar.ex
48-
├── lib
49-
│   └── $elixir_slug.ex
50-
├── mix.exs
51-
├── mix.lock
52-
└── test
53-
├── $elixir_slug_test.exs
54-
└── test_helper.exs
32+
elixir
33+
── concepts
34+
| ── $concept-1
35+
| ── about.md
36+
| ├── introduction.md
37+
| └── links.json
38+
└── exercises
39+
└── concept
40+
└── $slug
41+
├── .docs
42+
│ ├── instructions.md
43+
│ ├── introduction.md
44+
│ └── hints.md
45+
├── .meta
46+
│ ├── config.json
47+
├── design.md
48+
│ └── exemplar.ex
49+
├── lib
50+
└── $elixir_slug.ex
51+
├── mix.exs
52+
├── mix.lock
53+
└── test
54+
├── $elixir_slug_test.exs
55+
└── test_helper.exs
5556
```
5657

5758
## Step 1: Add code files
@@ -61,24 +62,20 @@ The configuration files may be copied from another exercise. But it would be rec
6162
Now create the following three files:
6263

6364
- `lib/$elixir_slug.ex`. the stub implementation file, which is the starting point for students to work on the exercise.
64-
- `test/$elixir_slug_test.ex`: the test suite.
65+
- `test/$elixir_slug_test.exs`: the test suite.
6566
- `.meta/exemplar.ex`: an exemplar implementation that passes all the tests.
6667

6768
## Step 2: Add documentation files
6869

6970
How to create the files common to all tracks is described in the [how to implement a concept exercise document][how-to-implement-a-concept-exercise].
7071

71-
## Step 3: Update list of implemented exercises
72-
73-
- Add the exercise to the [list of implemented exercises][implemented-exercises].
74-
75-
## Step 4: Add analyzer (optional)
72+
## Step 3: Add analyzer (optional)
7673

7774
Some exercises could benefit from having an exercise-specific [analyzer][analyzer]. If so, specify what analysis rules should be applied to this exercise and why.
7875

7976
_Skip this step if you're not sure what to do._
8077

81-
## Step 5: Add representation (optional)
78+
## Step 4: Add representation (optional)
8279

8380
Some exercises could benefit from having an custom representation as generated by the [Elixir representer][representer]. If so, specify what changes to the representation should be applied and why.
8481

@@ -94,12 +91,11 @@ If you have any questions regarding implementing the exercise, please post them
9491

9592
[analyzer]: https://github.com/exercism/elixir-analyzer
9693
[representer]: https://github.com/exercism/elixir-representer
97-
[concept-exercises]: ../exercises/concept/README.md
9894
[how-to-implement-a-concept-exercise]: https://github.com/exercism/v3/blob/main/docs/maintainers/generic-how-to-implement-a-concept-exercise.md
99-
[docs-concept-exercises]: https://github.com/exercism/v3/blob/main/docs/concept-exercises.md
10095
[docs-rationale-for-v3]: https://github.com/exercism/v3/blob/main/docs/rationale-for-v3.md
10196
[docs-features-of-v3]: https://github.com/exercism/v3/blob/main/docs/features-of-v3.md
102-
[anatomy-of-a-concept-exercise]: https://www.youtube.com/watch?v=gkbBqd7hPrA
97+
[anatomy-of-a-concept]: https://github.com/exercism/docs/blob/main/anatomy/tracks/concepts.md
98+
[anatomy-of-a-concept-exercise]: https://github.com/exercism/docs/blob/main/anatomy/tracks/concept-exercises.md
99+
[anatomy-of-a-concept-exercise-video]: https://www.youtube.com/watch?v=gkbBqd7hPrA
103100
[reference]: https://github.com/exercism/v3/blob/main/reference/README.md
104-
[config-json]: https://github.com/exercism/v3/blob/master/docs/concept-exercises.md#metaconfigjson
105-
[implemented-exercises]: ../exercises/concept/README.md#implemented-exercises
101+
[config-json]: https://github.com/exercism/docs/blob/main/anatomy/tracks/config-json.md

0 commit comments

Comments
 (0)