Skip to content

Add track installation instructions - #97

Merged
meatball133 merged 7 commits into
exercism:mainfrom
codingthat:add-installation
Jun 30, 2026
Merged

Add track installation instructions#97
meatball133 merged 7 commits into
exercism:mainfrom
codingthat:add-installation

Conversation

@codingthat

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread docs/INSTALLATION.md
# Installation

<!-- TODO: write document
## Installing Godot Engine

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is that these should be instructions to setup the language for local testing. If it is meant that users should be using docker for testing then these docs should describe how to setup that for different os.

@codingthat codingthat May 1, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's about testing, per se — there's both docs/TESTS.md and exercises/shared/.docs/tests.md for that, hence my WIP branch for those.

The spec and example for this docs/INSTALLATION.md seem to point more to just installing Godot itself, no?

@meatball133 meatball133 May 1, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is supposed to tell you how to install so you can test the tests locally.

I mean in most cases, say Python. You would install Python and then you could install the library needed and then simply run pytest and you would get the output. And some languages doesn't need any dependencies at all and have everything built in. So for Godot, if you need like a bash script for it to work. Then these instructions should tell you how to install that script for example.

@codingthat codingthat May 1, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, fair enough — but then what goes in TESTS.md for Godot? Should it just point back to INSTALLATION.md because there's nothing else to say like other tracks might (skipped tests, etc.)? Or duplicate its info (doesn't sound ideal, but then again, there's explicit mention of doing that for resources vs. help)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the difference between installation and tests is that installation says what/how you install to tests. But tests say how you test. So for python would that be something like:

INSTALLATION.md:

  • How to install python
  • How to install libraries

TESTS.md:

How to test e.g:

Find the folder with the exercise then cd into that folder

cd path/exercise

Then you have to call pytest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so, I will (once we agree on how the testing scripts should look, and finish them) move my WIP stuff so most of it is in this file. However, I'm not sure that's the correct move, because then there's not a real distinction between TESTS.md and the shared tests.md.

Here's what seemed to jive with the general track info docs as well as the comments in the templates:

  • INSTALLATION.md: about installing the tech itself (basically a link to the official docs plus a note about which version makes sense for Exercism) (note: nothing about tests)
  • TESTS.md: how to install local test runner infrastructure
  • shared tests.md: how to run local test runner infrastructure

And actually it's interesting you use Python as an example, because https://exercism.org/docs/tracks/python/installation is not at all about testing. Then its TESTS.md says e.g. how to install pytest. (Then I assume its shared tests.md it how to run tests for a single local exercise.)

However, it does seem that the "how to run a test" part is duplicated from the shared tests.md to the overall TESTS.md.

Either way, I think I did do the non-test installation instructions correctly in the end. OK to merge the current PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meatball133 when you have a moment, let me know if this part is OK. Thanks!! :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/INSTALLATION.md
Comment thread docs/INSTALLATION.md
Comment thread docs/INSTALLATION.md
Comment thread docs/INSTALLATION.md
Comment thread docs/INSTALLATION.md
You'll need [Godot installed][installation] correctly to use the test runner.

To build and test GDScript scripts for Exercism, Godot will be run in "headless" mode from the CLI.
These instructions currently require Linux and bash.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure this requires just Linux? My Mac has /opt available and it can run Linux-based Docker images.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no Mac to test on, but if it can be verified to work there we can change it. The local test runner described in this doc, though, doesn't use Docker (it relies on run.sh, which runs Godot directly), so you'd have to install Godot.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, we might want to call the local test runner something else. Within Exercism, a test runner is almost always the online one. That'll certainly cause some confusion down the line for example if a student is asking about running the local tests and we all think they refer to the online test runner.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have access to a M1 Mac so I can check this script out later this week.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some places I've called it simply "test runner" and I could make it "local test runner" to be unambiguous. But if you think that will still be confused with the online one despite "local" everywhere, I'm open to suggestions. I see other tracks don't generally need one because the CLI syntax for testing is a bit more standardized than in the Godot ecosphere.

Maybe "local solution checker"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BNAndras what do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine for me on a Mac.

(base) ➜  darts git:(main) ✗ ./test-local-gdscript-solution.sh
Godot Engine v4.7.stable.official.5b4e0cb0f - https://godotengine.org

-> test_missed_target
-> test_on_the_outer_circle
-> test_on_the_middle_circle
-> test_on_the_inner_circle
-> test_exactly_on_center
-> test_near_the_center
-> test_just_within_the_inner_circle
-> test_just_outside_the_inner_circle
-> test_just_within_the_middle_circle
-> test_just_outside_the_middle_circle
-> test_just_within_the_outer_circle
-> test_just_outside_the_outer_circle
-> test_asymmetric_position

Exercise passed!  Nicely done!

As for the terms, this gets complicated because normally what gets written in these cases is a testing library that the online test runner hooks into but still can be run locally separately from the test runner. However, in this specific case we're using a script to run the test runner locally so it's the same experience whether you're in the online editor or working locally. I guess it really is just the test runner so maybe the best we can do here is consistently specify local test runner vs. online test runner.

Comment thread docs/INSTALLATION.md Outdated
Comment thread docs/INSTALLATION.md Outdated
- Linux requirement for local test runner
- Syntax highlighting "etc."
- Requirements for keeping a debug server running
Comment thread docs/INSTALLATION.md
### Step 2: Downloading the single-exercise test runner script

Assuming you have the `exercism` tool set up and have downloaded at least one GDScript exercise, it should have created an `exercism/gdscript` folder to house the exercises.
Save [the test runner][test-local-gdscript-solution] in this folder and mark the file executable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're using a custom testing setup, I strongly recommend that this file be provided to students during the initial download for each exercise. That's what we do on other tracks with custom testing libraries like Red and Scheme. Downloading it afterwards as a separate step runs the risk of confusing students. If I'm downloading the files to work offline, my general expectation would be I can start working with minimal fuss.

@meatball133
meatball133 merged commit a5ca06c into exercism:main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants