Closed colinleach closed 1 month ago
On a related note, I thought it would be nice if we could get configlet to generate a runtests.jl
which is scaffolded in something like the following way (here for an exercise named practice-exercise
):
using Test
include("practice-exercise.jl")
@testset verbose = true "tests" begin
# insert all tests here
end
This might cut down on confusion about the new format versus the blank file which is presented now.
That looks simple and worthwhile. I'd support it.
Of course, a more thorough approach is to create generators to build the tests from problem-specifications
. That has the advantage that tests can be kept up to date as canonical-data.json
evolves, and the disadvantage that it's a LOT more work. As I discovered a few weeks ago, when I tried it.
That looks simple and worthwhile. I'd support it.
I've only briefly looked into it, but I'm still not exactly sure where I'd need to start. I initially thought the bin
folder would have the appropriate files, but there's also the generators file which seems to have some relevant code.
I don't know details, but I think there was an attempt to add generators several years ago. It doesn't seem to have progressed very far.
I thought it would be nice if we could get configlet to generate a runtests.jl
Thinking about this some more, we probably can't mess with configlet, which is a complicated cross-track Go program. I guess options included writing a separate shell script and putting it in bin
, or writing a Julia script and creating a scripts
directory. Some tracks have a .templates
directory for things they want to copy into new exercises: that could be an easy solution. I've done something similar on private forks, but I never pushed anything like this to an Exercism track repo.
I've not seen any pushback on the original question about adding scripts from generic-track
. I'll wait till tomorrow or Saturday, then submit a PR.
A more clued-up maintainer might create a GitHub workflow to keep them synced automatically, but I confess I have no idea how to do that. I should probably learn, sometime.
Thinking about this some more, we probably can't mess with configlet, which is a complicated cross-track Go program.
Thanks for looking into that! I'm unfamiliar with the overarching program (and don't read Go), but the .templates
idea sounds closest to what I was hoping was possible. Creating the scripts
directory also sounds potentially interesting though.
I've not seen any pushback on the original question about adding scripts from generic-track. I'll wait till tomorrow or Saturday, then submit a PR.
Sounds good! I'll try to be around to review when that comes in.
Tangential comment: from the timing of this, you seem to be well to the east of me. I'm in Arizona, timezone UTC-7:00 all year (MST in US terminology).
I'm not too far east (Georgia EST). I just got started early today :)
Resolved with PR #785
From a PR that Erik just sent to the R track, I belatedly realized that new tracks get a bunch of useful scripts. These are in
https://github.com/exercism/generic-track/tree/main/bin
Of these, Julia only has
fetch-configlet
.My first impression is that at least
add-practice-exercise
andverify-exercises
would be useful here, maybe the others.Can anyone see a downside to this?