-
Notifications
You must be signed in to change notification settings - Fork 1
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
160 148 defences #177
160 148 defences #177
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #177 +/- ##
==========================================
- Coverage 97.72% 97.71% -0.02%
==========================================
Files 12 12
Lines 1012 1005 -7
==========================================
- Hits 989 982 -7
Misses 23 23
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Overview
Hi @SergioRec.
Great job getting all of this done, all features function well and as expected. All features are also tested comprehensively to a high standard.
Suggested Changes
Along with the comments added to this review, I also have more changes that didn't associate to lines touched within this PR (however are related to the PR).
- Lines 358-362 in
raster_uc.py
: Using the_check_iter_length()
defence function would be useful here.
HI @SergioRec . I've looked through the changes and all the requested changes seem to be acted upon. Great job getting these done. Will merge into dev now. |
* refactor: changed type defences to module * tests: updated match error messages * feat: replaced list functions to accept any iterable * chore: replace function names in code * refactor: changed tuple defence in uc * fix: replaced import to prevent deprecation warning * fix: typo in imported function * fix: fixed function argument names and gtfs tests * tests: changes to defence tests * tests: finished changes to defence tests * feat: added check iterable lenght func * refactor: change centre tuple length check in uc * tests: add tests for iterable length * fix: minor corrections to match error messages * Reorganise imports; Update comment specifying PosixPath to Path * add space for pre-commit; * Best practice changes;Update type hinting and associated docstring * chore: run pre-commit * style: changes to docs, style and defences as suggested in review * fix: changed defences in cleaners.py * fix: fixed check for type None --------- Co-authored-by: Charlie Browning <[email protected]> Co-authored-by: Ethan Moss <[email protected]> e7c6e7f
Description
_check_list
and_check_item_in_list
to accept any iterable. Renamed to_check_iterable
and_check_item_in_iter
.defence.py
functions whenever possible.Fixes #148
Fixes #160
Motivation and Context
Motivation for these changes is try to use consistent defences, and to turn the most common defences into functions to reuse.
Type of change
How Has This Been Tested?
Test configuration details:
Advice for reviewer
I haven't checked to replace any defence in other modules other than urban centres, as this would make the dif too big and messy. Better to add these as new tickets.
Checklist:
Additional comments