Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
BNAndras authored Nov 9, 2023
2 parents 93d5ac1 + a8bacee commit f9227da
Show file tree
Hide file tree
Showing 136 changed files with 3,763 additions and 505 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
fail-fast: false
matrix:
racket-variant: ['BC', 'CS']
racket-version: ['8.5', '8.6']
racket-version: ['8.8', '8.9', '8.10']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: Bogdanp/setup-racket@b0760a463ccf5e0259d5ad925be4b36b3b6e2d08
- uses: Bogdanp/setup-racket@0094a9d8bd157633293a2210f373bb542687fa6d
with:
architecture: x64
distribution: minimal
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/pause-community-contributions.yml

This file was deleted.

51 changes: 9 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,29 @@
# Exercism Racket Track

[![Configlet Status](https://github.com/exercism/racket/workflows/configlet/badge.svg)]
[![Exercise Test Status](https://github.com/exercism/racket/workflows/racket%20%2F%20main/badge.svg)]
[![Configlet Status](https://github.com/exercism/racket/actions/workflows/configlet.yml/badge.svg)](https://github.com/exercism/racket/actions/workflows/configlet.yml)
[![Exercise Test Status](https://github.com/exercism/racket/actions/workflows/ci.yml/badge.svg)](https://github.com/exercism/racket/actions/workflows/ci.yml)

Exercism exercises in Racket.

## Contributing

Please read about how to [get involved in a track](https://github.com/exercism/docs/tree/master/contributing-to-language-tracks). Also, be sure to read the Exercism [Code of Conduct](https://exercism.org/code-of-conduct).

We welcome both improvements to the existing exercises and the addition of new exercises. If you are creating a new exercise from scratch please see [adding new exercises](https://github.com/exercism/docs/blob/master/you-can-help/make-up-new-exercises.md). If you are porting an exercise that exists in other exercism language tracks, see [porting an exercise](https://github.com/exercism/docs/blob/master/you-can-help/implement-an-exercise-from-specification.md).

Please note that this track's exercises must conform to the Exercism-wide standards described in the [documentation](https://github.com/exercism/docs/tree/master/language-tracks/exercises). If you're unsure about how to make a change, then go ahead and open an issue on Github.

Each exercise should have an example solution, a description file, a test suite and a stub file for the solution declaring the module and exports.

### Naming Conventions

The example solution should be named `example.rkt`. The description file: `README.md`. The test suite: `<exercise-name>-test.rkt`, and the stub: `<exercise-name>.rkt`.

For example, if you were to work on the `binary` exercise, you would create and commit the following four files:

```bash
$ racket/exercises/binary/
.
├── binary.rkt
├── binary-test.rkt
├── README.md
└── example.rkt
```
Please see the [contributing guide](https://exercism.org/docs/building). We welcome both improvements to the existing exercises and the addition of new exercises.

### Code Style

The Racket code in this repo is meant to conform with the conventions set forth in [How to Program Racket](http://docs.racket-lang.org/style/index.html).

### Dependencies
Try to avoid external dependencies.

### Creating the description file

`README.md` may be [generated](https://github.com/exercism/docs/blob/master/maintaining-a-track/regenerating-exercise-readmes.md) from exercism data. The generator will use the `description.md` from the exercise directory in the [problem-specifications repository](https://github.com/exercism/problem-specifications/tree/master/exercises). To generate `README.md` for your execise only use the following command from your racket track directory:

```bash
bin/configlet generate . --only <exercise-name>
```

### Adding the exercise to config.json
Be sure to add the exercise to an appropriate place in the `config.json` file. The position in the file determines the order exercises are fetched by users. Generate a unique UUID for the exercise with ```configlet uuid```. Finally check `config.json` with:

```bash
bin/configlet lint .
```
Try to avoid external dependencies.

## Opening an Issue
## Suuport

If you plan to make significant or breaking changes, please open an issue so we can discuss it first. If this is a discussion that is relevant to more than just the Racket track, please open an issue in [exercism/discussions](https://github.com/exercism/discussions/issues).
For support with Racket in Exercism, please visit [the Racket subcategory](https://forum.exercism.org/c/programming/racket/) on the official [Exercism forum](https://forum.exercism.org).

## Submitting a Pull Request

Pull requests should be focused on a single exercise, issue, or conceptually cohesive change. Please refer to Exercism's [pull request guidelines](https://github.com/exercism/docs/blob/master/contributing/pull-request-guidelines.md).
Pull requests should be focused on a single exercise, issue, or conceptually cohesive change. Please refer to Exercism's [pull request guidelines](https://github.com/exercism/docs/blob/master/contributing/pull-request-guidelines.md). If you plan to make significant or breaking changes, please open an issue so we can discuss it first.

Prior to submitting a pull request, ensure that your test requires the stub file, and not the example file - like so:

Expand All @@ -81,5 +47,6 @@ Prior to submitting a pull request, ensure that your test requires the stub file
```

## Racket icon

The Racket logo was created by [Matthew Butterick](https://en.wikipedia.org/wiki/Matthew_Butterick) and released under the Creative Commons Attribution-Share Alike 3.0 Unported license.
We have adapted it, changing the colour scheme for use on Exercism.
31 changes: 31 additions & 0 deletions bin/fetch-configlet.ps1
Original file line number Diff line number Diff line change
@@ -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) { "x86-64" } Else { "i386" }
$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 -First 1
}

$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
Loading

0 comments on commit f9227da

Please sign in to comment.