Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

largest-series-product: Sync tests #770

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tasxatzial
Copy link
Member

Taking a stab at this. One thing that concerns me a bit is the type of Exception thrown. Right now all of them are marked as IllegalArgument, but perhaps not all of them should. In particular, a span that has length 5 and a string "123" will throw Exception even both of them are valid as individual arguments. It's just the combination that isn't valid.

@ErikSchierboom Any ideas?

Copy link
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@ErikSchierboom
Copy link
Member

In particular, a span that has length 5 and a string "123" will throw Exception even both of them are valid as individual arguments. It's just the combination that isn't valid.

I've checked the built-in exceptions and I don't think there is a better exception.

@tasxatzial
Copy link
Member Author

Ok, it's ready for review then.

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

Looks good! I hope the templating wasn't that much of a hassle.

@tasxatzial
Copy link
Member Author

I'm mostly copying and pasting while editing older templates. However, I'm not comfortable with generator.clj files, as I'm still confused about their inner workings. Everything moves faster than I'm able to keep up with.

@ErikSchierboom
Copy link
Member

I'm mostly copying and pasting while editing older templates.

To be fair, that's also what I do :)

However, I'm not comfortable with generator.clj files, as I'm still confused about their inner workings.

They're sort of like optional plug-in points, where if the file exists and it defines a transform-test-test-cases and/or transform-test-test-case function, those functions get called with the canonical data fetched from the prob-specs repo. This step happens before the templates are rendered. I've tried to document this in https://exercism.org/docs/tracks/clojure/generators, but let me know if that is insufficient.

Everything moves faster than I'm able to keep up with.

Sorry about that! I quite used to moving very fast, having been part of the Exercism team for 5 years and having been a (mostly autonomous) maintainer for the C#/F#/Prolog tracks.

@tasxatzial
Copy link
Member Author

I've tried to document this in https://exercism.org/docs/tracks/clojure/generators, but let me know if that is insufficient.

I think i've gotten the general idea, i'm just unsure how to use it. It's probably going to be simple once i get the details. The docs have two functions, with very similar names, one updates a test case, and the other adds/removes? I've also looked at the source code, but this did not help much either. At this point I'm not even sure if there's any kind of error hidden in either the docs or the code.

Sorry about that! I quite used to moving very fast, having been part of the Exercism team for 5 years and having been a (mostly autonomous) maintainer for the C#/F#/Prolog tracks.

That's ok. I aware that i can't possibly match the expertise of most maintainers. I'm just slow :)

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.

2 participants