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

[#763] New practice exercise affine-cipher #773

Merged
merged 9 commits into from
Jun 22, 2021

Conversation

jiegillet
Copy link
Contributor

One more exercise.

All files (minus config.json and tests.toml) were generated automatically from bin/boostrap_practice_exercise.exs. Of course, the tests needed a bunch of manual input, but usually at the level of search and replace, so it's quite valuable.

I tried to be a little bit clever about some things (for example @spec generation for the lib file) but I hope that contributors understand that they should not trust these guesses too much. Is it better to make them obviously wrong?
Please test that script by running elixir bin/boostrap_practice_exercise.exs darts (or whichever exercise is not done yet, I have not tested for those yet) and inspect the generated files. I'm sure there is room for improvement.

Now to think of it, should I make a different PR for this?

config and generated tests.toml
@github-actions
Copy link
Contributor

Thank you for contributing to exercism/elixir 💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.

Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:

  • General steps

    • 🏆 Does this PR need to receive a label with a reputation modifier (reputation/contributed_code/{minor,major})? (A medium reputation amount is awarded by default, see docs)
  • Any exercise changed

    • 👤 Does the author of the PR need to be added as an author or contributor in <exercise>/.meta/config.json (see docs)?
    • 🔬 Do the analyzer and the analyzer comments exist for this exercise? Do they need to be changed?
    • 📜 Does the design file (<exercise>/.meta/design.md) need to be updated to document new implementation decisions?
  • Practice exercise changed

    • 🌲 Do prerequisites, practices, and difficulty in config.json need to be updated?
    • 🧑‍🏫 Are the changes in accordance with the community-wide problem specifiations?
  • Practice exercise tests changed

    • ⚪️ Are all tests except the first one skipped?
    • 📜 Does <exercise>/.meta/tests.toml need updating?

Automated comment created by PR Commenter 🤖.

@jiegillet jiegillet changed the title [#763] New practice exercise affine cipher [#763] New practice exercise affine-cipher Jun 20, 2021
config.json Outdated
"tuples"
],
"practices": [
"enum",
Copy link
Contributor Author

@jiegillet jiegillet Jun 20, 2021

Choose a reason for hiding this comment

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

Sorry, I ran the checks on a slightly older branch that didn't have the concept tracking.
I'll remove enum.
Maybe I could add pipe-operator instead? AffineCipher.encode is just one nice pipe.

@angelikatyborska
Copy link
Contributor

Now to think of it, should I make a different PR for this?

Yes, a separate PR with just the bootstrap script would be great so that we don't need to block merging the exercise if the script need improvements or the other way around.

I'll review only the exercise on this PR and wait for a new PR with the script 🙂

Copy link
Contributor

@angelikatyborska angelikatyborska left a comment

Choose a reason for hiding this comment

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

Excellent work as always. You're unstoppable with the new exercises 😁.

I left a request to extend prerequisites and some optional feedback for the stub.

exercises/practice/affine-cipher/lib/affine_cipher.ex Outdated Show resolved Hide resolved
@doc """
Encode an encrypted message using a key
"""
@spec encode(key :: %{a: integer, b: integer}, message :: String.t()) ::
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe there could be a custom type definition at the beginning of the module for the key?

config.json Show resolved Hide resolved
config.json Show resolved Hide resolved
config.json Outdated Show resolved Hide resolved
Comment on lines +2482 to +2485
"practices": [
"pipe-operator",
"strings"
],
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a lot going on in this exercise, so I find it really hard to say what "practices" would be best. I think those make sense.

Copy link
Contributor

@angelikatyborska angelikatyborska left a comment

Choose a reason for hiding this comment

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

Looks great 👍 I'll wait a bit before merging to see if @neenjaw wants to add a review too.

@neenjaw
Copy link
Contributor

neenjaw commented Jun 22, 2021

Probably don't have time to look at this today, I trust your judgement @angelikatyborska :D

@angelikatyborska
Copy link
Contributor

No worries! I understand that sometimes less review work is better, so I'll just merge and @neenjaw can submit a patch PR in case there's something he really wants changed 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:size/large Large amount of work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants