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

[Two Bucket]: Update Test Generation Template To Accommodate New Tests #2916

Closed
BethanyG opened this issue Feb 10, 2022 · 3 comments
Closed
Assignees
Labels
claimed 🐾 For new exercises being written by contributors and maintainers. improve exercise 💖 x:action/fix Fix an issue x:knowledge/intermediate Quite a bit of Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:size/medium Medium amount of work x:status/claimed Someone is working on this issue x:type/content Work on content (e.g. exercises, concepts)

Comments

@BethanyG
Copy link
Member

Recently, we updated the Two Bucket exercise to incorporate new tests from the problem-specifications repo. Unfortunately, these new tests have broken test generation for the exercise, and had to be skipped in the tests.toml file.

We need to:

  1. Figure out why running bin/generate_tests.py is failing for two-bucket when the three tests are included.
    The three tests are:
    • [449be72d-b10a-4f4b-a959-ca741e333b72]
      description = "Not possible to reach the goal"
      include = false

    • [aac38b7a-77f4-4d62-9b91-8846d533b054]
      description = "With the same buckets but a different goal, then it is possible"
      include = false

    • [74633132-0ccf-49de-8450-af4ab2e3b299]
      description = "Goal larger than both buckets is impossible"
      include = false

  2. Make the appropriate edits to the two-bucket JinJa2 template
  3. Regenerate the test file for two-bucket by running bin/generate_tests.py two-bucket
  4. Test that the code in the two-bucket example.py file passes all the re-generated tests.
  5. Make any necessary edits to example.py if there are any test failures.

This task requires knowledge of (or interest in learning):

JinJa2 templating
JinJa2 docs (the version we use)
The Python Test Generator

@BethanyG BethanyG added x:action/fix Fix an issue x:knowledge/intermediate Quite a bit of Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts) x:size/medium Medium amount of work help wanted We'd like your help with this. labels Feb 10, 2022
@exercism exercism deleted a comment from github-actions bot Feb 10, 2022
@mhorod
Copy link
Contributor

mhorod commented Feb 12, 2022

I think I have solved the issue. Is there any formatter for template files that I should use before committing my changes?

@BethanyG
Copy link
Member Author

BethanyG commented Feb 12, 2022

Excellent, @mhorod. Thank you so much for taking this on! 🌟

Is there any formatter for template files that I should use before committing my changes?

No - we don't yet have a JinJa formatter in place. 😅 I'll have to eyeball it. If you have experience with JinJa, and have recommendations on formatters, I'd love to hear them. We have an issue open here on JinJa templating and linting: issue 2698

When you do check in, please include the following in your PR:

  1. The edited tests.toml file.
  2. The new JinJa2 template
  3. The regenerated tests file created from the new template.
  4. Any changes needed to the two bucket example code, after running it against the newly regenerated file.
  5. An edited config.json for two-bucket, adding your GH handle to the contributors key. 😄

Again -- many thanks for working on this!! 🌈

@BethanyG BethanyG added claimed 🐾 For new exercises being written by contributors and maintainers. x:status/claimed Someone is working on this issue labels Feb 12, 2022
@BethanyG BethanyG removed the help wanted We'd like your help with this. label Feb 15, 2022
@BethanyG
Copy link
Member Author

Closing now that #2929 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
claimed 🐾 For new exercises being written by contributors and maintainers. improve exercise 💖 x:action/fix Fix an issue x:knowledge/intermediate Quite a bit of Exercism knowledge required x:module/practice-exercise Work on Practice Exercises x:size/medium Medium amount of work x:status/claimed Someone is working on this issue x:type/content Work on content (e.g. exercises, concepts)
Projects
None yet
Development

No branches or pull requests

2 participants