Solution isn't displayed in Community Solutions

Yesterday I’ve finished and published my solution to the excellent exercise SGF Parsing in the Python track, but it doesn’t show up in the Community Solutions. I’ve skimmed through the listed solutions and it doesn’t look like my solution is too similar to a listed one. So I’d like to ask why that is the case? Thanks in advance for feedback!

1 Like

I’ve dug into this, and it appears to be a bug in the representer (which is needed for your solution to show up). An issue has been created: Representer fails on some solutions · Issue #48 · exercism/python-representer · GitHub

CC @BethanyG

2 Likes

Thanks a lot (for this and the whole site)!

2 Likes

:wave:

Thanks @Timus for bringing this up, and to @ErikSchierboom for investigating and logging the issue. :blue_heart:

I updated the issue with a status. We have a PR queued up that will fix this, but there was some more work/more tests possibly needed. Hopefully, I can get that over the line & merged sometime soon.

1 Like

Hi @BethanyG, thanks! I wanted to kindly ask if the issue should be fixed by now? (I’m not trying to push anything!) I’ve just re-checked and it still seems like the solution isn’t displayed under the community solutions. I have now 3 published Python solutions that don’t show up there: Binary Search Tree, Grep and the one I’ve opened this thread with (SGF Parsing). Two of them use pattern matching (the match-case syntax): might that be a problem?

Hey there, @Timus

I don’t think the issue is the Structural Pattern Matching (the match-case syntax) - that should have been fixed and the solutions re-run.

There have be other representer issues that have been found/fixed - but those should not have impacted your solutions.

Let me do some testing today in the representer specifically on your solutions, and try to get to the bottom of it. :smile:

Apologies for the long wait here.

1 Like

Thank you! :pray:t2: And: absolutely no need for an apology!

@Timus - I’ve run your referenced solutions through the Python representer that’s deployed to production (the one on main in the GH Repo) . I used the run-in-docker.sh script.

I didn’t get any errors or stack traces, and placeholders were successfully produced. I’ve put the results in a gist.

So my suspicion here is that once normalization was run, your solution was substantially similar to other solutions that were older/from higher rep users/submitted often – so was grouped and became invisible. But I am not positive of that.

@ErikSchierboom - any insight you can lend? I did go back and try to search (using code, and also by searching manually on the username page-by-page), but didn’t turn up any of these solutions. Let me know if you’d like the output files, I have them saved on my machine.

Thanks for the reply!

I thought about that too. But I think my Grep solution is pretty unique (at least from skimming over the other solutions). And the solutions that don’t show up also don’t have the indication of how many similar solutions have been published:

Here for example it’s 2, at the right bottom, before the <>:

I did a little more digging. :smile: Turns out, your solution to Binary Search Tree was … (ahem) doubly cursed.

The intermediary issues I mentioned above that we found and fixed in the representer? They were a problem for Binary Search Tree, due to the use of yield from.

We didn’t re-run all solutions in that circumstance because the change affected a much smaller sub-set of solutions:woman_facepalming:

@ErikSchierboom: rebuilding the representer and rerunning Binary Search Tree with this branch shows the problem. Rebuilding the representer and rerunning Binary Search Tree with this branch or main shows the fix.

So we need to re-run at least that solution. But the other two did not throw a stack trace even on the earlier branch, so I am not sure what is happening there.

I hesitate to re-run everything, especially since we have a fix that affects Data Classes that will be coming along soon-ish, as well as upgrades to libraries and Python versions, so I think we need to hold off.

1 Like

@BethanyG I’ve re-ran all three solutions from @Timus and the representations were all correctly generated.

2 Likes

Great, now all of the 3 solutions are visible in the community solutions!