Bootstrap 8th track
This commit is contained in:
32
.appends/.github/labels.yml
vendored
Normal file
32
.appends/.github/labels.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# ----------------------------------------------------------------------------------------- #
|
||||||
|
# These are the repository-specific labels that augment the Exercise-wide labels defined in #
|
||||||
|
# https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml. #
|
||||||
|
# ----------------------------------------------------------------------------------------- #
|
||||||
|
|
||||||
|
- name: "duplicate"
|
||||||
|
description: ""
|
||||||
|
color: "cccccc"
|
||||||
|
|
||||||
|
- name: "enhancement"
|
||||||
|
description: ""
|
||||||
|
color: "84b6eb"
|
||||||
|
|
||||||
|
- name: "invalid"
|
||||||
|
description: ""
|
||||||
|
color: "e6e6e6"
|
||||||
|
|
||||||
|
- name: "needs maintainer"
|
||||||
|
description: ""
|
||||||
|
color: "fc2929"
|
||||||
|
|
||||||
|
- name: "new track"
|
||||||
|
description: ""
|
||||||
|
color: "159818"
|
||||||
|
|
||||||
|
- name: "question"
|
||||||
|
description: ""
|
||||||
|
color: "cc317c"
|
||||||
|
|
||||||
|
- name: "wontfix"
|
||||||
|
description: ""
|
||||||
|
color: "ffffff"
|
||||||
69
.gitattributes
vendored
Normal file
69
.gitattributes
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Handle line endings automatically for files detected as text
|
||||||
|
# and leave all files detected as binary untouched.
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Force the following filetypes to have unix eols, so Windows does not break them
|
||||||
|
*.* text eol=lf
|
||||||
|
|
||||||
|
# Windows forced line-endings
|
||||||
|
/.idea/* text eol=crlf
|
||||||
|
|
||||||
|
# Custom for Visual Studio
|
||||||
|
*.cs diff=csharp
|
||||||
|
*.sln merge=union
|
||||||
|
*.csproj merge=union
|
||||||
|
*.vbproj merge=union
|
||||||
|
*.fsproj merge=union
|
||||||
|
*.dbproj merge=union
|
||||||
|
|
||||||
|
# Standard to msysgit
|
||||||
|
*.doc diff=astextplain
|
||||||
|
*.DOC diff=astextplain
|
||||||
|
*.docx diff=astextplain
|
||||||
|
*.DOCX diff=astextplain
|
||||||
|
*.dot diff=astextplain
|
||||||
|
*.DOT diff=astextplain
|
||||||
|
*.pdf diff=astextplain
|
||||||
|
*.PDF diff=astextplain
|
||||||
|
*.rtf diff=astextplain
|
||||||
|
*.RTF diff=astextplain
|
||||||
|
|
||||||
|
#
|
||||||
|
## These files are binary and should be left untouched
|
||||||
|
#
|
||||||
|
|
||||||
|
# (binary is a macro for -text -diff)
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.gif binary
|
||||||
|
*.ico binary
|
||||||
|
*.mov binary
|
||||||
|
*.mp4 binary
|
||||||
|
*.mp3 binary
|
||||||
|
*.flv binary
|
||||||
|
*.fla binary
|
||||||
|
*.swf binary
|
||||||
|
*.gz binary
|
||||||
|
*.zip binary
|
||||||
|
*.7z binary
|
||||||
|
*.ttf binary
|
||||||
|
*.eot binary
|
||||||
|
*.woff binary
|
||||||
|
*.pyc binary
|
||||||
|
*.pdf binary
|
||||||
|
*.ez binary
|
||||||
|
*.bz2 binary
|
||||||
|
*.swp binary
|
||||||
|
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.psd filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
||||||
|
# Force bash scripts to always use lf line endings so that if a repo is accessed
|
||||||
|
# in Unix via a file share from Windows, the scripts will work.
|
||||||
|
*.sh text eol=lf
|
||||||
|
|
||||||
|
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
|
||||||
|
# in Windows via a file share from Linux, the scripts will work.
|
||||||
|
*.{cmd,[cC][mM][dD]} text eol=crlf
|
||||||
|
*.{bat,[bB][aA][tT]} text eol=crlf
|
||||||
6
.github/CODEOWNERS
vendored
Normal file
6
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Code owners
|
||||||
|
.github/CODEOWNERS @exercism/maintainers-admin
|
||||||
|
|
||||||
|
# Changes to `fetch-configlet` should be made in the `exercism/configlet` repo
|
||||||
|
bin/fetch-configlet @exercism/maintainers-admin
|
||||||
|
bin/fetch-configlet.ps1 @exercism/maintainers-admin
|
||||||
201
.github/labels.yml
vendored
Normal file
201
.github/labels.yml
vendored
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
# --------------------------------------------------------------- #
|
||||||
|
# This is an auto-generated file - Do not manually edit this file #
|
||||||
|
# --------------------------------------------------------------- #
|
||||||
|
|
||||||
|
# This file is automatically generated by concatenating two files:
|
||||||
|
#
|
||||||
|
# 1. The Exercism-wide labels: defined in https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml
|
||||||
|
# 2. The repository-specific labels: defined in the `.appends/.github/labels.yml` file within this repository.
|
||||||
|
#
|
||||||
|
# If any of these two files change, a pull request is automatically created containing a re-generated version of this file.
|
||||||
|
# Consequently, to change repository-specific labels you should update the `.appends/.github/labels.yml` file and _not_ this file.
|
||||||
|
#
|
||||||
|
# When the pull request has been merged, the GitHub labels will be automatically updated by the "Sync labels" workflow.
|
||||||
|
# This typically takes 5-10 minutes.
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------- #
|
||||||
|
# These are the Exercism-wide labels which are shared across all repos. #
|
||||||
|
# --------------------------------------------------------------------- #
|
||||||
|
|
||||||
|
# The following Exercism-wide labels are used to show "tasks" on the website, which will point users to things they can contribute to.
|
||||||
|
|
||||||
|
# The `x:action/<value>` labels describe what sort of work the contributor will be engaged in when working on the issue
|
||||||
|
- name: "x:action/create"
|
||||||
|
description: "Work on something from scratch"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:action/fix"
|
||||||
|
description: "Fix an issue"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:action/improve"
|
||||||
|
description: "Improve existing functionality/content"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:action/proofread"
|
||||||
|
description: "Proofread text"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:action/sync"
|
||||||
|
description: "Sync content with its latest version"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
# The `x:knowledge/<value>` labels describe how much Exercism knowledge is required by the contributor
|
||||||
|
- name: "x:knowledge/none"
|
||||||
|
description: "No existing Exercism knowledge required"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:knowledge/elementary"
|
||||||
|
description: "Little Exercism knowledge required"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:knowledge/intermediate"
|
||||||
|
description: "Quite a bit of Exercism knowledge required"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:knowledge/advanced"
|
||||||
|
description: "Comprehensive Exercism knowledge required"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
# The `x:module/<value>` labels indicate what part of Exercism the contributor will be working on
|
||||||
|
- name: "x:module/analyzer"
|
||||||
|
description: "Work on Analyzers"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:module/concept"
|
||||||
|
description: "Work on Concepts"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:module/concept-exercise"
|
||||||
|
description: "Work on Concept Exercises"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:module/generator"
|
||||||
|
description: "Work on Exercise generators"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:module/practice-exercise"
|
||||||
|
description: "Work on Practice Exercises"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:module/representer"
|
||||||
|
description: "Work on Representers"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:module/test-runner"
|
||||||
|
description: "Work on Test Runners"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
# The `x:rep/<value>` labels describe the amount of reputation to award
|
||||||
|
#
|
||||||
|
# For more information on reputation and how these labels should be used,
|
||||||
|
# check out https://exercism.org/docs/using/product/reputation
|
||||||
|
- name: "x:rep/tiny"
|
||||||
|
description: "Tiny amount of reputation"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:rep/small"
|
||||||
|
description: "Small amount of reputation"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:rep/medium"
|
||||||
|
description: "Medium amount of reputation"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:rep/large"
|
||||||
|
description: "Large amount of reputation"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:rep/massive"
|
||||||
|
description: "Massive amount of reputation"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
# The `x:size/<value>` labels describe the expected amount of work for a contributor
|
||||||
|
- name: "x:size/tiny"
|
||||||
|
description: "Tiny amount of work"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:size/small"
|
||||||
|
description: "Small amount of work"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:size/medium"
|
||||||
|
description: "Medium amount of work"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:size/large"
|
||||||
|
description: "Large amount of work"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:size/massive"
|
||||||
|
description: "Massive amount of work"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
# The `x:status/<value>` label indicates if there is already someone working on the issue
|
||||||
|
- name: "x:status/claimed"
|
||||||
|
description: "Someone is working on this issue"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
# The `x:type/<value>` labels describe what type of work the contributor will be engaged in
|
||||||
|
- name: "x:type/ci"
|
||||||
|
description: "Work on Continuous Integration (e.g. GitHub Actions workflows)"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:type/coding"
|
||||||
|
description: "Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:type/content"
|
||||||
|
description: "Work on content (e.g. exercises, concepts)"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:type/docker"
|
||||||
|
description: "Work on Dockerfiles"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
- name: "x:type/docs"
|
||||||
|
description: "Work on Documentation"
|
||||||
|
color: "ffffff"
|
||||||
|
|
||||||
|
# This label can be added to accept PRs as part of Hacktoberfest
|
||||||
|
- name: "hacktoberfest-accepted"
|
||||||
|
description: "Make this PR count for hacktoberfest"
|
||||||
|
color: "ff7518"
|
||||||
|
|
||||||
|
# This Exercism-wide label is added to all automatically created pull requests that help migrate/prepare a track for Exercism v3
|
||||||
|
- name: "v3-migration 🤖"
|
||||||
|
description: "Preparing for Exercism v3"
|
||||||
|
color: "e99695"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------------------- #
|
||||||
|
# These are the repository-specific labels that augment the Exercise-wide labels defined in #
|
||||||
|
# https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml. #
|
||||||
|
# ----------------------------------------------------------------------------------------- #
|
||||||
|
|
||||||
|
- name: "duplicate"
|
||||||
|
description: ""
|
||||||
|
color: "cccccc"
|
||||||
|
|
||||||
|
- name: "enhancement"
|
||||||
|
description: ""
|
||||||
|
color: "84b6eb"
|
||||||
|
|
||||||
|
- name: "invalid"
|
||||||
|
description: ""
|
||||||
|
color: "e6e6e6"
|
||||||
|
|
||||||
|
- name: "needs maintainer"
|
||||||
|
description: ""
|
||||||
|
color: "fc2929"
|
||||||
|
|
||||||
|
- name: "new track"
|
||||||
|
description: ""
|
||||||
|
color: "159818"
|
||||||
|
|
||||||
|
- name: "question"
|
||||||
|
description: ""
|
||||||
|
color: "cc317c"
|
||||||
|
|
||||||
|
- name: "wontfix"
|
||||||
|
description: ""
|
||||||
|
color: "ffffff"
|
||||||
15
.github/workflows/configlet.yml
vendored
Normal file
15
.github/workflows/configlet.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: Configlet
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
configlet:
|
||||||
|
uses: exercism/github-actions/.github/workflows/configlet.yml@main
|
||||||
19
.github/workflows/sync-labels.yml
vendored
Normal file
19
.github/workflows/sync-labels.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: Tools
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- .github/labels.yml
|
||||||
|
- .github/workflows/sync-labels.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: 0 0 1 * * # First day of each month
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync-labels:
|
||||||
|
uses: exercism/github-actions/.github/workflows/labels.yml@main
|
||||||
39
.github/workflows/test.yml
vendored
Normal file
39
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# This workflow will do a clean install of the dependencies and run tests across different versions
|
||||||
|
#
|
||||||
|
# Replace <track> with the track name
|
||||||
|
# Replace <image-name> with an image to run the jobs on
|
||||||
|
# Replace <action to setup tooling> with a github action to setup tooling on the image
|
||||||
|
# Replace <install dependencies> with a cli command to install the dependencies
|
||||||
|
#
|
||||||
|
# Find Github Actions to setup tooling here:
|
||||||
|
# - https://github.com/actions/?q=setup&type=&language=
|
||||||
|
# - https://github.com/actions/starter-workflows/tree/main/ci
|
||||||
|
# - https://github.com/marketplace?type=actions&query=setup
|
||||||
|
#
|
||||||
|
# Requires scripts:
|
||||||
|
# - bin/test
|
||||||
|
|
||||||
|
name: <track> / Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
runs-on: <image-name>
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use <setup tooling>
|
||||||
|
uses: <action to setup tooling>
|
||||||
|
|
||||||
|
- name: Install project dependencies
|
||||||
|
run: <install dependencies>
|
||||||
|
|
||||||
|
- name: Run tests for all exercises
|
||||||
|
run: bin/test
|
||||||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
*.swp
|
||||||
|
.DS_Store
|
||||||
|
bin/configlet
|
||||||
|
bin/configlet.exe
|
||||||
82
CODE_OF_CONDUCT.md
Normal file
82
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# Code of Conduct
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
Exercism is a platform centered around empathetic conversation. We have a low tolerance for communication that makes anyone feel unwelcome, unsupported, insulted or discriminated against.
|
||||||
|
|
||||||
|
## Seen or experienced something uncomfortable?
|
||||||
|
|
||||||
|
If you see or experience abuse, harassment, discrimination, or feel unsafe or upset, please email [abuse@exercism.org](mailto:abuse@exercism.org?subject=%5BCoC%5D) and include \[CoC\] in the subject line. We will follow up with you as a priority.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
We actively monitor for Code of Conduct (CoC) violations and take any reports of violations extremely seriously. We have banned contributors, mentors and users due to violations.
|
||||||
|
|
||||||
|
After we receive a report of a CoC violation, we view that person's conversation history on Exercism and related communication channels and attempt to understand whether someone has deliberately broken the CoC, or accidentally crossed a line. We generally reach out to the person who has been reported to discuss any concerns we have and warn them that repeated violations will result in a ban. Sometimes we decide that no violation has occurred and that no action is required and sometimes we will also ban people on a first offense. We strive to be fair, but will err on the side of protecting the culture of our community.
|
||||||
|
|
||||||
|
Exercism's leadership reserve the right to take whatever action they feel appropriate with regards to CoC violations.
|
||||||
|
|
||||||
|
## The simple version
|
||||||
|
|
||||||
|
- Be empathetic
|
||||||
|
- Be welcoming
|
||||||
|
- Be kind
|
||||||
|
- Be honest
|
||||||
|
- Be supportive
|
||||||
|
- Be polite
|
||||||
|
|
||||||
|
## The details
|
||||||
|
|
||||||
|
Exercism should be a safe place for everybody regardless of
|
||||||
|
|
||||||
|
- Gender, gender identity or gender expression
|
||||||
|
- Sexual orientation
|
||||||
|
- Disability
|
||||||
|
- Physical appearance (including but not limited to body size)
|
||||||
|
- Race
|
||||||
|
- Age
|
||||||
|
- Religion
|
||||||
|
- Anything else you can think of.
|
||||||
|
|
||||||
|
As someone who is part of this community, you agree that:
|
||||||
|
|
||||||
|
- We are collectively and individually committed to safety and inclusivity.
|
||||||
|
- We have zero tolerance for abuse, harassment, or discrimination.
|
||||||
|
- We respect people’s boundaries and identities.
|
||||||
|
- We refrain from using language that can be considered offensive or oppressive (systemically or otherwise), eg. sexist, racist, homophobic, transphobic, ableist, classist, etc. - this includes (but is not limited to) various slurs.
|
||||||
|
- We avoid using offensive topics as a form of humor.
|
||||||
|
|
||||||
|
We actively work towards:
|
||||||
|
|
||||||
|
- Being a safe community
|
||||||
|
- Cultivating a network of support & encouragement for each other
|
||||||
|
- Encouraging responsible and varied forms of expression
|
||||||
|
|
||||||
|
We condemn:
|
||||||
|
|
||||||
|
- Stalking, doxxing, or publishing private information
|
||||||
|
- Violence, threats of violence or violent language
|
||||||
|
- Anything that compromises people’s safety
|
||||||
|
- Conduct or speech which might be considered sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory or offensive in nature.
|
||||||
|
- The use of unwelcome, suggestive, derogatory or inappropriate nicknames or terms.
|
||||||
|
- Disrespect towards others (jokes, innuendo, dismissive attitudes) and towards differences of opinion.
|
||||||
|
- Intimidation or harassment (online or in-person). Please read the [Citizen Code of Conduct](https://github.com/stumpsyn/policies/blob/master/citizen_code_of_conduct.md) for how we interpret harassment.
|
||||||
|
- Inappropriate attention or contact.
|
||||||
|
- Not understanding the differences between constructive criticism and disparagement.
|
||||||
|
|
||||||
|
These things are NOT OK.
|
||||||
|
|
||||||
|
Be aware of how your actions affect others. If it makes someone uncomfortable, stop.
|
||||||
|
|
||||||
|
If you say something that is found offensive, and you are called out on it, try to:
|
||||||
|
|
||||||
|
- Listen without interruption.
|
||||||
|
- Believe what the person is saying & do not attempt to disqualify what they have to say.
|
||||||
|
- Ask for tips / help with avoiding making the offense in the future.
|
||||||
|
- Apologize and ask forgiveness.
|
||||||
|
|
||||||
|
## History
|
||||||
|
|
||||||
|
This policy was initially adopted from the Front-end London Slack community and has been modified since. A version history can be seen on [GitHub](https://github.com/exercism/website-copy/edit/main/pages/code_of_conduct.md).
|
||||||
|
|
||||||
|
_This policy is a "living" document, and subject to refinement and expansion in the future. This policy applies to the Exercism website, the Exercism GitHub organization, any other Exercism-related communication channels (e.g. Slack, Twitter, email) and any other Exercism entity or event._
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2022 Exercism
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
41
README.md
Normal file
41
README.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Exercism 8th Track
|
||||||
|
|
||||||
|
[](https://github.com/exercism/8th/actions?query=workflow%3Aconfiglet) [](https://github.com/exercism/8th/actions?query=workflow%3Atest)
|
||||||
|
|
||||||
|
Exercism exercises in 8th.
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
To test the exercises, run `./bin/test`.
|
||||||
|
This command will iterate over all exercises and check to see if their exemplar/example implementation passes all the tests.
|
||||||
|
|
||||||
|
### Track linting
|
||||||
|
|
||||||
|
[`configlet`](https://exercism.org/docs/building/configlet) is an Exercism-wide tool for working with tracks. You can download it by running:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ ./bin/fetch-configlet
|
||||||
|
```
|
||||||
|
|
||||||
|
Run its [`lint` command](https://exercism.org/docs/building/configlet/lint) to verify if all exercises have all the necessary files and if config files are correct:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ ./bin/configlet lint
|
||||||
|
|
||||||
|
The lint command is under development.
|
||||||
|
Please re-run this command regularly to see if your track passes the latest linting rules.
|
||||||
|
|
||||||
|
Basic linting finished successfully:
|
||||||
|
- config.json exists and is valid JSON
|
||||||
|
- config.json has these valid fields:
|
||||||
|
language, slug, active, blurb, version, status, online_editor, key_features, tags
|
||||||
|
- Every concept has the required .md files
|
||||||
|
- Every concept has a valid links.json file
|
||||||
|
- Every concept has a valid .meta/config.json file
|
||||||
|
- Every concept exercise has the required .md files
|
||||||
|
- Every concept exercise has a valid .meta/config.json file
|
||||||
|
- Every practice exercise has the required .md files
|
||||||
|
- Every practice exercise has a valid .meta/config.json file
|
||||||
|
- Required track docs are present
|
||||||
|
- Required shared exercise docs are present
|
||||||
|
```
|
||||||
74
bin/fetch-configlet
Executable file
74
bin/fetch-configlet
Executable file
@@ -0,0 +1,74 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# This file is a copy of the
|
||||||
|
# https://github.com/exercism/configlet/blob/main/scripts/fetch-configlet file.
|
||||||
|
# Please submit bugfixes/improvements to the above file to ensure that all tracks benefit from the changes.
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
readonly LATEST='https://api.github.com/repos/exercism/configlet/releases/latest'
|
||||||
|
|
||||||
|
case "$(uname)" in
|
||||||
|
Darwin*) os='mac' ;;
|
||||||
|
Linux*) os='linux' ;;
|
||||||
|
Windows*) os='windows' ;;
|
||||||
|
MINGW*) os='windows' ;;
|
||||||
|
MSYS_NT-*) os='windows' ;;
|
||||||
|
*) os='linux' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "${os}" in
|
||||||
|
windows*) ext='zip' ;;
|
||||||
|
*) ext='tgz' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$(uname -m)" in
|
||||||
|
*64*) arch='64bit' ;;
|
||||||
|
*686*) arch='32bit' ;;
|
||||||
|
*386*) arch='32bit' ;;
|
||||||
|
*) arch='64bit' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
curlopts=(
|
||||||
|
--silent
|
||||||
|
--show-error
|
||||||
|
--fail
|
||||||
|
--location
|
||||||
|
--retry 3
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ -n "${GITHUB_TOKEN}" ]]; then
|
||||||
|
curlopts+=(--header "authorization: Bearer ${GITHUB_TOKEN}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
suffix="${os}-${arch}.${ext}"
|
||||||
|
|
||||||
|
get_download_url() {
|
||||||
|
curl "${curlopts[@]}" --header 'Accept: application/vnd.github.v3+json' "${LATEST}" |
|
||||||
|
grep "\"browser_download_url\": \".*/download/.*/configlet.*${suffix}\"$" |
|
||||||
|
cut -d'"' -f4
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
if [[ -d ./bin ]]; then
|
||||||
|
output_dir="./bin"
|
||||||
|
elif [[ $PWD == */bin ]]; then
|
||||||
|
output_dir="$PWD"
|
||||||
|
else
|
||||||
|
echo "Error: no ./bin directory found. This script should be ran from a repo root." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
download_url="$(get_download_url)"
|
||||||
|
output_path="${output_dir}/latest-configlet.${ext}"
|
||||||
|
curl "${curlopts[@]}" --output "${output_path}" "${download_url}"
|
||||||
|
|
||||||
|
case "${ext}" in
|
||||||
|
*zip) unzip "${output_path}" -d "${output_dir}" ;;
|
||||||
|
*) tar xzf "${output_path}" -C "${output_dir}" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rm -f "${output_path}"
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
||||||
31
bin/fetch-configlet.ps1
Normal file
31
bin/fetch-configlet.ps1
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# This file is a copy of the
|
||||||
|
# https://github.com/exercism/configlet/blob/main/scripts/fetch-configlet.ps1 file.
|
||||||
|
# Please submit bugfixes/improvements to the above file to ensure that all tracks
|
||||||
|
# benefit from the changes.
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
$ProgressPreference = "SilentlyContinue"
|
||||||
|
|
||||||
|
$requestOpts = @{
|
||||||
|
Headers = If ($env:GITHUB_TOKEN) { @{ Authorization = "Bearer ${env:GITHUB_TOKEN}" } } Else { @{ } }
|
||||||
|
MaximumRetryCount = 3
|
||||||
|
RetryIntervalSec = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$arch = If ([Environment]::Is64BitOperatingSystem) { "64bit" } Else { "32bit" }
|
||||||
|
$fileName = "configlet-windows-$arch.zip"
|
||||||
|
|
||||||
|
Function Get-DownloadUrl {
|
||||||
|
$latestUrl = "https://api.github.com/repos/exercism/configlet/releases/latest"
|
||||||
|
Invoke-RestMethod -Uri $latestUrl -PreserveAuthorizationOnRedirect @requestOpts
|
||||||
|
| Select-Object -ExpandProperty assets
|
||||||
|
| Where-Object { $_.browser_download_url -match $FileName }
|
||||||
|
| Select-Object -ExpandProperty browser_download_url
|
||||||
|
}
|
||||||
|
|
||||||
|
$downloadUrl = Get-DownloadUrl
|
||||||
|
$outputDirectory = "bin"
|
||||||
|
$outputFile = Join-Path -Path $outputDirectory -ChildPath $fileName
|
||||||
|
Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile @requestOpts
|
||||||
|
Expand-Archive $outputFile -DestinationPath $outputDirectory -Force
|
||||||
|
Remove-Item -Path $outputFile
|
||||||
35
bin/test
Executable file
35
bin/test
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Synopsis:
|
||||||
|
# Test the track's exercises.
|
||||||
|
#
|
||||||
|
# At a minimum, this file must check if the example/exemplar solution of each
|
||||||
|
# Practice/Concept Exercise passes the exercise's tests.
|
||||||
|
#
|
||||||
|
# To check this, you usually have to (temporarily) replace the exercise's solution files
|
||||||
|
# with its exemplar/example files.
|
||||||
|
#
|
||||||
|
# If your track uses skipped tests, make sure to (temporarily) enable these tests
|
||||||
|
# before running the tests.
|
||||||
|
#
|
||||||
|
# The path to the solution/example/exemplar files can be found in the exercise's
|
||||||
|
# .meta/config.json file, or possibly inferred from the exercise's directory name.
|
||||||
|
|
||||||
|
# Example:
|
||||||
|
# ./bin/test
|
||||||
|
|
||||||
|
# Verify the Concept Exercises
|
||||||
|
for concept_exercise_dir in ./exercises/concept/*/; do
|
||||||
|
if [ -d $concept_exercise_dir ]; then
|
||||||
|
echo "Checking $(basename "${concept_exercise_dir}") exercise..."
|
||||||
|
# TODO: run command to verify that the exemplar solution passes the tests
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Verify the Practice Exercises
|
||||||
|
for practice_exercise_dir in ./exercises/practice/*/; do
|
||||||
|
if [ -d $practice_exercise_dir ]; then
|
||||||
|
echo "Checking $(basename "${practice_exercise_dir}") exercise..."
|
||||||
|
# TODO: run command to verify that the example solution passes the tests
|
||||||
|
fi
|
||||||
|
done
|
||||||
0
concepts/.keep
Normal file
0
concepts/.keep
Normal file
31
config.json
Normal file
31
config.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"language": "8th",
|
||||||
|
"slug": "8th",
|
||||||
|
"active": false,
|
||||||
|
"status": {
|
||||||
|
"concept_exercises": false,
|
||||||
|
"test_runner": false,
|
||||||
|
"representer": false,
|
||||||
|
"analyzer": false
|
||||||
|
},
|
||||||
|
"blurb": "TODO: add blurb",
|
||||||
|
"version": 3,
|
||||||
|
"online_editor": {
|
||||||
|
"indent_style": "space",
|
||||||
|
"indent_size": 4,
|
||||||
|
"highlightjs_language": "TODO: specify highlightjs language"
|
||||||
|
},
|
||||||
|
"files": {
|
||||||
|
"solution": [],
|
||||||
|
"test": [],
|
||||||
|
"example": [],
|
||||||
|
"exemplar": []
|
||||||
|
},
|
||||||
|
"exercises": {
|
||||||
|
"concept": [],
|
||||||
|
"practice": []
|
||||||
|
},
|
||||||
|
"concepts": [],
|
||||||
|
"key_features": [],
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
14
docs/ABOUT.md
Normal file
14
docs/ABOUT.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# About
|
||||||
|
|
||||||
|
<!-- TODO: write document
|
||||||
|
|
||||||
|
This document contains a short introduction to the language.
|
||||||
|
|
||||||
|
The introduction should be relatively brief and touch upon what
|
||||||
|
makes the language interesting (and possibly unique). The goal
|
||||||
|
is to help students decide if they want to join this track.
|
||||||
|
|
||||||
|
The contents of this document are displayed on the track page,
|
||||||
|
provided the student has not joined the track.
|
||||||
|
|
||||||
|
See https://exercism.org/docs/building/tracks/docs for more information. -->
|
||||||
15
docs/INSTALLATION.md
Normal file
15
docs/INSTALLATION.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Installation
|
||||||
|
|
||||||
|
<!-- TODO: write document
|
||||||
|
|
||||||
|
This document should describe what the student needs to install
|
||||||
|
to allow working on the track on their local system using the CLI.
|
||||||
|
|
||||||
|
You can include the installation instructions in this document, but
|
||||||
|
usually it is better to link to a resource with the official installation
|
||||||
|
instructions, to prevent the instructions from becoming outdated.
|
||||||
|
|
||||||
|
The contents of this document are displayed on the track's documentation
|
||||||
|
page at `https://exercism.org/docs/tracks/<track>/installation`.
|
||||||
|
|
||||||
|
See https://exercism.org/docs/building/tracks/docs for more information. -->
|
||||||
13
docs/LEARNING.md
Normal file
13
docs/LEARNING.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Learning
|
||||||
|
|
||||||
|
<!-- TODO: write document
|
||||||
|
|
||||||
|
This document should link to learning resources.
|
||||||
|
|
||||||
|
Feel free to link to any good learning resources you know, whether they
|
||||||
|
be websites, blogs, books, videos or courses.
|
||||||
|
|
||||||
|
The contents of this document are displayed on the track's documentation
|
||||||
|
page at `https://exercism.org/docs/tracks/<track>/learning`.
|
||||||
|
|
||||||
|
See https://exercism.org/docs/building/tracks/docs for more information. -->
|
||||||
13
docs/RESOURCES.md
Normal file
13
docs/RESOURCES.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Resources
|
||||||
|
|
||||||
|
<!-- TODO: write document
|
||||||
|
|
||||||
|
This document should link to useful resources.
|
||||||
|
|
||||||
|
Feel free to link to any good resources you know, whether they
|
||||||
|
be websites, videos, mailing lists, etc.
|
||||||
|
|
||||||
|
The contents of this document are displayed on the track's documentation
|
||||||
|
page at `https://exercism.org/docs/tracks/<track>/resources`.
|
||||||
|
|
||||||
|
See https://exercism.org/docs/building/tracks/docs for more information. -->
|
||||||
1
docs/SNIPPET.txt
Normal file
1
docs/SNIPPET.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
TODO: add snippet
|
||||||
15
docs/TESTS.md
Normal file
15
docs/TESTS.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Tests
|
||||||
|
|
||||||
|
<!-- TODO: write document
|
||||||
|
|
||||||
|
This document should describe everything related to running tests in the track.
|
||||||
|
|
||||||
|
If your track uses skipped tests, this document can explain why thet is used and
|
||||||
|
how to unskip tests.
|
||||||
|
|
||||||
|
This document can also link to the testing framework documentation.
|
||||||
|
|
||||||
|
The contents of this document are displayed on the track's documentation
|
||||||
|
page at `https://exercism.org/docs/tracks/<track>/tests`.
|
||||||
|
|
||||||
|
See https://exercism.org/docs/building/tracks/docs for more information. -->
|
||||||
32
docs/config.json
Normal file
32
docs/config.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"docs": [
|
||||||
|
{
|
||||||
|
"uuid": "981f3a26-2b5f-4e1f-9540-a845d01ae899",
|
||||||
|
"slug": "installation",
|
||||||
|
"path": "docs/INSTALLATION.md",
|
||||||
|
"title": "Installing 8th locally",
|
||||||
|
"blurb": "Learn how to install 8th locally to solve Exercism's exercises on your own machine"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "45617b37-3e1a-4cfe-b1d8-d67913673f9b",
|
||||||
|
"slug": "learning",
|
||||||
|
"path": "docs/LEARNING.md",
|
||||||
|
"title": "How to learn 8th",
|
||||||
|
"blurb": "An overview of how to get started from scratch with 8th"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "eeb66e3f-eafd-4a48-bc50-a86e968a4c96",
|
||||||
|
"slug": "tests",
|
||||||
|
"path": "docs/TESTS.md",
|
||||||
|
"title": "Testing on the 8th track",
|
||||||
|
"blurb": "Learn how to test your 8th exercises on Exercism"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uuid": "c647956e-610f-49c9-8d0c-bd70441d4236",
|
||||||
|
"slug": "resources",
|
||||||
|
"path": "docs/RESOURCES.md",
|
||||||
|
"title": "Useful 8th resources",
|
||||||
|
"blurb": "A collection of useful resources to help you master 8th"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
0
exercises/.keep
Normal file
0
exercises/.keep
Normal file
0
exercises/concept/.keep
Normal file
0
exercises/concept/.keep
Normal file
0
exercises/practice/.keep
Normal file
0
exercises/practice/.keep
Normal file
21
exercises/shared/.docs/help.md
Normal file
21
exercises/shared/.docs/help.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Help
|
||||||
|
|
||||||
|
<!-- TODO: write document
|
||||||
|
|
||||||
|
This document should contain track-specific instructions on how to get help when
|
||||||
|
the student is stuck.
|
||||||
|
|
||||||
|
The instructions should be short and to the point.
|
||||||
|
|
||||||
|
You could link to resources like Gitter channels, forums or mailing lists:
|
||||||
|
whatever can help a student become unstuck.
|
||||||
|
|
||||||
|
This document should **not** link to Exercism-wide (track-agnostic) help resources,
|
||||||
|
as those resources will automatically be included in the HELP.md file.
|
||||||
|
|
||||||
|
The links in this document can overlap with those in docs/LEARNING.md or docs/RESOURCES.md
|
||||||
|
|
||||||
|
When a student downloads an exercise via the CLI, this file's contents are
|
||||||
|
included into the HELP.md file.
|
||||||
|
|
||||||
|
See https://exercism.org/docs/building/tracks/shared-files for more information. -->
|
||||||
15
exercises/shared/.docs/tests.md
Normal file
15
exercises/shared/.docs/tests.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Tests
|
||||||
|
|
||||||
|
<!-- TODO: write document
|
||||||
|
|
||||||
|
This document should contain instructions on how to run the exercise's tests.
|
||||||
|
|
||||||
|
The instructions should be short and to the point.
|
||||||
|
|
||||||
|
The docs/TESTS.md file can contain a more verbose description on how to run tests.
|
||||||
|
|
||||||
|
When a student downloads an exercise via the CLI, this file's contents are
|
||||||
|
included into the HELP.md file.
|
||||||
|
|
||||||
|
See https://exercism.org/docs/building/tracks/shared-files for more information.
|
||||||
|
-->
|
||||||
Reference in New Issue
Block a user