each time i submit my solution via API, i have to go into the website and manually click ‘mark as complete’. Is there a way to mark as complete via an API or some batch way?
Also when I mark as complete w/ GUI , a second popup always shows itself asking whether I want to publish or not, then I have to click through it. Can I skip this ?
$ exercism submit
$ exercism complete
$ exercism complete --no-publish (optional flag?)
In my opinion if you’re only solving the exercise and marking it as complete you’re missing out on some important aspects:
- Publishing your solution contributes to the “collected wisdom”. Others can browse solutions and learn about different approaches, different implementations, etc.
- Browsing the solutions of others provides the same opportunity for you. You don’t know what you don’t know, sometimes there are better (simpler, easier to read, more idiomatic, more efficient) or just different solutions that give you insights you wouldn’t get on your own.
- Requesting mentorship is in my opinion Exercism’s most unique and useful feature. Often mentors can spot subtle issues not caught by the tests, or suggest changes that can make a solution simpler, easier to understand, more idiomatic or more efficient. Both as a student and a mentor I had many fruitful discussions that improved my understanding of the problem, my solution or even made me a better programmer.
- Mentoring others is an underrated way of becoming better. You’re getting accustomed to reading code, spotting potential problems or parts that can be improved, you will get better at talking about code, about decisions and compromises, and arguing your position. Also, (at least in my experience) “social learning” and “learning by teaching” can really consolidate and deepen existing knowledge.
I’m just a mentor but if I had a say in this I would object to promoting the usage of the Exercism without interaction with mentors, students, or the solutions of others.
yeah thats fine too, just a CLI with the
complete option is all i want. “Published” by default would be ok
Yes! You absolutely can mark exercises as complete via the API. However, that aspect of the API isn’t exposed in the CLI. If you’re up for a challenge, you could write yourself some code to access that API endpoint. I don’t think the API is well documented yet, though.
- get the
.id of the
- using root =
- send a PATCH request to
Following this, you might want to enable comments for your solution:
- get .track, .exercise and .handle from metadata.json
- send a PATCH request to
Reading website/api.rb at main · exercism/website · GitHub reveals the current API.
(self-promotion: I do this in my GitHub - glennj/exercism-cli-fish-wrapper: A fish wrapper for the Exercism CLI)
huge Glennj, thanks! works like a charm.
when in problem directory… a quick bash curl for anyone else (using jq):
id=$(cat .exercism/metadata.json | jq .id --raw-output);
token=$(cat ~/.config/exercism/user.json | jq .token --raw-output);
curl -X PATCH -H "Authorization: Bearer $token" \