Commit Graph

31 Commits

Author SHA1 Message Date
BethanyG
f3a33846a2 March sync of practice exercise docs. (#3880)
Problem Spec Sync.
2025-03-22 11:49:38 -07:00
BethanyG
664f1dbd91 [Sieve]: Update content.md for Comprehension Approach (#3865)
Added language about the disallowed `%` operator to the Comprehensions approach.
2025-02-14 11:56:08 -08:00
Erik Schierboom
41366ab871 Sync the sieve exercise's docs with the latest data. (#3664) 2024-03-31 11:19:26 -07:00
colinleach
7e3a633b18 [Sieve]: Draft approaches (#3626)
* [Sieve]: Draft approaches

* fixes various typos and random gibberish

* Update introduction.md

* Update exercises/practice/sieve/.approaches/comprehensions/content.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/comprehensions/content.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/comprehensions/content.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/comprehensions/content.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/nested-loops/content.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/comprehensions/content.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/comprehensions/snippet.txt

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/nested-loops/content.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/nested-loops/snippet.txt

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update exercises/practice/sieve/.approaches/comprehensions/content.md

Does this add a spurious extra space after the link?

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Removed graph from content.md

To save us forgetting it later.

* Delete timeit_bar_plot.svg

I didn't intend to commit this in the first place.

* removed space from content.md

* Update exercises/practice/sieve/.approaches/nested-loops/content.md

* Update exercises/practice/sieve/.approaches/nested-loops/content.md

* Update exercises/practice/sieve/.approaches/introduction.md

* Update exercises/practice/sieve/.approaches/introduction.md

* Update exercises/practice/sieve/.approaches/introduction.md

* Code Block Corrections

Somehow, the closing of the codeblocks got dropped.  Added them back in, along with final typo corrections.

---------

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2024-02-11 21:32:46 -08:00
Erik Schierboom
ca9bd6ffe7 Convert backtick (`) admonition fences to tildes (~) (#3509)
* Convert backtick (`) admonition fences to tildes (~).
* Updated Grains Test file to Fix CI
[no important files changed]
---------

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2023-09-27 14:36:49 -07:00
BethanyG
dc28ef2224 [Problem Spec Sync] Practice Exercise Instruction Sync (#3507)
* Synced exercise insructions with problem specifications.
* Delete exercises/practice/raindrops/.articles/Progression Revised.md
   --> File added by mistake.  Still needs additions and revisions before committing.
2023-09-22 01:20:13 -07:00
BethanyG
be794198e1 [Resistor Color Expert]: Corrected Small Typos (#3469)
* Corrected small typos around resistor bands.

* Due to failing CI, alterations to the test generator script were needed.
The generated vs submitted diff now skips the first three lines of the file
so that the generation date is not picked up and flagged as needing regeneration.

Sadly, a workaround was also needed to prevent Python difflib from noting the difference
anyways and producing an empty "false positive" diff.

All templates and test files also needed to be altered to ensure that the first three
lines of every test file will always be the autogeneration comment and date.

Hopefully, this will now stop the CI failures without creating any subtle additional bugs.

* Touch up to bowling template.  Added back the error raising utility.
* Touch up to two-bucket template to add back in error raising utility.
[no important files changed]
2023-07-21 16:54:40 -07:00
BethanyG
aa3e379ff1 [DOCS]: Update Python Versions and Requirements (#3467)
* Additional sweep to update Python versions and supported Python versions.
* Fixed requirements and CONTRIBUTING.
* Trying a different line skip to see if it fixes CI.  CI is failing on test file generation again.
* Once again re-rendering tests to see if it fixes CI.
[no important files changed]
2023-07-16 15:09:14 -07:00
BethanyG
b49664ac66 [Tooling]: Changed Generate Script to Skip Diffing Generated Comments & Timestamp (#3466)
* Changed generate script to skp diffing generated comments and timestamp at top of file.
* Reordered and regenerated test files for practice exercises.
[no important files changed]
2023-07-15 15:27:31 -07:00
BethanyG
e7a6b0dc7d [JinJa2] Corrected the macro used for comments on the test file. (#3373)
* Corrected the macro for comments on the test file.
* Added current_date (utcnow()) variable available for template macros.
* Removed unnecessary datetime import from macros file.
* Regenerated all practice exercise test files to add timestamp.
* Changed `datetime.now(tz=timezone.utc)` to `datetime.now(tz=timezone.utc).date()`
* Second regeneration to remove `timestamp` and just keep `date` for test files.
[no important files changed]
2023-07-14 15:52:15 -07:00
Angeleah
2a0a4f6342 Removed footer macros, regen tests, all still pass (#3426)
[no important files changed]
2023-07-14 12:35:55 -07:00
BethanyG
3162bd4fe3 Synced instructions and introduction files from problem specs. (#3423) 2023-07-14 15:50:28 +02:00
Katrina Owen
7124a3b10e Sync sieve docs with problem-specifications
The sieve exercise has been overhauled as part of a project
to make practice exercises more consistent and friendly.

For more context, please see the discussion in the forum, as well as
the pull request that updated the exercise in the problem-specifications
repository:

- https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943
- https://github.com/exercism/problem-specifications/pull/2216

----

If you approve this pull request, I will eventually merge it. However, if you are happy with this change **please merge the pull request**, as it will get the changes into the hands of the students much more quickly.
2023-03-07 11:49:42 -08:00
Katrina Owen
5dacb7aba9 Reformat exercise config files
This runs the `bin/configlet fmt --update` command to
reformat the exercise configs.
2022-12-04 22:44:15 -08:00
Katrina Owen
5b2722ebf2 Sync docs with problem-specifications
Most of the docs changes recently have been formatting-related,
though in a few exercises there have also been improvements to
the descriptions in an attempt to make the exercises easier to
understand.
2022-11-19 09:40:16 -08:00
Katrina Owen
1ce3e3b1a4 Sync exercise metadata with problem-specifications
This syncs all the metadata for all the practice exercises with
upstream changes in problem-specifications, in one fell swoop.

The changes are all nitpicky changes made in order to ensure that
source urls all use https rather than http, along with some
tweaks to better describe the source of certain exercises.
2022-11-16 20:23:33 -08:00
BethanyG
a2c0e7e29f Sync practice exercise instructions with problem-specifications.
Pulled in updates to instructions from problem specifications.
2022-02-09 20:08:58 -08:00
Job van der Wal
7ae5ab7971 Lint all practice exercises starting with 's' 2021-11-28 23:28:18 +01:00
Erik Schierboom
15095b4b41 Simplify the tests.toml files by removing any include = true properties, which are redundant as the default value of this field is true.
As the vast majority of the test cases use `include = true`, omitting it makes the `tests.toml` files more readable and make the exceptional cases (`include = false`) far easier to identify.

See https://github.com/exercism/configlet/issues/186 and https://github.com/exercism/configlet/issues/207 for the corresponding discussion.
2021-05-04 12:47:55 -07:00
Erik Schierboom
7f4ae18429 Removed oable as contributor 2021-04-03 10:09:59 -07:00
Erik Schierboom
de8bee5f6c Add authors and contributors to Practice Exercises
For each Practice Exercise, we've looked at the commit history of its files to see which commits touched that Practice Exercise.

Each commit that we could associate with a Practice Exercise was used to determine authorship/contributorship.

### Authors

1. Find the Git commit author of the oldest commit linked to that Practice Exercise
2. Find the GitHub username for the Git commit author of that commit
3. Add the GitHub username of the Git commit author to the `authors` key in the `.meta/config.json` file

### Contributors

1. Find the Git commit authors and any co-authors of all but the oldest commit linked to that Practice Exercise. If there is only one commit, there won't be any contributors.
1. Exclude the Git commit author and any co-authors of the oldest commit from the list of Git commit authors (an author is _not_ also a contributor)
2. Find the GitHub usernames for the Git commit authors and any co-authors of those commits
3. Add the GitHub usernames of the Git commit authors and any co-authors to the `contributor` key in the `.meta/config.json` file

We used the GitHub GraphQL API to find the username of a commit author or any co-authors. In some cases though, a username cannot be found for a commit (e.g. due to the user account no longer existing), in which case the commit was skipped.

## Renames

There are a small number of Practice Exercises that might have been renamed at some point. You can ask Git to "follow" a file over its renames using `git log --follow <file>`, which will also return commits made before renames. Unfortunately, Git does not store renames, it just stores the contents of the renamed files and tries to guess if a file was renamed by looking at its contents. This _can_ (and will) lead to false positives, where Git will think a file has been renamed whereas it hasn't. As we don't want to have incorrect authors/contributors for exercises, we're ignoring renames. The only exception to this are known exercise renames:

- `bracket-push` was renamed to `matching-brackets`
- `retree` was renamed to `satellite`
- `resistor-colors` was renamed to `resistor-color-duo`
- `kindergarden-garden` was renamed to `kindergarten-garden`

## Exclusions

There are some commits that we skipped over, and which thus didn't influence the authors/contributors list:

- Commits authored by `dependabot[bot]`, `dependabot-preview[bot]` or `github-actions[bot]`
- Bulk update PRs made by `ErikSchierboom` or `kytrinx` to update the track
2021-04-03 10:09:59 -07:00
Erik Schierboom
5b3ddf182d Sync file paths in .meta/config.json with track file path patterns 2021-03-24 08:42:31 -07:00
Erik Schierboom
d7e74d084a Add blurb to Practice Exercise .meta/config.json files
Each Practice Exercise will have to define a blurb, which is a short description of the exercise.
The blurb will be displayed on a track's exercises page (e.g. https://exercism.lol/tracks/csharp/exercises).

For Practice Exercises that are based on an exercise defined in the problem-specification repo, the blurb must match the contents of the problem-specifications exercises, which is defined in its `metadata.yml` file. In this commit, we'll do an initial syncing of the blurb. The new [configlet](https://github.com/exercism/configlet) version will add support for doing this syncing automatically.

If the Practice Exercise was _not_ based on a problems-specifications exercise, we've used the blurb from its `.meta/metadata.yml` file as the blurb in the .meta/config.json file.

See [the spec](https://github.com/exercism/docs/blob/main/anatomy/tracks/practice-exercises.md#file-metaconfigjson) for more information.
2021-03-14 16:34:56 -07:00
Erik Schierboom
589f14dd59 Update tests.toml files to latest spec
Track maintainers found that they wanted to add comments to the tests.toml file to e.g. indicate _why_ a test was not included.
Unfortunately, running configlet sync would re-generate the entire file so any manually added comments were lost.

In this commit we're updating the format of tests.toml files to support adding comments.
We do this by creating a separate table for each test case which has `description` and `include` fields.
Tracks are then free to add additional fields, like a `comment` field, but also anything they feel might be useful to them.

For more information, see this discussion: https://github.com/exercism/configlet/issues/186
2021-03-02 09:34:43 -08:00
Erik Schierboom
aa9e69aaee [v3] Sync source information from prob-specs
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.
2021-02-09 14:36:10 -08:00
Erik Schierboom
2354601709 [v3] Create instruction from prob-specs descriptions
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.
2021-02-09 14:36:10 -08:00
Erik Schierboom
513d1bbb86 [v3] Remove README.md files
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.
2021-02-09 14:36:10 -08:00
Erik Schierboom
f84fdc98f3 [v3] Create .meta/config.json files
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.
2021-02-09 14:36:10 -08:00
Corey McCandless
ae3be07737 use python3.8 in CI and run test generator 2021-02-01 19:08:02 -08:00
Corey McCandless
d7e8e0c736 move practice exercise example solutions to .meta/ 2021-02-01 19:08:02 -08:00
Erik Schierboom
c5d9d9c0b3 [v3] Move existing exercises to exercises/practice 2021-01-29 11:14:36 -05:00