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

[Maintenance]: Sync Practice Exercises from Problem Specification Repo #2914

Merged
merged 22 commits into from
Feb 10, 2022

Conversation

BethanyG
Copy link
Member

@BethanyG BethanyG commented Feb 10, 2022

Reviewers Please Note: Instruction files have bee pulled from problem specifications. Any spelling, grammar, or other errors need to be corrected there.

Decided to keep this as one PR. Breaking it down by exercise or exercise group seemed more trouble/noise.

Synced the following exercise instruction files:

  • affine-cipher
  • all-your-base
  • allergies
  • anagram
  • atbash-cipher
  • book-store
  • crypto-square
  • diffie-hellman
  • dominoes
  • go-counting
  • grade-school
  • grains
  • grep
  • largest-series-product
  • meetup
  • minesweeper
  • nucleotide-count
  • ocr-numbers
  • phone-number
  • point-mutations
  • pov
  • prime-factors
  • pythagorean-triplet
  • queen-attack
  • raindrops
  • rational-numbers
  • resistor-color
  • rest-api
  • roman-numerals
  • saddle-points
  • satellite
  • scale-generator
  • sgf-parsing
  • sieve
  • space-age
  • spiral-matrix
  • triangle
  • two-bucket
  • yacht

Synced the following exercise config.json files:

  • acronym
  • armstrong-numbers
  • binary
  • bowling
  • change
  • collatz-conjecture
  • connect
  • darts
  • dnd-character
  • dot-dsl
  • error-handling
  • flatten-array
  • food-chain
  • forth
  • grade-school
  • hello-world
  • high-scores
  • linked-list
  • list-ops
  • markdown
  • minesweeper
  • paasio
  • pig-latin
  • pov
  • resistor-color
  • reverse-string
  • scale-generator
  • simple-cipher
  • simple-linked-list
  • twelve-days
  • two-fer
  • yacht

Synced the following exercise tests.toml files, regenerated the *_tests.py files, tested the example.py files, and edited solutions as needed:

  • accumulate (deprecated)
  • bowling
  • collatz conjecture
  • flatten array
  • fourth
  • largest series product
  • list ops
  • matching brackets
  • meetup
  • pangram
  • protein translation
  • rational numbers (also edited example.py)
  • roman numerals
  • scale generator (also edited example.py)
  • space age
  • two bucket
  • word search
  • zipper

Pulled in updates to instructions from problem specifications.
Synced practice exercise config.json files to problem-specifications.
Syncted tests.toml, regenerated test cases and updated example.py
Synced tests.toml, regenerated test file.
Synced tests.toml, regenerated test cases.
Synced tests.toml, regenerated test file, and updated example.py
Synced tests.toml and edtied to omit test cases.  Regenerated test file.
Synced tests.toml and regenerated test file.
Synced tests.toml and regenerated test files.
Synced tests.toml and regenerated test file.
Syncted tests.toml and regenerated test file.
Synced tests.toml and regenerated test file.  Edited example.py so that new tests would pass.
Synced tests.toml and regenerated test file.
Synced tests.toml and regenerated tests.  Edited example.py to pass newly added tests.
Synced tests.toml and regeneratated test cases.
Synced tests.toml and regenerated test files.
Syncted tests.toml and regenerated test file.
@BethanyG BethanyG added the x:size/massive Massive amount of work label Feb 10, 2022
@github-actions
Copy link
Contributor

Hi & Welcome! 👋🏽 👋

Thank you for contributing to exercism/python 💛 💙 -- we really appreciate it! 🌟 🌈


This is an automated [🤖 🤖  ] comment for the maintainers of this repository, notifying them of your contribution. 🎉
Someone will review/reply to your changes shortly. (usually within 72 hours.)
You can safely ignore the maintainers section below.


⚠️  Please be aware ⚠️

     This repo does not generally accept Pull Requests unless they follow our contributing guidelines and are:

     1️⃣     Small, contained fixes for typos/grammar/punctuation/code syntax on [one] exercise,
     2️⃣     Medium changes that have been agreed/discussed via a filed issue,
     3️⃣     Contributions from our [help wanted][help-wanted] issue list,
     4️⃣     Larger (previously agreed-upon) contributions from recent & regular (within the last 6 months) contributors.

    Pull Requests not in these categories will be closed. 😞



💙 It looks like you are changing/adding files in a Practice Exercise! 💙

Please note: generally, changes to existing practice exercises or the addition
of new ones are proposed & discussed in problem-specifications first, so that all tracks can potentially benefit.
Once a change is approved there by three maintainers, it becomes available for various language tracks to then implement.


‼️  Did You...

  •  Update & rebase your branch with any (recent) upstream changes.
  •  Spell and grammar check all prose changes.
  •  Run Prettier on all markdown and JSON files.
  •  Run flake8 with flake8 config to check general code style standards.
  •   Run pylint with pylint config to check extended code style standards.
  •  Use pytest or the python-track-test-runner to test any changed example.py/exemplar.pyfiles
     against their associated test files.
  •  Similarly, use pytest or the python-track-test-runner to test any changed test files.
    • Check that tests fail properly, as well as succeed.
       (e.g., make some tests fail on purpose to "test the tests" & failure messages).
  •  Double-check all files for proper EOL.
  •  Regenerate exercise documents when you modified or created a hints.md file for a practice exercise.
  •  Regenerate the test file if you modified or created a JinJa2 template file for a practice exercise.
    • Run the generated test file result against its example.py.
  •  Run configlet-lint if the track config.json, or any other exercise config.json has been modified.


✅️  Have You Checked...

.
Are there any additional changes you need to make?
Please make sure all associated files are present and consistent with your changes!

Practice Exercise Anatomy

  • .docs/instructions.md(required)
  • .docs/introduction.md(optional)
  • .docs/introduction.append.md(optional)
  • .docs/instructions.append.md (optional)
  • .docs/hints.md(optional)
  • .meta/config.json (required)
  • .meta/example.py (required)
  • .meta/design.md (optional)
  • .meta/template.j2 (template for generating tests from canonical data)
  • .meta/tests.toml (do you need to include or exclude any cases?)
  • <exercise-slug>_test.py (do you need to regenerate this?)
  • <exercise-slug>.py (required)

🛠️    Maintainers   

Please take note 📒 of the following sections/review items 👀 ✨



🌈  Acknowledgements and Reputation
  • ❓ Does this PR need to receive a label with a reputation modifier?
    • medium is awarded by default.
  • ❓ Does this contributor need to be added to the exercise authors or contributors?
  • ❓ Does this contributor need to be added to the concept authors or contributors?
  • ❓ Is there an associated issue or issues that should be linked to this PR?
💫  General Code Quality

    Verify:

    •  The branch was updated & rebased with any (recent) upstream changes.
    •  All prose was checked for spelling and grammar.
    •  Files are formatted via yapf (yapf config) & conform to our coding standards
    •  Files pass flake8 with flake8 config & pylint with pylint config.
    •  Changed example.py/exemplar.py files still pass their associated test files.
    •  Changed test files still work with associated example.py/exemplar.py files.
      • Check that tests fail properly, as well as succeed.
        (e.g., make some tests fail on purpose to "test the tests" & failure messages).
    •  All files have proper EOL.
    •  If a JinJa2 template was modified/created, was the test file regenerated?
      • Does the regenerated test file successfully test the exercises example.py file?
    •  The branch passes all CI checks & configlet-lint.


🌿  Changes to Concept Exercises
  • ❓ Are all required files still up-to-date & configured correctly for this change?_
  • ❓ Does <exercise>/.meta/design.md need to be updated with new implementation/design decisions
  • ❓ Do these changes require follow-on/supporting changes to related concept documents?
    ✨  Where applicable, check the following ✨

      (as a reminder: Concept Exercise Anatomy)

      • Exercise introduction.md
        • Do all code examples compile, run, and return the shown output?
        • Are all the code examples formatted per the Python docs?
      • Exercise instructions.md
      • Exercise hints.md
      • Check that exercise design.md was fulfilled or edited appropriately
      • Exercise exemplar.py
        • Only uses syntax previously introduced or explained.
        • Is correct and appropriate for the exercise and story.
      • Exercise <exercise_name>.py (stub)
        • Includes appropriate docstrings and function names.
        • Includes pass for each function
        • Includes an EOL at the end
      • Exercise <exercise_name>_test.py
        • Tests cover all (reasonable) inputs and scenarios
        • At least one test for each task in the exercise
        • If using subtests or fixtures they're formatted correctly for the runner
        • Classnames are <ExerciseName>Test
        • Test functions are test_<test_name>
      • Exercise config.json --> valid UUID4
      • Corresponding concept introduction.md
      • Corresponding concept about.md
      • Concept config.json
      • All Markdown Files : Prettier linting (for all markdown docs)
      • All Code files: PyLint linting (except for test files)
      • All files with text: Spell check & grammar review.
🚀  Changes to Practice Exercises

    Is the exercise is in line with Practice Exercise Anatomy?

    • .docs/instructions.md(required)
      • Was this file updated and regenerated properly?
    • .docs/introduction.md(optional)
    • .docs/introduction.append.md(optional)
    • .docs/instructions.append.md (optional)
      • Are any additional instructions needed/provided?
         (e.g. error handling or information on classes)
    • .docs/hints.md(optional)
      • Was this file regenerated properly?
    • .meta/config.json (required)
    • .meta/example.py (required)
      • Does this pass all the current tests as written/generated?
    • .meta/design.md (optional)
    • .meta/template.j2 (template for generating tests from canonical data)
      • Was a test file properly regenerated from this template?
    • .meta/tests.toml
      • Are there additional test cases to include or exclude?
      • Are there any Python-specific test cases needed for this exercise?
    • <exercise-slug>_test.py
      • Does this file need to be regenerated?
      • Does this file correctly test the example.py file?
      • Does this file correctly report test failures and messages?
    • <exercise-slug>.py (required)
      • Does this stub have enough information to get
         the student started coding a valid solution?
🐣  Brand-New Concept Exercises

    Is the exercise is in line with Concept Exercise Anatomy?

    • Exercise introduction.md
      • Do all code examples compile, run, and return the shown output?
      • Are all the code examples formatted per the Python docs?
    • Exercise instructions.md
    • Exercise hints.md
    • Check that exercise design.md was fulfilled or edited appropriately
    • Exercise exemplar.py
      • Only uses syntax previously introduced or explained.
      • Is correct and appropriate for the exercise and story.
    • Exercise <exercise_name>.py (stub)
      • Includes appropriate docstrings and function names.
      • Includes pass for each function
      • Includes an EOL at the end
    • Exercise <exercise_name>_test.py
      • Tests cover all (reasonable) inputs and scenarios
      • At least one test for each task in the exercise
      • If using subtests or fixtures they're formatted correctly for the runner
      • Classnames are <ExerciseName>Test
      • Test functions are test_<test_name>
    • Exercise config.json --> valid UUID4
    • Corresponding concept introduction.md
    • Corresponding concept about.md
    • Concept config.json
    • All Markdown Files : Prettier linting (for all markdown docs)
    • All Code files: Flake8 & PyLint linting
    • All Code Examples: proper formatting and fencing. Verify they run in the REPL
    • All files with text: Spell check & grammar review.


Our   💖   for all your review efforts! 🌟 🦄

@BethanyG BethanyG requested a review from a team February 10, 2022 03:39
@neenjaw neenjaw self-requested a review February 10, 2022 03:41
Copy link
Contributor

@neenjaw neenjaw left a comment

Choose a reason for hiding this comment

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

Approving as I think the majority of the work is top notch. Impressive that with all those updates you only had to update 2 example solutions.

1 noted concern to double check before merging: the stub for two-bucket seems to have been replaced with the example solution. Is this intentional?

Nice work on this effort though!

@@ -19,7 +19,7 @@ the same to pick a private key b.

Alice calculates a public key A.

A = g**a mod p
A = gᵃ mod p
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, i didn't realize that Unicode or markdown would handle this.

Copy link
Member Author

Choose a reason for hiding this comment

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

There was quite the discussion on that one! 😄 diffie-hellman.

@@ -40,8 +40,8 @@ def test_missing_letters_replaced_by_numbers(self):
def test_mixed_case_and_punctuation(self):
self.assertIs(is_pangram('"Five quacking Zephyrs jolt my wax bed."'), True)

def test_case_insensitive(self):
self.assertIs(is_pangram("the quick brown fox jumps over with lazy FX"), False)
def test_a_m_and_a_m_are_26_different_characters_but_not_a_pangram(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

👀 while maybe not true snake case, using A_M for the second range may may more sense in context?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤔 Yeah. Problem is that this is auto-generated, and I don't know if I can get the generator to fix it. Let me try under a separate PR, if that's OK?

@@ -1,2 +1,55 @@
# def measure(bucket_one, bucket_two, goal, start_bucket):
Copy link
Contributor

@neenjaw neenjaw Feb 10, 2022

Choose a reason for hiding this comment

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

📌 Shouldn't this file be stubs and example.py be this solution?

Copy link
Member Author

Choose a reason for hiding this comment

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

GAH! good catch!. Pushed fix. Thank you so much for being my safety net!!

@BethanyG BethanyG merged commit 634b996 into exercism:main Feb 10, 2022
@BethanyG BethanyG deleted the sync-from-problem-specs branch February 10, 2022 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:size/massive Massive amount of work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants