Create new track for GDScript

Thank you @BNAndras , that was it! Using your advice, and taking some inspiration from Python and Crystal tracks, I managed to run the tests for “Hello, World” exercise! :tada:

Current solution will iterate over all concept and practice exercises and use our GDScript test runner to validate them. If the resulting .json file does not have a status “pass”, the validation will fail (and print results.json for more details).

There is probably still a bit of config/documentation left, as I only focused on configuring the GitHub action, so we can have automated CI for GDScript track. Nevertheless, I changed the status of my PR from “draft” to “ready for review” :wink: Please feel free to point out any information I still need to provide for our first exercise, otherwise I’ll try to check the remaining TODOs and Configlet docs to see what is missing.

Great, I’ll update my existing PRs once that one is merged.

Wow, @BNAndras , you’re on fire, adding one exercise after another! ;) Fantastic job, thank you for taking care of this :+1:

Apart from exercises, we will need some info and config about the track itself. I think there are already some PRs for that created by @Meatball . Could you please let us know about the status of them?

The key features should be good to go as quick as I have fixed the comments you left.

Installation is at the moment only instructing how to setup godot as a command line application for linux and windows. Dont know how it is intended to be exectued locally, if the docker container is meant then that instruction isnt needed. But my experince is that docker in the way they are used on exercism is that they are not compatible with wsl at all(could have changed though). And windows docker is meeh. I could finish the install page but I would need some more info how it needs to be setup.

As for the two-fer exercises so could I rebase that as Andras suggested.

Slow work day so I can confirm this on my Windows workstation later today.

I checked it out, seems to work now. Before there was an issue with absolute paths and since the wsl folder system was more or less put on top of Windows, docker thereby just crashed.

Hi! I have a question about adding new exercises (I think it would be faster if I start contributing, instead of just approving @BNAndras PRs :stuck_out_tongue: ). I downloaded the newest release of configlet and added a very rudimentary config to config.json:

{
  "slug": "two-fer"
}

(I know that there is already a PR for that exercise, but I just wanted to test the process)

After running configlet sync -u the tool created some files, including tests.toml file with UUIDs of required test cases. But, the main config.json file was not updated, it still contains only the slug. Is there a way for configlet to automatically add the name, UUID, and perhaps other fields of a new exercise, or are these steps supposed to be done manually?

Some tracks set up tooling to handle the config.json manipulation so you just need to supply the slug name and perhaps a difficulty and the script does the rest. On tracks without the tooling, I just do it manually by copying and pasting the nearest exercise entry, replacing the slug, name, difficulty, and UUID. It doesn’t really take too much time especially compared to other steps like setting up the test suite.

I’m actually working on adding a “create new exercise” feature to configlet! Hope it is coming soon-ish.

3 Likes

We could pool all the tools that are implemented by the tracks. I knwo there is a powerful workflow for the python track, that can generate tests and add new ones with a exercise-specific template.

I have a script for the C++ track that creates all the files and some basic tests and you would only need to fill the example files.

I am sure other tracks made similar things.

1 Like

I have a small script that will create the basic files for powershell track as well, also create empty test cases with names parsing the toml file. But filling formation is still being done semi-manually, if the tests are less than 10 and each are quite unique i can just do it myself. If there are like a bunch of them with minimal change, then i give chatgpt a correct “frame” then feed it the test data for it to spit out the refined test cases. It is good for those tasks. (Also you can write custom testing functions to remove a lot of repetition as well in some cases)

I also like the test suite being easy on the eyes for readers, so I still spent time to group them in context and give them proper spacing.

1 Like

Thanks for all the replies! I hope I didn’t sound like I’m complaining, I think the tooling is very good as it is ;) I just wanted to make sure that I’m not doing something manually if there is a nice command that will do it for me ;P

As mentioned, all the manual steps don’t take a lot of time, so I’m happy to start adding new exercises soon :D

1 Like

I have a question about local installation and some other topics if you don’t mind (I went to check the doc but it is blank atm)
Should I download the standard version or the one with .Net, or it doesnt really matter in this case?
I mainly use vscode now due to its versatility, would you recommend mixing it with godot? Or just stick to the default editor?

Would you consider in the future to do some sort of guide to actual develop a small game (could based on one of the exercise we have) with actual graphic and what not? :grin:

Hi @glaxxie ! I’ve never used the .Net version to be honest, always downloaded the standard one. I think they work in the same way (from the user’s perspective) but I am not sure.

I advise you to use Godot Engine’s editor. It provides good syntax completion, has built-in docs, and is really good in spotting formatting errors :slight_smile: Also, please keep in mind that GDScript is just the default language of Godot, the engine itself provides much more: 2D and 3D scenes, autoloads, project settings, export templates etc. Learning GDScript will be, I hope, the first step toward building some cool interactive programs :wink:

As for a guide: I didn’t plan on adding any, since there are already 2 short tutorials available in the documentation:

Should these prove inadequate in any way, it will be my pleasure to create a custom tutorial, just for Exercism :wink:

1 Like

@ErikSchierboom, GDScript is at 18 exercises ported and 2 going through review. We still need a track icon I believe, but is there anything else we need before the track is available on the site for maintainers? https://exercism.org/tracks/gdscript 404s at the moment.

Does the language have a logo? Or would some variant of https://upload.wikimedia.org/wikipedia/commons/6/6a/Godot_icon.svg be appropriate?

I’ve just created the track, but the page 500s: https://exercism.org/tracks/gdscript I’ll have to look into that.

Maintainers should be able to see https://exercism.org/tracks/gdscript now.

2 Likes

Unless @pfertyk has something in mind, I think that’s fine, and godot/LOGO_LICENSE.txt at master · godotengine/godot · GitHub indicates a CC BY 4.0 license for their logos. I don’t believe there’s a GDScript logo since it’s tightly linked to the Godot Engine, but that’s fine because the Godot logo is pretty recognizable.

The deploy was successful: Deploy · exercism/gdscript-test-runner@0d94c25 · GitHub Could you do another test @BNAndras ?

2 Likes