Skip to content

Commit

Permalink
[v3] Prepare for v3 (#602)
Browse files Browse the repository at this point in the history
* Add docs/reference split

* [Docs] Move implementing-a-concept-exercise.md to reference folder
* [Docs] Move reference documents to docs folder
* [Docs] Update to student-facing docs
* [Docs] Add new issue template

Co-Authored-By: Jeremy Walker <[email protected]>
Co-Authored-By: Victor Goff <[email protected]>
Co-authored-by: Sascha Mann <[email protected]>

* Extract concepts of v2 two-fer exercise

Well done @bergjohan , thanks for working on this first one 🎉

* Add implementing concept exercise reference

* Add implementing concept exercise reference

* Add required reading per #1170

* Add source file per #1149

Co-authored-by: wolf99 <[email protected]>

* Add reference to Concept Exercise Anatomy video

[Docs] Add reference to Concept Exercise Anatomy video

* Cross-reference concept exercise file information

[Docs] Cross-reference concept exercise file information

* correct description of track specific files

On the C track not all of the track specific files are C code files. One is a make file and there is a subdirectory. Further, referring to header files as C source files, while not incorrect, may be confusing

* Extract concepts of v2 square-root exercise

* Extract square-root concepts

* Fix formatting and casing

* Add usggestion

* Extract concepts of v2 difference-of-squares exercise

* Extract difference-of-squares concepts

onsistent casing

* Add suggestions

* Extract concepts of v2 resistor-color exercise

* Extract resistor-color concepts

* Make casing consistent

* Add suggestions

* [CI] Format code

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Extract concepts of v2 isogram exercise

* Extract isogram concepts

* Fix typo

* Remove bit-fields concept

Forgot bit-fields are an actual thing in C, not just a general concept

* Add suggestions

* [CI] Format code

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Extract concepts of v2 hamming exercise

* Extract hamming concepts

* Add suggestions

* [CI] Format code

* Order concepts alphabetically

for ease of future parsing

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add implementation step to update implemented exercises

* Add description of concept documents

[Docs] Add description of concept documents

Co-authored-by: Jeremy Walker <[email protected]>

* Create binary-search.md

* Convert example to exemplar

* Rename example files to exemplar

See exercism/docs#23

* [Docs] Correct .meta/example references to .meta/exemplar

* [Docs] Use exemplar instead of example

* [Docs] Update example name in file listings

* [Julia] Convert to exemplar.jl

* [elm] Rename .meta/Cook.elm to .meta/Examplar.elm

* [elm] Rename .meta/Examplar.elm .meta/Exemplar.elm

Co-authored-by: Matthieu Pizenberg <[email protected]>

* [v3] Move existing exercises to exercises/practice

* [v3] Add version property to config.json

* [v3] Add status to config.json

* [v3] Add slug to config.json

* [v3] Add online_editor property to config.json

* [v3] Re-order practice exercises in config.json

* [v3] Remove deprecated properties from practice exercises in config.json

* [v3] Add name property to practice exercises in config.json

* [v3] Add (empty) prerequisites property to practice exercises in config.json

* [v3] Move exercises to practice exercises property in config.json

* [v3] Add concept exercises to config.json

* [v3] Add concepts to config.json

* [v3] Add key features to config.json

* [v3] Add tags to config.json

* [v3] Add configlet CI workflow

* [v3] Update fetch-configlet script to work with configlet v3

* [v3] Add dependabot to keep GHA dependencies up-to-date

* [v3] Convert relative v3 links to absolute links

* [v3] Fix configlet CI workflow

Co-authored-by: Jeremy Walker <[email protected]>
Co-authored-by: Victor Goff <[email protected]>
Co-authored-by: Sascha Mann <[email protected]>
Co-authored-by: Johan Berg <[email protected]>
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: wolf99 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: proose <[email protected]>
Co-authored-by: Matthieu Pizenberg <[email protected]>
  • Loading branch information
11 people authored Feb 4, 2021
1 parent 2238ab9 commit 50ad833
Show file tree
Hide file tree
Showing 777 changed files with 1,177 additions and 924 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:

# Keep dependencies for GitHub Actions up-to-date
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
16 changes: 16 additions & 0 deletions .github/workflows/configlet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Configlet CI

on: [push, pull_request, workflow_dispatch]

jobs:
configlet:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Fetch configlet
uses: exercism/github-actions/configlet-ci@main

- name: Configlet Linter
run: configlet lint
70 changes: 38 additions & 32 deletions bin/fetch-configlet
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
#!/bin/bash
#!/usr/bin/env bash

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' ;;
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' ;;
case "${os}" in
windows*) ext='zip' ;;
*) ext='tgz' ;;
esac

case "$(uname -m)" in
(*64*) ARCH='64bit' ;;
(*686*) ARCH='32bit' ;;
(*386*) ARCH='32bit' ;;
(*) ARCH='64bit' ;;
*64*) arch='64bit' ;;
*686*) arch='32bit' ;;
*386*) arch='32bit' ;;
*) arch='64bit' ;;
esac

if [ -z "${GITHUB_TOKEN}" ]
then
HEADER=''
else
HEADER="authorization: Bearer ${GITHUB_TOKEN}"
curlopts=(
--silent
--show-error
--fail
--location
--retry 3
)

if [[ -n "${GITHUB_TOKEN}" ]]; then
curlopts+=(--header "authorization: Bearer ${GITHUB_TOKEN}")
fi

FILENAME="configlet-${OS}-${ARCH}.${EXT}"
suffix="${os}-${arch}.${ext}"

get_url () {
curl --header "$HEADER" -s "$LATEST" |
awk -v filename=$FILENAME '$1 ~ /browser_download_url/ && $2 ~ filename { print $2 }' |
tr -d '"'
get_download_url() {
curl "${curlopts[@]}" --header 'Accept: application/vnd.github.v3+json' "${LATEST}" |
grep "\"browser_download_url\": \".*/download/.*/configlet.*${suffix}\"$" |
cut -d'"' -f4
}

URL=$(get_url)
download_url="$(get_download_url)"
output_dir="bin"
output_path="${output_dir}/latest-configlet.${ext}"
curl "${curlopts[@]}" --output "${output_path}" "${download_url}"

case "$EXT" in
(*zip)
curl --header "$HEADER" -s --location "$URL" -o bin/latest-configlet.zip
unzip bin/latest-configlet.zip -d bin/
rm bin/latest-configlet.zip
;;
(*) curl --header "$HEADER" -s --location "$URL" | tar xz -C bin/ ;;
case "${ext}" in
*zip) unzip "${output_path}" -d "${output_dir}" ;;
*) tar xzf "${output_path}" -C "${output_dir}" ;;
esac

rm -f "${output_path}"
Loading

0 comments on commit 50ad833

Please sign in to comment.