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

[WIP] Implement exercise ledger #1092

Closed
wants to merge 41 commits into from
Closed

[WIP] Implement exercise ledger #1092

wants to merge 41 commits into from

Conversation

codyfletcher
Copy link

@codyfletcher codyfletcher commented Nov 1, 2017

Resolves #737

@cmccandless
Copy link
Contributor

cmccandless commented Nov 1, 2017

Technically this is a duplicate of #951, but that PR appears as though it might be abandoned.
#951 has been closed.

@codyfletcher
Copy link
Author

Yep, figured I'd risk the duplicate work! :)

cmccandless and others added 27 commits November 5, 2017 22:09
* add dominoes/README.md

* Add test cases and example solution for dominoes

* add dominoes to config.json

* dominoes: add check for name == "__main__"

* dominoes: update canonical data version and formatting fixes in README

* dominoes: update README to latest description

RE: exercism/problem-specifications#972
* react: add README

* react: update config.json

* react: create solution template

* react: write test cases

* react: write example solution
* conform to canonical-data.json

* fix flake8 violations
* complex-numbers: check test version and update

* Swap the order of expected and actual value in assertEqual
* parallel-letter-frequency: Implement exercise to resolve #744

* parallel-letter-frequency: Removed infinite loop

* parallel-letter-frequency: README format fixes
* Fix indentation for zipper exercise metadata

* Fix invalid exercise UUIDs

  *  parallel-letter-frequency: update config.json with new UUID
  *  tree-building: update config.json with new UUID
  *  two-fer: update config.json with new UUID
  *  two-bucket: update config.json with new UUID
  *  markdown: update config.json with new UUID
  *  forth: update config.json with new UUID
  *  zipper: update config.json with new UUID
  *  error-handling: update config.json with new UUID
  *  dominoes: update config.json with new UUID
  *  pov: update config.json with new UUID
  *  react: update config.json with new UUID
  *  simple-linked-list: update config.json with new UUID
* minesweeper: update tests to version 1.1.0

Add missing test version comment.
Add ordered tests with names matching canonical data descriptions.
Disable empty board tests which are incompatible with board class.
Move selected old tests to additional tests section.
Convert no row/column tests to expect validation to raise ValueError.
Closes #998

* minesweeper: update test data to canonical format 1.0.0

Update test data to borderless format which matches canonical data format.
Change board verification to not test for borders and default example to
properly return a completely empty board and account for new index when there
is no border.
…al data (#1052)

* Update perfect numbers test to reflect changes to canonical data

* Switch assertRaises to assertRaisesRegex and use context manager syntax

* Fix error caused by assertRaisesRegex not being available in Python 2.7

* Remove error message checks

* Update exercise placeholder
Remove module name heuristics to:
* Enforce strict module name scheme (snakecase of exercise name).
* Prevent test passing with incorrect module names.
* Avoid local issues with installed modules of the same name (eg. `markdown`).
* parallel-letter-frequency: Delete directory

* Mark parallel-letter-frequency as foregone
Re #1096, valid uuid is [\da-f]{8}(-[\da-f]{4}){3}-[\da-f]{12}. This exercise must've been merged after #1096 or was simply missed.
* Make probot/stale more useful

Propose the following changes:
- `daysUntilStale: 60 -> 21`: With 5 track maintainers (3+ active), issues are being manually closed after ~20 days frequently. 60 days is too long.
- Add `epic` to `exemptLabels`: `epic` denotes issues that are usually super-issues, and closing every sub-issue takes a lot of effort and time.
- `staleLabel: on hiatus -> abandoned`: `abandoned` is typically used by the maintainers here, so change for consistency

* ignore "enchancement" and "beginner friendly" labels
* say: change to more appropriate exception type

From the [Python documentation](https://docs.python.org/2/library/exceptions.html#exceptions.AttributeError), `AttributeError` is "raised when an attribute reference or assignment fails." This situation is more appropriate for [`ValueError`](https://docs.python.org/2/library/exceptions.html#exceptions.ValueError): "Raised when a built-in operation or function receives an argument that has the right type but an inappropriate value..."
@stale
Copy link

stale bot commented Nov 24, 2017

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the abandoned label Nov 24, 2017
@stale stale bot removed the abandoned label Nov 24, 2017
@codyfletcher
Copy link
Author

I could use some feedback on this one since it's a refactor-type problem.

Copy link
Contributor

@cmccandless cmccandless left a comment

Choose a reason for hiding this comment

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

@codyfletcher In a refactoring exercise, I would think that the goal would be to make the provided solution as inefficient as possible. With that in mind, I would suggest the following:

  • Store as little as possible, instead performing all calculations/evaluations every time the result is needed
  • When possible, use inefficient algorithms as an alternative to optimized, built-in functions (sorted(), for example)
  • Use as few helper functions as possible. If the tests do not require a function, consider removing the function and instead duplicating the code everywhere it was called.

Creating a solution of this kind is an interesting thought experiment, as we are constantly retraining our minds to write code that is more efficient, and in many ways may do so more out of habit. Writing such code forces us to think through every line of code we write, which is a good practice anyway.

@stale
Copy link

stale bot commented Dec 18, 2017

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the abandoned label Dec 18, 2017
@stale stale bot closed this Dec 25, 2017
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.