-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
Yep, figured I'd risk the duplicate work! :) |
* 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
* 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
Revised, increased speed on example.py
* 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
* 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..."
This issue has been automatically marked as |
I could use some feedback on this one since it's a refactor-type problem. |
… mess (Not Pythonic, etc)
… ledger.py implementation)
There was a problem hiding this 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.
This issue has been automatically marked as |
Resolves #737