Bug in Python track in regards to exercise availabilty for "Triangle"

Hey there

I think I discovered a bug. To not repeat everything I’ve already written down, the details are here.

I’m new here and been focused on my Python track, but I’m not new to open source contributions and programming. I can look into the Exercism codebase and try to hunt this down myself, time permitting, if Exercism is open source and being worked on by the community.

Wanted to flag this, in any case.

Cheers!

Hi @ichoosetoaccept,

Thanks for reporting this (and for your discussion thread on learning vs practice mode.).

I took a quick look at the track config.json, and didn’t see anything problematic at first glance. All the UUIDs are unique, and there aren’t any overlapping names or weird prerequisites.

The practices key and the prerequisites key for Triangle are the same as they are for Leap - so if you are able to work on Leap, you should be able to work on Triangle.

The only two things I can think of (track config wise) are:

  1. You haven’t completed the square root exercise, which may be blocking things (but if you can work on leap, that’s probably not the issue).
  2. Have you marked as completed and/or published all the solutions you have for the “numbers” and “bools” concept? The system won’t flag things as “done” unless the exercise has been flagged “completed” and/or published. So that could be an issue. But again, if you can work on Leap, you should be able to work on Triangle.

One quick thing to try is toggling learning mode off and then back on again (yes, I know - I know!) to see if that refreshes things. If not, we’ll have to investigate further.

I can also try quickly changing the prereqs for Triangle to see if that shakes things loose.



I’m new here and been focused on my Python track, but I’m not new to open source contributions and programming. I can look into the Exercism codebase and try to hunt this down myself, time permitting, if Exercism is open source and being worked on by the community.

We love contributions from our community, but not everywhere. The website codebase is mostly closed to community contribution, and the programming language tracks vary as to what they accept/want. The best rule of thumb is to ask here on the forum first before making a PR, and the maintainers in question can discuss the matter and let you know how they’d like to proceed.

1 Like

Hey there @BethanyG

Many thanks for your reply!

Pardon me for asking, but I looked everywhere and I’m at a loss for where to find a learn/practice “toggle”. If you mean simply clicking between these two…

then I have done that and it doesn’t help, but somehow I don’t think that’s the toggling you meant.

Happy to try that as soon as I learn how :slight_smile:

As for contributions, understood! Makes perfect sense.

Apologies! I should have included a screengrab, since its non-obvious.
There is a ... menu next to where the contributors are shown on the right:

image

Give that a go, and see if disabling and then re-enabling helps things (I hope it does, but am a bit skeptical it will).

:smile:

No problem, I happened to see those three dots and found it! So I switched into practice mode, tried Triangle again and it’s still locked. Switched back to learning mode and things are unchanged.

To be clear, I have not completed the square root exercise yet as it’s locked for me:

I’m here now and will continue my journey through Conditionals. If things change, I’ll yet you know :slight_smile: :

1 Like

Could you take a look at the site again for me please?

Looks like square-root had the additional prerequs of “conditionals” and “loops”, which may or may not have been the problem.

I removed the exercise from numbers, so let’s see if that helps?

Hey there!

At first I saw no change but then I did a page refresh while on the Triangle exercise page and this time it’s unlocked! Thank you!

1 Like

Thank you for your patience and willingness to play along and help troubleshoot! :blue_heart:

So my suspicion is that (and I have no idea why leap didn’t have this problem) the prerequisites for square-root were preventing the flag for completing “numbers” from being set. And since Triangle had “numbers” as a prerequisite, it wouldn’t unlock. Or maybe there is something else wrong/tangled about square-root.

In any case, very happy that fixed it. Now to figure out why square-root is cursed, now that it’s not blocking anyone. :wink:

1 Like

I wonder if identifying exercises that can’t be unlocked might be a separate feature request for configlet lint. Then we can identify these issues proactively.

Sounds like a new practice exercise for the jq track!

1 Like

Since Python is the only track where there are associated practice exercises for all the concept exercises , I can’t say that would be a high-priority feature request. :wink:

IIRC, there have been a few unlocking issues across other tracks, but it is pretty rare.

I’m confused. My understanding is that practice exercises practice a concept but are not required to unlock anything. The way I understand things, only concept exercises unlock exercises. But I don’t have an explanation for triangles being locked here.

I’m confused. My understanding is that practice exercises practice a concept but are not required to unlock anything.

They aren’t exactly. But when they are associated with a concept, they are required for the concept to be marked “learned”.

So my guess was that since the numbers concept wasn’t completed and it was a prerequisite for triangles, triangles remained locked.

Removing square-root, which had prerequisites that included conditionals and loops (both further down the tree) “completed” the numbers concept, and appeared to unlocked things. But it all might just be speculation and/or luck on my part.

leap had the same configuration as triangles and was not locked. Not sure why.

In any case, square-root wasn’t vital for practicing numbers, so its not terrible it was removed, and if triangles is now working … :tada:

1 Like